teal-sea / zeta-labstate of record · compiled 14 Aug 2026 · revision 9ebdea0 · source

Library · hunts/frontier_math/SPL-AUDIT.md

Audit: `thefundamentaltheor3m/Sphere-Packing-Lean`

2,909 words · 402 lines · source

Clone: git clone --depth 1 https://github.com/thefundamentaltheor3m/Sphere-Packing-Lean.git/tmp/claude-0/-home-user-zeta-lab/b36e7360-bacb-5ff5-9319-18b0b8b964ba/scratchpad/sphere-packing-lean (direct clone succeeded; mirror not needed). HEAD = bad3de916074748eb88b7d1ee6dbf9494361ad17, branch main, dated 2026-08-05 (i.e. the current tip, not a stale snapshot). 77 .lean files, 18,194 lines.

Everything below is quoted from files in that clone.


0. Headline correction: the repo is NOT sorry-free, and the main theorem is a sorry

SpherePacking/MainTheorem.lean in full:

theorem SpherePacking.MainTheorem : SpherePackingConstant 8 = E8Packing.density :=
  sorry

Real (non-comment, non-test-file) sorrys, 61 of them across 19 files:

filecount
MagicFunction/b/Schwartz.lean12
MagicFunction/a/Schwartz.lean11
MagicFunction/a/Integrability/Integrability.lean6
MagicFunction/PolyFourierCoeffBound.lean4
CohnElkies/LPBound.lean3 (+1 commented)
CohnElkies/Prereqs.lean3
ModularForms/FG.lean, MagicFunction/b/Eigenfunction.lean, MagicFunction/a/Eigenfunction.lean, MagicFunction/a/IntegralEstimates/{I2,I4,I6}.lean, ForMathlib/InvPowSummability.lean2 each
ModularForms/DimensionFormulas.lean, MainTheorem.lean, MagicFunction/{a,b}/SpecialValues.lean, ForMathlib/CauchyGoursat/OpenRectangular.lean, Basic/PeriodicPacking.lean1 each

The "formally complete Feb 2026" report is not borne out by this repository's main as of 2026-08-05. Whatever was announced, it is not what is in this tree.


1. Inventory of the relevant statements

1a. Poisson summation — SpherePacking/CohnElkies/Prereqs.lean

The file opens with (lines 8–11):

## THIS FILE SHOULD EVENTUALLY BE REMOVED AND THE REFERENCES IN COHN-ELKIES MUST BE REPLACED WITH
## THE RIGHT ONES (NOT THE ONES FROM HERE). THIS FILE IS JUST A TEMPORARY SOLUTION TO MAKE THE
## COHN-ELKIES FILE WORK.

Context (lines 38–39):

variable {d : ℕ} [Fact (0 < d)]
variable (Λ : Submodule ℤ (EuclideanSpace ℝ (Fin d))) [DiscreteTopology Λ] [IsZLattice ℝ Λ]

The hypothesis predicate (line 100), verbatim — note the sorry inside the definition:

def PSF_Conditions (f : EuclideanSpace ℝ (Fin d) → ℂ) : Prop :=
  Summable f ∧
  sorry
theorem PSF_L {f : EuclideanSpace ℝ (Fin d) → ℂ} (hf : PSF_Conditions f)
  (v : EuclideanSpace ℝ (Fin d)) :
  ∑' ℓ : Λ, f (v + ℓ) = (1 / ZLattice.covolume Λ) *
    ∑' m : LinearMap.BilinForm.dualSubmodule (innerₗ _) Λ,
  (𝓕 f m) * exp (2 * π * I * ⟪v, m⟫_[ℝ]) :=
  sorry

-- The version below is on the blueprint. I'm pretty sure it can be removed.
theorem PSF_L' {f : EuclideanSpace ℝ (Fin d) → ℂ} (hf : PSF_Conditions f) :
    ∑' ℓ : Λ, f ℓ = (1 / ZLattice.covolume Λ) *
      ∑' m : LinearMap.BilinForm.dualSubmodule (innerₗ _) Λ, (𝓕 f m)
    := by
  simpa using PSF_L Λ hf 0
