+
    ‹°³j¤M  ã                   ón  € R t ^ RIHtHtHtHtHtHtHtH	t	H
t
Ht ^ RIHtHtHtHtHtHtHtHtHtHtHtHt ^ RIHtHtHtHtHtHtH t H!t!H"t" ^ RI#H$t$H%t%H&t&H't'H(t(H)t) ^ RI*H+t+H,t, ^ RI-H.t.H/t/ R t0R t1R	 t2R
 t3R t4R t5R t6R t7R t8R t9R t:R t;RR lt<RR lt=RR lt>RR lt?RR lt@RR ltAR tBR tCR# )z8Square-free decomposition algorithms and related tools. )
Údup_negÚdmp_negÚdup_subÚdmp_subÚdup_mulÚdmp_mulÚdup_quoÚdmp_quoÚdup_mul_groundÚdmp_mul_ground)Ú	dup_stripÚdup_LCÚdmp_ground_LCÚ
dmp_zero_pÚ
dmp_groundÚ
dup_degreeÚ
dmp_degreeÚdmp_degree_inÚdmp_degree_listÚ	dmp_raiseÚ
dmp_injectÚdup_convert)	Údup_diffÚdmp_diffÚdmp_diff_inÚ	dup_shiftÚ	dmp_shiftÚ	dup_monicÚdmp_ground_monicÚdup_primitiveÚdmp_ground_primitive)Údup_inner_gcdÚdmp_inner_gcdÚdup_gcdÚdmp_gcdÚdmp_resultantÚdmp_primitive)Úgf_sqf_listÚgf_sqf_part)ÚMultivariatePolynomialErrorÚDomainErrorc                óN   € \        R V 4       4      pV\        V 4      8X  g   Q hR# )z=Sanity check the degrees of a computed factorization in K[x].c              3   óJ   "  € T F  w  rV\        V4      ,          x € K  	  R # 5i)N)r   )Ú.0ÚfacÚks   &  ÚX/home/luca/screen-checking/.venv/lib/python3.14/site-packages/sympy/polys/sqfreetools.pyÚ	<genexpr>Ú%_dup_check_degrees.<locals>.<genexpr>$   s   é € Ð9±&¡h sˆa”*˜S“/×!Ò!³&ùs   ‚!#N)Úsumr   )ÚfÚresultÚdegs   && r0   Ú_dup_check_degreesr7   "   s$   € ä
Ñ9±&Ó9Ó
9€CØ”*˜Q“-ÔÐÒó    c                óì   € ^ .V^,           ,          pV F;  w  rE\        WA4      p\        W64       UUu. uF  w  rxWuV,          ,           NK  	  pppK=  	  \        V4      \        W4      8X  g   Q hR# u uppi )z=Sanity check the degrees of a computed factorization in K[X].N)r   ÚzipÚtuple)	r4   Úur5   Údegsr.   r/   Údegs_facÚd1Úd2s	   &&&      r0   Ú_dmp_check_degreesrA   (   sl   € àˆ3�!�a•%�=€DÛ‰ˆÜ" 3Ó*ˆÜ*-¨dÔ*=Ô>Ñ*=¡ �˜•V—�Ñ*=ˆÑ>‰ñ ô �‹;œ/¨!Ó/Ô/Ð/Ò/ùó ?s   ²A0c           
     ób   € V '       g   R# \        \        V \        V ^V4      V4      4      '       * # )zÜ
Return ``True`` if ``f`` is a square-free polynomial in ``K[x]``.

Examples
========

>>> from sympy.polys import ring, ZZ
>>> R, x = ring("x", ZZ)

>>> R.dup_sqf_p(x**2 - 2*x + 1)
False
>>> R.dup_sqf_p(x**2 - 1)
True

