+
    ‹°³j¨  ã                   ó   € R t ^ RIHt ^ RI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 ^ 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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/H0t0H1t1H2t2H3t3H4t4H5t5H6t6H7t7H8t8H9t9H:t:H;t;H<t<H=t=H>t>H?t?H@t@HAtAHBtBHCtCHDtD ^ RIEHFtFHGtGHHtHHItIHJtJHKtKHLtLHMtMHNtNHOtOHPtPHQtQHRtRHStSHTtT ^ RIUHVtVHWtWHXtX ^ RIYHZtZH[t[H\t\H]t]H^t^H_t_H`t` ^ R	IaHbtb ^ R
IcHdtd ^ RIeHftfHgtgHhthHiti ^ RIjHktk ^ RIlHmtnHotpHqtr ]R8X  d   ^ RIsHttt MRttR tuR tvR twR txR tyR tzR t{R t|R t}R6R lt~R tR t€R t�R t‚R tƒR  t„R! t…R" t†R# t‡R$ tˆR% t‰R7R& ltŠR' t‹R( tŒR) t�R* tŽR+ t�R, t�R- t‘R. t’R/ t“R0 t”R1 t•R2 t–R3 t—R4 t˜R5 t™R# )8z:Polynomial factorization routines in characteristic zero. )ÚGROUND_TYPES)Ú_randint)Úgf_from_int_polyÚgf_to_int_polyÚ	gf_lshiftÚ
gf_add_mulÚgf_mulÚgf_divÚgf_remÚgf_gcdexÚgf_sqf_pÚgf_factor_sqfÚ	gf_factor)Údup_LCÚdmp_LCÚdmp_ground_LCÚdup_TCÚdup_convertÚdmp_convertÚ
dup_degreeÚ
dmp_degreeÚdmp_degree_inÚdmp_degree_listÚdmp_from_dictÚ
dmp_zero_pÚdmp_oneÚdmp_nestÚ	dmp_raiseÚ	dup_stripÚ
dmp_groundÚdup_inflateÚdmp_excludeÚdmp_includeÚ
dmp_injectÚ	dmp_ejectÚdup_terms_gcdÚdmp_terms_gcd)Údup_negÚdmp_negÚdup_addÚdmp_addÚdup_subÚdmp_subÚdup_mulÚdmp_mulÚdup_sqrÚdmp_powÚdup_divÚdmp_divÚdup_quoÚdmp_quoÚ
dmp_expandÚdmp_add_mulÚdup_sub_mulÚdmp_sub_mulÚ
dup_lshiftÚdup_max_normÚdmp_max_normÚdup_l1_normÚdup_mul_groundÚdmp_mul_groundÚdup_quo_groundÚdmp_quo_ground)Údup_clear_denomsÚdmp_clear_denomsÚ	dup_truncÚdmp_ground_truncÚdup_contentÚ	dup_monicÚdmp_ground_monicÚdup_primitiveÚdmp_ground_primitiveÚdmp_eval_tailÚdmp_eval_inÚdmp_diff_eval_inÚ	dup_shiftÚ	dmp_shiftÚ
dup_mirror)Údmp_primitiveÚdup_inner_gcdÚdmp_inner_gcd)Ú	dup_sqf_pÚdup_sqf_normÚdmp_sqf_normÚdup_sqf_partÚdmp_sqf_partÚ_dup_check_degreesÚ_dmp_check_degrees)Ú_sort_factors)Úquery)ÚExtraneousFactorsÚDomainErrorÚCoercionFailedÚEvaluationFailed)Úsubsets)ÚceilÚlogÚlog2Úflint)Ú	fmpz_polyNc                óÀ   € . pV FL  p^ p \        WV4      w  rgV'       g   Ye^,           rPK"   T^ 8X  d   \        R4      hTP                  YE34       KN  	  \        V4      # )z•
Determine multiplicities of factors for a univariate polynomial
using trial division.

An error will be raised if any factor does not divide ``f``.
útrial division failed)r1   ÚRuntimeErrorÚappendrZ   )ÚfÚfactorsÚKÚresultÚfactorÚkÚqÚrs   &&&     ÚX/home/luca/screen-checking/.venv/lib/python3.14/site-packages/sympy/polys/factortools.pyÚdup_trial_divisionrs   X   sf   € ð €FãˆØˆàÜ˜1 aÓ(‰DˆAçØ˜a�%’1àà�Œ6ÜÐ6Ó7Ð7à�‰�v�kÖ"ñ ô  ˜Ó Ð ó    c                óÒ   € . pV FU  p^ p \        WW#4      w  rx\        W‚4      '       d   Yv^,           r`K+   T^ 8X  d   \        R4      hTP                  YV34       KW  	  \	        V4      # )z—
Determine multiplicities of factors for a multivariate polynomial
using trial division.

An error will be raised if any factor does not divide ``f``.
rg   )r2   r   rh   ri   rZ   )	rj   rk   Úurl   rm   rn   ro   rp   rq   s	   &&&&     rr   Údmp_trial_divisionrw   t   sn   € ð €FãˆØˆàÜ˜1 aÓ+‰DˆAä˜!×ÒØ˜a�%’1àà�Œ6ÜÐ6Ó7Ð7à�‰�v�kÖ"ñ ô  ˜Ó Ð rt   c                ó´  € ^ RI Hp \        V 4      p\        V^,          4      p\        V^,          4      pVP	                  \        R V  4       4      4      pV! V^,
          V4      pV! V^,
          V^,
          4      pVP                  \        W4      4      p	Wv,          W‰,          ,           p
V
\        W4      ,          p
\        V
^,          4      ^,          p
V
# )ae  
The Knuth-Cohen variant of Mignotte bound for
univariate polynomials in ``K[x]``.

Examples
========

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

>>> f = x**3 + 14*x**2 + 56*x + 64
>>> R.dup_zz_mignotte_bound(f)
152

By checking ``factor(f)`` we can see that max coeff is 8

Also consider a case that ``f`` is irreducible for example
``f = 2*x**2 + 3*x + 4``. To avoid a bug for these cases, we return the
bound plus the max coefficient of ``f``

>>> f = 2*x**2 + 3*x + 4
>>> R.dup_zz_mignotte_bound(f)
6

Lastly, to see the difference between the new and the old Mignotte bound
consider the irreducible polynomial:

>>> f = 87*x**7 + 4*x**6 + 80*x**5 + 17*x**4 + 9*x**3 + 12*x**2 + 49*x + 26
>>> R.dup_zz_mignotte_bound(f)
744

The new Mignotte bound is 744 whereas the old one (SymPy 1.5.1) is 1937664.


References
==========

