Genera and Spinor Genera

The genus of an exact lattice has a distinct type SymGen which holds the local data defining the genus. Each genus consists of 2n spinor genera, for some integer n, typically 1. The spinor genera share the same type SymGen. Unlike the genus, the spinor genus is not determined solely by the local data of the genus, so a cached representative is necessary to define the spinor class.

Equality testing of genera is fast, since this requires only a comparison of the canonical local information. It is also possible to enumerate representatives of all equivalences classes in a genus or spinor genus. This is done by a process of exploration of the p-neighbour graph, for an appropriate prime p. The neighbouring functions can be applied to individual lattices to find p-neighbours or the closure under the p-neighbour process. Functions for computing and comparing the local p-adic equivalence classes of lattices, mediated by the type SymGenLoc.

Contents

Genus Constructions

Genus(L) : Lat -> SymGen
Genus(G) : SymGen -> SymGen
Given an exact lattice L or a spinor genus G this function returns the genus of L. If given a genus the function returns G itself.
Genera(r, s, d) : RngIntElt, RngIntElt, RngIntElt -> [ SymGen ]
    OnlyEven: BoolElt                   Default: true
Given a signature (r, s) and a determinant d, returns all valid genus symbols representing lattices with this signature and this determinant. If OnlyEven is true, return only the genera representing even lattices.
SpinorGenus(L) : Lat -> SymGen
Given an exact lattice L, returns the spinor genus of L.
SpinorGenera(G) : SymGen -> [ SymGen ]
Given a genus G, returns the sequence of spinor genera. If G is a spinor genus, then this function returns the sequence consisting of G itself.
Genus(r, s, d, S) : RngIntElt, RngIntElt, RngIntElt, [ SymGenLoc ] -> SymGen
Given a signature (r, s), a determinant d, and a sequence of local Genus symbols S = { Gp }p, return the corresponding global genus G.

Local Genus Constructions

LocalGenus(L, p) : Lat, RngIntElt -> SymGenLoc
Returns the local genus symbol of L at p.
LocalGenus(A, p) : AlgMatElt[RngInt], RngIntElt -> SymGenLoc
Returns the local genus symbol of a lattice with Gram matrix A at p.
CanonicalLocalGenus(G) : SymGenLoc -> SymGenLoc
Returns the canonical p-adic genus symbol of G. Only relevant at p = 2.
LocalGenus(p, v, r, d) : RngIntElt, [ RngIntElt ], [ RngIntElt ], [ RngElt ] -> SymGenLoc
    Parities: [ RngElt ]                Default: []
    Oddities: [ RngElt ]                Default: []
Given a prime p, and sequence of valuations v1, ..., vn, ranks r1, ..., rn, and determinants d1, ..., dn (which should be coercible to Z / p Z), construct the p-adic genus symbol having Jordan components with these ranks, valuations and determinants. A lattice L in the constructed local genus will have a p-adic Jordan decomposition of the form Lp = bigoplusi pvi Li , where Li is of rank ri and determinant di. If p = 2, the optional parameters Parities and Oddities should be specified, in order to specify the parity and oddity of each component.
LocalGenera(n, d, p) : RngIntElt, RngIntElt, RngIntElt -> [ SymGenLoc ]
Return all p-adic genus symbols of rank n and determinant d, for an odd prime p.
pAdicDiagonalization(L, p) : Lat, RngIntElt -> Lat
A lattice diagonalized p-adically equivalent to L; if p = 2 then the diagonalized form may have Jordan blocks of dimension 2.
JordanDecomposition(L, p) : Lat, RngIntElt -> List, List, SeqEnum
JordanDecomposition(L, P) : Lat, RngInt -> List, List, SeqEnum
Given a lattice L and a prime ideal P = p Z of Z, a Jordan decomposition of Lp is an orthogonal decomposition of Lp into modular sublattices L1, ..., Lr such that the p-adic valuations of the scales of these sublattices are strictly increasing.

The first return value is a list of matrices B1, ..., Br over Q. The row spans of these lattices over Zp yield a Jordan decomposition of Lp. The second and third return value list the Gram matrices and the p-adic valuations of the scales of the Jordan blocks respectively.

pAdicJordanDecomposition(L, p) : Lat, RngIntElt -> AlgMatElt, AlgMatElt
Given a lattice L and a prime p, return a canonical p-adic Jordan decomposition of its Gram matrix, along with the change of basis matrix. Returns matrices J, B over Zp such that BMBtr = J, where M is the Gram matrix of L.

Every Jordan block of J is of the following form. If p is odd, it is diagonal of the form < 1, 1, ..., ..., 1, u > where u is a predetermined non-square class. If p = 2, it is of the form Hm direct-sum Aε direct-sum < 1, 1, ..., 1, u >, where H is a hyperbolic plane, A is the anisotropic form x2 + xy + y2, m ≥0 and ε ∈{0, 1}.

