# Subgroup of unit group

k = CyclotomicField(5)
U = k.unit_group()
v = U.gens()
u = U.gens_values()
T1 = U.subgroup([v[0]])
T2 = U.subgroup([u[0]])


This code attempts to generate a subgroup of the unit group of $\mathbb{Q}(\zeta_{5})$. The subgroup call for T1 works fine. The one for T2 breaks. This is close to bug #18863 that was already fixed, but this version of the problem persists.

The elements of u are recognized as elements of the group U. Still, Sage is unable to compute the subgroup generated by those elements. For my use case, it's important to manipulate the elements of u as elements in the field (including addition), which I don't think I can do with the elements of v.

edit retag close merge delete

( 2022-02-02 23:34:10 +0200 )edit

Sort by ยป oldest newest most voted

It would be nice if the conversion (from number field element to element of the "abstract" unit group) was automated. Currently you can just do the conversion into the abstract group manually:

sage: U.subgroup([U(-u[0]^3 + u[1]^2 - u[1] + 1)])
Multiplicative Abelian subgroup isomorphic to C2 x C5 generated by {u0^9}
sage: zeta5 = k.gen()
sage: U.subgroup([U(zeta5^3 + zeta5^2 + zeta5 + 1)])
Multiplicative Abelian subgroup isomorphic to C2 x C5 generated by {u0^9}

more

I see! That's perfect, thank you.

( 2022-02-03 17:10:57 +0200 )edit

@rburing quick follow up if that's ok - how can I determine the index of the subgroup inside U, and find coset representatives? I've scanned the documentation and couldn't see suitable methods. Checking individual elements of U for being included in the subgroup doesn't seem to work consistently either. Happy to start a separate question if that's better.

( 2022-02-03 20:35:01 +0200 )edit
2

( 2022-02-04 00:31:45 +0200 )edit