..[1] [Abbott13]_

)Úbinomialc              3   ó2   "  € T F  q^,          x € K  	  R# 5i)é   N© ©Ú.0Úcfs   & rr   Ú	<genexpr>Ú(dup_zz_mignotte_bound.<locals>.<genexpr>¿   s   é € Ð0©Q r ŸUšU«Qùs   ‚)	Ú(sympy.functions.combinatorial.factorialsry   r   Ú_ceilÚsqrtÚsumÚabsr   r:   )rj   rl   ry   ÚdÚdeltaÚdelta2Ú	eucl_normÚt1Út2ÚlcÚbounds   &&         rr   Údup_zz_mignotte_boundr�   �   sµ   € õR BÜ�1‹€AÜ�!�a•%‹L€EÜ�5˜1•9Ó€Fð —‘œÑ0©QÓ0Ó0Ó2€Iñ 
�%˜!•)˜VÓ	$€BÙ	�%˜!•)˜V a�ZÓ	(€Bà	
�‰Œv�a‹|Ó	€BØ�N˜R�WÕ$€EØ	Œ\˜!ÓÕ€EÜ�%˜!•)Ó˜qÕ €Eà€Lrt   c                óà   € \        WV4      p\        \        WV4      4      p\        \	        W4      4      pVP                  V! V^,           4      4      ^V,          ,          V,          V,          # )z7Mignotte bound for multivariate polynomials in `K[X]`. )r;   r†   r   r…   r   r„   )rj   rv   rl   ÚaÚbÚns   &&&   rr   Údmp_zz_mignotte_boundr”   Ì   sX   € ä�Q˜1Ó€AÜŒM˜! Ó"Ó#€AÜŒO˜AÓ!Ó"€Aà�6‰6‘!�A˜•E“(Ó˜A˜q�DÕ  Õ" 1Õ$Ð$rt   c                óÊ  € V ^,          p\        WW64      p\        W‡V4      p\        \        WHV4      W64      w  rš\        W—V4      p	\        W§V4      p
\	        \        WXV4      \        W’V4      V4      p\        \	        W+V4      Wv4      p\        \	        W:V4      Wv4      p\	        \        WLV4      \        W]V4      V4      p\        \        W¶P                  .V4      Wv4      p\        \        WNV4      WÖ4      w  pp\        W÷V4      p\        VWv4      p\	        \        W^V4      \        WüV4      V4      p\        \        VVV4      Wv4      p\        \        W[V4      Wv4      pWÍVV3# )aÆ  
One step in Hensel lifting in `Z[x]`.

Given positive integer `m` and `Z[x]` polynomials `f`, `g`, `h`, `s`
and `t` such that::

    f = g*h (mod m)
    s*g + t*h = 1 (mod m)

    lc(f) is not a zero divisor (mod m)
    lc(h) = 1

    deg(f) = deg(g) + deg(h)
    deg(s) < deg(h)
    deg(t) < deg(g)

returns polynomials `G`, `H`, `S` and `T`, such that::

    f = G*H (mod m**2)
    S*G + T*H = 1 (mod m**2)

References
==========

.. [1] [Gathen99]_

)r7   rC   r1   r-   r)   r+   Úone)Úmrj   ÚgÚhÚsÚtrl   ÚMÚerp   rq   rv   ÚGÚHr’   Úcr‡   ÚSÚTs   &&&&&&&            rr   Údup_zz_hensel_stepr£   Õ   sH  € ð8 	
ˆ1�€Aä�A˜!Ó€AÜ�!˜Ó€Aä”7˜1 Ó# QÓ*�D€Aä�!˜Ó€AÜ�!˜Ó€Aä”˜˜aÓ ¤'¨!°Ó"2°AÓ6€AÜ”'˜! Ó" AÓ)€AÜ”'˜! Ó" AÓ)€Aä”˜˜aÓ ¤'¨!°Ó"2°AÓ6€AÜ”'˜!Ÿe™e˜W aÓ(¨!Ó/€Aä”7˜1 Ó# QÓ*�D€A€qä�!˜Ó€AÜ�!�QÓ€Aä”˜˜aÓ ¤'¨!°Ó"2°AÓ6€AÜ”'˜!˜Q Ó" AÓ)€AÜ”'˜! Ó" AÓ)€Aà��Aˆ:Ðrt   c           
     ó   € \        V4      p\        W4      pV^8X  d>   \        WP                  W`V,          4      ^ ,          V4      p\	        WpV,          V4      .# T pV^,          p	\        \        \        V4      4      4      p
\        V.V 4      pVRV	  F  p\        V\        WÀ4      W4      pK  	  \        W),          V 4      pW)^,           R  F  p\        V\        WÀ4      W4      pK  	  \        W½W4      w  rïp\        W°4      p\        WÐ4      p\        Wà4      p\        Wð4      p\        ^V
^,           4       F  p\        W�W½WïV4      V^,          uw  r½rïpK   	  \        WVRV	 W44      \        WW)R W44      ,           # )a½  
Multifactor Hensel lifting in `Z[x]`.

Given a prime `p`, polynomial `f` over `Z[x]` such that `lc(f)`
is a unit modulo `p`, monic pair-wise coprime polynomials `f_i`
over `Z[x]` satisfying::

    f = lc(f) f_1 ... f_r (mod p)

and a positive integer `l`, returns a list of monic polynomials
`F_1,\ F_2,\ \dots,\ F_r` satisfying::

   f = lc(f) F_1 ... F_r (mod p**l)

   F_i = f_i (mod p), i = 1..r

References
==========

.. [1] [Gathen99]_

N)Úlenr   r=   ÚgcdexrC   Úintrƒ   Ú_log2r   r   r   r   Úranger£   Údup_zz_hensel_lift)Úprj   Úf_listÚlrl   rq   r�   ÚFr—   ro   r‡   r˜   Úf_ir™   rš   r›   Ú_s   &&&&&            rr   rª   rª     sq  € ô. 	ˆF‹€AÜ	�‹€BàˆA„vÜ˜1Ÿg™g b¨Q­$Ó/°Õ2°AÓ6ˆÜ˜1 �d AÓ&Ð(Ð(à	€AØ	ˆQ�€AÜŒE”%˜“(‹OÓ€Aä˜"˜˜qÓ!€Aà�b�q‹zˆÜ�1Ô& sÓ.°Ó5Šñ ô 	˜� AÓ&€Aà˜!•e�f‹~ˆÜ�1Ô& sÓ.°Ó5Šñ ô �q˜QÓ"�G€Aˆ!ä�qÓ€AÜ�qÓ€AÜ�qÓ€AÜ�qÓ€Aä�1�a˜!•eŽ_ˆÜ,¨Q°1¸¸qÓAÀ1ÀaÅ4ˆ‰ˆˆq’añ ô ˜a F¨2¨A J°Ó5Ü
˜Q 6¨" :¨qÓ
4õ5ð 5rt   c                 óV   € W^,          8”  d	   W,
          pV'       g   R# W,          ^ 8H  # )r{   Tr|   )Úfcrp   Úpls   &&&rr   Ú_test_plr´   G  s$   € Ø��7„{Ø�FˆßÙØ�6�Q‰;Ðrt   c           
     ó|  € \        V 4      pV^8X  d   V .# ^ RIHp V R,          p\        W4      p\	        W4      p\        \        VP                  V! V^,           4      4      ^V,          ,          V,          V,          4      4      p\        V^,           ^V,          ,          V^V,          ^,
          ,          ,          4      p\        \        ^\        V4      ,          4      4      p	\        ^V	,          \        V	4      ,          4      p
. p\        ^V
^,           4       F—  pV! V4      '       d   Wl,          ^ 8X  d   K   VP                  V4      p\        W4      p\        WÜV4      '       g   KP  \        WÜV4      ^,          pVP!                  WÎ34       \#        V4      ^8  g   \#        V4      ^8”  g   K—   M	  \%        VR R7      w  pp\        \        \        ^V,          ^,           V4      4      4      pV Uu. uF  p\'        VV4      NK  	  pp\)        WðVVV4      p\        \#        V4      4      p\+        V4      p. ^ppVV,          p^V,          \#        V4      8:  EdÈ   \-        VV4       EFª  pV^8X  dB   ^pV F  pVVV,          R,          ,          pK  	  VV,          p\/        VVV4      '       g   KK  MaV.pV F  p\1        VVV,          V4      pK  	  \3        VVV4      p\5        VV4      ^,          pVR,          pV'       d   VV,          ^ 8w  d   K­  V.p\+        V4      pVV,
          pV^8X  d.   V.pV F  p\1        VVV,          V4      pK  	  \3        VVV4      pV F  p\1        VVV,          V4      pK  	  \3        VVV4      p\7        XV4      p \7        VV4      p!V V!,          V8:  g   EKK  TpV Uu. uF  pVV9  g   K  VNK  	  pp\5        VV4      ^,          p\5        VV4      ^,          p VP!                  V4       \	        W4      p EKÑ  	  V^,          pEKß  VV .,           # u upi u upi )z4Factor primitive square-free polynomials in `Z[x]`. )Úisprimec                 ó&   € \        V ^,          4      # ©é   )r¥   )Úxs   &rr   Ú<lambda>Ú#dup_zz_zassenhaus.<locals>.<lambda>p  s   € ¤3 q¨¥t¤9rt   )Úkeyéÿÿÿÿ)r   Úsympy.ntheoryr¶   r:   r   r§   r†   r„   rƒ   r¨   Ú_logr©   Úconvertr   r   r   ri   r¥   Úminr   rª   Úsetr`   r´   r-   rC   rH   r<   )"rj   rl   r“   r¶   r²   ÚAr’   ÚBÚCÚgammarŽ   r‘   Úpxr®   Úfsqfxr«   Úfsqfr­   ÚffÚmodularr˜   Úsorted_Tr¢   rk   rš   r³   r¡   rp   Úirž   rŸ   ÚT_SÚG_normÚH_norms"   &&                                rr   Údup_zz_zassenhausrÒ   N  s¹  € ä�1‹€AàˆA„vØˆsˆ
