+
    i                     `    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# )z0Implementation of :class:`FractionField` class. )CompositeDomain)Field)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*V t+R# )&FractionFieldz@A class for representing multivariate rational function fields. TNc                4   ^ 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 P                  V n	        R# )    )	FracFieldN)
sympy.polys.fieldsr   
isinstancefielddtypegensngenssymbolsdomaindom)selfdomain_or_fieldr   orderr   r   s   &&&&  ځ/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/sympy/polys/domains/fractionfield.py__init__FractionField.__init__   sr    0o11go%-#Eg>E
[[
JJ	[[
}}ll ;;    c                8    V P                   P                  V4      # N)r   	field_newr   elements   &&r   newFractionField.new%   s    zz##G,,r   c                8    V P                   P                  V4      # )z%Check if ``a`` is of type ``dtype``. )r   
is_elementr   s   &&r   of_typeFractionField.of_type(   s    zz$$W--r   c                .    V P                   P                  # r   )r   zeror   s   &r   r(   FractionField.zero,   s    zzr   c                .    V P                   P                  # r   )r   oner)   s   &r   r,   FractionField.one0   s    zz~~r   c                .    V P                   P                  # r   )r   r   r)   s   &r   r   FractionField.order4   s    zzr   c                    \        V P                  4      R ,           RP                  \        \         V P                  4      4      ,           R,           # )(,))strr   joinmapr   r)   s   &r   __str__FractionField.__str__8   s4    4;;#%S$,,1G(HH3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__FractionField.__hash__;   s,    T^^,,djj$++t||TUUr   c                l    \        V\        4      '       g   \        # V P                  VP                  8H  # )z0Returns ``True`` if two domains are equivalent. )r   r   NotImplementedr   )r   others   &&r   __eq__FractionField.__eq__>   s(    %//!!zzU[[((r   c                "    VP                  4       # )z!Convert ``a`` to a SymPy object. )as_exprr   as   &&r   to_sympyFractionField.to_sympyD   s    yy{r   c                8    V P                   P                  V4      # )z)Convert SymPy's expression to ``dtype``. )r   	from_exprrF   s   &&r   
from_sympyFractionField.from_sympyH   s    zz##A&&r   c                D    V ! V P                   P                  W4      4      # z.Convert a Python ``int`` object to ``dtype``. r   convertK1rG   K0s   &&&r   from_ZZFractionField.from_ZZL       "))##A*++r   c                D    V ! V P                   P                  W4      4      # rO   rP   rR   s   &&&r   from_ZZ_pythonFractionField.from_ZZ_pythonP   rW   r   c                    V P                   pVP                  pVP                  '       dB   V ! V! VP                  V4      V4      4      V ! V! VP	                  V4      V4      4      ,          # V ! V! W4      4      # z3Convert a Python ``Fraction`` object to ``dtype``. )r   convert_fromis_ZZnumerdenom)rS   rG   rT   r   convs   &&&  r   from_QQFractionField.from_QQT   s`    ii999d288A;+,r$rxx{B2G/HHHd1k?"r   c                D    V ! V P                   P                  W4      4      # r\   rP   rR   s   &&&r   from_QQ_pythonFractionField.from_QQ_python]   rW   r   c                D    V ! V P                   P                  W4      4      # )z,Convert a GMPY ``mpz`` object to ``dtype``. rP   rR   s   &&&r   from_ZZ_gmpyFractionField.from_ZZ_gmpya   rW   r   c                D    V ! V P                   P                  W4      4      # )z,Convert a GMPY ``mpq`` object to ``dtype``. rP   rR   s   &&&r   from_QQ_gmpyFractionField.from_QQ_gmpye   rW   r   c                D    V ! V P                   P                  W4      4      # )z4Convert a ``GaussianRational`` object to ``dtype``. rP   rR   s   &&&r   from_GaussianRationalField(FractionField.from_GaussianRationalFieldi   rW   r   c                D    V ! V P                   P                  W4      4      # )z3Convert a ``GaussianInteger`` object to ``dtype``. rP   rR   s   &&&r   from_GaussianIntegerRing&FractionField.from_GaussianIntegerRingm   rW   r   c                D    V ! V P                   P                  W4      4      # z.Convert a mpmath ``mpf`` object to ``dtype``. rP   rR   s   &&&r   from_RealFieldFractionField.from_RealFieldq   rW   r   c                D    V ! V P                   P                  W4      4      # rt   rP   rR   s   &&&r   from_ComplexFieldFractionField.from_ComplexFieldu   rW   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   r]   r!   rR   s   &&&r   from_AlgebraicField!FractionField.from_AlgebraicFieldy   s9    99?		&&q-A=66!9 r   c                j   VP                   '       d,   V P                  VP                  ^4      VP                  4      #  V P	                  VP                  V P                  P                  4      4      #   \        \        3 d/     T P	                  T4      u #   \        \        3 d      R# i ; ii ; i)z#Convert a polynomial to ``dtype``. N)
	is_groundr]   coeffr   r!   set_ringr   ringr   r   rR   s   &&&r   from_PolynomialRing!FractionField.from_PolynomialRing   s    ;;;??1771:ryy99
	66!**RXX]]3440 	
