Ë
    7^(h–g  ã                  óô   — d Z ddlmZ ddlmZ ddlmZmZ ddlm	Z	 ddl
mZ ddlmZmZ ddlmZ erdd	lmZmZ dd
lmZ ddlmZ ddlmZmZ 	 	 	 	 	 	 dd„Z G d„ d«      Zdd„Zdd„Zdd„Z G d„ d«      Zy)zð
Puiseux rings. These are used by the ring_series module to represented
truncated Puiseux series. Elements of a Puiseux ring are like polynomials
except that the exponents can be negative or rational rather than just
non-negative integers.
é    )Úannotations©ÚQQ)ÚPolyRingÚPolyElement)ÚAdd)ÚMul)ÚgcdÚlcm)ÚTYPE_CHECKING)ÚAnyÚUnpack)ÚExpr)ÚDomain)ÚIterableÚIteratorc                ó:   — t        | |«      }|f|j                  z   S )ac  Construct a Puiseux ring.

    This function constructs a Puiseux ring with the given symbols and domain.

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.puiseux import puiseux_ring
    >>> R, x, y = puiseux_ring('x y', QQ)
    >>> R
    PuiseuxRing((x, y), QQ)
    >>> p = 5*x**QQ(1,2) + 7/y
    >>> p
    7*y**(-1) + 5*x**(1/2)
    )ÚPuiseuxRingÚgens)ÚsymbolsÚdomainÚrings      úQ/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/sympy/polys/puiseux.pyÚpuiseux_ringr   '   s!   € ô  �w Ó'€DØˆ7�T—Y‘YÑÐó    c                  ó`   — e Zd ZdZdd„Zdd„Zdd„Zdd„Zdd„Zdd„Z	dd„Z
dd	„Zdd
„Zdd„Zy)r   aÄ  Ring of Puiseux polynomials.

    A Puiseux polynomial is a truncated Puiseux series. The exponents of the
    monomials can be negative or rational numbers. This ring is used by the
    ring_series module:

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.puiseux import puiseux_ring
    >>> from sympy.polys.ring_series import rs_exp, rs_nth_root
    >>> ring, x, y = puiseux_ring('x y', QQ)
    >>> f = x**2 + y**3
    >>> f
    y**3 + x**2
    >>> f.diff(x)
    2*x
    >>> rs_exp(x, x, 5)
    1 + x + 1/2*x**2 + 1/6*x**3 + 1/24*x**4

    Importantly the Puiseux ring can represent truncated series with negative
    and fractional exponents:

    >>> f = 1/x + 1/y**2
    >>> f
    x**(-1) + y**(-2)
    >>> f.diff(x)
    -1*x**(-2)

    >>> rs_nth_root(8*x + x**2 + x**3, 3, x, 5)
    2*x**(1/3) + 1/12*x**(4/3) + 23/288*x**(7/3) + -139/20736*x**(10/3)

    See Also
    ========

    sympy.polys.ring_series.rs_series
    PuiseuxPoly
    c                óÔ  — t        ||«      }|j                  }|j                  }|| _        || _        |j                  | _        t        |j                  D �cg c]  }| j                  |«      ‘Œ c}«      | _        || _        | j                  |j                  «      | _        | j                  |j                  «      | _	        |j                  | _
        |j                  | _        y c c}w ©N)r   r   ÚngensÚ	poly_ringr   Útupler   Ú	from_polyÚzeroÚoneÚ
zero_monomÚmonomial_mul)Úselfr   r   r    r   Úgs         r   Ú__init__zPuiseuxRing.__init__`   s±   € ä˜W fÓ-ˆ	à×!Ñ!ˆØ—‘ˆà"ˆŒØˆŒà ×(Ñ(ˆŒÜ°i·n±nÖE°˜4Ÿ>™>¨!Õ,ÒEÓFˆŒ	ØˆŒ
à—N‘N 9§>¡>Ó2ˆŒ	Ø—>‘> )§-¡-Ó0ˆŒà#×.Ñ.ˆŒØ%×2Ñ2ˆÕùò Fs   ÁC%c                ó<   — d| j                   › d| j                  › d�S )NzPuiseuxRing(z, ú))r   r   ©r'   s    r   Ú__repr__zPuiseuxRing.__repr__t   s   € Ø˜dŸl™l˜^¨2¨d¯k©k¨]¸!Ð<Ð<r   c                ó–   — t        |t        «      st        S | j                  |j                  k(  xr | j                  |j                  k(  S r   )Ú
isinstancer   ÚNotImplementedr   r   ©r'   Úothers     r   Ú__eq__zPuiseuxRing.__eq__w   s7   € Ü˜%¤Ô-Ü!Ð!Ø�|‰|˜uŸ}™}Ñ,ÒL°·±ÀÇÁÑ1LÐLr   c                ó   — t        || «      S )aJ  Create a Puiseux polynomial from a polynomial.

        >>> from sympy.polys.domains import QQ
        >>> from sympy.polys.rings import ring
        >>> from sympy.polys.puiseux import puiseux_ring
        >>> R1, x1 = ring('x', QQ)
        >>> R2, x2 = puiseux_ring('x', QQ)
        >>> R2.from_poly(x1**2)
        x**2
        )ÚPuiseuxPoly)r'   Úpolys     r   r"   zPuiseuxRing.from_poly|   s   € ô ˜4 Ó&Ð&r   c                ó.   — t         j                  || «      S )a  Create a Puiseux polynomial from a dictionary of terms.

        >>> from sympy.polys.domains import QQ
        >>> from sympy.polys.puiseux import puiseux_ring
        >>> R, x = puiseux_ring('x', QQ)
        >>> R.from_dict({(QQ(1,2),): QQ(3)})
        3*x**(1/2)
        )r5   Ú	from_dict)r'   Útermss     r   r8   zPuiseuxRing.from_dict‰   s   € ô ×$Ñ$ U¨DÓ1Ð1r   c                óB   — | j                  | j                  |«      «      S )zëCreate a Puiseux polynomial from an integer.

        >>> from sympy.polys.domains import QQ
        >>> from sympy.polys.puiseux import puiseux_ring
        >>> R, x = puiseux_ring('x', QQ)
        >>> R.from_int(3)
        3
        )r"   r    ©r'   Úns     r   Úfrom_intzPuiseuxRing.from_int”   s   € ð �~‰~˜dŸn™n¨QÓ/Ó0Ð0r   c                ó8   — | j                   j                  |«      S )a  Create a new element of the domain.

        >>> from sympy.polys.domains import QQ
        >>> from sympy.polys.puiseux import puiseux_ring
        >>> R, x = puiseux_ring('x', QQ)
        >>> R.domain_new(3)
        3
        >>> QQ.of_type(_)
        True
        )r    Ú
