def
definition
balanced
show as:
view math explainer →
open explainer
Generate a durable explainer page for this declaration.
open lean source
IndisputableMonolith.Foundation.LedgerForcing on GitHub at line 93.
browse module
All declarations in this module, on Recognition.
explainer page
depends on
used by
-
computeBalance -
IsBalanced -
sat_computation_time -
circuit_cannot_sense_moat -
LedgerComputation -
ledger_forces_separation -
SATLedger -
Turing_incomplete -
love_achieves_ground_state -
love_jensen_strict -
add_event_balanced -
conservation_from_balance -
empty_ledger -
empty_ledger_balanced -
flow_contribution_reciprocal -
ledger_balanced -
ledger_cost -
ledger_forcing_principle -
reciprocity -
balancedEvent -
balanced_has_minimum_cost -
entropy_nonneg -
info_cost_nonneg -
info_cost_symmetric -
hebbian_sign_structure -
Jcost_pos_away_from_one -
of -
sum_nonneg_zero_iff -
total_jcost_nonneg -
CoarseGrainingStableClass -
balanceDebt -
full_mock_sync_period -
MockThetaPhantomCorrespondence -
PhantomBalance -
phantom_shadow_uniqueness -
Window8 -
completedZetaLedgerCert -
CompletedZetaLedgerCert -
reciprocal_fixed_re_eq_half -
finiteEulerLedger
formal source
90 L.events.foldl (fun acc e => acc + event_cost e) 0
91
92/-- A ledger is balanced if its event list is balanced. -/
93def balanced (L : Ledger) : Prop := balanced_list L.events
94
95/-- Every Ledger is balanced by construction. -/
96theorem ledger_balanced (L : Ledger) : balanced L := L.double_entry
97
98/-- The net flow at an agent. -/
99noncomputable def net_flow (L : Ledger) (agent : ℕ) : ℝ :=
100 L.events.foldl (fun acc e =>
101 if e.source = agent then acc + Real.log e.ratio
102 else if e.target = agent then acc + Real.log e.ratio
103 else acc) 0
104
105/-! ## The Empty Ledger -/
106
107/-- The empty ledger: no events. -/
108def empty_ledger : Ledger := {
109 events := []
110 double_entry := fun _ => by simp [List.count_nil]
111}
112
113/-- The empty ledger is balanced. -/
114theorem empty_ledger_balanced : balanced empty_ledger := empty_ledger.double_entry
115
116/-- The empty ledger has zero cost. -/
117theorem empty_ledger_cost : ledger_cost empty_ledger = 0 := by simp [ledger_cost, empty_ledger]
118
119/-- The empty ledger has zero net flow. -/
120theorem empty_ledger_net_flow (agent : ℕ) : net_flow empty_ledger agent = 0 := by
121 simp [net_flow, empty_ledger]
122
123/-! ## Conservation from Symmetry -/