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 = false) -> NumField, NumFieldElem
Given 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 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 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, AbsSimpleNumFieldElem
Returns 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, AbsSimpleNumFieldElem
Returns 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, NumFieldElem
Given 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, AbsSimpleNumFieldElem
Returns 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
a
basis 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*a2
absolute_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) -> PolyRingElem
Given 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) -> NumFieldElem
Given a number field
component Method
component(L::NonSimpleNumField, i::Int) -> SimpleNumField, Map
Given a non-simple extension
base_field Method
base_field(L::NumField) -> NumField
Given a number field
Invariants
degree Method
degree(L::NumField) -> Int
Given a number field
Examples
julia> Qx, x = QQ["x"];
julia> K, a = number_field(x^2 - 2, "a");
julia> degree(K)
2
absolute_degree Method
absolute_degree(L::NumField) -> Int
Given 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) -> Int
Return the rank of the unit group of any order of
class_number Method
class_number(K::AbsSimpleNumField) -> ZZRingElem
Returns the class number of
relative_class_number Method
relative_class_number(K::AbsSimpleNumField) -> ZZRingElem
Returns the relative class number of
regulator Method
regulator(K::AbsSimpleNumField)
Computes the regulator of
discriminant Method
discriminant(L::SimpleNumField) -> NumFieldElem
The discriminant of the defining polynomial of
absolute_discriminant Method
absolute_discriminant(L::SimpleNumField, QQ) -> QQFieldElem
The absolute discriminant of the defining polynomial of
Predicates
is_simple Method
is_simple(L::NumField) -> Bool
Given a number field
is_absolute Method
is_absolute(L::NumField) -> Bool
Returns whether
is_totally_real Method
is_totally_real(K::NumField) -> Bool
Return true
if and only if
is_totally_complex Method
is_totally_complex(K::NumField) -> Bool
Return 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) -> Bool
Tests if
is_radical_extension Method
is_radical_extension(L::SimpleNumField) -> Bool
Tests if
is_linearly_disjoint Method
is_linearly_disjoint(K::SimpleNumField, L::SimpleNumField) -> Bool
Given two number fields
is_weakly_ramified Method
is_weakly_ramified(K::AbsSimpleNumField, P::AbsNumFieldOrderIdeal{AbsSimpleNumField, AbsSimpleNumFieldElem}) -> Bool
Given a prime ideal
is_tamely_ramified Method
is_tamely_ramified(K::AbsSimpleNumField) -> Bool
Returns whether the number field
is_tamely_ramified Method
is_tamely_ramified(O::AbsSimpleNumFieldOrder, p::Union{Int, ZZRingElem}) -> Bool
Returns whether the integer
is_abelian Method
is_abelian(L::NumField) -> Bool
Check if the number field
Subfields
is_subfield Method
is_subfield(K::SimpleNumField, L::SimpleNumField) -> Bool, Map
Return 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))
8
compositum Method
compositum(K::AbsSimpleNumField, L::AbsSimpleNumField) -> AbsSimpleNumField, Map, Map
Assuming
embedding Method
embedding(k::NumField, K::NumField) -> Map
Assuming
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) -> RelSimpleNumField
Given 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.
absolute_simple_field Method
absolute_simple_field(K::NumField) -> NumField, Map
Given a number field
simple_extension Method
simple_extension(L::NonSimpleNumField) -> SimpleNumField, Map
Given a non-simple extension
simplified_simple_extension Method
simplified_simple_extension(L::NonSimpleNumField) -> SimpleNumField, Map
Given a non-simple extension
Morphisms
is_isomorphic Method
is_isomorphic(K::SimpleNumField, L::SimpleNumField) -> Bool
Return true
if false
.
is_isomorphic_with_map Method
is_isomorphic_with_map(K::SimpleNumField, L::SimpleNumField) -> Bool, Map
Return true
and an isomorphism from false
and a morphism mapping everything to
is_involution Method
is_involution(f::NumFieldHom{AbsSimpleNumField, AbsSimpleNumField}) -> Bool
Returns 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) -> GenGrp, GrpGenToNfMorSet
Given a number field
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.
Galois theory
normal_basis Method
normal_basis(L::NumField) -> NumFieldElem
Given a normal number field
decomposition_group Method
decomposition_group(K::AbsSimpleNumField, P::AbsNumFieldOrderIdeal{AbsSimpleNumField, AbsSimpleNumFieldElem}, m::Map)
-> Grp, GrpToGrp
Given 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, GrpToGrp
Given 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, GrpToGrp
Given 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 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 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 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 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 corresponding to (Complex embedding corresponding to 0.00 + 2.24 * i of imaginary quadratic field)
is_complex Method
is_complex(P::Plc) -> Bool
Return whether the embedding into
Miscellaneous
norm_equation Method
norm_equation(K::AnticNumerField, a) -> AbsSimpleNumFieldElem
For
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) -> Int
Computes the quotient of
is_defining_polynomial_nice Method
is_defining_polynomial_nice(K::AbsSimpleNumField)
Tests if the defining polynomial of