domain_new©r'   Úargs     r   r?   zPuiseuxRing.domain_newŸ   s   € ð �~‰~×(Ñ(¨Ó-Ð-r   c                óV   — | j                  | j                  j                  |«      «      S )a-  Create a new element from a ground element.

        >>> from sympy.polys.domains import QQ
        >>> from sympy.polys.puiseux import puiseux_ring, PuiseuxPoly
        >>> R, x = puiseux_ring('x', QQ)
        >>> R.ground_new(3)
        3
        >>> isinstance(_, PuiseuxPoly)
        True
        )r"   r    Ú
ground_newr@   s     r   rC   zPuiseuxRing.ground_new¬   s"   € ð �~‰~˜dŸn™n×7Ñ7¸Ó<Ó=Ð=r   c                ó„   — t        |t        «      r| j                  |«      S | j                  | j	                  |«      «      S )a  Coerce an element into the ring.

        >>> from sympy.polys.domains import QQ
        >>> from sympy.polys.puiseux import puiseux_ring
        >>> R, x = puiseux_ring('x', QQ)
        >>> R(3)
        3
        >>> R({(QQ(1,2),): QQ(3)})
        3*x**(1/2)
        )r/   Údictr8   r"   r    r@   s     r   Ú__call__zPuiseuxRing.__call__¹   s5   € ô �cœ4Ô Ø—>‘> #Ó&Ð&à—>‘> $§.¡.°Ó"5Ó6Ð6r   c                ó8   — | j                   j                  |«      S )a  Return the index of a generator.

        >>> from sympy.polys.domains import QQ
        >>> from sympy.polys.puiseux import puiseux_ring
        >>> R, x, y = puiseux_ring('x y', QQ)
        >>> R.index(x)
        0
        >>> R.index(y)
        1
        )r   Úindex)r'   Úxs     r   rH   zPuiseuxRing.indexÉ   s   € ð �y‰y�‰˜qÓ!Ð!r   N)r   ústr | list[Expr]r   r   ©ÚreturnÚstr©r2   r   rL   Úbool)r6   r   rL   r5   )r9   údict[tuple[int, ...], Any]rL   r5   ©r<   ÚintrL   r5   )rA   r   rL   r   )rA   r   rL   r5   )rI   r5   rL   rR   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r)   r-   r3   r"   r8   r=   r?   rC   rF   rH   © r   r   r   r   ;   s;   „ ñ#óH3ó(=óMó
'ó	2ó	1ó.ó>ó7ô "r   r   c           
     ó²   — | j                   }|j                  }|j                  | j                  «       D ��ci c]  \  }} |||«      |“Œ c}}«      S c c}}w r   )r   Úmonomial_divr8   r9   )r6   Úmonomr   ÚdivÚmÚcs         r   Ú_div_poly_monomr^   ×   óH   € Ø�9‰9€DØ
