def
definition
ethicsCost
show as:
view math explainer →
open explainer
Generate a durable explainer page for this declaration.
open lean source
IndisputableMonolith.Foundation.UniversalForcing.EthicsRealization on GitHub at line 22.
browse module
All declarations in this module, on Recognition.
explainer page
depends on
used by
formal source
19
20abbrev MoralImprovementStep := Nat
21
22def ethicsCost (a b : MoralImprovementStep) : Nat :=
23 if a = b then 0 else 1
24
25@[simp] theorem ethicsCost_self (a : MoralImprovementStep) : ethicsCost a a = 0 := by
26 simp [ethicsCost]
27
28theorem ethicsCost_symm (a b : MoralImprovementStep) : ethicsCost a b = ethicsCost b a := by
29 by_cases h : a = b
30 · subst h; simp [ethicsCost]
31 · have h' : b ≠ a := by intro hb; exact h hb.symm
32 simp [ethicsCost, h, h']
33
34def ethicsInterpret (n : LogicNat) : MoralImprovementStep :=
35 LogicNat.toNat n
36
37/-- Ethical realization as morally meaningful improvement count. -/
38def ethicsRealization : LogicRealization where
39 Carrier := MoralImprovementStep
40 Cost := Nat
41 zeroCost := inferInstance
42 compare := ethicsCost
43 zero := 0
44 step := Nat.succ
45 Orbit := LogicNat
46 orbitZero := LogicNat.zero
47 orbitStep := LogicNat.succ
48 interpret := ethicsInterpret
49 interpret_zero := by rfl
50 interpret_step := by
51 intro n
52 show LogicNat.toNat (LogicNat.succ n) = Nat.succ (LogicNat.toNat n)