+
    ‹°³jB…  ã                   óÖ  € R 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 ^ RIHtHt R tR tR tR tR tR tR	 tR
 tR tR tR tR tR tR tR t R t!R t"R t#R t$R t%R t&R t'R t(R t)R t*R t+R t,R t-R t.R  t/R! t0R" t1R# t2R$ t3R% t4R& t5R' t6R( t7R) t8R* t9R+ t:R, t;R- t<R. t=R/ t>R0 t?R1 t@R2 tAR3 tBR4 tCR5 tDR6 tER7 tFR8 tGR9 tHR: tIR; tJR< tKR= tLR> tMR? tNR@ tORA tPRB tQRC# )DzEArithmetics for dense recursive polynomials in ``K[x]`` or ``K[X]``. )Ú	dup_sliceÚdup_LCÚdmp_LCÚ
dup_degreeÚ
dmp_degreeÚ	dup_stripÚ	dmp_stripÚ
dmp_zero_pÚdmp_zeroÚ	dmp_one_pÚdmp_oneÚ
dmp_groundÚ	dmp_zeros)ÚExactQuotientFailedÚPolynomialDivisionFailedc                óf  € V'       g   V # \        V 4      pWB,
          ^,
          pW$^,
          8X  d)   \        V ^ ,          V,           .V R,          ,           4      # W$8¼  d*   V.VP                  .W$,
          ,          ,           V ,           # V RV W,          V,           .,           W^,           R ,           # )z³
Add ``c*x**i`` to ``f`` in ``K[x]``.

Examples
========

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

>>> R.dup_add_term(x**2 - 1, ZZ(2), 4)
2*x**4 + x**2 - 1

ºé   NNN©Úlenr   Úzero©ÚfÚcÚiÚKÚnÚms   &&&&  ÚW/home/luca/screen-checking/.venv/lib/python3.14/site-packages/sympy/polys/densearith.pyÚdup_add_termr      s‘   € ÷ ØˆäˆA‹€AØ	���	€Aà��E„zÜ˜!˜A�$ �(˜ a¨¥eÕ+Ó,Ð,àŒ6Ø�3˜!Ÿ&™&˜ 1¥5Õ)Õ)¨AÕ-Ð-à�R�a�5˜A�D 1�H˜:Õ%¨¨a­%¨&¨	Õ1Ð1ó    c                ó´  € V'       g   \        WW$4      # V^,
          p\        W4      '       d   V # \        V 4      pWb,
          ^,
          pW&^,
          8X  d.   \        \	        V ^ ,          WV4      .V R,          ,           V4      # W&8¼  d"   V.\        W&,
          WT4      ,           V ,           # V RV \	        W,          WV4      .,           W^,           R ,           # )z½
Add ``c(x_2..x_u)*x_0**i`` to ``f`` in ``K[X]``.

Examples
========

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

>>> R.dmp_add_term(x*y + 1, 2, 2)
2*x**2 + x*y + 1

r   N)r   r	   r   r   Údmp_addr   ©r   r   r   Úur   Úvr   r   s   &&&&&   r   Údmp_add_termr&   +   s¼   € ÷ Ü˜A !Ó'Ð'à	ˆA�€Aä�!×ÒØˆäˆA‹€AØ	���	€Aà��E„zÜœ' ! A¥$¨¨aÓ0Ð1°A°bµEÕ9¸1Ó=Ð=àŒ6Ø�3œ 1¥5¨!Ó/Õ/°!Õ3Ð3à�R�a�5œG A¥D¨!°Ó2Ð3Õ3°a¸A½¸°iÕ?Ð?r    c                óh  € V'       g   V # \        V 4      pWB,
          ^,
          pW$^,
          8X  d)   \        V ^ ,          V,
          .V R,          ,           4      # W$8¼  d+   V) .VP                  .W$,
          ,          ,           V ,           # V RV W,          V,
          .,           W^,           R ,           # )zº
Subtract ``c*x**i`` from ``f`` in ``K[x]``.

Examples
========

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

>>> R.dup_sub_term(2*x**4 + x**2 - 1, ZZ(2), 4)
x**2 - 1

r   Nr   r   s   &&&&  r   Údup_sub_termr(   M   s“   € ÷ ØˆäˆA‹€AØ	���	€Aà��E„zÜ˜!˜A�$ �(˜ a¨¥eÕ+Ó,Ð,àŒ6Ø�B�4˜1Ÿ6™6˜( A¥EÕ*Õ*¨QÕ.Ð.à�R�a�5˜A�D 1�H˜:Õ%¨¨a­%¨&¨	Õ1Ð1r    c                óÊ  € V'       g   \        W) W$4      # V^,
          p\        W4      '       d   V # \        V 4      pWb,
          ^,
          pW&^,
          8X  d.   \        \	        V ^ ,          WV4      .V R,          ,           V4      # W&8¼  d,   \        WV4      .\        W&,
          WT4      ,           V ,           # V RV \	        W,          WV4      .,           W^,           R ,           # )zÄ
Subtract ``c(x_2..x_u)*x_0**i`` from ``f`` in ``K[X]``.

Examples
========

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

>>> R.dmp_sub_term(2*x**2 + x*y + 1, 2, 2)
x*y + 1

r   N)r   r	   r   r   Údmp_subÚdmp_negr   r#   s   &&&&&   r   Údmp_sub_termr,   j   sÆ   € ÷ Ü˜A˜r 1Ó(Ð(à	ˆA�€Aä�!×ÒØˆäˆA‹€AØ	���	€Aà��E„zÜœ' ! A¥$¨¨aÓ0Ð1°A°bµEÕ9¸1Ó=Ð=àŒ6Ü˜A !Ó$Ð%¬	°!µ%¸Ó(>Õ>ÀÕBÐBà�R�a�5œG A¥D¨!°Ó2Ð3Õ3°a¸A½¸°iÕ?Ð?r    c                ó’   € V'       d	   V '       g   . # V  Uu. uF  qDV,          NK  	  upVP                   .V,          ,           # u upi )z¶
Multiply ``f`` by ``c*x**i`` in ``K[x]``.

Examples
========

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

>>> R.dup_mul_term(x**2 - 1, ZZ(3), 2)
3*x**4 - 3*x**2

©r   )r   r   r   r   Úcfs   &&&& r   Údup_mul_termr0   Œ   s9   € ÷ —AØˆ	á"#Ó%¡!˜B�a—�¡!Ñ%¨¯©¨°­
Õ2Ð2ùÒ%s   —Ac           	     óþ   € V'       g   \        WW$4      # V^,
          p\        W4      '       d   V # \        W4      '       d   \        V4      # V  Uu. uF  p\        WaWT4      NK  	  up\	        W%V4      ,           # u upi )zÍ
Multiply ``f`` by ``c(x_2..x_u)*x_0**i`` in ``K[X]``.

Examples
========

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

>>> R.dmp_mul_term(x**2*y + x, 3*y, 2)
3*x**4*y**2 + 3*x**3*y

)r0   r	   r
   Údmp_mulr   )r   r   r   r$   r   r%   r/   s   &&&&&  r   Údmp_mul_termr3       sm   € ÷ Ü˜A !Ó'Ð'à	ˆA�€Aä�!×ÒØˆÜ�!×ÒÜ˜‹{Ðá01Ó3±¨"”˜ Ö%±Ñ3´iÀÀaÓ6HÕHÐHùÒ3s   ÁA:c                ó   € \        W^ V4      # )zÐ
Add an element of the ground domain to ``f``.

Examples
========

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

>>> R.dup_add_ground(x**3 + 2*x**2 + 3*x + 4, ZZ(4))
x**3 + 2*x**2 + 3*x + 8

)r   ©r   r   r   s   &&&r   Údup_add_groundr6   »   ó   € ô ˜˜a Ó#Ð#r    c                ó>   € \        V \        W^,
          4      ^ W#4      # )zÔ