namespace SchwartzMap

theorem PoissonSummation_Lattices (f : SchwartzMap (EuclideanSpace ℝ (Fin d)) ℂ)
  (v : EuclideanSpace ℝ (Fin d)) :
  ∑' ℓ : Λ, f (v + ℓ) = (1 / ZLattice.covolume Λ) *
    ∑' m : LinearMap.BilinForm.dualSubmodule (innerₗ _) Λ,
      (𝓕 ⇑f m) * exp (2 * π * I * ⟪v, m⟫_[ℝ]) := by
  sorry

end SchwartzMap

This is the entire Poisson-summation content of the repository. Three statements, all sorry, one of them with a sorry in its own hypothesis. It is a stub file that the authors have labelled as such. grep -rn "Poisson\|poissonSummation" over SpherePacking/ returns only these declarations plus one call site (LPBound.lean:372) and comments.

The blueprint agrees. blueprint/src/subsections/fourier-analysis.tex:86 states the theorem, tags \lean{SchwartzMap.PoissonSummation_Lattices}, and its proof environment reads:

\begin{proof}
  One possible proof would be by induction on $d$. However, there are numerous nuances involved,
  particularly in manipulating nested infinite sums. Ideas would be appreciated.
\end{proof}

(The \leanok on the \begin{theorem} line means the statement is formalised, not the proof; the proof environment carries no \leanok.)

1b. The LP bound — SpherePacking/CohnElkies/LPBound.lean

Hypotheses are variables (lines 55–64):

variable {f : 𝓢(EuclideanSpace ℝ (Fin d), ℂ)} (hne_zero : f ≠ 0)
variable (hReal : ∀ x : EuclideanSpace ℝ (Fin d), ↑(f x).re = (f x))
variable (hRealFourier : ∀ x : EuclideanSpace ℝ (Fin d), ↑(𝓕 f x).re = (𝓕 f x))
-- The Cohn-Elkies conditions:
variable (hCohnElkies₁ : ∀ x : EuclideanSpace ℝ (Fin d), ‖x‖ ≥ 1 → (f x).re ≤ 0)
variable (hCohnElkies₂ : ∀ x : EuclideanSpace ℝ (Fin d), (𝓕 f x).re ≥ 0)

The two headline results (lines 533 and 642):

theorem LinearProgrammingBound' (hd : 0 < d) (hf : Summable f) :
  P.density ≤ (f 0).re.toNNReal / (𝓕 f 0).re.toNNReal *
  volume (ball (0 : EuclideanSpace ℝ (Fin d)) (1 / 2)) := by
theorem LinearProgrammingBound (hd : 0 < d) (hf : Summable f) : SpherePackingConstant d ≤
  (f 0).re.toNNReal / (𝓕 ⇑f 0).re.toNNReal * volume (ball (0 : EuclideanSpace ℝ (Fin d)) (1 / 2))
  := by

These are the Fourier-positivity conditions asked about: hCohnElkies₂ is pointwise nonnegativity of the Fourier transform of a Schwartz function, stated as a hypothesis and never derived. There is no positive-definiteness API, no PosDef, no reusable "positive Fourier transform" structure — grep for PosDef, posdef, positive definite over SpherePacking/ returns nothing.

The proof chain is not closed. LPBound.lean has three genuine sorrys, all summability side-conditions inside calc_steps, at lines 358, 388, 392, 467 (one is a case summable => sorry); e.g. line 467 guards

have hSummable : Summable
  (fun (m : ↥(LinearMap.BilinForm.dualSubmodule (innerₗ _) P.lattice)) =>
  (𝓕 ⇑f m).re * (norm (∑' x : ↑(P.centers ∩ D),
  exp (2 * π * I * ⟪↑x, (m : EuclideanSpace ℝ (Fin d))⟫_[ℝ])) ^ 2)) := by
  sorry

and line 372 is the call exact SchwartzMap.PoissonSummation_Lattices P.lattice f _, i.e. the LP bound is proved from the sorried Poisson formula.