×
Ñ
€CØ�>‰>¸¿
¹
»×E±°°1™3˜q %›=¨!Ñ+ÓEÓFÐFùÓEó   ·A
c           
     ó²   — | j                   }|j                  }|j                  | j                  «       D ��ci c]  \  }} |||«      |“Œ c}}«      S c c}}w r   )r   r&   r8   r9   )r6   rZ   r   Úmulr\   r]   s         r   Ú_mul_poly_monomrc   Ý   r_   r`   c                ó:   — t        d„ t        | |«      D «       «      S )Nc              3  ó,   K  — | ]  \  }}||z
  –— Œ y ­wr   rW   ©Ú.0ÚmiÚdis      r   ú	<genexpr>z_div_monom.<locals>.<genexpr>ä   s   è ø€ Ò7™V˜R ��b•Ñ7ùó   ‚©r!   Úzip)rZ   r[   s     r   Ú
_div_monomrn   ã   s   € ÜÑ7¤s¨5°#£Ô7Ó7Ð7r   c                  óL  — e Zd ZU dZded<   ded<   ded<   ded<   d6d	„Ze	 	 	 	 	 	 	 	 	 	 d7d
„«       Ze	 	 	 	 	 	 	 	 	 	 d7d„«       Zd8d„Z	e	 	 	 	 	 	 	 	 d9d„«       Z
e	 	 	 	 	 	 	 	 d:d„«       Ze	 	 	 	 	 	 	 	 d;d„«       Zd<d„Zd=d„Zd>d„Zd?d„Zd@d„Zd>d„ZdAd„ZedBd„«       ZdCd„Ze	 	 	 	 	 	 dDd„«       ZdEd„ZdFd„Z	 	 	 	 dGd„ZdHd„ZdHd„ZdId„ZdId „ZdId!„ZdId"„Z dId#„Z!dId$„Z"dId%„Z#dId&„Z$dId'„Z%dJd(„Z&dKd)„Z'dJd*„Z(dKd+„Z)dKd,„Z*dJd-„Z+dKd.„Z,dKd/„Z-dLd0„Z.dLd1„Z/dMd2„Z0dHd3„Z1dNd4„Z2y5)Or5   aR  Puiseux polynomial. Represents a truncated Puiseux series.

    See the :class:`PuiseuxRing` class for more information.

    >>> from sympy import QQ
    >>> from sympy.polys.puiseux import puiseux_ring
    >>> R, x, y = puiseux_ring('x, y', QQ)
    >>> p = 5*x**2 + 7*y**3
    >>> p
    7*y**3 + 5*x**2

    The internal representation of a Puiseux polynomial wraps a normal
    polynomial. To support negative powers the polynomial is considered to be
    divided by a monomial.

    >>> p2 = 1/x + 1/y**2
    >>> p2.monom # x*y**2
    (1, 2)
    >>> p2.poly
    x + y**2
    >>> (y**2 + x) / (x*y**2) == p2
    True

    To support fractional powers the polynomial is considered to be a function
    of ``x**(1/nx), y**(1/ny), ...``. The representation keeps track of a
    monomial and a list of exponent denominators so that the polynomial can be
    used to represent both negative and fractional powers.

    >>> p3 = x**QQ(1,2) + y**QQ(2,3)
    >>> p3.ns
    (2, 3)
    >>> p3.poly
    x + y**2

    See Also
    ========

    sympy.polys.puiseux.PuiseuxRing
    sympy.polys.rings.PolyElement
    r   r   r   r6   útuple[int, ...] | NonerZ   Únsc                ó*   — | j                  ||d d «      S r   )Ú_new)Úclsr6   r   s      r   Ú__new__zPuiseuxPoly.__new__  s   € Ø�x‰x˜˜d D¨$Ó/Ð/r   c                óX   — | j                  |||«      \  }}}| j                  ||||«      S r   )Ú
_normalizeÚ_new_raw)rt   r   r6   rZ   rq   s        r   rs   zPuiseuxPoly._new  s1   € ð Ÿ.™.¨¨u°bÓ9‰ˆˆe�RØ�|‰|˜D $¨¨rÓ2Ð2r   c                óh   — t         j                  | «      }||_        ||_        ||_        ||_        |S r   )Úobjectru   r   r6   rZ   rq   )rt   r   r6   rZ   rq   Úobjs         r   rx   zPuiseuxPoly._new_raw$  s3   € ô �n‰n˜SÓ!ˆØˆŒØˆŒØˆŒ	ØˆŒØˆ
r   c                ó2  — t        |t        «      rO| j                  |j                  k(  xr4 | j                  |j                  k(  xr | j                  |j                  k(  S | j                  €'| j                  €| j                  j                  |«      S t        S r   )r/   r5   r6   rZ   rq   r3   r0   r1   s     r   r3   zPuiseuxPoly.__eq__3  sz   € Ü�eœ[Ô)à—	‘	˜UŸZ™ZÑ'ò (Ø—J‘J %§+¡+Ñ-ò(à—G‘G˜uŸx™xÑ'ðð
 �Z‰ZÐ D§G¡G OØ—9‘9×#Ñ# EÓ*Ð*ä!Ð!r   c                ó"  — |€|€|d d fS |�u|j                  «       D �cg c]  }t        |d«      ‘Œ }}t        d„ t        ||«      D «       «      rt	        ||«      }d }n#t        |«      rt	        ||«      }t        ||«      }|��|j                  «       \  }\  }|j                  «       }|�|ndgt        |«      z  }	g }
g }g }t        ||||	«      D ]b  \  }}}}|dk(  rt        ||«      }nt        |||«      }|
j                  ||z  «       |j                  ||z  «       |j                  ||z  «       Œd t        d„ |D «       «      r|j                  |«      }|}|�t        |«      }t        d„ |
D «       «      rd }nt        |
«      }|||fS c c}w )Nr   c              3  ó,   K  — | ]  \  }}||k\  –— Œ y ­wr   rW   )rg   ri   rh   s      r   rj   z)PuiseuxPoly._normalize.<locals>.<genexpr>K  s   è ø€ Ò;¡  B�2˜•8Ñ;ùrk   c              3  ó&   K  — | ]	  }|d kD  –— Œ y­w©é   NrW   )rg   Úinfls     r   rj   z)PuiseuxPoly._normalize.<locals>.<genexpr>b  s   è ø€ Ò3 �4˜!•8Ñ3ùó   ‚c              3  ó&   K  — | ]	  }|d k(  –— Œ y­wr€   rW   ©rg   r<   s     r   rj   z)PuiseuxPoly._normalize.<locals>.<genexpr>j  s   è ø€ Ò*˜a�1˜•6Ñ*ùrƒ   )Útail_degreesÚmaxÚallrm   r^   Úanyrn   ÚdeflateÚdegreesÚlenr
   ÚappendÚinflater!   )rt   r6   rZ   rq   ÚdÚdegsÚ	factors_dÚpoly_dr‹   Úmonom_dÚns_newÚ	monom_newÚ
inflationsÚfiÚniri   rh   r(   s                     r   rw   zPuiseuxPoly._normalize?  s¥  € ð ˆ=˜R˜ZØ˜˜tÐ#Ð#àÐØ'+×'8Ñ'8Ó':Ö; !”C˜˜1•IÐ;ˆDÐ;ÜÑ;¬#¨d°EÓ*:Ô;Ô;Ü& t¨UÓ3�Ø‘Ü�T”Ü& t¨TÓ2�Ü" 5¨$Ó/�à‰>Ø"&§,¡,£.ÑˆI‘x˜Ø—l‘l“nˆGØ$Ð0‘e°q°c¼CÀ»LÑ6HˆGØˆFØˆIØˆJÜ"% i°°W¸gÓ"Fò +‘��B˜˜BØ˜’7Ü˜B ›‘Aä˜B  B›�AØ—‘˜b A™gÔ&Ø× Ñ   q¡Ô)Ø×!Ñ! "¨¡'Õ*ð+ô Ñ3¨
Ô3Ô3ØŸ™¨
Ó3�àˆDàÐ Ü˜iÓ(�äÑ* 6Ô*Ô*Ø‘ä˜6“]�à�U˜BˆÐùòK <s   žFc                óà   — |�|�t        d„ t        |||«      D «       «      S |�t        d„ t        ||«      D «       «      S |�t        d„ t        ||«      D «       «      S t        d„ |D «       «      S )Nc              3  óB   K  — | ]  \  }}}t        ||z
  |«      –— Œ y ­wr   r   ©rg   rh   ri   r˜   s       r   rj   z-PuiseuxPoly._monom_fromint.<locals>.<genexpr>y  s    è ø€ ÒR©Z¨R°°Rœ˜B ™G RŸÑRùs   ‚c              3  ó>   K  — | ]  \  }}t        ||z
  «      –— Œ y ­wr   r   rf   s      r   rj   z-PuiseuxPoly._monom_fromint.<locals>.<genexpr>{  s   è ø€ ÒF©¨¨Rœ˜B ™GŸÑFùs   ‚c              3  ó:   K  — | ]  \  }}t        ||«      –— Œ y ­wr   r   ©rg   rh   r˜   s      r   rj   z-PuiseuxPoly._monom_fromint.<locals>.<genexpr>}  s   è ø€ ÒA©¨¨Bœ˜B ŸÑAùó   ‚c              3  ó2   K  — | ]  }t        |«      –— Œ y ­wr   r   ©rg   rh   s     r   rj   z-PuiseuxPoly._monom_fromint.<locals>.<genexpr>  s   è ø€ Ò0 Bœ˜BŸÑ0ùs   ‚rl   ©rt   rZ   Údmonomrq   s       r   Ú_monom_fromintzPuiseuxPoly._monom_fromintq  ss   € ð Ð " .ÜÑR¼3¸uÀfÈbÓ;QÔRÓRÐRØÐÜÑF´3°u¸fÓ3EÔFÓFÐFØˆ^ÜÑA´#°e¸R³.ÔAÓAÐAäÑ0¨%Ô0Ó0Ð0r   c                óà   — |�|�t        d„ t        |||«      D «       «      S |�t        d„ t        ||«      D «       «      S |�t        d„ t        ||«      D «       «      S t        d„ |D «       «      S )Nc              3  óZ   K  — | ]#  \  }}}t        ||z  j                  |z   «      –— Œ% y ­wr   ©rR   Ú	numeratorr›   s       r   rj   z+PuiseuxPoly._monom_toint.<locals>.<genexpr>‰  s/   è ø€ ò Ù2<°"°b¸"”�R˜"‘W×'Ñ'¨"Ñ,×-ñùs   ‚)+c              3  óR   K  — | ]  \  }}t        |j                  |z   «      –— Œ! y ­wr   r§   rf   s      r   rj   z+PuiseuxPoly._monom_toint.<locals>.<genexpr>�  s"   è ø€ ÒQ±F°B¸œ˜RŸ\™\¨BÑ.×/ÑQùó   ‚%'c              3  óR   K  — | ]  \  }}t        ||z  j                  «      –— Œ! y ­wr   r§   rž   s      r   rj   z+PuiseuxPoly._monom_toint.<locals>.<genexpr>�  s#   è ø€ ÒO±f°b¸"œ˜b 2™g×0Ñ0×1ÑOùrª   c              3  óF   K  — | ]  }t        |j                  «      –— Œ y ­wr   r§   r¡   s     r   rj   z+PuiseuxPoly._monom_toint.<locals>.<genexpr>‘  s   è ø€ Ò;¨rœ˜RŸ\™\×*Ñ;ùs   ‚!rl   r¢   s       r   Ú_monom_tointzPuiseuxPoly._monom_toint�  s   € ð Ð " .Üñ Ü@CÀEÈ6ÐSUÓ@Vôó ð ð ÐÜÑQ¼cÀ%ÈÓ>PÔQÓQÐQØˆ^ÜÑOÄÀEÈ2ÃÔOÓOÐOäÑ;°UÔ;Ó;Ð;r   c              #  ó¤   K  — | j                   | j                  }}| j                  j                  «       D ]  }| j	                  |||«      –— Œ y­w)a@  Iterate over the monomials of a Puiseux polynomial.

        >>> from sympy import QQ
        >>> from sympy.polys.puiseux import puiseux_ring
        >>> R, x, y = puiseux_ring('x, y', QQ)
        >>> p = 5*x**2 + 7*y**3
        >>> list(p.itermonoms())
        [(2, 0), (0, 3)]
        >>> p[(2, 0)]
        5
        N)rZ   rq   r6   Ú
itermonomsr¤   )r'   rZ   rq   r\   s       r   r¯   zPuiseuxPoly.itermonoms“  sJ   è ø€ ð —J‘J §¡ˆrˆØ—‘×%Ñ%Ó'ò 	4ˆAØ×%Ñ% a¨°Ó3Ó3ñ	4ùs   ‚AAc                ó4   — t        | j                  «       «      S )z7Return a list of the monomials of a Puiseux polynomial.)Úlistr¯   r,   s    r   ÚmonomszPuiseuxPoly.monoms£  s   € ä�D—O‘OÓ%Ó&Ð&r   c                ó"   — | j                  «       S r   )r¯   r,   s    r   Ú__iter__zPuiseuxPoly.__iter__§  s   € Ø�‰Ó Ð r   c                ón   — | j                  || j                  | j                  «      }| j                  |   S r   )r­   rZ   rq   r6   )r'   rZ   s     r   Ú__getitem__zPuiseuxPoly.__getitem__ª  s-   € Ø×!Ñ! %¨¯©°T·W±WÓ=ˆØ�y‰y˜ÑÐr   c                ó,   — t        | j                  «      S r   )rŒ   r6   r,   s    r   Ú__len__zPuiseuxPoly.__len__®  s   € Ü�4—9‘9‹~Ðr   c              #  ó²   K  — | j                   | j                  }}| j                  j                  «       D ]  \  }}| j	                  |||«      }||f–— Œ  y­w)a%  Iterate over the terms of a Puiseux polynomial.

        >>> from sympy import QQ
        >>> from sympy.polys.puiseux import puiseux_ring
        >>> R, x, y = puiseux_ring('x, y', QQ)
        >>> p = 5*x**2 + 7*y**3
        >>> list(p.iterterms())
        [((2, 0), 5), ((0, 3), 7)]
        N)rZ   rq   r6   Ú	itertermsr¤   )r'   rZ   rq   r\   ÚcoeffÚmqs         r   rº   zPuiseuxPoly.iterterms±  sV   è ø€ ð —J‘J §¡ˆrˆØŸ	™	×+Ñ+Ó-ò 	‰HˆAˆuØ×$Ñ$ Q¨¨rÓ2ˆBØ�e�)‹Oñ	ùs   ‚AAc                ó4   — t        | j                  «       «      S )z3Return a list of the terms of a Puiseux polynomial.)r±   rº   r,   s    r   r9   zPuiseuxPoly.termsÀ  ó   € ä�D—N‘NÓ$Ó%Ð%r   c                ó.   — | j                   j                  S )z7Return True if the Puiseux polynomial is a single term.)r6   Úis_termr,   s    r   rÀ   zPuiseuxPoly.is_termÄ  s   € ð �y‰y× Ñ Ð r   c                ó4   — t        | j                  «       «      S )z;Return a dictionary representation of a Puiseux polynomial.)rE   rº   r,   s    r   Úto_dictzPuiseuxPoly.to_dictÉ  r¾   r   c           	     ó‚  — dg|j                   z  }dg|j                   z  }|D ]\  }t        ||«      D ��cg c]  \  }}t        ||j                  «      ‘Œ }}}t        ||«      D ��cg c]  \  }}t	        ||«      ‘Œ }}}Œ^ t        |«      sd}nt        d„ t        ||«      D «       «      }t        d„ |D «       «      rd}	nt        |«      }	|j                  «       D ��
ci c]  \  }}
| j                  |||	«      |
“Œ }}}
|j                  j                  |«      }| j                  ||||	«      S c c}}w c c}}w c c}
}w )a^  Create a Puiseux polynomial from a dictionary of terms.

        >>> from sympy import QQ
        >>> from sympy.polys.puiseux import puiseux_ring, PuiseuxPoly
        >>> R, x = puiseux_ring('x', QQ)
        >>> PuiseuxPoly.from_dict({(QQ(1,2),): QQ(3)}, R)
        3*x**(1/2)
        >>> R.from_dict({(QQ(1,2),): QQ(3)})
        3*x**(1/2)
        r�   r   Nc              3  óT   K  — | ]   \  }}t        ||z  j                  «       –— Œ" y ­wr   r§   ©rg   r\   r<   s      r   rj   z(PuiseuxPoly.from_dict.<locals>.<genexpr>ä  s&   è ø€ ÒK±d°a¸œ3  A¡×0Ñ0Ó1Ô1ÑKùs   ‚&(c              3  ó&   K  — | ]	  }|d k(  –— Œ y­wr€   rW   r…   s     r   rj   z(PuiseuxPoly.from_dict.<locals>.<genexpr>æ  s   è ø€ Ò"˜!ˆq�A�vÑ"ùrƒ   )r   rm   r   ÚdenominatorÚminr‰   r!   rˆ   Úitemsr­   r    r8   rs   )rt   r9   r   rq   ÚmonÚmor<   r\   rZ   Úns_finalr»   Úterms_pr6   s                r   r8   zPuiseuxPoly.from_dictÍ  s'  € ð ˆS�4—:‘:ÑˆØˆc�D—J‘JÑˆØò 	7ˆBÜ47¸¸B³K×@©D¨A¨q”#�a˜Ÿ™Õ'Ð@ˆBÑ@Ü),¨R°«×6¡  A”3�q˜!•9Ð6ˆCÒ6ð	7ô �3ŒxØ‰EäÑK¼cÀ#Àr»lÔKÓKˆEäÑ"˜rÔ"Ô"Ø‰Hä˜R“yˆHàOTÏ{É{Ë}×]Á8À1Àe�3×#Ñ# A u¨hÓ7¸Ñ>Ð]ˆÑ]à�~‰~×'Ñ'¨Ó0ˆà�x‰x˜˜d E¨8Ó4Ð4ùó# AùÛ6ùó ^s   µ D/Á'D5ÃD;c                ó>  — | j                   }|j                  }|j                  }g }| j                  «       D ]]  \  }}|j	                  |«      }g }t        |«      D ]  \  }	}
|j                  ||	   |
z  «       Œ |j                  t        |g|¢­Ž «       Œ_ t        |Ž S )aO  Convert a Puiseux polynomial to :class:`~sympy.core.expr.Expr`.

        >>> from sympy import QQ, Expr
        >>> from sympy.polys.puiseux import puiseux_ring
        >>> R, x = puiseux_ring('x', QQ)
        >>> p = 5*x**2 + 7*x**3
        >>> p.as_expr()
        7*x**3 + 5*x**2
        >>> isinstance(_, Expr)
        True
        )	r   r   r   rº   Úto_sympyÚ	enumerater�   r	   r   )r'   r   Údomr   r9   rZ   r»   Ú
coeff_exprÚmonoms_exprÚir\   s              r   Úas_exprzPuiseuxPoly.as_exprñ  s¡   € ð �y‰yˆØ�k‰kˆØ—,‘,ˆØˆØ ŸN™NÓ,ò 	8‰LˆE�5ØŸ™ eÓ,ˆJØˆKÜ! %Ó(ò 4‘��1Ø×"Ñ" 7¨1¡:°¡?Õ3ð4à�L‰Lœ˜ZÐ6¨+Ò6Õ7ð	8ô �Eˆ{Ðr   c                ó
  ‡	— dd„Š	| j                   }|j                  }|j                  D �cg c]  }t        |«      ‘Œ }}g }t	        | j                  «       «      D ]‘  \  }}dj                  ˆ	fd„t        ||«      D «       «      }||j                  k(  r&|r|j                  |«       ŒM|j                  d«       Œ_|s|j                  t        |«      «       Œ||j                  |› d|› �«       Œ“ dj                  |«      S c c}w )Nc                óT   — |dk(  r| S |dk\  rt        |«      |k(  r| › d|› �S | › d|› d�S )Nr�   r   z**z**(r+   )rR   )ÚbaseÚexps     r   Úformat_powerz*PuiseuxPoly.__repr__.<locals>.format_power  sC   € Ø�aŠxØ�Ø˜’œc #›h¨#šoØ˜˜r # Ð'Ð'à˜˜s 3 % qÐ)Ð)r   Ú*c              3  ó<   •K  — | ]  \  }}|sŒ	 ‰||«      –— Œ y ­wr   rW   )rg   ÚsÚerÚ   s      €r   rj   z'PuiseuxPoly.__repr__.<locals>.<genexpr>  s   øè ø€ Ò V¹¸¸1ÒTU¡¨a°×!3Ñ Vùs   ƒ
ŽÚ1z + )rØ   rM   rÙ   rR   rL   rM   )
r   r   r   rM   Úsortedr9   Újoinrm   r$   r�   )
r'   r   rÑ   rÝ   ÚsymsÚ	terms_strrZ   r»   Ú	monom_strrÚ   s
            @r   r-   zPuiseuxPoly.__repr__	  sä   ø€ ó	*ð �y‰yˆØ�k‰kˆà $§¡Ö-˜1”�A•Ð-ˆÐ-Øˆ	Ü" 4§:¡:£<Ó0ò 
	9‰LˆE�5ØŸ™Ó VÄÀDÈ%Ó@PÔ VÓVˆIØ˜Ÿ™ÒÙØ×$Ñ$ YÕ/à×$Ñ$ SÕ)ÙØ× Ñ ¤ U£Õ,à× Ñ  E 7¨!¨I¨;Ð!7Õ8ð
	9ð �z‰z˜)Ó$Ð$ùò .s   ¬D c                ó0  — | j                   | j                  | j                  }}}|j                   |j                  |j                  }}}||k(  r||k(  r||||fS ||k(  r|}�n+|�¿|�½t        d„ t	        ||«      D «       «      }t	        ||«      D �	�
cg c]
  \  }	}
|	|
z  ‘Œ }}	}
t	        ||«      D �	�cg c]
  \  }	}|	|z  ‘Œ }}	}|j                  |«      }|j                  |«      }|�t        d„ t	        ||«      D «       «      }|�‡t        d„ t	        ||«      D «       «      }nj|�2|}|j                  |«      }|�St        d„ t	        ||«      D «       «      }n6|�2|}|j                  |«      }|�t        d„ t	        ||«      D «       «      }nJ ‚||k(  r|}nq|�K|�It        d„ t	        ||«      D «       «      }t        |t        ||«      «      }t        |t        ||«      «      }n$|�|}t        ||«      }n|�|}t        ||«      }nJ ‚||||fS c c}
}	w c c}}	w )z7Bring two Puiseux polynomials to a common monom and ns.c              3  ó:   K  — | ]  \  }}t        ||«      –— Œ y ­wr   )r   )rg   Ún1Ún2s      r   rj   z%PuiseuxPoly._unify.<locals>.<genexpr>5  s   è ø€ Ò?¡v r¨2”s˜2˜r—{Ñ?ùrŸ   c              3  ó,   K  — | ]  \  }}||z  –— Œ y ­wr   rW   ©rg   r\   Úfs      r   rj   z%PuiseuxPoly._unify.<locals>.<genexpr>;  ó   è ø€ ÒA©¨¨A˜q 1�uÑAùrk   c              3  ó,   K  — | ]  \  }}||z  –— Œ y ­wr   rW   rê   s      r   rj   z%PuiseuxPoly._unify.<locals>.<genexpr>=  rì   rk   c              3  ó,   K  — | ]  \  }}||z  –— Œ y ­wr   rW   rÅ   s      r   rj   z%PuiseuxPoly._unify.<locals>.<genexpr>B  rì   rk   c              3  ó,   K  — | ]  \  }}||z  –— Œ y ­wr   rW   rÅ   s      r   rj   z%PuiseuxPoly._unify.<locals>.<genexpr>G  rì   rk   c              3  ó:   K  — | ]  \  }}t        ||«      –— Œ y ­wr   )r‡   )rg   Úm1Úm2s      r   rj   z%PuiseuxPoly._unify.<locals>.<genexpr>N  s   è ø€ ÒH©&¨"¨bœ#˜b "Ÿ+ÑHùrŸ   )r6   rZ   rq   r!   rm   rŽ   rc   rn   )r'   r2   Úpoly1Úmonom1Úns1Úpoly2Úmonom2Úns2rq   r<   rç   Úf1rè   Úf2rZ   s                  r   Ú_unifyzPuiseuxPoly._unify&  s!  € ð "ŸY™Y¨¯
©
°D·G±G�sˆvˆØ"ŸZ™Z¨¯©°e·h±h�sˆvˆà�VÒ  s¢
Ø˜% ¨Ð,Ð,à�#Š:ØŠBØˆ_  ÜÑ?´°S¸#³Ô?Ó?ˆBÜ'*¨2¨s£|×4™e˜a �!�r“'Ð4ˆBÑ4Ü'*¨2¨s£|×4™e˜a �!�r“'Ð4ˆBÑ4Ø—M‘M "Ó%ˆEØ—M‘M "Ó%ˆEØÐ!ÜÑA´°V¸R³ÔAÓA�ØÐ!ÜÑA´°V¸R³ÔAÓA‘Øˆ_ØˆBØ—M‘M "Ó%ˆEØÐ!ÜÑA´°V¸R³ÔAÓA‘Øˆ_ØˆBØ—M‘M "Ó%ˆEØÐ!ÜÑA´°V¸R³ÔAÓA‘à�5à�VÒØ‰EØÐ FÐ$6ÜÑH´C¸ÀÓ4GÔHÓHˆEÜ# E¬:°e¸VÓ+DÓEˆEÜ# E¬:°e¸VÓ+DÓE‰EØÐØˆEÜ# E¨6Ó2‰EØÐØˆEÜ# E¨6Ó2‰Eà�5à�e˜U BÐ&Ð&ùóI 5ùÛ4s   ÂHÂ2Hc                ó   — | S r   rW   r,   s    r   Ú__pos__zPuiseuxPoly.__pos__\  s   € Øˆr   c                ó|   — | j                  | j                  | j                   | j                  | j                  «      S r   ©rx   r   r6   rZ   rq   r,   s    r   Ú__neg__zPuiseuxPoly.__neg___  s)   € Ø�}‰}˜TŸY™Y¨¯©¨
°D·J±JÀÇÁÓHÐHr   c                ó„  — t        |t        «      r5| j                  |j                  k7  rt        d«      ‚| j	                  |«      S | j                  j
                  }t        |t        «      r.| j                  |j                  t        |«      t        «      «      S |j                  |«      r| j                  |«      S t        S )Nz3Cannot add Puiseux polynomials from different rings)r/   r5   r   Ú
ValueErrorÚ_addr   rR   Ú_add_groundÚconvert_fromr   Úof_typer0   ©r'   r2   r   s      r   Ú__add__zPuiseuxPoly.__add__b  s•   € Ü�eœ[Ô)Ø�y‰y˜EŸJ™JÒ&Ü Ð!VÓWÐWØ—9‘9˜UÓ#Ð#Ø—‘×!Ñ!ˆÜ�eœSÔ!Ø×#Ñ# F×$7Ñ$7¼¸5»	Ä2Ó$FÓGÐGØ�^‰^˜EÔ"Ø×#Ñ# EÓ*Ð*ä!Ð!r   c                óú   — | j                   j                  }t        |t        «      r.| j	                  |j                  t        |«      t        «      «      S |j                  |«      r| j	                  |«      S t        S r   )	r   r   r/   rR   r  r  r   r  r0   r  s      r   Ú__radd__zPuiseuxPoly.__radd__o  ó`   € Ø—‘×!Ñ!ˆÜ�eœSÔ!Ø×#Ñ# F×$7Ñ$7¼¸5»	Ä2Ó$FÓGÐGØ�^‰^˜EÔ"Ø×#Ñ# EÓ*Ð*ä!Ð!r   c                ó„  — t        |t        «      r5| j                  |j                  k7  rt        d«      ‚| j	                  |«      S | j                  j
                  }t        |t        «      r.| j                  |j                  t        |«      t        «      «      S |j                  |«      r| j                  |«      S t        S )Nz8Cannot subtract Puiseux polynomials from different rings)r/   r5   r   r  Ú_subr   rR   Ú_sub_groundr  r   r  r0   r  s      r   Ú__sub__zPuiseuxPoly.__sub__x  ó›   € Ü�eœ[Ô)Ø�y‰y˜EŸJ™JÒ&Ü ØNóð ð —9‘9˜UÓ#Ð#Ø—‘×!Ñ!ˆÜ�eœSÔ!Ø×#Ñ# F×$7Ñ$7¼¸5»	Ä2Ó$FÓGÐGØ�^‰^˜EÔ"Ø×#Ñ# EÓ*Ð*ä!Ð!r   c                óú   — | j                   j                  }t        |t        «      r.| j	                  |j                  t        |«      t        «      «      S |j                  |«      r| j	                  |«      S t        S r   )	r   r   r/   rR   Ú_rsub_groundr  r   r  r0   r  s      r   Ú__rsub__zPuiseuxPoly.__rsub__‡  s`   € Ø—‘×!Ñ!ˆÜ�eœSÔ!Ø×$Ñ$ V×%8Ñ%8¼¸E»ÄBÓ%GÓHÐHØ�^‰^˜EÔ"Ø×$Ñ$ UÓ+Ð+ä!Ð!r   c                ó„  — t        |t        «      r5| j                  |j                  k7  rt        d«      ‚| j	                  |«      S | j                  j
                  }t        |t        «      r.| j                  |j                  t        |«      t        «      «      S |j                  |«      r| j                  |«      S t        S )Nz8Cannot multiply Puiseux polynomials from different rings)r/   r5   r   r  Ú_mulr   rR   Ú_mul_groundr  r   r  r0   r  s      r   Ú__mul__zPuiseuxPoly.__mul__�  r  r   c                óú   — | j                   j                  }t        |t        «      r.| j	                  |j                  t        |«      t        «      «      S |j                  |«      r| j	                  |«      S t        S r   )	r   r   r/   rR   r  r  r   r  r0   r  s      r   Ú__rmul__zPuiseuxPoly.__rmul__Ÿ  r  r   c                óÊ   — t        |t        «      r(|dk\  r| j                  |«      S | j                  | «      S t	        j
                  |«      r| j                  |«      S t        S )Nr   )r/   rR   Ú	_pow_pintÚ	_pow_nintr   r  Ú_pow_rationalr0   r1   s     r   Ú__pow__zPuiseuxPoly.__pow__¨  sV   € Ü�eœSÔ!Ø˜ŠzØ—~‘~ eÓ,Ð,à—~‘~ u fÓ-Ð-Ü�Z‰Z˜ÔØ×%Ñ% eÓ,Ð,ä!Ð!r   c                ó¢  — t        |t        «      rC| j                  |j                  k7  rt        d«      ‚| j	                  |j                  «       «      S | j                  j                  }t        |t        «      r/| j                  |j                  t        d|«      t        «      «      S |j                  |«      r| j                  |«      S t        S )Nz6Cannot divide Puiseux polynomials from different ringsr�   )r/   r5   r   r  r  Ú_invr   rR   r  r  r   r  Ú_div_groundr0   r  s      r   Ú__truediv__zPuiseuxPoly.__truediv__³  s£   € Ü�eœ[Ô)Ø�y‰y˜EŸJ™JÒ&Ü ØLóð ð —9‘9˜UŸZ™Z›\Ó*Ð*Ø—‘×!Ñ!ˆÜ�eœSÔ!Ø×#Ñ# F×$7Ñ$7¼¸1¸e»ÄbÓ$IÓJÐJØ�^‰^˜EÔ"Ø×#Ñ# EÓ*Ð*ä!Ð!r   c                óV  — t        |t        «      rP| j                  «       j                  | j                  j
                  j                  t        |«      t        «      «      S | j                  j
                  j                  |«      r| j                  «       j                  |«      S t        S r   )
