Creation of Quaternion Orders

Let R be a ring with field of fractions K, and let A be a quaternion algebra over K. An R-order in A is a subring O ⊂A which is a R-submodule of A with O.K = A. An order is maximal if it is not properly contained in any other order.

One can create orders for number rings R, for R = Z or for R=k[x] with k a field. Unlike commutative orders, it is important to note that maximal orders O of quaternion algebras are no longer unique: for any x ∈A not in the normalizer of O, we have another maximal order given by O'=x - 1 O x != O.

When R=Z or R=k[x], the order O has type AlgQuatOrd. When R inherits from type RngOrd (a number ring), the order O has type AlgAssVOrd; see Section Orders for more information on constructors and general procedures for these orders.

See above (Introduction) for an important warning regarding quaternion algebras over the rationals.

Contents

Creation of Orders from Elements

The creation of orders from elements of number rings is covered in Section Orders. The creation of quaternion orders over the integers and univariate polynomial rings is covered in this section.

QuaternionOrder(S) : [AlgQuatElt] -> AlgQuatOrd
    IsBasis: BoolElt                    Default: false
Given S a sequence of elements in a quaternion algebra defined over Q or Fq(X), this function returns the order generated by S over Z or Fq[X]. If the set S does not generate an order, an error will be returned. If the parameter IsBasis is set to true then S will be used as the basis of the order returned.
QuaternionOrder(R, S) : Rng, [AlgQuatElt] -> AlgQuatOrd
Order(R, S) : Rng, [AlgQuatElt] -> AlgQuatOrd
    Check: BoolElt                      Default: true
Given a ring R and a sequence S of elements of a quaternion algebra over Q or Fq(X), this function returns the R-order with basis S. The sequence must have length four.

Example AlgQuat_Quaternion_Orders_over_Q_FqX (H93E5)

First we construct an order over a polynomial ring.
> K<t> := FunctionField(FiniteField(7));
> A<i,j,k> := QuaternionAlgebra< K | t, t^2+t+1 >;
> O := QuaternionOrder( [i,j] );
> Basis(O);
[1, i, j, k ]
Next we demonstrate how to construct orders in quaternion algebras generated by a given sequence of elements. When provided with a sequence of elements of a quaternion algebra over Q, Magma reduces the sequence so as to form a basis. When provided with the ring over which these elements are to be interpreted, the sequence must be a basis with initial element 1, and the order having this basis is constructed.
> A<i,j,k> := QuaternionAlgebra< RationalField() | -1, -3 >;
> B := [ 1, 1/2 + 1/2*j, i, 1/2*i + 1/2*k ];
> O := QuaternionOrder(B);
> Basis(O);
[ 1, 1/2*i + 1/2*k, 1/2 - 1/2*j, -1/2*i + 1/2*k ]
> S := QuaternionOrder(Integers(),B);
> Basis(S);
[ 1, 1/2 + 1/2*j, i, 1/2*i + 1/2*k ]

Creation of Maximal Orders

MaximalOrder(A) : AlgQuat[FldRat] -> AlgQuatOrd
MaximalOrder(A) : AlgQuat[FldFunRat] -> AlgQuatOrd
MaximalOrder(A) : AlgQuat[FldOrd] -> AlgAssVOrd
MaximalOrder(A) : AlgQuat[FldNum] -> AlgAssVOrd
A maximal order is constructed in the quaternion algebra A. The algebra A must be defined over a field K where K is either a number field, Q, Fq(X) with q odd, or the field of fractions of a number ring. Over Fq(X) we use the standard algorithm [Fri97], [IR93]. Over the rationals or over a number field, we use a variation of this algorithm optimized for the case of quaternion algebras. First, a factorization of the discriminant of a tame order (see below) is computed. Then, for each prime p dividing the discriminant, a p-maximal order compatible with the existing order is computed. The method used corresponds to Algorithm 4.3.8 in [Voi05]. See also [Voi11].

Example AlgQuat_Quaternion_MaximalOrder (H93E6)