1c. IsDecayingMapSpherePacking/ForMathlib/InvPowSummability.lean:37

def IsDecayingMap (X : Set (EuclideanSpace ℝ (Fin d)))
    (f : EuclideanSpace ℝ (Fin d) → ℝ) : Prop :=
  ∀ k : ℕ, ∃ C : ℝ, ∀ x ∈ X, ‖(x : EuclideanSpace ℝ (Fin d))‖ ^ k * ‖f x‖ ≤ C

with the companion predicate (line 29)

def Inv_Pow_Norm_Summable_Over_Set_Euclidean (X : Set (EuclideanSpace ℝ (Fin d))) : Prop :=
  Summable (fun x : X => 1 / ‖(x : EuclideanSpace ℝ (Fin d))‖ ^ (d + 1))

and the usable result (line 168):

theorem Summable_of_Inv_Pow_Summable
  (X : Set (EuclideanSpace ℝ (Fin d))) (hX : Inv_Pow_Norm_Summable_Over_Set_Euclidean X)
  (hf : IsDecayingMap X f) :
  Summable (fun x : X => f x)

This part is proved (IsDecayingMap.subset, Summable_of_Inv_Pow_Summable', SchwartzMap.IsDecaying). But note: IsDecayingMap demands decay faster than every polynomial (∀ k : ℕ) — it is a Schwartz-strength decay condition, not the O(|x|^{-b}) for a single b > 1 that a compactly supported kernel would want. And the two remaining sorrys in this file (extracted_1 at line 233, Summable_Inverse_Powers_of_Finite_Orbits at line 251) are exactly the lemmas that would supply Inv_Pow_Norm_Summable_Over_Set_Euclidean for a lattice orbit — so the summability half is also open where it touches lattices.

1d. Toolchain / pin / licence


2. The key question: can this API state our bridge?

(a) Dimension and smoothness

Dimension. PSF_L / PoissonSummation_Lattices are stated over EuclideanSpace ℝ (Fin d) with [Fact (0 < d)], so d = 1 is type-correct. There is no n ≥ 2 restriction. But d = 1 buys nothing here, because the statement is unproved.

Smoothness. Both are stated only for SchwartzMap _ ℂ (or for the placeholder PSF_Conditions, whose second conjunct is literally sorry). Our c2 is continuous, compactly supported on [-1,1], with a corner at 0 — not C^∞, therefore not Schwartz, therefore outside the hypothesis of PoissonSummation_Lattices as stated. There is no weaker-hypothesis variant in the repo: HasCompactSupport, tsupport, ContinuousMap-valued Poisson results — none appear anywhere in SpherePacking/.

The cheapest repair is not to repair this repo at all, because upstream Mathlib (the very version this repo pins, v4.32.0) already contains the 1-D statement we need with hypotheses c2 satisfies. From Mathlib/Analysis/Fourier/PoissonSummation.lean at tag v4.32.0:

/-- **Poisson's summation formula**, assuming that both `f` and its Fourier transform decay as
`|x| ^ (-b)` for some `1 < b`. (This is the one-dimensional case of Corollary VII.2.6 of Stein and
Weiss, *Introduction to Fourier analysis on Euclidean spaces*.) -/
theorem Real.tsum_eq_tsum_fourier_of_rpow_decay {f : ℝ → ℂ} (hc : Continuous f) {b : ℝ}
    (hb : 1 < b) (hf : f =O[cocompact ℝ] (|·| ^ (-b)))
    (hFf : (𝓕 f) =O[cocompact ℝ] (|·| ^ (-b))) (x : ℝ) :
    ∑' n : ℤ, f (x + n) = ∑' n : ℤ, 𝓕 f n * fourier n (x : UnitAddCircle)

and, more general still,

/-- **Poisson's summation formula**, most general form. -/
theorem Real.tsum_eq_tsum_fourier {f : C(ℝ, ℂ)}
    (h_norm :
      ∀ K : Compacts ℝ, Summable fun n : ℤ => ‖(f.comp <| ContinuousMap.addRight n).restrict K‖)
    (h_sum : Summable fun n : ℤ => 𝓕 (f : ℝ → ℂ) n) (x : ℝ) :
    ∑' n : ℤ, f (x + n) = ∑' n : ℤ, 𝓕 (f : ℝ → ℂ) n * fourier n (x : UnitAddCircle)

Hypotheses required: continuity plus polynomial decay. No smoothness at all. Applied in the orientation we need — physical-side function ĉ2 = |ĝ|² (continuous, nonneg, O(|x|^{-2}) since ĝ = O(|x|^{-1})), dual-side function c2 (compactly supported, hence O(|x|^{-b}) for every b) — both =O[cocompact ℝ] (|·|^(-2)) hypotheses hold and b = 2 > 1. The corner of c2 at 0 is irrelevant: continuity is all that is asked of the transformed side, and c2 appears only through 𝓕 f, which is not required to be smooth.

The only real work left on that side is the spacing-s rescaling — Mathlib's statement is for the lattice , ours for sℤ, so a substitution x ↦ x/s and the corresponding 𝓕 scaling lemma are needed. That is routine, and it is work you would do against Mathlib, not against this repo.

(b) Finite vs infinite lattice sum with an explicit error term

Absent. Completely. There is no truncation lemma, no tail bound, no finite-vs-infinite comparison with an error term anywhere in the repository. grep for truncat, tail_, and manual reading of InvPowSummability.lean, Prereqs.lean and LPBound.lean turns up only qualitative summability (Summable, IsDecayingMap, Summable_of_Inv_Pow_Summable) with no quantitative remainder.

Structurally this is unsurprising: the Cohn–Elkies argument never truncates. It goes finite-cluster → periodic packing (PeriodicSpherePacking, P.numReps', fundamental domain D) and then applies Poisson to the exact infinite lattice sum. The passage from general to periodic packings is periodic_constant_eq_constant in SpherePacking/Basic/PeriodicPacking.lean (which itself carries a sorry at line 1221), and it is a supremum/approximation argument about packing densities, not a bound on a per-configuration functional with an error term. It gives no one-sided inequality of the shape you need, in either direction.

So the actual bridge you are missing is not in this repo, and its absence is by design of the mathematics, not an oversight.


3. Reusability as a dependency


4. Bandlimited positivity / Beurling–Selberg / LP-bound material

  theorem f_nonneg_at_zero : 0 ≤ (f 0).re
  theorem f_zero_pos : 0 < (f 0).re

(LPBound.lean:103, 114) — i.e. "f̂ ≥ 0 and f ≠ 0 implies f(0) > 0", via Fourier inversion and Continuous.integral_zero_iff_zero_of_nonneg (Prereqs.lean:206, proved). That last one is a genuinely reusable little lemma ("a continuous nonneg integrable function with zero integral is zero"), but it is a two-line Mathlib-flavoured fact, not scaffolding.


5. Verdict

(iv), shading into (iii): not relevant as a dependency; marginally useful as a proof-pattern reference.

Specifics:

  1. The one theorem in the repo that names your problem — SchwartzMap.PoissonSummation_Latticesis a sorry, as is PSF_L, as is the hypothesis predicate PSF_Conditions (Summable f ∧ sorry). There is nothing to reuse because nothing is proved.
  2. Even taken as a statement, it is Schwartz-only, and c2 is not Schwartz (corner at 0). Meanwhile Mathlib's own Real.tsum_eq_tsum_fourier_of_rpow_decay needs only continuity + O(|x|^{-b}), b > 1, which c2 and ĉ2 = |ĝ|² both satisfy with b = 2. The sphere-packing repo's Poisson result is strictly weaker than what you already have for free.
  3. The finite-to-infinite comparison with an explicit error term — the actual bridge — is simply not present, in any form, and could not be, because Cohn–Elkies routes through periodicity rather than truncation.
  4. Depending on it would import sorrys and force a Mathlib fork off v4.33.0-rc2.

Cheapest route to the bridge, given what I read

Files worth reading once, as pattern, if anything