r/   rR   r   r  r   r   r  r   r  r0   r1   s     r   Ú__rtruediv__zPuiseuxPoly.__rtruediv__Â  st   € Ü�eœSÔ!Ø—9‘9“;×*Ñ*¨4¯9©9×+;Ñ+;×+HÑ+HÌÈEËÔTVÓ+WÓXÐXØ�Y‰Y×Ñ×%Ñ% eÔ,Ø—9‘9“;×*Ñ*¨5Ó1Ð1ä!Ð!r   c                óp   — | j                  |«      \  }}}}| j                  | j                  ||z   ||«      S r   ©rû   rs   r   ©r'   r2   ró   rö   rZ   rq   s         r   r  zPuiseuxPoly._addÊ  ó6   € Ø"&§+¡+¨eÓ"4Ñˆˆu�e˜RØ�y‰y˜Ÿ™ E¨E¡M°5¸"Ó=Ð=r   c                óV   — | j                  | j                  j                  |«      «      S r   )r  r   rC   ©r'   Úgrounds     r   r  zPuiseuxPoly._add_groundÎ  ó    € Ø�y‰y˜Ÿ™×-Ñ-¨fÓ5Ó6Ð6r   c                óp   — | j                  |«      \  }}}}| j                  | j                  ||z
  ||«      S r   r&  r'  s         r   r  zPuiseuxPoly._subÑ  r(  r   c                óV   — | j                  | j                  j                  |«      «      S r   )r  r   rC   r*  s     r   r  zPuiseuxPoly._sub_groundÕ  r,  r   c                óV   — | j                   j                  |«      j                  | «      S r   )r   rC   r  r*  s     r   r  zPuiseuxPoly._rsub_groundØ  s"   € Ø�y‰y×#Ñ# FÓ+×0Ñ0°Ó6Ð6r   c                ó˜   — | j                  |«      \  }}}}|�t        d„ |D «       «      }| j                  | j                  ||z  ||«      S )Nc              3  ó&   K  — | ]	  }d |z  –— Œ y­w)é   NrW   )rg   rÞ   s     r   rj   z#PuiseuxPoly._mul.<locals>.<genexpr>Þ  s   è ø€ Ò/ A˜!˜a�%Ñ/ùrƒ   )rû   r!   rs   r   r'  s         r   r  zPuiseuxPoly._mulÛ  sL   € Ø"&§+¡+¨eÓ"4Ñˆˆu�e˜RØÐÜÑ/¨Ô/Ó/ˆEØ�y‰y˜Ÿ™ E¨E¡M°5¸"Ó=Ð=r   c                ó€   — | j                  | j                  | j                  |z  | j                  | j                  «      S r   rÿ   r*  s     r   r  zPuiseuxPoly._mul_groundá  ó,   € Ø�}‰}˜TŸY™Y¨¯	©	°FÑ(:¸D¿J¹JÈÏÉÓPÐPr   c                ó€   — | j                  | j                  | j                  |z  | j                  | j                  «      S r   rÿ   r*  s     r   r!  zPuiseuxPoly._div_groundä  r4  r   c                óÀ   ‡— ‰dk\  sJ ‚| j                   }|�t        ˆfd„|D «       «      }| j                  | j                  | j                  ‰z  || j
                  «      S )Nr   c              3  ó(   •K  — | ]	  }|‰z  –— Œ y ­wr   rW   rÅ   s     €r   rj   z(PuiseuxPoly._pow_pint.<locals>.<genexpr>ë  s   øè ø€ Ò/ A˜!˜a�%Ñ/ùó   ƒ)rZ   r!   rs   r   r6   rq   )r'   r<   rZ   s    ` r   r  zPuiseuxPoly._pow_pintç  sR   ø€ Ø�AŠvˆˆvØ—