T)r   r#   r   )r4   ÚKs   &&r0   Ú	dup_sqf_prD   1   s*   € ÷  Ùäœg a¬°!°Q¸Ó):¸AÓ>Ó?Ô?Ð?r8   c                óà   € \        W4      '       d   R# \        V^,           4       FD  p\        V ^W1V4      p\        WA4      '       d   K$  \        WW4      p\	        WSV4      ^ 8w  g   KC   R# 	  R# )zè
Return ``True`` if ``f`` is a square-free polynomial in ``K[X]``.

Examples
========

>>> from sympy.polys import ring, ZZ
>>> R, x,y = ring("x,y", ZZ)

>>> R.dmp_sqf_p(x**2 + 2*x*y + y**2)
False
>>> R.dmp_sqf_p(x**2 + y**2)
True

TF)r   Úranger   r$   r   )r4   r<   rC   ÚiÚfpÚgcds   &&&   r0   Ú	dmp_sqf_prJ   G   se   € ô  �!×ÒÙä�1�Q•3ŽZˆä˜˜A˜q QÓ'ˆä�b×ÒÙä�a˜QÓ"ˆä˜ Ó# qÖ(Úñ ñ r8   c                ór  € VP                   '       g   \        R4      h^ \        VP                  P	                  4       ^^ VP
                  4      r2 \        V ^ VRR7      w  rE\        W4^VP
                  4      p\        WaP
                  4      '       d   M!\        WP                  ) V4      V^,           r Kf  W V3# )a«  
Find a shift of `f` in `K[x]` that has square-free norm.

The domain `K` must be an algebraic number field `k(a)` (see :ref:`QQ(a)`).

Returns `(s,g,r)`, such that `g(x)=f(x-sa)`, `r(x)=\text{Norm}(g(x))` and
`r` is a square-free polynomial over `k`.

Examples
========

We first create the algebraic number field `K=k(a)=\mathbb{Q}(\sqrt{3})`
and rings `K[x]` and `k[x]`:

>>> from sympy.polys import ring, QQ
>>> from sympy import sqrt

>>> K = QQ.algebraic_field(sqrt(3))
>>> R, x = ring("x", K)
>>> _, X = ring("x", QQ)

We can now find a square free norm for a shift of `f`:

>>> f = x**2 - 1
>>> s, g, r = R.dup_sqf_norm(f)

The choice of shift `s` is arbitrary and the particular values returned for
`g` and `r` are determined by `s`.

>>> s == 1
True
>>> g == x**2 - 2*sqrt(3)*x + 2
True
>>> r == X**4 - 8*X**2 + 4
True

The invariants are:

>>> g == f.shift(-s*K.unit)
True
>>> g.norm() == r
True
>>> r.is_squarefree
True

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

This is part of Trager's algorithm for factorizing polynomials over
algebraic number fields. In particular this function is algorithm
``sqfr_norm`` from [Trager76]_.

See Also
========

dmp_sqf_norm:
    Analogous function for multivariate polynomials over ``k(a)``.
dmp_norm:
    Computes the norm of `f` directly without any shift.
dup_ext_factor:
    Function implementing Trager's algorithm that uses this.
sympy.polys.polytools.sqf_norm:
    High-level interface for using this function.
úground domain must be algebraicT©Úfront)Úis_Algebraicr*   r   ÚmodÚto_listÚdomr   r%   rD   r   Úunit)r4   rC   ÚsÚgÚhÚ_Úrs   &&     r0   Údup_sqf_normrY   i   s”   € ðB �>�>ˆ>ÜÐ;Ó<Ð<àŒi˜Ÿ™Ÿ™›¨¨A¨q¯u©uÓ5€qà
Ü˜!˜Q ¨Ô.‰ˆÜ˜!  1§5¡5Ó)ˆä�QŸ™×ÒØä˜Q§¡ ¨Ó+¨Q°­UŠqà�ˆ7€Nr8   c           	   #  ó  "  € V^,           p^ .V,          pW@3x € VP                   p\        W4      p\        \        V\	        V^,           4      4      4       UUu. uF  w  rxV^ 8”  g   K  VNK  	  p	ppV	 F@  pVP                  4       p
^W¨&   V
 Uu. uF  qµ) V,          NK  	  pp\        WW4      pW­3x € KB  	  ^ p V^,          pV.V,          pV) V,          .V,          p\        V VW4      pVV3x € K;  u uppi u upi 5i)z9Generate a sequence of candidate shifts for dmp_sqf_norm.)rS   r   Úsortedr:   rF   Úcopyr   )r4   r<   rC   ÚnÚs0ÚaÚdÚdirG   Úvar_indicesÚs1Ús1iÚa1Úf1ÚjÚsjÚajÚfjs   &&&               r0   Ú_dmp_sqf_norm_shiftsrk   »   s	  é € ð 	
