Abelian closure of the rationals
The abelian closure $\mathbf{Q}^\text{ab}$ is the maximal abelian extension of $\mathbf{Q}$ inside a fixed algebraic closure and can explicitly described as
\[\mathbf{Q}^{\mathrm{ab}} = \mathbf{Q}(\zeta_n \mid n \in \mathbf{N}),\]
the union of all cyclotomic extensions. Here for $n \in \mathbf{N}$ we denote by $\zeta_n$ a primitive $n$-th root of unity.
Creation of the abelian closure and elements
abelian_closure
— Methodabelian_closure(QQ::QQField; sparse::Bool = false)
Return a pair (K, z)
consisting of the abelian closure K
of the rationals and a generator z
that can be used to construct primitive roots of unity in K
.
An optional keyword argument sparse
can be set to true
to switch to a sparse representation. Depending on the application this can be much faster or slower.
Examples
julia> K, z = abelian_closure(QQ);
julia> z(36)
zeta(36)
julia> K, z = abelian_closure(QQ, sparse = true);
julia> z(36)
-zeta(36, 9)*zeta(36, 4)^4 - zeta(36, 9)*zeta(36, 4)
Given the abelian closure, the generator can be recovered as follows:
gen
— Methodgen(K::QQAbField)
Return the generator of the abelian closure K
that can be used to construct primitive roots of unity.
atlas_irrationality
— Functionatlas_irrationality([F::AbsSimpleNumField, ]description::String)
Return the value encoded by description
. If F
is given and is a cyclotomic field that contains the value then the result is in F
, if F
is not given then the result has type QQAbFieldElem
.
description
is assumed to have the format defined in [CCNPW85], Chapter 6, Section 10.
Examples
julia> Oscar.with_unicode() do
show(atlas_irrationality("r5"))
end;
-2*ζ(5)^3 - 2*ζ(5)^2 - 1
julia> atlas_irrationality(cyclotomic_field(5)[1], "r5")
-2*z_5^3 - 2*z_5^2 - 1
julia> Oscar.with_unicode() do
show(atlas_irrationality("i"))
end;
ζ(4)
julia> Oscar.with_unicode() do
show(atlas_irrationality("b7*3"))
end;
-ζ(7)^4 - ζ(7)^2 - ζ(7) - 1
julia> Oscar.with_unicode() do
show(atlas_irrationality("3y'''24*13-2&5"))
end;
-5*ζ(24)^7 - 2*ζ(24)^5 + 2*ζ(24)^3 - 3*ζ(24)
atlas_description
— Functionatlas_description(val::QQAbFieldElem)
Return a string in the format defined in [CCNPW85], Chapter 6, Section 10, describing val
. Applying atlas_irrationality
to the result yields val
.
Examples
julia> K, z = abelian_closure(QQ);
julia> val = z(5) + z(5)^4;
julia> str = Oscar.atlas_description(val)
"b5"
julia> val == atlas_irrationality(str)
true
Printing
The n-th primitive root of the abelian closure of will by default be printed as z(n)
. The printing can be manipulated using the following functions:
gen
— Methodgen(K::QQAbField, s::String)
Return the generator of the abelian closure K
that can be used to construct primitive roots of unity. The string s
will be used during printing.
set_variable!
— Methodset_variable!(K::QQAbField, s::String)
Change the printing of the primitive n-th root of the abelian closure of the rationals to s(n)
, where s
is the supplied string.
get_variable
— Methodget_variable(K::QQAbField)
Return the string used to print the primitive n-th root of the abelian closure of the rationals.
Examples
julia> K, z = abelian_closure(QQ);
julia> z(4)
z(4)
julia> ζ = gen(K, "ζ")
Generator of abelian closure of Q
julia> ζ(5) + ζ(3)
ζ(15)^5 + ζ(15)^3
Reduction to characteristic $p$
reduce
— Methodreduce(val::QQAbFieldElem, F::FinField)
Return the element of F
that is the $p$-modular reduction of val
, where $p$ is the characteristic of F
. An exception is thrown if val
cannot be reduced modulo $p$ or if the reduction does not lie in F
.
Examples
julia> K, z = abelian_closure(QQ);
julia> F = GF(2, 3);
julia> reduce(z(7), F)
o