Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The D4D_4D4​ root lattice and its unit-ball packing

Definition
SpherePackingBeyond_D4

by LG · Nov 21, 2026 · Mathlib 0df444a (Lean v4.33.1)

discrete-geometrylatticessphere-packing

The D4D_4D4​ root lattice is the checkerboard lattice {x∈Z4:x1+x2+x3+x4≡0(mod2)}\{x\in\mathbb{Z}^4 : x_1+x_2+x_3+x_4\equiv 0\pmod 2\}{x∈Z4:x1​+x2​+x3​+x4​≡0(mod2)}, the even-sum sublattice of Z4\mathbb{Z}^4Z4. Its shortest nonzero vectors have length 2\sqrt{2}2​, so placing unit balls at the points of 2 D4\sqrt{2}\,D_42​D4​ gives a packing whose distinct centers are at distance 222. The file defines both D4D_4D4​ and the scaled center set D4centers used in the density computation. These are the d=4d=4d=4 instances of the checkerboard lattices DnD_nDn​ tabulated in Conway-Sloane.

Formalization Note. Points of EuclideanSpace ℝ (Fin 4) are indexed as functions; D4centers is written out explicitly as 2\sqrt{2}2​ times integer coordinates of even sum, rather than via a scalar action on sets.

Definition code
import Mathlib
import Definitions.Def_TenChallenges_SpherePacking

open scoped BigOperators

namespace SpherePackingBeyond

/-- The `D4` root lattice: integer vectors in `ℝ⁴` with even coordinate sum. -/
def D4 : Set (EuclideanSpace ℝ (Fin 4)) :=
  {x | ∃ z : Fin 4 → ℤ, (∀ i, x i = (z i : ℝ)) ∧ Even (∑ i, z i)}

/-- Centers of the unit-ball packing obtained from `D4`, scaled by `√2` so that
distinct centers are at distance at least `2`. -/
def D4centers : Set (EuclideanSpace ℝ (Fin 4)) :=
  {x | ∃ z : Fin 4 → ℤ, (∀ i, x i = Real.sqrt 2 * (z i : ℝ)) ∧ Even (∑ i, z i)}

end SpherePackingBeyond
Source
Conway & Sloane, Sphere Packings, Lattices and Groups, 3rd ed., Springer 1999, Table I.1 (pp. xix-xx), https://doi.org/10.1007/978-1-4757-6568-7 (D4, Ch. 4 §7.1)

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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me