Add an element of the ground domain to ``f``.

Examples
========

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

>>> R.dmp_add_ground(x**3 + 2*x**2 + 3*x + 4, ZZ(4))
x**3 + 2*x**2 + 3*x + 8

)r&   r   ©r   r   r$   r   s   &&&&r   Údmp_add_groundr:   Ì   ó   € ô ˜œ: a¨Q­Ó/°°AÓ9Ð9r    c                ó   € \        W^ V4      # )zÓ
Subtract an element of the ground domain from ``f``.

Examples
========

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

>>> R.dup_sub_ground(x**3 + 2*x**2 + 3*x + 4, ZZ(4))
x**3 + 2*x**2 + 3*x

)r(   r5   s   &&&r   Údup_sub_groundr=   Ý   r7   r    c                ó>   € \        V \        W^,
          4      ^ W#4      # )z×
Subtract an element of the ground domain from ``f``.

Examples
========

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

>>> R.dmp_sub_ground(x**3 + 2*x**2 + 3*x + 4, ZZ(4))
x**3 + 2*x**2 + 3*x

)r,   r   r9   s   &&&&r   Údmp_sub_groundr?   î   r;   r    c                ó`   € V'       d	   V '       g   . # V  Uu. uF  q3V,          NK  	  up# u upi )zÂ
Multiply ``f`` by a constant value in ``K[x]``.

Examples
========

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

>>> R.dup_mul_ground(x**2 + 2*x - 1, ZZ(3))
3*x**2 + 6*x - 3

© ©r   r   r   r/   s   &&& r   Údup_mul_groundrC   ÿ   s*   € ÷ —AØˆ	á"#Ó%¡!˜B�a—�¡!Ñ%Ð%ùÒ%s   —+c           	     ó~   € V'       g   \        WV4      # V^,
          pV  Uu. uF  p\        WQWC4      NK  	  up# u upi )zº
Multiply ``f`` by a constant value in ``K[X]``.

Examples
========

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

>>> R.dmp_mul_ground(2*x + 2*y, ZZ(3))
6*x + 6*y

)rC   Údmp_mul_ground©r   r   r$   r   r%   r/   s   &&&&  r   rE   rE     s<   € ÷ Ü˜a AÓ&Ð&à	ˆA�€Aá34Ó6±1¨RŒ^˜B 1Ö(±1Ñ6Ð6ùÒ6ó   ¢:c                óä   € V'       g   \        R4      hV '       g   V # VP                  '       d!   V  Uu. uF  q2P                  W14      NK  	  up# V  Uu. uF  q3V,          NK  	  up# u upi u upi )zý
Quotient by a constant in ``K[x]``.

Examples
========

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

>>> R, x = ring("x", ZZ)
>>> R.dup_quo_ground(3*x**2 + 2, ZZ(2))
x**2 + 1

>>> R, x = ring("x", QQ)
>>> R.dup_quo_ground(3*x**2 + 2, QQ(2))
3/2*x**2 + 1

úpolynomial division)ÚZeroDivisionErrorÚis_FieldÚquorB   s   &&& r   Údup_quo_groundrM   )  s`   € ÷$ ÜÐ 5Ó6Ð6ßØˆà‡z‡z€zÙ()Ó+© "—‘�r–©Ñ+Ð+á#$Ó&¡1˜R�q—�¡1Ñ&Ð&ùò ,ùâ&s   ´A(ÁA-c           	     ó~   € V'       g   \        WV4      # V^,
          pV  Uu. uF  p\        WQWC4      NK  	  up# u upi )a  
Quotient by a constant in ``K[X]``.

Examples
========

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

>>> R, x,y = ring("x,y", ZZ)
>>> R.dmp_quo_ground(2*x**2*y + 3*x, ZZ(2))
x**2*y + x

