o
    ohDl                     @   s@  d Z ddlmZ ddlmZ ddlmZ ddlmZm	Z	m
Z
 ddlmZ ddlmZmZmZmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZmZ ddlm Z m!Z!m"Z" ddl#m$Z$ ddl%m&Z& ddl'm(Z(m)Z)m*Z* ddl+m,Z, ddl-m.Z.m/Z/ ddl0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z: ddl;m<Z<m=Z= ddl>m?Z? ddl@mAZA ddlBmCZC ddlDmEZE ddlFmGZGmHZHmIZI e)ddfddZJdd  ZKd!d" ZLd#d$ ZMdFd&d'ZNd(d) ZOd*d+ ZPdGd,d-ZQd.d/ ZRd0d1 ZSd2d3 ZTd4d5 ZUd6d7 ZVd8d9 ZWd:d; ZXd<d= ZYeHdHd@dAZZdBdC Z[eHdHdDdEZ\d%S )Iz*Minimal polynomials for algebraic numbers.    )reduce)Add)Factors)
expand_mulexpand_multinomial_mexpand)Mul)IRationalpi_illegal)S)Dummy)sympify)preorder_traversal)exp)sqrtcbrt)cossintan)divisors)subsets)ZZQQFractionField)dup_chebyshevt)NotAlgebraicGeneratorsError)
PolyPurePolyinvertfactor_listgroebner	resultantdegreepoly_from_exprparallel_poly_from_exprlcm)dict_from_exprexpr_from_dict)rs_compose_add)ring)CRootOfcyclotomic_poly)numbered_symbolspublicsift      c                    s8  t | d trdd | D } t| dkr| d S di  t|dr$|jng }krfdd| D }jr@fdd|D }tt|t|d	d
D ]B}t||D ]\}	}
|
 |	< qR fddt	|D }t
dd |D rqqKt|}|dd \\}}\}}||d kr| |   S qKd9 ks*td )ze
    Return a factor having root ``v``
    It is assumed that one of the factors has root ``v``.
    r   c                 S   s   g | ]}|d  qS )r    .0fr5   r5   t/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/sympy/polys/numberfields/minpoly.py
<listcomp>/       z"_choose_factor.<locals>.<listcomp>   
   symbolsc                    s   g | ]}|   iqS r5   )as_exprxreplacer6   )vxr5   r9   r:   9   s    c                    s   g | ]}|  qS r5   )nr6   )precr5   r9   r:   ;       T)k
repetitionc                    s(   g | ]\}}t | |fqS r5   )abssubsrC   )r7   ir8   )pointsprec1r5   r9   r:   C   s    c                 s   s    | ]	\}}|t v V  qd S N)r   )r7   rJ   _r5   r5   r9   	<genexpr>H   s    z!_choose_factor.<locals>.<genexpr>N   i@B z4multiple candidates for the minimal polynomial of %s)
isinstancetuplelenhasattrr>   	is_numberr   rangezip	enumerateanysortedNotImplementedError)factorsrB   rA   domrD   boundr>   ferC   srJ   
candidatescanaixbrN   r5   )rK   rD   rL   rA   rB   r9   _choose_factor(   s6   
rf   c                 C   s6   | j r| jn| g}|D ]}|d jr|js dS qdS )NrP   FT)is_Addargsis_Rationalis_extended_real)prh   yr5   r5   r9   _is_sum_surdsX   s   rm   c                 C   s  dd }g }| j D ]I}|js;||r|tj|d f q	|jr)||tjf q	|jr9|jjr9||tjf q	t	t
|j |dd\}}|t| t| d f q	|jdd d |d	 d
 tju rf| S dd |D }tt|D ]
}|| d
kr} nqsddlm} |||d  \}	}
}g }g }|D ]\}}||
v r|||tj   q|||tj   qt| }t| }t|d t|d  } | S )a?  
    helper function for ``_minimal_polynomial_sq``

    It selects a rational ``g`` such that the polynomial ``p``
    consists of a sum of terms whose surds squared have gcd equal to ``g``
    and a sum of terms with surds squared prime with ``g``;
    then it takes the field norm to eliminate ``sqrt(g)``

    See simplify.simplify.split_surds and polytools.sqf_norm.

    Examples
    ========

    >>> from sympy import sqrt
    >>> from sympy.abc import x
    >>> from sympy.polys.numberfields.minpoly import _separate_sq
    >>> p= -x + sqrt(2) + sqrt(3) + sqrt(7)
    >>> p = _separate_sq(p); p
    -x**2 + 2*sqrt(3)*x + 2*sqrt(7)*x - 2*sqrt(21) - 8
    >>> p = _separate_sq(p); p
    -x**4 + 4*sqrt(7)*x**3 - 32*x**2 + 8*sqrt(7)*x + 20
    >>> p = _separate_sq(p); p
    -x**8 + 48*x**6 - 536*x**4 + 1728*x**2 - 400

    c                 S   s   | j o| jtju S rM   )is_Powr   r   Half)exprr5   r5   r9   is_sqrtz   s   z_separate_sq.<locals>.is_sqrtrP   T)binaryc                 S   s   | d S )Nr<   r5   )zr5   r5   r9   <lambda>   s    z_separate_sq.<locals>.<lambda>)keyr<   c                 S   s   g | ]\}}|qS r5   r5   )r7   rl   rs   r5   r5   r9   r:      r;   z _separate_sq.<locals>.<listcomp>r   )
