a
    <bk                     @   sh  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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 ddl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"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/m0Z0m1Z1 ddl2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z< ddl=m>Z>m?Z?m@Z@ ddlAmBZB ddlCmDZD ddlEmFZF ddlGmHZH ddlImJZJ ddlKmLZL ddlMmNZNmOZOmPZP e+dd fd!d"ZQd#d$ ZRd%d& ZSdHd(d)ZTd*d+ ZUd,d- ZVdId.d/ZWd0d1 ZXd2d3 ZYd4d5 ZZd6d7 Z[d8d9 Z\d:d; Z]d<d= Z^d>d? Z_eOdJdBdCZ`dDdE ZaeOdKdFdGZbd'S )Lz*Minimal polynomials for algebraic numbers.    )reduce)Add)
expand_mulexpand_multinomial)Mul)GoldenRatioTribonacciConstant)IRationalpi)S)Dummy)sympify)sqrtcbrt)Factors)_mexpand)preorder_traversal)exp)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illegal)rs_compose_add)ring)CRootOfcyclotomic_poly)
_split_gcd)_is_sum_surds)numbered_symbolspublicsift      c                    s6  t | d trdd | D } t| dkr0| d S di  t|drH|jng }|kr&||jsb|n|ifdd| D }tt|t|dd	D ]}t	||D ]\}	}
|
 |	< q fd
dt
|D }tdd |D rqt|}|dd \\}}\}}||d kr| |   S qd9 qLtd| dS )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fr9   r9   p/Users/vegardjervell/Documents/master/model/venv/lib/python3.9/site-packages/sympy/polys/numberfields/minpoly.py
<listcomp>5       z"_choose_factor.<locals>.<listcomp>   
   symbolsc                    s   g | ]}|   qS r9   )as_exprZxreplacer:   )xvr9   r=   r>   @   r?   T)kZ
repetitionc                    s(   g | ] \}}t | |fqS r9   )abssubsn)r;   ir<   )pointsprec1r9   r=   r>   H   s   c                 s   s   | ]\}}|t v V  qd S N)r,   )r;   rI   _r9   r9   r=   	<genexpr>M   r?   z!_choose_factor.<locals>.<genexpr>N   i@B z4multiple candidates for the minimal polynomial of %s)
isinstancetuplelenhasattrrB   	is_numberrH   r   rangezip	enumerateanysortedNotImplementedError)factorsxvdomprecboundrB   ZferH   srI   
candidatesZcanaixbrM   r9   )rJ   rK   rD   r=   _choose_factor.   s0    


rf   c                 C   s  dd }g }| j D ]}|jsx||r:|tj|d f q|jrR||tjf q|jrr|jjrr||tjf qt	qt
|j |dd\}}|t| t| d f q|jdd d |d	 d
 tju r| S dd |D }tt|D ]}|| d
kr qqt||d  \}}	}
g }g }|D ]>\}}||	v rH|||tj   n|||tj   q t| }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 rL   )is_Powr   r   Half)exprr9   r9   r=   is_sqrtx   s    z_separate_sq.<locals>.is_sqrtrO   T)binaryc                 S   s   | d S )Nr@   r9   )zr9   r9   r=   <lambda>   r?   z_separate_sq.<locals>.<lambda>)keyr@   c                 S   s   g | ]\}}|qS r9   r9   )r;   yrl   r9   r9   r=   r>      r?   z _separate_sq.<locals>.<listcomp>N)argsis_Mulappendr   Oneis_Atomrg   r   
is_integerrZ   r6   r   sortrU   rR   r2   rh   r   r   )prj   rc   rp   TFZsurdsrI   gb1b2Za1Za2rl   p1p2r9   r9   r=   _separate_sq^   s>    

r   c                 C   s   t | } t |}|jr&|dkr&t| s*dS | td| }| |8 } t| }|| u rf|||| i} qlq@|} q@|dkrt| }| ||| dk r|  } | 	 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_Integerr3   r
   r   rG   r    coeffr&   	primitiver#   rf   )rx   rH   r\   Zpnr~   r[   resultr9   r9   r=   _minimal_polynomial_sq   s(    r   Nc                 C   sz  t t|}|du r t|||}|du r6t|||}n|||i}| tu r|tkrtdt\}}	|t|d }
