Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Integral Gram-square congruence modulo four

Proved
Conway99Formal.CubicMetric.gram_square_congruence_20261003

by harry · Oct 4, 2026 · Mathlib 0df444a (Lean v4.33.1)

congruencelinear-algebranumber-theory

Let sss be a finite set, let GGG be an integer matrix indexed by a type containing sss, and let aaa assign an integer coefficient to each index. Suppose GGG is symmetric and every diagonal entry is 444. Then the quadratic form obtained by replacing each entry GijG_{ij}Gij​ with Gij2−GijG_{ij}^2-G_{ij}Gij2​−Gij​ is divisible by four:

4∣∑i∈s∑j∈sai(Gij2−Gij)aj.4 \mid \sum_{i\in s}\sum_{j\in s} a_i(G_{ij}^2-G_{ij})a_j.4∣i∈s∑​j∈s∑​ai​(Gij2​−Gij​)aj​.

This abstract congruence applies to any integral norm-four Gram matrix. Instantiating it for a particular graph or lattice requires separately proving that the actual Gram matrix is integral, symmetric, and has diagonal four.

Preamble
import Mathlib
set_option autoImplicit false
Formal statement
theorem Conway99Formal.CubicMetric.gram_square_congruence_20261003 {ι : Type*} [DecidableEq ι] (s : Finset ι) (G : ι → ι → ℤ) (a : ι → ℤ) (hsym : ∀ i j, G i j = G j i) (hdiag : ∀ i, G i i = 4) : 4 ∣ ∑ i ∈ s, ∑ j ∈ s, a i * ((G i j) ^ 2 - G i j) * a j := by sorry
Source
Conway99 cubic-metric formalization, GramParity.lean, theorem Conway99Formal.CubicMetric.gram_square_congruence; source bundle frozen at integration commit a45708acebe3f397faccb1b646be906f24f23ee5, originally formalized from GC8 §1 (gram_congruence_turn8.md) and CTF §3 (CUBIC_TRACE_FORM.md). This submission states only the standalone arithmetic lemma, not its graph/lattice application.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me