Ideals in Univariate Polynomial Rings¶
AUTHORS:
- David Roe (2009-12-14) – initial version. 
- class sage.rings.polynomial.ideal.Ideal_1poly_field(ring, gens, coerce=True, **kwds)[source]¶
- Bases: - Ideal_pid- An ideal in a univariate polynomial ring over a field. - change_ring(R)[source]¶
- Coerce an ideal into a new ring. - EXAMPLES: - sage: R.<q> = QQ[] sage: I = R.ideal([q^2 + q - 1]) sage: I.change_ring(RR['q']) # needs sage.rings.real_mpfr Principal ideal (q^2 + q - 1.00000000000000) of Univariate Polynomial Ring in q over Real Field with 53 bits of precision - >>> from sage.all import * >>> R = QQ['q']; (q,) = R._first_ngens(1) >>> I = R.ideal([q**Integer(2) + q - Integer(1)]) >>> I.change_ring(RR['q']) # needs sage.rings.real_mpfr Principal ideal (q^2 + q - 1.00000000000000) of Univariate Polynomial Ring in q over Real Field with 53 bits of precision 
 - groebner_basis(algorithm=None)[source]¶
- Return a Gröbner basis for this ideal. - The Gröbner basis has 1 element, namely the generator of the ideal. This trivial method exists for compatibility with multi-variate polynomial rings. - INPUT: - algorithm– ignored
 - EXAMPLES: - sage: R.<x> = QQ[] sage: I = R.ideal([x^2 - 1, x^3 - 1]) sage: G = I.groebner_basis(); G [x - 1] sage: type(G) <class 'sage.rings.polynomial.multi_polynomial_sequence.PolynomialSequence_generic'> sage: list(G) [x - 1] - >>> from sage.all import * >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> I = R.ideal([x**Integer(2) - Integer(1), x**Integer(3) - Integer(1)]) >>> G = I.groebner_basis(); G [x - 1] >>> type(G) <class 'sage.rings.polynomial.multi_polynomial_sequence.PolynomialSequence_generic'> >>> list(G) [x - 1] 
 - residue_class_degree()[source]¶
- Return the degree of the generator of this ideal. - This function is included for compatibility with ideals in rings of integers of number fields. - EXAMPLES: - sage: R.<t> = GF(5)[] sage: P = R.ideal(t^4 + t + 1) sage: P.residue_class_degree() 4 - >>> from sage.all import * >>> R = GF(Integer(5))['t']; (t,) = R._first_ngens(1) >>> P = R.ideal(t**Integer(4) + t + Integer(1)) >>> P.residue_class_degree() 4 
 - residue_field(names=None, check=True)[source]¶
- If this ideal is \(P \subset F_p[t]\), return the quotient \(F_p[t]/P\). - EXAMPLES: - sage: R.<t> = GF(17)[]; P = R.ideal(t^3 + 2*t + 9) sage: k.<a> = P.residue_field(); k # needs sage.rings.finite_rings Residue field in a of Principal ideal (t^3 + 2*t + 9) of Univariate Polynomial Ring in t over Finite Field of size 17 - >>> from sage.all import * >>> R = GF(Integer(17))['t']; (t,) = R._first_ngens(1); P = R.ideal(t**Integer(3) + Integer(2)*t + Integer(9)) >>> k = P.residue_field(names=('a',)); (a,) = k._first_ngens(1); k # needs sage.rings.finite_rings Residue field in a of Principal ideal (t^3 + 2*t + 9) of Univariate Polynomial Ring in t over Finite Field of size 17