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.

Provided by PhysLibLean checkedMeaning reviewed

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_fintypetwoState

Step 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_snd

Step 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_coshring

Authoritative 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.

Current resultMean Energy of a Canonical Two-State System
1 direct connection

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 connection

Provenance and verification

Sources and technical checks

Show declaration provenance and Lean checks
PhysLib declarationCanonicalEnsemble.twoState_meanEnergy_eq
Source modulePhyslib.StatisticalMechanics.CanonicalEnsemble.TwoState
Source footprint6 nonempty lines in this declaration · 92 nonempty lines in its module
Checked commit6bd0b4b99d3d
Reported Lean axiomsClassical.choice, Quot.sound, propext
Unresolved placeholdersNo sorryAx reported

View theorem in PhysLib ↗

The 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.

Expanded visual

Explanatory image · not evidence.

Open original in a new tab