å%à	
ˆ2�€BÜ�QÓ€AÜˆq‹€AÜŒC�—‘‘q˜˜Q�“xÓ   A¥Õ% aÕ'¨Õ)Ó*Ó+€AÜˆQ��U�a˜•c�N˜1˜q �s Q�w�<Õ'Ó(€AÜ”�aœ˜a›•jÓ!Ó"€EÜ��%•œ˜U›Õ#Ó$€EØ
€Aô �A�u˜q•yÖ!ˆÙ�r�{Š{˜a�f¨œkÙà�Y‰Y�r‹]ˆä˜QÓ#ˆä˜˜q×!Ò!ÙÜ˜a QÓ'¨Õ*ˆØ	�‰�"�ÔÜˆu‹:˜Œ?œc !›f qžjÙñ "ô �!Ñ,Ô-�G€A€täŒE”$�q˜•s˜Q•w Ó"Ó#Ó$€Aá/3Ó4©t¨Œ~˜b !Ö$©t€GÐ4ä˜1 ¨!¨QÓ/€Aä”S˜“V‹}€HÜˆH‹€AØ�QˆQ€GØ	
ˆA�€Bà
ˆA�#”�Q“�-Ü˜ 1×%ˆAð
 �AŒvØ�Û�AØ˜!˜A�$˜r�(�
’Añ à˜•F�Ü  A r×*Ò*Ùð +ð �C�Û�AÜ  1 Q¥4¨Ó+’Añ ä˜a  QÓ'�Ü! ! QÓ'¨Õ*�Ø�b•E�ß˜˜a� 1œÙà�ˆAÜ�A“ˆAØ�a•%ˆCà�AŒvØ�C�Û�AÜ  1 Q¥4¨Ó+’Añ ä˜a  QÓ'�ã�Ü˜A˜q �t QÓ'’ñ ô ˜!˜R Ó#ˆAä   AÓ&ˆFÜ   AÓ&ˆFà�f�} ×!Ø�Ù'/Ó>¡x !°1¸A±:ŸA˜A¡x�Ð>ä! ! QÓ'¨Õ*�Ü! ! QÓ'¨Õ*�à—‘˜qÔ!Ü˜1“L�ãñe &ðh ��F‹Aà�a�S�=ÐùòA 5ùòh ?s   Ç:P4Ï 	P9ÏP9c                ó  € \        W4      p\        W4      p\        V R,          V4      pV'       dY   ^ RIHp V! \        V4      4      pVP                  4        F+  pW',          '       g   K  W7^,          ,          '       g   K*   R# 	  R# R# )z2Test irreducibility using Eisenstein's criterion. ºr¹   NN©Ú	factorintTN)r   r   rE   r¿   rÖ   r§   Úkeys)rj   rl   r�   ÚtcÚe_fcrÖ   Úe_ffr«   s   &&      rr   Údup_zz_irreducible_prÛ   ·  sa   € ä	�‹€BÜ	�‹€Bä�q˜•u˜aÓ €DçÝ+Ùœ˜T›Ó#ˆà—‘–ˆAØ—–˜R Q¥$ŸYžYÚó ñ	 rt   c                ó*  € VP                   '       d    YP                  4       r\        WV4      p MVP                  '       g   R# \        W4      p\        W4      pV^8w  g   VR8w  d
   V^8w  d   R# V'       g)   \        W4      w  rgWaP                  8w  g
   Wp^3.8w  d   R# \        V 4      p. . r©\        VRR4       F  pV	P                  ^ W,          4       K  	  \        V^,
          RR4       F  pV
P                  ^ W,          4       K  	  \        \        V	4      V4      p	\        \        V
4      V4      p
\        V	\        V
^V4      V4      pVP!                  \        WÁ4      4      '       d   \#        WÁ4      pWÀ8X  d   R# \%        W4      p	VP!                  \        W‘4      4      '       d   \#        W‘4      p	WÉ8X  d   \'        W‘4      '       d   R# \)        WÁ4      p\        WÑ4      V8X  d   \'        WÑ4      '       d   R# R#   \         d     R# i ; i)a   
Efficiently test if ``f`` is a cyclotomic polynomial.

Examples
========

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

>>> f = x**16 + x**14 - x**10 + x**8 - x**6 + x**2 + 1
>>> R.dup_cyclotomic_p(f)
False

>>> g = x**16 + x**14 - x**10 - x**8 - x**6 + x**2 + 1
>>> R.dup_cyclotomic_p(g)
True

References
==========

Bradford, Russell J., and James H. Davenport. "Effective tests for
cyclotomic polynomials." In International Symposium on Symbolic and
Algebraic Computation, pp. 244-251. Springer, Berlin, Heidelberg, 1988.

FTr¾   éþÿÿÿ)Úis_QQÚget_ringr   r^   Úis_ZZr   r   Údup_factor_listr–   r   r©   Úinsertr/   r   r+   r9   Úis_negativer'   rO   Údup_cyclotomic_prV   )rj   rl   ÚirreducibleÚK0r�   rØ   Úcoeffrk   r“   r˜   r™   rÎ   r®   rž   s   &&&           rr   rä   rä   Ç  s³  € ð4 	‡w‡w€wð	Ø—z‘z“|�Ü˜A 1Ó%‰Að �W�WˆWÙä	�‹€BÜ	�‹€Bà	ˆQ„w�2˜”8  a¤ÙçÜ(¨Ó.‰ˆà—E‘EŒ>˜W¨Q¨¨Ô0Ùä�1‹€AØˆr€qä�1�b˜"ÖˆØ	�‰��A•DÖñ ô �1�q•5˜"˜bÖ!ˆØ	�‰��A•DÖñ "ô 	”	˜!“˜aÓ €AÜ”	˜!“˜aÓ €Aä�”:˜a  AÓ&¨Ó*€Aà‡}�}”V˜A“\×"Ò"Ü�A‹Mˆà„vÙä�1Ó€Aà‡}�}”V˜A“\×"Ò"Ü�A‹Mˆà„vÔ" 1×(Ò(Ùä�QÓ€Aäˆqƒ}˜ÔÔ.¨q×4Ò4Ùáøôe ô 	Úð	ús   ”H ÈHÈHc                óâ   € ^ RI Hp VP                  VP                  ) .pV! V 4      P                  4        F5  w  rE\	        \        W4V4      W14      p\        W4V^,
          ,          V4      pK7  	  V# )z1Efficiently generate n-th cyclotomic polynomial. rÕ   )r¿   rÖ   r–   Úitemsr3   r    )r“   rl   rÖ   r™   r«   ro   s   &&    rr   Údup_zz_cyclotomic_polyrê     s_   € å'Ø	
�‰�—‘�ˆ€Aá˜!“×"Ñ"Ö$‰ˆÜ”K  aÓ(¨!Ó/ˆÜ˜˜q 1�u�: qÓ)Šñ %ð €Hrt   c                 ó‚  € ^ RI Hp VP                  VP                  ) ..pV! V 4      P                  4        Fz  w  rEV Uu. uF  p\	        \        WdV4      Wa4      NK  	  ppVP                  V4       \        ^V4       F/  pV U	u. uF  p	\        W”V4      NK  	  pp	VP                  V4       K1  	  K|  	  V# u upi u up	i )é    rÕ   )r¿   rÖ   r–   ré   r3   r    Úextendr©   )
r“   rl   rÖ   rŸ   r«   ro   r™   ÚQrÎ   rp   s
   &&        rr   Ú_dup_cyclotomic_decomposerï   &  s¨   € Ý'à
�%‰%�!—%‘%�ˆÐ€Aá˜!“×"Ñ"Ö$‰ˆÙ;<Ó>¹1°aŒg”k !¨Ó*¨AÖ1¹1ˆÐ>Ø	�‰�Œä�q˜!–ˆAÙ01Ó3±¨1”+˜a AÖ&±ˆAÐ3Ø�H‰H�QŽKó ñ	 %ð €Hùò ?ùò 4s   Á B7ÂB<c                óÀ  € \        W4      \        W4      r2\        V 4      ^ 8:  d   R# V^8w  g   VR9  d   R# \        ;QJ d    R V ^R  4       F  '       g   K   RM	  RM! R V ^R  4       4      '       d   R# \        V 4      p\	        WA4      pVP                  V4      '       g   V# . p\	        ^V,          V4       F  pWu9  g   K  VP                  V4       K  	  V# )aÌ  
Efficiently factor polynomials `x**n - 1` and `x**n + 1` in `Z[x]`.

Given a univariate polynomial `f` in `Z[x]` returns a list of factors
of `f`, provided that `f` is in the form `x**n - 1` or `x**n + 1` for
`n >= 1`. Otherwise returns None.

Factorization is performed using cyclotomic decomposition of `f`,
which makes this method much faster that any other direct factorization
approach (e.g. Zassenhaus's).

References
==========

.. [1] [Weisstein09]_

Nc              3   ó8   "  € T F  p\        V4      x € K  	  R # 5i)N)Úboolr}   s   & rr   r€   Ú+dup_zz_cyclotomic_factor.<locals>.<genexpr>P  s   é € Ð
&™g˜Œ4��8ˆ8›gùs   ‚TFr¾   )r¾   r¹   )r   r   r   Úanyrï   Úis_oneri   )rj   rl   Úlc_fÚtc_fr“   r®   rŸ   r™   s   &&      rr   Údup_zz_cyclotomic_factorrø   6  s¹   € ô$ ˜“œv a›|ˆ$ä�!ƒ}˜ÔÙàˆq„y�D Ô'Ùç
ƒsÑ
&˜a  "™gÓ
&‡s‡s‚sÑ
&˜a  "™gÓ
&×&Ò&Ùä�1‹€AÜ! !Ó'€Aà�8‰8�D�>Š>Øˆàˆä*¨1¨Q­3°Ö2ˆAØŽzØ—‘˜–ñ 3ð ˆrt   c                ó\  € \        W4      w  r#\        V4      p\        W14      ^ 8  d   V) \        W14      r2V^ 8:  d   V. 3# V^8X  d   W#.3# \	        R4      '       d   \        W14      '       d   W#.3# Rp\	        R4      '       d   \        W14      pVf   \        W14      pV\        VRR7      3# )z:Factor square-free (non-primitive) polynomials in `Z[x]`. ÚUSE_IRREDUCIBLE_IN_FACTORNÚUSE_CYCLOTOMIC_FACTORF)Úmultiple)	rH   r   r   r'   r[   rÛ   rø   rÒ   rZ   )rj   rl   Úcontr˜   r“   rk   s   &&    rr   Údup_zz_factor_sqfrþ   b  s®   € ä˜AÓ!�G€Dä�1‹€Aäˆaƒ|�aÔØ�%œ ›ˆaàˆA„vØ�RˆxˆØ	
ˆaŒØ�SˆyÐäÐ(×)Ò)Ü ×%Ò%Ø˜�9Ðà€GäÐ$×%Ò%Ü*¨1Ó0ˆà‚Ü# AÓ)ˆà”˜w°Ô7Ð7Ð7rt   c                óx  € \         R8X  dd   \        V RRR1,          4      pVP                  4       w  r4V UUu. uF!  w  rVVP                  4       RRR1,          V3NK#  	  pppV\	        V4      3# \        W4      w  r7\        V4      p\        Wq4      ^ 8  d   V) \        Wq4      rsV^ 8:  d   V. 3# V^8X  d   W7^3.3# \        R4      '       d   \        Wq4      '       d   W7^3.3# \        Wq4      pRp	\        R4      '       d   \        Wq4      p	V	f   \        Wq4      p	\        W	V4      p\        W4       W43# u uppi )a«  
Factor (non square-free) polynomials in `Z[x]`.

Given a univariate polynomial `f` in `Z[x]` computes its complete
factorization `f_1, ..., f_n` into irreducibles over integers::

            f = content(f) f_1**k_1 ... f_n**k_n

The factorization is computed by reducing the input polynomial
into a primitive square-free polynomial and factoring it using
Zassenhaus algorithm. Trial division is used to recover the
multiplicities of factors.

