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) -> QuaternionAlgebra
Return the quaternion algebra
At the moment, the field must have characteristic not equal to
Examples
julia> Q = quaternion_algebra(QQ, -1, -1)
Quaternion algebra
over rational field
defined by i^2 = -1, j^2 = -1
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
Arithmetic of elements
conjugate Method
conjugate(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> conjugate(a)
1 - i - j - k
trred Method
trred(x::AbstractAssociativeAlgebraElem{T}) where T -> T
Returns the reduced trace of
normred Method
normred(x::AbstractAssociativeAlgebraElem{T}) where T -> T
Returns the reduced norm of
reduced_charpoly Method
reduced_charpoly(a::AbstractAssociativeAlgebraElem) -> PolyRingElem
Returns 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
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)
0
Splitting of quaternion algebras
is_split_with_zero_divisor Function
is_split_with_zero_divisor(A::QuaternionAlgebra) -> Bool, AssociativeAlgebraElem
Given 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)