# Find elements of left coset ZZ_6/{0,3}

If I have a group G = (ZZ_6,+), i.e. the integers modulo 6 under addition, and a subgroup of G, H = ({0,3}, +), how can I find G/H with sage?

edit retag close merge delete

Sort by » oldest newest most voted

Note that the sage instances corresponding to the ring $(\Bbb Z/6,+,\cdot)$, and to the cyclic abelian group $(C_6,+)$ differ, as it also happens in the mathematical world. The quotient in the category of rings is built w.r.t. an ideal, in our case the ideal is generated by $3\in \Bbb Z/6$. In the category of abelian groups we mod out a subgroup, in our case the subgroup is generated by $3$. Let us construct the quotient in both cases.

In the category of rings, we introduce the ring $R$ by either of...

sage: Integers(6)
Ring of integers modulo 6
sage: Zmod(6)
Ring of integers modulo 6
sage: IntegerModRing(6)
Ring of integers modulo 6


then consider its ideal $J=(3)$, and the quotient:

sage: R = Zmod(6)
sage: R
Ring of integers modulo 6
sage: J = R.ideal(3)
sage: J
Principal ideal (3) of Ring of integers modulo 6
sage: list(R)
[0, 1, 2, 3, 4, 5]
sage: Q = R.quotient(J)
sage: Q
Ring of integers modulo 3
sage: for k in R:
....:     print(f"{k} modulo J is {Q(k)}")
....:
0 modulo J is 0
1 modulo J is 1
2 modulo J is 2
3 modulo J is 0
4 modulo J is 1
5 modulo J is 2
sage:


In the category of abelian groups (and/or in the category of groups) one can construct:

sage: C6.<a> = AbelianGroup(1, [6])
sage: C6
Multiplicative Abelian group isomorphic to C6
sage: # or
sage: C6 = CyclicPermutationGroup(6)
sage: a = C6.gens()[0]
sage: a.order()
6
sage: a
(1,2,3,4,5,6)


And the quotient is...

sage: H = C6.subgroup([a^3])
sage: Q = C6.quotient(H)
sage: Q
Permutation Group with generators [(1,2,3)]


Unfortunately, the version using C6.<a> = AbelianGroup(1, [6]) was leading to a sage crash on my machine while trying to build the quotient with respect to the subgroup H constructed mot-a-mot as above. So just use the construction involving a permutation group.

more