The result is returned as a tuple consisting of::

          (content(f), [(f_1, k_1), ..., (f_n, k_n))

Examples
========

Consider the polynomial `f = 2*x**4 - 2`::

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

    >>> R.dup_zz_factor(2*x**4 - 2)
    (2, [(x - 1, 1), (x + 1, 1), (x**2 + 1, 1)])

In result we got the following factorization::

             f = 2 (x - 1) (x + 1) (x**2 + 1)

Note that this is a complete factorization over integers,
however over Gaussian integers we can factor the last term.

By default, polynomials `x**n - 1` and `x**n + 1` are factored
using cyclotomic decomposition to speedup computations. To
disable this behaviour set cyclotomic=False.

References
==========

.. [1] [Gathen99]_

rd   Nrú   rû   r¾   )r   re   rn   ÚcoeffsrZ   rH   r   r   r'   r[   rÛ   rV   rø   rÒ   rs   rX   )
rj   rl   Úf_flintrý   rk   ÚfacÚexpr˜   r“   rŸ   s
   &&        rr   Údup_zz_factorr    s6  € ô\ �wÔÜ˜A™d ˜d�GÓ$ˆØŸ™Ó(‰ˆÙ=DÔE¹W±°�C—J‘J“L¡ 2 Õ&¨Ó,¹WˆÑEØ”] 7Ó+Ð+Ð+ä˜AÓ!�G€Dä�1‹€Aäˆaƒ|�aÔØ�%œ ›ˆaàˆA„vØ�RˆxˆØ	
ˆaŒØ˜!�f�Xˆ~ÐäÐ(×)Ò)Ü ×%Ò%Ø˜a˜&˜�>Ð!ä�QÓ€AØ€AäÐ$×%Ò%Ü$ QÓ*ˆà‚yÜ˜aÓ#ˆä   qÓ)€Gä�qÔ"àˆ=ÐùóA Fs   ¸'D6c                ó  € W,          .pV  Fn  p\        V4      p\        V4       F@  pV^8w  d   VP                  We4      pWV,          pK"  VP                  V4      '       g   K>    R# 	  VP	                  V4       Kp  	  VR,          # )z,Wang/EEZ: Compute a set of valid divisors.  NrÔ   )r†   ÚreversedÚgcdrõ   ri   )ÚEÚcsÚctrl   rm   rp   rq   s   &&&&   rr   Údmp_zz_wang_non_divisorsr  Ó  sr   € à�uˆY€FãˆÜ�‹Fˆä˜&Ö!ˆAØ�q”&Ø—E‘E˜!“K�Ø•F’à�x‰x˜�{Œ{Ûñ "ð 	�‰�aÖñ ð �"�:Ðrt   c           
     ó¼  € \        \        W4      W4^,
          V4      '       g   \        R4      h\        WWE4      p\        We4      '       g   \        R4      h\	        We4      w  rxVP                  \        W…4      4      '       d   V) \        W…4      r‡V^,
          p	V U
Uu. uF  w  r«\        W£W•4      NK  	  pp
p\        WÇW%4      pVe   WxV3# \        R4      hu upp
i )z2Wang/EEZ: Test evaluation points for suitability. zno luck)	rJ   r   r_   rS   rH   rã   r   r'   r  )rj   r¢   r
  rÄ   rv   rl   r˜   r    r™   Úvr›   r°   r  ÚDs   &&&&&&        rr   Údmp_zz_wang_test_pointsr  ç  sÀ   € äœ › q¨a­%°×3Ò3Ü˜yÓ)Ð)ä�a˜AÓ!€Aä�Q�?Š?Ü˜yÓ)Ð)ä˜Ó�D€Aà‡}�}”V˜A“\×"Ò"Øˆr”7˜1“=ˆ1à	ˆA�€Aá01Ô3±©¨Œ-˜˜aÖ
#±€AÑ3Ü   rÓ-€Aà‚}Ø�Qˆwˆä˜yÓ)Ð)ùó 	4s   ÂCc                óp  € . ^ .\        V4      ,          V^,
          r©pV F³  p\        W§4      p\        W·4      V,          p\        \	        \        V4      4      4       Fa  p^ W>,          W,          uppw  ppVV,          '       g   VV,          V^,           rýK"  V^ 8w  g   KD  \        V\        VWúV4      W§4      ^uqÉV&   Kc  	  VP                  V4       Kµ  	  \        V	4      '       g   \        h. . pp\        W„4       F£  w  rË\        WÅW§4      p\        W·4      pVP                  V4      '       d   VV,          pM7VP                  VV4      pVV,          VV,          pp\        W½V4      W-,          r+\        VVW§4      pVP                  V4       VP                  V4       K¥  	  VP                  V4      '       d   V VV3# . . pp\        VV4       F<  w  rËVP                  \        WÂW§4      4       VP                  \        W²^ V4      4       K>  	  \        W\        V4      ^,
          ,          Wg4      p V VV3# )z0Wang/EEZ: Compute correct leading coefficients. )r¥   r   r   r  r©   r.   r0   ri   Úallr\   ÚziprJ   rõ   r  r=   r>   )rj   r¢   r	  r  rŸ   rÄ   rv   rl   rÆ   ÚJr  r™   r    r‡   rÎ   ro   r�   r›   r°   ÚCCÚHHr�   Úccr˜   ÚCCCÚHHHs   &&&&&&&&                  rr   Údmp_zz_wang_lead_coeffsr    sâ  € à�1�#”c˜!“f•*˜a !�eˆ!€AãˆÜ�A‹MˆÜ�1‹L˜�Oˆäœ%¤ A£›-Ö(ˆAØ˜a�d A¥DˆLˆAˆq‘&�1�aà˜1—u”uØ˜!•t˜Q �U’1à�AŽvÜ! !¤W¨Q°°aÓ%8¸!Ó?À���Q“4ñ )ð 	
�‰�Žñ ô ˆq�6Š6ÜÐà�ˆ€Bä�A–	‰ˆÜ˜! Ó%ˆÜ�A‹\ˆà�8‰8�B�<Š<Ø�Q•‰Bà—‘�b˜!“ˆAØ�q•D˜"˜a�%ˆrˆAÜ" 1¨Ó+¨R­Uˆrä˜1˜b !Ó'ˆà
�	‰	�!ŒØ
�	‰	�!Žñ ð  	‡x�x�‡|‚|Ø�"�bˆyÐà�2ˆ€Cä�B˜–‰ˆØ�
‰
”> !¨Ó.Ô/Ø�
‰
”> !¨¨AÓ.Ö/ñ ô 	�qœs 1›v¨�zÕ*¨AÓ1€Aàˆc�3ˆ;Ðrt   c           
     ó   € \        V 4      ^8X  dx   V w  rE\        WB4      p\        WR4      p\        WvW#4      w  r‰p
\        W�V4      p\        W‘V4      p	\	        W†W#4      w  r¸\        W›WrV4      p	\        W‚4      p\        W’4      p	W‰.pV# V R,          .p
\        V ^R 4       F&  pV
P                  ^ \        Wj^ ,          V4      4       K(  	  . ^..rí\        W
4       FB  w  rg\        Wv.VR,          . ^ V^V4      w  r˜VP                  V	4       VP                  V4       KD  	  . WÞR,          .,           rÜ\        WÐ4       FN  w  r†\        W‚4      p\        Wb4      p\        \        W�V4      WbV4      p\        Wò4      pVP                  V4       KP  	  V# )z2Wang/EEZ: Solve univariate Diophantine equations. r¾   )r¥   r   r   r   r	   r   r   r  râ   r-   r  Údmp_zz_diophantineri   r
   )r®   r—   r«   rl   r‘   r’   rj   r˜   rš   r›   rž   rp   rm   r¡   r¢   rq   s   &&&&            rr   Údup_zz_diophantiner  7  s�  € ä
ˆ1ƒv�„{Ø‰ˆä˜QÓ"ˆÜ˜QÓ"ˆä˜1 Ó&‰ˆˆaä�a˜AÓˆÜ�a˜AÓˆä�a˜AÓ!‰ˆä�q˜Q 1Ó%ˆä˜1Ó ˆÜ˜1Ó ˆà�ˆð2 €Mð/ ˆr�UˆGˆä˜!˜A˜b˜'Ö"ˆAØ�H‰H�Qœ  Q¥4¨Ó+Ö,ñ #ð �Q�C�5ˆ1ä˜–I‰DˆAÜ% q f¨a°­e°R¸¸A¸qÀ!ÓD‰DˆAØ�H‰H�QŒKØ�H‰H�QŽKñ ð
 ˜˜r�U˜G��ä˜–I‰DˆAÜ  Ó&ˆAÜ  Ó&ˆAä”y  qÓ)¨1°Ó3ˆAÜ˜qÓ$ˆAà�M‰M˜!Öñ ð €Mrt   c           
     óà  € V'       g”   V  Uu. uF  p. NK  	  pp\        V4      p	\        V4       Ff  w  r«V'       g   K  \        W	V
,
          WF4      p\        \        WŒ4      4       F,  w  pw  rï\	        WûV4      p\        \        WïV4      WF4      W�&   K.  	  Kh  	  V# \        V4      p	\        WV4      pVR,          VRR pp. . ppV  F<  pVP                  \        VVWV4      4       VP                  \        VVW•V4      4       K>  	  \        VVW•V4      pV^,
          p\        VVW#VVV4      pV Uu. uF  p\        V^VV4      NK  	  pp\        VV4       F  w  pp\        WVWV4      pK  	  \        WWV4      p\!        VP"                  V) .W–4      p\%        W–4      p\'        ^ V4       EF  p\)        W4      '       d    EM\+        VVWV4      p\-        VV^,           VW•V4      p\)        VV4      '       d   KO  \/        VVP1                  V! V4      ^,           4      VV4      p\        VVW#VVV4      p\        V4       F   w  r¯\+        \        V^VV4      VWV4      WÊ&   K"  	  \        \        WŒ4      4       F  w  p