|t|d }qt||| f||\\}
}}|
	|}|
 }n| tu rt|||}ntd| tu s|tkrt||||gd}nt|
|}t| |}t||}t||}| tu r6|dks@|dkrD|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_composerG   r   r   r.   r*   r(   composerC   r   _mulyrZ   r%   r-   r+   Zas_expr_dictr&   r    r#   rf   )opex1ex2r\   r^   mp1mp2rp   Rr   r~   r   rM   rZmp1aZdeg1Zdeg2r[   resr9   r9   r=   _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 r9   r9   r;   rI   crH   r\   r9   r=   r>   *  r?   z_invertx.<locals>.<listcomp>r'   r&   termsr   )rx   r\   r~   rc   r9   r   r=   _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 r9   r9   r   rH   r\   rp   r9   r=   r>   5  r?   z_muly.<locals>.<listcomp>r   )rx   r\   rp   r~   rc   r9   r   r=   r   .  s    r   c                 C   s   t |}|st| ||}|js*td|  |dk rj||krFt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 doesn't seem to be an algebraic elementr   z
%s is zeroro   r@   r   r   )r   r   is_rationalr   ZeroDivisionErrorr   r   r   rG   Zas_numer_denomr    r%   r#   rf   rC   )expwr\   r^   mprp   rH   dr   rM   r[   r9   r9   r=   _minpoly_pow9  s(    
&r   c              	   G   sZ   t t|d |d | |}|d |d  }|dd D ] }t t||| ||d}|| }q4|S )z.
    returns ``minpoly(Add(*a), dom, x)``
    r   r@   rO   Nr   )r   r   r\   r^   rc   r   rx   Zpxr9   r9   r=   _minpoly_addn  s    
r   c              	   G   sZ   t t|d |d | |}|d |d  }|dd D ] }t t||| ||d}|| }q4|S )z.
    returns ``minpoly(Mul(*a), dom, x)``
    r   r@   rO   Nr   )r   r   r   r9   r9   r=   _minpoly_mulz  s    
r   c           	         s0  | j d  \}  tu r |jr |jt}|jr`tt t	 fddt
D  S |jdkr|dkrdd  dd	   d
d   d S d dkrtt  fddt
d D  t	  }t|\}}t|| }|S dtd| t  d tj }t|t}|S td|  dS )zt
    Returns the minimal polynomial of ``sin(ex)``
    see http://mathworld.wolfram.com/TrigonometryAngles.html
    r   c                    s$   g | ]}| d    |  qS )r@   r9   r;   rI   rc   rH   r\   r9   r=   r>     r?   z _minpoly_sin.<locals>.<listcomp>r@   	   @      `      $   rO      c                    s    g | ]}|   |  qS r9   r9   r   r   r9   r=   r>     r?   r   N)rq   as_coeff_Mulr   r   qr   is_primer   r   r   rU   rx   r#   rf   r   r   rh   r   r   r   )	r   r\   r   r   r   rM   r[   r   ri   r9   r   r=   _minpoly_sin  s,    


(
r   c           	         s2  | 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rdd  d	  d S nB|jdkrt|j}|jrt| }t	|
td d iS t|jtt  fd
dtd D  t  d|j  }t|\}}t|| }|S td|  dS )zt
    Returns the minimal polynomial of ``cos(ex)``
    see http://mathworld.wolfram.com/TrigonometryAngles.html
    r   r@         r   r   rO   r   r   c                    s    g | ]}|   |  qS r9   r9   r   r   r9   r=   r>     r?   z _minpoly_cos.<locals>.<listcomp>ro   r   N)rq   r   r   r   rx   r   r   r   r   r   rG   r   intr   r   rU   r   r#   rf   r   )	r   r\   r   r   ra   r   rM   r[   r   r9   r   r=   _minpoly_cos  s*    


$





