This repository was archived by the owner on Jan 30, 2023. It is now read-only.
File tree 1 file changed +22
-4
lines changed
src/sage/rings/polynomial
1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -9696,6 +9696,15 @@ cdef class Polynomial(CommutativeAlgebraElement):
9696
9696
False
9697
9697
sage: R( 0) . divides( R( 0))
9698
9698
True
9699
+ sage: S. <y> = R[]
9700
+ sage: p = x * y** 2 + ( 2* x + 1) * y + x + 1
9701
+ sage: q = ( x + 1) * y + ( 3* x + 2)
9702
+ sage: q. divides( p)
9703
+ False
9704
+ sage: q. divides( p * q)
9705
+ True
9706
+
9707
+ TESTS::
9699
9708
sage: R. <x> = PolynomialRing( ZZ, implementation="NTL")
9700
9709
sage: ( 2* x + 1) . divides( 4* x** 2 + 1)
9701
9710
False
@@ -9704,10 +9713,19 @@ cdef class Polynomial(CommutativeAlgebraElement):
9704
9713
sage: S. <y> = R[]
9705
9714
sage: p = (( 3* z + 2) * x + 2* z - 1) * y + 2* x + z
9706
9715
sage: q = y^ 2 + z* y* x + 2* y + z
9707
- sage: p. divides( q)
9708
- False
9709
- sage: p. divides( p* q)
9710
- True
9716
+ sage: p. divides( q) , p. divides( p* q)
9717
+ ( False, True)
9718
+ sage: R. <x,y> = GF( 2) []
9719
+ sage: S. <z> = R[]
9720
+ sage: p = ( x+ y+ 1) * z + x* y
9721
+ sage: q = ( y^ 2-x^ 2) * z^ 2 + z + x-y
9722
+ sage: p. divides( q) , p. divides( p* q)
9723
+ ( False, True)
9724
+ sage: R. <x> = Zmod( 6) []
9725
+ sage: p = 4* x + 3
9726
+ sage: q = 5* x** 2 + x + 2
9727
+ sage: p. divides( q) , p. divides( p* q)
9728
+ ( False, True)
9711
9729
"""
9712
9730
if p.is_zero(): return True # everything divides 0
9713
9731
if self .is_zero(): return False # 0 only divides 0
You can’t perform that action at this time.
0 commit comments