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.Tue, 05 Dec 2017 19:53:37 +0100Morphism between Klein four group and additive abelian group or order 4https://ask.sagemath.org/question/39941/morphism-between-klein-four-group-and-additive-abelian-group-or-order-4/Hi.
Let's say I have an ideal class C with structure G := C2 x C2.
I want now to construct a morphism phi: G --> C, s.t. phi(g1) = c1 and phi(g2) = c2. Mon, 04 Dec 2017 16:57:26 +0100https://ask.sagemath.org/question/39941/morphism-between-klein-four-group-and-additive-abelian-group-or-order-4/Answer by dan_fulea for <p>Hi.
Let's say I have an ideal class C with structure G := C2 x C2.
I want now to construct a morphism phi: G --> C, s.t. phi(g1) = c1 and phi(g2) = c2. </p>
https://ask.sagemath.org/question/39941/morphism-between-klein-four-group-and-additive-abelian-group-or-order-4/?answer=39955#post-id-39955It is unclear from the context of the question what is `C` and what is `G`.
So the solution will be given in a special case that worked first for me.
(Using `KleinFourGroup()` instead of `C` did not work. The group morphism in the other direction, initialized as we all would expect, did not work. In order to get it, if needed, an explicit python function can be written, which constructs the inverse map as a pedestrian.)
Code:
C.<c1,c2> = AbelianGroup( 2, [2,2] )
print "C is the following group:"
print C
print "\nIts multiplication table is:"
print C.multiplication_table( names='elements' )
F.<u> = QuadraticField( 2015 )
G = F.class_group()
g1, g2 = G.gens()
print "G is the following group:"
print G
phi = AbelianGroupMorphism( C, G, [c1, c2], [g1, g2] )
for c in C.list():
print "phi maps %s into %s" % ( c, phi(c) )
Results:
C is the following group:
Multiplicative Abelian group isomorphic to C2 x C2
Its multiplication table is:
* 1 c2 c1 c1*c2
+------------------------
1| 1 c2 c1 c1*c2
c2| c2 1 c1*c2 c1
c1| c1 c1*c2 1 c2
c1*c2| c1*c2 c1 c2 1
G is the following group:
Class group of order 4 with structure C2 x C2 of Number Field in u with defining polynomial x^2 - 2015
phi maps 1 into 1
phi maps c2 into Fractional ideal class (17, u + 3)
phi maps c1 into Fractional ideal class (19, u + 1)
phi maps c1*c2 into Fractional ideal class (5, u)
**LATER EDIT:**
Here is an other example, it works for a abelian group model `G`, used as an abstract model for the class group. (I could not make it at the first attempt work with `C.permutation_group()`...)
R.<X> = PolynomialRing( QQ )
P = X^4 + 14*X^2 + 46
F.<u> = NumberField( P )
print "F is:\n%s" % F
print "Is F a CM field? %s" % F.is_CM()
C = F.class_group( names='c' )
inv = C.invariants()
G = AbelianGroup( len(inv), inv, names='g' )
print "C is:\n%s\nInvariants: %s\n" % ( C, inv )
print "G is:\n%s\n" % G
c0, c1 = C.gens()
g0, g1 = G.gens()
phi = AbelianGroupMorphism( G, C, [g0, g1], [c0, c1] )
psi = ( lambda c: [ g for g in G if C(phi(g)) == c ][0] )
for g in G:
print "phi(%s) = %s" % ( g, phi(g) )
print
for c in C:
print "psi(%s) = %s" % ( c, psi(c) )
The inverse map is also present. Results:
F is:
Number Field in u with defining polynomial X^4 + 14*X^2 + 46
Is F a CM field? True
C is:
Class group of order 4 with structure C2 x C2 of Number Field in u with defining polynomial X^4 + 14*X^2 + 46
Invariants: (2, 2)
G is:
Multiplicative Abelian group isomorphic to C2 x C2
phi(1) = 1
phi(g1) = Fractional ideal class (13, u - 6)
phi(g0) = Fractional ideal class (11, u - 3)
phi(g0*g1) = Fractional ideal class (2, u)
psi(Trivial principal fractional ideal class) = 1
psi(Fractional ideal class (13, u - 6)) = g1
psi(Fractional ideal class (11, u - 3)) = g0
psi(Fractional ideal class (2, u)) = g0*g1
Tue, 05 Dec 2017 19:25:13 +0100https://ask.sagemath.org/question/39941/morphism-between-klein-four-group-and-additive-abelian-group-or-order-4/?answer=39955#post-id-39955Comment by bd for <p>It is unclear from the context of the question what is <code>C</code> and what is <code>G</code>.
So the solution will be given in a special case that worked first for me. </p>
<p>(Using <code>KleinFourGroup()</code> instead of <code>C</code> did not work. The group morphism in the other direction, initialized as we all would expect, did not work. In order to get it, if needed, an explicit python function can be written, which constructs the inverse map as a pedestrian.)</p>
<p>Code:</p>
<pre><code>C.<c1,c2> = AbelianGroup( 2, [2,2] )
print "C is the following group:"
print C
print "\nIts multiplication table is:"
print C.multiplication_table( names='elements' )
F.<u> = QuadraticField( 2015 )
G = F.class_group()
g1, g2 = G.gens()
print "G is the following group:"
print G
phi = AbelianGroupMorphism( C, G, [c1, c2], [g1, g2] )
for c in C.list():
print "phi maps %s into %s" % ( c, phi(c) )
</code></pre>
<p>Results:</p>
<pre><code>C is the following group:
Multiplicative Abelian group isomorphic to C2 x C2
Its multiplication table is:
* 1 c2 c1 c1*c2
+------------------------
1| 1 c2 c1 c1*c2
c2| c2 1 c1*c2 c1
c1| c1 c1*c2 1 c2
c1*c2| c1*c2 c1 c2 1
G is the following group:
Class group of order 4 with structure C2 x C2 of Number Field in u with defining polynomial x^2 - 2015
phi maps 1 into 1
phi maps c2 into Fractional ideal class (17, u + 3)
phi maps c1 into Fractional ideal class (19, u + 1)
phi maps c1*c2 into Fractional ideal class (5, u)
</code></pre>
<p><strong>LATER EDIT:</strong></p>
<p>Here is an other example, it works for a abelian group model <code>G</code>, used as an abstract model for the class group. (I could not make it at the first attempt work with <code>C.permutation_group()</code>...)</p>
<pre><code>R.<X> = PolynomialRing( QQ )
P = X^4 + 14*X^2 + 46
F.<u> = NumberField( P )
print "F is:\n%s" % F
print "Is F a CM field? %s" % F.is_CM()
C = F.class_group( names='c' )
inv = C.invariants()
G = AbelianGroup( len(inv), inv, names='g' )
print "C is:\n%s\nInvariants: %s\n" % ( C, inv )
print "G is:\n%s\n" % G
c0, c1 = C.gens()
g0, g1 = G.gens()
phi = AbelianGroupMorphism( G, C, [g0, g1], [c0, c1] )
psi = ( lambda c: [ g for g in G if C(phi(g)) == c ][0] )
for g in G:
print "phi(%s) = %s" % ( g, phi(g) )
print
for c in C:
print "psi(%s) = %s" % ( c, psi(c) )
</code></pre>
<p>The inverse map is also present. Results:</p>
<pre><code>F is:
Number Field in u with defining polynomial X^4 + 14*X^2 + 46
Is F a CM field? True
C is:
Class group of order 4 with structure C2 x C2 of Number Field in u with defining polynomial X^4 + 14*X^2 + 46
Invariants: (2, 2)
G is:
Multiplicative Abelian group isomorphic to C2 x C2
phi(1) = 1
phi(g1) = Fractional ideal class (13, u - 6)
phi(g0) = Fractional ideal class (11, u - 3)
phi(g0*g1) = Fractional ideal class (2, u)
psi(Trivial principal fractional ideal class) = 1
psi(Fractional ideal class (13, u - 6)) = g1
psi(Fractional ideal class (11, u - 3)) = g0
psi(Fractional ideal class (2, u)) = g0*g1
</code></pre>
https://ask.sagemath.org/question/39941/morphism-between-klein-four-group-and-additive-abelian-group-or-order-4/?comment=39956#post-id-39956Thank you for the fast answer.
C is the always the class group of a quartic/sextic CM filed and G is the corresponding abstract group "printed by sage". Yes, I assume that I have to construct the inverse image too.Tue, 05 Dec 2017 19:53:37 +0100https://ask.sagemath.org/question/39941/morphism-between-klein-four-group-and-additive-abelian-group-or-order-4/?comment=39956#post-id-39956