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 Method
number_field(f::Poly{NumFieldElem}, s::VarName;
cached::Bool = false, check::Bool = true) -> 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 Method
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 VarName. 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 Method
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 Method
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 Method
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 Method
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 Method
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 Method
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 Method
basis(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 Method
absolute_basis(K::NumField) -> Vector{NumFieldElem}Returns an array of elements that form a basis of
defining_polynomial Method
defining_polynomial(L::SimpleNumField) -> PolyRingElemGiven a simple number field
defining_polynomials Method
defining_polynomials(L::NonSimpleNumField) -> Vector{PolyRingElem}Given a non-simple number field
absolute_primitive_element Method
absolute_primitive_element(K::NumField) -> NumFieldElemGiven a number field
component Method
component(L::NonSimpleNumField, i::Int) -> SimpleNumField, MapGiven a non-simple extension
base_field Method
base_field(L::NumField) -> NumFieldGiven a number field
Invariants
degree Method
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 Method
absolute_degree(L::NumField) -> IntGiven a number field
signature Method
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 Method
unit_group_rank(K::NumField) -> IntReturn the rank of the unit group of any order of
class_number Method
class_number(K::AbsSimpleNumField) -> ZZRingElemReturns the class number of
relative_class_number Method
relative_class_number(K::AbsSimpleNumField) -> ZZRingElemReturns the relative class number of
regulator Method
regulator(K::AbsSimpleNumField)Computes the regulator of
discriminant Method
discriminant(L::SimpleNumField) -> NumFieldElemThe discriminant of the defining polynomial of
absolute_discriminant Method
absolute_discriminant(L::SimpleNumField, QQ) -> QQFieldElemThe absolute discriminant of the defining polynomial of
Predicates
is_simple Method
is_simple(L::NumField) -> BoolGiven a number field
is_absolute Method
is_absolute(L::NumField) -> BoolReturns whether
is_totally_real Method
is_totally_real(K::NumField) -> BoolReturn true if and only if
is_totally_complex Method
is_totally_complex(K::NumField) -> BoolReturn true if and only if
is_cm_field Method
is_cm_field(K::AbsSimpleNumField) -> Bool, NumFieldHom{AbsSimpleNumField, AbsSimpleNumField}Given a number field
is_kummer_extension Method
is_kummer_extension(L::SimpleNumField) -> BoolTests if
is_radical_extension Method
is_radical_extension(L::SimpleNumField) -> BoolTests if
is_linearly_disjoint Method
is_linearly_disjoint(K::SimpleNumField, L::SimpleNumField) -> BoolGiven two number fields
is_weakly_ramified Method
is_weakly_ramified(K::AbsSimpleNumField, P::AbsNumFieldOrderIdeal{AbsSimpleNumField, AbsSimpleNumFieldElem}) -> BoolGiven a prime ideal
is_tamely_ramified Method
is_tamely_ramified(K::AbsSimpleNumField) -> BoolReturns whether the number field
is_tamely_ramified Method
is_tamely_ramified(K::AbsSimpleNumField, p::Union{Int, ZZRingElem}) -> BoolReturns whether the integer
is_abelian Method
is_abelian(L::NumField) -> BoolCheck if the number field
Subfields
is_subfield Method
is_subfield(K::SimpleNumField, L::SimpleNumField) -> Bool, MapReturn true and an injection from false and a morphism mapping everything to
subfields Method
subfields(L::SimpleNumField) -> Vector{Tuple{NumField, Map}}Given a simple extension
principal_subfields Method
principal_subfields(L::SimpleNumField) -> Vector{Tuple{NumField, Map}}Return the principal subfields of
Examples
julia> Qx, x = QQ["x"];
julia> K, a = number_field(x^8 - x^4 + 1);
julia> length(principal_subfields(K))
8compositum Method
compositum(K::AbsSimpleNumField, L::AbsSimpleNumField) -> AbsSimpleNumField, Map, MapAssuming
embedding Method
embedding(k::NumField, K::NumField) -> MapAssuming
normal_closure Method
normal_closure(K::AbsSimpleNumField) -> AbsSimpleNumField, NumFieldHom{AbsSimpleNumField, AbsSimpleNumField}The normal closure of
relative_simple_extension Method
relative_simple_extension(K::NumField, k::NumField) -> RelSimpleNumFieldGiven two fields
is_subfield_normal Method
is_subfield_normal(K::AbsSimpleNumField, L::AbsSimpleNumField) -> Bool, NumFieldHom{AbsSimpleNumField, AbsSimpleNumField}Returns true and an injection from false and a morphism mapping everything to 0.
This function assumes that
Conversion
simplify Method
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.
sourceabsolute_simple_field Method
absolute_simple_field(K::NumField) -> NumField, MapGiven a number field
simple_extension Method
simple_extension(L::NonSimpleNumField) -> SimpleNumField, MapGiven a non-simple extension
simplified_simple_extension Method
simplified_simple_extension(L::NonSimpleNumField) -> SimpleNumField, MapGiven a non-simple extension
Morphisms
is_isomorphic Method
is_isomorphic(K::SimpleNumField, L::SimpleNumField) -> BoolReturn true if false.
is_isomorphic_with_map Method
is_isomorphic_with_map(K::SimpleNumField, L::SimpleNumField) -> Bool, MapReturn true and an isomorphism from false and a morphism mapping everything to
is_involution Method
is_involution(f::NumFieldHom{AbsSimpleNumField, AbsSimpleNumField}) -> BoolReturns true if
fixed_field Method
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 Method
automorphism_list(L::NumField) -> Vector{NumFieldHom}Given a number field
automorphism_group Method
automorphism_group(K::NumField) -> MultTableGroup, GrpGenToNfMorSetGiven a number field
automorphism_group Method
automorphism_group(L::NumField, K::NumField) -> GenGrp, GrpGenToNfMorSetGiven the number field extension
complex_conjugation Method
complex_conjugation(K::AbsSimpleNumField)Given a normal number field, this function returns an automorphism which is the restriction of complex conjugation at one embedding.
sourceGalois theory
normal_basis Method
normal_basis(L::NumField) -> NumFieldElemGiven a normal number field
decomposition_group Method
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 Method
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 Method
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 Method
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 of real embedding with -2.24 of K
Infinite place of real embedding with 2.24 of Kreal_places Method
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 of real embedding with -2.24 of K
Infinite place of real embedding with 2.24 of Kcomplex_places Method
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 of imaginary embedding with 0.00 + 2.24 * i of Kis_complex Method
is_complex(P::Plc) -> BoolReturn whether the embedding into
Miscellaneous
norm_equation Method
norm_equation(K::AnticNumerField, a) -> AbsSimpleNumFieldElemFor
lorenz_module Method
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 Method
kummer_failure(x::AbsSimpleNumFieldElem, M::Int, N::Int) -> IntComputes the quotient of
is_defining_polynomial_nice Method
is_defining_polynomial_nice(K::AbsSimpleNumField)Tests if the defining polynomial of
