Structured proof · Unit 141
lemma isUnimodular_gradedLatticeBasis_gram
What it saysFor finite index types X, \iota, s, N \in \mathbb{N}, a bijection e : (X \sqcup \{\operatorname{pt}\}) \sqcup \{0, \ldots, s-1\} \simeq \iota, commutative rings S and R (R with an involution), a subring O of R, a ring homomorphism f : S \to R, units a, \pi of R with f(N) = \pi\cdot\overline{\pi} (
hN) and a unitary u \in R: the Gram matrix G^{H}\cdot f(gradedGram(e, N))\cdot G of the graded lattice basis G = gradedLatticeBasis(e, a, \pi, u) is unimodular over O (IsUnimodular: hermitian and in \mathrm{GL}_{\iota}(O)).The argument in briefThe Gram matrix is an explicit matrix H(N, 0) over O, whose inverse is H(0, N).
A string index c equals s - 1 - c iff s is odd and c = \lfloor s/2\rfloor (the middle index).
Lean states
c = c.rev ↔ if _ : Odd s then c = ⟨s / 2, by grind⟩ else FalseLet v = e(\operatorname{pt}), the last basis vector of X \sqcup \{\operatorname{pt}\}.
Let H(p, q) =
gradedGram(e, p) plus, for the middle index b (if any), (q - 1) at (v, v) and -1 at (v, e(b)) and (e(b), v).The Gram matrix equals f(H(N, 0)) (using \pi\cdot\overline{\pi} = f(N) and u\overline{u} = 1), it is hermitian, and H(N, 0)\cdot H(0, N) = 1, so it lies in \mathrm{GL}_{\iota}(O); both are checked entrywise, separately for s odd and even.