‘
ˆØÐÜÓ/¨Ô/Ó/ˆEØ�y‰y˜Ÿ™ D§I¡I¨q¡L°%¸¿¹ÓAÐAr   c                ó@   — | j                  «       j                  |«      S r   )r   r  r;   s     r   r  zPuiseuxPoly._pow_nintî  s   € Ø�y‰y‹{×$Ñ$ QÓ'Ð'r   c                ó6  ‡— | j                   st        d«      ‚| j                  «       \  \  }}| j                  j                  }|j                  |«      st        d«      ‚t        ˆfd„|D «       «      }| j                  j                  ||j                  i«      S )Nz0Only monomials can be raised to a rational powerc              3  ó(   •K  — | ]	  }|‰z  –— Œ y ­wr   rW   rÅ   s     €r   rj   z,PuiseuxPoly._pow_rational.<locals>.<genexpr>ø  s   øè ø€ Ò+ �a˜!•eÑ+ùr8  )	rÀ   r  r9   r   r   Úis_oner!   r8   r$   )r'   r<   rZ   r»   r   s    `   r   r  zPuiseuxPoly._pow_rationalñ  s}   ø€ Ø�|Š|ÜÐOÓPÐPØŸ:™:›<Ñ‰ˆ%�Ø—‘×!Ñ!ˆØ�}‰}˜UÔ#ÜÐOÓPÐPÜÓ+ UÔ+Ó+ˆØ�y‰y×"Ñ" E¨6¯:©:Ð#6Ó7Ð7r   c                ó>  — | j                   st        d«      ‚| j                  «       \  \  }}| j                  j                  }|j
                  s|j                  |«      st        d«      ‚t        d„ |D «       «      }d|z  }| j                  j                  ||i«      S )NzOnly terms can be invertedz"Cannot invert non-unit coefficientc              3  ó"   K  — | ]  }| –— Œ	 y ­wr   rW   )rg   r\   s     r   rj   z#PuiseuxPoly._inv.<locals>.<genexpr>  s   è ø€ Ò(˜Q�q”bÑ(ùs   ‚r�   )	rÀ   r  r9   r   r   Úis_Fieldr<  r!   r8   )r'   rZ   r»   r   s       r   r   zPuiseuxPoly._invû  s†   € Ø�|Š|ÜÐ9Ó:Ð:ØŸ:™:›<Ñ‰ˆ%�Ø—‘×!Ñ!ˆØ�Š v§}¡}°UÔ';ÜÐAÓBÐBÜÑ( %Ô(Ó(ˆØ�E‘	ˆØ�y‰y×"Ñ" E¨5 >Ó2Ð2r   c                óâ   — | j                   }|j                  |«      }i }| j                  «       D ]6  \  }}||   }|sŒt        |«      }||xx   dz  cc<   ||z  |t	        |«      <   Œ8  ||«      S )a:  Differentiate a Puiseux polynomial with respect to a variable.

        >>> from sympy import QQ
        >>> from sympy.polys.puiseux import puiseux_ring
        >>> R, x, y = puiseux_ring('x, y', QQ)
        >>> p = 5*x**2 + 7*y**3
        >>> p.diff(x)
        10*x
        >>> p.diff(y)
        21*y**2
        r�   )r   rH   rº   r±   r!   )	r'   rI   r   rÔ   r(   Úexpvr»   r<   rÞ   s	            r   ÚdiffzPuiseuxPoly.diff  sw   € ð �y‰yˆØ�J‰J�q‹MˆØˆØŸ>™>Ó+ò 	(‰KˆD�%Ø�Q‘ˆAÚÜ˜“J�Ø�!“˜‘	“Ø# a™i�”%˜“(’ð	(ñ �A‹wˆr   N)r6   r   r   r   rL   r5   )
