Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

S=kBlog⁡WS = k_B \log WS=kB​logW for WWW equiprobable microstates

Proved
BoltzmannConstant.gibbs_entropy_uniform_eq_boltzmann_entropy

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

information-theorymathematical-physicsstatistical-mechanics

In statistical mechanics the entropy of a system with distribution ppp over its microstates is S=−kB∑ipilog⁡piS = -k_B\sum_i p_i \log p_iS=−kB​∑i​pi​logpi​. If each of the W≥1W \ge 1W≥1 accessible microstates is equally likely, pi=1/Wp_i = 1/Wpi​=1/W, this collapses to Boltzmann's entropy formula

S=kBlog⁡W,S = k_B \log W,S=kB​logW,

the equation inscribed on Boltzmann's tombstone. The constant kBk_BkB​ is exactly what makes the statistical-mechanical entropy agree with the classical thermodynamic entropy of Clausius.

Preamble
import Mathlib
import Definitions.Def_boltzmann_si_basics
Formal statement
namespace BoltzmannConstant

theorem gibbs_entropy_uniform_eq_boltzmann_entropy {ι : Type*} (s : Finset ι) (W : ℕ)
    (hW : s.card = W) (hW0 : 0 < W) :
    gibbsEntropy s (fun _ => 1 / (W : ℝ)) = boltzmannEntropy W := by sorry

end BoltzmannConstant
Source
Wikipedia, "Boltzmann constant" (uploaded PDF), https://en.wikipedia.org/wiki/Boltzmann_constant, section "Role in the statistical definition of entropy" (S=klog⁡WS = k \log WS=klogW) and section "Natural units" (equiprobable microstates)
Read-back

What the Lean code literally says, in plain math · non-independent self-read-back by the drafting agent (no independent auditor)

Disclosure — this read-back is NOT blind and NOT independent. It was written by the same agent that drafted the Lean statement it describes, at the explicit instruction of the proposal owner. It is therefore self-testimony, not independent auditor testimony: the author knew what the statement was intended to say, so it cannot detect the class of error a blind read-back exists to catch. No reviewer should count it as independent verification; it should be replaced by, or checked against, a genuinely blind read-back before this proposal is submitted.

For an arbitrary type ι, a Finset ι called s, and a natural number W with s.card = W and 0 < W, the claim is that gibbsEntropy s (fun _ => 1 / (W : ℝ)) equals boltzmannEntropy W. Unfolding the definitions, the left side is -kB * ∑ i ∈ s, (1/W) * Real.log (1/W) and the right side is kB * Real.log W, with W cast to ℝ. The hypothesis 0 < W excludes the degenerate empty case where both sides would be 0 anyway; s.card = W is what ties the number of summands to the weight 1/W. The constant function fun _ => 1 / (W : ℝ) is the uniform distribution.

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