w  rï\3        WïWV4      WŠ&   K  	  \        VV4       F  w  pp\        WVWV4      pK  	  \        WWV4      pEK  	  V Uu. uF  p\        WäWV4      NK  	  ppV# u upi u upi u upi )z4Wang/EEZ: Solve multivariate Diophantine equations. Nr¾   )r   Ú	enumerater  r  r=   rC   r)   r¥   r5   ri   r4   rK   r  r   r8   rD   r   r–   r   r©   r   r.   rL   r@   Ú	factorialr*   )r®   r    rÄ   r‡   r«   rv   rl   r°   r¡   r“   rÎ   rç   r¢   Újrš   r›   r�   r‘   rÅ   rž   rj   rÆ   r  r’   r—   rœ   ro   s   &&&&&&&                    rr   r  r  g  sÏ  € çÙÓ™!�Q‹b™!ˆÐÜ�q‹Mˆä! !ž‰HˆAßÙä" 1¨!¥e¨QÓ2ˆAä&¤s¨1£yÖ1‘	�‘6�AÜ" 1¨QÓ/�Ü ¤¨¨qÓ!1°1Ó8�“ó 2ñ %ðv €Hôc �‹FˆÜ�q˜QÓˆà��u�a˜˜�fˆ1ˆØ�2ˆ1ˆãˆAØ�H‰H”W˜Q  1Ó(Ô)Ø�H‰H”[  A q¨QÓ/Ö0ñ ô ˜˜1˜a AÓ&ˆà��Eˆä˜q ! Q¨1¨a°Ó3ˆÙ-.Ó0©Q¨Œi˜˜1˜a Ö#©QˆÐ0ä˜˜1–I‰DˆAˆqÜ˜A ! QÓ*ŠAñ ô ˜Q 1Ó(ˆä�a—e‘e˜a˜R�[ !Ó'ˆÜ�A‹Mˆä�q˜!—ˆAÜ˜!×ÒÚä˜˜1˜aÓ#ˆAÜ   A¨¥E¨1¨a°AÓ6ˆAä˜a ×#Ô#Ü" 1 a§k¡k±!°A³$¸µ(Ó&;¸QÀÓB�Ü& q¨!¨Q°1°a¸Ó;�ä% ažL‘D�AÜ"¤9¨Q°°1°aÓ#8¸!¸QÓB�A“Dñ )ô "+¬3¨q«9Ö!5‘I�A‘v˜Ü" 1¨Ó.�A“Dñ "6ô    1žI‘D�A�qÜ# A¨!¨QÓ2’Añ &ô % Q¨1Ó0“ñ) ñ, 56Ó7±A¨qÔ˜q QÖ*±AˆÐ7à€Hùò} ùò8 1ùò@ 8s   �K!Ä2K&ËK+c                óè  € V .\        V4      V^,
          r˜p\        V4      p\        \        VR,          4      4       FJ  w  r«\	        V^ ,          W¸V
,
          WZ,
          V4      pVP                  ^ \        WÄWš,
          V4      4       KL  	  \        \        W4      R,          4      p\        \        ^V^,           4      Ws4       EF  w  rìp\        V4      V^,
          ppVRV^,
           W>^,
          R pp\        \        W4      4       FO  w  p
w  pp\        \        VVW–4      VV^,
          V4      pV.\        VR,          ^V^,
          V4      ,           W&   KQ  	  \        VP                  V) .VV4      p\        VV4      p\!        V\#        VVV4      VV4      p\%        VVV4      p\        ^ V4       EF  p\'        VV4      '       d    EK  \)        VVVV4      p\+        VV^,           VVVV4      p\'        VV^,
          4      '       d   KZ  \-        VVP/                  V! V4      ^,           4      V^,
          V4      p\1        VVVWÔV^,
          V4      p\        \        VV4      4       F;  w  p
w  pp\3        V\        V^V^,
          V4      VVV4      p\        VVVV4      W&   K=  	  \!        V\#        VVV4      VV4      p\        VVVV4      pEK   	  EK  	  \#        WV4      V 8w  d   \4        hV# )z-Wang/EEZ: Parallel Hensel lifting algorithm. rÔ   N)r¥   Úlistr  r  rK   râ   rD   Úmaxr   r  r©   rJ   r   r   r–   r   r,   r5   r   r   r.   rL   r@   r  r  r6   r\   )rj   rŸ   ÚLCrÄ   r«   rv   rl   r¡   r“   r  rÎ   r‘   rš   r‡   r   rž   ÚwÚIr  r™   r�   r—   rœ   r    Údjro   rÆ   r¢   r›   s   &&&&&&&                      rr   Údmp_zz_wang_hensel_liftingr(  «  s¡  € àˆc”3�q“6˜1˜q�5ˆ!€AäˆQ‹€Aäœ( 1 R¥5›/Ö*‰ˆÜ˜˜!�˜a Q¥¨­¨qÓ1ˆØ	�‰�Ô$ Q¨1­5°!Ó4Ö5ñ +ô 	ŒO˜AÓ! "Õ%Ó&€Aä”u˜Q  A¥“¨×-‰ˆˆaÜ�A‹w˜˜A�ˆ1ˆà��!�a•%ˆy˜! �E˜F˜)ˆ1ˆä#¤C¨£JÖ/‰JˆA‰w��2Ü!¤-°°A°qÓ"<¸aÀÀQÅÈÓJˆBØ�4œ) A b¥E¨1¨a°!­e°QÓ7Õ7ˆA‹Dñ 0ô �a—e‘e˜a˜R�[ ! QÓ'ˆÜ�A�q‹Mˆä�A”z ! Q¨Ó*¨A¨qÓ1ˆä˜1˜a Ó#ˆä�q˜"—ˆAÜ˜!˜Q×ÒÛä˜˜1˜a Ó#ˆAÜ   A¨¥E¨1¨a°°AÓ6ˆAä˜a  Q¥×'Ô'Ü" 1 a§k¡k±!°A³$¸µ(Ó&;¸QÀ½UÀAÓF�Ü& q¨!¨Q°°a¸!µe¸QÓ?�ä!*¬3¨q°!«9Ö!5‘I�A‘v˜˜1Ü# A¤y°°A°q¸1µu¸aÓ'@À!ÀQÈÓJ�AÜ+¨A¨q°!°QÓ7�A“Dñ "6ô ˜Aœz¨!¨Q°Ó2°A°qÓ9�Ü$ Q¨¨1¨aÓ0“ô! ñ! .ôD �!˜Ó˜aÔÜÐàˆrt   c           
     ó"  € ^ RI Hp \        V4      p\        \	        W4      V^,
          V4      w  rx\        WV4      p	V! V! V	4      4      p
Vf   V^8X  d   ^pM^p\        4       . VP                  .V,          R3w  r¼rÞ \        WW}W4      w  ppp\        VV4      w  pp\        V4      pV^8X  d   V .# VVVVV3.p\        R4      p\        R4      p\        R4      p\        V4      V8  dï   \        V4       FÔ  p\        V4       Uu. uF  pV! V! V) V4      4      NK  	  pp\        V4      V9  d   VP                  \        V4      4       MKX   \        WW}W4      w  ppp\        TT4      w  pp\        T4      pTe   TT8w  d   TT8  d   . TrìMKœ  MTpT^8X  d   T .u # TP!                  TTTTT34       \        T4      T8X  g   KÓ   Kñ  	  VV,          pKþ  R^ ^ pppV F0  w  p   p\#        VV4      pVe   VV8  d   TpTpMTpV^,          pK2  	  VV,          w  pppppT p \%        WVVVWÑV4      w  p pp\'        V VVWÚW4      p. pT FP  p \-        YT4      w  pp TP/                  \1        YT4      4      '       d   \3        YT4      p TP!                  T 4       KR  	  T#   \         d     ELøi ; iu upi   \         d     EKÔ  i ; i  \(         d4    \        R4      '       d   \+        TYT^,           4      u # \)        R4      hi ; i)a  
Factor primitive square-free polynomials in `Z[X]`.

Given a multivariate polynomial `f` in `Z[x_1,...,x_n]`, which is
primitive and square-free in `x_1`, computes factorization of `f` into
irreducibles over integers.

The procedure is based on Wang's Enhanced Extended Zassenhaus
algorithm. The algorithm works by viewing `f` as a univariate polynomial
in `Z[x_2,...,x_n][x_1]`, for which an evaluation mapping is computed::

                  x_2 -> a_2, ..., x_n -> a_n

where `a_i`, for `i = 2, \dots, n`, are carefully chosen integers.  The
mapping is used to transform `f` into a univariate polynomial in `Z[x_1]`,
which can be factored efficiently using Zassenhaus algorithm. The last
step is to lift univariate factors to obtain true multivariate
factors. For this purpose a parallel Hensel lifting procedure is used.

The parameter ``seed`` is passed to _randint and can be used to seed randint
(when an integer) or (for testing purposes) can be a sequence of numbers.

References
==========