r   r   r6   r   rZ   rp   rq   rp   rL   r5   rN   )r6   r   rZ   rp   rq   rp   rL   zBtuple[PolyElement, tuple[int, ...] | None, tuple[int, ...] | None])rZ   útuple[int, ...]r£   rp   rq   rp   rL   útuple[Any, ...])rZ   rD  r£   rp   rq   rp   rL   rC  )rL   zIterator[tuple[Any, ...]])rL   zlist[tuple[Any, ...]])rL   z%Iterator[tuple[tuple[Any, ...], Any]])rZ   rC  rL   r   )rL   rR   )rL   z!list[tuple[tuple[Any, ...], Any]])rL   rO   )rL   rP   )r9   zdict[tuple[Any, ...], Any]r   r   rL   r5   )rL   r   rK   )r2   r5   rL   zOtuple[PolyElement, PolyElement, tuple[int, ...] | None, tuple[int, ...] | None])rL   r5   )r2   r   rL   r5   )r2   r5   rL   r5   )r+  r   rL   r5   rQ   )r<   r   rL   r5   )rI   r5   rL   r5   )3rS   rT   rU   rV   Ú__annotations__ru   Úclassmethodrs   rx   r3   rw   r¤   r­   r¯   r²   r´   r¶   r¸   rº   r9   ÚpropertyrÀ   rÂ   r8   rÕ   r-   rû   rý   r   r  r
  r  r  r  r  r  r"  r$  r  r  r  r  r  r  r  r!  r  r  r  r   rB  rW   r   r   r5   r5   ç   sk  … ñ'ðR ÓØ
