Quaternion algebras
We provide a model for quaternion algebras over a field
This functionality is currently restricted to fields of characteristic not equal to two.
Creation
quaternion_algebra Method
quaternion_algebra(K::Field, a, b) -> QuaternionAlgebraIf the characteristic of K isn't 2, return the quaternion algebra
If the characteristic of K is 2, return the quaternion algebra
Examples
julia> Q = quaternion_algebra(QQ, -1, -1)
Quaternion algebra
over rational field
defined by i^2 = -1, j^2 = -1, ij = -ji
julia> K, sqrt2 = quadratic_field(2);
julia> Q = quaternion_algebra(K, sqrt2, -1)
Quaternion algebra
over real quadratic field defined by x^2 - 2
defined by i^2 = sqrt(2), j^2 = -1, ij = -ji
julia> R, x = polynomial_ring(GF(2), "x"); F=fraction_field(R);
julia> Q = quaternion_algebra(F, 0, x)
Quaternion algebra
over fraction field of R
defined by i^2 = i+0, j^2 = x, ij = ji+jquaternion_algebra_ramified_at Method
quaternion_algebra_ramified_at(K::QQField, p::IntegerUnion;
check::Bool = true)
-> QuaternionAlgebra{QQFieldElem}Return the quaternion algebra over
The algebra carries the maximal order, which maximal_order returns,
where
If check is true, it is tested that
The presentation and the order are those of [1], Lemmas 1.1 and 1.2, with the least admissible
Examples
julia> A = quaternion_algebra_ramified_at(QQ, 97)
Quaternion algebra
over rational field
defined by i^2 = -97, j^2 = -19, ij = -ji
julia> abs(discriminant(maximal_order(A))) == 97^2
trueArithmetic of elements
conj Method
conj(a::AssociativeAlgebraElem{_, QuaternionAlgebra})
-> AssociativeAlgebraElem{_, QuaternionAlgebra}Return the image of
Examples
julia> Q = quaternion_algebra(QQ, -1, -1); a = Q([1, 1, 1, 1])
1 + i + j + k
julia> conj(a)
1 - i - j - ktrred Method
trred(x::AbstractAssociativeAlgebraElem{T}) where T -> TReturns the reduced trace of
normred Method
normred(x::AbstractAssociativeAlgebraElem{T}) where T -> TReturns the reduced norm of
reduced_charpoly Method
reduced_charpoly(a::AbstractAssociativeAlgebraElem) -> PolyRingElemReturns the reduced characteristic polynomial of base_ring(algebra(a)).
Example
julia> Q = quaternion_algebra(QQ, -1, -1)
Quaternion algebra
over rational field
defined by i^2 = -1, j^2 = -1, ij = -ji
julia> z = Q([1, 2, 0, 1//3])
1 + 2*i + 1//3*k
julia> trred(z)
2
julia> normred(z)
46//9
julia> reduced_charpoly(z)
x^2 - 2*x + 46//9
julia> m = reduced_charpoly(z)
x^2 - 2*x + 46//9
julia> m(z)
0Eichler orders
is_eichler Method
is_eichler(O::Union{AlgAssAbsOrd, AlgAssRelOrd}) -> BoolReturn whether the order
eichler_level Method
eichler_level(O::AlgAssAbsOrd{<:QuaternionAlgebra}) -> ZZRingElem
eichler_level(O::AlgAssRelOrd{<:Any, <:Any, <:QuaternionAlgebra})
-> AbsNumFieldOrderIdealReturn the level of the Eichler order
An ArgumentError is thrown if is_eichler.
Examples
The order of the matrices
julia> A = quaternion_algebra(QQ, 1, 1);
julia> e, i, j, k = basis(A);
julia> h = QQ(1, 2);
julia> O = order(A, [h * (e + i), h * (e - i), h * (j + k), 3 * (j - k)]);
julia> eichler_level(O)
6
julia> eichler_level(maximal_order(A))
1Right ideal classes and types
right_class_set Method
right_class_set(O::Union{AlgAssAbsOrd, AlgAssRelOrd}) -> VectorReturn representatives of the classes of locally principal right ideals of the order
The representatives are integral right ideals of
Examples
julia> O = maximal_order(quaternion_algebra_ramified_at(QQ, 97));
julia> C = right_class_set(O);
julia> length(C), all(I -> right_order(I) == O, C)
(8, true)
julia> length(right_class_set(maximal_order(quaternion_algebra(QQ, -1, 3))))
1type_set Method
type_set(O::Union{AlgAssAbsOrd, AlgAssRelOrd}) -> VectorReturn representatives of the types of the order
If
Examples
julia> O = maximal_order(quaternion_algebra_ramified_at(QQ, 97));
julia> length(type_set(O)), length(right_class_set(O))
(5, 8)type_number Method
type_number(O::Union{AlgAssAbsOrd, AlgAssRelOrd}) -> IntReturn the number of types of the order type_set.
Splitting of quaternion algebras
is_split_with_zero_divisor Function
is_split_with_zero_divisor(A::QuaternionAlgebra) -> Bool, AssociativeAlgebraElemGiven a quaternion algebra
Examples
julia> A = quaternion_algebra(QQ, 1, 4);
julia> is_split_with_zero_divisor(A)
(true, 1 + i)
julia> A = quaternion_algebra(QQ, -1, -1);
julia> is_split_with_zero_divisor(A)
(false, 0)Gross lattices
gross_lattice Method
gross_lattice(O::AlgAssAbsOrd{<:QuaternionAlgebra{QQFieldElem}}) -> ZZLatReturn the Gross lattice of an order ArgumentError is thrown if the algebra of
It lies in the quadratic space on the coordinates with respect to basis(A) whose bilinear form is gross_lattice_basis and its Gram matrix is gross_gram_matrix of that basis.
For a maximal order of
Examples
julia> A = quaternion_algebra(QQ, -1, -3);
julia> L = gross_lattice(maximal_order(A));
julia> rank(L), det(L)
(3, 36)gross_lattice_basis Method
gross_lattice_basis(O::AlgAssAbsOrd{<:QuaternionAlgebra{QQFieldElem}})
-> Vector{AssociativeAlgebraElem{QQFieldElem}}Return a basis of the Gross lattice of an order gross_lattice.
Examples
julia> A = quaternion_algebra(QQ, -1, -3);
julia> B = gross_lattice_basis(maximal_order(A));
julia> length(B), all(iszero, trred.(B))
(3, true)gross_gram_matrix Method
gross_gram_matrix(B::Vector{<:AssociativeAlgebraElem{QQFieldElem}})
-> ZZMatrixReturn the Gram matrix of the three elements in B, a basis of a Gross lattice of an order of gross_lattice), with respect to the bilinear form ArgumentError is thrown otherwise.
Examples
julia> A = quaternion_algebra(QQ, -1, -3);
julia> B = gross_lattice_basis(maximal_order(A));
julia> G = gross_gram_matrix(B);
julia> det(G), [G[i, i] for i in 1:3] == normred.(B)
(36, true)Ideals connecting maximal orders
connecting_ideal Method
connecting_ideal(O1::AlgAssAbsOrd{<:QuaternionAlgebra},
O2::AlgAssAbsOrd{<:QuaternionAlgebra}; check::Bool = true)
-> AlgAssAbsOrdIdl
connecting_ideal(O1::AlgAssRelOrd{<:Any, <:Any, <:QuaternionAlgebra},
O2::AlgAssRelOrd{<:Any, <:Any, <:QuaternionAlgebra};
check::Bool = true) -> AlgAssRelOrdIdlGiven maximal orders
If check is true, an ArgumentError is thrown unless both orders are maximal.
Examples
julia> O = maximal_order(quaternion_algebra_ramified_at(QQ, 97));
julia> O1, O2 = left_order.(right_class_set(O)[1:2]);
julia> J = connecting_ideal(O1, O2);
julia> left_order(J) == O1, right_order(J) == O2
(true, true)least_norm_ideal Method
least_norm_ideal(I::AlgAssAbsOrdIdl, O::AlgAssAbsOrd; side::Symbol = :right,
check::Bool = true) -> ZZRingElem, AlgAssAbsOrdIdlGiven an invertible fractional ideal side = :right) or left order side = :left), in a definite quaternion algebra side = :right) or side = :left) with right_class_set: the order
For side = :right, the integral ideals in the class of side = :left. So
If check is true, an ArgumentError is thrown unless
Examples
julia> O = maximal_order(quaternion_algebra_ramified_at(QQ, 97));
julia> C = right_class_set(O);
julia> d, J = least_norm_ideal(C[2], O);
julia> d == normred(J, O), right_order(J) == O, is_subset(J, O)
(true, true, true)
julia> first(least_norm_ideal(3 * C[2], O)) == d
trueleast_connecting_norm Method
least_connecting_norm(O1::AlgAssAbsOrd, O2::AlgAssAbsOrd;
check::Bool = true) -> ZZRingElem, AlgAssAbsOrdIdlGiven maximal orders type_set), does not change when they are swapped, and is
The ideals with left order connecting_ideal(O1, O2) and least_norm_ideal with side = :left on these
If check is true, an ArgumentError is thrown unless both orders are maximal.
Examples
julia> O = maximal_order(quaternion_algebra_ramified_at(QQ, 97));
julia> Ts = type_set(O);
julia> [first(least_connecting_norm(Ts[1], T)) for T in Ts]
5-element Vector{ZZRingElem}:
1
2
2
4
3denominator Method
denominator(R::AlgAssAbsOrd, O::AlgAssAbsOrd) -> ZZRingElemReturn the least positive integer
Examples
julia> O = maximal_order(quaternion_algebra_ramified_at(QQ, 97));
julia> O1, O2 = left_order.(right_class_set(O)[1:2]);
julia> denominator(O1, O1), denominator(O2, O1), index(intersect(O1, O2), O1)
(1, 2, 2)