# restricting a NumberField to the reals for the calculation of a Galois group

I am trying to calculate a Galois Group. I have the following code

x=QQbar(7**(1/8))
L.<x>=NumberField(x.minpoly())
G=L.galois_group(names='x')
print(G)


The output is

Galois group of Galois closure in x of Number Field in x with defining polynomial x^8 - 7


I would like to restrict the number field L to the reals. My number field should be non-complex and contain the real root of the minimum polynomial only. How do I acchieve that in my code?

Thanks

edit retag close merge delete

Sort by » oldest newest most voted

The question might be addressed by considering a specific subfield:

 x=QQbar(7**(1/8))
L.<x>=NumberField(x.minpoly())
Ls=L.subfields(degree=2)
print(Ls)
G=Ls.galois_group(names='x')
print(G.list())


In this case, the subfield which is real is of degree 2, seen as a vector space. The number field can be restricted to the reals by considering the appropriate subfield which is a proper subset of the reals. The output of the above code is

[
(Number Field in x0 with defining polynomial x^2 - 7, Ring morphism:
From: Number Field in x0 with defining polynomial x^2 - 7
To:   Number Field in x with defining polynomial x^8 - 7
Defn: x0 |--> -x^4, None)
]
[(), (1,2)]

more

We can ask sage for all subfields, take then those that are totally real among them. This first try gives:

sage: var('x');
sage: L.<a> = NumberField(x^8-7)
sage: [F_data for F_data in L.subfields() if F_data.is_totally_real()]
[(Number Field in a0 with defining polynomial x,
Ring morphism:
From: Number Field in a0 with defining polynomial x
To:   Number Field in a with defining polynomial x^8 - 7
Defn: 0 |--> 0,
None),
(Number Field in a1 with defining polynomial x^2 - 7,
Ring morphism:
From: Number Field in a1 with defining polynomial x^2 - 7
To:   Number Field in a with defining polynomial x^8 - 7
Defn: a1 |--> -a^4,
None)]


So the totally real subfields in the list come with their embeddings. I.e. the F_data is a tuple with three components, the pythonically 0.th component is the field.

The first field listed above is $\Bbb Q=\Bbb Q(0)$, where $0$ is the root of $x$, the second field is the field $\Bbb Q(\sqrt 7)$, where $\sqrt 7$ (considered algebraically) is the root of $x^2-7$. We want the maximal degree, so an idea is to sort w.r.t. the degrees and take the maximal degree. The code doing this is:

sage: var('x');
sage: L.<a> = NumberField(x^8-7)
sage: L_totally_real_subfields = [(F, emb) for (F, emb, _) in L.subfields() if F.is_totally_real()]
sage: L_totally_real_subfields.sort(key=lambda data: data.degree())
sage: L_totally_real_subfields[-1]
(Number Field in a1 with defining polynomial x^2 - 7,
Ring morphism:
From: Number Field in a1 with defining polynomial x^2 - 7
To:   Number Field in a with defining polynomial x^8 - 7
Defn: a1 |--> -a^4)


Let's "do the same" with some nice cyclotomic field...

sage: K.<z> = CyclotomicField(17)
sage: K_totally_real_subfields = [F for (F, emb, _) in K.subfields() if F.is_totally_real()]
sage: len(K_totally_real_subfields)
4
sage: K_totally_real_subfields.sort(key=lambda F: F.degree())
sage: K_totally_real_subfields[-1]
Number Field in z3 with defining polynomial x^8 + x^7 - 7*x^6 - 6*x^5 + 15*x^4 + 10*x^3 - 10*x^2 - 4*x + 1 with z3 = 1.864944458808712?
sage: _.defining_polynomial().roots(ring=QQbar, multiplicities=False)
[-1.965946199367804?,
-1.700434271459229?,
-1.205269272758513?,
-0.5473259801441657?,
0.1845367189266040?,
0.8914767115530766?,
1.478017834441319?,
1.864944458808712?]

more