ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 02 Apr 2016 19:04:53 +0200To check whether a given ideal of an order is principal or nothttps://ask.sagemath.org/question/32527/to-check-whether-a-given-ideal-of-an-order-is-principal-or-not/ Suppose $\theta$ is a root of a irreducible monic polynomial $f$ of degree $n$. (In practice, I would like to deal with $n=3$ case.) Then, define the ideal class group of $\mathbb{Z}[\theta]$, $C(\mathbb{Z}[\theta])$ by the set of invertible fractional ideals modulo principal ideals.
Given a polynomial $f$ and a fractional ideal $I$ of $\mathbb{Z}[\theta]$, is there any way to decide I is principal or not? Thu, 11 Feb 2016 15:53:14 +0100https://ask.sagemath.org/question/32527/to-check-whether-a-given-ideal-of-an-order-is-principal-or-not/Answer by B r u n o for <p>Suppose $\theta$ is a root of a irreducible monic polynomial $f$ of degree $n$. (In practice, I would like to deal with $n=3$ case.) Then, define the ideal class group of $\mathbb{Z}[\theta]$, $C(\mathbb{Z}[\theta])$ by the set of invertible fractional ideals modulo principal ideals. </p>
<p>Given a polynomial $f$ and a fractional ideal $I$ of $\mathbb{Z}[\theta]$, is there any way to decide I is principal or not? </p>
https://ask.sagemath.org/question/32527/to-check-whether-a-given-ideal-of-an-order-is-principal-or-not/?answer=32962#post-id-32962The reference manual gives [the solution](http://doc.sagemath.org/html/en/reference/number_fields/sage/rings/number_field/number_field_ideal_rel.html#sage.rings.number_field.number_field_ideal_rel.NumberFieldFractionalIdeal_rel.is_principal) (if I understand you question correctly):
sage: K.<a, b> = NumberField([x^2 - 23, x^2 + 1])
sage: I = K.ideal([7, (-1/2*b - 3/2)*a + 3/2*b + 9/2])
sage: I.is_principal()
True
sage: I
Fractional ideal ((1/2*b + 1/2)*a - 3/2*b - 3/2)Sat, 02 Apr 2016 19:04:53 +0200https://ask.sagemath.org/question/32527/to-check-whether-a-given-ideal-of-an-order-is-principal-or-not/?answer=32962#post-id-32962