+
    .åûjO  ã                   ó`   € R t ^ RIHt ^ RIHt ^ RIHtHt ^ RIH	t	 ]	 ! R R]]4      4       t
R# )z1Implementation of :class:`PolynomialRing` class. )ÚRing)ÚCompositeDomain)ÚCoercionFailedÚGeneratorsError)Úpublicc                   ó.  a € ] tR t^
t o RtR;ttRtRtR)R lt	R t
R t]R 4       t]R 4       t]R	 4       tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R t"R t#R t$R t%R  t&R! t'R" t(R# t)R$ t*R% t+R& t,R' t-R(t.V t/R# )*ÚPolynomialRingz8A class for representing multivariate polynomial rings. TNc                óâ  € ^ RI Hp \        W4      '       d   Vf   Vf   TpM	V! W!V4      pWPn        VP                  V n        VP
                  V n        VP                  V n        VP                  V n        VP                  V n        V'       dP   VP                  P                  '       d4   VP                  P                  '       d   \        V4      ^8X  d   RV n        V P                  V n        R# )é    )ÚPolyRingNT)Úsympy.polys.ringsr   Ú
isinstanceÚringÚdtypeÚgensÚngensÚsymbolsÚdomainÚis_FieldÚis_ExactÚlenÚis_PIDÚdom)ÚselfÚdomain_or_ringr   Úorderr   r   s   &&&&  Ú^C:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\sympy\polys\domains\polynomialring.pyÚ__init__ÚPolynomialRing.__init__   s§   € Ý.ä�n×/Ò/°G²OÈÊØ!‰Dá˜G°UÓ;ˆDàŒ	Ø—Z‘ZˆŒ
à—I‘IˆŒ	Ø—Z‘ZˆŒ
Ø—|‘|ˆŒØ—k‘kˆŒ÷ Ø�{‰{×#×#Ð#¨¯©×(<×(<Ð(<ÄÀWÃÈqÄØ"�”ð —;‘;ˆŽó    c                ó8   € V P                   P                  V4      # ©N)r   Úring_new©r   Úelements   &&r   ÚnewÚPolynomialRing.new+   s   € Ø�y‰y×!Ñ! 'Ó*Ð*r   c                ó8   € V P                   P                  V4      # )z%Check if ``a`` is of type ``dtype``. )r   Ú
is_elementr#   s   &&r   Úof_typeÚPolynomialRing.of_type.   s   € à�y‰y×#Ñ# GÓ,Ð,r   c                ó.   € V P                   P                  # r!   )r   Úzero©r   s   &r   r,   ÚPolynomialRing.zero2   s   € à�y‰y�~‰~Ðr   c                ó.   € V P                   P                  # r!   )r   Úoner-   s   &r   r0   ÚPolynomialRing.one6   s   € à�y‰y�}‰}Ðr   c                ó.   € V P                   P                  # r!   )r   r   r-   s   &r   r   ÚPolynomialRing.order:   s   € à�y‰y�‰Ðr   c                ó¤   € \        V P                  4      R ,           RP                  \        \         V P                  4      4      ,           R,           # )Ú[Ú,Ú])Ústrr   ÚjoinÚmapr   r-   s   &r   Ú__str__ÚPolynomialRing.__str__>   s4   € Ü�4—;‘;Ó #Õ%¨¯©´´S¸$¿,¹,Ó1GÓ(HÕHÈ3ÕNÐNr   c                ó„   € \        V P                  P                  V P                  V P                  V P
                  34      # r!   )ÚhashÚ	__class__Ú__name__r   r   r   r-   s   &r   Ú__hash__ÚPolynomialRing.__hash__A   s,   € Ü�T—^‘^×,Ñ,¨d¯i©i¸¿¹ÀdÇlÁlÐSÓTÐTr   c                ól   € \        V\        4      '       g   \        # V P                  VP                  8H  # )z.Returns `True` if two domains are equivalent. )r   r   ÚNotImplementedr   )r   Úothers   &&r   Ú__eq__ÚPolynomialRing.__eq__D   s(   € ä˜%¤×0Ò0Ü!Ð!Ø�y‰y˜EŸJ™JÑ&Ð&r   c                ó‚   € VP                   '       g   R# V P                  pVP                  VP                  W4      4      # )z/Returns ``True`` if ``a`` is a unit of ``self``F)Ú	is_groundr   Úis_unitÚconvert_from)r   ÚaÚKs   && r   rJ   ÚPolynomialRing.is_unitJ   s/   € à�{�{ˆ{ÙØ�K‰KˆØ�y‰y˜Ÿ™¨Ó0Ó1Ð1r   c                ó‚   € V P                   P                  VP                  4      pV P                  P	                  V4      # r!   )r   Úcanonical_unitÚLCr   Ú
ground_new)r   rL   Úus   && r   rP   ÚPolynomialRing.canonical_unitQ   s/   € Ø�K‰K×&Ñ& q§t¡tÓ,ˆØ�y‰y×#Ñ# AÓ&Ð&r   c                ó"   € VP                  4       # )zConvert `a` to a SymPy object. )Úas_expr©r   rL   s   &&r   Úto_sympyÚPolynomialRing.to_sympyU   s   € à�y‰y‹{Ðr   c                ó8   € V P                   P                  V4      # )z'Convert SymPy's expression to `dtype`. )r   Ú	from_exprrW   s   &&r   Ú
from_sympyÚPolynomialRing.from_sympyY   s   € à�y‰y×"Ñ" 1Ó%Ð%r   c                óD   € V ! V P                   P                  W4      4      # ©z*Convert a Python `int` object to `dtype`. ©r   Úconvert©ÚK1rL   ÚK0s   &&&r   Úfrom_ZZÚPolynomialRing.from_ZZ]   ó   € á�"—)‘)×#Ñ# AÓ*Ó+Ð+r   c                óD   € V ! V P                   P                  W4      4      # r_   r`   rb   s   &&&r   Úfrom_ZZ_pythonÚPolynomialRing.from_ZZ_pythona   rg   r   c                óD   € V ! V P                   P                  W4      4      # ©z/Convert a Python `Fraction` object to `dtype`. r`   rb   s   &&&r   Úfrom_QQÚPolynomialRing.from_QQe   rg   r   c                óD   € V ! V P                   P                  W4      4      # rl   r`   rb   s   &&&r   Úfrom_QQ_pythonÚPolynomialRing.from_QQ_pythoni   rg   r   c                óD   € V ! V P                   P                  W4      4      # )z(Convert a GMPY `mpz` object to `dtype`. r`   rb   s   &&&r   Úfrom_ZZ_gmpyÚPolynomialRing.from_ZZ_gmpym   rg   r   c                óD   € V ! V P                   P                  W4      4      # )z(Convert a GMPY `mpq` object to `dtype`. r`   rb   s   &&&r   Úfrom_QQ_gmpyÚPolynomialRing.from_QQ_gmpyq   rg   r   c                óD   € V ! V P                   P                  W4      4      # )z/Convert a `GaussianInteger` object to `dtype`. r`   rb   s   &&&r   Úfrom_GaussianIntegerRingÚ'PolynomialRing.from_GaussianIntegerRingu   rg   r   c                óD   € V ! V P                   P                  W4      4      # )z0Convert a `GaussianRational` object to `dtype`. r`   rb   s   &&&r   Úfrom_GaussianRationalFieldÚ)PolynomialRing.from_GaussianRationalFieldy   rg   r   c                óD   € V ! V P                   P                  W4      4      # ©z*Convert a mpmath `mpf` object to `dtype`. r`   rb   s   &&&r   Úfrom_RealFieldÚPolynomialRing.from_RealField}   rg   r   c                óD   € V ! V P                   P                  W4      4      # r   r`   rb   s   &&&r   Úfrom_ComplexFieldÚ PolynomialRing.from_ComplexField�   rg   r   c                óˆ   € V P                   V8w  d   V P                   P                  W4      pVe   V P                  V4      # R# )z*Convert an algebraic number to ``dtype``. N)r   rK   r%   rb   s   &&&r   Úfrom_AlgebraicFieldÚ"PolynomialRing.from_AlgebraicField…   s9   € à�9‰9˜Œ?Ø—	‘	×&Ñ& qÓ-ˆAØŠ=Ø—6‘6˜!“9Ðñ r   c                ój   €  VP                  V P                  4      #   \        \        3 d     R# i ; i)z#Convert a polynomial to ``dtype``. N)Úset_ringr   r   r   rb   s   &&&r   Úfrom_PolynomialRingÚ"PolynomialRing.from_PolynomialRingŒ   s1   € ð	Ø—:‘:˜bŸg™gÓ&Ð&øÜ¤Ð0ô 	Úð	ús   ‚ �2±2c                óL  € V P                   V8X  d   V P                  P                  V.4      # VP                  V4      P	                  VP                  V4      4      w  r4VP                  '       d4   V P                  W2P                  P                  P                  4       4      # R# )z*Convert a rational function to ``dtype``. N)
r   r   Ú	from_listÚnumerÚdivÚdenomÚis_zerorŠ   ÚfieldÚ	to_domain)rc   rL   rd   ÚqÚrs   &&&  r   Úfrom_FractionFieldÚ!PolynomialRing.from_FractionField“   sr   € à�9‰9˜Œ?Ø—7‘7×$Ñ$ a SÓ)Ð)à�x‰x˜‹{�‰˜rŸx™x¨›{Ó+‰ˆà�9�9ˆ9Ø×)Ñ)¨!¯X©X¯]©]×-DÑ-DÓ-FÓGÐGár   c                óÒ  € V P                   VP                  8X  dp   VP                  4       pV P                  VP                  8w  d=   VP	                  4        UUu/ uF   w  rEW@P                  P                  V4      bK"  	  pppV ! V4      # VP                  '       dE   VP                  V 8X  d2   V P                  VP                  4       ^ ,          VP                  4      # R# R# u uppi )z)Convert from old poly ring to ``dtype``. N)	r   r   Úto_dictr   Úitemsra   rI   rK   Úto_list)rc   rL   rd   ÚadÚmÚcs   &&&   r   Úfrom_GlobalPolynomialRingÚ(PolynomialRing.from_GlobalPolynomialRingŸ   s£   € à�:‰:˜Ÿ™Ô Ø—‘“ˆBØ�y‰y˜BŸI™IÔ%Ø:<¿(¹(¼*ÔE¹*±$°!�aŸ™×*Ñ*¨1Ó-Ò-¹*�ÑEÙ�b“6ˆMØ�[�[ˆ[˜RŸY™Y¨"œ_Ø—?‘? 1§9¡9£;¨q¥>°2·9±9Ó=Ð=ñ -‰[ùó Fs   Á&C#c                óR   € V P                   P                  4       P                  4       # )z(Returns a field associated with `self`. )r   Úto_fieldr“   r-   s   &r   Ú	get_fieldÚPolynomialRing.get_field©   s   € à�y‰y×!Ñ!Ó#×-Ñ-Ó/Ð/r   c                óL   € V P                   P                  VP                  4      # )z%Returns True if `LC(a)` is positive. )r   Úis_positiverQ   rW   s   &&r   r¦   ÚPolynomialRing.is_positive­   ó   € à�{‰{×&Ñ& q§t¡tÓ,Ð,r   c                óL   € V P                   P                  VP                  4      # )z%Returns True if `LC(a)` is negative. )r   Úis_negativerQ   rW   s   &&r   rª   ÚPolynomialRing.is_negative±   r¨   r   c                óL   € V P                   P                  VP                  4      # )z)Returns True if `LC(a)` is non-positive. )r   Úis_nonpositiverQ   rW   s   &&r   r­   ÚPolynomialRing.is_nonpositiveµ   ó   € à�{‰{×)Ñ)¨!¯$©$Ó/Ð/r   c                óL   € V P                   P                  VP                  4      # )z)Returns True if `LC(a)` is non-negative. )r   Úis_nonnegativerQ   rW   s   &&r   r±   ÚPolynomialRing.is_nonnegative¹   r¯   r   c                ó$   € VP                  V4      # )zExtended GCD of `a` and `b`. )Úgcdex©r   rL   Úbs   &&&r   r´   ÚPolynomialRing.gcdex½   s   € à�w‰w�q‹zÐr   c                ó$   € VP                  V4      # )zReturns GCD of `a` and `b`. )Úgcdrµ   s   &&&r   r¹   ÚPolynomialRing.gcdÁ   ó   € à�u‰u�Q‹xˆr   c                ó$   € VP                  V4      # )zReturns LCM of `a` and `b`. )Úlcmrµ   s   &&&r   r½   ÚPolynomialRing.lcmÅ   r»   r   c                óV   € V P                  V P                  P                  V4      4      # )zReturns factorial of `a`. )r   r   Ú	factorialrW   s   &&r   rÀ   ÚPolynomialRing.factorialÉ   s    € à�z‰z˜$Ÿ+™+×/Ñ/°Ó2Ó3Ð3r   )r   r   r   r   r   r   r   r   )NN)0r@   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úis_PolynomialRingÚis_PolyÚhas_assoc_RingÚhas_assoc_Fieldr   r%   r)   Úpropertyr,   r0   r   r;   rA   rF   rJ   rP   rX   r\   re   ri   rm   rp   rs   rv   ry   r|   r€   rƒ   r†   rŠ   r–   rŸ   r£   r¦   rª   r­   r±   r´   r¹   r½   rÀ   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r   
   s  ø‡ € áBà"&Ð&Ð˜à€NØ€Oôò0+ò-ð ñó ðð ñó ðð ñó ðòOòUò'ò2ò'òò&ò,ò,ò,ò,ò,ò,ò,ò,ò,ò,òòò
ò>ò0ò-ò-ò0ò0òòò÷4ð 4r   r   N)rÅ   Úsympy.polys.domains.ringr   Ú#sympy.polys.domains.compositedomainr   Úsympy.polys.polyerrorsr   r   Úsympy.utilitiesr   r   © r   r   Ú<module>rÓ      s4   ðÙ 7õ *Ý ?ç BÝ "àô@4�T˜?ó @4ó ò@4r   