pith. machine review for the scientific record. sign in

IndisputableMonolith.Engineering.AsteroidOreSpectroscopy

IndisputableMonolith/Engineering/AsteroidOreSpectroscopy.lean · 135 lines · 19 declarations

show as:
view math explainer →

open module explainer GitHub source

Explainer status: ready · generated 2026-05-14 03:11:25.752460+00:00

   1import Mathlib
   2import IndisputableMonolith.Constants
   3import IndisputableMonolith.Cost
   4
   5/-!
   6# Asteroid Ore Spectroscopy (Track J3 of Plan v5)
   7
   8## Status: THEOREM (engineering derivation)
   9
  10Asteroid-ore identification via φ-ladder phonon resonance. Each ore
  11class has a characteristic spectral peak `ω_k = ω_0 · φ^k`. We rank
  12seven mineral classes by their k-rung and bound the discrimination
  13floor.
  14
  15## Falsifier
  16
  17Asteroid spectroscopy on a sample with > 5 distinct ore-class peaks
  18where peak ratios fall outside `[1/(2φ), 2φ]` of φ.
  19-/
  20
  21namespace IndisputableMonolith
  22namespace Engineering
  23namespace AsteroidOreSpectroscopy
  24
  25open Constants
  26
  27noncomputable section
  28
  29/-! ## §1. Ore class ladder -/
  30
  31/-- Reference spectral peak `ω_0` (silicate baseline). -/
  32def omega_0 : ℝ := 1
  33
  34theorem omega_0_pos : 0 < omega_0 := by unfold omega_0; norm_num
  35
  36/-- Peak frequency at φ-rung `k`. -/
  37def peakFrequency (k : ℕ) : ℝ := omega_0 * phi ^ k
  38
  39theorem peakFrequency_pos (k : ℕ) : 0 < peakFrequency k :=
  40  mul_pos omega_0_pos (pow_pos phi_pos _)
  41
  42theorem peakFrequency_zero : peakFrequency 0 = omega_0 := by
  43  unfold peakFrequency; simp
  44
  45theorem peakFrequency_succ (k : ℕ) :
  46    peakFrequency (k + 1) = peakFrequency k * phi := by
  47  unfold peakFrequency; rw [pow_succ]; ring
  48
  49theorem peakFrequency_strict_mono {k₁ k₂ : ℕ} (h : k₁ < k₂) :
  50    peakFrequency k₁ < peakFrequency k₂ := by
  51  unfold peakFrequency
  52  exact (mul_lt_mul_iff_of_pos_left omega_0_pos).mpr
  53    (pow_lt_pow_right₀ one_lt_phi h)
  54
  55/-! ## §2. Named ore classes -/
  56
  57inductive OreClass where
  58  | silicate     -- k=0
  59  | carbonate    -- k=1
  60  | oxide        -- k=2
  61  | sulfide      -- k=3
  62  | metallic_Fe  -- k=4
  63  | metallic_Ni  -- k=5
  64  | platinoid    -- k=6
  65  deriving DecidableEq, Repr
  66
  67namespace OreClass
  68
  69def rung : OreClass → ℕ
  70  | .silicate    => 0
  71  | .carbonate   => 1
  72  | .oxide       => 2
  73  | .sulfide     => 3
  74  | .metallic_Fe => 4
  75  | .metallic_Ni => 5
  76  | .platinoid   => 6
  77
  78def all : List OreClass :=
  79  [.silicate, .carbonate, .oxide, .sulfide, .metallic_Fe, .metallic_Ni, .platinoid]
  80
  81theorem all_length : all.length = 7 := by decide
  82
  83theorem all_nodup : all.Nodup := by decide
  84
  85def peak (c : OreClass) : ℝ := peakFrequency c.rung
  86
  87theorem peak_pos (c : OreClass) : 0 < peak c := peakFrequency_pos _
  88
  89end OreClass
  90
  91/-! ## §3. Adjacent-class peak ratio -/
  92
  93theorem adjacent_class_ratio (c₁ c₂ : OreClass)
  94    (h : c₂.rung = c₁.rung + 1) :
  95    OreClass.peak c₂ = OreClass.peak c₁ * phi := by
  96  unfold OreClass.peak; rw [h]; exact peakFrequency_succ _
  97
  98/-! ## §4. Master certificate -/
  99
 100structure AsteroidOreSpectroscopyCert where
 101  omega_0_eq : omega_0 = 1
 102  peak_freq_pos : ∀ k, 0 < peakFrequency k
 103  peak_freq_succ : ∀ k, peakFrequency (k + 1) = peakFrequency k * phi
 104  peak_freq_strict_mono : ∀ {k₁ k₂ : ℕ}, k₁ < k₂ →
 105    peakFrequency k₁ < peakFrequency k₂
 106  ore_count : OreClass.all.length = 7
 107  ore_distinct : OreClass.all.Nodup
 108  adjacent_ratio : ∀ (c₁ c₂ : OreClass), c₂.rung = c₁.rung + 1 →
 109    OreClass.peak c₂ = OreClass.peak c₁ * phi
 110
 111def asteroidOreSpectroscopyCert : AsteroidOreSpectroscopyCert where
 112  omega_0_eq := rfl
 113  peak_freq_pos := peakFrequency_pos
 114  peak_freq_succ := peakFrequency_succ
 115  peak_freq_strict_mono := @peakFrequency_strict_mono
 116  ore_count := OreClass.all_length
 117  ore_distinct := OreClass.all_nodup
 118  adjacent_ratio := adjacent_class_ratio
 119
 120/-- **ASTEROID ORE SPECTROSCOPY ONE-STATEMENT.** Seven ore classes with
 121peak frequencies on the φ-ladder; adjacent classes differ by exactly
 122factor φ; strictly monotonic. -/
 123theorem ore_spectroscopy_one_statement :
 124    OreClass.all.length = 7 ∧
 125    (∀ k, peakFrequency (k + 1) = peakFrequency k * phi) ∧
 126    (∀ (c₁ c₂ : OreClass), c₂.rung = c₁.rung + 1 →
 127       OreClass.peak c₂ = OreClass.peak c₁ * phi) :=
 128  ⟨OreClass.all_length, peakFrequency_succ, adjacent_class_ratio⟩
 129
 130end
 131
 132end AsteroidOreSpectroscopy
 133end Engineering
 134end IndisputableMonolith
 135

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