1 | initial version |
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:
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)]