pith. machine review for the scientific record. sign in

IndisputableMonolith.Foundation.UniversalForcing.Strict.Ethics

IndisputableMonolith/Foundation/UniversalForcing/Strict/Ethics.lean · 68 lines · 9 declarations

show as:
view math explainer →

open module explainer GitHub source

Explainer status: ready · generated 2026-05-13 18:19:21.003987+00:00

   1import IndisputableMonolith.Foundation.UniversalForcing.Strict.Narrative
   2
   3/-!
   4  Strict/Ethics.lean
   5
   6  Domain-rich ethical realization over action states with agent and
   7  improvement-rank coordinates. The generator is the smallest recognized
   8  improvement step.
   9-/
  10
  11namespace IndisputableMonolith
  12namespace Foundation
  13namespace UniversalForcing
  14namespace Strict
  15namespace Ethics
  16
  17structure ActionState where
  18  agent : Nat
  19  improvementRank : Nat
  20  deriving DecidableEq, Repr
  21
  22def actionCost (a b : ActionState) : Nat :=
  23  if a = b then 0 else 1
  24
  25@[simp] theorem actionCost_self (a : ActionState) : actionCost a a = 0 := by
  26  simp [actionCost]
  27
  28theorem actionCost_symm (a b : ActionState) : actionCost a b = actionCost b a := by
  29  by_cases h : a = b
  30  · subst h
  31    simp [actionCost]
  32  · have h' : b ≠ a := by intro hb; exact h hb.symm
  33    simp [actionCost, h, h']
  34
  35def preferenceCompose (a b : ActionState) : ActionState :=
  36  { agent := a.agent, improvementRank := a.improvementRank + b.improvementRank }
  37
  38def ethicalZero : ActionState := ⟨0, 0⟩
  39def minimalImprovement : ActionState := ⟨0, 1⟩
  40
  41/-- Strict ethical realization using minimal improvement as generator. -/
  42def strictEthicsRealization : StrictLogicRealization where
  43  Carrier := ActionState
  44  Cost := Nat
  45  zeroCost := inferInstance
  46  compare := actionCost
  47  compose := preferenceCompose
  48  one := ethicalZero
  49  generator := minimalImprovement
  50  identity_law := actionCost_self
  51  non_contradiction_law := actionCost_symm
  52  excluded_middle_law := True
  53  composition_law := True
  54  invariance_law := True
  55  nontrivial_law := by
  56    simp [actionCost, minimalImprovement, ethicalZero]
  57
  58def ethics_arith_equiv_logicNat :
  59    (StrictLogicRealization.arith strictEthicsRealization).peano.carrier
  60      ≃ ArithmeticFromLogic.LogicNat :=
  61  (StrictLogicRealization.toLightweight strictEthicsRealization).orbitEquivLogicNat
  62
  63end Ethics
  64end Strict
  65end UniversalForcing
  66end Foundation
  67end IndisputableMonolith
  68

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