lemma
proved
chainFlux_zero_of_balanced
show as:
view math explainer →
open explainer
Generate a durable explainer page for this declaration.
open lean source
IndisputableMonolith.Recognition on GitHub at line 72.
browse module
All declarations in this module, on Recognition.
explainer page
depends on
-
Chain -
chainFlux -
Chain -
chainFlux -
L -
M -
phi_zero_of_balanced -
L -
M -
Chain -
chainFlux -
chainFlux_zero_of_balanced
used by
formal source
69 ∀ u, phi L u = 0 := by
70 intro u; simp [phi, hbal u, sub_self]
71
72lemma chainFlux_zero_of_balanced {M} (L : Ledger M) (ch : Chain M)
73 (hbal : ∀ u, L.debit u = L.credit u) :
74 chainFlux L ch = 0 := by
75 simp [chainFlux, phi_zero_of_balanced (M:=M) L hbal]
76
77class AtomicTick (M : RecognitionStructure) where
78 postedAt : Nat → M.U → Prop
79 unique_post : ∀ t : Nat, ∃! u : M.U, postedAt t u
80
81theorem T2_atomicity {M} [AtomicTick M] :
82 ∀ t u v, AtomicTick.postedAt (M:=M) t u → AtomicTick.postedAt (M:=M) t v → u = v := by
83 intro t u v hu hv
84 rcases (AtomicTick.unique_post (M:=M) t) with ⟨w, hw, huniq⟩
85 have huw : u = w := huniq u hu
86 have hvw : v = w := huniq v hv
87 exact huw.trans hvw.symm
88
89end Recognition
90
91namespace Demo
92
93open Recognition
94
95structure U where
96 a : Unit
97
98/-- Recognition relation by structural equality -/
99def recog : U → U → Prop := fun x y => x = y
100
101def M : RecognitionStructure := { U := U, R := recog }
102