Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 017adb6

Browse files
committed
16613: Add content_ideal().gen() example
1 parent 6453fc4 commit 017adb6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/sage/rings/polynomial/polynomial_element.pyx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8847,6 +8847,14 @@ cdef class Polynomial(CommutativeAlgebraElement):
88478847
sage: f = x^4 + 3*x^2 + 2
88488848
sage: f.content_ideal()
88498849
Ideal (2, 3, 1) of Ring of integers modulo 4
8850+
8851+
When the base ring is a gcd ring, the content as a ring element is
8852+
the generator of the content ideal::
8853+
8854+
sage: R.<x> = ZZ[]
8855+
sage: f = 2*x^3 - 4*x^2 + 6*x - 10
8856+
sage: f.content_ideal().gen()
8857+
2
88508858
"""
88518859
return self.base_ring().ideal(self.coefficients())
88528860

0 commit comments

Comments
 (0)