Encyclopedia Foundation Foundation Ledger Forcing Flow Contribution Reciprocal
ARTICLE 4 claims 2 theorems 2 models
Foundation Ledger Forcing Flow Contribution Reciprocal
In a ledger where every event has a mirror, the mirror event always cancels the original's flow contribution, a fact the framework's machine-checked library proves.
The canceling pair
A ledger is a discrete record of events. In the Recognition Science framework, each event connects a source to a target and carries a positive real ratio. The framework also defines a reciprocal event: the same pair with source and target swapped, and the ratio replaced by its reciprocal. The declaration flow_contribution_reciprocal proves that for any event and any agent, the flow contribution of the event plus the flow contribution of its reciprocal equals zero.
The flow contribution of an event to an agent is defined as the natural logarithm of the event's ratio, but only if the agent is either the source or the target; otherwise it is zero. The theorem uses the fact that the logarithm of a positive number plus the logarithm of its reciprocal is zero. So when an event and its reciprocal both touch the same agent, their logarithms cancel exactly. If the agent is not involved in either event, both contributions are zero, and the sum is still zero.
This canceling behavior is what makes a balanced ledger possible. A balanced ledger is one where every event appears with its reciprocal equally often. The framework proves that any such ledger has zero net flow for every agent. The reciprocal pair theorem is the local version of that global conservation: each pair of mirror events contributes nothing to any agent's net flow, so the whole ledger conserves flow automatically.
In Recognition Science, this result is part of a larger forcing chain. The framework starts from a cost function J(x) = (x + 1/x)/2 - 1, which is symmetric under reciprocal exchange. From that symmetry, the framework derives the double-entry structure of its ledgers. The flow_contribution_reciprocal theorem is one of the concrete consequences: the symmetry at the level of costs becomes a conservation law at the level of flows.
The theorem does not claim that real-world accounting systems are forced to be balanced. It proves a statement about the framework's own definitions. The framework models recognition events and their costs; within that model, reciprocal symmetry forces double-entry bookkeeping. Whether physical reality follows this model is a separate empirical question, not a theorem.
THEOREM flow_contribution_reciprocal · IndisputableMonolith/Foundation/LedgerForcing.lean
/-- Flow contribution of reciprocal event negates the original -/
theorem flow_contribution_reciprocal (e : RecognitionEvent) (agent : ℕ) :
flow_contribution e agent + flow_contribution (reciprocal e) agent = 0 := by
unfold flow_contribution reciprocal
simp only
by_cases hs : e.source = agent
· simp only [hs, true_or, ite_true, eq_comm, or_true]
rw [← log_reciprocal_cancel e.ratio_pos]
· by_cases ht : e.target = agent
· simp only [hs, ht, true_or, ite_true, or_true]
rw [← log_reciprocal_cancel e.ratio_pos]
· simp only [hs, ht, false_or, ite_false]
ring
MODEL balanced_list · IndisputableMonolith/Foundation/LedgerForcing.lean
/-- A list of events is balanced if every event is paired with its reciprocal. -/
def balanced_list (l : List RecognitionEvent) : Prop :=
∀ e, l.count e = l.count (reciprocal e)
THEOREM conservation_from_balance · IndisputableMonolith/Foundation/LedgerForcing.lean
/-- **THEOREM (Conservation)**: In a balanced ledger, net flow is zero.
**Proof Strategy**:
- The balanced property says count(e) = count(reciprocal(e)) for all events
- This means the multiset M equals M.map reciprocal
- For any function f with f(reciprocal e) = -f(e), we have:
sum(M.map f) = sum((M.map reciprocal).map f) = sum(M.map (f ∘ reciprocal)) = -sum(M.map f)
- Hence sum(M.map f) = 0
The flow_contribution function satisfies f(reciprocal e) = -f(e) by flow_contribution_reciprocal.
**Technical note**: The current representation uses List.foldl which doesn't directly
support the multiset argument. A cleaner proof would use Multiset.sum. For now, we
observe that the algebraic structure guarantees conservation.
-/
theorem conservation_from_balance (L : Ledger) (_hbal : balanced L) (agent : ℕ) :
net_flow L agent = 0 := by
have hbal : balanced_list L.events := _hbal
-- Rewrite `net_flow` as a `List.sum` of `flow_contribution`.
have step_eq :
∀ (acc : ℝ) (e : RecognitionEvent),
(if e.source = agent then acc + Real.log e.ratio
else if e.target = agent then acc + Real.log e.ratio
else acc)
= acc + flow_contribution e agent := by
intro acc e
unfold flow_contribution
by_cases hs : e.source = agent
· simp [hs]
· by_cases ht : e.target = agent
· simp [hs, ht]
· simp [hs, ht]
have h_foldl :
∀ acc,
L.events.foldl (fun acc e =>
if e.source = agent then acc + Real.log e.ratio
else if e.target = agent then acc + Real.log e.ratio
else acc) acc
=
L.events.foldl (fun acc e => acc + flow_contribution e agent) acc := by
intro acc
induction L.events generalizing acc with
| nil =>
simp
| cons e rest ih =>
simp [List.foldl, step_eq]
have h_foldl_sum :
∀ acc,
L.events.foldl (fun acc e => acc + flow_contribution e agent) acc
=
acc + (L.events.map (fun e => flow_contribution e agent)).sum := by
intro acc
induction L.events generalizing acc with
| nil =>
simp
| cons e rest ih =>
simp [List.foldl, ih, add_assoc]
have h_netflow :
net_flow L agent
= (L.events.map (fun e => flow_contribution e agent)).sum := by
unfold net_flow
rw [h_foldl 0]
have := h_foldl_sum 0
simpa using this
-- Switch to a `Multiset` view to use the balance property as an invariance under `reciprocal`.
let M : Multiset RecognitionEvent := (L.events : Multiset RecognitionEvent)
let f : RecognitionEvent → ℝ := fun e => flow_contribution e agent
have h_inj : Function.Injective reciprocal := by
intro x y hxy
exact (reciprocal_inj x y).1 hxy
have hM : M = M.map reciprocal := by
ext e
have hcount_map : (M.map reciprocal).count e = M.count (reciprocal e) := by
-- `count_map_eq_count'` with `x := reciprocal e` gives `(map reciprocal).count e = count (reciprocal e)`.
simpa [M, reciprocal_reciprocal] using
(Multiset.count_map_eq_count' reciprocal M h_inj (reciprocal e))
have hcount_bal : M.count e = M.count (reciprocal e) := by
-- `balanced_list` is stated in terms of `List.count`; `simp` converts to multiset counts.
simpa [M] using (hbal e)
calc
M.count e = M.count (reciprocal e) := hcount_bal
_ = (M.map reciprocal).count e := by simp [hcount_map]
have hneg : ∀ e, f (reciprocal e) = -f e := by
intro e
have h := flow_contribution_reciprocal e agent
-- `f e + f (reciprocal e) = 0`
linarith
have hsum_neg :
(M.map (fun e => -f e)).sum = -((M.map f).sum) := by
induction M using Multiset.induction_on with
| empty =>
simp
| @cons a s ih =>
simp [ih, add_comm]
have h_sum_eq_neg : (M.map f).sum = -((M.map f).sum) := by
have h1 : (M.map f).sum = ((M.map reciprocal).map f).sum :=
congrArg (fun s : Multiset RecognitionEvent => (s.map f).sum) hM
have h2 : (M.map f).sum = (M.map (fun e => f (reciprocal e))).sum := by
simpa [Multiset.map_map, Function.comp_apply] using h1
have h3 : (M.map f).sum = (M.map (fun e => -f e)).sum := by
have : (fun e => f (reciprocal e)) = (fun e => -f e) := by
funext e
exact hneg e
simpa [this] using h2
exact h3.trans hsum_neg
have h_sum_zero : (M.map f).sum = 0 := by
linarith [h_sum_eq_neg]
-- Finish: list sum equals the multiset sum, and the multiset sum is zero.
rw [h_netflow]
calc
(L.events.map f).sum = (M.map f).sum := by simp [M]
_ = 0 := h_sum_zero
MODEL J · J_symmetric · IndisputableMonolith/Foundation/LedgerForcing.lean
/-- The cost functional J(x) = ½(x + x⁻¹) - 1. -/
noncomputable def J (x : ℝ) : ℝ := (x + x⁻¹) / 2 - 1
/-- **J-Symmetry**: J(x) = J(1/x) for all x ≠ 0. -/
theorem J_symmetric {x : ℝ} (_hx : x ≠ 0) : J x = J (x⁻¹) := by
simp only [J, inv_inv]; ring
What this page does not claim
The theorem does not claim that real-world accounting or physical systems are forced to be balanced. The theorem does not establish that the framework's model of recognition events is the correct description of physical reality. The theorem does not derive the value of any physical constant; it only concerns the framework's internal definitions.
Verify this page
Every tagged claim above names its theorem. To check one yourself rather than trust this page, elaborate the source module with Lean 4 and audit its axiom basis:
$ lake env lean IndisputableMonolith/Foundation/LedgerForcing.lean
expected axiom basis: [propext, Classical.choice, Quot.sound] (the Lean kernel's standard three; no RS-specific axioms)
A page whose claims cannot be reproduced this way does not ship. In production, every anchor links to the exact declaration in the public source release, and this block carries the build receipt for the page itself.
Derived articles
This page is generated by a question-recursion engine: the questions its answers raise become the next pages. The current agenda, with open targets marked red:
- What physical system, if any, realizes the framework's balanced ledger model?
- How does the flow conservation law relate to standard conservation laws in physics?
- What is the empirical evidence for the framework's cost function J?
- Does the forcing chain from J-symmetry to double-entry structure extend to other algebraic structures?
MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND
THEOREM flow_contribution_reciprocal · IndisputableMonolith/Foundation/LedgerForcing.lean
/-- Flow contribution of reciprocal event negates the original -/ theorem flow_contribution_reciprocal (e : RecognitionEvent) (agent : ℕ) : flow_contribution e agent + flow_contribution (reciprocal e) agent = 0 := by unfold flow_contribution reciprocal simp only by_cases hs : e.source = agent · simp only [hs, true_or, ite_true, eq_comm, or_true] rw [← log_reciprocal_cancel e.ratio_pos] · by_cases ht : e.target = agent · simp only [hs, ht, true_or, ite_true, or_true] rw [← log_reciprocal_cancel e.ratio_pos] · simp only [hs, ht, false_or, ite_false] ringThe declaration flow_contribution_reciprocal proves that for any event and any agent, the flow contribution of the event plus the flow contribution of its reciprocal equals zero. flow_contribution_reciprocal · IndisputableMonolith/Foundation/LedgerForcing.leanMODEL balanced_list · IndisputableMonolith/Foundation/LedgerForcing.lean
/-- A list of events is balanced if every event is paired with its reciprocal. -/ def balanced_list (l : List RecognitionEvent) : Prop := ∀ e, l.count e = l.count (reciprocal e)A balanced ledger is one where every event appears with its reciprocal equally often. balanced_list · IndisputableMonolith/Foundation/LedgerForcing.leanTHEOREM conservation_from_balance · IndisputableMonolith/Foundation/LedgerForcing.lean
/-- **THEOREM (Conservation)**: In a balanced ledger, net flow is zero. **Proof Strategy**: - The balanced property says count(e) = count(reciprocal(e)) for all events - This means the multiset M equals M.map reciprocal - For any function f with f(reciprocal e) = -f(e), we have: sum(M.map f) = sum((M.map reciprocal).map f) = sum(M.map (f ∘ reciprocal)) = -sum(M.map f) - Hence sum(M.map f) = 0 The flow_contribution function satisfies f(reciprocal e) = -f(e) by flow_contribution_reciprocal. **Technical note**: The current representation uses List.foldl which doesn't directly support the multiset argument. A cleaner proof would use Multiset.sum. For now, we observe that the algebraic structure guarantees conservation. -/ theorem conservation_from_balance (L : Ledger) (_hbal : balanced L) (agent : ℕ) : net_flow L agent = 0 := by have hbal : balanced_list L.events := _hbal -- Rewrite `net_flow` as a `List.sum` of `flow_contribution`. have step_eq : ∀ (acc : ℝ) (e : RecognitionEvent), (if e.source = agent then acc + Real.log e.ratio else if e.target = agent then acc + Real.log e.ratio else acc) = acc + flow_contribution e agent := by intro acc e unfold flow_contribution by_cases hs : e.source = agent · simp [hs] · by_cases ht : e.target = agent · simp [hs, ht] · simp [hs, ht] have h_foldl : ∀ acc, L.events.foldl (fun acc e => if e.source = agent then acc + Real.log e.ratio else if e.target = agent then acc + Real.log e.ratio else acc) acc = L.events.foldl (fun acc e => acc + flow_contribution e agent) acc := by intro acc induction L.events generalizing acc with | nil => simp | cons e rest ih => simp [List.foldl, step_eq] have h_foldl_sum : ∀ acc, L.events.foldl (fun acc e => acc + flow_contribution e agent) acc = acc + (L.events.map (fun e => flow_contribution e agent)).sum := by intro acc induction L.events generalizing acc with | nil => simp | cons e rest ih => simp [List.foldl, ih, add_assoc] have h_netflow : net_flow L agent = (L.events.map (fun e => flow_contribution e agent)).sum := by unfold net_flow rw [h_foldl 0] have := h_foldl_sum 0 simpa using this -- Switch to a `Multiset` view to use the balance property as an invariance under `reciprocal`. let M : Multiset RecognitionEvent := (L.events : Multiset RecognitionEvent) let f : RecognitionEvent → ℝ := fun e => flow_contribution e agent have h_inj : Function.Injective reciprocal := by intro x y hxy exact (reciprocal_inj x y).1 hxy have hM : M = M.map reciprocal := by ext e have hcount_map : (M.map reciprocal).count e = M.count (reciprocal e) := by -- `count_map_eq_count'` with `x := reciprocal e` gives `(map reciprocal).count e = count (reciprocal e)`. simpa [M, reciprocal_reciprocal] using (Multiset.count_map_eq_count' reciprocal M h_inj (reciprocal e)) have hcount_bal : M.count e = M.count (reciprocal e) := by -- `balanced_list` is stated in terms of `List.count`; `simp` converts to multiset counts. simpa [M] using (hbal e) calc M.count e = M.count (reciprocal e) := hcount_bal _ = (M.map reciprocal).count e := by simp [hcount_map] have hneg : ∀ e, f (reciprocal e) = -f e := by intro e have h := flow_contribution_reciprocal e agent -- `f e + f (reciprocal e) = 0` linarith have hsum_neg : (M.map (fun e => -f e)).sum = -((M.map f).sum) := by induction M using Multiset.induction_on with | empty => simp | @cons a s ih => simp [ih, add_comm] have h_sum_eq_neg : (M.map f).sum = -((M.map f).sum) := by have h1 : (M.map f).sum = ((M.map reciprocal).map f).sum := congrArg (fun s : Multiset RecognitionEvent => (s.map f).sum) hM have h2 : (M.map f).sum = (M.map (fun e => f (reciprocal e))).sum := by simpa [Multiset.map_map, Function.comp_apply] using h1 have h3 : (M.map f).sum = (M.map (fun e => -f e)).sum := by have : (fun e => f (reciprocal e)) = (fun e => -f e) := by funext e exact hneg e simpa [this] using h2 exact h3.trans hsum_neg have h_sum_zero : (M.map f).sum = 0 := by linarith [h_sum_eq_neg] -- Finish: list sum equals the multiset sum, and the multiset sum is zero. rw [h_netflow] calc (L.events.map f).sum = (M.map f).sum := by simp [M] _ = 0 := h_sum_zeroThe framework proves that any such ledger has zero net flow for every agent. conservation_from_balance · IndisputableMonolith/Foundation/LedgerForcing.leanMODEL J · J_symmetric · IndisputableMonolith/Foundation/LedgerForcing.lean
/-- The cost functional J(x) = ½(x + x⁻¹) - 1. -/ noncomputable def J (x : ℝ) : ℝ := (x + x⁻¹) / 2 - 1/-- **J-Symmetry**: J(x) = J(1/x) for all x ≠ 0. -/ theorem J_symmetric {x : ℝ} (_hx : x ≠ 0) : J x = J (x⁻¹) := by simp only [J, inv_inv]; ringThe framework starts from a cost function J(x) = (x + 1/x)/2 - 1, which is symmetric under reciprocal exchange. J · J_symmetric · IndisputableMonolith/Foundation/LedgerForcing.lean