ˆA�€AØ
ˆˆq�€BØ
ˆ%‚Kð 	
�‰€Aô 	˜Ó€AÜ"(¬¨Q´°a¸µc³
Ó);Ô"<ÔGÑ"<™˜ÀÀQÁ—1�1Ñ"<€KÑGó ˆØ�W‰W‹YˆØˆ‰Ù "Ó#¡˜ˆb��fˆf¡ˆÐ#Ü�q˜aÓ#ˆØˆfŒñ ð 	
€AØ
Ø	ˆQ�ˆØˆS�1�WˆØˆb��dˆV�a�ZˆÜ�q˜"˜aÓ#ˆØ�"ˆfŒùó# Hùò $ùs%   ‚ADÁC6Á*C6Á0 DÂC<Â"ADc                ó¬  € V'       g   \        W4      w  r4pV.WE3# VP                  '       g   \        R4      h\        VP                  P                  4       V^,           ^ VP                  4      p\        WV4       FQ  w  r0\        WVRR7      w  rg\        WFV^,           VP                  4      p\        WQVP                  4      '       g   KQ   M	  XV X3# )aD  
Find a shift of ``f`` in ``K[X]`` that has square-free norm.

The domain `K` must be an algebraic number field `k(a)` (see :ref:`QQ(a)`).

Returns `(s,g,r)`, such that `g(x_1,x_2,\cdots)=f(x_1-s_1 a, x_2 - s_2 a,
\cdots)`, `r(x)=\text{Norm}(g(x))` and `r` is a square-free polynomial over
`k`.

Examples
========

We first create the algebraic number field `K=k(a)=\mathbb{Q}(i)` and rings
`K[x,y]` and `k[x,y]`:

>>> from sympy.polys import ring, QQ
>>> from sympy import I

>>> K = QQ.algebraic_field(I)
>>> R, x, y = ring("x,y", K)
>>> _, X, Y = ring("x,y", QQ)

We can now find a square free norm for a shift of `f`:

>>> f = x*y + y**2
>>> s, g, r = R.dmp_sqf_norm(f)

The choice of shifts ``s`` is arbitrary and the particular values returned
for ``g`` and ``r`` are determined by ``s``.

>>> s
[0, 1]
>>> g == x*y - I*x + y**2 - 2*I*y - 1
True
>>> r == X**2*Y**2 + X**2 + 2*X*Y**3 + 2*X*Y + Y**4 + 2*Y**2 + 1
True

The required invariants are:

>>> g == f.shift_list([-si*K.unit for si in s])
True
>>> g.norm() == r
True
>>> r.is_squarefree
True

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

This is part of Trager's algorithm for factorizing polynomials over
algebraic number fields. In particular this function is a multivariate
generalization of algorithm ``sqfr_norm`` from [Trager76]_.

See Also
========

dup_sqf_norm:
    Analogous function for univariate polynomials over ``k(a)``.
dmp_norm:
    Computes the norm of `f` directly without any shift.
dmp_ext_factor:
    Function implementing Trager's algorithm that uses this.
sympy.polys.polytools.sqf_norm:
    High-level interface for using this function.