vvay "O4 	s/   3A3 3B2BB2B.)B2-B..B2c                j     VP                  V P                  4      #   \        \        3 d     R# i ; i)z*Convert a rational function to ``dtype``. N)	set_fieldr   r   r   rR   s   &&&r   from_FractionField FractionField.from_FractionField   s1    	;;rxx((0 		s    22c                R    V P                   P                  4       P                  4       # )z*Returns a field associated with ``self``. )r   to_ring	to_domainr)   s   &r   get_ringFractionField.get_ring   s    zz!!#--//r   c                `    V P                   P                  VP                  P                  4      # )z'Returns True if ``LC(a)`` is positive. )r   is_positiver_   LCrF   s   &&r   r   FractionField.is_positive       {{&&qwwzz22r   c                `    V P                   P                  VP                  P                  4      # )z'Returns True if ``LC(a)`` is negative. )r   is_negativer_   r   rF   s   &&r   r   FractionField.is_negative   r   r   c                `    V P                   P                  VP                  P                  4      # )z+Returns True if ``LC(a)`` is non-positive. )r   is_nonpositiver_   r   rF   s   &&r   r   FractionField.is_nonpositive       {{))!''**55r   c                `    V P                   P                  VP                  P                  4      # )z+Returns True if ``LC(a)`` is non-negative. )r   is_nonnegativer_   r   rF   s   &&r   r   FractionField.is_nonnegative   r   r   c                    VP                   # )zReturns numerator of ``a``. )r_   rF   s   &&r   r_   FractionField.numer       wwr   c                    VP                   # )zReturns denominator of ``a``. )r`   rF   s   &&r   r`   FractionField.denom   r   r   c                V    V P                  V P                  P                  V4      4      # )zReturns factorial of ``a``. )r   r   	factorialrF   s   &&r   r   FractionField.factorial   s     zz$++//233r   )r   r   r   r   r   r   r   )NN),r<   
__module____qualname____firstlineno____doc__is_FractionFieldis_Frachas_assoc_Ringhas_assoc_Fieldr   r!   r%   propertyr(   r,   r   r7   r=   rB   rH   rL   rU   rY   rb   re   rh   rk   rn   rq   ru   rx   r{   r   r   r   r   r   r   r   r_   r`   r   __static_attributes____classdictcell__)__classdict__s   @r   r   r   	   s     J!%%wNO&-.        OV)',,#,,,,,,, 033664 4r   r   N)r   #sympy.polys.domains.compositedomainr   sympy.polys.domains.fieldr   sympy.polys.polyerrorsr   r   sympy.utilitiesr   r    r   r   <module>r      s5    6 @ + B "k4E? k4 k4r   