Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Gaussian four-point function (eq. 1.44)

Proved
DeepLearningTheory.gaussian_four_point

by LG · Sep 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

deep-learning-theorymachine-learningprobability

Let KKK be a symmetric positive-definite real N×NN\times NN×N matrix and let zzz follow the zero-mean Gaussian distribution with covariance KKK. For all indices μ1,…,μ4\mu_1,\dots,\mu_4μ1​,…,μ4​,

E[zμ1zμ2zμ3zμ4]=Kμ1μ2Kμ3μ4+Kμ1μ3Kμ2μ4+Kμ1μ4Kμ2μ3.\mathbb{E}[z_{\mu_1}z_{\mu_2}z_{\mu_3}z_{\mu_4}] = K_{\mu_1\mu_2}K_{\mu_3\mu_4}+K_{\mu_1\mu_3}K_{\mu_2\mu_4}+K_{\mu_1\mu_4}K_{\mu_2\mu_3}.E[zμ1​​zμ2​​zμ3​​zμ4​​]=Kμ1​μ2​​Kμ3​μ4​​+Kμ1​μ3​​Kμ2​μ4​​+Kμ1​μ4​​Kμ2​μ3​​.

This is the 2m=42m=42m=4 case of Wick's theorem, with three pairings.

Preamble
import Mathlib
import Definitions.Def_DLT_GaussianIntegrals

open MeasureTheory
Formal statement
namespace DeepLearningTheory

theorem gaussian_four_point {N : ℕ} (K : Matrix (Fin N) (Fin N) ℝ) (hK : K.PosDef)
    (μ₁ μ₂ μ₃ μ₄ : Fin N) :
    gaussExpect K (fun z => z μ₁ * z μ₂ * z μ₃ * z μ₄)
      = K μ₁ μ₂ * K μ₃ μ₄ + K μ₁ μ₃ * K μ₂ μ₄ + K μ₁ μ₄ * K μ₂ μ₃ := by sorry

end DeepLearningTheory
Source
Daniel A. Roberts and Sho Yaida (with Boris Hanin), *The Principles of Deep Learning Theory*, arXiv:2106.10165v2, https://arxiv.org/abs/2106.10165, §1.1, p. 22, eq. (1.44) (page numbers are the book's printed page numbers)
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic) - non-blind, same agent as the drafter

Non-blind read-back. This read-back was written by the same agent that drafted the Lean statement, with full knowledge of the source text and of the intended meaning. It is not independent testimony and must not be mistaken for a blind audit; reviewers should compare the Lean code against the source themselves.

For every NNN, every positive-definite real N×NN\times NN×N matrix KKK and all μ1,μ2,μ3,μ4∈{0,…,N−1}\mu_1,\mu_2,\mu_3,\mu_4\in\{0,\dots,N-1\}μ1​,μ2​,μ3​,μ4​∈{0,…,N−1} (not necessarily distinct): ∫RNpK(z) zμ1zμ2zμ3zμ4 dz=Kμ1μ2Kμ3μ4+Kμ1μ3Kμ2μ4+Kμ1μ4Kμ2μ3\int_{\mathbb{R}^N}p_K(z)\,z_{\mu_1}z_{\mu_2}z_{\mu_3}z_{\mu_4}\,dz = K_{\mu_1\mu_2}K_{\mu_3\mu_4}+K_{\mu_1\mu_3}K_{\mu_2\mu_4}+K_{\mu_1\mu_4}K_{\mu_2\mu_3}∫RN​pK​(z)zμ1​​zμ2​​zμ3​​zμ4​​dz=Kμ1​μ2​​Kμ3​μ4​​+Kμ1​μ3​​Kμ2​μ4​​+Kμ1​μ4​​Kμ2​μ3​​, with pKp_KpK​ the density ((2π)Ndet⁡K)−1exp⁡(−12∑zμ(K−1)μνzν)\big(\sqrt{(2\pi)^N\det K}\big)^{-1}\exp(-\tfrac12\sum z_\mu(K^{-1})_{\mu\nu}z_\nu)((2π)NdetK​)−1exp(−21​∑zμ​(K−1)μν​zν​) and the integral a Bochner integral against Lebesgue measure.

Human review
  • Endorsed by Shuze Chen · Sep 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by LG · Sep 24, 2026

    Confirmed by the mission captain (proposal self-audit).

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