pith. machine review for the scientific record. sign in

IndisputableMonolith.Climate.DiurnalEightTick

IndisputableMonolith/Climate/DiurnalEightTick.lean · 74 lines · 8 declarations

show as:
view math explainer →

open module explainer GitHub source

Explainer status: ready · generated 2026-05-16 05:16:34.807275+00:00

   1import Mathlib
   2import IndisputableMonolith.Constants
   3import IndisputableMonolith.Cost
   4import IndisputableMonolith.Foundation.EightTick
   5
   6/-!
   7# Diurnal Cycle from the 8-Tick Cadence
   8
   9## Element 84 (Domain B): the diurnal cycle inherits the 8-tick cadence
  10
  11The diurnal (24-hour) climate cycle has 8 distinct phases when
  12quantized at the 3-hour granularity.  RS predicts this 8-fold
  13phase structure follows from the universal 8-tick cadence
  14forced by D = 3 (since `2^D = 2^3 = 8`).
  15
  16## Lean status: 0 sorry, 0 axiom
  17-/
  18
  19namespace IndisputableMonolith
  20namespace Climate
  21namespace DiurnalEightTick
  22
  23open Constants
  24
  25noncomputable section
  26
  27/-- The diurnal cycle has 8 phase positions. -/
  28def diurnal_phase_count : ℕ := 8
  29
  30/-- The diurnal phase at hour `h` (modulo 24, mapped to 8 phases). -/
  31def diurnal_phase (h : ℕ) : ℕ := h % 8
  32
  33/-- The diurnal phase is bounded by 8. -/
  34theorem diurnal_phase_bound (h : ℕ) : diurnal_phase h < 8 := by
  35  unfold diurnal_phase
  36  exact Nat.mod_lt h (by norm_num)
  37
  38/-- Sun-noon (h = 12) maps to phase 4 (mid-day). -/
  39theorem noon_phase : diurnal_phase 12 = 4 := by
  40  unfold diurnal_phase; rfl
  41
  42/-- The phase wraps around after 24 hours. -/
  43theorem phase_wraps_24 (h : ℕ) : diurnal_phase (h + 24) = diurnal_phase h := by
  44  unfold diurnal_phase
  45  omega
  46
  47/-- **MASTER THEOREM**: the diurnal cycle is partitioned into 8
  48    phases (matching the 8-tick cadence), with sun-noon at phase 4. -/
  49theorem diurnal_master :
  50    diurnal_phase_count = 8 ∧
  51    (∀ h : ℕ, diurnal_phase h < 8) ∧
  52    diurnal_phase 12 = 4 ∧
  53    (∀ h : ℕ, diurnal_phase (h + 24) = diurnal_phase h) :=
  54  ⟨rfl, diurnal_phase_bound, noon_phase, phase_wraps_24⟩
  55
  56/-- **MASTER CERTIFICATE.** -/
  57structure DiurnalEightTickCert where
  58  phase_count : diurnal_phase_count = 8
  59  phase_bound : ∀ h : ℕ, diurnal_phase h < 8
  60  noon_at_4 : diurnal_phase 12 = 4
  61  wraps_24 : ∀ h : ℕ, diurnal_phase (h + 24) = diurnal_phase h
  62
  63def diurnalEightTickCert : DiurnalEightTickCert where
  64  phase_count := rfl
  65  phase_bound := diurnal_phase_bound
  66  noon_at_4 := noon_phase
  67  wraps_24 := phase_wraps_24
  68
  69end
  70
  71end DiurnalEightTick
  72end Climate
  73end IndisputableMonolith
  74

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