Module: sage.algebras.quaternion_algebra
Quaternion algebras
Author: David Kohel, 2005-09
TESTS:
sage: A = QuaternionAlgebra(QQ, -1,-1, names=list('ijk')) sage: A == loads(dumps(A)) True sage: i, j, k = A.gens() sage: i == loads(dumps(i)) True
Module-level Functions
K, a, b, [names=['i', 'j', 'k']], [denom=1]) |
Return the quaternion algebra over
generated by
,
, and
such that
,
, and
.
Input:
sage: A.<i,j,k> = QuaternionAlgebra(QQ, -1,-1) sage: i^2 -1 sage: j^2 -1 sage: i*j k sage: j*i -k sage: (i + j + k)^2 -3 sage: A.ramified_primes() [2]
D1, D2, T, [names=['i', 'j', 'k']], [M=2]) |
Return the quaternion algebra over the rationals generated by
,
, and
where
,
, and
are
quadratic suborders of discriminants
,
, and
, respectively. The traces of
and
are
chosen in
.
The integers
,
and
must all be even or all odd, and
,
and
must each be the discriminant of some
quadratic order, i.e. nonsquare integers = 0, 1 (mod 4).
Input:
sage: A = QuaternionAlgebraWithDiscriminants(-7,-47,1, names=('i','j','k')) sage: print A Quaternion algebra with generators (i, j, k) over Rational Field sage: i, j, k = A.gens() sage: i**2 -2 + i sage: j**2 -12 + j sage: k**2 -24 + k sage: i.minimal_polynomial('x') x^2 - x + 2 sage: j.minimal_polynomial('x') x^2 - x + 12
K, gram, [names=i,j,k]) |
Input:
sage: A.<i,j,k> = QuaternionAlgebra(QQ, -1,-1) sage: g = A.gram_matrix(); g [2 0 0 0] [0 2 0 0] [0 0 2 0] [0 0 0 2] sage: K.<i,j,k> = QuaternionAlgebraWithGramMatrix(QQ, g); K Quaternion algebra with generators (i, j, k) over Rational Field
sage: R.<i,j,k> = QuaternionAlgebraWithGramMatrix(QQ, diagonal_matrix([8]*4)) sage: i^2, j^2, k^2 (-4, -4, -4)
K, norms, traces, [names=i,j,k]) |
K, a, b, [names=ijk]) |
D) |
Return the discriminant of the quadratic extension
, i.e.
an integer d congruent to either 0 or 1, mod 4, and such that, at most,
the only square dividing it is 4.
a, b) |
Return a list of the finite primes ramifying in Q(a,b)
D1, D2, T) |
x) |
Class: QuaternionAlgebra_faster
Special Functions: __call__
Class: QuaternionAlgebra_generic
self, K, [basis_traces=None], [ramified_primes=None]) |
Functions: basis,
discriminant,
gen,
gram_matrix,
inner_product_matrix,
is_commutative,
is_division_algebra,
is_exact,
is_field,
is_finite,
is_integral_domain,
is_noetherian,
order,
ramified_primes,
random_element,
vector_space
self) |
Given a quaternion algebra A defined over the field of rational numbers, return the discriminant of A, i.e. the product of the ramified primes of A.
self, i) |
The i-th generator of the quaternion algebra.
self) |
The Gram matrix of the inner product determined by the norm.
self) |
sage: Q.<i,j,k> = QuaternionAlgebra(QQ, -3,-7) sage: Q.is_commutative() False
self) |
Return True if the quaternion algebra is a division algebra (i.e. a ring, not necessarily commutative, in which every nonzero element is invertible). So if this returns False, the quaternion algebra is isomorphic to the 2x2 matrix algebra.
At the moment, this is implemented only for finite fields.
sage: Q.<i,j,k> = QuaternionAlgebra(GF(5), -3, -7) sage: Q.is_division_algebra() False
self) |
Return True if elements of this quaternion algebra are represented exactly, i.e. there is no precision loss when doing arithmetic. A quaternion algebra is exact if and only if its base field is exact.
sage: Q.<i,j,k> = QuaternionAlgebra(QQ, -3, -7) sage: Q.is_exact() True sage: Q.<i,j,k> = QuaternionAlgebra(Qp(7), -3, -7) sage: Q.is_exact() False
self) |
Return False always, since all quaternion algebras are noncommutative and all fields are commutative.
sage: Q.<i,j,k> = QuaternionAlgebra(QQ, -3, -7) sage: Q.is_field() False
self) |
Return True if the quaternion algebra is a finite ring, i.e. if and only if the base field is finite.
sage: Q.<i,j,k> = QuaternionAlgebra(QQ, -3, -7) sage: Q.is_finite() False sage: Q.<i,j,k> = QuaternionAlgebra(GF(5), -3, -7) sage: Q.is_finite() True
self) |
Return False always, since all quaternion algebras are noncommutative and integral domains are commutative (in SAGE).
sage: Q.<i,j,k> = QuaternionAlgebra(QQ, -3, -7) sage: Q.is_integral_domain() False
self) |
Return True always, since any quaternion algebra is a noetherian ring (because it's a finitely-generated module over a field, which is noetherian).
sage: Q.<i,j,k> = QuaternionAlgebra(QQ, -3, -7) sage: Q.is_noetherian() True
self) |
Return the number of elements of the quaternion algebra, or +Infinity if the algebra is not finite.
sage: Q.<i,j,k> = QuaternionAlgebra(QQ, -3, -7) sage: Q.order() +Infinity sage: Q.<i,j,k> = QuaternionAlgebra(GF(5), -3, -7) sage: Q.order() 20
Special Functions: __call__,
__init__,
__repr__