Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Kohn-Sham density integrates to the electron number

Proved
DFT.ks_density_normalization

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

functional-analysismathematical-physicsquantum-mechanics

In the Kohn-Sham scheme the density of the auxiliary non-interacting system is built from orbitals,

n(r)  =  ∑i=1N∣φi(r)∣2.n(r) \;=\; \sum_{i=1}^{N} |\varphi_i(r)|^2 .n(r)=i=1∑N​∣φi​(r)∣2.

This statement records that such a density carries the right electron number: if the orbitals φ1,…,φN\varphi_1,\dots,\varphi_Nφ1​,…,φN​ are orthonormal in L2(R3)L^2(\mathbb R^3)L2(R3), that is

∫R3φi(r)‾ φj(r) dr  =  δij,\int_{\mathbb R^3} \overline{\varphi_i(r)}\,\varphi_j(r)\,dr \;=\; \delta_{ij},∫R3​φi​(r)​φj​(r)dr=δij​,

then

∫R3∑i=1N∣φi(r)∣2 dr  =  N.\int_{\mathbb R^3} \sum_{i=1}^{N} |\varphi_i(r)|^2 \, dr \;=\; N .∫R3​i=1∑N​∣φi​(r)∣2dr=N.

The normalization is the consistency condition every self-consistent Kohn-Sham iteration relies on: the density produced from the occupied orbitals describes exactly NNN electrons.

Preamble
import Definitions.Def_DFT_HohenbergKohn

open MeasureTheory
Formal statement
namespace DFT

theorem ks_density_normalization {N : ℕ} (φ : Fin N → Pos → ℂ)
    (hmem : ∀ i, MemLp (φ i) 2 volume)
    (horth : ∀ i j, ∫ r : Pos, (starRingEnd ℂ) (φ i r) * φ j r = if i = j then 1 else 0) :
    ∫ r : Pos, ∑ i, ‖φ i r‖ ^ 2 = (N : ℝ) := by sorry

end DFT
Source
Wikipedia, 'Density functional theory' (uploaded PDF), sections 'Derivation and formalism', 'Hohenberg-Kohn theorems' (Theorem 1, Corollary 1, Theorem 2) and 'Kohn-Sham equations'; https://en.wikipedia.org/wiki/Density_functional_theory . Primary sources cited there: P. Hohenberg and W. Kohn, 'Inhomogeneous electron gas', Phys. Rev. 136 (1964) B864, https://doi.org/10.1103/PhysRev.136.B864 ; W. Kohn and L. J. Sham, Phys. Rev. 140 (1965) A1133, https://doi.org/10.1103/PhysRev.140.A1133 ; M. Levy, Proc. Natl. Acad. Sci. USA 76 (1979) 6062, https://doi.org/10.1073/pnas.76.12.6062 .
Read-back

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

Read-back provenance note (non-blind). This read-back was written by the same agent that drafted the Lean statement it describes; it is not independent, blind auditor testimony, and no reviewer should treat it as such. It was produced with full knowledge of the intended statement and the source material, so it cannot be relied on to expose a mismatch between intent and code. Please audit the Lean code directly against the source.

Fix a natural number NNN (possibly 000) and a family of NNN complex-valued functions φ0,…,φN−1\varphi_0,\dots,\varphi_{N-1}φ0​,…,φN−1​ on three-dimensional Euclidean space R3\mathbb R^3R3, which carries Lebesgue measure.

Hypotheses:

  1. each φi\varphi_iφi​ is square-integrable, i.e. belongs to L2(R3)L^2(\mathbb R^3)L2(R3) (in particular each is measurable);
  2. for every pair of indices i,ji,ji,j,
∫R3φi(r)‾ φj(r) dr  =  {1i=j0i≠j,\int_{\mathbb R^3} \overline{\varphi_i(r)}\,\varphi_j(r)\, dr \;=\; \begin{cases} 1 & i = j\\ 0 & i \ne j,\end{cases}∫R3​φi​(r)​φj​(r)dr={10​i=ji=j,​

an equality of complex numbers, the integral being the Bochner integral of a complex-valued function.

Conclusion:

∫R3∑i=0N−1∥φi(r)∥2 dr  =  N,\int_{\mathbb R^3} \sum_{i=0}^{N-1} \|\varphi_i(r)\|^2 \, dr \;=\; N,∫R3​i=0∑N−1​∥φi​(r)∥2dr=N,

an equality of real numbers, with NNN on the right meaning the natural number NNN cast to a real number, and ∥⋅∥\|\cdot\|∥⋅∥ the modulus of a complex number.

Notes. When N=0N = 0N=0 the family is empty, hypothesis 2 is vacuous, the integrand is the zero function and the claim reads 0=00 = 00=0. The orthogonality hypothesis is stated for all pairs (i,j)(i,j)(i,j) including i=ji = ji=j, so it contains the normalization ∥φi∥L2=1\|\varphi_i\|_{L^2} = 1∥φi​∥L2​=1. The statement asserts nothing about pointwise values of the sum, only about its integral, and no nonnegativity or decay assumption beyond square-integrability appears.

Human review
  • Endorsed by Shuze Chen · Oct 8, 2026

    Confirmed by the moderator at approval.

  • Endorsed by LG · Oct 8, 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