+
    
þÎj  ã                   ór   € 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 R]4      tR	# )
z.Implementation of :class:`QuotientRing` class.©ÚFreeModuleQuotientRing)ÚRing)ÚNotReversibleÚCoercionFailed)Úpublicc                   ó~   a € ] tR t^t o RtR tR t]tR tR t	]	t
R tR tR tR	 t]tR
 tR tR tR tR tRtV tR# )ÚQuotientRingElementz¦
Class representing elements of (commutative) quotient rings.

Attributes:

- ring - containing ring
- data - element of ring.ring (i.e. base ring) representing self
c                ó   € Wn         W n        R # ©N)ÚringÚdata)Úselfr   r   s   &&&ÚV/opt/data/home/.local/lib/python3.14/site-packages/sympy/polys/domains/quotientring.pyÚ__init__ÚQuotientRingElement.__init__   s   € ØŒ	ØŽ	ó    c                óÒ   € ^ RI Hp V P                  P                  P                  V P                  4      pV! V4      R,           \        V P                  P                  4      ,           # )é    )Ússtrz + )Úsympy.printing.strr   r   Úto_sympyr   ÚstrÚ
base_ideal)r   r   r   s   &  r   Ú__str__ÚQuotientRingElement.__str__   sD   € Ý+Ø�y‰y�~‰~×&Ñ& t§y¡yÓ1ˆÙ�D‹z˜EÕ!¤C¨¯	©	×(<Ñ(<Ó$=Õ=Ð=r   c                óB   € V P                   P                  V 4      '       * # r   )r   Úis_zero©r   s   &r   Ú__bool__ÚQuotientRingElement.__bool__$   s   € Ø—9‘9×$Ñ$ TÓ*Ô*Ð*r   c                ó8  € \        WP                  4      '       d   VP                  V P                  8w  d    V P                  P                  V4      pV P                  V P                  VP                  ,           4      #   \        \
        3 d
    \        u # i ; ir   ©Ú
isinstanceÚ	__class__r   ÚconvertÚNotImplementedErrorr   ÚNotImplementedr   ©r   Úoms   &&r   Ú__add__ÚQuotientRingElement.__add__'   ss   € Ü˜"Ÿn™n×-Ò-°·±¸D¿I¹IÔ1Eð&Ø—Y‘Y×&Ñ& rÓ*�ð �y‰y˜Ÿ™ R§W¡WÕ,Ó-Ð-øô (¬Ð8ô &Ü%Ò%ð&ús   ¸A? Á?BÂBc                óŒ   € V P                  V P                  V P                   P                   P                  R4      ,          4      # )é   éÿÿÿÿ)r   r   r%   r   s   &r   Ú__neg__ÚQuotientRingElement.__neg__1   s-   € Ø�y‰y˜Ÿ™ 4§9¡9§>¡>×#9Ñ#9¸"Ó#=Õ=Ó>Ð>r   c                ó&   € V P                  V) 4      # r   ©r*   r(   s   &&r   Ú__sub__ÚQuotientRingElement.__sub__4   s   € Ø�|‰|˜R˜CÓ Ð r   c                ó&   € V ) P                  V4      # r   r2   r(   s   &&r   Ú__rsub__ÚQuotientRingElement.__rsub__7   s   € Ø��‰˜rÓ"Ð"r   c                ó  € \        WP                  4      '       g    V P                  P                  V4      pV P                  V P                  VP                  ,          4      #   \        \
        3 d
    \        u # i ; ir   r"   ©r   Úos   &&r   Ú__mul__ÚQuotientRingElement.__mul__:   sd   € Ü˜!Ÿ^™^×,Ò,ð&Ø—I‘I×%Ñ% aÓ(�ð �y‰y˜Ÿ™ 1§6¡6Õ)Ó*Ð*øô (¬Ð8ô &Ü%Ò%ð&ús   �A$ Á$A>Á=A>c                óF   € V P                   P                  V 4      V,          # r   )r   Úrevertr9   s   &&r   Ú__rtruediv__Ú QuotientRingElement.__rtruediv__D   s   € Ø�y‰y×Ñ Ó% aÕ'Ð'r   c                óî   € \        WP                  4      '       g    V P                  P                  V4      pV P                  P                  V4      V ,          #   \        \
        3 d
    \        u # i ; ir   )r#   r$   r   r%   r&   r   r'   r>   r9   s   &&r   Ú__truediv__ÚQuotientRingElement.__truediv__G   sb   € Ü˜!Ÿ^™^×,Ò,ð&Ø—I‘I×%Ñ% aÓ(�ð �y‰y×Ñ Ó" 4Õ'Ð'øô (¬Ð8ô &Ü%Ò%ð&ús   �A ÁA4Á3A4c                óš   € V^ 8  d$   V P                   P                  V 4      V) ,          # V P                  V P                  V,          4      # )r   )r   r>   r   )r   Úoths   &&r   Ú__pow__ÚQuotientRingElement.__pow__O   s=   € Ø�Œ7Ø—9‘9×#Ñ# DÓ)¨c¨TÕ1Ð1Ø�y‰y˜Ÿ™ cÕ)Ó*Ð*r   c                ó´   € \        WP                  4      '       d   VP                  V P                  8w  d   R # V P                  P                  W,
          4      # )F)r#   r$   r   r   r(   s   &&r   Ú__eq__ÚQuotientRingElement.__eq__T   s:   € Ü˜"Ÿn™n×-Ò-°·±¸D¿I¹IÔ1EÙØ�y‰y× Ñ  ¥Ó+Ð+r   c                ó   € W8X  * # r   © r(   s   &&r   Ú__ne__ÚQuotientRingElement.__ne__Y   s
   € ØŠ~Ðr   )r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   Ú__repr__r   r*   Ú__radd__r/   r3   r6   r;   Ú__rmul__r?   rB   rF   rI   rM   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r	   r	      se   ø‡ € ñòò>ð
 €Hò+ò.ð €Hò?ò!ò#ò+ð €Hò(ò(ò+ò
,÷
ð r   r	   c                   ó    a € ] tR t^]t o RtRtRt]tR t	R t
R tR tR tR	 t]t]t]t]t]t]t]tR
 tR tR tR tR tR tR tR tRtV tR# )ÚQuotientRinga  
