Encyclopedia Cosmology Cosmology Statistics Kernels

ARTICLE 6 claims 5 theorems 1 model

Cosmology Statistics Kernels

The familiar formulas for how many particles fill a quantum state emerge from one sum, the partition function, in a machine-checked proof.

The kernels' derivation

In statistical mechanics, the Bose-Einstein distribution 1/(et−1) and the Fermi-Dirac distribution 1/(et+1) give the average number of particles in a single energy state at temperature T, where t = E/T is the energy measured in units of temperature. These two formulas, along with the related pressure and energy kernels, are standard. The cosmology statistics kernels module in Recognition Science starts from the grand partition function of a single mode, Z = Σn e−n·E/T, and derives all four kernel forms from it. The inputs are the Gibbs weight e−n·t, meaning the probability weight of a state with n quanta of energy, and the allowed occupancy sets: n = 0, 1, 2, ... for bosons, and n = 0 or 1 for fermions.

The derivation is short. For bosons, the partition function is the geometric series ZB = (1 − e−t)−1. For fermions, the two-state sum gives ZF = 1 + e−t. The pressure kernels, previously taken as definitions, are literally the log of the partition function: −ln(1 − e−t) = ln ZB and ln(1 + e−t) = ln ZF. The occupation numbers, the ensemble mean ⟨n⟩ = (Σ n·wn)/Z, evaluate to the Bose-Einstein and Fermi-Dirac distributions. The energy kernels are then t·⟨n⟩. The module proves the thermodynamic relation ⟨n⟩ = −d(ln Z)/dt, and in physical variables ⟨E⟩ = −∂β ln Z per mode, so pressure and energy kernels are not independent inputs but derivative-related, exactly as the grand-canonical formalism demands.

The module also proves the Pauli bound ⟨n⟩F < 1, meaning a fermion mode never holds more than one particle on average, and derives the plasma pressure and energy of the η_B chain from the partition function in momentum space. These are theorems in the machine-checked library of formal theorems, not assumptions. What remains a model is the Gibbs weight itself, the canonical-ensemble measure, and the occupancy sets. The framework's exclusion principle is formalized as a J-cost statement elsewhere, but the bridge from that certificate to the occupancy set {0,1} used here remains open.

THEOREM boseOccupation_eq · fermiOccupation_eq · IndisputableMonolith/Cosmology/StatisticsKernels.lean
/-- **THEOREM (Bose–Einstein distribution).**  The ensemble-mean
occupation of a bosonic mode is `⟨n⟩_B = 1/(eᵗ−1)`: the weighted
geometric series `Σ n·xⁿ = x/(1−x)²` divided by `Z_B = (1−x)⁻¹`. -/
theorem boseOccupation_eq {t : ℝ} (ht : 0 < t) :
    boseOccupation t = 1 / (Real.exp t - 1) := by
  unfold boseOccupation
  rw [bosePartition_eq ht]
  simp only [boltzmannWeight_pow]
  have hx0 : (0 : ℝ) ≤ Real.exp (-t) := le_of_lt (Real.exp_pos _)
  have hx1 : Real.exp (-t) < 1 := exp_neg_lt_one ht
  rw [tsum_coe_mul_geometric_of_norm_lt_one
    (by rw [Real.norm_of_nonneg hx0]; exact hx1)]
  have hy : 1 < Real.exp t := one_lt_exp ht
  have hy0 : Real.exp t ≠ 0 := ne_of_gt (Real.exp_pos t)
  have hy1 : Real.exp t - 1 ≠ 0 := by linarith
  have h1x : 1 - Real.exp (-t) ≠ 0 := by linarith
  rw [Real.exp_neg]
  rw [Real.exp_neg] at h1x
  field_simp
/-- **THEOREM (Fermi–Dirac distribution).**  The ensemble-mean occupation
of a fermionic mode is `⟨n⟩_F = 1/(eᵗ+1)`, for every `t` (the two-state
sum needs no convergence condition). -/
theorem fermiOccupation_eq (t : ℝ) :
    fermiOccupation t = 1 / (Real.exp t + 1) := by
  unfold fermiOccupation boltzmannWeight
  rw [fermiPartition_eq]
  simp only [Finset.sum_range_succ, Finset.sum_range_zero,
    Nat.cast_zero, Nat.cast_one, zero_mul, one_mul, neg_zero,
    Real.exp_zero, zero_add, add_zero]
  have hy0 : Real.exp t ≠ 0 := ne_of_gt (Real.exp_pos t)
  have hpos : (0 : ℝ) < 1 + Real.exp (-t) := by positivity
  rw [Real.exp_neg]
  rw [Real.exp_neg] at hpos
  field_simp
