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.Wed, 01 Jun 2016 12:37:49 -0500p-part of a class grouphttp://ask.sagemath.org/question/9849/p-part-of-a-class-group/Hi
I am trying to compute the p-part of a class groups of some number fields. I was hoping to just call G.sylow_subgroup(p), but this function is not implemented for Abelian groups. In addition, invariants doesn't seem to work, for example, if G= C6, then G.invariants() returns [6], which doesn't seem correct.
I would appreciate any advice on how to do this. For example, can I coerce an Abelian Group to just be a finite group?
Note: I asked this on IRC without an answer. I hope it is not bad form to ask it here.
Partial Solution: Elementary divisors and some factorization code gives me what I want. However, it would be nice to be able to coerce an abelian group into a group.Mon, 25 Feb 2013 05:09:12 -0600http://ask.sagemath.org/question/9849/p-part-of-a-class-group/Comment by Benjamin Young for <p>Hi</p>
<p>I am trying to compute the p-part of a class groups of some number fields. I was hoping to just call G.sylow_subgroup(p), but this function is not implemented for Abelian groups. In addition, invariants doesn't seem to work, for example, if G= C6, then G.invariants() returns [6], which doesn't seem correct.</p>
<p>I would appreciate any advice on how to do this. For example, can I coerce an Abelian Group to just be a finite group?</p>
<p>Note: I asked this on IRC without an answer. I hope it is not bad form to ask it here.</p>
<p>Partial Solution: Elementary divisors and some factorization code gives me what I want. However, it would be nice to be able to coerce an abelian group into a group.</p>
http://ask.sagemath.org/question/9849/p-part-of-a-class-group/?comment=18116#post-id-18116Could you please post the code that calculates G?Sun, 03 Mar 2013 06:21:10 -0600http://ask.sagemath.org/question/9849/p-part-of-a-class-group/?comment=18116#post-id-18116Answer by nbruin for <p>Hi</p>
<p>I am trying to compute the p-part of a class groups of some number fields. I was hoping to just call G.sylow_subgroup(p), but this function is not implemented for Abelian groups. In addition, invariants doesn't seem to work, for example, if G= C6, then G.invariants() returns [6], which doesn't seem correct.</p>
<p>I would appreciate any advice on how to do this. For example, can I coerce an Abelian Group to just be a finite group?</p>
<p>Note: I asked this on IRC without an answer. I hope it is not bad form to ask it here.</p>
<p>Partial Solution: Elementary divisors and some factorization code gives me what I want. However, it would be nice to be able to coerce an abelian group into a group.</p>
http://ask.sagemath.org/question/9849/p-part-of-a-class-group/?answer=33633#post-id-33633The invariants as returned are in fact correct if you understand them to be the elementary divisors. Were you expecting them to be the concatenation of the invariants of the Sylow subgroups? The elementary divisor interpretation is more canonical.
In any case, the baroque print representation of elements in the class group mean that most of the group functionality (which would call gap via string interfaces) chokes, because the print names of the elements are supposed to be used as identifiers in gap.
The trick is to build an isomorphic (abstract) group and define an isomorphism. It would be nice if it were automated, but once you get through basics it's not that bad:
sage: K.<a>=NumberField(x^2+26)
sage: C=K.class_group()
sage: G=AbelianGroup(C.invariants())
sage: GtoC=G.Hom(C)(lambda a: prod([b^e for e,b in zip(a.list(),C.gens())]))
sage: G.0
f
sage: GtoC(G.0)
Fractional ideal class (5, a + 2)
Many group operations (such as "subgroups") do work on G. Computing Sylow subgroups in finite abelian groups is easy enough to do by hand:
sage: P3=G.subgroup([g^c for g in G.gens()])
sage: N=G.order()
sage: c=(N // 3^(N.valuation(3)))
sage: P3=G.subgroup([g^c for g in G.gens()])
If you prefer, you could also ask for `G=AdditiveAbelianGroups(...)`, which would give you a structure that concentrates more on the Z-module structure of G and misses some of the gap-related functionality.
A lot of these things would be nice to get a little easier. Especially the construction of G and GtoC should perhaps be automated, since the group returned by classgroup is a little hobbled (or perhaps that should be fixed, which would probably be quite a bit of work)Wed, 01 Jun 2016 12:37:49 -0500http://ask.sagemath.org/question/9849/p-part-of-a-class-group/?answer=33633#post-id-33633Answer by lalitkumarj for <p>Hi</p>
<p>I am trying to compute the p-part of a class groups of some number fields. I was hoping to just call G.sylow_subgroup(p), but this function is not implemented for Abelian groups. In addition, invariants doesn't seem to work, for example, if G= C6, then G.invariants() returns [6], which doesn't seem correct.</p>
<p>I would appreciate any advice on how to do this. For example, can I coerce an Abelian Group to just be a finite group?</p>
<p>Note: I asked this on IRC without an answer. I hope it is not bad form to ask it here.</p>
<p>Partial Solution: Elementary divisors and some factorization code gives me what I want. However, it would be nice to be able to coerce an abelian group into a group.</p>
http://ask.sagemath.org/question/9849/p-part-of-a-class-group/?answer=14598#post-id-14598Partial Solution: Elementary divisors and some factorization code gives me what I want. However, it would be nice to be able to coerce an abelian group into a group.
Mon, 25 Feb 2013 08:43:30 -0600http://ask.sagemath.org/question/9849/p-part-of-a-class-group/?answer=14598#post-id-14598