.. [1] [Wang78]_
.. [2] [Geddes92]_

)Ú	nextprimeNÚEEZ_NUMBER_OF_CONFIGSÚEEZ_NUMBER_OF_TRIESÚEEZ_MODULUS_STEPÚEEZ_RESTART_IF_NEEDEDz3we need to restart algorithm with better parameters)r¿   r*  r   Údmp_zz_factorr   r”   rÃ   Úzeror  rþ   r¥   r_   r[   r©   ÚtupleÚaddri   r:   r  r(  r\   Údmp_zz_wangrI   rã   r   r(   ) rj   rv   rl   ÚmodÚseedr*  Úrandintr
  r¢   r’   r«   ÚhistoryÚconfigsrÄ   rq   r	  rš   r  r°   rŸ   Úeez_num_configsÚeez_num_triesÚeez_mod_stepÚrrÚs_normÚs_argrÎ   Ú_s_normÚorig_fr$  rk   rm   s    &&&&&                           rr   r3  r3  ß  sR  € õ< (ä�t‹n€Gäœ& ›,¨¨A­¨qÓ1�E€Bä˜a AÓ&€AÙ	‰)�A‹,‹€Aà
‚{Ø�Œ6Ø‰CàˆCä ›U B¨¯©¨°­
°DÐ8Ñ€G�aðÜ*¨1°¸Ó=‰ˆˆAˆqä   AÓ&‰ˆˆ1ä�‹Fˆà�Œ6Ø�3ˆJà�r˜1˜a Ð#Ð$ˆô Ð3Ó4€OÜÐ/Ó0€MÜÐ+Ó,€Lä
ˆg‹,˜Ô
(Ü�}Ö%ˆAÜ16°q´Ó;±¨A‘!‘G˜S˜D #Ó&Ö'±ˆAÐ;ä�Q‹x˜wÔ&Ø—‘œE !›HÕ%áðÜ2°1¸ÀÓE‘��A�qô % Q¨Ó*‰DˆAˆqä�Q“ˆBàŠ}Ø˜”7Ø˜A”vØ%'¨¡á ð	 ð �à�AŒvØ�s’
à�N‰N˜A˜r 1 a¨Ð+Ô,ä�7‹|˜Ö.ÚñA &ðD �<ÕŠCà˜Q �1ˆE€Fã ‰ˆˆ1ˆa��AÜ˜q !Ó$ˆàÒØ˜ÔØ �Ø�øàˆFà	ˆQ�Šñ !ð ˜U•^�N€A€rˆ1ˆa�Ø€FðGÜ*¨1°°Q¸¸1ÀÓC‰ˆˆ1ˆbÜ,¨Q°°2°q¸QÓBˆð €FãˆÜ# A¨!Ó,‰ˆˆ1à�=‰=œ q¨QÓ/×0Ò0Ü˜˜aÓ ˆAà�‰�aÖñ ð €Møôc ô Úðüò <øô $ô Ûðûô\ ô GÜÐ(×)Ò)Ü˜v q¨S°1­WÓ5Ò5ä#ØEóGð Gð	GúsB   Á?4J& Â4J& ÄJ8ÅJ=È)#K Ê&J5Ê4J5Ê=KËKË0LÌLc                óŠ  € V'       g   \        W4      # \        W4      '       d   VP                  . 3# \        WV4      w  r4\	        WAV4      ^ 8  d   V) \        WAV4      rC\        ;QJ d%    R \        WA4       4       F  '       d   K   RM	  RM! R \        WA4       4       4      '       d   V. 3# \        WAV4      w  rT. p\        WA4      ^ 8”  d%   \        WAV4      p\        WAV4      p\        WW4      p\        WQ^,
          V4      ^,           F  w  rHVP                  ^ V.V34       K  	  \        WV4       V\!        V4      3# )aˆ  
Factor (non square-free) polynomials in `Z[X]`.

Given a multivariate polynomial `f` in `Z[x]` computes its complete
factorization `f_1, \dots, f_n` into irreducibles over integers::

             f = content(f) f_1**k_1 ... f_n**k_n

The factorization is computed by reducing the input polynomial
into a primitive square-free polynomial and factoring it using
Enhanced Extended Zassenhaus (EEZ) algorithm. Trial division
is used to recover the multiplicities of factors.

The result is returned as a tuple consisting of::

         (content(f), [(f_1, k_1), ..., (f_n, k_n))

Consider polynomial `f = 2*(x**2 - y**2)`::

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

    >>> R.dmp_zz_factor(2*x**2 - 2*y**2)
    (2, [(x - y, 1), (x + y, 1)])

In result we got the following factorization::

                f = 2 (x - y) (x + y)

References
==========

.. [1] [Gathen99]_

c              3   ó*   "  € T F	  q^ 8*  x € K  	  R# 5i©rì   Nr|   ©r~   r‡   s   & rr   r€   Ú dmp_zz_factor.<locals>.<genexpr>œ  ó   é € Ð
1Ñ0�a�Ž6Ó0ùó   ‚FT)r  r   r0  rI   r   r(   r  r   rP   r   rW   r3  rw   r/  râ   rY   rZ   )	rj   rv   rl   rý   r˜   rž   rk   rŸ   ro   s	   &&&      rr   r/  r/  m  s   € ÷H Ü˜QÓ"Ð"ä�!×ÒØ�v‰v�rˆzÐä" 1¨Ó+�G€Dä�Q˜1Ó Ô!Ø�%œ  qÓ)ˆaç
ƒsÑ
1œ?¨1Ô0Ó
1‡s‡s‚sÑ
1œ?¨1Ô0Ó
1×1Ò1Ø�Rˆxˆä˜˜qÓ!�D€Aà€Gä�!Ó˜!ÔÜ˜˜qÓ!ˆÜ˜˜aÓ ˆÜ$ Q¨1Ó0ˆä˜a Q¥¨Ó*¨1×-Ð-‰ˆØ�‰�q˜A˜3 ˜(Ö#ñ .ô �q˜WÔ%à”˜wÓ'Ð'Ð'rt   c           	     óÊ   € VP                  4       p\        WV4      p \        W4      w  r4V UUu. uF  w  rV\        WRV4      V3NK  	  pppVP                  W24      pW43# u uppi )z>Factor univariate polynomials into irreducibles in `QQ_I[x]`. )Úas_AlgebraicFieldr   rá   rÁ   )rj   ræ   ÚK1rç   rk   r  rÎ   s   &&     rr   Údup_qq_i_factorrK  °  sh   € ð 
×	Ñ	Ó	€BÜ�A˜2Ó€AÜ$ QÓ+�N€EÙ;BÔC¹7±°”˜C RÓ(¨!Ó,¹7€GÑCØ�J‰J�uÓ!€EØˆ>Ðùó Ds   ¯Ac                óF  € VP                  4       p\        WV4      p \        W4      w  r4. pV F[  w  rg\        Wb4      w  r‰\        W’V4      p
\	        V
^ V4      w  r¼W;V,          ,          W‡,          ,          pVP                  WÇ34       K]  	  TpVP                  W24      pW43# )z>Factor univariate polynomials into irreducibles in `ZZ_I[x]`. )Ú	get_fieldr   rK  rA   rI   ri   rÁ   )rj   ræ   rJ  rç   rk   Únew_factorsr  rÎ   Ú	fac_denomÚfac_numÚfac_num_ZZ_IÚcontentÚfac_prims   &&           rr   Údup_zz_i_factorrT  »  s¢   € ð 
�‰‹€BÜ�A˜2Ó€AÜ$ QÓ+�N€Eà€KÛ‰ˆä-¨cÓ6Ñˆ	Ü" 7°Ó3ˆÜ0°¸qÀ"ÓEÑˆà A�Õ%¨)­.Õ8ˆØ×Ñ˜H˜=Ö)ñ ð €GØ�J‰J�uÓ!€EØˆ>Ðrt   c           
     óÌ   € VP                  4       p\        WW#4      p \        WV4      w  rEV UUu. uF  w  rg\        WaW24      V3NK  	  pppVP                  WC4      pWE3# u uppi )z@Factor multivariate polynomials into irreducibles in `QQ_I[X]`. )rI  r   Údmp_factor_listrÁ   )rj   rv   ræ   rJ  rç   rk   r  rÎ   s   &&&     rr   Údmp_qq_i_factorrW  Ñ  sj   € ð 
×	Ñ	Ó	€BÜ�A˜"Ó!€AÜ$ Q¨2Ó.�N€EÙ>EÔF¹g±F°C”˜C BÓ+¨QÓ/¹g€GÑFØ�J‰J�uÓ!€EØˆ>Ðùó Gs   °A c                óH  € VP                  4       p\        WW#4      p \        WV4      w  rE. pV F[  w  rx\        WqV4      w  rš\        W¡W24      p\	        W±V4      w  rÍWLV,          ,          W˜,          ,          pVP                  WØ34       K]  	  TpVP                  WC4      pWE3# )z@Factor multivariate polynomials into irreducibles in `ZZ_I[X]`. )rM  r   rW  rB   rI   ri   rÁ   )rj   rv   ræ   rJ  rç   rk   rN  r  rÎ   rO  rP  rQ  rR  rS  s   &&&           rr   Údmp_zz_i_factorrY  Ü  s¤   € ð 
�‰‹€BÜ�A˜"Ó!€AÜ$ Q¨2Ó.�N€Eà€KÛ‰ˆä-¨c°bÓ9Ñˆ	Ü" 7¨rÓ6ˆÜ0°À"ÓEÑˆà A�Õ%¨)­.Õ8ˆØ×Ñ˜H˜=Ö)ñ ð €GØ�J‰J�uÓ!€EØˆ>Ðrt   c                ó  € \        V 4      \        W4      r2\        W4      p V^ 8:  d   V. 3# V^8X  d   W0^3.3# \        W4      T r@\	        W4      w  rVp\        WqP                  4      p\        V4      ^8X  d   W0V\        V 4      ,          3.3# WQP                  ,          p	\        V4       F=  w  p
w  r¼\        W±P                  V4      p\        WÖV4      w  rÜp\        WÙV4      pWØV
&   K?  	  \        WHV4      p\        WH4       W83# )aŽ  Factor univariate polynomials over algebraic number fields.

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

Examples
========

First define the algebraic number field `K = \mathbb{Q}(\sqrt{2})`:

>>> from sympy import QQ, sqrt
>>> from sympy.polys.factortools import dup_ext_factor
>>> K = QQ.algebraic_field(sqrt(2))

We can now factorise the polynomial `x^2 - 2` over `K`:

>>> p = [K(1), K(0), K(-2)] # x^2 - 2
>>> p1 = [K(1), -K.unit]    # x - sqrt(2)
>>> p2 = [K(1), +K.unit]    # x + sqrt(2)
>>> dup_ext_factor(p, K) == (K.one, [(p1, 1), (p2, 1)])
True

Usually this would be done at a higher level:

>>> from sympy import factor
>>> from sympy.abc import x
>>> factor(x**2 - 2, extension=sqrt(2))
(x - sqrt(2))*(x + sqrt(2))

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

Uses Trager's algorithm. In particular this function is algorithm
``alg_factor`` from [Trager76]_.

If `f` is a polynomial in `k(a)[x]` then its norm `g(x)` is a polynomial in
`k[x]`. If `g(x)` is square-free and has irreducible factors `g_1(x)`,
`g_2(x)`, `\cdots` then the irreducible factors of `f` in `k(a)[x]` are
given by `f_i(x) = \gcd(f(x), g_i(x))` where the GCD is computed in
`k(a)[x]`.

The first step in Trager's algorithm is to find an integer shift `s` so
that `f(x-sa)` has square-free norm. Then the norm is factorized in `k[x]`
and the GCD of (shifted) `f` with each factor gives the shifted factors of
`f`. At the end the shift is undone to recover the unshifted factors of `f`
in `k(a)[x]`.

The algorithm reduces the problem of factorization in `k(a)[x]` to
factorization in `k[x]` with the main additional steps being to compute the
norm (a resultant calculation in `k[x,y]`) and some polynomial GCDs in
`k(a)[x]`.

In practice in SymPy the base field `k` will be the rationals :ref:`QQ` and
this function factorizes a polynomial with coefficients in an algebraic
number field  like `\mathbb{Q}(\sqrt{2})`.

See Also
========

dmp_ext_factor:
    Analogous function for multivariate polynomials over ``k(a)``.
dup_sqf_norm:
    Subroutine ``sqfr_norm`` also from [Trager76]_.
sympy.polys.polytools.factor:
    The high-level function that ultimately uses this function as needed.
)r   r   rF   rV   rT   Údup_factor_list_includeÚdomr¥   Úunitr  r   rQ   rM   rs   rX   )rj   rl   r“   r�   r®   rš   r˜   rq   rk   rŸ   rÎ   rn   r°   r™   s   &&            rr   Údup_ext_factorr^  ò  s  € ôD �q‹Mœ6 !›<€rä�!‹€AàˆA„vØ�2ˆvˆØˆA„vØ˜�F�8ˆ|Ðä˜Ó˜q€qÜ˜1Ó �G€Aˆ!ä% a¯©Ó/€Gä
ˆ7ƒ|�qÔØ˜œ: a›=Õ(Ð)Ð*Ð*Ð*à	�&‰&�€Aä# GÖ,‰ˆ‰;ˆFÜ˜§¡ qÓ)ˆÜ  aÓ(‰ˆˆaÜ�a˜AÓˆØ�‹
ñ	 -ô ! ¨QÓ/€Gä�qÔ"àˆ;Ðrt   c                ó   € V'       g   \        W4      # \        WV4      p\        WV4      p \        ;QJ d%    R \	        W4       4       F  '       d   K   RM	  RM! R \	        W4       4       4      '       d   V. 3# \        WV4      T r@\        WV4      w  rVp\        WqVP                  4      p\        V4      ^8X  d   V .pMn\        V4       F_  w  p	w  r«\        W¡VP                  V4      p\        WÆW4      w  rËpV Uu. uF  qÝVP                  ,          NK  	  pp\        WÎW4      pWÈV	&   Ka  	  \        WHW4      p\!        WAV4       W?3# u upi )a.  Factor multivariate polynomials over algebraic number fields.

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

Examples
========

First define the algebraic number field `K = \mathbb{Q}(\sqrt{2})`:

>>> from sympy import QQ, sqrt
>>> from sympy.polys.factortools import dmp_ext_factor
>>> K = QQ.algebraic_field(sqrt(2))

We can now factorise the polynomial `x^2 y^2 - 2` over `K`:

>>> p = [[K(1),K(0),K(0)], [], [K(-2)]] # x**2*y**2 - 2
>>> p1 = [[K(1),K(0)], [-K.unit]]       # x*y - sqrt(2)
>>> p2 = [[K(1),K(0)], [+K.unit]]       # x*y + sqrt(2)
>>> dmp_ext_factor(p, 1, K) == (K.one, [(p1, 1), (p2, 1)])
True

Usually this would be done at a higher level:

>>> from sympy import factor
>>> from sympy.abc import x, y
>>> factor(x**2*y**2 - 2, extension=sqrt(2))
(x*y - sqrt(2))*(x*y + sqrt(2))

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

This is Trager's algorithm for multivariate polynomials. In particular this
function is algorithm ``alg_factor`` from [Trager76]_.

See :func:`dup_ext_factor` for explanation.

See Also
========

dup_ext_factor:
    Analogous function for univariate polynomials over ``k(a)``.
dmp_sqf_norm:
    Multivariate version of subroutine ``sqfr_norm`` also from [Trager76]_.
sympy.polys.polytools.factor:
    The high-level function that ultimately uses this function as needed.
c              3   ó*   "  € T F	  q^ 8*  x € K  	  R# 5irC  r|   rD  s   & rr   r€   Ú!dmp_ext_factor.<locals>.<genexpr>‰  rF  rG  FT)r^  r   rG   r  r   rW   rU   Údmp_factor_list_includer\  r¥   r  r   rR   r]  rN   rw   rY   )rj   rv   rl   r�   r®   rš   r˜   rq   rk   rÎ   rn   r°   r™   Úsir‘   rm   s   &&&             rr   Údmp_ext_factorrd  T  s+  € ÷^ Ü˜aÓ#Ð#ä	�q˜QÓ	€BÜ˜˜qÓ!€Aç
ƒsÑ
1œ?¨1Ô0Ó
1‡s‡s‚sÑ
1œ?¨1Ô0Ó
1×1Ò1Ø�2ˆvˆä˜˜aÓ  !€qÜ˜1 Ó#�G€Aˆ!ä% a¨A¯E©EÓ2€Gä
ˆ7ƒ|�qÔØ�#‰ä'¨Ö0‰NˆA‰{�Ü˜F q§u¡u¨aÓ0ˆAÜ# A¨!Ó/‰GˆA�!Ù%&Ó'¡Q˜r�A—F‘F—�¡QˆAÐ'Ü˜! Ó%ˆAØ�A‹Jñ 1ô   ¨AÓ1€Fä�q˜VÔ$àˆ:Ðùò (s   Ã?Ec                ó  € \        WVP                  4      p \        WP                  VP                  4      w  r#\	        V4       F"  w  pw  r\        WP                  V4      V3W4&   K$  	  VP                  W!P                  4      V3# )z2Factor univariate polynomials over finite fields. )r   r\  r   r4  r  rÁ   )rj   rl   rç   rk   rÎ   ro   s   &&    rr   Údup_gf_factorrf  ¢  sn   € ä�A˜!Ÿ%™%Ó €Aä˜q§%¡%¨¯©Ó/�N€Eä˜wÖ'‰	ˆ‰6ˆAÜ! !§U¡U¨AÓ.°Ð2ˆ‹
ñ (ð �9‰9�UŸE™EÓ" GÐ+Ð+rt   c                ó   € \        R4      h)z4Factor multivariate polynomials over finite fields. z+multivariate polynomials over finite fields)ÚNotImplementedError)rj   rv   rl   s   &&&rr   Údmp_gf_factorri  ®  s   € ä
ÐKÓ
LÐLrt   c                ó°  € \        W4      w  r \        W4      w  r0VP                  '       d   \        W4      w  rEEMWVP                  '       d   \        W4      w  rEEM6VP                  '       d   \        W4      w  rEEMVP                  '       d   \        W4      w  rEEMôVP                  '       g   YP                  4       r\        WV4      p MRpVP                  '       d,   VP                  4       p\        WV4      w  r€\        WV4      p MTpVP                   '       d   \#        W4      w  rEMŽVP$                  '       dk   \'        V ^ V4      w  r	\)        W	VP*                  4      w  rE\-        V4       F  w  p
w  r\/        W	V4      V3WZ&   K  	  VP1                  WGP*                  4      pM\3        RV,          4      hVP                  '       dÅ   \-        V4       F  w  p
w  r\        WV4      V3WZ&   K  	  VP1                  WG4      pVP5                  VX4      pV'       ds   \-        V4       FP  w  p
w  r\7        W4      p\9        WV4      p \        WV4      p W3WZ&   VP;                  WAP=                  WË4      4      pKR  	  VP1                  WA4      pTpV'       d+   VP?                  ^ VP@                  VPB                  .V34       WC,          \E        V4      3# )ú;Factor univariate polynomials into irreducibles in `K[x]`. Nú#factorization not supported over %s)#r%   rH   Úis_FiniteFieldrf  Úis_Algebraicr^  Úis_GaussianRingrT  Úis_GaussianFieldrK  Úis_ExactÚ	get_exactr   Úis_Fieldrß   rA   rà   r  Úis_Polyr#   rV  r\  r  r$   rÁ   r]   Úquor:   r?   ÚmulÚpowrâ   r–   r0  rZ   )rj   ræ   r   rý   rç   rk   Ú
K0_inexactrl   Údenomrv   rÎ   ro   Úmax_norms   &&           rr   rá   rá   ³  s]  € ä˜Ó�D€AÜ˜AÓ"�G€Dà	××ÐÜ& qÓ-‰ˆ‰wØ	��ˆÜ'¨Ó.‰ˆ‰wØ	×	×	Ð	Ü(¨Ó/‰ˆ‰wØ	×	×	Ð	Ü(¨Ó/‰ˆ‰wà�{�{ˆ{Ø§¡£˜Ü˜A¨2Ó.‰AàˆJà�;�;ˆ;Ø—‘“ˆAä'¨¨qÓ1‰HˆEÜ˜A 1Ó%‰AàˆAà�7�7ˆ7Ü*¨1Ó0‰NˆE�7Ø�Y�YˆYÜ˜a  AÓ&‰DˆAä,¨Q°1·5±5Ó9‰NˆEä& wÖ/‘	�‘6�AÜ'¨¨aÓ0°!Ð4�“
ñ 0ð —I‘I˜e§U¡UÓ+‰EäÐCÀbÕHÓIÐIà�;�;ˆ;Ü& wÖ/‘	�‘6�AÜ)¨!°Ó3°QÐ7�“
ñ 0ð —J‘J˜uÓ(ˆEØ—F‘F˜5 %Ó(ˆEçÜ!*¨7Ö!3‘I�A‘v˜Ü+¨AÓ2�HÜ& q°BÓ7�AÜ# A¨:Ó6�AØ"# �G‘JØŸF™F 5¯&©&°Ó*=Ó>’Eñ "4ð #×*Ñ*¨5Ó5�Ø�çØ�‰�q˜BŸF™F B§G¡GÐ,¨aÐ0Ô1à�:”} WÓ-Ð-Ð-rt   c                ó¾   € \        W4      w  r#V'       g   \        V.4      ^3.# \        V^ ,          ^ ,          W!4      pWC^ ,          ^,          3.VR,          ,           # )rk  rÔ   )rá   r   r=   )rj   rl   rç   rk   r˜   s   &&   rr   r[  r[  õ  sW   € ä$ QÓ*�N€EçÜ˜E˜7Ó# QÐ'Ð(Ð(ä˜7 1�: a�=¨%Ó3ˆØ˜A•J˜q•MÐ"Ð# g¨b¥kÕ1Ð1rt   c           	     óÖ  € V'       g   \        W4      # \        WV4      w  r0\        WV4      w  r@VP                  '       d   \	        WV4      w  rVEM‘VP
                  '       d   \        WV4      w  rVEMoVP                  '       d   \        WV4      w  rVEMMVP                  '       d   \        WV4      w  rVEM+VP                  '       g   Y"P                  4       r'\        WWr4      p MRpVP                  '       d,   VP                  4       p\!        WW(4      w  r�\        WW(4      p MTpVP"                  '       dF   \%        WV4      w  r p\'        WV4      w  rV\)        V4       F  w  pw  r\+        W
W¸4      V3Wl&   K  	  M�VP,                  '       dj   \/        WV4      w  r\1        WVP2                  4      w  rV\)        V4       F  w  pw  r\5        WV4      V3Wl&   K  	  VP7                  WXP2                  4      pM\9        RV,          4      hVP                  '       dÆ   \)        V4       F  w  pw  r\        WW‚4      V3Wl&   K  	  VP7                  WX4      pVP;                  VX	4      pV'       dt   \)        V4       FQ  w  pw  r\=        WV4      p\?        WW4      p \        WW'4      p W3Wl&   VPA                  WRPC                  Wí4      4      pKS  	  VP7                  WR4      pTp\)        \E        V4      4       F]  w  rÏV'       g   K  RW,
          ,          R,           RV,          ,           VPF                  /pVPI                  ^ \K        VW4      V34       K_  	  WT,          \M        V4      3# )ú=Factor multivariate polynomials into irreducibles in `K[X]`. Nrl  )rì   r¸   )'rá   r&   rI   rm  ri  rn  rd  ro  rY  rp  rW  rq  rr  r   rs  rß   rB   rà   r!   r/  r  r"   rt  r#   rV  r\  r$   rÁ   r]   ru  r;   r@   rv  rw  r  r–   râ   r   rZ   )rj   rv   ræ   r  rý   rç   rk   rx  rl   ry  Úlevelsr  rÎ   ro   rz  r   Úterms   &&&              rr   rV  rV     så  € çÜ˜qÓ%Ð%ä˜˜rÓ"�D€AÜ" 1¨Ó,�G€Dà	××ÐÜ& q¨RÓ0‰ˆ‰wØ	��ˆÜ'¨¨bÓ1‰ˆ‰wØ	×	×	Ð	Ü(¨¨rÓ2‰ˆ‰wØ	×	×	Ð	Ü(¨¨rÓ2‰ˆ‰wà�{�{ˆ{Ø§¡£˜Ü˜A *Ó1‰AàˆJà�;�;ˆ;Ø—‘“ˆAä'¨¨bÓ4‰HˆEÜ˜A "Ó(‰AàˆAà�7�7ˆ7Ü& q¨QÓ/‰LˆF�qÜ*¨1°Ó3‰NˆEä& wÖ/‘	�‘6�AÜ)¨!°QÓ:¸AÐ>�“