THEOREM boseLogKernel_eq_log_partition · fermiLogKernel_eq_log_partition · IndisputableMonolith/Cosmology/StatisticsKernels.lean
boseLogKernel_eq_log_partition · IndisputableMonolith/Cosmology/StatisticsKernels.lean:133
/-- **THEOREM: the Bose pressure kernel is the log partition function.**
`−ln(1−e^{−t}) = ln Z_B(t)`.  The kernel that was a definition in
`PhaseSpaceReduction` is the grand-canonical `ln Z` of one mode. -/
theorem boseLogKernel_eq_log_partition {t : ℝ} (ht : 0 < t) :
    boseLogKernel t = Real.log (bosePartition t) := by
  rw [bosePartition_eq ht, Real.log_inv]
  rfl
fermiLogKernel_eq_log_partition · IndisputableMonolith/Cosmology/StatisticsKernels.lean:141
/-- **THEOREM: the Fermi pressure kernel is the log partition function.**
`ln(1+e^{−t}) = ln Z_F(t)`. -/
theorem fermiLogKernel_eq_log_partition (t : ℝ) :
    fermiLogKernel t = Real.log (fermiPartition t) := by
  rw [fermiPartition_eq]
  rfl
THEOREM boseLogKernel_hasDerivAt · fermiLogKernel_hasDerivAt · IndisputableMonolith/Cosmology/StatisticsKernels.lean
/-- **THEOREM (grand-canonical consistency, Bose).**  The mean occupation
is minus the derivative of the log partition function with respect to the
dimensionless energy: `d/dt[−ln(1−e^{−t})] = −⟨n⟩_B(t)`.  The pressure
and energy kernels are therefore *one* input, not two. -/
theorem boseLogKernel_hasDerivAt {t : ℝ} (ht : 0 < t) :
    HasDerivAt boseLogKernel (-(boseOccupation t)) t := by
  have h1 : HasDerivAt (fun s : ℝ => -s) (-1) t := (hasDerivAt_id t).neg
  have h2 : HasDerivAt (fun s : ℝ => Real.exp (-s))
      (Real.exp (-t) * (-1)) t := (Real.hasDerivAt_exp (-t)).comp t h1
  have h3 : HasDerivAt (fun s : ℝ => 1 - Real.exp (-s))
      (0 - Real.exp (-t) * (-1)) t := (hasDerivAt_const t 1).sub h2
  have hlt : Real.exp (-t) < 1 := exp_neg_lt_one ht
  have hne : 1 - Real.exp (-t) ≠ 0 := by linarith
  have h4 := (h3.log hne).neg
  have heq : -((0 - Real.exp (-t) * (-1)) / (1 - Real.exp (-t)))
      = -(boseOccupation t) := by
    rw [boseOccupation_eq ht]
    have hy0 : Real.exp t ≠ 0 := ne_of_gt (Real.exp_pos t)
    have hy1 : Real.exp t - 1 ≠ 0 := by
      have := one_lt_exp ht; linarith
    rw [Real.exp_neg]
    rw [Real.exp_neg] at hne
    field_simp
    ring
  rw [← heq]
  exact h4
/-- **THEOREM (grand-canonical consistency, Fermi).**
`d/dt[ln(1+e^{−t})] = −⟨n⟩_F(t)`, for every `t`. -/
theorem fermiLogKernel_hasDerivAt (t : ℝ) :
    HasDerivAt fermiLogKernel (-(fermiOccupation t)) t := by
  have h1 : HasDerivAt (fun s : ℝ => -s) (-1) t := (hasDerivAt_id t).neg
  have h2 : HasDerivAt (fun s : ℝ => Real.exp (-s))
      (Real.exp (-t) * (-1)) t := (Real.hasDerivAt_exp (-t)).comp t h1
  have h3 : HasDerivAt (fun s : ℝ => 1 + Real.exp (-s))
      (0 + Real.exp (-t) * (-1)) t := (hasDerivAt_const t 1).add h2
  have hpos : (0 : ℝ) < 1 + Real.exp (-t) := by positivity
  have h4 := h3.log (ne_of_gt hpos)
  have heq : (0 + Real.exp (-t) * (-1)) / (1 + Real.exp (-t))
      = -(fermiOccupation t) := by
    rw [fermiOccupation_eq]
    have hy0 : Real.exp t ≠ 0 := ne_of_gt (Real.exp_pos t)
    rw [Real.exp_neg]
    rw [Real.exp_neg] at hpos
    field_simp
    ring
  rw [← heq]
  exact h4
