Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Energy of a Slater determinant (Hartree-Fock energy, Sec. 3.2)

Proved
KochHF.hartree_fock_energy

by Lucas · Oct 9, 2026 · Mathlib 0df444a (Lean v4.33.1)

hartree-fockmathematical-physicssecond-quantization

With H^\hat HH^, TTT, UUU as in the definition file and Unn′,mm′=Un′n,m′mU_{nn',mm'}=U_{n'n,m'm}Unn′,mm′​=Un′n,m′m​, the energy of the determinant ∣S⟩|S\rangle∣S⟩ of occupied reference orbitals SSS is

⟨S∣H^∣S⟩=∑m∈S(Tmm+∑m′∈S, m′<mΔmm′)=∑m∈S(Tmm+12∑m′∈SΔmm′),\langle S|\hat H|S\rangle=\sum_{m\in S}\Bigl(T_{mm}+\sum_{m'\in S,\,m'<m}\Delta_{mm'}\Bigr)=\sum_{m\in S}\Bigl(T_{mm}+\tfrac12\sum_{m'\in S}\Delta_{mm'}\Bigr),⟨S∣H^∣S⟩=m∈S∑​(Tmm​+m′∈S,m′<m∑​Δmm′​)=m∈S∑​(Tmm​+21​m′∈S∑​Δmm′​),

where Δmm′=Umm′,mm′−Umm′,m′m\Delta_{mm'}=U_{mm',mm'}-U_{mm',m'm}Δmm′​=Umm′,mm′​−Umm′,m′m​.

This is the Hartree-Fock total energy expressed through direct and exchange integrals of the occupied orbitals.

Preamble
import Mathlib
import Definitions.Def_KochHF_FockSpace
import Definitions.Def_KochHF_Hamiltonian

open Matrix
Formal statement
namespace KochHF

theorem hartree_fock_energy {K : ℕ} (T : Matrix (Fin K) (Fin K) ℂ)
    (U : Fin K → Fin K → Fin K → Fin K → ℂ) (hU : ∀ n n' m m', U n n' m m' = U n' n m' m)
    (S : Finset (Fin K)) :
    detEnergy T U S = ∑ m ∈ S, (T m m + ∑ m' ∈ S.filter (· < m), hfDelta U m m') ∧
    detEnergy T U S = ∑ m ∈ S, (T m m + (1 / 2 : ℂ) * ∑ m' ∈ S, hfDelta U m m') := by sorry

end KochHF
Source
E. Koch, *Mean-Field Theory: Hartree-Fock and BCS*, in E. Pavarini, E. Koch, J. van den Brink, G. Sawatzky (eds.), Quantum Materials: Experiments and Theory, Modeling and Simulation Vol. 6, Forschungszentrum Jülich, 2016, ISBN 978-3-95806-159-0, http://www.cond-mat.de/events/correl16, Sec. 3.2, p. 2.18, Eq. (65) and the displayed Hartree-Fock energy following it; symmetry from Sec. 2.3.2, p. 2.11.
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic) — NON-BLIND: same agent that drafted the statements

Non-blind read-back — not independent testimony. 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 a blind audit and must not be mistaken for independent testimony; reviewers should compare the Lean code against the source themselves.

Throughout, K∈NK\in\mathbb NK∈N is the number of orthonormal reference orbitals ϕ0,…,ϕK−1\phi_0,\dots,\phi_{K-1}ϕ0​,…,ϕK−1​; an orbital is a coefficient vector φ∈CK\varphi\in\mathbb C^Kφ∈CK and ⟨φ∣χ⟩=∑μφμ‾χμ\langle\varphi|\chi\rangle=\sum_\mu\overline{\varphi_\mu}\chi_\mu⟨φ∣χ⟩=∑μ​φμ​​χμ​. Fock space is C2K\mathbb C^{2^K}C2K with orthonormal basis ∣S⟩|S\rangle∣S⟩, S⊆{0,…,K−1}S\subseteq\{0,\dots,K-1\}S⊆{0,…,K−1}; ci†∣S⟩=(−1)#{j∈S: j>i}∣S∪{i}⟩c^\dagger_i|S\rangle=(-1)^{\#\{j\in S:\,j>i\}}|S\cup\{i\}\rangleci†​∣S⟩=(−1)#{j∈S:j>i}∣S∪{i}⟩ for i∉Si\notin Si∈/S and 000 for i∈Si\in Si∈S; ci=(ci†)†c_i=(c_i^\dagger)^\daggerci​=(ci†​)† (conjugate transpose); cφ†=∑μφμcμ†c^\dagger_\varphi=\sum_\mu\varphi_\mu c^\dagger_\mucφ†​=∑μ​φμ​cμ†​, cφ=∑μφμ‾cμc_\varphi=\sum_\mu\overline{\varphi_\mu}c_\mucφ​=∑μ​φμ​​cμ​; ∣0⟩=∣∅⟩|0\rangle=|\emptyset\rangle∣0⟩=∣∅⟩; for orbitals α0,…,αN−1\alpha_0,\dots,\alpha_{N-1}α0​,…,αN−1​ the vector ∣Φα⟩=cαN−1†⋯cα0†∣0⟩|\Phi_\alpha\rangle=c^\dagger_{\alpha_{N-1}}\cdots c^\dagger_{\alpha_0}|0\rangle∣Φα​⟩=cαN−1​†​⋯cα0​†​∣0⟩ (for N=0N=0N=0 this is ∣0⟩|0\rangle∣0⟩). For all KKK, every complex K×KK\times KK×K matrix TTT, every complex 4-index array UUU with Unn′mm′=Un′nm′mU_{nn'mm'}=U_{n'nm'm}Unn′mm′​=Un′nm′m​ for all indices, and every S⊆{0,…,K−1}S\subseteq\{0,\dots,K-1\}S⊆{0,…,K−1}, writing E(S)=⟨S∣H^(T,U)∣S⟩E(S)=\langle S|\hat H(T,U)|S\rangleE(S)=⟨S∣H^(T,U)∣S⟩ and Δmm′=Umm′mm′−Umm′m′m\Delta_{mm'}=U_{mm'mm'}-U_{mm'm'm}Δmm′​=Umm′mm′​−Umm′m′m​, both of the following hold:

  1. E(S)=∑m∈S(Tmm+∑m′∈S, m′<mΔmm′)E(S)=\sum_{m\in S}\bigl(T_{mm}+\sum_{m'\in S,\ m'<m}\Delta_{mm'}\bigr)E(S)=∑m∈S​(Tmm​+∑m′∈S, m′<m​Δmm′​);
  2. E(S)=∑m∈S(Tmm+12∑m′∈SΔmm′)E(S)=\sum_{m\in S}\bigl(T_{mm}+\tfrac12\sum_{m'\in S}\Delta_{mm'}\bigr)E(S)=∑m∈S​(Tmm​+21​∑m′∈S​Δmm′​).

For S=∅S=\emptysetS=∅ both sides are 000.

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

    Confirmed by the moderator at approval.

  • Endorsed by Lucas · Oct 10, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me