a
    khl                     @   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[eHdIdDdEZ\d%S )Jz*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r0| d S di  t|drH|jng }kr(fdd| D }jr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fr5   r5   N/var/www/auris/lib/python3.9/site-packages/sympy/polys/numberfields/minpoly.py
<listcomp>/       z"_choose_factor.<locals>.<listcomp>   
   symbolsc                    s   g | ]}|   iqS r5   )as_exprZxreplacer6   )vxr5   r9   r:   9   r;   c                    s   g | ]}|  qS r5   )nr6   )precr5   r9   r:   ;   r;   T)kZ
repetitionc                    s(   g | ] \}}t | |fqS r5   )abssubsrB   )r7   ir8   )pointsprec1r5   r9   r:   C   s   c                 s   s   | ]\}}|t v V  qd S N)r   )r7   rG   _r5   r5   r9   	<genexpr>H   r;   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)factorsrA   r@   domrC   boundr>   ZferB   srG   
candidatesZcanaixbrK   r5   )rH   rC   rI   r@   rA   r9   _choose_factor(   s2    


ra   c                 C   s   t dd t| D S )Nc                 s   sD   | ]<}t |D ],}|jp8|jo8|jjo8d |j jo8|jV  qqdS )rM   N)r   	make_argsis_Rationalis_Powbaser   
is_IntegerZis_extended_real)r7   tr8   r5   r5   r9   rL   Y   s   
z _is_sum_surds.<locals>.<genexpr>)allr   rb   )pr5   r5   r9   _is_sum_surdsX   s    rj   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 qqddlm} |||d  \}	}
}g }g }|D ]>\}}||
v rT|||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 rJ   )rd   r   r   Half)exprr5   r5   r9   is_sqrtx   s    z_separate_sq.<locals>.is_sqrtrM   T)binaryc                 S   s   | d S )Nr<   r5   )zr5   r5   r9   <lambda>   r;   z_separate_sq.<locals>.<lambda>)keyr<   c                 S   s   g | ]\}}|qS r5   r5   )r7   yro   r5   r5   r9   r:      r;   z _separate_sq.<locals>.<listcomp>r   )
_split_gcdN)argsis_Mulappendr   Oneis_Atomrd   r   
is_integerrX   r2   r   sortrS   rP   Zsympy.simplify.radsimprt   rk   r   r   )ri   rm   r^   rs   TFZsurdsrG   rt   gb1b2Za1Za2ro   p1p2r5   r5   r9   _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   rf   rj   r
   r   rF   r   coeffr%   	primitiver"   ra   )ri   rB   rA   Zpnr   rY   resultr5   r5   r9   _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_composerF   r   r   r,   r)   r'   composer?   r   _mulyrX   r$   r+   r*   Zas_expr_dictr%   r   r"   ra   )opex1ex2rA   rZ   mp1mp2rs   Rr   r   r   rK   rZmp1aZdeg1Zdeg2rY   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   rG   crB   rA   r5   r9   r:   +  r;   z_invertx.<locals>.<listcomp>r&   r%   termsr   )ri   rA   r   r^   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   rB   rA   rs   r5   r9   r:   6  r;   z_muly.<locals>.<listcomp>r   )ri   rA   rs   r   r^   r5   r   r9   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 does not seem to be an algebraic elementr   z
%s is zerorr   r<   r   r   )r   r   is_rationalr   ZeroDivisionErrorr   r   r   rF   Zas_numer_denomr   r$   r"   ra   r?   )expwrA   rZ   mprs   rB   dr   rK   rY   r5   r5   r9   _minpoly_pow:  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<   rM   Nr   )r   r   rA   rZ   r^   r   ri   Zpxr5   r5   r9   _minpoly_addo  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<   rM   Nr   )r   r   r   r5   r5   r9   _minpoly_mul{  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 )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   rG   r^   rB   rA   r5   r9   r:     r;   z _minpoly_sin.<locals>.<listcomp>r<   	   @      `      $   rM      c                    s    g | ]}|   |  qS r5   r5   r   r   r5   r9   r:     r;   r   N)ru   as_coeff_Mulr   r   qr   is_primer   r   r   rS   ri   r"   ra   r   r   rk   r   r   r   )	r   rA   r   r   r   rK   rY   r   rl   r5   r   r9   _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 )zu
    Returns the minimal polynomial of ``cos(ex)``
    see https://mathworld.wolfram.com/TrigonometryAngles.html
    r   r<         r   r   rM   r   r   c                    s    g | ]}|   |  qS r5   r5   r   r   r5   r9   r:     r;   z _minpoly_cos.<locals>.<listcomp>rr   r   N)ru   r   r   r   ri   r   r   r   r   r   rF   r   intr   r   rS   r   r"   ra   r   )	r   rA   r   r   r\   r   rK   rY   r   r5   r   r9   _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   rM   r<   r   N)ru   r   r   r   r   r   ri   rS   rw   r   r"   ra   r   )r   rA   r   r^   rB   r   rD   r   rK   rY   r   r5   r5   r9   _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<   rr   r   rM   r   r   r   r   r=   c                    s   g | ]}t | qS r5   r.   r   rA   r5   r9   r:      r;   z _minpoly_exp.<locals>.<listcomp>r   N)ru   r   r	   r   r   r   r   ri   r   rS   r   ra   r   )	r   rA   r   r^   r   r\   rG   rY   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   )rl   rF   Zpolyr   r"   ra   )r   rA   ri   rK   rY   r   r5   r5   r9   _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ju rt|d | d ||d\}}t|dkr|d | d S t||dt	d d |dS | tj