The following is an example of a quaternion algebra which is unramified at all finite primes.
> P<x> := PolynomialRing(Rationals());
> F<b> := NumberField(x^3-3*x-1);
> A<alpha,beta,alphabeta> := QuaternionAlgebra<F | -3,b>;
> O := MaximalOrder(A);
> Factorization(Discriminant(O));
[]

Hence the algebra A has a maximal order of discriminant 1, or equivalently, A is unramified at all finite places of F.

Since we are working over a general order of a number field, we can no longer guarantee that an order will have a free basis, so it must be represented by a pseudomatrix. For more on pseudomatrices, see Section Pseudo Matrices.

> Z_F := BaseRing(O);
> PseudoBasis(O);
[
    <Principal Ideal of Z_F
    Generator:
        Z_F.1, Z_F.1>,
    <Fractional Ideal of Z_F
    Two element generators:
        Z_F.1
        2/3*Z_F.1 + 1/6*Z_F.2 + 1/6*Z_F.3, 3/1*Z_F.1 + i>,
    <Principal Ideal of Z_F
    Generator:
        Z_F.1, j>,
    <Fractional Ideal of Z_F
    Two element generators:
        Z_F.1
        11/2*Z_F.1 + 1/6*Z_F.2 + 35/6*Z_F.3, 3/1*Z_F.1 - i + 3/1*Z_F.1*j + k>
]

The wide applicability of the above algorithm, is demonstrated by examining a "random" quaternion algebra over a "random" quadratic number field.

> for c := 1 to 10 do
>   D := Random([d : d in [-100..100] | not IsSquare(d)]);
>   K<w> := NumberField(x^2-D);
>   Z_K := MaximalOrder(K);
>   K<K1,w> := FieldOfFractions(Z_K);
>   a := Random([i : i in [-50..50] | i ne 0]) + Random([-50..50])*w;
>   b := Random([i : i in [-50..50] | i ne 0]) + Random([-50..50])*w;
>   printf "D = %o, a = %o, b = %o n", D, a, b;
>   A := QuaternionAlgebra<K | a,b>;
>   O := MaximalOrder(A);
>   ds := [<pp[1],pp[2],HilbertSymbol(A,pp[1])> :
>            pp in Factorization(Discriminant(O))];
>   print ds;
>   for d in ds do
>     if d[3] eq 1 then
>       break c;
>     end if;
>   end for;
> end for;
D = 5, a = -46/1*K1 + 25/1*w, b = -10/1*K1 - 7/1*w
[
    <Prime Ideal of Z_K
    Two element generators:
        [31, 0]
        [5, 2], 2, -1>,
    <Prime Ideal of Z_K
    Two element generators:
        [11, 0]
        [6, 2], 2, -1>
]
...

For each such "random" quaternion algebra, we verify that the Hilbert symbol evaluated at each prime dividing the discriminant of the maximal order is -1, indicating that the algebra is indeed ramified at the prime.

MaximalOrder(O) : AlgQuatOrd -> AlgQuat
MaximalOrder(O) : AlgAssVOrd[RngOrd] -> AlgAssVOrd
For O a quaternion order defined over Z, Fq[X] with q odd or a number ring, this function returns a maximal order containing O.
pMaximalOrder(O, p) : AlgQuatOrd, RngElt -> AlgQuatOrd, RngIntElt
pMaximalOrder(O, p) : AlgAssVOrd, RngOrdIdl -> AlgAssVOrd, RngIntElt
For O a quaternion order defined over Z, Fq[X] with q odd or a number ring and a prime (ideal) p, this function returns a p-maximal order O' containing the order O. The p-adic valuation of the discriminant of O' (which is either 0 or 1) is returned as a second return value.
TameOrder(A) : AlgQuat[FldAlg] -> AlgAssVOrd
Given a quaternion algebra A, this function returns an order O having the property that the odd reduced discriminant of O is squarefree. The algebra A must be defined over a number field or field of fractions of a number ring. The algorithm ignores even primes and does not test the remaining odd primes for maximality.

Creation of Orders with given Discriminant