rL   TrM   )rY   rO   r*   r   rP   rQ   rR   rk   r   r%   rJ   )r4   r<   rC   rT   rU   rX   rV   rW   s   &&&     r0   Údmp_sqf_normrm   ã   s³   € ÷D Ü˜qÓ$‰ˆˆaØˆs�AˆyÐà�>�>ˆ>ÜÐ;Ó<Ð<ä�!—%‘%—-‘-“/ 1 q¥5¨!¨Q¯U©UÓ3€Aä$ Q¨1Ö-‰ˆä˜! ¨Ô.‰ˆÜ˜!  A¥ q§u¡uÓ-ˆä�Q˜1Ÿ5™5×!Ô!Ùñ .ð ˆa�ˆ7€Nr8   c                ó  € VP                   '       g   \        R4      h\        VP                  P	                  4       V^,           ^ VP
                  4      p\        WVRR7      w  rE\        W4V^,           VP
                  4      # )ai  
Norm of ``f`` in ``K[X]``, often not square-free.

The domain `K` must be an algebraic number field `k(a)` (see :ref:`QQ(a)`).

Examples
========

We first define the algebraic number field `K = k(a) = \mathbb{Q}(\sqrt{2})`:

>>> from sympy import QQ, sqrt
>>> from sympy.polys.sqfreetools import dmp_norm
>>> k = QQ
>>> K = k.algebraic_field(sqrt(2))

We can now compute the norm of a polynomial `p` in `K[x,y]`:

>>> p = [[K(1)], [K(1),K.unit]]                  # x + y + sqrt(2)
>>> N = [[k(1)], [k(2),k(0)], [k(1),k(0),k(-2)]] # x**2 + 2*x*y + y**2 - 2
>>> dmp_norm(p, 1, K) == N
True

In higher level functions that is:

>>> from sympy import expand, roots, minpoly
>>> from sympy.abc import x, y
>>> from math import prod
>>> a = sqrt(2)
>>> e = (x + y + a)
>>> e.as_poly([x, y], extension=a).norm()
Poly(x**2 + 2*x*y + y**2 - 2, x, y, domain='QQ')

This is equal to the product of the expressions `x + y + a_i` where the
`a_i` are the conjugates of `a`:

>>> pa = minpoly(a)
>>> pa
_x**2 - 2
>>> rs = roots(pa, multiple=True)
>>> rs
[sqrt(2), -sqrt(2)]
>>> n = prod(e.subs(a, r) for r in rs)
>>> n
(x + y - sqrt(2))*(x + y + sqrt(2))
>>> expand(n)
x**2 + 2*x*y + y**2 - 2

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

Given an algebraic number field `K = k(a)` any element `b` of `K` can be
represented as polynomial function `b=g(a)` where `g` is in `k[x]`. If the
minimal polynomial of `a` over `k` is `p_a` then the roots `a_1`, `a_2`,
`\cdots` of `p_a(x)` are the conjugates of `a`. The norm of `b` is the
product `g(a1) \times g(a2) \times \cdots` and is an element of `k`.

As in [Trager76]_ we extend this norm to multivariate polynomials over `K`.
If `b(x)` is a polynomial in `k(a)[X]` then we can think of `b` as being
alternately a function `g_X(a)` where `g_X` is an element of `k[X][y]` i.e.
a polynomial function with coefficients that are elements of `k[X]`. Then
the norm of `b` is the product `g_X(a1) \times g_X(a2) \times \cdots` and
will be an element of `k[X]`.

See Also
========

dmp_sqf_norm:
    Compute a shift of `f` so that the `\text{Norm}(f)` is square-free.
sympy.polys.polytools.Poly.norm:
    Higher-level function that calls this.