LocalModification(L, G, p) : Lat, AlgMatElt[RngInt], RngIntElt -> Lat
An integral lattice L' in the ambient space of L which is locally isometric to L at every prime other than p, and at p, locally isometric to a lattice with the Gram matrix G.

Invariants of Genera and Spinor Genera

Primes(G) : SymGen -> [ RngIntElt ]
Returns the primes that appear in G. These are the primes for which Gp is nontrivial.
Dimension(G) : SymGen -> RngIntElt
Rank(G) : SymGen -> RngIntElt
The rank of lattice in the genus G.
Signature(G) : SymGen -> RngIntElt, RngIntElt
The signature of lattices in G. Returns a pair of integers (r, s) such that the matrix representing the bilinear form obtaind the eigenvalue 1 with multiplicity r, and the eigenvalue -1 with multiplicity s.
Representative(G) : SymGen -> Lat
Returns a representative lattice for the genus symbol G.
RationalRepresentative(G) : SymGen -> AlgMatElt[FldRat]
Returns a Gram matrix representing the ambient quadratic vector space (over Q) of a lattice representing G.
IsEven(G) : SymGen -> BoolElt
Returns true if G represents even lattices.
IsSpinorGenus(G) : SymGen -> BoolElt
Returns true if and only if G is a spinor genus. This is the negation of IsGenus(G).
IsGenus(G) : SymGen -> BoolElt
Returns true if and only if G is a genus. This is the negation of IsSpinorGenus(G).
Determinant(G) : SymGen -> Lat
Returns the determinant of the genus symbol G.
LocalGenera(G) : SymGen -> Lat
Returns the sequence of p-adic genera of the genus symbol G.
ConwaySymbol(G) : SymGen -> MonStgElt
Returns the Conway symbol of G.
G1 eq G2 : SymGen, SymGen -> BoolElt
Given two genus symbols, return true if and only if they represent the same genus. This computation is fast for genera, but currently for spinor genera invokes a call to Representatives.
# G : SymGen -> RngIntElt
The number of isometry classes in the genus or spinor genus G.

Enumeration of isometry classes is done by an explicit call to Representatives, so that #G is an expensive computation.

SpinorCharacters(G) : SymGen -> [ GrpDrchElt ]
Return the spinor characters of the genus symbol G as a sequence of Dirichlet characters whose kernels intersect exactly in the group of automorphous numbers. Consult Conway and Sloane [JC98] for precise definitions and significance of the spinor kernel and automorphous numbers.
SpinorGenerators(G) : SymGen -> [ RngIntElt ]
Return the spinor generators of the genus symbol G as a sequence of primes which generate the group of spinor norms. The primes generate a group dual to that generated by the spinor characters.
AutomorphousClasses(L, p) : Lat, RngIntElt -> RngIntElt
AutomorphousClasses(G, p) : SymGen, RngIntElt -> RngIntElt
A set of integer representatives of the p-adic square classes in the image of the spinor norm of the lattice L (respectively the genus symbol G).
IsSpinorNorm(G, p) : SymGen, RngIntElt -> RngIntElt
Returns true if and only if p is coprime to 2 and the determinant, and p is the norm of an element of the spinor kernel of G.

Invariants of p-adic Genera

Prime(G) : SymGenLoc -> RngIntElt
Return the prime p for which G represents the p-adic genus.
Representative(G) : SymGenLoc -> Lat
Returns a canonical representative lattice of the p-adic genus G, with Gram matrix in Jordan form. For odd p the Jordan form is diagonalized.
Determinant(G) : SymGenLoc -> RngIntElt
This function returns a canonical p-adic representative of the determinant of the p-adic genus G. The determinant is well-defined only up to squares.
Dimension(G) : SymGenLoc -> RngIntElt
Rank(G) : SymGenLoc -> RngIntElt
Return the dimension of the p-adic genus G.
Oddity(G) : SymGenLoc -> RngIntResElt
Returns the oddity (in Z / 8 Z) of the 2-adic genus symbol G.
Excess(G) : SymGenLoc -> RngIntResElt
Returns the p-excess (in Z / 8 Z) of the p-adic genus symbol G.
Compartments(G) : SymGenLoc -> [ [ RngIntElt ] ]
Returns the compartments of the 2-adic genus symbol G. Compartments are maximal intervals where all factors are of scaled type I.
Trains(G) : SymGenLoc -> [ [ RngIntElt ] ]
Returns the trains of the 2-adic genus symbol G. Trains are maximal intervals having the property that for each pair of adjacent forms at least one is of scaled type I.
ConwaySymbol(G) : SymGenLoc -> MonStgElt
    Global: BoolElt                     Default: false
