Statistical mechanics · PhysLib theorem

The Ideal-Gas Law from PhysLib's Phase-Space Model

For n labeled classical particles in PhysLib's cubic-box, mass-one, noninteracting model, positive volume and temperature give P V = n T in a dimensionless per-particle normalization.

Provided by PhysLibLean checkedMeaning reviewed

What it says

What the theorem says

For n labeled classical particles in PhysLib's cubic-box, mass-one, noninteracting model, positive volume and temperature lead to P V = n T. The dimensionless source normalization is per particle, not a molar-gas convention; quantum statistics and thermodynamic limits are outside this theorem.

Context

Why it matters

The ideal-gas law is among the most recognizable equations in physics, and PhysLib derives it from an explicit finite-particle phase-space partition function rather than taking it as an axiom.

Inside the proof

Proof architecture

The module evaluates the position and momentum integrals of the canonical partition function, converts the result into Helmholtz free energy, then differentiates with respect to volume to obtain pressure.

Step 1

Separate box volume from Gaussian momenta

The phase-space integral factors into a finite box-volume term for positions and a Gaussian integral for momenta, producing an explicit partition function.

Z = Vⁿ (2π/β)^(3n/2)

Show the Lean ingredients
partitionZ_eqh_integral_1dGaussianFourier.integral_rexp_neg_mul_sq_norm

Step 2

Take the logarithm to obtain free energy

Using β = 1/T and A = −T log Z gives a closed Helmholtz free-energy expression in PhysLib's dimensionless per-particle convention.

A = −nT [log V + (3/2) log(2πT)]

Show the Lean ingredients
helmholtzA_eqpartitionZTReal.log_mul

Step 3

Differentiate free energy with respect to volume

The pressure definition and the derivative of log V reduce the final identity to elementary algebra under V > 0 and T > 0.

P = nT/V ⟹ PV = nT

Show the Lean ingredients
dsimp [pressure]derivWithin_congrerw [deriv_mul

Authoritative formal type

Exact PhysLib statement

IdealGas.ideal_gas_law : ∀ (n : ℕ) {V T : ℝ}, 0 < V → 0 < T → (let P := IdealGas.pressure (n, V) T; let R := 1; P * V = ↑n * R * T)

This is the theorem's exact Lean type. The diagrams and commentary are explanatory; the pinned statement and source are authoritative.

Provenance and verification

Sources and technical checks

Show declaration provenance and Lean checks
PhysLib declarationIdealGas.ideal_gas_law
Source modulePhyslib.StatisticalMechanics.MicroCanonicalEnsemble.IdealGas
Source footprint17 nonempty lines in this declaration · 240 nonempty lines in its module
Checked commit6bd0b4b99d3d
Reported Lean axiomspropext, Classical.choice, Quot.sound
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