Enumeration of genera of lattices
I accelerated the enumeration of genera of even definite lattices by Kneser neighbours. Genera with tens of thousands of classes are now listed in minutes, up to several hundred times faster than Hecke.jl and more than a thousand times faster than SageMath.
Two lattices are in the same genus when they cannot be told apart locally: they are isometric over the real numbers and over the p-adic integers for every prime p. A genus is a finite set of isometry classes, and listing them is a basic task of the theory of quadratic forms: the classes are the input of theta series and modular forms, and of many classifications of lattices. The standard method is Kneser's: from one lattice, build its p-neighbours, which lie in the same genus, recognise their classes, and continue from the new ones. The process stops when the classes found account for the whole mass of the genus, the sum of 1/|Aut(L)|, which the Smith–Minkowski–Siegel formula gives in advance. This certifies the result.
Two things make the method expensive. The number of lines to examine at the prime p is (pn−1)/(p−1), so in rank 19 it is 5·105 at p = 2 but 1.9·1015 at p = 7. And most of the work is wasted: more than 90% of the neighbours built are classes already known. The classic setting assumes that p does not divide the determinant, which for a genus of even determinant rules out p = 2.
I made the enumeration practical on genera with tens of thousands of classes:
- Primes dividing the determinant. Kneser's construction, restricted to the right lines, stays in the genus at every prime, including p = 2 for an even determinant. The number of lines giving a neighbour can be read off the local structure of the genus, and the neighbour relation is symmetric, so the Hecke operators can be used for bookkeeping.
- Scheduling the exploration. The neighbour graph is not known in advance, and the task is to reach every class while building as few neighbours as possible. A random walk harvests most classes cheaply. The full expansions are then chosen by the Hecke bookkeeping, which tells for every class how many of its neighbours are still unexplained, alternating with the classes of largest symmetry group.
- Canonical forms. The lattices met have large root systems. Fixing a Weyl chamber removes the Weyl group from the problem, so that the canonical form and the automorphism group are computed on a small configuration. At p = 2 the orbits on the lines are computed on bitmasks.
With these, 31 genera of rank 14 to 19 with 548 to 40,617 classes are enumerated in 204 minutes in all, and a genus of rank 19 and determinant 90 with 28,528 classes in 14 minutes, on one core. On the 6,333 genera of even determinant of the DefLatDB database, the prime 2 fails only when no line at all gives a 2-neighbour, which happens exactly when the local structure at 2 is degenerate. The complete neighbour graphs computed, of genera with up to 2,813 classes, turn out to be excellent expanders, with spectral gap 1/2; what makes the last classes hard to find is their weight, 1/|Aut|, as small as 10−16 in the stationary distribution.
Compared with the open-source implementations on the same genera, the program is up to several hundred times faster than Hecke.jl and more than a thousand times faster than SageMath. Hecke.jl did not finish a genus of rank 14 with 288 classes in 30 minutes, which the program does in 3 seconds. Part of the gain comes from working at p = 2; at the same prime it is still 20 to 70 times faster than Hecke.jl on genera of rank 16 and 18.
The code is the program GENUS_Enumerate of polyhedral_common.