>>> R, x,y = ring("x,y", QQ)
>>> R.dmp_quo_ground(2*x**2*y + 3*x, QQ(2))
x**2*y + 3/2*x

)rM   Údmp_quo_groundrF   s   &&&&  r   rO   rO   F  s<   € ÷$ Ü˜a AÓ&Ð&à	ˆA�€Aá34Ó6±1¨RŒ^˜B 1Ö(±1Ñ6Ð6ùÒ6rG   c                ó†   € V'       g   \        R4      hV '       g   V # V  Uu. uF  q2P                  W14      NK  	  up# u upi )z´
Exact quotient by a constant in ``K[x]``.

Examples
========

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

>>> R.dup_exquo_ground(x**2 + 2, QQ(2))
1/2*x**2 + 1

rI   )rJ   ÚexquorB   s   &&& r   Údup_exquo_groundrR   `  s9   € ÷ ÜÐ 5Ó6Ð6ßØˆá&'Ó)¡a �W‰W�RŽ^¡aÑ)Ð)ùÒ)s   ¢>c           	     ó~   € V'       g   \        WV4      # V^,
          pV  Uu. uF  p\        WQWC4      NK  	  up# u upi )z¾
Exact quotient by a constant in ``K[X]``.

Examples
========

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

>>> R.dmp_exquo_ground(x**2*y + 2*x, QQ(2))
1/2*x**2*y + x

)rR   Údmp_exquo_groundrF   s   &&&&  r   rT   rT   v  s=   € ÷ Ü  aÓ(Ð(à	ˆA�€Aá56Ó8±Q¨rÔ˜b QÖ*±QÑ8Ð8ùÒ8rG   c                óJ   € V '       g   V # WP                   .V,          ,           # )z³
Efficiently multiply ``f`` by ``x**n`` in ``K[x]``.

Examples
========

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

>>> R.dup_lshift(x**2 + 1, 2)
x**4 + x**2

r.   ©r   r   r   s   &&&r   Ú
dup_lshiftrW   Œ  s   € ÷ Øˆà—F‘F�8˜A•:�~Ðr    c                ó   € V RV)  # )zß
Efficiently divide ``f`` by ``x**n`` in ``K[x]``.

Examples
========

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

>>> R.dup_rshift(x**4 + x**2, 2)
x**2 + 1
>>> R.dup_rshift(x**4 + x**2 + 2, 2)
x**2 + 1

NrA   rV   s   &&&r   Ú
dup_rshiftrY      s   € ð  ˆSˆqˆbˆ6€Mr    c                óL   € V  Uu. uF  q!P                  V4      NK  	  up# u upi )z¢
Make all coefficients positive in ``K[x]``.

Examples
========

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

>>> R.dup_abs(x**2 - 1)
x**2 + 1

)Úabs©r   r   Úcoeffs   && r   Údup_absr^   ³  s"   € ñ ()Ó*¡q˜e�U‰U�5Ž\¡qÑ*Ð*ùÒ*s   …!c                ó|   € V'       g   \        W4      # V^,
          pV  Uu. uF  p\        WCV4      NK  	  up# u upi )zª
Make all coefficients positive in ``K[X]``.

Examples
========

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

>>> R.dmp_abs(x**2*y - x)
x**2*y + x

)r^   Údmp_abs©r   r$   r   r%   r/   s   &&&  r   r`   r`   Ä  ó9   € ÷ Ü�q‹}Ðà	ˆA�€Aá)*Ó,© 2ŒW�R˜AÖ©Ñ,Ð,ùÒ,ó   ¡9c                ó0   € V  Uu. uF  q") NK  	  up# u upi )z˜
Negate a polynomial in ``K[x]``.

Examples
========

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

>>> R.dup_neg(x**2 - 1)
-x**2 + 1

rA   r\   s   && r   Údup_negre   Ú  s   € ñ "#Ó$¡˜‹V¡Ñ$Ð$ùÒ$s   …c                ó|   € V'       g   \        W4      # V^,
          pV  Uu. uF  p\        WCV4      NK  	  up# u upi )z 
Negate a polynomial in ``K[X]``.

Examples
========

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

>>> R.dmp_neg(x**2*y - x)
-x**2*y + x

)re   r+   ra   s   &&&  r   r+   r+   ë  rb   rc   c                ó~  € V '       g   V# V'       g   V # \        V 4      p\        V4      pW48X  d/   \        \        W4       UUu. uF  w  rVWV,           NK  	  upp4      # \        W4,
          4      pW48”  d
   V RV WR rMVRV WR rT\        W4       UUu. uF  w  rVWV,           NK  	  upp,           # u uppi u uppi )z¤
Add dense polynomials in ``K[x]``.

Examples
========

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

>>> R.dup_add(x**2 - 1, x - 2)
x**2 + x - 3

N)r   r   Úzipr[   ©	r   Úgr   ÚdfÚdgÚaÚbÚkÚhs	   &&&      r   Údup_addrq     s¯   € ÷ ØˆßØˆä	�A‹€BÜ	�A‹€Bà	„xÜ¬S°¬YÔ8©Y¡T Q˜1Ÿ5˜5©YÒ8Ó9Ð9ä�•‹LˆàŒ7Ø�R�a�5˜!˜B˜%‰qà�R�a�5˜!˜B˜%ˆqà¤s¨1¤yÔ2¡y™t˜q�Q—U�U¡yÒ2Õ2Ð2ùó 9ùó 3s   ÁB3
ÂB9c                óÆ  € V'       g   \        WV4      # \        W4      pV^ 8  d   V# \        W4      pV^ 8  d   V # V^,
          pWE8X  d4   \        \        W4       UUu. uF  w  rx\	        WxWc4      NK  	  uppV4      # \        WE,
          4      p	WE8”  d
   V RV	 W	R r
MVRV	 WR rT
\        W4       UUu. uF  w  rx\	        WxWc4      NK  	  upp,           # u uppi u uppi )z¶
Add dense polynomials in ``K[X]``.

Examples
========

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

>>> R.dmp_add(x**2 + y, x**2*y + x)
x**2*y + x**2 + x + y

N)rq   r   r   rh   r"   r[   ©r   rj   r$   r   rk   rl   r%   rm   rn   ro   rp   s   &&&&       r   r"   r"   $  sÜ   € ÷ Ü�q˜QÓÐä	�AÓ	€Bà	ˆA„vØˆä	�AÓ	€Bà	ˆA„vØˆà	ˆA�€Aà	„xÜ¼3¸q¼9ÔF¹9±4°1œ7 1¨Ö.¹9ÒFÈÓJÐJä�•‹LˆàŒ7Ø�R�a�5˜!˜B˜%‰qà�R�a�5˜!˜B˜%ˆqà´S¸´YÔ@±Y©T¨Q”W˜Q 1Ö(±YÒ@Õ@Ð@ùó Gùó As   ÁC
Â6Cc                ó¤  € V '       g   \        W4      # V'       g   V # \        V 4      p\        V4      pW48X  d/   \        \        W4       UUu. uF  w  rVWV,
          NK  	  upp4      # \	        W4,
          4      pW48”  d
   V RV WR rM\        VRV V4      WR rT\        W4       UUu. uF  w  rVWV,
          NK  	  upp,           # u uppi u uppi )z©
Subtract dense polynomials in ``K[x]``.

Examples
========

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

>>> R.dup_sub(x**2 - 1, x - 2)
x**2 - x + 1

N)re   r   r   rh   r[   ri   s	   &&&      r   Údup_subru   N  s»   € ÷ Ü�q‹}ÐßØˆä	�A‹€BÜ	�A‹€Bà	„xÜ¬S°¬YÔ8©Y¡T Q˜1Ÿ5˜5©YÒ8Ó9Ð9ä�•‹LˆàŒ7Ø�R�a�5˜!˜B˜%‰qä˜1˜R˜a˜5 !Ó$ a¨ eˆqà¤s¨1¤yÔ2¡y™t˜q�Q—U�U¡yÒ2Õ2Ð2ùó 9ùó 3s   ÁC
Â)Cc                óî  € V'       g   \        WV4      # \        W4      pV^ 8  d   \        WV4      # \        W4      pV^ 8  d   V # V^,
          pWE8X  d4   \        \	        W4       UUu. uF  w  rx\        WxWc4      NK  	  uppV4      # \        WE,
          4      p	WE8”  d
   V RV	 W	R r
M\        VRV	 W#4      WR rT
\	        W4       UUu. uF  w  rx\        WxWc4      NK  	  upp,           # u uppi u uppi )z¼
Subtract dense polynomials in ``K[X]``.

Examples
========

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

>>> R.dmp_sub(x**2 + y, x**2*y + x)
-x**2*y + x**2 - x + y

N)ru   r   r+   r   rh   r*   r[   rs   s   &&&&       r   r*   r*   q  së   € ÷ Ü�q˜QÓÐä	�AÓ	€Bà	ˆA„vÜ�q˜QÓÐä	�AÓ	€Bà	ˆA„vØˆà	ˆA�€Aà	„xÜ¼3¸q¼9ÔF¹9±4°1œ7 1¨Ö.¹9ÒFÈÓJÐJä�•‹LˆàŒ7Ø�R�a�5˜!˜B˜%‰qä˜1˜R˜a˜5 !Ó'¨¨2¨ˆqà´S¸´YÔ@±Y©T¨Q”W˜Q 1Ö(±YÒ@Õ@Ð@ùó Gùó As   Á)C+
Ã
C1c                ó0   € \        V \        WV4      V4      # )zÁ
Returns ``f + g*h`` where ``f, g, h`` are in ``K[x]``.

Examples
========

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

>>> R.dup_add_mul(x**2 - 1, x - 2, x + 2)
2*x**2 - 5

)rq   Údup_mul©r   rj   rp   r   s   &&&&r   Údup_add_mulrz   ›  ó   € ô �1”g˜a AÓ&¨Ó*Ð*r    c           	     ó0   € \        V \        WW44      W44      # )zÇ
Returns ``f + g*h`` where ``f, g, h`` are in ``K[X]``.

Examples
========

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

>>> R.dmp_add_mul(x**2 + y, x, x + 2)
2*x**2 + 2*x + y

)r"   r2   ©r   rj   rp   r$   r   s   &&&&&r   Údmp_add_mulr~   ¬  ó   € ô �1”g˜a AÓ)¨1Ó0Ð0r    c                ó0   € \        V \        WV4      V4      # )z¸
Returns ``f - g*h`` where ``f, g, h`` are in ``K[x]``.

Examples
========

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

>>> R.dup_sub_mul(x**2 - 1, x - 2, x + 2)
3

)ru   rx   ry   s   &&&&r   Údup_sub_mulr�   ½  r{   r    c           	     ó0   € \        V \        WW44      W44      # )z¿
Returns ``f - g*h`` where ``f, g, h`` are in ``K[X]``.

Examples
========

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

>>> R.dmp_sub_mul(x**2 + y, x, x + 2)
-2*x + y

)r*   r2   r}   s   &&&&&r   Údmp_sub_mulrƒ   Î  r   r    c           
     ó°  € W8X  d   \        W4      # V '       d	   V'       g   . # \        V 4      p\        V4      p\        W44      ^,           pV^d8  g   VP                  '       g¡   . p\	        ^ W4,           ^,           4       Fv  pVP
                  p\	        \        ^ Wt,
          4      \        W74      ^,           4       F&  p	W€V	,          WV	,
          ,          ,          ,          pK(  	  VP                  V4       Kx  	  \        V4      # V^,          p
\        V ^ W¢4      \        V^ W¢4      rË\        \        W
WR4      W¢4      p\        \        WWR4      W¢4      p\        W¼V4      \        WÞV4      pp\        \        W½V4      \        WÎV4      V4      p\        V\        VVV4      V4      p\        \        V\        VW¢4      V4      \        V^V
,          V4      V4      # )z¢
Multiply dense polynomials in ``K[x]``.

Examples
========

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

>>> R.dup_mul(x - 2, x + 2)
x**2 - 4

)Údup_sqrr   ÚmaxÚis_ExactÚranger   ÚminÚappendr   r   rY   rx   rq   ru   rW   )r   rj   r   rk   rl   r   rp   r   r]   ÚjÚn2ÚflÚglÚfhÚghÚloÚhiÚmids   &&&               r   rx   rx   ß  s…  € ð 	„vÜ�q‹}Ðç—!Øˆ	ä	�A‹€BÜ	�A‹€BäˆB‹�a�€Aàˆ3„w�a—j—j�jØˆä�q˜"�' A�+Ö&ˆAØ—F‘FˆEäœ3˜q !¥&›>¬3¨r«:¸­>Ö:�Ø˜1�˜a A¥�h�Õ&’ñ ;ð �H‰H�UŽOñ 'ô ˜‹|Ðð
 ��Tˆä˜1˜a Ó'¬°1°a¸Ó)?ˆBäœ	 !¨Ó.°Ó6ˆÜœ	 !¨Ó.°Ó6ˆä˜ Ó#¤W¨R°QÓ%7ˆBˆä”g˜b aÓ(¬'°"¸!Ó*<¸aÓ@ˆÜ�cœ7 2 r¨1Ó-¨qÓ1ˆä”w˜r¤:¨c°2Ó#9¸1Ó=Ü! " a¨¥d¨AÓ.°ó3ð 	3r    c                óü  € V'       g   \        WV4      # W8X  d   \        WV4      # \        W4      pV^ 8  d   V # \        W4      pV^ 8  d   V# . V^,
          rv\        ^ WE,           ^,           4       F}  p\	        V4      p	\        \        ^ W…,
          4      \        WH4      ^,           4       F.  p
\        V	\        W
,          WV
,
          ,          Ws4      Ws4      p	K0  	  VP                  V	4       K  	  \        Wb4      # )z¦
Multiply dense polynomials in ``K[X]``.

Examples
========

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

>>> R.dmp_mul(x*y + 1, x)
x**2*y + x

)rx   Údmp_sqrr   rˆ   r
   r†   r‰   r"   r2   rŠ   r   )r   rj   r$   r   rk   rl   rp   r%   r   r]   r‹   s   &&&&       r   r2   r2     sÖ   € ÷ Ü�q˜QÓÐà„vÜ�q˜QÓÐä	�AÓ	€Bà	ˆA„vØˆä	�AÓ	€Bà	ˆA„vØˆàˆq�1�u€qä�1�b•g •kÖ"ˆÜ˜“ˆä”s˜1˜a�f“~¤s¨2£z°A¥~Ö6ˆAÜ˜E¤7¨1­4°°qµ5µ¸1Ó#@À!ÓGŠEñ 7ð 	
�‰�Žñ #ô �Q‹?Ðr    c                ó   € \        V 4      ^,
          . r2\        ^ ^V,          ^,           4       FÓ  pVP                  p\        ^ WB,
          4      p\	        WB4      pWv,
          ^,           pWh^,          ,           ^,
          p\        Wg^,           4       F&  p	WPV	,          WV	,
          ,          ,          ,          pK(  	  WU,          pV^,          '       d   W^,           ,          p
WZ^,          ,          pVP                  V4       KÕ  	  \        V4      # )z¥
Square dense polynomials in ``K[x]``.

Examples
========

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

>>> R.dup_sqr(x**2 + 1)
x**4 + 2*x**2 + 1

)r   rˆ   r   r†   r‰   rŠ   r   )r   r   rk   rp   r   r   ÚjminÚjmaxr   r‹   Úelems   &&         r   r…   r…   C  sÎ   € ô �‹F�Q�J˜ˆä�1�a˜•d˜Q•hÖˆØ�F‰Fˆä�1�a•f‹~ˆÜ�1‹zˆà�K˜!�Oˆà˜1•f�}˜qÕ ˆä�t A�XÖ&ˆAØ�1•�a˜A�•h•ÕŠAñ 'ð 	
�ˆàˆq�5Œ5Ø˜A•X•;ˆDØ�q•�LˆAà	�‰�Žñ'  ô* �Q‹<Ðr    c                óŒ  € V'       g   \        W4      # \        W4      pV^ 8  d   V # . V^,
          rT\        ^ ^V,          ^,           4       Fë  p\        V4      p\	        ^ Wc,
          4      p\        Wc4      p	W˜,
          ^,           p
WŠ^,          ,           ^,
          p	\        W‰^,           4       F.  p\        V\        W,          WV,
          ,          WR4      WR4      pK0  	  \        Wr! ^4      WR4      pV
^,          '       d&   \        W	^,           ,          WR4      p\        W|WR4      pVP                  V4       Kí  	  \        WA4      # )zÐ
Square dense polynomials in ``K[X]``.

Examples
========

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

>>> R.dmp_sqr(x**2 + x*y + y**2)
x**4 + 2*x**3*y + 3*x**2*y**2 + 2*x*y**3 + y**4

)r…   r   rˆ   r
   r†   r‰   r"   r2   rE   r•   rŠ   r   )r   r$   r   rk   rp   r%   r   r   r—   r˜   r   r‹   r™   s   &&&          r   r•   r•   k  s	  € ÷ Ü�q‹}Ðä	�AÓ	€Bà	ˆA„vØˆàˆq�1�u€qä�1�a˜•d˜Q•hÖˆÜ�Q‹Kˆä�1�a•f‹~ˆÜ�1‹zˆà�K˜!�Oˆà˜1•f�}˜qÕ ˆä�t A�XÖ&ˆAÜ˜œ7 1¥4¨¨q­5­°1Ó8¸!Ó?ŠAñ 'ô ˜1˜a ›d AÓ)ˆàˆq�5Œ5Ü˜1 A�X�;¨Ó-ˆDÜ˜ Ó&ˆAà	�‰�Žñ'  ô* �Q‹?Ðr    c                ó*  € V'       g   VP                   .# V^ 8  d   \        R4      hV^8X  g   V '       d   WP                   .8X  d   V # VP                   .p V^,          TrAV^,          '       d   \        W0V4      pV'       g    V# \        W4      p K>  )zµ
Raise ``f`` to the ``n``-th power in ``K[x]``.

Examples
========

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

>>> R.dup_pow(x - 2, 3)
x**3 - 6*x**2 + 12*x - 8

ú+Cannot raise polynomial to a negative power)ÚoneÚ
ValueErrorrx   r…   )r   r   r   rj   r   s   &&&  r   Údup_powrŸ   ›  sƒ   € ÷ Ø—‘ˆwˆØˆ1„uÜÐFÓGÐGØˆA„v—Q˜!§¡˜wœ,Øˆà	
�‰ˆ€Aà
Ø�!�t�Qˆ1àˆq�5Œ5Ü˜˜aÓ ˆAçØð €Hô �A‹MŠr    c                ó`  € V'       g   \        WV4      # V'       g   \        W#4      # V^ 8  d   \        R4      hV^8X  g$   \        W4      '       g   \	        WV4      '       d   V # \        W#4      p V^,          TrQV^,          '       d   \        W@W#4      pV'       g    V# \        WV4      p K?  )zÆ
Raise ``f`` to the ``n``-th power in ``K[X]``.