rL   TrM   )rO   r*   r   rP   rQ   rR   r   r%   )r4   r<   rC   rU   rV   rW   s   &&&   r0   Údmp_normro   9  sc   € ðP �>�>ˆ>ÜÐ;Ó<Ð<ä�!—%‘%—-‘-“/ 1 q¥5¨!¨Q¯U©UÓ3€AÜ�a˜A TÔ*�D€Aä˜˜q 1�u a§e¡eÓ,Ð,r8   c                óš   € \        WVP                  4      p \        WP                  VP                  4      p\        W!P                  V4      # )z3Compute square-free part of ``f`` in ``GF(p)[x]``. )r   rR   r(   rP   )r4   rC   rU   s   && r0   Údup_gf_sqf_partrq   Š  s7   € ä�A˜!Ÿ%™%Ó €AÜ�A—u‘u˜aŸe™eÓ$€AÜ�qŸ%™% Ó#Ð#r8   c                ó   € \        R4      h)z3Compute square-free part of ``f`` in ``GF(p)[X]``. ú+multivariate polynomials over finite fields©ÚNotImplementedError©r4   r<   rC   s   &&&r0   Údmp_gf_sqf_partrw   ‘  ó   € ä
ÐKÓ
LÐLr8   c                óL  € VP                   '       d   \        W4      # V '       g   V # VP                  \        W4      4      '       d   \	        W4      p \        V \        V ^V4      V4      p\        WV4      pVP                  '       d   \        W14      # \        W14      ^,          # )zò
Returns square-free part of a polynomial in ``K[x]``.

Examples
========

>>> from sympy.polys import ring, ZZ
>>> R, x = ring("x", ZZ)

>>> R.dup_sqf_part(x**3 - 3*x - 2)
x**2 - x - 2

See Also
========

sympy.polys.polytools.Poly.sqf_part
)Úis_FiniteFieldrq   Úis_negativer   r   r#   r   r   Úis_Fieldr   r   )r4   rC   rI   Úsqfs   &&  r0   Údup_sqf_partr~   –  s†   € ð$ 	××ÐÜ˜qÓ$Ð$çØˆà‡}�}”V˜A“\×"Ò"Ü�A‹Mˆä
�!”X˜a  AÓ&¨Ó
*€CÜ
�!˜!Ó
€Cà‡z‡z€zÜ˜Ó Ð ä˜SÓ$ QÕ'Ð'r8   c                óÆ  € V'       g   \        W4      # VP                  '       d   \        WV4      # \        W4      '       d   V # VP	                  \        WV4      4      '       d   \        WV4      p T p\        V^,           4       F  p\        V\        V ^WAV4      W4      pK  	  \        WW4      pVP                  '       d   \        WQV4      # \        WQV4      ^,          # )zÇ
Returns square-free part of a polynomial in ``K[X]``.

Examples
========

>>> from sympy.polys import ring, ZZ
>>> R, x,y = ring("x,y", ZZ)

