Statistical mechanics · PhysLib theorem
Mean Energy of a Canonical Two-State System
For energy levels E₀ and E₁ at positive temperature, PhysLib rewrites the canonical mean energy as the midpoint minus a hyperbolic-tangent thermal correction.
What it says
What the theorem says
Boltzmann weighting shifts the mean away from the midpoint of two energy levels; collecting the exponentials turns that shift into a compact hyperbolic tangent.
Context
Why it matters
The two-level system is a central exactly solvable statistical-mechanics model, and the tanh form exposes both the energy midpoint and temperature-dependent bias.
Inside the proof
Proof architecture
The proof starts from the finite canonical mean, substitutes the two Boltzmann probabilities, and algebraically recognizes the normalized exponential difference as a hyperbolic tangent.
Step 1
Reduce the finite ensemble
The finite-type mean-energy formula turns the expectation into exactly two weighted contributions, one from each indexed energy level.
U = E₀p₀ + E₁p₁
Show the Lean ingredients
meanEnergy_of_fintypetwoStateStep 2
Insert Boltzmann probabilities
PhysLib's explicit probability lemmas replace both weights by their common partition-normalized exponential expressions.
pᵢ = e^(−βEᵢ)/(e^(−βE₀)+e^(−βE₁))
Show the Lean ingredients
twoState_probability_fsttwoState_probability_sndStep 3
Recognize the tanh correction
After centering at the level midpoint, the normalized exponential imbalance simplifies to tanh of half the inverse-temperature energy gap.
U = (E₀+E₁)/2 − (E₁−E₀)tanh(β(E₁−E₀)/2)/2
Show the Lean ingredients
Real.tanh_eq_sinh_div_coshringAuthoritative formal type
Exact PhysLib statement
CanonicalEnsemble.twoState_meanEnergy_eq (E₀ E₁ : ℝ) (T : Temperature) : (CanonicalEnsemble.twoState E₀ E₁).meanEnergy T = (E₀ + E₁) / 2 - (E₁ - E₀) / 2 * Real.tanh (↑T.β * (E₁ - E₀) / 2)This is the theorem's exact Lean type. The diagrams and commentary are explanatory; the pinned statement and source are authoritative.
Recorded connections
How this result fits
A one-step view of the published results directly connected to this page.
1 direct connection
- Related resultFinite Boltzmann Probabilities Sum to Oneis related toMean Energy of a Canonical Two-State System
Only recorded public relationships are shown. A shared topic does not imply a dependency, and this is not a complete Lean proof-term dependency graph.
Open this result in the full theorem map1 direct connectionProvenance and verification
Sources and technical checks
Show declaration provenance and Lean checks
CanonicalEnsemble.twoState_meanEnergy_eqPhyslib.StatisticalMechanics.CanonicalEnsemble.TwoState6bd0b4b99d3dsorryAx reportedThe declaration footprint describes source layout, not proof difficulty or the size of its dependencies. The pinned checks verify the cited Lean theorem; semantic review remains a separate PhysAtlas judgment.



