ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 02 May 2015 21:24:45 -0500Factor base of class group computationhttp://ask.sagemath.org/question/26696/factor-base-of-class-group-computation/After calculating the class group using SAGE's .class_group() functionality, is there any way to find out the internal details of the calculation such as the factor base of prime ideals that was used, similar to the output given by PARI's bnfinit command? Or is the only way to just do the class group calculation by calling PARI's bnfinit command directly?Thu, 30 Apr 2015 20:39:15 -0500http://ask.sagemath.org/question/26696/factor-base-of-class-group-computation/Answer by Francis Clarke for <p>After calculating the class group using SAGE's .class_group() functionality, is there any way to find out the internal details of the calculation such as the factor base of prime ideals that was used, similar to the output given by PARI's bnfinit command? Or is the only way to just do the class group calculation by calling PARI's bnfinit command directly?</p>
http://ask.sagemath.org/question/26696/factor-base-of-class-group-computation/?answer=26704#post-id-26704The following does involve calling PARI's bnfinit. But for a number field K, K.class_group() calls bnfinit, the output of which is cached. The factor base used can be recovered as follows:
sage: K.<a> = NumberField(x^3 - 11)
sage: map(K.ideal, K.pari_bnf()[4])
[Fractional ideal (2, a + 1),
Fractional ideal (5, a - 1),
Fractional ideal (-a + 2),
Fractional ideal (2, a^2 + a + 1),
Fractional ideal (a)]
Sat, 02 May 2015 11:47:09 -0500http://ask.sagemath.org/question/26696/factor-base-of-class-group-computation/?answer=26704#post-id-26704Comment by JM for <p>The following does involve calling PARI's bnfinit. But for a number field K, K.class_group() calls bnfinit, the output of which is cached. The factor base used can be recovered as follows:</p>
<pre><code>sage: K.<a> = NumberField(x^3 - 11)
sage: map(K.ideal, K.pari_bnf()[4])
[Fractional ideal (2, a + 1),
Fractional ideal (5, a - 1),
Fractional ideal (-a + 2),
Fractional ideal (2, a^2 + a + 1),
Fractional ideal (a)]
</code></pre>
http://ask.sagemath.org/question/26696/factor-base-of-class-group-computation/?comment=26706#post-id-26706Thank you! I didn't know about .pari_bnf(). When I ran gp.bnfinit() on my number field, I got an error (with a warning about the field not being weakly super solvable). But K.pari_bnf() worked like a charm. Thanks!Sat, 02 May 2015 21:24:45 -0500http://ask.sagemath.org/question/26696/factor-base-of-class-group-computation/?comment=26706#post-id-26706