>>> R.dmp_sqf_part(x**3 + 2*x**2*y + x*y**2)
x**2 + x*y

)r~   rz   rw   r   r{   r   r   rF   r$   r   r	   r|   r   r    )r4   r<   rC   rI   rG   r}   s   &&&   r0   Údmp_sqf_partr€   º  sÁ   € ÷ Ü˜AÓ!Ð!à××ÐÜ˜q QÓ'Ð'ä�!×ÒØˆà‡}�}”] 1¨Ó+×,Ò,Ü�A˜!Óˆà
€CÜ�1�Q•3ŽZˆÜ�cœ; q¨!¨Q°1Ó5°qÓ<Šñ ä
�!˜!Ó
€Cà‡z‡z€zÜ ¨Ó*Ð*ä# C¨AÓ.¨qÕ1Ð1r8   c                ó,  € T p\        WVP                  4      p \        WP                  VP                  VR7      w  rE\	        V4       F"  w  pw  r\        WP                  V4      V3WV&   K$  	  \        W54       VP                  WAP                  4      V3# )z<Compute square-free decomposition of ``f`` in ``GF(p)[x]``. ©Úall)r   rR   r'   rP   Ú	enumerater7   Úconvert)r4   rC   rƒ   Úf_origÚcoeffÚfactorsrG   r/   s   &&&     r0   Údup_gf_sqf_listr‰   ß  s}   € à€Fä�A˜!Ÿ%™%Ó €Aä  §E¡E¨1¯5©5°cÔ:�N€Eä˜wÖ'‰	ˆ‰6ˆAÜ! !§U¡U¨AÓ.°Ð2ˆ‹
ñ (ô �vÔ'à�9‰9�UŸE™EÓ" GÐ+Ð+r8   c                ó   € \        R4      h)z<Compute square-free decomposition of ``f`` in ``GF(p)[X]``. rs   rt   )r4   r<   rC   rƒ   s   &&&&r0   Údmp_gf_sqf_listr‹   ï  rx   r8   c                ó€  € VP                   '       d   \        WVR7      # T pVP                  '       d   \        W4      p\	        W4      p M;\        W4      w  r@VP                  \        W4      4      '       d   \        W4      p V) p\        V 4      ^ 8:  d   V. 3# . ^re\        V ^V4      p\        WV4      w  r‰p
 \        V	^V4      p\        W«V4      pV'       g   VP                  W–34       MD\        W—V4      w  r‰p
V'       g   \        V4      ^ 8”  d   VP                  W†34       V^,          pKy  \        W54       WE3# )a›  
Return square-free decomposition of a polynomial in ``K[x]``.

Uses Yun's algorithm from [Yun76]_.

Examples
========

>>> from sympy.polys import ring, ZZ
>>> R, x = ring("x", ZZ)

>>> f = 2*x**5 + 16*x**4 + 50*x**3 + 76*x**2 + 56*x + 16

>>> R.dup_sqf_list(f)
(2, [(x + 1, 2), (x + 2, 3)])
>>> R.dup_sqf_list(f, all=True)
(2, [(1, 1), (x + 1, 2), (x + 2, 3)])

See Also
========

dmp_sqf_list:
    Corresponding function for multivariate polynomials.
sympy.polys.polytools.sqf_list:
    High-level function for square-free factorization of expressions.
sympy.polys.polytools.Poly.sqf_list:
    Analogous method on :class:`~.Poly`.

References
==========

[Yun76]_
r‚   )rz   r‰   r|   r   r   r   r{   r   r   r   r!   r   Úappendr7   )r4   rC   rƒ   r†   r‡   r5   rG   rV   rU   ÚpÚqr`   s   &&&         r0   Údup_sqf_listr�   ô  s  € ðD 	××ÐÜ˜q¨Ô-Ð-à€Fà‡z‡z€zÜ�q“ˆÜ�a‹O‰ä  Ó&‰ˆà�=‰=œ ›×&Ò&Ü˜“ˆAØ�FˆEä�!ƒ}˜ÔØ�bˆyÐà�AˆAä��A�qÓ€AÜ˜A !Ó$�G€Aˆ!à
Ü�Q˜˜1ÓˆÜ�A˜!ÓˆçØ�M‰M˜1˜&Ô!Øä  aÓ(‰ˆˆaç”*˜Q“- !Ô#Ø�M‰M˜1˜&Ô!à	ˆQ�Šä�vÔ&àˆ=Ðr8   c                óä   € \        WVR7      w  r4V'       dC   V^ ,          ^,          ^8X  d.   \        V^ ,          ^ ,          W14      pV^3.VR,          ,           # \        V.4      pV^3.V,           # )aU  
Return square-free decomposition of a polynomial in ``K[x]``.

Examples
========

>>> from sympy.polys import ring, ZZ
>>> R, x = ring("x", ZZ)

>>> f = 2*x**5 + 16*x**4 + 50*x**3 + 76*x**2 + 56*x + 16

>>> R.dup_sqf_list_include(f)
[(2, 1), (x + 1, 2), (x + 2, 3)]
>>> R.dup_sqf_list_include(f, all=True)
[(2, 1), (x + 1, 2), (x + 2, 3)]

r‚   ºé   NN)r�   r
   r   )r4   rC   rƒ   r‡   rˆ   rU   s   &&&   r0   Údup_sqf_list_includer”   A  sj   € ô$ " !¨CÔ0�N€Eç�7˜1•:˜a•= AÔ%Ü˜7 1�: a�=¨%Ó3ˆØ�A�ˆx˜' "�+Õ%Ð%ä�u�gÓˆØ�A�ˆx˜'Õ!Ð!r8   c                ó¬  € V'       g   \        WVR7      # VP                  '       d   \        WW#R7      # T pVP                  '       d   \	        WV4      p\        WV4      p M>\        WV4      w  rPVP                  \	        WV4      4      '       d   \        WV4      p V) p\        W4      pV^ 8  d   V. 3# \        WV4      w  rp/ pV^ 8w  d…   \        V ^W4      p	\        W	W4      w  r«p^p \        V^W4      p\        WÎW4      p	\        W‘4      '       d   W¸V&   M6\        W¹W4      w  r«pV'       g   \        W¡4      ^ 8”  d   W¨V&   V^,          pKf  \        Wq^,
          W#R7      w  ppW_,          pV F*  w  ppV.pWØ9   d   \!        W�,          VW4      W�&   K&  VW�&   K,  	  \#        V4       Uu. uF  qØV,          V3NK  	  pp\%        WAV4       WX3# u upi )aÅ  
Return square-free decomposition of a polynomial in `K[X]`.

Examples
========

>>> from sympy.polys import ring, ZZ
>>> R, x,y = ring("x,y", ZZ)

>>> f = x**5 + 2*x**4*y + x**3*y**2

>>> R.dmp_sqf_list(f)
(1, [(x + y, 2), (x, 3)])
>>> R.dmp_sqf_list(f, all=True)
(1, [(1, 1), (x + y, 2), (x, 3)])

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

Uses Yun's algorithm for univariate polynomials from [Yun76]_ recursively.
The multivariate polynomial is treated as a univariate polynomial in its
leading variable. Then Yun's algorithm computes the square-free
factorization of the primitive and the content is factored recursively.

It would be better to use a dedicated algorithm for multivariate
polynomials instead.

See Also
========

dup_sqf_list:
    Corresponding function for univariate polynomials.
sympy.polys.polytools.sqf_list:
    High-level function for square-free factorization of expressions.
sympy.polys.polytools.Poly.sqf_list:
    Analogous method on :class:`~.Poly`.
r‚   )r�   rz   r‹   r|   r   r   r    r{   r   r   r&   r   r"   r   r   Údmp_sqf_listr   r[   rA   )r4   r<   rC   rƒ   r†   r‡   r6   Úcontentr5   rV   rU   rŽ   r�   rG   r`   Úcoeff_contentÚresult_contentr.   s   &&&&              r0   r–   r–   ]  sÏ  € ÷L Ü˜A cÔ*Ð*à××ÐÜ˜q QÔ0Ð0à€Fà‡z‡z€zÜ˜a AÓ&ˆÜ˜Q 1Ó%‰ä'¨¨aÓ0‰ˆà�=‰=œ q¨QÓ/×0Ò0Ü˜˜aÓ ˆAØ�FˆEä
�QÓ
€CØ
ˆQ„wØ�bˆyÐô ˜q QÓ'�J€Gà€Fà
ˆa„xä�Q˜˜1Ó ˆÜ  aÓ+‰ˆˆaàˆàÜ˜˜A˜qÓ$ˆAÜ˜˜aÓ#ˆAä˜!×ÒØ�q‘	Øä# A¨!Ó/‰GˆA�!ç”j Ó&¨Ô*Ø�q‘	à��FŠAä$0°¸A½#¸qÔ$JÑ!€M�>à	Õ€Eó !‰ˆˆQØˆeˆØŒ;Ü ¥	¨3°Ó5ˆF‹IàˆF‹Iñ !ô '-¨V¤nÓ5¡n �a�y˜!‹n¡n€FÐ5ä�v &Ô)àˆ=Ðùò	 6s   Æ-Gc                ó  € V'       g   \        WVR7      # \        WW#R7      w  rEV'       dD   V^ ,          ^,          ^8X  d/   \        V^ ,          ^ ,          WAV4      pV^3.VR,          ,           # \        WA4      pV^3.V,           # )a<  
Return square-free decomposition of a polynomial in ``K[x]``.