r   c                 C   s   | j d  \}}|tu r|jr|d }t|j}|jd dkrD|nd}g }t|jd d |d dD ]@}||||   ||| d  ||   |d |d   }qft	| }t
|\}}	t|	|| }
|
S td|  dS )zk
    Returns the minimal polynomial of ``tan(ex)``
    see https://github.com/sympy/sympy/issues/21430
    r   rO   r@   r   N)rq   r   r   r   r   r   rx   rU   rs   r   r#   rf   r   )r   r\   r   rc   rH   r   rE   r   rM   r[   r   r9   r9   r=   _minpoly_tan  s    
,r   c           	         s`  | j d  \}}|tt krP|jrDt|j}|jdksH|jdkr|dkr` d   d S |dkrt d d S |dkr d  d  d S |dkr d d S |d	kr d  d  d S |d
kr d  d   d   d  d S |jrd}t	|D ]}|  | 7 }q |S  fddt
d| D }t| | }|S td|  td|  dS )z7
    Returns the minimal polynomial of ``exp(ex)``
    r   r@   ro   r   rO   r   r   r   r   rA   c                    s   g | ]}t | qS r9   r0   r   r\   r9   r=   r>     r?   z _minpoly_exp.<locals>.<listcomp>r   N)rq   r   r	   r   r   r   r   rx   r   rU   r   rf   r   )	r   r\   r   rc   r   ra   rI   r[   r   r9   r   r=   _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   )ri   rG   Zpolyr   r#   rf   )r   r\   rx   rM   r[   r   r9   r9   r=   _minpoly_rootof  s
    r   c              	      s  | j r| j| | j S | tu rXt|d d ||d\}}t|dkrP|d d S |t S | tu rt|d | d ||d\}}t|dkr|d | d S t||dtd d |dS | t	u rLt|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	rl| |jv rl||  S |jrt| r| |8 } t| }|| u r| S |} q| jrt||g| jR  }n| jrt| j}t| d
d }	|	d r|tkrt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}nt%||g| jR  }n| j&r t'| j(| j)||}n| j*t+u rt,| |}nl| j*t-u r0t.| |}nT| j*t/u rHt0| |}n<| j*t)u r`t1| |}n$| j*t2u rxt3| |}nt4d|  |S )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

    rO   r@   r   r8   )r^   r      !   rB   c                 S   s   | d j o| d j S )Nr   r@   )is_Rational)Zitxr9   r9   r=   rm   H  r?   z"_minpoly_compose.<locals>.<lambda>Tc                 S   s   g | ]\}}|| qS r9   r9   )r;   bxr   r9   r9   r=   r>   J  r?   z$_minpoly_compose.<locals>.<listcomp>FNc                 S   s   g | ]
}|j qS r9   )r   )r;   rp   r9   r9   r=   r>   L  r?   c                    s$   g | ]\}}||j   |j  qS r9   )rx   r   )r;   baserp   Zlcmdensr9   r=   r>   P  r?   )r   r   r   )5r   r   rx   r	   r#   rR   r   rf   r   r   r   rS   rB   is_QQr3   r   is_Addr   rq   rr   r   r[   r6   itemsr   r   dictvaluesr   r)   r   ZNegativeOnepopZZerominimal_polynomialr
   r   r   rg   r   r   r   	__class__r   r   r   r   r   r   r   r/   r   r   )r   r\   r^   rM   r[   Zfacr   r   r<   r   Zr1ZdensZneg1Zexpn1numsr   r   r   r9   r   r=   r     sr     
&0


 r   TFc           	      C   s8  t | } | jrt| dd} t| D ]}|jr"d} q6q"|durNt |t }}ntdt }}|s|| jrxt	t
t| j}nt
}t|dr||jv rtd||f | rt| ||}| d }||t|| }|jrt| }|r|||dd	S ||S |jst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)	recursiveFNr\   rB   z5the variable %s is an element of the ground domain %sr@   )fieldz!groebner method only works for QQ)r   rT   r   r   is_AlgebraicNumberr    r   r!   Zfree_symbolsr   r   listrS   rB   r   r   r   r   r&   Zis_negativer   Zcollectr   rZ   _minpoly_groebner)	r   r\   r   polysr   ri   clsr   r   r9   r9   r=   r   n  s:    7
r   c                    s|  t dtdi i  dfdd	 fdd dd	 }d
}t| } | jrf|  S | jr~| j | j }n|| }|r| d } d}| j	rd| j
 jrd| j
 }t| j|}nt| rt| tj}|dur|}|du rD | }| gt  }	t|	t g dd}