Examples
========

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

>>> R.dmp_pow(x*y + 1, 3)
x**3*y**3 + 3*x**2*y**2 + 3*x*y + 1

rœ   )rŸ   r   rž   r	   r   r2   r•   )r   r   r$   r   rj   r   s   &&&&  r   Údmp_powr¡   À  s�   € ÷ Ü�q˜QÓÐçÜ�q‹}ÐØˆ1„uÜÐFÓGÐGØˆA„v”˜A×!Ò!¤Y¨q°Q×%7Ò%7Øˆä�‹€Aà
Ø�!�t�Qˆ1àˆq�5Œ5Ü˜˜aÓ#ˆAçØð €Hô �A˜!ÓŠr    c                óê  € \        V 4      p\        V4      p. YrvpV'       g   \        R4      hW48  d   WV3# W4,
          ^,           p\        W4      p	 \        Wb4      p
Wt,
          V^,
          r‹\        WYV4      p\	        WÊW²4      p\        WiV4      p\        WW²4      p\        WÞV4      pT\        V4      rWt8  d   MW8  d   Ks  \        WV4      hW˜,          p\        VVV4      p\        VVV4      pWV3# )z­
Polynomial pseudo-division in ``K[x]``.

Examples
========

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

>>> R.dup_pdiv(x**2 + 1, 2*x - 4)
(2*x + 4, 20)

