We create the category of number fields.
sage: C = NumberFields() sage: C Category of number fields
Notice that the rational numbers
are not considered as
an object in this category.
sage: RationalField() in C False
However, we can define a degree 1 extension of
, which is in
this category.
sage: x = PolynomialRing(RationalField()).gen() sage: K = NumberField(x - 1); K Number Field in x with defining polynomial x - 1 sage: K in C True
We can also coerce
into the category of number fields.
sage: C(RationalField()) Number Field in x with defining polynomial x - 1
Number fields all lie in this category, irregardless of the name of the variable.
sage: K = NumberField(x**2 - 1, name='a') sage: K in C True
__call__,
__contains__
See About this document... for information on suggesting changes.