pith. machine review for the scientific record. sign in

IndisputableMonolith.Archaeology.UrbanDensityFromPhiLadder

IndisputableMonolith/Archaeology/UrbanDensityFromPhiLadder.lean · 84 lines · 11 declarations

show as:
view math explainer →

open module explainer GitHub source

Explainer status: ready · generated 2026-05-16 04:27:02.570664+00:00

   1import Mathlib
   2import IndisputableMonolith.Constants
   3import IndisputableMonolith.Cost
   4
   5/-!
   6# Urban Settlement Scaling from φ-Ladder (Plan v7 fifty-second pass)
   7
   8## Status: STRUCTURAL THEOREM (0 sorry, 0 axiom).
   9
  10Settlement size hierarchies (Zipf / central place theory) follow
  11power laws. RS prediction: the rank-size ratio for nested settlement
  12hierarchies (hamlet → village → town → city → metropolis) scales
  13as φ^k per level.
  14
  15Christaller's central place theory predicts population ratios
  16between adjacent levels ≈ 3-7. RS predicts: ratio = φ² ≈ 2.618
  17or φ³ ≈ 4.236, consistent with Christaller's empirical range.
  18
  19The five canonical settlement levels are forced by `configDim D = 5`.
  20-/
  21
  22namespace IndisputableMonolith
  23namespace Archaeology
  24namespace UrbanDensityFromPhiLadder
  25
  26open Constants
  27open Cost
  28
  29noncomputable section
  30
  31/-- Five canonical settlement levels (forced by configDim = 5). -/
  32def settlementLevelCount : ℕ := 5
  33
  34theorem settlementLevelCount_eq : settlementLevelCount = 5 := rfl
  35
  36/-- φ-rung spacing between adjacent settlement levels. -/
  37def settlementRungSpacing : ℕ := 3
  38
  39/-- Population ratio between adjacent settlement levels: φ³ ≈ 4.236. -/
  40noncomputable def settlementPopRatio : ℝ := phi ^ settlementRungSpacing
  41
  42theorem settlementPopRatio_pos : 0 < settlementPopRatio := by
  43  unfold settlementPopRatio; exact pow_pos phi_pos _
  44
  45theorem settlementPopRatio_in_Christaller_band :
  46    (3 : ℝ) < settlementPopRatio ∧ settlementPopRatio < 8 := by
  47  constructor
  48  · unfold settlementPopRatio settlementRungSpacing
  49    have hlo : (1.6 : ℝ) < phi := one_lt_phiPointSixOne
  50    have : (1.6 : ℝ) ^ 3 < phi ^ 3 := by
  51      have h1 : (1.6 : ℝ) ^ 3 = 4.096 := by norm_num
  52      have h2 : phi ^ 3 > 4.096 := by nlinarith [phi_gt_onePointSixOne, phi_sq_eq, phi_pos]
  53      linarith
  54    linarith
  55  · unfold settlementPopRatio settlementRungSpacing
  56    have hhi : phi < (1.62 : ℝ) := phi_lt_onePointSixTwo
  57    have : phi ^ 3 < 5 := by nlinarith [phi_lt_onePointSixTwo, phi_sq_eq, phi_pos]
  58    linarith
  59
  60/-- J-cost on the settlement size ratio. -/
  61def settlementCost (actual_pop expected_pop : ℝ) : ℝ :=
  62  Jcost (actual_pop / expected_pop)
  63
  64theorem settlementCost_at_fit (p : ℝ) (h : p ≠ 0) :
  65    settlementCost p p = 0 := by
  66  unfold settlementCost; rw [div_self h]; exact Jcost_unit0
  67
  68structure UrbanDensityCert where
  69  count_eq : settlementLevelCount = 5
  70  pop_ratio_pos : 0 < settlementPopRatio
  71  pop_ratio_in_band : (3 : ℝ) < settlementPopRatio ∧ settlementPopRatio < 8
  72
  73noncomputable def cert : UrbanDensityCert where
  74  count_eq := settlementLevelCount_eq
  75  pop_ratio_pos := settlementPopRatio_pos
  76  pop_ratio_in_band := settlementPopRatio_in_Christaller_band
  77
  78theorem cert_inhabited : Nonempty UrbanDensityCert := ⟨cert⟩
  79
  80end
  81end UrbanDensityFromPhiLadder
  82end Archaeology
  83end IndisputableMonolith
  84

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