Returns the Conway symbol of G. If Global is true, returns its representation as part of the Conway symbol of a global genus.
IsEven(G) : SymGenLoc -> BoolElt
Returns true if G represents even lattices. If p is odd, every lattice is even.
GramMatrix(G) : SymGenLoc -> AlgMatElt[RngInt]
Returns a Gram matrix for a lattice L such that Lp is in Gp.
G1 eq G2 : SymGenLoc, SymGenLoc -> BoolElt
Given local genus symbols G1 and G2, return true if and only if they have the same prime and the same canonical Jordan form.
# G : SymGenLoc -> RngIntElt
The number of Jordan components in the p-adic genus symbol G.

Neighbour Relations and Graphs

Neighbour(L, v, p) : Lat, LatElt, RngIntElt -> Lat
Neighbor(L, v, p) : Lat, LatElt, RngIntElt -> Lat
Let L be an integral lattice, p a prime which does not divide (Determinant)(L) and v a vector in L - pL with (v, v) ∈p2 Z. The p-neighbour of L with respect to v is the lattice generated by Lv and p - 1 v, where Lv := { x ∈L | (x, v) ∈p Z }.

See [Kne57] for the original definition and [SP91] for a generalization of the neighbouring method.

Neighbours(L, p) : Lat, RngIntElt -> Lat
Neighbors(L, p) : Lat, RngIntElt -> Lat
For an integral lattice L and prime p, returns the sequence of p-neighbours of L.
NeighbourClosure(L, p) : Lat, RngIntElt -> Lat
NeighborClosure(L, p) : Lat, RngIntElt -> Lat
    NaturalAction: BoolElt              Default: false
    Proper: BoolElt                     Default: false
    UseAuto: BoolElt                    Default: true
    ThetaPrec: RngIntElt                Default: 12
    UseMass: BoolElt                    Default: true
    Bound: RngIntElt                    Default: 2^{32}
    Depth: RngIntElt                    Default: -1
For an integral lattice L and prime p, returns the sequence of lattices obtained by transitive closure of the p-neighbours of L. If NaturalAction is set to true, the representatives returned lie in the same quadratic space as L. If Proper is set to true, returns representatives for proper isometry classes. If UseMass is set to false, does not use the mass formula as a stopping condition, and compute the entire Neighbor closure. ThetaPrec determines the precision to which theta series of the representatives will be computed.

Note that neighbours with respect to two vectors v1, v2 whose images in L/pL lie in the same projective orbit of (Aut)(L) on L/pL are isometric. Therefore, as long as UseAuto is set to true, only projective orbit representatives of the action of (Aut)(L) on L/pL are used. The large number of orbits restricts the complexity of this algorithm, hence the function gives an error if p^((Rank)(L)) is greater than Bound, by default set to 232. The Depth parameter is used to control the depth in the calls to AutomorphismGroup and IsIsometric.

GenusRepresentatives(L) : Lat -> [ Lat ], Assoc
SpinorRepresentatives(L) : Lat -> [ Lat ], Assoc
Representatives(G) : SymGen -> [ Lat ], Assoc
Representatives(G) : SymGen -> [ LatNF ], Assoc
    NaturalAction: BoolElt              Default: false
    Proper: BoolElt                     Default: false
    ThetaPrec: RngIntElt                Default: 12
    Bound: RngIntElt                    Default: 2^{32}
    Depth: RngIntElt                    Default: -1
For an exact lattice L with genus or spinor genus G, this function enumerates the isometry classes in G by constructing the p-neighbour closure (up to isometry). This construction used using an appropriate prime or primes p not dividing the determinant of L. For the genus, sufficiently many primes p are chosen to generate the full image, modulo the spinor kernel, of each character defining the spinor kernel. The parameters are exactly as for the NeighbourClosure function.
PositiveDefiniteQuadraticLattices(n, d) : RngIntElt, RngIntElt -> [ [ Lat ] ]
TernaryQuadraticLattices(d) : RngIntElt -> [ [ Lat ] ]
QuaternaryQuadraticLattices(d) : RngIntElt -> [ [ Lat ] ]
QuinaryQuadraticLattices(d) : RngIntElt -> [ [ Lat ] ]
Given a positive integer d, returns representatives for all isometry classes of positive definite lattices with discriminant (resp. half-discriminant for odd rank) d, grouped by genus.
AdjacencyMatrix(G, p) : SymGen, RngIntElt -> AlgMatElt
For a genus or spinor genus G, this function determines the adjacency matrix of the p-neighbour graph on the representative classes for G. The integer p must be prime, and if G is a spinor genus, then an error ensues if p is not an automorphous number for G.

Example Lat_Neighbour (H31E21)

