Ask Your Question

Revision history [back]

There is a (not so well advertized) function for that purpose

sage: from sage.rings.qqbar import number_field_elements_from_algebraics
sage: K, (a, b, c), phi = number_field_elements_from_algebraics([sqrt(3), sqrt(2), 2])

The output is - K: a number field containing your elements -(a, b, c): your elements as elements of K - phi: a morphism from K to QQbar

There is a (not so well advertized) function for that purpose

sage: from sage.rings.qqbar import number_field_elements_from_algebraics
sage: K, (a, b, c), phi = number_field_elements_from_algebraics([sqrt(3), sqrt(2), 2])

The output is - is

  • K: a number field containing your elements -(a, b, c): your elements as elements of K
  • -
  • phi: a morphism from K to QQbar

There is a (not so well advertized) function for that purpose

sage: from sage.rings.qqbar import number_field_elements_from_algebraics
sage: K, (a, b, c), phi = number_field_elements_from_algebraics([sqrt(3), sqrt(2), 2])

The output is

  • K: a number field containing your elements -elements
  • (a, b, c): your elements as elements of K
  • phi: a morphism from K to QQbar