_split_gcdN)rh   is_Mulappendr   Oneis_Atomrn   r   
is_integerr[   r2   r   sortrV   rS   sympy.simplify.radsimprw   ro   r   r   )rk   rq   rc   rl   TFsurdsrJ   rw   gb1b2a1a2rs   p1p2r5   r5   r9   _separate_sq`   sB   
r   c                 C   s   t | } t |}|jr|dkrt| sdS | td| }| |8 } 	 t| }|| u r3|||| i} n|} q!|dkrUt| }| ||| dk rM|  } | 	 d } | S t
| d }t|||}|S )a  
    Returns the minimal polynomial for the ``nth-root`` of a sum of surds
    or ``None`` if it fails.

    Parameters
    ==========

    p : sum of surds
    n : positive integer
    x : variable of the returned polynomial

    Examples
    ========

    >>> from sympy.polys.numberfields.minpoly import _minimal_polynomial_sq
    >>> from sympy import sqrt
    >>> from sympy.abc import x
    >>> q = 1 + sqrt(2) + sqrt(3)
    >>> _minimal_polynomial_sq(q, 3, x)
    x**12 - 4*x**9 - 4*x**6 + 16*x**3 - 8

    r   Nr<   )r   
is_Integerrm   r
   r   rI   r   coeffr%   	primitiver"   rf   )rk   rC   rB   pnr   r\   resultr5   r5   r9   _minimal_polynomial_sq   s,   r   Nc                 C   st  t t|}|du rt|||}|du rt|||}n|||i}| tu rZ|tkrBtdt\}}	|t|d }
|t|d }n't||| f||\\}
}}|
	|}|
 }n| tu ret|||}ntd| tu sq|tkr{t||||gd}nt|
|}t| |}t||}t||}| tu r|dks|dkr|S t|||d}| \}}t||| |||}|
 S )a  
    return the minimal polynomial for ``op(ex1, ex2)``

    Parameters
    ==========

    op : operation ``Add`` or ``Mul``
    ex1, ex2 : expressions for the algebraic elements
    x : indeterminate of the polynomials
    dom: ground domain
    mp1, mp2 : minimal polynomials for ``ex1`` and ``ex2`` or None

    Examples
    ========

    >>> from sympy import sqrt, Add, Mul, QQ
    >>> from sympy.polys.numberfields.minpoly import _minpoly_op_algebraic_element
    >>> from sympy.abc import x, y
    >>> p1 = sqrt(sqrt(2) + 1)
    >>> p2 = sqrt(sqrt(2) - 1)
    >>> _minpoly_op_algebraic_element(Mul, p1, p2, x, QQ)
    x - 1
    >>> q1 = sqrt(y)
    >>> q2 = 1 / y
    >>> _minpoly_op_algebraic_element(Add, q1, q2, x, QQ.frac_field(y))
    x**2*y**2 - 2*x*y - y**3 + 1

    References
    ==========

    .. [1] https://en.wikipedia.org/wiki/Resultant
    .. [2] I.M. Isaacs, Proc. Amer. Math. Soc. 25 (1970), 638
           "Degrees of sums in a separable field extension".

    NXr   zoption not availablegensr<   domain)r   str_minpoly_composerI   r   r   r,   r)   r'   composer?   r   _mulyr[   r$   r+   r*   as_expr_dictr%   r   r"   rf   )opex1ex2rB   r]   mp1mp2rl   Rr   r   r   rN   rmp1adeg1deg2r\   resr5   r5   r9   _minpoly_op_algebraic_element   s:   $




r   c                    s6   t | d }t|  fdd| D }t| S )z@
    Returns ``expand_mul(x**degree(p, x)*p.subs(x, 1/x))``
    r   c                    s"   g | ]\\}}| |   qS r5   r5   r7   rJ   crC   rB   r5   r9   r:   -  s   " z_invertx.<locals>.<listcomp>r&   r%   termsr   )rk   rB   r   rc   r5   r   r9   _invertx&  s   r   c                    s8   t | d }t|  fdd| D }t| S )z8
    Returns ``_mexpand(y**deg*p.subs({x:x / y}))``
    r   c                    s*   g | ]\\}}||   |   qS r5   r5   r   rC   rB   rl   r5   r9   r:   8  s   * z_muly.<locals>.<listcomp>r   )rk   rB   rl   r   rc   r5   r   r9   r   1  s   r   c                 C   s   t |}|st| ||}|jstd|  |dk r5||kr#td|  t||}|dkr.|S | }d|  } tt|}|||i}|	 \}}t
t||| ||  |gd||d}| \}	}
t|
|| | |}| S )a  
    Returns ``minpoly(ex**pw, x)``

    Parameters
    ==========

    ex : algebraic element
    pw : rational number
    x : indeterminate of the polynomial
    dom: ground domain
    mp : minimal polynomial of ``p``

    Examples
    ========

    >>> from sympy import sqrt, QQ, Rational
    >>> from sympy.polys.numberfields.minpoly import _minpoly_pow, minpoly
    >>> from sympy.abc import x, y
    >>> p = sqrt(1 + sqrt(2))
    >>> _minpoly_pow(p, 2, x, QQ)
    x**2 - 2*x - 1
    >>> minpoly(p**2, x)
    x**2 - 2*x - 1
    >>> _minpoly_pow(y, Rational(1, 3), x, QQ.frac_field(y))
    x**3 - y
    >>> minpoly(y**Rational(1, 3), x)
    x**3 - y

    +%s does not seem to be an algebraic elementr   z
%s is zerorv   r<   r   r   )r   r   is_rationalr   ZeroDivisionErrorr   r   r   rI   as_numer_denomr   r$   r"   rf   r?   )expwrB   r]   mprl   rC   dr   rN   r\   r5   r5   r9   _minpoly_pow<  s(   
&r   c              	   G   sZ   t t|d |d | |}|d |d  }|dd D ]}t t||| ||d}|| }q|S )z.
    returns ``minpoly(Add(*a), dom, x)``
    r   r<   rP   Nr   )r   r   rB   r]   rc   r   rk   pxr5   r5   r9   _minpoly_addq     
r   c              	   G   sZ   t t|d |d | |}|d |d  }|dd D ]}t t||| ||d}|| }q|S )z.
    returns ``minpoly(Mul(*a), dom, x)``
    r   r<   rP   Nr   )r   r   r   r5   r5   r9   _minpoly_mul}  r   r   c           	         s(  | j d  \}  tu r|jr|jt}|jr.tt t	 fddt
D  S |jdkrK|dkrKdd  dd	   d
d   d S d dkrwtt  fddt
d D  t	  }t|\}}t|| }|S dtd| t  d tj }t|t}|S td|  )zu
    Returns the minimal polynomial of ``sin(ex)``
    see https://mathworld.wolfram.com/TrigonometryAngles.html
    r   c                    s$   g | ]}| d    |  qS )r<   r5   r7   rJ   rc   rC   rB   r5   r9   r:        $ z _minpoly_sin.<locals>.<listcomp>r<   	   @      `      $   rP      c                        g | ]}|   |  qS r5   r5   r   r   r5   r9   r:          r   )rh   as_coeff_Mulr   r   qr   is_primer   r   r   rV   rk   r"   rf   r   r   ro   r   r   r   )	r   rB   r   r   r   rN   r\   r   rp   r5   r   r9   _minpoly_sin  s,   

