Compute common number field of algebraic numbers
Suppose we have a list of algebraic numbers, e.g., a1,a2,a3
in QQbar
. I want to compute the minimal number field K
which contains all these algebraic numbers and I want to get the minimal polynomial of a1,a2,a3
in K
. How can I do this?
I know how to convert one element from QQbar
to a number field element, e.g.,
sage: a = [QQbar(sqrt(3)), QQbar(sqrt(17)), QQbar(sqrt(5))]
sage: Ka, aK, emb = a[0].as_number_field_element()
sage: aK.absolute_minpoly()
x^2 - 3
I can also define the common number field
sage: K.<u> = NumberField([ai.minpoly() for ai in a])
But now I have no idea how to convert for instance a[0]
to an element of K
.
Did you check what is
K
? It does not look like a common number field. Resultants may come handy for this problem: https://en.wikipedia.org/wiki/Resulta...