We construct the root lattice E8 (the unique even unimodular lattice of dimension 8) as a 2-neighbour of the 8-dimensional standard lattice.
> Z8 := StandardLattice(8);
> v := Z8 ! [1,1,1,1,1,1,1,1];
> E8 := Neighbour(Z8, v, 2);
> E8;
Lattice of rank 8 and degree 8
Basis:
( 2  0  0  0  0  0  0  2)
( 2  0  0  0  0  0  0 -2)
( 1  1 -1  1  1 -1  1  1)
( 1  1 -1 -1 -1 -1 -1 -1)
( 1 -1 -1 -1 -1 -1  1 -1)
( 0  0  2  0  0  0  0  2)
( 0  0  0  0  2  0  0  2)
( 0  0  0  0  0  2  0  2)
Basis denominator: 2
The so-obtained lattice is in fact identical to the one returned by the standard construction.
> L := Lattice("E", 8);
> L;
Lattice of rank 8 and degree 8
Basis:
( 4  0  0  0  0  0  0  0)
(-2  2  0  0  0  0  0  0)
( 0 -2  2  0  0  0  0  0)
( 0  0 -2  2  0  0  0  0)
( 0  0  0 -2  2  0  0  0)
( 0  0  0  0 -2  2  0  0)
( 0  0  0  0  0 -2  2  0)
( 1  1  1  1  1  1  1  1)
Basis Denominator: 2
> E8 eq L;
true

Example Lat_Genus (H31E22)

In this example we enumerate representatives for the genus of the Coxeter-Todd lattice, performing the major steps manually. The whole computation can be done simply by calling the GenusRepresentatives function but the example illustrates how the function actually works.

We use a combination of the automorphism group, isometry and neighbouring functions. The idea is that the neighbouring graph spans the full genus which therefore can be computed by successively generating neighbours and checking them for isometry with already known ones. The automorphism group comes into play, since neighbours with respect to vectors in the same projective orbit under the automorphism group are isometric.

> L := CoordinateLattice(Lattice("Kappa", 12));
> G := AutomorphismGroup(L);
> G2 := ChangeRing(G, GF(2));
> O := LineOrbits(G2);
> [ Norm(L!Rep(o).1) : o in O ];
[ 4, 8, 10 ]
Hence only the first and second orbits give rise to a 2-neighbour. To obtain an even neighbour, the second vector has to be adjusted by an element of 2 * L such that it has norm divisible by 8.
> v1 := L ! Rep(O[1]).1;
> v1 +:= 2 * Rep({ u : u in Basis(L) | (v1,u) mod 2 eq 1 });
> v2 := L ! Rep(O[2]).1;
> Norm(v1), Norm(v2);
16 8
> L1 := Neighbour(L, v1, 2);
> L2 := Neighbour(L, v2, 2);
> bool := IsIsometric(L, L1); bool;
true
> bool := IsIsometric(L, L2); bool;
false
So we obtain only one non-isometric even neighbour of L. To obtain the full genus we can now proceed with L2 in the same way, and do this with the following function EvenGenus. Note that this function is simply one component of the function GenusRepresentatives.
> function EvenGenus(L)
>      // Start with the lattice L
>      Lambda := [ CoordinateLattice(LLL(L)) ];
>      cand := 1;
>      while cand le #Lambda do
>          L := Lambda[cand];
>          G := ChangeRing( AutomorphismGroup(L), GF(2) );
>          // Get the projective orbits on L/2L
>          O := LineOrbits(G);
>          for o in O do
>              v := L ! Rep(o).1;
>              if Norm(v) mod 4 eq 0 then
>                  // Adjust the vector such that its norm is divisible by 8
>                  if not Norm(v) mod 8 eq 0 then
>                      v +:= 2 * Rep({ u : u in Basis(L) | (v,u) mod 2 eq 1 });
>                  end if;
>                  N := LLL(Neighbour(L, v, 2));
>                  new := true;
>                  for i in [1..#Lambda] do
>                      if IsIsometric(Lambda[i], N) then
>                          new := false;
>                          break i;
>                      end if;
>                  end for;
>                  if new then
>                      Append(~Lambda, CoordinateLattice(N));
>                  end if;
>              end if;
>          end for;
>          cand +:= 1;
>      end while;
>      return Lambda;
> end function;
>
> time Lambda := EvenGenus(L);
Time: 9.300
> #Lambda;
10
> [ Minimum(L) : L in Lambda ];
[ 4, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
> &+[ 1/#AutomorphismGroup(L) : L in Lambda ];
4649359/4213820620800
We see that the genus consists of 10 classes of lattices where only the Coxeter-Todd lattice has minimum 4 and get the mass of the genus as 4649359/4213820620800.
V2.29, 26 September 2025