Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Zero-temperature entropy equals kBln⁡(#ground states)k_B\ln(\#\text{ground states})kB​ln(#ground states)

Proved
ThirdLawThermo.gibbsEntropy_tendsto_kB_log_card_groundStates

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

mathematical-physicsstatistical-mechanicsthermodynamicsthird-law

Let ι\iotaι be a finite nonempty set of microstates with energies EiE_iEi​, let kB>0k_B>0kB​>0 be the Boltzmann constant, and write G={i:Ei=min⁡jEj}G=\{i:E_i=\min_jE_j\}G={i:Ei​=minj​Ej​} for the set of ground states. At temperature T>0T>0T>0 the system is in canonical equilibrium with probabilities pi(T)=e−Ei/(kBT)/Z(T)p_i(T)=e^{-E_i/(k_BT)}/Z(T)pi​(T)=e−Ei​/(kB​T)/Z(T), Z(T)=∑je−Ej/(kBT)Z(T)=\sum_je^{-E_j/(k_BT)}Z(T)=∑j​e−Ej​/(kB​T), and has Gibbs entropy S(T)=−kB∑ipi(T)ln⁡pi(T)S(T)=-k_B\sum_ip_i(T)\ln p_i(T)S(T)=−kB​∑i​pi​(T)lnpi​(T) (see the definition file ThirdLawThermo_Defs).

Theorem (statistical form of the third law). As the temperature decreases to absolute zero, the entropy approaches a constant, namely the Boltzmann constant times the natural logarithm of the number of ground states:

lim⁡T→0+S(T)=kBln⁡∣G∣.\lim_{T\to0^+}S(T)=k_B\ln|G| .T→0+lim​S(T)=kB​ln∣G∣.

The limit depends on the system only through the degeneracy ∣G∣|G|∣G∣ of its ground state, and not on the excited energy levels; this is the precise sense in which the zero-temperature entropy is "a constant value" fixed by the ground state. When the ground state is unique the limit is 000, and when it is degenerate the limit is the residual entropy kBln⁡∣G∣>0k_B\ln|G|>0kB​ln∣G∣>0.

Formalization Note The limit is one-sided (T→0+T\to0^+T→0+ through T>0T>0T>0), so the junk value of the Lean definition at T=0T=0T=0 plays no role.

Preamble
import Definitions.Def_ThirdLawThermo_Defs
import Mathlib

open Filter Topology
Formal statement
namespace ThirdLawThermo

theorem gibbsEntropy_tendsto_kB_log_card_groundStates {ι : Type*} [Fintype ι] [Nonempty ι]
    (kB : ℝ) (hkB : 0 < kB) (E : ι → ℝ) :
    Tendsto (fun T => gibbsEntropy kB E T) (𝓝[>] 0)
      (𝓝 (kB * Real.log (groundStates E).card)) := by sorry

end ThirdLawThermo
Source
Wikipedia, "Third law of thermodynamics", revision oldid=1369622029, https://en.wikipedia.org/w/index.php?title=Third_law_of_thermodynamics&oldid=1369622029; lead section ("the entropy of a closed system at thermodynamic equilibrium approaches a constant value when its temperature approaches absolute zero"; "there is typically one unique state (called the ground state) with minimum energy"), section "History" ("its entropy is determined only by the degeneracy of the ground state"), section "Explanation" ("the absolute entropy of any system at zero temperature is the natural log of the number of ground states times the Boltzmann constant kB").
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic), the drafting agent itself; non-blind read-back

Disclosure: this read-back is NOT blind. It was written by the same agent (Aristotle, by Harmonic) that drafted these Lean statements, with full knowledge of the source text and of the intended meaning. It is therefore not independent testimony and must not be mistaken for an independent audit. Reviewers should check the Lean code against the source themselves.

Let ι\iotaι be any finite, nonempty type, let kBk_BkB​ be a real number with kB>0k_B>0kB​>0, and let E:ι→RE:\iota\to\mathbb RE:ι→R be an arbitrary function (no further conditions; energies may be negative or repeated).

For T∈RT\in\mathbb RT∈R put Z(T)=∑i∈ιexp⁡(−Ei/(kBT))Z(T)=\sum_{i\in\iota}\exp(-E_i/(k_BT))Z(T)=∑i∈ι​exp(−Ei​/(kB​T)), pi(T)=exp⁡(−Ei/(kBT))/Z(T)p_i(T)=\exp(-E_i/(k_BT))/Z(T)pi​(T)=exp(−Ei​/(kB​T))/Z(T) and S(T)=−kB∑i∈ιpi(T)ln⁡pi(T)S(T)=-k_B\sum_{i\in\iota}p_i(T)\ln p_i(T)S(T)=−kB​∑i∈ι​pi​(T)lnpi​(T). Let G={i∈ι:Ei=min⁡j∈ιEj}G=\{i\in\iota: E_i=\min_{j\in\iota}E_j\}G={i∈ι:Ei​=minj∈ι​Ej​} (a nonempty finite set) and ∣G∣|G|∣G∣ its number of elements. The statement is that

S(T)⟶kBln⁡∣G∣as T→0 with T>0,S(T)\longrightarrow k_B\ln|G|\qquad\text{as }T\to0\text{ with }T>0,S(T)⟶kB​ln∣G∣as T→0 with T>0,

i.e. for every ε>0\varepsilon>0ε>0 there is δ>0\delta>0δ>0 such that ∣S(T)−kBln⁡∣G∣∣<ε|S(T)-k_B\ln|G||<\varepsilon∣S(T)−kB​ln∣G∣∣<ε whenever 0<T<δ0<T<\delta0<T<δ. Values of SSS at T≤0T\le 0T≤0 are not constrained. If ∣ι∣=1|\iota|=1∣ι∣=1 then ∣G∣=1|G|=1∣G∣=1 and the asserted limit is 000.

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