# Deciding isometry of unimodular lattices by Gram matrices

Say I have two unimodular lattices $$A$$ and $$B$$, represented by their Gram matrices.

Question: Is there an algorithm to decide whether $$A$$ and $$B$$ are isometric, i.e. whether there exists a matrix $$S \in SL(n,\mathbb Z)$$ such that $$B=SAS^T$$?

Background: I'm developing an algorithm to test whether two toric manifolds have the same $$\mathbb Z$$-cohomology graded ring. If the manifold is (complex)-even dimensional, the intersection form of the middle dimension homology is an integral lattice, and manifolds with the same cohomology ring have isometric intersection forms.

• If you allow $S$ in $GL_n(\mathbb{Q})$, this is given by the Hasse-Minkowski theorem -- $A$ and $B$ are equivalent if they have the same signature and, for every prime $p$, the same Hasse invariant. For $\mathbb{Z}$, I believe there are algorithms, and a lot of theorems, but no simple statement. Oct 20, 2020 at 10:53
• I need to compute the $\mathbb Z$-cohomology ring, so $GL_n(\mathbb Q)$ equivalence may not be so useful - but it still serves as a certificate of nonisomorphism. Oct 20, 2020 at 10:56
• The classification of unimodular lattices up to isometry is hopeless (as $n$ grows, their number increases really fast). It is really doubtful a general algorithm will be found. If you're thinking about a specific small $n$, then maybe.... Oct 20, 2020 at 11:07
• Out of curiosity, is your goal actually to check isomorphism of the rings, or is to check isomorphism of the toric varieties? Because, for example, the even Hirzebruch surfaces: $\Sigma_0$, $\Sigma_2$, $\Sigma_4$, ..., all are diffeomorphic to each other, and hence have the same cohomology ring, but they are not isomorphic as toric varieties. Oct 20, 2020 at 14:11
• I also think that, if I wanted isomorphism of the rings, I wouldn't look at the quadratic form in middle cohomology; I'd look at the degree $n$ form on $H^2(X)$ given by: $\langle D_1, D_2, \dots, D_n \rangle = (D_1 \cup D_2 \cup \cdots \cup D_n) \cap [X]$, where $X$ is the fundamental class. By Poincare duality (and the fact that $H^{\ast}$ of a toric variety is generated in $H^2$) this determines the ring. I don't know what algorithms exist to test isomorphism of degree $n$ forms, though. Oct 20, 2020 at 14:19

news to me: this has a quick answer for indefinite case. Lecture notes at Chicago, https://math.uchicago.edu/~dannyc/courses/4manifolds_2018/4_manifolds_notes.pdf He refers to Serre's little book for part of it, chapter V is pages 48-58.

The definite case has bounds involved, there is a command in magma

https://magma.maths.usyd.edu.au/magma/overview/2/17/9/

http://www.math.rwth-aachen.de/~Gabriele.Nebe/LATTICES/

Note the minimum 4 in dimension 24, that is the Leech lattice, for which your parents named you:

http://www.math.rwth-aachen.de/~Gabriele.Nebe/LATTICES/unimodular.html

They refer to specific papers of Plesken and of Nebe and of Souvignier. There is still an error of some sort in the commands for calculating the spinor genus, in my case of a positive ternary. John Voight knows about it now, and indicated that he worked with people who would be very interested in correcting the problem.