Quaternion algebras
We provide a model for quaternion algebras over a field $K$ in standard form, which is parametrized by two elements $a, b \in K$. The corresponding quaternion algebra has a basis $1, i, j, k$ satisfying $i^2 = a$, $j^2 = b$ and $ij = -ji = k$.
This functionality is currently restricted to fields of characteristic not equal to two.
Creation
quaternion_algebra
— Methodquaternion_algebra(K::Field, a, b) -> QuaternionAlgebra
Return the quaternion algebra $(a, b | K)$ defined by $i^2 = a$, $j^2 = b$.
At the moment, the field must have characteristic not equal to $2$.
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
— Methodconjugate(a::AssociativeAlgebraElem{_, QuaternionAlgebra})
-> AssociativeAlgebraElem{_, QuaternionAlgebra}
Return the image of $a$ under the canonical involution of the quaternion algebra.
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
— Methodtrred(x::AbstractAssociativeAlgebraElem{T}) where T -> T
Returns the reduced trace of $x$.
normred
— Methodnormred(x::AbstractAssociativeAlgebraElem{T}) where T -> T
Returns the reduced norm of $x$.
reduced_charpoly
— Methodreduced_charpoly(a::AbstractAssociativeAlgebraElem) -> PolyRingElem
Returns the reduced characteristic polynomial of $a$ as a polynomial over 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
— Functionis_split_with_zero_divisor(A::QuaternionAlgebra) -> Bool, AssociativeAlgebraElem
Given a quaternion algebra $A$, return whether $A$ is split together with an element, which is a zero-divisor in case $A$ is split.
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)