Number field operations
Creation of number fields
General number fields can be created using the function number_field. To create a simple number field given by a defining polynomial or a non-simple number field given by defining polynomials, the following functions can be used.
number_field(f::Poly{NumFieldElem}, s::VarName;
cached::Bool = false, check::Bool = false) -> NumField, NumFieldElemGiven an irreducible polynomial s is used only for printing the primitive element
check: Controls whether irreducibility ofis checked. cached: Controls whether the result is cached.
Examples
julia> K, a = quadratic_field(5);
julia> Kt, t = K["t"];
julia> L, b = number_field(t^3 - 3, "b");number_field(f::Vector{PolyRingElem{<:NumFieldElem}}, s::VarName="_\$", check = true)
-> NumField, Vector{NumFieldElem}Given a list
Examples
julia> Qx, x = QQ["x"];
julia> K, a = number_field([x^2 - 2, x^2 - 3], "a")
(Non-simple number field of degree 4 over QQ, AbsNonSimpleNumFieldElem[a1, a2])Tip
Many of the constructors have arguments of type Symbol or AbstractString. If used, they define the appearance in printing, and printing only. The named parameter check can be true or false, the default being true. This parameter controls whether the polynomials defining the number field are tested for irreducibility or not. Given that this can be potentially very time consuming if the degree if large, one can disable this test. Note however, that the behaviour of Hecke is undefined if a reducible polynomial is used to define a field.
The named boolean parameter cached can be used to disable caching. Two number fields defined using the same polynomial from the identical polynomial ring and the same (identical) symbol/string will be identical if cached == true and different if cached == false.
For frequently used number fields like quadratic fields, cyclotomic fields or radical extensions, the following functions are provided:
cyclotomic_field(n::Int, s::VarName = "z_$n", t = "_\$"; cached::Bool = true)Return a tuple s specifies how the generator of the number field should be printed. If provided, the string t specifies how the generator of the polynomial ring from which the number field is constructed, should be printed. If it is not supplied, a default dollar sign will be used to represent the variable.
quadratic_field(d::IntegerUnion) -> AbsSimpleNumField, AbsSimpleNumFieldElemReturns the field with defining polynomial
Examples
julia> quadratic_field(5)
(Real quadratic field defined by x^2 - 5, sqrt(5))wildanger_field(n::Int, B::ZZRingElem) -> AbsSimpleNumField, AbsSimpleNumFieldElemReturns the field with defining polynomial
Examples
julia> wildanger_field(3, ZZ(10), "a")
(Number field of degree 3 over QQ, a)radical_extension(n::Int, a::NumFieldElem, s = "_$";
check = true, cached = true) -> NumField, NumFieldElemGiven an element
Examples
julia> radical_extension(5, QQ(2), "a")
(Number field of degree 5 over QQ, a)rationals_as_number_field() -> AbsSimpleNumField, AbsSimpleNumFieldElemReturns the rational numbers as the number field defined by
Examples
julia> rationals_as_number_field()
(Number field of degree 1 over QQ, 1)Basic properties
basis(L::SimpleNumField) -> Vector{NumFieldElem}Return the canonical basis of a simple extension
Examples
julia> Qx, x = QQ["x"];
julia> K, a = number_field(x^2 - 2, "a");
julia> basis(K)
2-element Vector{AbsSimpleNumFieldElem}:
1
abasis(L::NonSimpleNumField) -> Vector{NumFieldElem}Returns the canonical basis of a non-simple extension
Examples
julia> Qx, x = QQ["x"];
julia> K, (a1, a2) = number_field([x^2 - 2, x^2 - 3], "a");
julia> basis(K)
4-element Vector{AbsNonSimpleNumFieldElem}:
1
a1
a2
a1*a2absolute_basis(K::NumField) -> Vector{NumFieldElem}Returns an array of elements that form a basis of
defining_polynomial(L::SimpleNumField) -> PolyRingElemGiven a simple number field
defining_polynomials(L::NonSimpleNumField) -> Vector{PolyRingElem}Given a non-simple number field
absolute_primitive_element(K::NumField) -> NumFieldElemGiven a number field
component(L::NonSimpleNumField, i::Int) -> SimpleNumField, MapGiven a non-simple extension
base_field(L::NumField) -> NumFieldGiven a number field
Invariants
degree(L::NumField) -> IntGiven a number field
Examples
julia> Qx, x = QQ["x"];
julia> K, a = number_field(x^2 - 2, "a");
julia> degree(K)
2absolute_degree(L::NumField) -> IntGiven a number field
signature(K::NumField)Return the signature of the number field of
Examples
julia> Qx, x = QQ["x"];
julia> K, a = number_field(x^2 - 2, "a");
julia> signature(K)
(2, 0)unit_group_rank(K::NumField) -> IntReturn the rank of the unit group of any order of
class_number(K::AbsSimpleNumField) -> ZZRingElemReturns the class number of
relative_class_number(K::AbsSimpleNumField) -> ZZRingElemReturns the relative class number of
regulator(K::AbsSimpleNumField)Computes the regulator of
discriminant(L::SimpleNumField) -> NumFieldElemThe discriminant of the defining polynomial of
absolute_discriminant(L::SimpleNumField, QQ) -> QQFieldElemThe absolute discriminant of the defining polynomial of
Predicates
is_simple(L::NumField) -> BoolGiven a number field
is_absolute(L::NumField) -> BoolReturns whether
is_totally_real(K::NumField) -> BoolReturn true if and only if
is_totally_complex(K::NumField) -> BoolReturn true if and only if
is_cm_field(K::AbsSimpleNumField) -> Bool, NumFieldHom{AbsSimpleNumField, AbsSimpleNumField}Given a number field
is_kummer_extension(L::SimpleNumField) -> BoolTests if
is_radical_extension(L::SimpleNumField) -> BoolTests if
is_linearly_disjoint(K::SimpleNumField, L::SimpleNumField) -> BoolGiven two number fields
is_weakly_ramified(K::AbsSimpleNumField, P::AbsNumFieldOrderIdeal{AbsSimpleNumField, AbsSimpleNumFieldElem}) -> BoolGiven a prime ideal
is_tamely_ramified(K::AbsSimpleNumField) -> BoolReturns whether the number field
is_tamely_ramified(O::AbsSimpleNumFieldOrder, p::Union{Int, ZZRingElem}) -> BoolReturns whether the integer
is_abelian(L::NumField) -> BoolCheck if the number field
Subfields
is_subfield(K::SimpleNumField, L::SimpleNumField) -> Bool, MapReturn true and an injection from false and a morphism mapping everything to
subfields(L::SimpleNumField) -> Vector{Tuple{NumField, Map}}Given a simple extension
principal_subfields(L::SimpleNumField) -> Vector{Tuple{NumField, Map}}Return the principal subfields of
compositum(K::AbsSimpleNumField, L::AbsSimpleNumField) -> AbsSimpleNumField, Map, MapAssuming
embedding(k::NumField, K::NumField) -> MapAssuming
normal_closure(K::AbsSimpleNumField) -> AbsSimpleNumField, NumFieldHom{AbsSimpleNumField, AbsSimpleNumField}The normal closure of
relative_simple_extension(K::NumField, k::NumField) -> RelSimpleNumFieldGiven two fields
is_subfield_normal(K::AbsSimpleNumField, L::AbsSimpleNumField) -> Bool, NumFieldHom{AbsSimpleNumField, AbsSimpleNumField}Returns true and an injection from
This function assumes that
Conversion
simplify(K::AbsSimpleNumField; canonical::Bool = false) -> AbsSimpleNumField, NumFieldHom{AbsSimpleNumField, AbsSimpleNumField}Tries to find an isomorphic field
If canonical is set to true, then a canonical defining polynomial is found, where canonical is using the definition of PARI's polredabs, which is described in http://beta.lmfdb.org/knowledge/show/nf.polredabs.
Both versions require a LLL reduced basis for the maximal order.
absolute_simple_field(K::NumField) -> NumField, MapGiven a number field
simple_extension(L::NonSimpleNumField) -> SimpleNumField, MapGiven a non-simple extension
simplified_simple_extension(L::NonSimpleNumField) -> SimpleNumField, MapGiven a non-simple extension
Morphisms
is_isomorphic(K::SimpleNumField, L::SimpleNumField) -> BoolReturn true if false.
is_isomorphic_with_map(K::SimpleNumField, L::SimpleNumField) -> Bool, MapReturn true and an isomorphism from false and a morphism mapping everything to
is_involution(f::NumFieldHom{AbsSimpleNumField, AbsSimpleNumField}) -> BoolReturns true if
fixed_field(K::SimpleNumField,
sigma::Map;
simplify::Bool = true) -> number_field, NumFieldHom{AbsSimpleNumField, AbsSimpleNumField}Given a number field
By default, the function tries to find a small defining polynomial of simplify = false.
automorphism_list(L::NumField) -> Vector{NumFieldHom}Given a number field
automorphism_group(K::NumField) -> GenGrp, GrpGenToNfMorSetGiven a number field
complex_conjugation(K::AbsSimpleNumField)Given a totally complex normal number field, this function returns an automorphism which is the restriction of complex conjugation at one embedding.
Galois theory
normal_basis(L::NumField) -> NumFieldElemGiven a normal number field
decomposition_group(K::AbsSimpleNumField, P::AbsNumFieldOrderIdeal{AbsSimpleNumField, AbsSimpleNumFieldElem}, m::Map)
-> Grp, GrpToGrpGiven a prime ideal m return from automorphism_group(K), return the decomposition group of m.
ramification_group(K::AbsSimpleNumField, P::AbsNumFieldOrderIdeal{AbsSimpleNumField, AbsSimpleNumFieldElem}, m::Map) -> Grp, GrpToGrpGiven a prime ideal m return from automorphism_group(K), return the ramification group of m.
inertia_subgroup(K::AbsSimpleNumField, P::AbsNumFieldOrderIdeal{AbsSimpleNumField, AbsSimpleNumFieldElem}, m::Map) -> Grp, GrpToGrpGiven a prime ideal m return from automorphism_group(K), return the inertia subgroup of m.
Infinite places
infinite_places(K::NumField) -> Vector{InfPlc}Return all infinite places of the number field.
Examples
julia> K, = quadratic_field(5);
julia> infinite_places(K)
2-element Vector{InfPlc{AbsSimpleNumField, AbsSimpleNumFieldEmbedding}}:
Infinite place corresponding to (Complex embedding corresponding to -2.24 of real quadratic field)
Infinite place corresponding to (Complex embedding corresponding to 2.24 of real quadratic field)real_places(K::NumField) -> Vector{InfPlc}Return all infinite real places of the number field.
Examples
julia> K, = quadratic_field(5);
julia> infinite_places(K)
2-element Vector{InfPlc{AbsSimpleNumField, AbsSimpleNumFieldEmbedding}}:
Infinite place corresponding to (Complex embedding corresponding to -2.24 of real quadratic field)
Infinite place corresponding to (Complex embedding corresponding to 2.24 of real quadratic field)complex_places(K::NumField) -> Vector{InfPlc}Return all infinite complex places of
Examples
julia> K, = quadratic_field(-5);
julia> complex_places(K)
1-element Vector{InfPlc{AbsSimpleNumField, AbsSimpleNumFieldEmbedding}}:
Infinite place corresponding to (Complex embedding corresponding to 0.00 + 2.24 * i of imaginary quadratic field)is_complex(P::Plc) -> BoolReturn whether the embedding into
Miscellaneous
norm_equation(K::AnticNumerField, a) -> AbsSimpleNumFieldElemFor
lorenz_module(k::AbsSimpleNumField, n::Int) -> AbsNumFieldOrderIdeal{AbsSimpleNumField, AbsSimpleNumFieldElem}Finds an ideal containing is set, it has to be an integral ideal. The resulting ideal will be a multiple of this.
kummer_failure(x::AbsSimpleNumFieldElem, M::Int, N::Int) -> IntComputes the quotient of
is_defining_polynomial_nice(K::AbsSimpleNumField)Tests if the defining polynomial of