(
r   c           	         s*  | j d  \}  tu r|jr|jdkr>|jdkr,dd  dd   d  d S |jdkr=dd  d	  d S n!|jdkr_t|j}|jr_t| }t	|
td d iS t|jtt  fd
dtd D  t  d|j  }t|\}}t|| }|S td|  )zu
    Returns the minimal polynomial of ``cos(ex)``
    see https://mathworld.wolfram.com/TrigonometryAngles.html
    r   r<         r   r   rP   r   r   c                    r   r5   r5   r   r   r5   r9   r:     r   z _minpoly_cos.<locals>.<listcomp>rv   r   )rh   r   r   r   rk   r   r   r   r   r   rI   r   intr   r   rV   r   r"   rf   r   )	r   rB   r   r   r`   r   rN   r\   r   r5   r   r9   _minpoly_cos  s,   

$





r   c                 C   s   | j d  \}}|tu rf|jrf|d }t|j}|jd dkr"|nd}g }t|jd d |d dD ] }||||   ||| d  ||   |d |d   }q3t	| }t
|\}}	t|	|| }
|
S td|  )zk
    Returns the minimal polynomial of ``tan(ex)``
    see https://github.com/sympy/sympy/issues/21430
    r   rP   r<   r   )rh   r   r   r   r   r   rk   rV   ry   r   r"   rf   r   )r   rB   r   rc   rC   r   rF   r   rN   r\   r   r5   r5   r9   _minpoly_tan  s   
