Order of an ideal in the class group of a number field

38 views
Skip to first unread message

Victor Miller

unread,
Apr 2, 2013, 3:13:58 PM4/2/13
to sage-s...@googlegroups.com
I have a bunch of ideals in number fields whose orders in the class group I want to calculate.  If K is the number field and a is the ideal, I had been doing something like

H = K.class_group()
print H(a).order()

But if K is a big number field this seems wasteful (and takes a long time), since it computes the whole class group.  Is there any faster way of doing this?

Victor

PS. I notice that there is a method called order for ideals, but it's not implemented.

Jeroen Demeyer

unread,
Apr 3, 2013, 4:09:07 AM4/3/13
to sage-s...@googlegroups.com
On 2013-04-02 21:13, Victor Miller wrote:
> I have a bunch of ideals in number fields whose orders in the class
> group I want to calculate. If K is the number field and a is the ideal,
> I had been doing something like
>
> H = K.class_group()
> print H(a).order()
>
> But if K is a big number field this seems wasteful (and takes a long
> time), since it computes the whole class group.
As far as I know, there is no way to do this without computing the class
group.

John Cremona

unread,
Apr 3, 2013, 4:32:16 AM4/3/13
to SAGE support
If you knew a multiple of the class number, and could factor it, then
you could use that in place of the actual class number.

Certainly, if your ideal was principal and easy to prove as such then
computing the class group would be overkill!

John
> --
> You received this message because you are subscribed to the Google Groups "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
> To post to this group, send email to sage-s...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-support?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Victor Miller

unread,
Apr 10, 2013, 12:33:24 PM4/10/13
to sage-s...@googlegroups.com
John, I agree.  In fact in my case I know a multiple of the order of the ideal.  The ideal is one of norm 2, and I can produce an element of norm 2^k, which is not divisible by 2.  But, I can't find the method to test principality, or to extract the generator.  I would like something like

I.principal_generator()

which would either return None if the ideal wasn't principal (or maybe throw an exception), otherwise it would return a generator.  I'm sure that there's some Pari function to do this, but I don't know what it is.

Victor

John Cremona

unread,
Apr 10, 2013, 12:47:48 PM4/10/13
to SAGE support
On 10 April 2013 17:33, Victor Miller <victor...@gmail.com> wrote:
> John, I agree. In fact in my case I know a multiple of the order of the
> ideal. The ideal is one of norm 2, and I can produce an element of norm
> 2^k, which is not divisible by 2. But, I can't find the method to test
> principality, or to extract the generator. I would like something like
>
> I.principal_generator()
>

I.is_principal() returns True/False and then I.gens_reduced() returns
a list (actually a tuple) of length 1 iff the ideal is principal.

This is a little more complicated than Magma where IsPrincipal returns
either False or True,g with g a generator, but seems unavoidable given
that Sage'sconvention is that the type and number of returned values
should be the same for all inputs.

John
Reply all
Reply to author
Forward
0 new messages