The following two functions together with the maximal order algorithms of the previous subsection allow the construction of arbitrary Eichler orders.

Order(O, N) : AlgQuatOrd, RngElt -> AlgQuatOrd
Given an order O in a quaternion algebra A over the rationals or Fq(x) with q odd, and some element N in the base ring of O, this function returns a suborder O' of O having index N. Currently, N and the level of O must be coprime and N must have valuation at most 1 at each ramified prime of A. The order O' is locally Eichler at all prime divisors of N that are not ramified in A. In particular, if O is Eichler and N is coprime to the discriminant of A, so is O'.
Order(O, N) : AlgAssVOrd, RngOrdIdl -> AlgAssVOrd
Given a maximal quaternion order O over a number ring, this function returns an Eichler order of level N inside O.
GorensteinClosure(O) : AlgAssVOrd -> AlgAssVOrd, .
Let O be a quaternion order over R. There exists a unique Gorenstein order Λ over R such that Λ is generated by 1 and bO for some integral ideal b of R. The order Λ and the ideal b are called the Gorenstein closure and the Brandt invariant of O respectively.

The first return value of this intrinsic is the Gorenstein closure of O.

The second return value is either a positive or monic generator of b or b itself depending on whether R is Z, Fq[x] or a number ring.

Example AlgQuat_Quaternion_Orders (H93E7)

First we construct a quaternion algebra A over F5(x) ramified at x2 + x + 1, then a maximal order M in A and finally an Eichler O order of discriminant (x2 + x + 1)(x3 + x + 1)5.
> P<x> := PolynomialRing(GF(5));
> A := QuaternionAlgebra(x^2+x+1);
> M := MaximalOrder(A);
> O := Order(M, (x^3+x+1)^5);
> FactoredDiscriminant(O);
[
    <x^2 + x + 1, 1>,
    <x^3 + x + 1, 5>
]

Creation of Orders with given Discriminant over the Integers

When constructing quaternion orders over the integers, several shortcuts are available.

QuaternionOrder(A, M) : AlgQuat[FldRat], RngIntElt -> AlgQuatOrd
Given a quaternion algebra A and a positive integer M, this function returns an order of index M in a maximal order of the quaternion algebra A defined over Q. The second argument M can have at most valuation 1 at any ramified prime of A.
QuaternionOrder(N) : RngIntElt -> AlgQuatOrd
QuaternionOrder(N, M) : RngIntElt, RngIntElt -> AlgQuatOrd
Given positive integers N and M, this function returns an order of index M in a maximal order of the rational quaternion algebra A of discriminant N. The discriminant N must be a product of an odd number of distinct primes, and the argument M can be at most of valuation 1 at any prime dividing N. If M is omitted, the integer M defaults to 1, i.e., the function will return a maximal order.
QuaternionOrder(D1, D2, T) : RngIntElt, RngIntElt, RngIntElt -> AlgQuat
This intrinsic constructs the quaternion order Z< x, y >, where Z[x] and Z[y] are quadratic subrings of discriminant D1 and D2, respectively, and Z[xy - yx] is a quadratic subring of discriminant D1 D2 - T2.

Note that the container algebra of such a quaternion order is not usually in standard form (see the example below).

Example AlgQuat_Quaternion_Orders_over_the_Integers (H93E8)

The above constructors permit the construction of Eichler orders over Z, if the discriminant N and the index M are coprime. More generally they allow the construction of an order whose index in an Eichler order divides the discriminant.
> A := QuaternionOrder(103,2);
> Discriminant(A);
206
> Factorization($1);
[ <2, 1>, <103, 1> ]
> _<x> := PolynomialRing(Rationals());
> [MinimalPolynomial(A.i) : i in [1..4]];
[
    x - 1,
    x^2 + 1,
    x^2 - x + 52,
    x^2 + 104
]
The constructor QuaternionOrder(D1, D2, T) may return an order whose container algebra is not in standard form.
> A := QuaternionOrder(-4, 5, 2);
> B := Algebra(A);
> B.1 * B.2 eq - B.2 * B.1;
false
V2.28, 13 July 2023