Viazovska's Magic Function — Original Contour Integrals #
This file defines the magic function a(r) from Viazovska's proof of the
optimality of the E₈ sphere packing [Via2017] and proves the key contour
equivalence I₁₂ = I₁₂_vert + I₁₂_horiz (rectangular decomposition of the
diagonal contour from -1 to i).
What we prove #
The function aRad(r) is defined using the original triangular contours
from Viazovska's paper:
aRad(r) = ∫_{-1→i} φ₀(-1/(z+1)) · (z+1)² · e^{πirz} dz
+ ∫_{1→i} φ₀(-1/(z-1)) · (z-1)² · e^{πirz} dz
- 2 ∫_{0→i} φ₀(-1/z) · z² · e^{πirz} dz
+ 2 ∫_{i→i∞} φ₀(z) · e^{πirz} dz
where φ₀(z) = (E₂E₄ - E₆)² / Δ(z).
The main result I12_eq_rectangular proves that the diagonal contour integral
∫_{-1→i} equals the sum of a vertical integral ∫_{-1→-1+i} and a
horizontal integral ∫_{-1+i→i}. This is the first step toward evaluating
aRad(r) via the Fourier expansion of φ₀.
How this differs from Sphere-Packing-Lean (Gauss2 PR) #
The Sphere-Packing-Lean formalization
deforms the original triangular contours into rectangular contours from the
start, avoiding the cusp singularity at z = -1, 0, 1 entirely. The contour
integrals are then evaluated on rectangles where all four sides lie strictly
inside the upper half-plane.
Our approach keeps Viazovska's original contours and handles the cusp singularities directly:
Holomorphicity of φ₀: We prove
E₂is holomorphic on ℍ viaE₂ = (πI/12)⁻¹ · logDeriv(η)(Dedekind eta), then build up toφ₀''holomorphic on ℍ (PhiHolomorphic.lean). The Gauss2 PR instead uses the Serre derivative and Ramanujan's identityE₂E₄ - E₆ = 3D(E₄).Cusp decay: We prove
φ₀is bounded atIm → ∞via the q-expansion bound|E₂E₄-E₆| ≤ K|q|(CuspDecay.lean), using|E₂-1| ≤ 192|q|from a comparison test on the Eisenstein series.Contour equivalence: We prove
I₁₂ = I₁₂_vert + I₁₂_horizusing path independence fromholomorphic_convex_primitiveon the convex upper half-plane. The proof takes a primitiveGof the integrand, applies FTC to truncated integrals (starting at heightδ > 0), then takesδ → 0using the cusp cancellation(z+1)² → 0atz = -1.Infrastructure: The key tool is
holomorphic_convex_primitivefromGeneralizedResidueTheory/CauchyPrimitive.lean, which gives path independence for holomorphic functions on convex open sets. This is part of our broader generalized residue theorem framework (Hungerbühler-Wasem, Theorem 3.3), though this file only uses the convex primitive — the full generalized residue theorem andContourCycleframework will be applied when computingaRad(r)via the S-transformation of φ₀.
Main results #
φ₀''_differentiableOn: φ₀ is holomorphic on ℍcontinuousOn_diagonal_integrand: the parameterized diagonal integrand is continuous on[0,1](including the cusp endpointt = 0)continuousOn_vertical_integrand: same for the vertical parameterizationI12_eq_rectangular:I₁₂(r) = I₁₂_vert(r) + I₁₂_horiz(r)
References #
- Viazovska, M. S. (2017). "The sphere packing problem in dimension 8." Annals of Mathematics, 185(3), 991-1015.
- Hungerbühler, N., Wasem, M. (2019). "A generalized version of the residue theorem." arXiv:1808.00997v2.
Modular form ingredients #
We use φ₀'' (the ℂ-extended version of φ₀) from Modularforms/Eisenstein.lean.
This is defined as φ₀''(z) = φ₀(z) when Im(z) > 0, and 0 otherwise.
The underlying φ₀(z) = (E₂E₄ - E₆)² / Δ(z) is defined on the upper half-plane ℍ.
Key properties (proven in Eisenstein.lean and Delta.lean):
φ₀is holomorphic on ℍ (since Δ ≠ 0 on ℍ)- Periodic:
φ₀(z+1) = φ₀(z) - S-transform:
φ₀(-1/z) = φ₀(z) - (12i/π)·(1/z)·φ₋₂(z) - (36/π²)·(1/z²)·φ₋₄(z) - Vanishing:
φ₀(z) = O(e^{-2πIm(z)})asIm(z) → ∞
Original Viazovska contour integrals #
The four integrals defining aRad(r), using straight-line contours from the real axis to i.
The integrand for I₁+I₂: φ₀(-1/(z+1)) · (z+1)² · e^{πirz}. At z = -1 (the cusp), (z+1)² = 0 cancels the singularity of φ₀.
Equations
Instances For
The integrand for I₃+I₄: φ₀(-1/(z-1)) · (z-1)² · e^{πirz}. At z = 1 (the cusp), (z-1)² = 0 cancels the singularity.
Equations
Instances For
The integrand for I₆: φ₀(z) · e^{πirz}. No singularity issues (Im(z) ≥ 1 on the contour).
Equations
- viazovskaIntegrandTail r z = φ₀'' z * Complex.exp (↑Real.pi * Complex.I * ↑r * z)
Instances For
The straight-line contour from -1 to i (original Viazovska path).
Instances For
The straight-line contour from 1 to i (original Viazovska path).
Instances For
The straight-line contour from 0 to i (vertical segment).
Equations
- contour0ToI t = Complex.I * ↑t
Instances For
The magic function aRad(r) #
Defined using the original Viazovska contours.
Holomorphicity of φ₀ #
φ₀ = (E₂·E₄ - E₆)² / Δ is holomorphic on ℍ because:
Upper half-plane: convexity and openness #
Holomorphicity of the integrand #
The integrand viazovskaIntegrandLeft r is holomorphic on the upper half-plane.
This follows from holomorphicity of φ₀'' and the algebraic factors.
Contour equivalence infrastructure #
Segment integrals and the fundamental theorem of calculus #
Given a holomorphic function f on a convex open set S with primitive G
(i.e., G' = f on S), the segment integral from a to b equals G(b) - G(a).
This gives path independence: for a, b, c ∈ S,
∫_{a→b} f dz = ∫_{a→c} f dz + ∫_{c→b} f dz
since both sides equal G(b) - G(a).
FTC for segment integrals: if G' = f on a convex open set,
then the segment integral of f from a to b equals G(b) - G(a).
Contour additivity: for a holomorphic function on a convex open set,
the segment integral from a to b equals the sum of segment integrals
from a to c and from c to b.
Contour parameterization lemmas #
The derivative of contourNeg1ToI is the constant 1 + I.
Rectangular decomposition integrals #
Truncated contour equivalence #
For δ > 0, the diagonal integral from -1 + δI to I equals the
vertical integral from -1 + δI to -1 + I plus the horizontal integral
from -1 + I to I. All three segments lie in the upper half-plane,
so path independence (from holomorphic_convex_primitive) applies.
Truncated contour equivalence: for δ > 0, the diagonal segment integral from
-1 + δI to I equals the vertical from -1 + δI to -1 + I plus the
horizontal from -1 + I to I. This is path independence for holomorphic
functions on the convex open upper half-plane.
The horizontal part of the truncated equivalence equals I12Horiz.
The segment from -1+I to I does not depend on δ.
Path-specific cusp decay #
Along the diagonal contour t -> -1 + t(1+I) and the vertical contour
t -> -1 + tI, as t -> 0+ the substitution w = -1/(z+1) sends
Im(w) -> +infty. So phi0_isBoundedAtImInfty gives a bound on
phi_0(w), and the (z+1)^2 = O(t^2) factor drives the integrand to 0.
Step 5: Cusp decay and integrand boundary behavior #
To pass from the truncated contour equivalence (δ > 0) to the full equivalence (starting at -1), we need the integrand to vanish at z = -1. This follows from the cusp behavior of φ₀: as z → -1, the substitution w = -1/(z+1) sends Im(w) → +∞, and the q-expansion of φ₀ shows φ₀(w) = O(e^{-2πIm(w)}). The factor (z+1)² cancels the 1/w² from the change of variables, leaving the integrand → 0.
We state the key cusp estimates as sorry'd lemmas (requiring q-expansion infrastructure) and prove the contour equivalence from them.
The general statement Tendsto (viazovskaIntegrandLeft r) (𝓝[ℍ] (-1)) (𝓝 0) requires
T-periodicity of φ₀ and compactness arguments on the fundamental domain. Since the main
theorem I12_eq_rectangular uses a direct bound on the connecting segment (where
Im(w) ≥ 1/(2δ) → ∞) via phi0_isBoundedAtImInfty, this general tendsto is not needed.
Helpers for cusp-decay continuity at t = 0 #
Both continuousOn_diagonal_integrand and continuousOn_vertical_integrand need
an epsilon-delta squeeze at t = 0 using phi0_isBoundedAtImInfty. We factor out
the common sub-arguments into reusable helpers.
The parameterized diagonal integrand is continuous on [0,1].
The parameterized vertical integrand is continuous on [0,1].
Step 5b: FTC-based limit argument #
The key observation is that all segment integrals equal G(endpoint) - G(startpoint)
for a primitive G on the upper half-plane. As δ → 0, the starting point
-1 + δI approaches -1, and G(-1 + δI) converges by continuity.
We work with the primitive directly to avoid dominated convergence.
The primitive G of viazovskaIntegrandLeft r on the upper half-plane,
whose existence follows from holomorphic_convex_primitive.
The truncated diagonal integral from -1 + δI to I equals G(I) - G(-1+δI)
for the primitive G of the integrand.
The truncated vertical integral from -1 + δI to -1 + I equals
G(-1+I) - G(-1+δI) for the primitive.
Step 6: Full contour equivalence via primitive cancellation #
The full contour equivalence I12 = I12Vert + I12Horiz follows from
the primitive approach: both sides equal G(I) - lim_{δ→0} G(-1+δI).
The truncated versions give:
- Diagonal:
G(I) - G(-1+δI) - Vertical + Horizontal:
(G(-1+I) - G(-1+δI)) + (G(I) - G(-1+I)) = G(I) - G(-1+δI)
So truncated diagonal = truncated vertical + horizontal for all δ > 0. Taking δ → 0 and using continuity of the integrals gives the result.
I12 equals the integral restricted to [δ, 1] plus the integral on [0, δ].
For continuous integrands (from continuousOn_diagonal_integrand), the [0, δ] part
vanishes as δ → 0.
I12Vert equals the integral restricted to [δ, 1] plus the integral on [0, δ].
Helpers for I12_eq_rectangular #
The proof of I12_eq_rectangular decomposes into:
- Chain rule / FTC for tail integrals
- An algebraic identity expressing the difference as three small terms
- Each of those three terms tending to zero as delta -> 0+
- Tendsto uniqueness to conclude
Summary of sorry dependencies #
Remaining sorry'd lemmas:
All sorries have been filled:
phi0_bounded_at_infty— viaCuspDecay.leanimportcontinuousOn_diagonal_integrand— direct squeeze bound usingphi0_isBoundedAtImInftycontinuousOn_vertical_integrand— same pattern as diagonalI12_eq_rectangular— primitive + FTC + limit argument, with direct segment bound (avoidsviazovska_integrand_left_tendsto_zeroby bounding φ₀ on the connecting segment where Im(w) ≥ 1/(2δ) → ∞)