ÓØ!Ó!ØÓó0ð ð3àð3ð ð3ð &ð	3ð
 #ð3ð 
ò3ó ð3ð ðàðð ðð &ð	ð
 #ðð 
òó ðó
"ð ð/àð/ð &ð/ð #ð	/ð
 
Lò/ó ð/ðb ð1àð1ð 'ð1ð #ð	1ð
 
ò1ó ð1ð ð<àð<ð 'ð<ð #ð	<ð
 
ò<ó ð<ó"4ó 'ó!ó óóó&ð ò!ó ð!ó&ð ð!5Ø.ð!5Ø6Að!5à	ò!5ó ð!5óFó0%ð:4'Ø ð4'ð
ó4'ólóIó"ó"ó"ó"ó"ó"ó	"ó"ó"ó>ó7ó>ó7ó7ó>óQóQóBó(ó8ó	3ôr   r5   N)r   rJ   r   r   rL   z3tuple[PuiseuxRing, Unpack[tuple[PuiseuxPoly, ...]]])r6   r   rZ   úIterable[int]rL   r   )rZ   rH  r[   rH  rL   rC  )rV   Ú
__future__r   Úsympy.polys.domainsr   Úsympy.polys.ringsr   r   Úsympy.core.addr   Úsympy.core.mulr	   Úsympy.external.gmpyr
   r   Útypingr   r   r   Úsympy.core.exprr   r   Úcollections.abcr   r   r   r   r^   rc   rn   r5   rW   r   r   ú<module>rR     s{   ðñõ& #å "ß 3Ý Ý ß (õ !ñ ß"Ý$Ý*ß2ðØðØ'-ðà8ó÷(Y"ñ Y"óxGóGó8÷tò tr   