ò 0à�Y�YˆYÜ˜a AÓ&‰DˆAä,¨Q°1·5±5Ó9‰NˆEä& wÖ/‘	�‘6�AÜ'¨¨aÓ0°!Ð4�“
ñ 0ð —I‘I˜e§U¡UÓ+‰EäÐCÀbÕHÓIÐIà�;�;ˆ;Ü& wÖ/‘	�‘6�AÜ)¨!°Ó6¸Ð:�“
ñ 0ð —J‘J˜uÓ(ˆEØ—F‘F˜5 %Ó(ˆEçÜ!*¨7Ö!3‘I�A‘v˜Ü+¨A°"Ó5�HÜ& q°AÓ:�AÜ# A¨"Ó9�AØ"# �G‘JØŸF™F 5¯&©&°Ó*=Ó>’Eñ "4ð #×*Ñ*¨5Ó5�Ø�äœ( 1›+Ö&‰ˆßÙà�a•e•˜tÕ# d¨1¥fÕ,¨b¯f©fÐ5ˆØ�‰�qœ=¨¨qÓ5°qÐ9Ö:ñ 'ð �:”} WÓ-Ð-Ð-rt   c                óæ   € V'       g   \        W4      # \        WV4      w  r4V'       g   \        W14      ^3.# \        V^ ,          ^ ,          W1V4      pWT^ ,          ^,          3.VR,          ,           # )r}  rÔ   )r[  rV  r   r>   )rj   rv   rl   rç   rk   r˜   s   &&&   rr   rb  rb  M  sg   € çÜ& qÓ,Ð,ä$ Q¨1Ó-�N€EçÜ˜EÓ% qÐ)Ð*Ð*ä˜7 1�: a�=¨%°AÓ6ˆØ˜A•J˜q•MÐ"Ð# g¨b¥kÕ1Ð1rt   c                ó   € \        V ^ V4      # )zS
Returns ``True`` if a univariate polynomial ``f`` has no factors
over its domain.
)Údmp_irreducible_p)rj   rl   s   &&rr   Údup_irreducible_prƒ  [  s   € ô
 ˜Q  1Ó%Ð%rt   c                óv   € \        WV4      w  r4V'       g   R# \        V4      ^8”  d   R# V^ ,          w  r5V^8H  # )zU
Returns ``True`` if a multivariate polynomial ``f`` has no factors
over its domain.
TF)rV  r¥   )rj   rv   rl   r°   rk   ro   s   &&&   rr   r‚  r‚  c  s;   € ô
 !  qÓ)�J€AçÙÜ	ˆW‹˜Ô	Ùà�q�z‰ˆØ�A‰vˆrt   )F)NN)šÚ__doc__Úsympy.external.gmpyr   Úsympy.core.randomr   Úsympy.polys.galoistoolsr   r   r   r   r   r	   r
   r   r   r   r   Úsympy.polys.densebasicr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   Úsympy.polys.densearithr'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   Úsympy.polys.densetoolsrA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   Úsympy.polys.euclidtoolsrP   rQ   rR   Úsympy.polys.sqfreetoolsrS   rT   rU   rV   rW   rX   rY   Úsympy.polys.polyutilsrZ   Úsympy.polys.polyconfigr[   Úsympy.polys.polyerrorsr\   r]   r^   r_   Úsympy.utilitiesr`   Úmathra   rƒ   rb   rÀ   rc   r¨   rd   re   rs   rw   r�   r”   r£   rª   r´   rÒ   rÛ   rä   rê   rï   rø   rþ   r  r  r  r  r  r  r(  r3  r/  rK  rT  rW  rY  r^  rd  rf  ri  rá   r[  rV  rb  rƒ  r‚  r|   rt   rr   Ú<module>r“     sŸ  ðÙ @å ,å &÷÷ ÷ ñ ÷"÷ "÷ "÷ "÷ "÷ "ó "÷"$÷ $÷ $÷ $÷ $÷ $÷ $÷$&÷ &÷ &÷ &ñ &÷"ñ "÷÷ ñ õ 0Ý (÷Fó Fõ $ç :Ñ :ð �7ÔÞà€Iò!ò8!ò8:òx%ò6òr75òròfòRô Pòf	òò )òX8ò:Qòhò(*ò43òl-ò`AòH1ôhKò\@(òFòò,òò,_òDKò\	,òMò
?.òD2òJ.òZ2ò&ôrt   