THEOREM fermiOccupation_lt_one · IndisputableMonolith/Cosmology/StatisticsKernels.lean
/-- **Pauli bound.**  A fermionic mode is never more than singly
occupied on average: `⟨n⟩_F < 1`.  This is the statistical shadow of the
occupancy restriction `n ∈ {0,1}`. -/
theorem fermiOccupation_lt_one (t : ℝ) : fermiOccupation t < 1 := by
  rw [fermiOccupation_eq]
  have h := Real.exp_pos t
  rw [div_lt_one (by linarith)]
  linarith
THEOREM plasmaPressure_from_partitionFunction · plasmaEnergy_from_occupation · IndisputableMonolith/Cosmology/StatisticsKernels.lean
plasmaPressure_from_partitionFunction · IndisputableMonolith/Cosmology/StatisticsKernels.lean:334
/-- **CAPSTONE (pressure).**  The plasma pressure of the η_B chain equals
the phase-space integral of `T·ln Z_mode(E/T)` — the grand-canonical
pressure `P = (T/V)·ln Z` — with `Z_B = Σ_{n∈ℕ} e^{−nE/T}` and
`Z_F = Σ_{n∈{0,1}} e^{−nE/T}`.  The log kernels are gone as inputs; only
the Gibbs weight and the occupancy sets remain. -/
theorem plasmaPressure_from_partitionFunction (gB gF : ℝ) {T : ℝ}
    (hT : 0 < T) :
    phaseSpaceDensity 3 gB T (fun t => Real.log (bosePartition t))
      + phaseSpaceDensity 3 gF T (fun t => Real.log (fermiPartition t))
      = GrandPotential.plasmaPressure gB gF T := by
  have hB := phaseSpaceDensity_congr_pos gB T hT
    (fun t => Real.log (bosePartition t)) boseLogKernel
    (fun t ht => (boseLogKernel_eq_log_partition ht).symm)
  have hF := phaseSpaceDensity_congr_pos gF T hT
    (fun t => Real.log (fermiPartition t)) fermiLogKernel
    (fun t _ => (fermiLogKernel_eq_log_partition t).symm)
  rw [hB, hF]
  exact PhaseSpaceReduction.plasmaPressure_from_phaseSpace gB gF hT
plasmaEnergy_from_occupation · IndisputableMonolith/Cosmology/StatisticsKernels.lean:353
/-- **CAPSTONE (energy).**  The plasma energy equals the phase-space
integral of `E·⟨n⟩(E/T)`: mean occupation times mode energy, with `⟨n⟩`
derived from the same partition functions. -/
theorem plasmaEnergy_from_occupation (gB gF : ℝ) {T : ℝ} (hT : 0 < T) :
    phaseSpaceDensity 3 gB T (fun t => t * boseOccupation t)
      + phaseSpaceDensity 3 gF T (fun t => t * fermiOccupation t)
      = GrandPotential.plasmaEnergy gB gF T := by
  have hB := phaseSpaceDensity_congr_pos gB T hT
    (fun t => t * boseOccupation t) boseEnergyKernel
    (fun t ht => (boseEnergyKernel_eq_occupation ht).symm)
  have hF := phaseSpaceDensity_congr_pos gF T hT
    (fun t => t * fermiOccupation t) fermiEnergyKernel
    (fun t _ => (fermiEnergyKernel_eq_occupation t).symm)
  rw [hB, hF]
  exact PhaseSpaceReduction.plasmaEnergy_from_phaseSpace gB gF hT
MODEL boltzmannWeight · IndisputableMonolith/Cosmology/StatisticsKernels.lean
/-- Gibbs weight of the `n`-quanta microstate of a mode at dimensionless
energy `t = E/T` (equivalently `β·E`), chemical potential zero:
`w_n = e^{−n·t}`. -/
noncomputable def boltzmannWeight (t : ℝ) (n : ℕ) : ℝ := Real.exp (-(n * t))

What this page does not claim

The Gibbs weight itself is not derived in this module; it is a model input. The bridge from the J-cost exclusion principle to the fermion occupancy set is not proved here. The module does not derive the grand-canonical ensemble from recognition costs.

Verify this page

Every tagged claim above names its theorem. To check one yourself rather than trust this page, elaborate the source module with Lean 4 and audit its axiom basis:

$ lake env lean IndisputableMonolith/Cosmology/StatisticsKernels.lean
expected axiom basis: [propext, Classical.choice, Quot.sound] (the Lean kernel's standard three; no RS-specific axioms)

A page whose claims cannot be reproduced this way does not ship. In production, every anchor links to the exact declaration in the public source release, and this block carries the build receipt for the page itself.

Derived articles

This page is generated by a question-recursion engine: the questions its answers raise become the next pages. The current agenda, with open targets marked red:

MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND