+
    -åûj�  ã                   óR   € R t ^ RIHt ^ RIHtHt ^ RIHt ] ! R R]4      4       tR# )z(Implementation of :class:`Field` class. )ÚRing)ÚNotReversibleÚDomainError)Úpublicc                   ón   a € ] tR t^t o 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# )ÚFieldzRepresents a field domain. Tc                ó&   € \        RV ,          4      h)z)Returns a ring associated with ``self``. z#there is no ring associated with %s)r   ©Úselfs   &ÚUC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\sympy\polys\domains\field.pyÚget_ringÚField.get_ring   s   € äÐ?À$ÕFÓGÐGó    c                ó   € V # )z*Returns a field associated with ``self``. © r	   s   &r   Ú	get_fieldÚField.get_field   s   € àˆr   c                ó   € W,          # )z=Exact quotient of ``a`` and ``b``, implies ``__truediv__``.  r   ©r
   ÚaÚbs   &&&r   ÚexquoÚField.exquo   ó	   € à�uˆr   c                ó   € W,          # )z6Quotient of ``a`` and ``b``, implies ``__truediv__``. r   r   s   &&&r   ÚquoÚ	Field.quo   r   r   c                ó   € V P                   # )z0Remainder of ``a`` and ``b``, implies nothing.  ©Úzeror   s   &&&r   ÚremÚ	Field.rem   s   € à�y‰yÐr   c                ó*   € W,          V P                   3# )z6Division of ``a`` and ``b``, implies ``__truediv__``. r   r   s   &&&r   ÚdivÚ	Field.div#   s   € à�u�d—i‘iÐÐr   c                óN  €  V P                  4       pTP                  T P	                  T4      T P	                  T4      4      pTP                  T P                  T4      T P                  T4      4      pT P                  YC4      T,          #   \         d    T P                  u # i ; i)aa  
Returns GCD of ``a`` and ``b``.

This definition of GCD over fields allows to clear denominators
in `primitive()`.

Examples
========

>>> from sympy.polys.domains import QQ
>>> from sympy import S, gcd, primitive
>>> from sympy.abc import x

>>> QQ.gcd(QQ(2, 3), QQ(4, 9))
2/9
>>> gcd(S(2)/3, S(4)/9)
2/9
>>> primitive(2*x/3 + S(4)/9)
(2/9, 3*x + 2)

)r   r   ÚoneÚgcdÚnumerÚlcmÚdenomÚconvert©r
   r   r   ÚringÚpÚqs   &&&   r   r'   Ú	Field.gcd'   s‚   € ð,	Ø—=‘=“?ˆDð �H‰H�T—Z‘Z “] D§J¡J¨q£MÓ2ˆØ�H‰H�T—Z‘Z “] D§J¡J¨q£MÓ2ˆà�|‰|˜AÓ$ QÕ&Ð&øô ô 	Ø—8‘8ŠOð	ús   ‚B
 Â
B$Â#B$c                óþ   € V P                  W4      pWP                  8X  dI   W P                  8X  d$   V P                  V P                  V P                  3# V P                  W2,          V3# W1,          V P                  V3# )z;
Returns x, y, g such that a * x + b * y == g == gcd(a, b)
)r'   r   r&   )r
   r   r   Úds   &&& r   ÚgcdexÚField.gcdexG   sb   € ð �H‰H�Q‹Nˆà—	‘	Œ>Ø—I‘IŒ~Ø—y‘y $§(¡(¨D¯I©IÐ5Ð5à—y‘y !¥# qÐ(Ð(à•3˜Ÿ	™	 1Ð$Ð$r   c                óF  €  V P                  4       pTP                  T P                  T4      T P                  T4      4      pTP	                  T P                  T4      T P                  T4      4      pT P                  YC4      T,          #   \         d    Y,          u # i ; i)z§
Returns LCM of ``a`` and ``b``.

>>> from sympy.polys.domains import QQ
>>> from sympy import S, lcm

>>> QQ.lcm(QQ(2, 3), QQ(4, 9))
4/3
>>> lcm(S(2)/3, S(4)/9)
4/3

)r   r   r)   r(   r'   r*   r+   r,   s   &&&   r   r)   Ú	Field.lcmU   s€   € ð	Ø—=‘=“?ˆDð �H‰H�T—Z‘Z “] D§J¡J¨q£MÓ2ˆØ�H‰H�T—Z‘Z “] D§J¡J¨q£MÓ2ˆà�|‰|˜AÓ$ QÕ&Ð&øô ô 	Ø•3ŠJð	ús   ‚B
 Â
B ÂB c                ó:   € V'       d
   ^V,          # \        R4      h)z!Returns ``a**(-1)`` if possible. zzero is not reversible)r   ©r
   r   s   &&r   ÚrevertÚField.revertm   s   € çØ�Q•3ˆJäÐ 8Ó9Ð9r   c                ó   € \        V4      # )z$Return true if ``a`` is a invertible)Úboolr8   s   &&r   Úis_unitÚField.is_unitt   s   € ä�A‹wˆr   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úis_FieldÚis_PIDr   r   r   r   r    r#   r'   r3   r)   r9   r=   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r      sP   ø‡ € á%à€HØ€FòHòòòòò ò'ò@%ò'ò0:÷ð r   r   N)	rC   Úsympy.polys.domains.ringr   Úsympy.polys.polyerrorsr   r   Úsympy.utilitiesr   r   r   r   r   Ú<module>rL      s/   ðÙ .õ *ß =Ý "àômˆDó mó òmr   