rI   )r   rJ   r   rC   r   r0   ru   r   )r   rj   r   rk   rl   ÚqÚrÚdrÚNÚlc_gÚlc_rr‹   ÚQÚRÚGÚ_drr   s   &&&              r   Údup_pdivr­   è  sò   € ô 
�A‹€BÜ	�A‹€Bà�1ˆ"€AçÜÐ 5Ó6Ð6Ø	ŒØˆtˆà
��!�€AÜ�!‹<€Dà
Ü�a‹|ˆØ�w˜˜A�ˆ1ä˜1 AÓ&ˆÜ˜ !Ó'ˆä˜1 AÓ&ˆÜ˜ !Ó'ˆÜ�A˜!Óˆà”j “mˆRàŒ7ØØ–(Ü*¨1°Ó3Ð3à�€Aä�q˜!˜QÓ€AÜ�q˜!˜QÓ€Aàˆ4€Kr    c                ó�  € \        V 4      p\        V4      pYreV'       g   \        R4      hW48  d   V# W4,
          ^,           p\        W4      p \        WR4      p	Wd,
          V^,
          rz\        WXV4      p\	        WW¢4      p\        W¼V4      pT\        V4      rmWd8  d   MWm8  d   K[  \        WV4      h\        WXV,          V4      # )z£
Polynomial pseudo-remainder in ``K[x]``.

Examples
========

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

>>> R.dup_prem(x**2 + 1, 2*x - 4)
20

rI   )r   rJ   r   rC   r0   ru   r   )r   rj   r   rk   rl   r¤   r¥   r¦   r§   r¨   r‹   rª   r«   r¬   s   &&&           r   Údup_premr¯     s»   € ô 
�A‹€BÜ	�A‹€Bà€rçÜÐ 5Ó6Ð6Ø	ŒØˆà
��!�€AÜ�!‹<€Dà
Ü�a‹|ˆØ�w˜˜A�ˆ1ä˜1 AÓ&ˆÜ˜ !Ó'ˆÜ�A˜!Óˆà”j “mˆRàŒ7ØØ–(Ü*¨1°Ó3Ð3ä˜! 1�W aÓ(Ð(r    c                ó(   € \        WV4      ^ ,          # )zØ
Polynomial exact pseudo-quotient in ``K[X]``.

Examples
========

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

>>> R.dup_pquo(x**2 - 1, 2*x - 2)
2*x + 2

>>> R.dup_pquo(x**2 + 1, 2*x - 4)
2*x + 4

)r­   ©r   rj   r   s   &&&r   Údup_pquor²   J  s   € ô" �A˜!Ó˜QÕÐr    c                óH   € \        WV4      w  r4V'       g   V# \        W4      h)a,  
Polynomial pseudo-quotient in ``K[x]``.

Examples
========

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

>>> R.dup_pexquo(x**2 - 1, 2*x - 2)
2*x + 2