Class representing (commutative) quotient rings.

You should not usually instantiate this by hand, instead use the constructor
from the base ring in the construction.

>>> from sympy.abc import x
>>> from sympy import QQ
>>> I = QQ.old_poly_ring(x).ideal(x**3 + 1)
>>> QQ.old_poly_ring(x).quotient_ring(I)
QQ[x]/<x**3 + 1>

Shorter versions are possible:

>>> QQ.old_poly_ring(x)/I
QQ[x]/<x**3 + 1>

>>> QQ.old_poly_ring(x)/[x**3 + 1]
QQ[x]/<x**3 + 1>

Attributes:

- ring - the base ring
- base_ideal - the ideal used to form the quotient
TFc                óê   € VP                   V8X  g   \        R V: RV: 24      hWn         W n        V ! V P                   P                  4      V n        V ! V P                   P                  4      V n        R# )zIdeal must belong to z, got N)r   Ú
ValueErrorr   ÚzeroÚone)r   r   Úideals   &&&r   r   ÚQuotientRing.__init__|   sP   € Ø�z‰z˜TÔ!ÝÃ$ÊÐNÓOÐOØŒ	ØŒÙ˜Ÿ™Ÿ™Ó(ˆŒ	Ù˜Ÿ	™	Ÿ™Ó&ˆŽr   c                ón   € \        V P                  4      R ,           \        V P                  4      ,           # )Ú/)r   r   r   r   s   &r   r   ÚQuotientRing.__str__„   s#   € Ü�4—9‘9‹~ Õ#¤c¨$¯/©/Ó&:Õ:Ð:r   c                ó„   € \        V P                  P                  V P                  V P                  V P
                  34      # r   )Úhashr$   rO   Údtyper   r   r   s   &r   Ú__hash__ÚQuotientRing.__hash__‡   s,   € Ü�T—^‘^×,Ñ,¨d¯j©j¸$¿)¹)ÀTÇ_Á_ÐUÓVÐVr   c                óÂ   € \        WP                  P                  4      '       g   V P                  V4      pV P                  W P                  P	                  V4      4      # )z4Construct an element of ``self`` domain from ``a``. )r#   r   rh   r   Úreduce_element©r   Úas   &&r   ÚnewÚQuotientRing.newŠ   s@   € ä˜!ŸY™YŸ_™_×-Ò-Ø—	‘	˜!“ˆAà�z‰z˜$§¡× >Ñ >¸qÓ AÓBÐBr   c                ó¦   € \        V\        4      ;'       d;    V P                  VP                  8H  ;'       d    V P                  VP                  8H  # )z0Returns ``True`` if two domains are equivalent. )r#   r\   r   r   )r   Úothers   &&r   rI   ÚQuotientRing.__eq__‘   sL   € ä˜%¤Ó.÷ Lð LØ�I‰I˜Ÿ™Ñ#÷Lð LØ(,¯©¸5×;KÑ;KÑ(Kð	Lr   c                óD   € V ! V P                   P                  W4      4      # )z.Convert a Python ``int`` object to ``dtype``. )r   r%   )ÚK1rn   ÚK0s   &&&r   Úfrom_ZZÚQuotientRing.from_ZZ–   s   € á�"—'‘'—/‘/ !Ó(Ó)Ð)r   c                óD   € V ! V P                   P                  V4      4      # r   )r   Ú
from_sympyrm   s   &&r   rz   ÚQuotientRing.from_sympy¢   s   € Ù�D—I‘I×(Ñ(¨Ó+Ó,Ð,r   c                óL   € V P                   P                  VP                  4      # r   )r   r   r   rm   s   &&r   r   ÚQuotientRing.to_sympy¥   s   € Ø�y‰y×!Ñ! !§&¡&Ó)Ð)r   c                ó   € W 8X  d   V# R # r   rL   )r   rn   rv   s   &&&r   Úfrom_QuotientRingÚQuotientRing.from_QuotientRing¨   s   € ØŒ:ØˆHñ r   c                ó   € \        R4      h)z*Returns a polynomial ring, i.e. ``K[X]``. únested domains not allowed©r&   ©r   Úgenss   &*r   Ú	poly_ringÚQuotientRing.poly_ring¬   ó   € ä!Ð">Ó?Ð?r   c                ó   € \        R4      h)z)Returns a fraction field, i.e. ``K(X)``. r‚   rƒ   r„   s   &*r   Ú
frac_fieldÚQuotientRing.frac_field°   rˆ   r   c                óî   € V P                   P                  VP                  4      V P                  ,           p V ! VP	                  ^4      ^ ,          4      #   \
         d    \        T: RT : 24      hi ; i)z
Compute a**(-1), if possible.
z not a unit in )r   ra   r   r   Úin_terms_of_generatorsr^   r   )r   rn   ÚIs   && r   r>   ÚQuotientRing.revert´   se   € ð �I‰I�O‰O˜AŸF™FÓ# d§o¡oÕ5ˆð	CÙ˜×0Ñ0°Ó3°AÕ6Ó7Ð7øÜô 	CÜ»ºDÐ AÓBÐBð	Cús   ¸A ÁA4c                óL   € V P                   P                  VP                  4      # r   )r   Úcontainsr   rm   s   &&r   r   ÚQuotientRing.is_zero¾   s   € Ø�‰×'Ñ'¨¯©Ó/Ð/r   c                ó   € \        W4      # )z¸
Generate a free module of rank ``rank`` over ``self``.

