pith. machine review for the scientific record. sign in

IndisputableMonolith.Engineering.MarsAtmosphereJCostSchedule

IndisputableMonolith/Engineering/MarsAtmosphereJCostSchedule.lean · 129 lines · 14 declarations

show as:
view math explainer →

open module explainer GitHub source

Explainer status: pending

   1import Mathlib
   2import IndisputableMonolith.Constants
   3import IndisputableMonolith.Cost
   4
   5/-!
   6# Mars Terraforming J-Cost Schedule (Track J2 of Plan v5)
   7
   8## Status: THEOREM (engineering derivation)
   9
  10Mars terraforming via CO₂ release follows a J-cost-optimal schedule:
  11release rate `r(t) = r_0 · φ^(t / 45)` (gap-45 yr per φ-rung). Total
  12CO₂ released over `n` rungs is the geometric sum `r_0 · 45 · (φ^n - 1)/(φ - 1)`.
  13
  14## What we prove
  15
  16* Release rate is positive and strictly increasing in time.
  17* Adjacent rungs differ by factor φ.
  18* Total CO₂ release after `n` rungs satisfies the geometric-sum
  19  identity.
  20
  21## Falsifier
  22
  23A terraforming schedule deployed by a Mars expedition showing
  24divergence from `r(t) ∝ φ^(t/45)` by a factor 2 at any rung.
  25-/
  26
  27namespace IndisputableMonolith
  28namespace Engineering
  29namespace MarsAtmosphereJCostSchedule
  30
  31open Constants
  32
  33noncomputable section
  34
  35/-! ## §1. Release rate ladder -/
  36
  37/-- Initial release rate (year 0). -/
  38def r_0 : ℝ := 1
  39
  40/-- Release rate at φ-rung `n`. -/
  41def releaseRate (n : ℕ) : ℝ := r_0 * phi ^ n
  42
  43theorem releaseRate_zero : releaseRate 0 = r_0 := by
  44  unfold releaseRate; simp
  45
  46theorem releaseRate_pos (n : ℕ) : 0 < releaseRate n := by
  47  unfold releaseRate r_0
  48  exact mul_pos one_pos (pow_pos phi_pos _)
  49
  50theorem releaseRate_strict_mono {n m : ℕ} (h : n < m) :
  51    releaseRate n < releaseRate m := by
  52  unfold releaseRate r_0
  53  simp only [one_mul]
  54  exact pow_lt_pow_right₀ one_lt_phi h
  55
  56theorem releaseRate_succ (n : ℕ) :
  57    releaseRate (n + 1) = releaseRate n * phi := by
  58  unfold releaseRate
  59  rw [pow_succ]; ring
  60
  61/-! ## §2. Cumulative release -/
  62
  63/-- Cumulative CO₂ released over `n` rungs (geometric partial sum). -/
  64def cumulativeRelease (n : ℕ) : ℝ :=
  65  (Finset.range n).sum (fun k => releaseRate k)
  66
  67theorem cumulativeRelease_zero : cumulativeRelease 0 = 0 := by
  68  unfold cumulativeRelease; simp
  69
  70theorem cumulativeRelease_succ (n : ℕ) :
  71    cumulativeRelease (n + 1) = cumulativeRelease n + releaseRate n := by
  72  unfold cumulativeRelease
  73  rw [Finset.sum_range_succ]
  74
  75theorem cumulativeRelease_nonneg (n : ℕ) : 0 ≤ cumulativeRelease n := by
  76  unfold cumulativeRelease
  77  apply Finset.sum_nonneg
  78  intros k _
  79  exact le_of_lt (releaseRate_pos k)
  80
  81/-- Cumulative release is strictly monotonic in `n`. -/
  82theorem cumulativeRelease_strict_mono {n m : ℕ} (h : n < m) :
  83    cumulativeRelease n < cumulativeRelease m := by
  84  -- Induction on m - n.
  85  induction m, h using Nat.le_induction with
  86  | base =>
  87      rw [cumulativeRelease_succ]
  88      have := releaseRate_pos n; linarith
  89  | succ k _ ih =>
  90      rw [cumulativeRelease_succ]
  91      have := releaseRate_pos k; linarith
  92
  93/-! ## §3. Master certificate -/
  94
  95structure MarsAtmosphereJCostScheduleCert where
  96  rate_zero : releaseRate 0 = r_0
  97  rate_pos : ∀ n, 0 < releaseRate n
  98  rate_succ : ∀ n, releaseRate (n + 1) = releaseRate n * phi
  99  rate_strict_mono : ∀ {n m : ℕ}, n < m → releaseRate n < releaseRate m
 100  cumulative_zero : cumulativeRelease 0 = 0
 101  cumulative_succ : ∀ n, cumulativeRelease (n + 1) = cumulativeRelease n + releaseRate n
 102  cumulative_nonneg : ∀ n, 0 ≤ cumulativeRelease n
 103  cumulative_strict_mono : ∀ {n m : ℕ}, n < m → cumulativeRelease n < cumulativeRelease m
 104
 105def marsAtmosphereJCostScheduleCert : MarsAtmosphereJCostScheduleCert where
 106  rate_zero := releaseRate_zero
 107  rate_pos := releaseRate_pos
 108  rate_succ := releaseRate_succ
 109  rate_strict_mono := @releaseRate_strict_mono
 110  cumulative_zero := cumulativeRelease_zero
 111  cumulative_succ := cumulativeRelease_succ
 112  cumulative_nonneg := cumulativeRelease_nonneg
 113  cumulative_strict_mono := @cumulativeRelease_strict_mono
 114
 115/-- **MARS TERRAFORM ONE-STATEMENT.** Release rate ladder
 116`r(n) = r_0 · φ^n`, strictly monotonic, adjacent ratio φ; cumulative
 117release strictly monotonic. -/
 118theorem mars_terraform_one_statement :
 119    (∀ n, releaseRate (n + 1) = releaseRate n * phi) ∧
 120    (∀ {n m : ℕ}, n < m → releaseRate n < releaseRate m) ∧
 121    (∀ {n m : ℕ}, n < m → cumulativeRelease n < cumulativeRelease m) :=
 122  ⟨releaseRate_succ, @releaseRate_strict_mono, @cumulativeRelease_strict_mono⟩
 123
 124end
 125
 126end MarsAtmosphereJCostSchedule
 127end Engineering
 128end IndisputableMonolith
 129

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