>>> R.dup_pexquo(x**2 + 1, 2*x - 4)
Traceback (most recent call last):
...
ExactQuotientFailed: [2, -4] does not divide [1, 0, 1]

)r­   r   ©r   rj   r   r£   r¤   s   &&&  r   Ú
dup_pexquorµ   ^  s%   € ô& �A˜!Ó�D€AçØˆä! !Ó'Ð'r    c                óJ  € V'       g   \        WV4      # \        W4      p\        W4      pV^ 8  d   \        R4      h\        V4      Yr‡pWE8  d   Wg3# WE,
          ^,           p	\	        W4      p
 \	        Ws4      pW…,
          V	^,
          rœ\        Wj^ W#4      p\        WÛWÂV4      p\        Wz^ W#4      p\        WWÂV4      p\        WïW#4      pT\        Wr4      ppW…8  d   MVV8  d   Ky  \        WV4      h\        W©V^,
          V4      p\        VV^ W#4      p\        VV^ W#4      pWg3# )z¿
Polynomial pseudo-division in ``K[X]``.

Examples
========

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

>>> R.dmp_pdiv(x**2 + x*y, 2*x + 2)
(2*x + 2*y - 2, -4*y + 4)

rI   )
r­   r   rJ   r
   r   r3   r&   r*   r   r¡   )r   rj   r$   r   rk   rl   r£   r¤   r¥   r¦   r§   r¨   r‹   r©   rª   r«   r¬   r   s   &&&&              r   Údmp_pdivr·   y  s(  € ÷ Ü˜˜aÓ Ð ä	�AÓ	€BÜ	�AÓ	€Bà	ˆA„vÜÐ 5Ó6Ð6ä˜‹{˜Aˆ"€Aà	„wØˆtˆà
��!�€AÜ�!‹<€Dà
Ü�a‹|ˆØ�w˜˜A�ˆ1ä˜ ! QÓ*ˆÜ˜ !¨Ó*ˆä˜ ! QÓ*ˆÜ˜ !¨Ó*ˆÜ�A˜!Óˆà”j Ó&ˆRˆàŒ7ØØ�s–(Ü*¨1°Ó3Ð3ä�˜˜Q� Ó"€Aä�Q˜˜1˜aÓ#€AÜ�Q˜˜1˜aÓ#€Aàˆ4€Kr    c                óÖ  € V'       g   \        WV4      # \        W4      p\        W4      pV^ 8  d   \        R4      hYrvWE8  d   V# WE,
          ^,           p\        W4      p	 \        Wc4      p
Wu,
          V^,
          r‹\	        Wi^ W#4      p\	        WW²V4      p\        WÍW#4      pT\        Wb4      r~Wu8  d   MW~8  d   K]  \        WV4      h\        W˜V^,
          V4      p\	        Wo^ W#4      # )z¯
Polynomial pseudo-remainder in ``K[X]``.

Examples
========

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

>>> R.dmp_prem(x**2 + x*y, 2*x + 2)
-4*y + 4

rI   )r¯   r   rJ   r   r3   r*   r   r¡   )r   rj   r$   r   rk   rl   r¤   r¥   r¦   r§   r¨   r‹   rª   r«   r¬   r   s   &&&&            r   Údmp_premr¹   ²  sæ   € ÷ Ü˜˜aÓ Ð ä	�AÓ	€BÜ	�AÓ	€Bà	ˆA„vÜÐ 5Ó6Ð6à€rà	„wØˆà
��!�€AÜ�!‹<€Dà
Ü�a‹|ˆØ�w˜˜A�ˆ1ä˜ ! QÓ*ˆÜ˜ !¨Ó*ˆÜ�A˜!Óˆà”j Ó&ˆRàŒ7ØØ–(Ü*¨1°Ó3Ð3ä�˜˜Q� Ó"€Aä˜˜a Ó&Ð&r    c                ó(   € \        WW#4      ^ ,          # )zú
Polynomial exact pseudo-quotient in ``K[X]``.

Examples
========

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

>>> f = x**2 + x*y
>>> g = 2*x + 2*y
>>> h = 2*x + 2

>>> R.dmp_pquo(f, g)
2*x

>>> R.dmp_pquo(f, h)
2*x + 2*y - 2

)r·   ©r   rj   r$   r   s   &&&&r   Údmp_pquor¼   å  s   € ô* �A˜!Ó Õ"Ð"r    c                óZ   € \        WW#4      w  rE\        WR4      '       d   V# \        W4      h)aS  
Polynomial pseudo-quotient in ``K[X]``.

Examples
========

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

>>> f = x**2 + x*y
>>> g = 2*x + 2*y
>>> h = 2*x + 2

>>> R.dmp_pexquo(f, g)
2*x

>>> R.dmp_pexquo(f, h)
Traceback (most recent call last):
...
ExactQuotientFailed: [[2], [2]] does not divide [[1], [1, 0], []]

)r·   r	   r   ©r   rj   r$   r   r£   r¤   s   &&&&  r   Ú
dmp_pexquor¿   ý  s-   € ô. �A˜!Ó�D€Aä�!×ÒØˆä! !Ó'Ð'r    c                óŽ  € \        V 4      p\        V4      p. YrvpV'       g   \        R4      hW48  d   WV3# \        W4      p \        Wb4      p	W˜,          '       d    WV3# VP                  W˜4      p
Wt,
          p\	        WZW²4      p\        WW²4      p\        WlV4      pT\        V4      r}Wt8  d    WV3# W}8  d   Ky  \        WV4      h)z·
Univariate division with remainder over a ring.

Examples
========

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

>>> R.dup_rr_div(x**2 + 1, 2*x - 4)
(0, x**2 + 1)

rI   )r   rJ   r   rQ   r   r0   ru   r   ©r   rj   r   rk   rl   r£   r¤   r¥   r§   r¨   r   r‹   rp   r¬   s   &&&           r   Ú
dup_rr_divrÂ     sÍ   € ô 
�A‹€BÜ	�A‹€Bà�1ˆ"€AçÜÐ 5Ó6Ð6Ø	ŒØˆtˆä�!‹<€Dà
Ü�a‹|ˆà�;Œ;Øð  ˆ4€Kð �G‰G�DÓˆØ�Gˆä˜˜qÓ$ˆÜ˜˜qÓ$ˆÜ�A˜!Óˆà”j “mˆRàŒ7Øð ˆ4€Kð –(Ü*¨1°Ó3Ð3r    c                óÞ  € V'       g   \        WV4      # \        W4      p\        W4      pV^ 8  d   \        R4      h\        V4      Yr‡pWE8  d   Wg3# \	        W4      V^,
          r© \	        Ws4      p\        W¹W£4      w  rÍ\        WÚ4      '       g    Wg3# W…,
          p\        WlWâV4      p\        WWâV4      p\        WW#4      pT\        Wr4      ppW…8  d    Wg3# VV8  d   K}  \        WV4      h)zÁ
Multivariate division with remainder over a ring.

Examples
========

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

>>> R.dmp_rr_div(x**2 + x*y, 2*x + 2)
(0, x**2 + x*y)

rI   )rÂ   r   rJ   r
   r   Ú