>>> from sympy.abc import x
>>> from sympy import QQ
>>> (QQ.old_poly_ring(x)/[x**2 + 1]).free_module(2)
(QQ[x]/<x**2 + 1>)**2
r   )r   Úranks   &&r   Úfree_moduleÚQuotientRing.free_moduleÁ   s   € ô & dÓ1Ð1r   )r   r`   r   r_   N) rO   rP   rQ   rR   rS   Úhas_assoc_RingÚhas_assoc_Fieldr	   rh   r   r   ri   ro   rI   rw   Úfrom_ZZ_pythonÚfrom_QQ_pythonÚfrom_ZZ_gmpyÚfrom_QQ_gmpyÚfrom_RealFieldÚfrom_GlobalPolynomialRingÚfrom_FractionFieldrz   r   r   r†   rŠ   r>   r   r•   rW   rX   rY   s   @r   r\   r\   ]   s“   ø‡ € ñð4 €NØ€OØ€Eò'ò;òWòCòLò
*ð €NØ#€NØ!€LØ!€LØ#€NØ .ÐØ'Ðò-ò*òò@ò@òCò0÷	2ð 	2r   r\   N)rS   Úsympy.polys.agca.modulesr   Úsympy.polys.domains.ringr   Úsympy.polys.polyerrorsr   r   Úsympy.utilitiesr   r	   r\   rL   r   r   Ú<module>r¤      sA   ðÙ 4õ <Ý )ß @Ý "ð ÷Kð Kó ðKô\m2�4ö m2r   