u rPt|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	rp| |jv rp||  S |jrt| r| }| |8 } t| }|| u rtt| d ||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 r0t,| |}nl| j*t-u rHt.| |}nT| j*t/u r`t0| |}n<| j*t)u rxt1| |}n$| j*t2u rt3| |}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

    rM   r<   r   r4   )rZ   r      !   r>   c                 S   s   | d j o| d j S )Nr   r<   )rc   )Zitxr5   r5   r9   rp   J  r;   z"_minpoly_compose.<locals>.<lambda>Tc                 S   s   g | ]\}}|| qS r5   r5   )r7   bxr   r5   r5   r9   r:   L  r;   z$_minpoly_compose.<locals>.<listcomp>FNc                 S   s   g | ]
}|j qS r5   )r   )r7   rs   r5   r5   r9   r:   N  r;   c                    s$   g | ]\}}||j   |j  qS r5   )ri   r   )r7   re   rs   Zlcmdensr5   r9   r:   R  r;   )r   r   r   )5rc   r   ri   r	   r"   rP   r   ZGoldenRatiora   r   ZTribonacciConstantr   rQ   r>   is_QQrj   r   is_Addr   ru   rv   r   rY   r2   itemsr   r   dictvaluesr   r(   ZNegativeOnepopZZerominimal_polynomialr
   r   r   rd   r   re   r   	__class__r   r   r   r   r   r   r   r-   r   r   )r   rA   rZ   rK   rY   Zfacr@   r   r   r8   r   Zr1ZdensZneg1Zexpn1numsr   r   r   r5   r   r9   r     st     
&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)	recursiveFNrA   r>   z5the variable %s is an element of the ground domain %sr<   )fieldz!groebner method only works for QQ)r   rR   r   r   is_AlgebraicNumberr   r   r    Zfree_symbolsr   r   listrQ   r>   r   r   r   r   r%   Zis_negativer   Zcollectr   rX   _minpoly_groebner)	r   rA   r   polysr   rl   clsr   r   r5   r5   r9   r   p  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

    r^   )r   Nc                    s<   t  }|| < |d ur*|| | | < n||| < |S rJ   )nextr?   )r   r   re   r^   )	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 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.

        rM   r<   c                    s   g | ]} |qS r5   r5   r7   r~   bottom_up_scanr5   r9   r:     r;   z=_minpoly_groebner.<locals>.bottom_up_scan.<locals>.<listcomp>c                    s   g | ]} |qS r5   r5   r   r   r5   r9   r:     r;   r   rr   z*%s does not seem to be an algebraic numberN)ry   r   ZImaginaryUnitrc   r   r   ru   rv   r   rd   r   r   re   r!   r?   rF   expandrf   ri   r
   r   r   minpoly_of_elementr   )r   Zminpoly_baseZinverseZbase_invre   r   rl   )r   r   r   r>   r   rA   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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)rd   r   rz   re   r   rv   ru   )r   hitri   r5   r5   r9   simpler_inverse4  s    
z*_minpoly_groebner.<locals>.simpler_inverseFrr   r<   lex)orderr   )N)r0   r   r   r   r   r?   rc   r   ri   rd   r   rf   r   re   rj   r   rx   r   r   r#   r"   ra   r   r   r%   r   )r   rA   r   r   invertedr   r   rB   Zbusr}   GrK   rY   r5   )r   r   r   r   r>   r   rA   r9   r     sB    
J



r   c                 C   s   t | ||||dS )z6This is a synonym for :py:func:`~.minimal_polynomial`.)rA   r   r   r   )r   )r   rA   r   r   r   r5   r5   r9   minpolyo  s    r   )NN)N)NTFN)NTFN)]__doc__	functoolsr   Zsympy.core.addr   Zsympy.core.exprtoolsr   Zsympy.core.functionr   r   r   Zsympy.core.mulr   Zsympy.core.numbersr	   r
   r   r   Zsympy.core.singletonr   Zsympy.core.symbolr   Zsympy.core.sympifyr   Zsympy.core.traversalr   Z&sympy.functions.elementary.exponentialr   Z(sympy.functions.elementary.miscellaneousr   r   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*   Zsympy.polys.ring_seriesr+   Zsympy.polys.ringsr,   Zsympy.polys.rootoftoolsr-   Zsympy.polys.specialpolysr/   Zsympy.utilitiesr0   r1   r2   ra   rj   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&$]\ #