A general constructor for a quaternion algebra over any field K creates a model in terms of two generators x and y and three relations x^2 = a, y^2 = b, and xy = - yx. The printing names i, j, and k are assigned to the generators x, y, and xy by default, unless the user assigns alternatives (see the function AssignNames below, or the example which follows).
Special constructors are provided for quaternion algebras over Q, which return an algebra with a more general set of three defining quadratic relations (see below). In general the third generator need not be the product of the first two. This allows the creation of a quaternion algebra A such that the default generators {1, i, j, k} form a basis for a maximal order.
This function creates the quaternion algebra A over the field K on generators i and j with relations i^2 = a, j^2 = b, and ij = - ji. A third generator is set to k = ij.
Given a string sequence S of length 3, assigns the strings to the generators of A, i.e. the basis elements not equal to 1. This function is called by the bracket operators < > at the time of creation of a quaternion algebra.
> A<x,y,z> := QuaternionAlgebra< RationalField() | -1, -7 >; > x^2; -1 > y^2; -7 > x*y; zIn the case of this constructor the algebra generators are of trace zero and are pairwise anticommuting. This contrasts with the following special constructors for quaternion algebras over the rationals.
The rational quaternion algebra with square-free discriminant N. The integer N must be a product of an odd number of primes, i.e. the algebra must be definite.
The rational quaternion algebra Q< i, j >, where Z[i] and Z[j] are quadratic suborders of discriminant D_1 and D_2, respectively, and Z[ij - ji] is a quadratic suborder of discriminant D_3 = D_1 D_2 - T^2. The values D_1 D_2 and T must have the same parity and D_1, D_2 and D_3 must each be the discriminant of some quadratic order, i.e. nonsquare integers congruent to 0 or 1 modulo 4.
> A<i,j,k> := QuaternionAlgebra(-7,-47,1); > PQ<x> := PolynomialRing(RationalField()); > MinimalPolynomial(i); x^2 - x + 2 > MinimalPolynomial(j); x^2 - x + 12 > MinimalPolynomial(k); x^2 - x + 24 > i*j; kFrom their minimal polynomials, we see that the algebra generators i, j, and k generate commutative subfields of discriminants -7, -47, and -95. The value 82 = (D_1 D_2 - T^2)/4, however, is a more important invariant of the ring. We give a preview of the later material by demonstrating the functionality for computing the determinant and ramified primes of an algebra over Q.
> MinimalPolynomial(i*j-j*i); x^2 + 82 > Discriminant(A); 41 > RamifiedPrimes(A); [ 41 ]The ramified primes of a quaternion algebra are those primes p for which A is locally (i.e. over Q_p) isomorphic to a division algebra. The discriminant of a quaternion algebra is equal to the product of the ramified primes, and is well-defined up to squares. An elementary property of the ramifying primes is that they must be inert or ramified in every subfield. Moreover it must divide the norm of any commutator element xy - yx. We check these properties with the functions Norm and KroneckerSymbol.
> x := i; > y := j; > Norm(x*y-y*x); 82 > Factorization(82); [ <2, 1>, <41, 1> ] > x := i-k; > y := i+j+k; > Norm(x*y-y*x); 1640 > Factorization(1640); [ <2, 3>, <5, 1>, <41, 1> ] > KroneckerSymbol(-7,2); 1 > KroneckerSymbol(-47,2); 1 > KroneckerSymbol(-95,2); 1 > KroneckerSymbol(-7,41); -1 > KroneckerSymbol(-47,41); -1 > KroneckerSymbol(-95,41); -1The fact that the latter Kronecker symbols are -1, indicating that 41 is inert in the quadratic fields of discriminants -7, -47, and -95, proves that 41 is a ramified prime, and 2 is not.