1 | initial version |
There is a simple approach that consists in using number_field_elements_from_algebraics
sage: from sage.rings.qqbar import number_field_elements_from_algebraics
sage: number_field_elements_from_algebraics([alpha, beta])
sage: K, (a,b), phi = number_field_elements_from_algebraics([alpha, beta])
sage: K # the field
Number Field in a with defining polynomial y^6 + 12*y^4 + 36*y^2 + 707
sage: a # alpha in K
1/90*a^4 + 1/9*a^2 + 1/2*a + 8/45
sage: b # beta in K
1/90a^4 + 1/9a^2 - 1/2*a + 8/45 sage: phi(a) == alpha and phi(b) == beta # phi is the embedding K -> QQbar True
2 | No.2 Revision |
There is a simple approach that consists in using number_field_elements_from_algebraics
sage: from sage.rings.qqbar import number_field_elements_from_algebraics
sage: number_field_elements_from_algebraics([alpha, beta])
sage: K, (a,b), phi = number_field_elements_from_algebraics([alpha, beta])
sage: K # the field
Number Field in a with defining polynomial y^6 + 12*y^4 + 36*y^2 + 707
sage: a # alpha in K
1/90*a^4 + 1/9*a^2 + 1/2*a + 8/45
sage: b # beta in K
1/90a^4 1/90*a^4 + 1/9a^2 1/9*a^2 - 1/2*a + 8/45
sage: phi(a) == alpha and phi(b) == beta # phi is the embedding K -> QQbar
True