2
$\begingroup$

Does anyone know how to find explicit generators for the unit group of a number field on magma?

For example, in sage one could do

K. = NumberField(x^3+x^2-2*x-1)

UnitGroup(K).gens()

and it gives you [-1, w^2 - 1, w + 1] which generate the unit group, but I can't figure out how to get this same data in magma.

Alternatively if anyone knows how to tell if something is totally positive in sage, that would work too.

$\endgroup$
4
  • $\begingroup$ You can find information on how to compute groups of units of number fields in Magma in Section Unit Groups of Magma's handbook. $\endgroup$ Commented Apr 20, 2016 at 19:30
  • 2
    $\begingroup$ In gp you could do K=bnfinit(x^3+x^2-2*x-1); U=K.fu; S=bnfsignunit(K) to get a vector U of fundamental units and a matrix S of their real embeddings' signs. Then it just takes a bit of linear algebra mod 2 (possibly using matsolvemod) to construct a basis of totally positive units. $\endgroup$ Commented Apr 20, 2016 at 20:01
  • 1
    $\begingroup$ (and anything that's in gp is automatically accessible by Sage even if there's no native Sage way to do it) $\endgroup$ Commented Apr 20, 2016 at 21:26
  • $\begingroup$ See mathoverflow.net/a/484190/161897 for a discussion of the linear algebra mod 2. $\endgroup$ Commented Dec 15, 2024 at 20:52

1 Answer 1

3
$\begingroup$

In Magma, the unit group is returned as an abstract group together with a map from that group into the field. So you would do something like the following:

> Zx<x> := PolynomialRing(Integers()); > K<w> := NumberField(x^3 + x^2 - 2*x - 1); > G,phi := UnitGroup(K); > G; Abelian Group isomorphic to Z/2 + Z + Z Defined on 3 generators Relations: 2*G.1 = 0 > [ K!phi(G.i) : i in [1..Ngens(G)] ]; [ -1, w, w + 1 ] 

Note a couple of important points here. Firstly, for some reason calling Generators(G) would return a set rather than the more helpful sequence, hence the use of G.i and the loop over Ngens. Secondly, the concept of units is only useful with respect to an order, not the field, so the map phi is actually from G to the maximal order of K. That is why I have inserted the coercion into K, since that seems closer to what you want.

$\endgroup$
0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.