Miscellaneous utilities¶
-
sage.rings.misc.
composite_field
(K, L)¶ Return a canonical field that contains both \(K\) and \(L\), if possible. Otherwise, raise a ValueError.
- INPUT:
- K – field L – field
- OUTPUT:
- field
- EXAMPLES:
- sage: composite_field(QQ,QQbar) doctest:...: DeprecationWarning: The function composite_field() is deprecated. Use get_coercion_model().common_parent() instead See http://trac.sagemath.org/19415 for details. Algebraic Field sage: composite_field(QQ,QQ[sqrt(2)]) Number Field in sqrt2 with defining polynomial x^2 - 2 sage: composite_field(QQ,QQ) Rational Field sage: composite_field(QQ,GF(7)) Traceback (most recent call last): ... ValueError: unable to find a common field