def
definition
actionCost
show as:
view math explainer →
open explainer
Read the cached plain-language explainer.
open lean source
IndisputableMonolith.Foundation.UniversalForcing.Strict.Ethics on GitHub at line 22.
browse module
All declarations in this module, on Recognition.
explainer page
depends on
used by
formal source
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