Examples
========

>>> from sympy.polys import ring, ZZ
>>> R, x,y = ring("x,y", ZZ)

>>> f = x**5 + 2*x**4*y + x**3*y**2

>>> R.dmp_sqf_list_include(f)
[(1, 1), (x + y, 2), (x, 3)]
>>> R.dmp_sqf_list_include(f, all=True)
[(1, 1), (x + y, 2), (x, 3)]

r‚   r’   )r”   r–   r   r   )r4   r<   rC   rƒ   r‡   rˆ   rU   s   &&&&   r0   Údmp_sqf_list_includer›   É  sz   € ÷$ Ü# A¨cÔ2Ð2ä! !¨Ô3�N€Eç�7˜1•:˜a•= AÔ%Ü˜7 1�: a�=¨%°AÓ6ˆØ�A�ˆx˜' "�+Õ%Ð%ä�uÓ ˆØ�A�ˆx˜'Õ!Ð!r8   c           
     ó”  € V '       g   \        R4      h\        W4      p \        V 4      '       g   . # \        V \	        WP
                  V4      V4      p\        W!4      p\        V4       F2  w  pw  rV\        V\	        WQ! V4      ) V4      V4      pWV^,           3W4&   K4  	  \        WV4      p \        V 4      '       g   V# V ^3.V,           # )zÛ