,r   c           	         sR  | j d  \}}|tt kr|jrt|j}|jdks!|jdkr|dkr- d   d S |dkr7 d d S |dkrE d  d  d S |dkrO d d S |d	kr] d  d  d S |d
krs d  d   d   d  d S |jrd}t	|D ]	}|  | 7 }q||S  fddt
d| D }t| | }|S td|  td|  )z7
    Returns the minimal polynomial of ``exp(ex)``
    r   r<   rv   r   rP   r   r   r   r   r=   c                    s   g | ]}t | qS r5   r.   r   rB   r5   r9   r:     rE   z _minpoly_exp.<locals>.<listcomp>r   )rh   r   r	   r   r   r   r   rk   r   rV   r   rf   r   )	r   rB   r   rc   r   r`   rJ   r\   r   r5   r   r9   _minpoly_exp  s6   
$r   c                 C   s:   | j }|| jjd |i}t||\}}t||| }|S )zA
    Returns the minimal polynomial of a ``CRootOf`` object.
    r   )rp   rI   polyr   r"   rf   )r   rB   rk   rN   r\   r   r5   r5   r9   _minpoly_rootof
  s
   r   c              	      s  | j r| j| | j S | tu r,t|d d ||d\}}t|dkr(|d d S |t S | tju r\t|d | d ||d\}}t|dkrN|d | d S t||dt	d d |dS | tj
u rt|d |d  | d ||d\}}t|dkr|d |d  | d S dtddt	d   tddt	d   d }t||||dS t|d	r| |jv r||  S |jrt| r| |8 } 	 t| }|| u r| S |} q| jrt||g| jR  }|S | jrnt| j}t| d
d }	|	d rb|tkrbtdd |	d |	d  D  }t|	d }
dd |
 D }tt|d tj}|
 |tj!} fdd|
 D }t| }t"||}|j|   |j||     }|| |t#d   }t$t||||||d}|S t%||g| jR  }|S | j&r}t'| j(| j)||}|S | j*t+u rt,| |}|S | j*t-u rt.| |}|S | j*t/u rt0| |}|S | j*t)u rt1| |}|S | j*t2u rt3| |}|S t4d|  )a  
    Computes the minimal polynomial of an algebraic element
    using operations on minimal polynomials

    Examples
    ========

    >>> from sympy import minimal_polynomial, sqrt, Rational
    >>> from sympy.abc import x, y
    >>> minimal_polynomial(sqrt(2) + 3*Rational(1, 3), x, compose=True)
    x**2 - 2*x - 1
    >>> minimal_polynomial(sqrt(y) + 1/y, x, compose=True)
    x**2*y**2 - 2*x*y - y**3 + 1

    rP   r<   r   r4   )r]   r      !   r>   c                 S   s   | d j o	| d j S )Nr   r<   )ri   )itxr5   r5   r9   rt   K  r;   z"_minpoly_compose.<locals>.<lambda>Tc                 S   s   g | ]\}}|| qS r5   r5   )r7   bxr   r5   r5   r9   r:   M  s    z$_minpoly_compose.<locals>.<listcomp>FNc                 S   s   g | ]}|j qS r5   )r   )r7   rl   r5   r5   r9   r:   O  s    c                    s$   g | ]\}}||j   |j  qS r5   )rk   r   )r7   baserl   lcmdensr5   r9   r:   S  r   )r   r   r   )5ri   r   rk   r	   r"   rS   r   GoldenRatiorf   r   TribonacciConstantr   rT   r>   is_QQrm   r   rg   r   rh   rx   r   r\   r2   itemsr   r   dictvaluesr   r(   NegativeOnepopZerominimal_polynomialr
   r   r   rn   r   r   r   	__class__r   r   r   r   r   r   r   r-   r   r   )r   rB   r]   rN   r\   facr   r   r8   r   r1densneg1expn1numsr   r   r   r5   r   r9   r     s    

&0&

 

	


r   TFc           	      C   s2  t | } | jrt| dd} t| D ]	}|jrd} nq|dur't |t}}ntdt}}|s>| jr<t	t
t| j}nt
}t|drP||jv rPtd||f |r~t| ||}| d }||t|| }|jrpt| }|ry|||dd	S ||S |jstd
t| ||}|r|||dd	S ||S )a-  
    Computes the minimal polynomial of an algebraic element.

    Parameters
    ==========

    ex : Expr
        Element or expression whose minimal polynomial is to be calculated.

    x : Symbol, optional
        Independent variable of the minimal polynomial

    compose : boolean, optional (default=True)
        Method to use for computing minimal polynomial. If ``compose=True``
        (default) then ``_minpoly_compose`` is used, if ``compose=False`` then
        groebner bases are used.

    polys : boolean, optional (default=False)
        If ``True`` returns a ``Poly`` object else an ``Expr`` object.

    domain : Domain, optional
        Ground domain

    Notes
    =====

    By default ``compose=True``, the minimal polynomial of the subexpressions of ``ex``
    are computed, then the arithmetic operations on them are performed using the resultant
    and factorization.
    If ``compose=False``, a bottom-up algorithm is used with ``groebner``.
    The default algorithm stalls less frequently.

    If no ground domain is given, it will be generated automatically from the expression.

    Examples
    ========

    >>> from sympy import minimal_polynomial, sqrt, solve, QQ
    >>> from sympy.abc import x, y

    >>> minimal_polynomial(sqrt(2), x)
    x**2 - 2
    >>> minimal_polynomial(sqrt(2), x, domain=QQ.algebraic_field(sqrt(2)))
    x - sqrt(2)
    >>> minimal_polynomial(sqrt(2) + sqrt(3), x)
    x**4 - 10*x**2 + 1
    >>> minimal_polynomial(solve(x**3 + x + 3)[0], x)
    x**3 + x + 3
    >>> minimal_polynomial(sqrt(y), x)
    x**2 - y

    T)	recursiveFNrB   r>   z5the variable %s is an element of the ground domain %sr<   )fieldz!groebner method only works for QQ)r   rU   r   r   is_AlgebraicNumberr   r   r    free_symbolsr   r   listrT   r>   r   r   r   r   r%   is_negativer   collectr   r[   _minpoly_groebner)	r   rB   r   polysr   rp   clsr   r   r5   r5   r9   r   q  s<   7
r   c                    sv  t dtdi i dfdd	 fdd dd	 }d
}t| } | jr3|  S | jr?| j | j }nb|| }|rI| d } d}| j	rad| j
 jrad| j
 }t| j|}nt| rlt| tj}|durr|}|du r | }| gt  }	t|	t g dd}
t|
d \}}t|| }|rt|}|t| dk rt| }|S )a/  
    Computes the minimal polynomial of an algebraic number
    using Groebner bases

    Examples
    ========

    >>> from sympy import minimal_polynomial, sqrt, Rational
    >>> from sympy.abc import x
    >>> minimal_polynomial(sqrt(2) + 3*Rational(1, 3), x, compose=False)
    x**2 - 2*x - 1

    rc   )r   Nc                    s>   t  }|| < |d ur|| | | < |S ||| < |S rM   )nextr?   )r   r   r   rc   )	generatormappingr>   r5   r9   update_mapping  s   z)_minpoly_groebner.<locals>.update_mappingc                    s  | j r| tju r| vr| ddS |  S | jr| S n| jr+t fdd| jD  S | jr:t fdd| jD  S | j	r| j
jr| j
dk rlt| j}t| }|| j }| j
dkrf |S || j
  } | j
js| j| j
j  td| j
j}}n| j| j
}} |}|| }|vr|jr| S |d| | S | S n| jr| vr| |  S |  S td|  )	a  
        Transform a given algebraic expression *ex* into a multivariate
        polynomial, by introducing fresh variables with defining equations.

        Explanation
        ===========

        The critical elements of the algebraic expression *ex* are root
        extractions, instances of :py:class:`~.AlgebraicNumber`, and negative
        powers.

        When we encounter a root extraction or an :py:class:`~.AlgebraicNumber`
        we replace this expression with a fresh variable ``a_i``, and record
        the defining polynomial for ``a_i``. For example, if ``a_0**(1/3)``
        occurs, we will replace it with ``a_1``, and record the new defining
        polynomial ``a_1**3 - a_0``.

        When we encounter a negative power we transform it into a positive
        power by algebraically inverting the base. This means computing the
        minimal polynomial in ``x`` for the base, inverting ``x`` modulo this
        poly (which generates a new polynomial) and then substituting the
        original base expression for ``x`` in this last polynomial.

        We return the transformed expression, and we record the defining
        equations for new symbols using the ``update_mapping()`` function.

        rP   r<   c                       g | ]} |qS r5   r5   r7   r   bottom_up_scanr5   r9   r:     r;   z=_minpoly_groebner.<locals>.bottom_up_scan.<locals>.<listcomp>c                    r   r5   r5   r   r   r5   r9   r:     r;   r   rv   z*%s does not seem to be an algebraic number)r{   r   ImaginaryUnitri   rg   r   rh   rx   r   rn   r   r   r   r!   r?   rI   expandr   rk   r
   r   r   minpoly_of_elementr   )r   minpoly_baseinversebase_invr   r   rp   )r   r   r   r>   r   rB   r5   r9   r     sL   


z)_minpoly_groebner.<locals>.bottom_up_scanc                 S   st   | j rd| j jr| jdk r| jjrdS | jr8d}| jD ]}|jr$ dS |j r3|jjr3|jdkr3 dS q|r8dS dS )z
        Returns True if it is more likely that the minimal polynomial
        algorithm works better with the inverse
        r<   r   TF)rn   r   r|   r   rg   rx   rh   )r   hitrk   r5   r5   r9   simpler_inverse5  s    
z*_minpoly_groebner.<locals>.simpler_inverseFrv   r<   lex)orderr   rM   )r0   r   r   r   r  r?   ri   r   rk   rn   r   r   r   r   rm   r   rz   r   r   r#   r"   rf   r   r   r%   r   )r   rB   r   r  invertedr   r   rC   busr   GrN   r\   r5   )r   r   r   r   r>   r   rB   r9   r     sB   
J


r   c                 C   s   t | ||||dS )z6This is a synonym for :py:func:`~.minimal_polynomial`.)rB   r   r   r   )r   )r   rB   r   r   r   r5   r5   r9   minpolyp  s   r  )NNrM   )NTFN)]__doc__	functoolsr   sympy.core.addr   sympy.core.exprtoolsr   sympy.core.functionr   r   r   sympy.core.mulr   sympy.core.numbersr	   r
   r   r   sympy.core.singletonr   sympy.core.symbolr   sympy.core.sympifyr   sympy.core.traversalr   &sympy.functions.elementary.exponentialr   (sympy.functions.elementary.miscellaneousr   r   (sympy.functions.elementary.trigonometricr   r   r   sympy.ntheory.factor_r   sympy.utilities.iterablesr   sympy.polys.domainsr   r   r   sympy.polys.orthopolysr   sympy.polys.polyerrorsr   r   sympy.polys.polytoolsr   r    r!   r"   r#   r$   r%   r&   r'   r(   sympy.polys.polyutilsr)   r*   sympy.polys.ring_seriesr+   sympy.polys.ringsr,   sympy.polys.rootoftoolsr-   sympy.polys.specialpolysr/   sympy.utilitiesr0   r1   r2   rf   rm   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r5   r5   r5   r9   <module>   s`    00A
6O
5&$\\ #