Pith. sign in

IndisputableMonolith.Information.Thermodynamics

IndisputableMonolith/Information/Thermodynamics.lean · 98 lines · 10 declarations

show as:
view math explainer →

open module explainer GitHub source

Explainer status: pending · generated 2026-07-09 19:20:04.093240+00:00

   1import Mathlib.Analysis.SpecialFunctions.Log.Basic
   2import Mathlib.Analysis.SpecialFunctions.Exp
   3import IndisputableMonolith.Constants
   4import IndisputableMonolith.Cost
   5
   6/-!
   7# Phase 7.5.2: Landauer Limit & 8-Tick Dissipation
   8
   9This module formalizes the relationship between Recognition Science cost
  10and thermodynamic entropy, anchoring the theory in the Landauer limit.
  11-/
  12
  13namespace IndisputableMonolith
  14namespace Information
  15namespace Thermodynamics
  16
  17open Constants
  18open Real
  19
  20/-- Minimal local ledger state for the information-theoretic Landauer bound. -/
  21structure LedgerState where
  22  active_bonds : Finset ℕ
  23  bond_multipliers : ℕ → ℝ
  24  bond_pos : ∀ b ∈ active_bonds, 0 < bond_multipliers b
  25
  26/-- Total recognition cost over active bonds. -/
  27noncomputable def RecognitionCost (s : LedgerState) : ℝ :=
  28  s.active_bonds.sum (fun b => Cost.Jcost (s.bond_multipliers b))
  29
  30/-- Entropy proxy: sum of absolute log-imbalances over active bonds. -/
  31noncomputable def reciprocity_skew (s : LedgerState) : ℝ :=
  32  s.active_bonds.sum (fun b => |Real.log (s.bond_multipliers b)|)
  33
  34/-- Admissibility predicate for the local information ledger. On this carrier it
  35is unconstrained: every state satisfies it. The name is a definitional choice,
  36not a claim; what it means is that a theorem taking `admissible s` as a
  37hypothesis gains nothing from it here. -/
  38def admissible (_s : LedgerState) : Prop := True
  39
  40/-- A local dissipative recognition operator for information thermodynamics. -/
  41structure RecognitionOperator where
  42  evolve : LedgerState → LedgerState
  43  minimizes_J : ∀ s, admissible s → RecognitionCost (evolve s) ≤ RecognitionCost s
  44
  45/-- **DEFINITION: Ledger Entropy**
  46    Entropy defined as the absolute log-imbalance of the ledger. -/
  47noncomputable def ledger_entropy (s : LedgerState) : ℝ :=
  48  reciprocity_skew s
  49
  50/-- **DEFINITION: Thermal Energy Scale**
  51    The base thermal cost per tick. -/
  52noncomputable def thermal_cost (T : ℝ) : ℝ :=
  53  T * Real.log 2
  54
  55/-- For every active bond with positive multiplier m, Jcost m is at least (log m)^2 / 2.
  56No temperature, bit, or erasure appears, so this is not the Landauer bound. -/
  57theorem active_bond_jcost_log_quadratic_lower_bound (s : LedgerState) :
  58    ∀ b ∈ s.active_bonds,
  59      let m := s.bond_multipliers b
  60      let u := Real.log m
  61      Cost.Jcost m ≥ u^2 / 2 := by
  62  intro b hb m u
  63  have hm : 0 < m := s.bond_pos b hb
  64  -- Jcost m = cosh (log m) - 1
  65  have h_m_exp : m = exp u := (exp_log hm).symm
  66  have h_jcost : Cost.Jcost m = cosh u - 1 := by
  67    rw [h_m_exp]
  68    exact Cost.Jcost_exp_cosh u
  69  rw [h_jcost]
  70  have h_lb := Cost.cosh_quadratic_lower_bound u
  71  linarith
  72
  73/-- **Entropy Dissipation Theorem**
  74    The total recognition cost of a state is bounded below by the quadratic
  75    sum of the information mismatches. -/
  76theorem total_dissipation_bound (s : LedgerState) :
  77    RecognitionCost s ≥ (1/2 : ℝ) * (s.active_bonds.sum (fun b => (Real.log (s.bond_multipliers b))^2)) := by
  78  unfold RecognitionCost
  79  rw [Finset.mul_sum]
  80  apply Finset.sum_le_sum
  81  intro b hb
  82  have h := active_bond_jcost_log_quadratic_lower_bound s b hb
  83  dsimp at h
  84  linarith
  85
  86/-- The local operator field gives evolved recognition cost no greater than initial
  87recognition cost from initial-state admissibility. No eight-tick cycle enters the
  88statement or the proof. -/
  89theorem recognition_cost_evolve_le_of_initial_admissibility (R : RecognitionOperator) (s : LedgerState) :
  90    let s_next := R.evolve s
  91    admissible s → admissible s_next → RecognitionCost s_next ≤ RecognitionCost s := by
  92  intro s_next hadm_s _
  93  exact R.minimizes_J s hadm_s
  94
  95end Thermodynamics
  96end Information
  97end IndisputableMonolith
  98

source mirrored from github.com/jonwashburn/shape-of-logic