1 | initial version |
Well, there is a method "composite_fields" for number fields:
sage: x=polygen(QQ,'x')
sage: K1=NumberField(x*x-2,'a')
sage: K2=CyclotomicField(8,'b')
sage: K2.subfield(K2.gen()+K2.gen().conjugate())
(Number Field in b0 with defining polynomial x^2 - 2, Ring morphism:
From: Number Field in b0 with defining polynomial x^2 - 2
To: Cyclotomic Field of order 8 and degree 4
Defn: b0 |--> -b^3 + b)
sage: K3=K2.subfield(K2.gen()+K2.gen().conjugate())[0]; K3
Number Field in b0 with defining polynomial x^2 - 2
sage: K3.composite_fields(K1)
[Number Field in b0 with defining polynomial x^2 - 2]