dmp_rr_divr	   r&   r3   r*   r   ©r   rj   r$   r   rk   rl   r£   r¤   r¥   r§   r%   r¨   r   rª   r‹   rp   r¬   s   &&&&             r   rÄ   rÄ   M  óú   € ÷ Ü˜! Ó"Ð"ä	�AÓ	€BÜ	�AÓ	€Bà	ˆA„vÜÐ 5Ó6Ð6ä˜‹{˜Aˆ"€Aà	„wØˆtˆä�Q‹l˜A �Eˆ!à
Ü�a‹|ˆÜ˜$ aÓ+‰ˆä˜!×ÒØð ˆ4€Kð �Gˆä˜˜q QÓ'ˆÜ˜˜q QÓ'ˆÜ�A˜!Óˆà”j Ó&ˆRˆàŒ7Øð ˆ4€Kð �s–(Ü*¨1°Ó3Ð3r    c                óì  € \        V 4      p\        V4      p. YrvpV'       g   \        R4      hW48  d   WV3# \        W4      p \        Wb4      p	VP                  W˜4      p
Wt,
          p\	        WZW²4      p\        WW²4      p\        WlV4      pT\        V4      r}Wt8  d    WV3# W}8X  d<   VP                  '       g*   \        VR,          4      p\        V4      pWt8  d    WV3# K   W}8  d   K¨  \        WV4      h)z¹
Polynomial division with remainder over a field.

Examples
========

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

>>> R.dup_ff_div(x**2 + 1, 2*x - 4)
(1/2*x + 1, 5)

rI   r   )
r   rJ   r   rQ   r   r0   ru   r‡   r   r   rÁ   s   &&&           r   Ú
dup_ff_divrÈ   ‚  sò   € ô 
�A‹€BÜ	�A‹€Bà�1ˆ"€AçÜÐ 5Ó6Ð6Ø	ŒØˆtˆä�!‹<€Dà
Ü�a‹|ˆà�G‰G�DÓˆØ�Gˆä˜˜qÓ$ˆÜ˜˜qÓ$ˆÜ�A˜!Óˆà”j “mˆRàŒ7Øð ˆ4€Kð ŒY˜qŸzŸz˜zä˜!˜B�%Ó ˆAÜ˜A“ˆBØŒwØð ˆ4€Kñ à–(Ü*¨1°Ó3Ð3r    c                óÞ  € V'       g   \        WV4      # \        W4      p\        W4      pV^ 8  d   \        R4      h\        V4      Yr‡pWE8  d   Wg3# \	        W4      V^,
          r© \	        Ws4      p\        W¹W£4      w  rÍ\        WÚ4      '       g    Wg3# W…,
          p\        WlWâV4      p\        WWâV4      p\        WW#4      pT\        Wr4      ppW…8  d    Wg3# VV8  d   K}  \        WV4      h)zÎ
Polynomial division with remainder over a field.

Examples
========

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

>>> R.dmp_ff_div(x**2 + x*y, 2*x + 2)
(1/2*x + 1/2*y - 1/2, -y + 1)

rI   )rÈ   r   rJ   r
   r   Ú
dmp_ff_divr	   r&   r3   r*   r   rÅ   s   &&&&             r   rÊ   rÊ   ¶  rÆ   r    c                óV   € VP                   '       d   \        WV4      # \        WV4      # )a  
Polynomial division with remainder in ``K[x]``.

Examples
========

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

>>> R, x = ring("x", ZZ)
>>> R.dup_div(x**2 + 1, 2*x - 4)
(0, x**2 + 1)

>>> R, x = ring("x", QQ)
>>> R.dup_div(x**2 + 1, 2*x - 4)
(1/2*x + 1, 5)

)rK   rÈ   rÂ   r±   s   &&&r   Údup_divrÌ   ë  s'   € ð$ 	‡z‡z€zÜ˜! Ó"Ð"ä˜! Ó"Ð"r    c                ó(   € \        WV4      ^,          # )zê
Returns polynomial remainder in ``K[x]``.

Examples
========

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

>>> R, x = ring("x", ZZ)
>>> R.dup_rem(x**2 + 1, 2*x - 4)
x**2 + 1

>>> R, x = ring("x", QQ)
>>> R.dup_rem(x**2 + 1, 2*x - 4)
5

©rÌ   r±   s   &&&r   Údup_remrÏ     ó   € ô$ �1˜Ó˜AÕÐr    c                ó(   € \        WV4      ^ ,          # )zð
Returns exact polynomial quotient in ``K[x]``.

Examples
========

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

>>> R, x = ring("x", ZZ)
>>> R.dup_quo(x**2 + 1, 2*x - 4)
0

>>> R, x = ring("x", QQ)
>>> R.dup_quo(x**2 + 1, 2*x - 4)
1/2*x + 1

rÎ   r±   s   &&&r   Údup_quorÒ     rÐ   r    c                óH   € \        WV4      w  r4V'       g   V# \        W4      h)a'  
Returns polynomial quotient in ``K[x]``.

Examples
========

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

>>> R.dup_exquo(x**2 - 1, x - 1)
x + 1

>>> R.dup_exquo(x**2 + 1, 2*x - 4)
Traceback (most recent call last):
...
ExactQuotientFailed: [2, -4] does not divide [1, 0, 1]

)rÌ   r   r´   s   &&&  r   Ú	dup_exquorÔ   -  s%   € ô& �1˜Ó�D€AçØˆä! !Ó'Ð'r    c                óV   € VP                   '       d   \        WW#4      # \        WW#4      # )a  
Polynomial division with remainder in ``K[X]``.

Examples
========

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

>>> R, x,y = ring("x,y", ZZ)
>>> R.dmp_div(x**2 + x*y, 2*x + 2)
(0, x**2 + x*y)

>>> R, x,y = ring("x,y", QQ)
>>> R.dmp_div(x**2 + x*y, 2*x + 2)
(1/2*x + 1/2*y - 1/2, -y + 1)

)rK   rÊ   rÄ   r»   s   &&&&r   Údmp_divrÖ   H  s'   € ð$ 	‡z‡z€zÜ˜! Ó%Ð%ä˜! Ó%Ð%r    c                ó(   € \        WW#4      ^,          # )zý
Returns polynomial remainder in ``K[X]``.

Examples
========

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

>>> R, x,y = ring("x,y", ZZ)
>>> R.dmp_rem(x**2 + x*y, 2*x + 2)
x**2 + x*y

>>> R, x,y = ring("x,y", QQ)
>>> R.dmp_rem(x**2 + x*y, 2*x + 2)
-y + 1

