Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

lifting elements of a subgroup to the parent group

The following code defines a subgroup G of the unit group U of $\mathbb{Z}_{19}$:

Zn = Zmod(19)
U = Zn.unit_group()
print('U:',U)
u = U.gens()[0]
G = U.subgroup([u^3])
print('G:',G)
L = list(G)
print('L:',L)

and prints:

U: Multiplicative Abelian group isomorphic to C18
G: Multiplicative Abelian subgroup isomorphic to C2 x C3 generated by {f^3}
L: [1, f1, f1^2, f0, f0*f1, f0*f1^2]

How can I lift elements of G to U and then to Zn? For example, running U(L[0]) gives:

TypeError: 'AbelianGroup_subgroup_with_category.element_class' object is not iterable