Compute greatest factorial factorization of ``f`` in ``K[x]``.

Examples
========

>>> from sympy.polys import ring, ZZ
>>> R, x = ring("x", ZZ)

>>> R.dup_gff_list(x**5 + 2*x**4 - x**3 - 2*x**2)
[(x, 1), (x + 2, 4)]

zDgreatest factorial factorization doesn't exist for a zero polynomial)
Ú
ValueErrorr   r   r#   r   ÚoneÚdup_gff_listr„   r   r   )r4   rC   rU   ÚHrG   rV   r/   s   &&     r0   rŸ   rŸ   è  s·   € ÷ ÜÐ_Ó`Ð`ä�!‹€Aä�a�=Š=Øˆ	ä�A”y §E¡E¨1Ó-¨qÓ1ˆÜ˜Óˆä" 1ž‰IˆA‰v�Ü˜œ9 Q¨¨1«¨¨qÓ1°1Ó5ˆAØ˜1•u�:ˆA‹Dñ &ô �A˜!Óˆä˜!�}Š}ØˆHà˜�F�8˜a•<Ðr8   c                ó>   € V'       g   \        W4      # \        V 4      h)z—
Compute greatest factorial factorization of ``f`` in ``K[X]``.

Examples
========

>>> from sympy.polys import ring, ZZ
>>> R, x,y = ring("x,y", ZZ)

)rŸ   r)   rv   s   &&&r0   Údmp_gff_listr¢     s   € ÷ Ü˜AÓ!Ð!ä)¨!Ó,Ð,r8   N)F)DÚ__doc__Úsympy.polys.densearithr   r   r   r   r   r   r   r	   r
   r   Úsympy.polys.densebasicr   r   r   r   r   r   r   r   r   r   r   r   Úsympy.polys.densetoolsr   r   r   r   r   r   r   r   r    Úsympy.polys.euclidtoolsr!   r"   r#   r$   r%   r&   Úsympy.polys.galoistoolsr'   r(   Úsympy.polys.polyerrorsr)   r*   r7   rA   rD   rJ   rY   rk   rm   ro   rq   rw   r~   r€   r‰   r‹   r�   r”   r–   r›   rŸ   r¢   © r8   r0   Ú<module>r«      sÄ   ðÙ >÷$÷ $÷ $÷÷ ÷ ó ÷)÷ )õ )÷
"÷ "÷÷ò
 ò0ò@ò,òDOòd%òPSòlN-òb$òMò
!(òH"2ôJ,ô Mô
JôZ"ô8iôX"ò>" ôJ-r8   