K iˀddlmZddlmZddlmZddlmZmZddl m Z m Z m Z m Z mZmZmZedk7rdgZedZd gZedg Gd d Zdd lmZdd lmZy)) GROUND_TYPES) import_module)doctest_depends_on)ZZQQ)DMBadInputError DMDomainErrorDMNonSquareMatrixErrorDMNonInvertibleMatrixError DMRankError DMShapeError DMValueErrorflint*DFM ground_typesceZdZdZdZdZdZdZedZ dZ edZ ed Z ed Z ed Zd Zd ZdZedZdZdZdZdZdZdZedZedZdZdZedZdZedZ dZ!edZ"dZ#d Z$d!Z%d"Z&d#Z'd$Z(d%Z)d&Z*d'Z+d(Z,d)Z-d*Z.d+Z/d,Z0d-Z1d.Z2ed/Z3ed0Z4ed1Z5ed2Z6d3Z7d4Z8d5Z9d6Z:d7Z;d8Zd;Z?d<Z@d=ZAeBd>?d@ZCeBd>?dAZDeBd>?dBZEdCZFdDZGeBd>?dEZHdFZIdGZJdNdIZKdJZLdOdKZMeBd>?dPdLZNeBd>?dPdMZOyH)Qra& Dense FLINT matrix. This class is a wrapper for matrices from python-flint. >>> from sympy.polys.domains import ZZ >>> from sympy.polys.matrices.dfm import DFM >>> dfm = DFM([[ZZ(1), ZZ(2)], [ZZ(3), ZZ(4)]], (2, 2), ZZ) >>> dfm [[1, 2], [3, 4]] >>> dfm.rep [1, 2] [3, 4] >>> type(dfm.rep) # doctest: +SKIP Usually, the DFM class is not instantiated directly, but is created as the internal representation of :class:`~.DomainMatrix`. When `SYMPY_GROUND_TYPES` is set to `flint` and `python-flint` is installed, the :class:`DFM` class is used automatically as the internal representation of :class:`~.DomainMatrix` in dense format if the domain is supported by python-flint. >>> from sympy.polys.matrices.domainmatrix import DM >>> dM = DM([[1, 2], [3, 4]], ZZ) >>> dM.rep [[1, 2], [3, 4]] A :class:`~.DomainMatrix` can be converted to :class:`DFM` by calling the :meth:`to_dfm` method: >>> dM.to_dfm() [[1, 2], [3, 4]] denseTFc|j|}d|vr ||}n||}|j |||S#ttf$rtd|wxYw)Construct from a nested list.rz"Input should be a list of list of )_get_flint_func ValueError TypeErrorr _new)clsrowslistshapedomain flint_matreps _/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sympy/polys/matrices/_dfm.py__new__z DFM.__new__mss''/ E> U)U#CxxUF++  * U%(J6(&STT Us 8Ac|j|||tj|}||_|x|_\|_|_||_|S)z)Internal constructor from a flint matrix.)_checkobjectr$r"rrowscolsr )rr"rr objs r#rzDFM._new{sJ 3v&nnS!).. &CHch  cP|j||j|jS)z>Create a new DFM with the same shape and domain but a new rep.)rrr )selfr"s r#_new_repz DFM._new_repsyydjj$++66r+c|j|jf}||k7r td|tk(r%t |t j s td|tk(r%t |t js td|jr5t |t jt jfs td|ttfvr|js tdyy)Nz(Shape of rep does not match shape of DFMzRep is not a flint.fmpz_matzRep is not a flint.fmpq_matz1Rep is not a flint.fmpz_mod_mat or flint.nmod_mat#Only ZZ and QQ are supported by DFM)nrowsncolsr r isinstancerfmpz_mat RuntimeErrorrfmpq_matis_FF fmpz_mod_matnmod_matNotImplementedError)rr"rr repshapes r#r&z DFM._checksIIK- u !"LM M R< 3 ?<= = r\*S%.."A<= = \\*S53E3Eu~~2V"WRS S B8 #FLL%&KL L-9 #r+cV|ttfvxs|jxr |jS)z4Return True if the given domain is supported by DFM.)rrr7 _is_flint)rr s r#_supports_domainzDFM._supports_domains'"b!FV\\%Ff6F6FFr+cj|tk(rtjS|tk(rtjS|j rh|j t|jtjrtjfd}|Stjfd}|Std)z3Return the flint matrix class for the given domain.ct|dk(r(t|dtjr |dSg|S)Nrr)lenr3rr9)e_clscs r#_funcz"DFM._get_flint_func.._funcs=1v{z!A$'G#AaDz)#{Q{{*r+c2tjg|SN)rr8)rBms r#z%DFM._get_flint_func..s5#5#5#> ! r\>> ! \\%%'A&**ejj1~~+L&&q)<L%&KL Lr+c8|j|jS)z5Callable to create a flint matrix of the same domain.)rr r-s r#rEz DFM._funcs##DKK00r+c4t|jS)zReturn ``str(self)``.)strto_ddmrOs r#__str__z DFM.__str__s4;;=!!r+c@dt|jddS)zReturn ``repr(self)``.rN)reprrRrOs r#__repr__z DFM.__repr__s"T$++-(,-..r+ct|tstS|j|jk(xr|j|jk(S)zReturn ``self == other``.)r3rNotImplementedr r"r-others r#__eq__z DFM.__eq__s9%%! !{{ell*Dtxx599/DDr+c||||S)r)rrrr s r# from_listz DFM.from_lists8UF++r+c6|jjS)zConvert to a nested list.)r"tolistrOs r#to_listz DFM.to_listsxx  r+cV|j|j|jS)zReturn a copy of self.)r.rEr"rOs r#copyzDFM.copys}}TZZ122r+cttj|j|j|jS)zConvert to a DDM.)DDMr_rbrr rOs r#rRz DFM.to_ddm#}}T\\^TZZEEr+cttj|j|j|jS)zConvert to a SDM.)SDMr_rbrr rOs r#to_sdmz DFM.to_sdmrgr+c|S)z Return self.r^rOs r#to_dfmz DFM.to_dfms r+c|S)aL Convert to a :class:`DFM`. This :class:`DFM` method exists to parallel the :class:`~.DDM` and :class:`~.SDM` methods. For :class:`DFM` it will always return self. See Also ======== to_ddm to_sdm sympy.polys.matrices.domainmatrix.DomainMatrix.to_dfm_or_ddm r^rOs r# to_dfm_or_ddmzDFM.to_dfm_or_ddms  r+cl|j|j|j|jS)zConvert from a DDM.)r_rbrr )rddms r#from_ddmz DFM.from_ddms%}}S[[]CIIszzBBr+c|j|} |g||}||||S#t$rtd|t$rtd|wxYw)z Inverse of :meth:`to_list_flat`.z'Incorrect number of elements for shape zInput should be a list of )rrr r)relementsrr funcr"s r#from_list_flatzDFM.from_list_flats""6* I((x(C 3v&&  U!$KE7"ST T I!$>vh"GH H Is '.Ac6|jjS)zConvert to a flat list.)r"entriesrOs r# to_list_flatzDFM.to_list_flatsxx!!r+c>|jjS)z$Convert to a flat list of non-zeros.)rR to_flat_nzrOs r#rzzDFM.to_flat_nzs{{}''))r+cLtj|||jS)zInverse of :meth:`to_flat_nz`.)rf from_flat_nzrl)rrsdatar s r#r|zDFM.from_flat_nz s"$7>>@@r+c>|jjS)zConvert to a DOD.)rRto_dodrOs r#rz DFM.to_dod{{}##%%r+cLtj|||jS)zInverse of :meth:`to_dod`.)rffrom_dodrl)rdodrr s r#rz DFM.from_dod ||C/6688r+c>|jjS)zConvert to a DOK.)rRto_dokrOs r#rz DFM.to_dokrr+cLtj|||jS)zInverse of :math:`to_dod`.)rffrom_dokrl)rdokrr s r#rz DFM.from_dokrr+c#K|j\}}|j}t|D]%}t|D]}|||f}|s |||f'yw)z/Iterate over the non-zero values of the matrix.Nrr"ranger-rHnr"ijrepijs r# iter_valueszDFM.iter_values"s_zz1hhq $A1X $AqD ad)O $ $s AAAc#K|j\}}|j}t|D]$}t|D]}|||f}|s ||f|f&yw)zBIterate over indices and values of nonzero elements of the matrix.Nrrs r# iter_itemszDFM.iter_items,s`zz1hhq *A1X *AqD q65/) * *s AA Ac~||jk(r|jS|tk(rM|jtk(r:|j t j |j|j|S|j|r-|jj|jStd)zConvert to a new domain.r0)r rdrrrrr6r"rr>rR convert_torlr:)r-r s r#rzDFM.convert_to6s T[[ 99;  r\dkkR/99U^^DHH5tzz6J J  " "6 *;;=++F3::< <&&KL Lr+c |j\}}|dkr||z }|dkr||z } |j||fS#t$rtd|d|d|jwxYw)zGet the ``(i, j)``-th entry.rInvalid indices (, ) for Matrix of shape rr"r IndexError)r-rrrHrs r#getitemz DFM.getitemDs~zz1 q5 FA q5 FA ]88AqD> ! ]02aS8Ntzzl[\ \ ]s 6(Ac |j\}}|dkr||z }|dkr||z } ||j||f<y#t$rtd|d|d|jwxYw)zSet the ``(i, j)``-th entry.rrrrNr)r-rrvaluerHrs r#setitemz DFM.setitemRs}zz1 q5 FA q5 FA ]"DHHQTN ]02aS8Ntzzl[\ \ ]s 7(Ac |j}|Dcgc]}|Dcgc] }|||f c}}}}t|t|f}|j|||jScc}wcc}}w)z%Extract a submatrix with no checking.)r"rAr_r )r- i_indices j_indicesMrrlolrs r#_extractz DFM._extract`sd HH5>?+A!Q$+??YY0~~c5$++66,?s A)A$ A)$A)c|j\}}g}g}|D]H}|dkr||z}n|}d|cxkr|ksntd|d|j|j|J|D]H} | dkr| |z} n| } d| cxkr|ksntd| d|j|j| J|j||S)zExtract a submatrix.rzInvalid row index z for Matrix of shape zInvalid column index )rrappendr) r-rcolslistrHrnew_rowsnew_colsri_posrj_poss r#extractz DFM.extracths zz1 #A1uA>> #5aS8Mdjj\!Z[[ OOE " # #A1uA>> #8;PQUQ[Q[P\!]^^ OOE " #}}Xx00r+c||j\}}t||}t||}|j||S)z Slice a DFM.)rrr)r-rowslicecolslicerHrrrs r# extract_slicezDFM.extract_slices>zz1!HX& !HX& }}Y 22r+c:|j|j SzNegate a DFM matrix.r.r"rOs r#negzDFM.negs}}dhhY''r+cR|j|j|jzS)zAdd two DFM matrices.rrZs r#addzDFM.add}}TXX 122r+cR|j|j|jz S)zSubtract two DFM matrices.rrZs r#subzDFM.subrr+c>|j|j|zS)z1Multiply a DFM matrix from the right by a scalar.rrZs r#mulzDFM.muls}}TXX-..r+c>|j||jzS)z0Multiply a DFM matrix from the left by a scalar.rrZs r#rmulzDFM.rmuls}}UTXX-..r+cx|jj|jjS)z/Elementwise multiplication of two DFM matrices.)rRmul_elementwiserlrZs r#rzDFM.mul_elementwises*{{},,U\\^<CCEEr+c|j|jf}|j|j|jz||jS)zMultiply two DFM matrices.)r(r)rr"r )r-r[rs r#matmulz DFM.matmuls8EJJ'yyEII-udkkBBr+c"|jSr)rrOs r#__neg__z DFM.__neg__sxxzr+cP|j|}|j||||S)zReturn a zero DFM matrix.)rr)rrr rts r#zerosz DFM.zeross+""6*xxe eV44r+cJtj||jS)zReturn a one DFM matrix.)rfonesrl)rrr s r#rzDFM.onessxxv&--//r+cJtj||jS)z%Return the identity matrix of size n.)rfeyerl)rrr s r#rzDFM.eyeswwq&!((**r+cJtj||jS)zReturn a diagonal matrix.)rfdiagrl)rrsr s r#rzDFM.diagsxx&)0022r+c^|jj||jS)z/Apply a function to each entry of a DFM matrix.)rR applyfuncrl)r-rtr s r#rz DFM.applyfuncs${{}&&tV4;;==r+c|j|jj|j|jf|j S)zTranspose a DFM matrix.)rr" transposer)r(r rOs r#rz DFM.transposes3yy++- 499/Et{{SSr+c|jj|Dcgc]}|jc}jScc}w)zHorizontally stack matrices.)rRhstackrlr-othersos r#rz DFM.hstack8#t{{}##&%AQahhj%ABIIKK%AAc|jj|Dcgc]}|jc}jScc}w)zVertically stack matrices.)rRvstackrlrs r#rz DFM.vstackrrc|j}|j\}}tt||Dcgc] }|||f c}Scc}w)z$Return the diagonal of a DFM matrix.)r"rrmin)r-rrHrrs r#diagonalz DFM.diagonals? HHzz1!&s1ay!12A!Q$222sAc|j}t|jD]0}tt||jD] }|||fs y2y)z2Return ``True`` if the matrix is upper triangular.FT)r"rr(rr)r-rrrs r#is_upperz DFM.is_uppersU HHtyy! !A3q$)),- !QT7  ! !r+c|j}t|jD]*}t|dz|jD] }|||fs y,y)z2Return ``True`` if the matrix is lower triangular.rFTr"rr(r)rs r#is_lowerz DFM.is_lowersT HHtyy! !A1q5$)), !QT7  ! !r+cF|jxr|jS)z*Return ``True`` if the matrix is diagonal.)rrrOs r# is_diagonalzDFM.is_diagonals}}24==?2r+c|j}t|jD]&}t|jD] }|||fs y(y)z1Return ``True`` if the matrix is the zero matrix.FTrrs r#is_zero_matrixzDFM.is_zero_matrixsN HHtyy! !A499% !QT7  ! !r+c>|jjS)z5Return the number of non-zero elements in the matrix.)rRnnzrOs r#rzDFM.nnz{{}  ""r+c>|jjS)z7Return the strongly connected components of the matrix.)rRsccrOs r#rzDFM.sccrr+rrc6|jjS)a Compute the determinant of the matrix using FLINT. Examples ======== >>> from sympy import Matrix >>> M = Matrix([[1, 2], [3, 4]]) >>> dfm = M.to_DM().to_dfm() >>> dfm [[1, 2], [3, 4]] >>> dfm.det() -2 Notes ===== Calls the ``.det()`` method of the underlying FLINT matrix. For :ref:`ZZ` or :ref:`QQ` this calls ``fmpz_mat_det`` or ``fmpq_mat_det`` respectively. At the time of writing the implementation of ``fmpz_mat_det`` uses one of several algorithms depending on the size of the matrix and bit size of the entries. The algorithms used are: - Cofactor for very small (up to 4x4) matrices. - Bareiss for small (up to 25x25) matrices. - Modular algorithms for larger matrices (up to 60x60) or for larger matrices with large bit sizes. - Modular "accelerated" for larger matrices (60x60 upwards) if the bit size is smaller than the dimensions of the matrix. The implementation of ``fmpq_mat_det`` clears denominators from each row (not the whole matrix) and then calls ``fmpz_mat_det`` and divides by the product of the denominators. See Also ======== sympy.polys.matrices.domainmatrix.DomainMatrix.det Higher level interface to compute the determinant of a matrix. )r"detrOs r#rzDFM.det sbxx||~r+c^|jjjdddS)a# Compute the characteristic polynomial of the matrix using FLINT. Examples ======== >>> from sympy import Matrix >>> M = Matrix([[1, 2], [3, 4]]) >>> dfm = M.to_DM().to_dfm() # need ground types = 'flint' >>> dfm [[1, 2], [3, 4]] >>> dfm.charpoly() [1, -5, -2] Notes ===== Calls the ``.charpoly()`` method of the underlying FLINT matrix. For :ref:`ZZ` or :ref:`QQ` this calls ``fmpz_mat_charpoly`` or ``fmpq_mat_charpoly`` respectively. At the time of writing the implementation of ``fmpq_mat_charpoly`` clears a denominator from the whole matrix and then calls ``fmpz_mat_charpoly``. The coefficients of the characteristic polynomial are then multiplied by powers of the denominator. The ``fmpz_mat_charpoly`` method uses a modular algorithm with CRT reconstruction. The modular algorithm uses ``nmod_mat_charpoly`` which uses Berkowitz for small matrices and non-prime moduli or otherwise the Danilevsky method. See Also ======== sympy.polys.matrices.domainmatrix.DomainMatrix.charpoly Higher level interface to compute the characteristic polynomial of a matrix. N)r"charpolycoeffsrOs r#rz DFM.charpoly?s*Txx  "))+DbD11r+cP|j}|j\}}||k7r td|tk(rt d|z|t k(s |j r* |j|jjStd|z#t$r tdwxYw)a Compute the inverse of a matrix using FLINT. Examples ======== >>> from sympy import Matrix, QQ >>> M = Matrix([[1, 2], [3, 4]]) >>> dfm = M.to_DM().to_dfm().convert_to(QQ) >>> dfm [[1, 2], [3, 4]] >>> dfm.inv() [[-2, 1], [3/2, -1/2]] >>> dfm.matmul(dfm.inv()) [[1, 0], [0, 1]] Notes ===== Calls the ``.inv()`` method of the underlying FLINT matrix. For now this will raise an error if the domain is :ref:`ZZ` but will use the FLINT method for :ref:`QQ`. The FLINT methods for :ref:`ZZ` and :ref:`QQ` are ``fmpz_mat_inv`` and ``fmpq_mat_inv`` respectively. The ``fmpz_mat_inv`` method computes an inverse with denominator. This is implemented by calling ``fmpz_mat_solve`` (see notes in :meth:`lu_solve` about the algorithm). The ``fmpq_mat_inv`` method clears denominators from each row and then multiplies those into the rhs identity matrix before calling ``fmpz_mat_solve``. See Also ======== sympy.polys.matrices.domainmatrix.DomainMatrix.inv Higher level method for computing the inverse of a matrix. z!cannot invert a non-square matrixzfield expected, got %szmatrix is not invertiblez#DFM.inv() is not implemented for %s) r rr rr rr7r.r"invZeroDivisionErrorr r:)r-KrHrs r#rzDFM.invksn KKzz1 6()LM M 7 81 <= = "W M}}TXX\\^44 &&Ka&OP P % M01KLL Ms (BB%c|jj\}}}|j|j|fS)z*Return the LU decomposition of the matrix.)rRlurl)r-LUswapss r#rzDFM.lus5kkm&&( 1exxz188:u,,r+c|jj\}}|j|jfS)z*Return the QR decomposition of the matrix.)rRqrrl)r-QRs r#rzDFM.qrs1{{}!1xxz188:%%r+c |j|jk(s%td|jd|j|jjstd|jz|j\}}|j\}}||k7rt d|d|d|d|||f}||k7r;|j j |j jS |jj|j}|j|||jS#t$r tdwxYw)a Solve a matrix equation using FLINT. Examples ======== >>> from sympy import Matrix, QQ >>> M = Matrix([[1, 2], [3, 4]]) >>> dfm = M.to_DM().to_dfm().convert_to(QQ) >>> dfm [[1, 2], [3, 4]] >>> rhs = Matrix([1, 2]).to_DM().to_dfm().convert_to(QQ) >>> dfm.lu_solve(rhs) [[0], [1/2]] Notes ===== Calls the ``.solve()`` method of the underlying FLINT matrix. For now this will raise an error if the domain is :ref:`ZZ` but will use the FLINT method for :ref:`QQ`. The FLINT methods for :ref:`ZZ` and :ref:`QQ` are ``fmpz_mat_solve`` and ``fmpq_mat_solve`` respectively. The ``fmpq_mat_solve`` method uses one of two algorithms: - For small matrices (<25 rows) it clears denominators between the matrix and rhs and uses ``fmpz_mat_solve``. - For larger matrices it uses ``fmpq_mat_solve_dixon`` which is a modular approach with CRT reconstruction over :ref:`QQ`. The ``fmpz_mat_solve`` method uses one of four algorithms: - For very small (<= 3x3) matrices it uses a Cramer's rule. - For small (<= 15x15) matrices it uses a fraction-free LU solve. - Otherwise it uses either Dixon or another multimodular approach. See Also ======== sympy.polys.matrices.domainmatrix.DomainMatrix.lu_solve Higher level interface to solve a matrix equation. zDomains must match: z != zField expected, got %szMatrix size mismatch: z * z vs z Matrix det == 0; not invertible.) r r is_FieldrrrRlu_solverlr"solverr r)r-rhsrHrrk sol_shapesols r#rz DFM.lu_solves\{{cjj($++szz Z[ [ {{## 84;; FG Gzz1yy1 6QPQSTVWXY YF 6;;=))#**,7>>@ @ Q((..)Cyyi55! Q,-OP P Qs ,%D..Ec|jtk(rt|jdd}||jj \}}}}|j \}}|j |||f|j|j |||f|j|j |||f|j|j ||j |jfS|jj \}} } } |j}| j}| j}| j}||||fS)a Fraction-free LU decomposition of DFM. Explanation =========== Uses `python-flint` if possible for a matrix of integers otherwise uses the DDM method. See Also ======== sympy.polys.matrices.ddm.DDM.fflu ffluN) r rgetattrr"r rrrRrl) r-r PrDrrHrddm_pddm_lddm_dddm_us r#r zDFM.fflus ;;" 488VT2D!XX]]_ 1azz1IIa!Q5IIa!Q5IIa!Q5IIaT[[9  &*[[]%7%7%9"ueU LLN LLN LLN LLN!Qzr+ch|jj\}}|j|fS)/Return a basis for the nullspace of the matrix.)rR nullspacerl)r-rp nonpivotss r#rz DFM.nullspace5s-&002Yzz|Y&&r+Ncl|jj|\}}|j|fS)r)pivots)rjnullspace_from_rrefrl)r-rsdmrs r#rzDFM.nullspace_from_rrefKs2::&:IYzz|Y&&r+cZ|jjjS)z+Return a particular solution to the system.)rR particularrlrOs r#rzDFM.particularQs {{}'')0022r+cd}||}||}d|cxkrdkstdtd|j\}}|jj|k7r t d|jj |||||S)zACall the fmpz_mat.lll() method but check rank to avoid segfaults.ctj|r+t|jt|jz St|SrG)rof_typefloat numerator denominator)xs r#to_floatzDFM._lll..to_float_s3zz!}Q[[)E!--,@@@Qxr+g?rz delta must be between 0.25 and 1z-Matrix must have full row rank for Flint LLL.) transformdeltaetar"gram)rrr"rankr lll) r-r#r$r%r"r&r"rHrs r#_lllzDFM._lllUs smeaAB B AB Bzz1 88==?a MN Nxx||iu#3UY|ZZr+c|jtk7rtd|jz|j|jkDr t d|j |}|j|S)aCompute LLL-reduced basis using FLINT. See :meth:`lll_transform` for more information. Examples ======== >>> from sympy import Matrix >>> M = Matrix([[1, 2, 3], [4, 5, 6]]) >>> M.to_DM().to_dfm().lll() [[2, 1, 0], [-1, 1, 3]] See Also ======== sympy.polys.matrices.domainmatrix.DomainMatrix.lll Higher level interface to compute LLL-reduced basis. lll_transform Compute LLL-reduced basis and transform matrix. ZZ expected, got %s,Matrix must not have more rows than columns.)r$)r rr r(r)rr)r.)r-r$r"s r#r(zDFM.lllss`, ;;"  5 CD D YY "MN Niiei$}}S!!r+c\|jtk7rtd|jz|j|jkDr t d|j d|\}}|j|}|j||j|jf|j}||fS)adCompute LLL-reduced basis and transform using FLINT. Examples ======== >>> from sympy import Matrix >>> M = Matrix([[1, 2, 3], [4, 5, 6]]).to_DM().to_dfm() >>> M_lll, T = M.lll_transform() >>> M_lll [[2, 1, 0], [-1, 1, 3]] >>> T [[-2, 1], [3, -1]] >>> T.matmul(M) == M_lll True See Also ======== sympy.polys.matrices.domainmatrix.DomainMatrix.lll Higher level interface to compute LLL-reduced basis. lll Compute LLL-reduced basis without transform matrix. r+r,T)r#r$) r rr r(r)rr)r.r)r-r$r"TbasisT_dfms r# lll_transformzDFM.lll_transforms2 ;;"  5 CD D YY "MN NT7Q c" !dii3T[[Ae|r+rG)FgGz?gRQ?zbasisapprox)g?)P__name__ __module__ __qualname____doc__fmtis_DFMis_DDMr$ classmethodrr.r&r>rpropertyrErSrWr\r_rbrdrRrjrlrnrqrurxrzr|rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrr)r(r1r^r+r#rrEs D C F F ,7 M MGGMM,11"/E,,!3FF CC ' '"*AA&99&99$* M ] ]71<3(33//F C5500 ++ 33>TLL3 3##W-0.0dW-)2.)2VW-FQ.FQP- & W-H6.H6TB',' 3[<W-".":W- . r+)rf)riN)sympy.external.gmpyrsympy.external.importtoolsrsympy.utilities.decoratorrsympy.polys.domainsrr exceptionsr r r r r rr__doctest_skip__r__all__rsympy.polys.matrices.ddmrfrir^r+r#rEsvT-48&7u g ''+l l ,l `)(r+