t|
d \}}t|| }|rxt|}|t| dk rxt| }|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*|| | | < n||| < |S rL   )nextrC   )r   r   r   rc   )	generatormappingrB   r9   r=   update_mapping  s    z)_minpoly_groebner.<locals>.update_mappingc                    s  | j r<| tju r.| vr$| ddS |  S n
| jr8| S nP| jrZt fdd| jD  S | jrxt fdd| jD  S | j	rd| j
jr| j
dk rt| j}t| }|| j }| j
dkrԈ |S || j
  } | j
js| j| j
j  td| j
j }}n| j| j
 }} |}|| }|vrZ|jrF| S |d| | S n| S n(| jr| vr| |  S |  S td|  d	S )
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.

        rO   r@   c                    s   g | ]} |qS r9   r9   r;   r{   bottom_up_scanr9   r=   r>     r?   z=_minpoly_groebner.<locals>.bottom_up_scan.<locals>.<listcomp>c                    s   g | ]} |qS r9   r9   r   r   r9   r=   r>     r?   r   ro   z)%s doesn't seem to be an algebraic numberN)ru   r   ZImaginaryUnitr   r   r   rq   rr   r   rg   r   r   r   r"   rC   rG   expandr   rx   r
   r   r   minpoly_of_elementr   )r   Zminpoly_baseZinverseZbase_invr   r   ri   )r   r   r   rB   r   r\   r9   r=   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rpd}| jD ].}|jrH dS |j r8|jjr8|jdkr8 dS q8|rpdS dS )z
        Returns True if it is more likely that the minimal polynomial
        algorithm works better with the inverse
        r@   r   TF)rg   r   rv   r   r   rr   rq   )r   hitrx   r9   r9   r=   simpler_inverse2  s    
z*_minpoly_groebner.<locals>.simpler_inverseFro   r@   lex)orderr   )N)r4   r   r   r   r   rC   r   r   rx   rg   r   r   r   r   r3   r   rt   r   r   r$   r#   rf   r   r   r&   r   )r   r\   r   r   invertedr   r   rH   Zbusrz   GrM   r[   r9   )r   r   r   r   rB   r   r\   r=   r     sB    
J



r   c                 C   s   t | ||||dS )z6This is a synonym for :py:func:`~.minimal_polynomial`.)r\   r   r   r   )r   )r   r\   r   r   r   r9   r9   r=   minpolym  s    r   )NN)N)NTFN)NTFN)c__doc__	functoolsr   Zsympy.core.addr   Zsympy.core.functionr   r   Zsympy.core.mulr   Z
sympy.corer   r   Zsympy.core.numbersr	   r
   r   Zsympy.core.singletonr   Zsympy.core.symbolr   Zsympy.core.sympifyr   Zsympy.functionsr   r   Zsympy.core.exprtoolsr   r   Zsympy.core.traversalr   Z&sympy.functions.elementary.exponentialr   Z(sympy.functions.elementary.trigonometricr   r   r   Zsympy.ntheory.factor_r   Zsympy.utilities.iterablesr   Zsympy.polys.domainsr   r   r   Zsympy.polys.orthopolysr   Zsympy.polys.polyerrorsr   r   Zsympy.polys.polytoolsr    r!   r"   r#   r$   r%   r&   r'   r(   r)   Zsympy.polys.polyutilsr*   r+   r,   Zsympy.polys.ring_seriesr-   Zsympy.polys.ringsr.   Zsympy.polys.rootoftoolsr/   Zsympy.polys.specialpolysr1   Zsympy.simplify.radsimpr2   Zsympy.simplify.simplifyr3   Zsympy.utilitiesr4   r5   r6   rf   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r9   r9   r9   r=   <module>   sd   00@6
O
5&$\\ #