©rÖ   r»   s   &&&&r   Údmp_remrÙ   `  ó   € ô$ �1˜Ó˜qÕ!Ð!r    c                ó(   € \        WW#4      ^ ,          # )a  
Returns exact polynomial quotient in ``K[X]``.

Examples
========

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

>>> R, x,y = ring("x,y", ZZ)
>>> R.dmp_quo(x**2 + x*y, 2*x + 2)
0

>>> R, x,y = ring("x,y", QQ)
>>> R.dmp_quo(x**2 + x*y, 2*x + 2)
1/2*x + 1/2*y - 1/2

rØ   r»   s   &&&&r   Údmp_quorÜ   u  rÚ   r    c                óZ   € \        WW#4      w  rE\        WR4      '       d   V# \        W4      h)aL  
Returns polynomial quotient in ``K[X]``.

Examples
========

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

>>> f = x**2 + x*y
>>> g = x + y
>>> h = 2*x + 2

>>> R.dmp_exquo(f, g)
x

>>> R.dmp_exquo(f, h)
Traceback (most recent call last):
...
ExactQuotientFailed: [[2], [2]] does not divide [[1], [1, 0], []]

)rÖ   r	   r   r¾   s   &&&&  r   Ú	dmp_exquorÞ   Š  s-   € ô. �1˜Ó�D€Aä�!×ÒØˆä! !Ó'Ð'r    c                óR   € V '       g   VP                   # \        \        W4      4      # )z­
Returns maximum norm of a polynomial in ``K[x]``.

Examples
========

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

>>> R.dup_max_norm(-x**2 + 2*x - 3)
3

)r   r†   r^   ©r   r   s   &&r   Údup_max_normrá   ©  ó   € ÷ Ø�v‰vˆä”7˜1“=Ó!Ð!r    c                ól   aa€ V'       g   \        V S4      # V^,
          o\        VV3R lV  4       4      # )z¯
Returns maximum norm of a polynomial in ``K[X]``.

Examples
========

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

>>> R.dmp_max_norm(2*x*y - x - 3)
3

c              3   ó>   <"  € T F  p\        VSS4      x € K  	  R # 5i©N)Údmp_max_norm©Ú.0r   r   r%   s   & €€r   Ú	<genexpr>Údmp_max_norm.<locals>.<genexpr>Ð  s   øé € Ð0©a¨Œ|˜A˜q !×$Ð$«aùó   ƒ)rá   r†   ©r   r$   r   r%   s   &&f@r   ræ   ræ   ½  s/   ù€ ÷ Ü˜A˜qÓ!Ð!à	ˆA�€AäÕ0©aÓ0Ó0Ð0r    c                óR   € V '       g   VP                   # \        \        W4      4      # )z«
Returns l1 norm of a polynomial in ``K[x]``.

Examples
========

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

>>> R.dup_l1_norm(2*x**3 - 3*x**2 + 1)
6

)r   Úsumr^   rà   s   &&r   Údup_l1_normrï   Ó  râ   r    c                ól   aa€ V'       g   \        V S4      # V^,
          o\        VV3R lV  4       4      # )z©
Returns l1 norm of a polynomial in ``K[X]``.

Examples
========

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

>>> R.dmp_l1_norm(2*x*y - x - 3)
6

c              3   ó>   <"  € T F  p\        VSS4      x € K  	  R # 5irå   )Údmp_l1_normrç   s   & €€r   ré   Údmp_l1_norm.<locals>.<genexpr>ú  s   øé € Ð/©Q¨Œ{˜1˜a ×#Ð#«Qùrë   )rï   rî   rì   s   &&f@r   rò   rò   ç  s/   ù€ ÷ Ü˜1˜aÓ Ð à	ˆA�€AäÕ/©QÓ/Ó/Ð/r    c                ód   € \        V  Uu. uF  q"^,          NK  	  upVP                  4      # u upi )z¼
Returns squared l2 norm of a polynomial in ``K[x]``.

Examples
========

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

>>> R.dup_l2_norm_squared(2*x**3 - 3*x**2 + 1)
14

)rî   r   r\   s   && r   Údup_l2_norm_squaredrõ   ý  s+   € ô ¡aÓ(¡a˜U�q—�¡aÑ(¨!¯&©&Ó1Ð1ùÒ(s   Š-c                ól   aa€ V'       g   \        V S4      # V^,
          o\        VV3R lV  4       4      # )zº
Returns squared l2 norm of a polynomial in ``K[X]``.

Examples
========

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

>>> R.dmp_l2_norm_squared(2*x*y - x - 3)
14

c              3   ó>   <"  € T F  p\        VSS4      x € K  	  R # 5irå   )Údmp_l2_norm_squaredrç   s   & €€r   ré   Ú&dmp_l2_norm_squared.<locals>.<genexpr>!  s   øé € Ð7±Q°Ô" 1 a¨×+Ð+³Qùrë   )rõ   rî   rì   s   &&f@r   rø   rø     s/   ù€ ÷ Ü" 1 aÓ(Ð(à	ˆA�€AäÕ7±QÓ7Ó7Ð7r    c                óz   € V '       g   VP                   .# V ^ ,          pV R,           F  p\        W#V4      pK  	  V# )z¸
Multiply together several polynomials in ``K[x]``.

Examples
========

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

>>> R.dup_expand([x**2 - 1, x, 2])
2*x**3 - 2*x

r   )r�   rx   )Úpolysr   r   rj   s   &&  r   Ú
dup_expandrü   $  s>   € ÷ Ø—‘ˆwˆàˆa�€Aà�2�YˆYˆÜ�A˜!ÓŠñ ð €Hr    c                óv   € V '       g   \        W4      # V ^ ,          pV R,           F  p\        W4W4      pK  	  V# )zÏ
Multiply together several polynomials in ``K[X]``.

Examples
========

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

>>> R.dmp_expand([x**2 + y**2, x + 1])
x**3 + x**2 + x*y**2 + y**2

r   )r   r2   )rû   r$   r   r   rj   s   &&&  r   Ú
dmp_expandrþ   =  s=   € ÷ Ü�q‹}Ðàˆa�€Aà�2�YˆYˆÜ�A˜!ÓŠñ ð €Hr    N)RÚ__doc__Úsympy.polys.densebasicr   r   r   r   r   r   r   r	   r
   r   r   r   r   Úsympy.polys.polyerrorsr   r   r   r&   r(   r,   r0   r3   r6   r:   r=   r?   rC   rE   rM   rO   rR   rT   rW   rY   r^   r`   re   r+   rq   r"   ru   r*   rz   r~   r�   rƒ   rx   r2   r…   r•   rŸ   r¡   r­   r¯   r²   rµ   r·   r¹   r¼   r¿   rÂ   rÄ   rÈ   rÊ   rÌ   rÏ   rÒ   rÔ   rÖ   rÙ   rÜ   rÞ   rá   ræ   rï   rò   rõ   rø   rü   rþ   rA   r    r   Ú<module>r     s{  ðÙ K÷÷ ÷ õ ÷ Sò2ò:@òD2ò:@òD3ò(Iò6$ò":ò"$ò":ò"&ò(7ò,'ò:7ò4*ò,9ò,ò(ò&+ò"-ò,%ò"-ò, 3òF'AòT 3òF'AòT+ò"1ò"+ò"1ò"63òr(òV%òP-ò`"òJ%òP2òj*)òZ ò((ò66òr0'òf#ò0(ò>.òb2òj1òh2òj#ò0ò*ò*(ò6&ò0"ò*"ò*(ò>"ò(1ò,"ò(0ò,2ò"8ò,ô2r    