Encyclopedia Foundation Foundation Ledger To Factorization
ARTICLE 4 claims 4 theorems
Foundation Ledger To Factorization
A machine-checked library proves that any ledger obeying a few posting rules must combine values with one specific formula, the RCL combiner.
The bridge from ledger to factorization
A ledger is a discrete record of events, and in Recognition Science the cost of recognizing a new event depends on what came before. The ledger-to-factorization bridge asks a narrow question: when a two-variable combiner takes an old state and a new posting, what shapes can it have? The answer, proved in the framework's machine-checked library of formal theorems, is that the combiner must be the RCL combiner, a specific polynomial in its two inputs.
The proof works by isolating what the ledger forces. A primitive posting rule says the combiner responds to a sum of postings the way a bookkeeper would: the effect of posting v then w equals the effect of v plus the effect of w, measured from zero. That additivity alone does not pin the combiner down. The library shows that additivity plus one mild regularity condition, such as monotonicity, continuity, or a nonnegativity bound, forces the response in its second argument to be affine, meaning linear plus a constant. From there, symmetry, a zero boundary, and a unit diagonal complete the argument, and the gate theorem forces the RCL polynomial.
The classical mathematics here is the Cauchy functional equation. A function that satisfies f(x+y) = f(x) + f(y) on the real line is linear if it is monotone, continuous, or bounded on an interval; without such a condition, pathological solutions exist using the axiom of choice. The library's lemmas monotone_additive_isLinear and antitone_additive_isLinear are the order-regularity replacements for the continuity gate. They let the framework drop continuity and still reach the same conclusion, provided the response is monotone in its second argument.
In Recognition Science, this bridge matters because it connects the ledger to factorization. The framework's earlier phases derive the cost function J(x) = (x + 1/x)/2 - 1 from five plain conditions. The ledger-to-factorization module supplies the algebraic condition that lets the d'Alembert factorization gate apply: if a combiner has ledger-linear response, then it satisfies the rightAffine field the gate needs. The theorem ledgerLinearResponse_forces_rcl states that any combiner with that response equals rclCombiner u v, and the theorem primitiveLedgerPosting_forces_rcl reaches the same conclusion from a primitive posting rule plus continuity, monotonicity, or a nonnegativity condition.
The consequence is a clean statement: the ledger does not allow arbitrary combination rules. Once you accept a primitive posting rule and one regularity condition, the combiner is fixed. The framework models this as a derivation, not an assumption. What remains open is the physical bridge from recognition to linking, which the framework does not claim to have closed.
THEOREM primitiveLedgerPosting_forces_rcl · primitiveLedgerPosting_monotone_forces_rcl · primitiveLedgerPosting_nonneg_forces_rcl · IndisputableMonolith/Foundation/LedgerToFactorization.lean
/-- Primitive ledger posting plus continuity forces the canonical RCL
combiner. -/
theorem primitiveLedgerPosting_forces_rcl
(P : ℝ → ℝ → ℝ) (h : PrimitiveLedgerPostingSemantics P)
(hcont : ∀ u, Continuous fun v => P u v) :
∀ u v, P u v = rclCombiner u v :=
ledgerLinearResponse_forces_rcl P
(ledgerLinearResponse_from_primitiveLedgerPosting P h hcont)
/-- Primitive ledger posting plus monotone response forces the canonical RCL
combiner. No continuity or completeness is used: only additivity from the free
ledger and order regularity. -/
theorem primitiveLedgerPosting_monotone_forces_rcl
(P : ℝ → ℝ → ℝ) (h : PrimitiveLedgerPostingSemantics P)
(hmono : ∀ u, Monotone fun v => P u v) :
∀ u v, P u v = rclCombiner u v :=
ledgerLinearResponse_forces_rcl P
(ledgerLinearResponse_from_primitiveLedgerPosting_monotone P h hmono)
/-- Primitive ledger posting plus **ledger-native cost non-negativity** forces the
canonical RCL combiner. This is the fully ledger-internal route to
right-affineness: additivity comes from `ledgerCost_add`, and the only order
input is that posting non-negative defect mass never lowers cost, which is the
order shadow of `ledgerCost_nonneg`. -/
theorem primitiveLedgerPosting_nonneg_forces_rcl
(P : ℝ → ℝ → ℝ) (h : PrimitiveLedgerPostingSemantics P)
(hnn : ∀ u v, 0 ≤ v → P u 0 ≤ P u v) :
∀ u v, P u v = rclCombiner u v :=
ledgerLinearResponse_forces_rcl P
(ledgerLinearResponse_from_primitiveLedgerPosting_nonneg P h hnn)
THEOREM ledgerLinearResponse_forces_rcl · IndisputableMonolith/Foundation/LedgerToFactorization.lean
/-- Ledger-linear response forces the RCL polynomial through the existing gate
theorem. -/
theorem ledgerLinearResponse_forces_rcl
(P : ℝ → ℝ → ℝ) (h : LedgerLinearResponse P) :
∀ u v, P u v = rclCombiner u v := by
intro u v
rw [gate_forces_rcl P (factorizationGate_of_ledgerLinearResponse P h) u v]
rfl
THEOREM monotone_additive_isLinear · IndisputableMonolith/Foundation/LedgerToFactorization.lean
/-- Monotone additive real responses are linear. This is the order-regularity
replacement for the continuity gate in the additive Cauchy step. -/
theorem monotone_additive_isLinear {f : ℝ → ℝ}
(hadd : ∀ x y, f (x + y) = f x + f y) (hmono : Monotone f) :
∀ x, f x = f 1 * x := by
have hf0 : f 0 = 0 := by
have h := hadd 0 0
rw [add_zero] at h
linarith
let F : ℝ →+ ℝ := AddMonoidHom.mk' f (fun a b => hadd a b)
have hFcoe : ∀ y, F y = f y := fun _ => rfl
have hFq : ∀ q : ℚ, f (q : ℝ) = f 1 * (q : ℝ) := by
intro q
have h := map_ratCast_smul F ℝ ℝ q (1 : ℝ)
simp only [smul_eq_mul, mul_one, hFcoe] at h
rw [h]
ring
intro x
set c := f 1 with hc_def
have hc : 0 ≤ c := by
have hmle : f 0 ≤ f 1 := hmono (by norm_num)
rw [hf0] at hmle
exact hmle
rcases eq_or_lt_of_le hc with hc0 | hcpos
· have hub : f x ≤ 0 := by
obtain ⟨r, hxr, -⟩ := exists_rat_btwn (lt_add_one x)
have hmr := hmono hxr.le
rw [hFq r, ← hc0, zero_mul] at hmr
exact hmr
have hlb : 0 ≤ f x := by
obtain ⟨q, -, hqx⟩ := exists_rat_btwn (sub_one_lt x)
have hmq := hmono hqx.le
rw [hFq q, ← hc0, zero_mul] at hmq
exact hmq
rw [← hc0, zero_mul]
linarith
· refine le_antisymm ?_ ?_
· by_contra hcon
push_neg at hcon
have hxlt : x < f x / c := by
rw [lt_div_iff₀ hcpos]
linarith [mul_comm c x]
obtain ⟨r, hxr, hrlt⟩ := exists_rat_btwn hxlt
have h1 : f x ≤ c * (r : ℝ) := by
have hm := hmono hxr.le
rwa [hFq r] at hm
have h2 : c * (r : ℝ) < f x := by
have := (lt_div_iff₀ hcpos).mp hrlt
linarith [mul_comm (r : ℝ) c]
linarith
· by_contra hcon
push_neg at hcon
have hxlt : f x / c < x := by
rw [div_lt_iff₀ hcpos]
linarith [mul_comm c x]
obtain ⟨q, hqlt, hqx⟩ := exists_rat_btwn hxlt
have h1 : c * (q : ℝ) ≤ f x := by
have hm := hmono hqx.le
rwa [hFq q] at hm
have h2 : f x < c * (q : ℝ) := by
have := (div_lt_iff₀ hcpos).mp hqlt
linarith [mul_comm (q : ℝ) c]
linarith
THEOREM ledgerLinearResponse_from_primitiveLedgerPosting · IndisputableMonolith/Foundation/LedgerToFactorization.lean
/-- Primitive ledger posting plus continuity forces completed real
ledger-linear response. -/
theorem ledgerLinearResponse_from_primitiveLedgerPosting
(P : ℝ → ℝ → ℝ) (h : PrimitiveLedgerPostingSemantics P)
(hcont : ∀ u, Continuous fun v => P u v) :
LedgerLinearResponse P :=
ledgerLinearResponse_from_free_ledger P
(freeLedgerCombinerSemantics_from_primitiveLedgerPosting P h hcont)
What this page does not claim
The module does not prove that the RCL combiner is unique without any regularity condition. The module does not establish the physical bridge from recognition to linking. The module does not derive the cost function J(x); that is a separate result.
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/LedgerToFactorization.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 exactly is the RCL combiner as a polynomial in its two inputs?
- Which regularity conditions are minimal for the forcing result to hold?
- How does the d'Alembert factorization gate use the rightAffine field?
- What is the physical recognition-to-linking bridge that remains open?
MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND
THEOREM primitiveLedgerPosting_forces_rcl · primitiveLedgerPosting_monotone_forces_rcl · primitiveLedgerPosting_nonneg_forces_rcl · IndisputableMonolith/Foundation/LedgerToFactorization.lean
/-- Primitive ledger posting plus continuity forces the canonical RCL combiner. -/ theorem primitiveLedgerPosting_forces_rcl (P : ℝ → ℝ → ℝ) (h : PrimitiveLedgerPostingSemantics P) (hcont : ∀ u, Continuous fun v => P u v) : ∀ u v, P u v = rclCombiner u v := ledgerLinearResponse_forces_rcl P (ledgerLinearResponse_from_primitiveLedgerPosting P h hcont)/-- Primitive ledger posting plus monotone response forces the canonical RCL combiner. No continuity or completeness is used: only additivity from the free ledger and order regularity. -/ theorem primitiveLedgerPosting_monotone_forces_rcl (P : ℝ → ℝ → ℝ) (h : PrimitiveLedgerPostingSemantics P) (hmono : ∀ u, Monotone fun v => P u v) : ∀ u v, P u v = rclCombiner u v := ledgerLinearResponse_forces_rcl P (ledgerLinearResponse_from_primitiveLedgerPosting_monotone P h hmono)/-- Primitive ledger posting plus **ledger-native cost non-negativity** forces the canonical RCL combiner. This is the fully ledger-internal route to right-affineness: additivity comes from `ledgerCost_add`, and the only order input is that posting non-negative defect mass never lowers cost, which is the order shadow of `ledgerCost_nonneg`. -/ theorem primitiveLedgerPosting_nonneg_forces_rcl (P : ℝ → ℝ → ℝ) (h : PrimitiveLedgerPostingSemantics P) (hnn : ∀ u v, 0 ≤ v → P u 0 ≤ P u v) : ∀ u v, P u v = rclCombiner u v := ledgerLinearResponse_forces_rcl P (ledgerLinearResponse_from_primitiveLedgerPosting_nonneg P h hnn)A primitive posting rule plus one mild regularity condition forces the combiner to be the RCL combiner. primitiveLedgerPosting_forces_rcl · primitiveLedgerPosting_monotone_forces_rcl · primitiveLedgerPosting_nonneg_forces_rcl · IndisputableMonolith/Foundation/LedgerToFactorization.leanTHEOREM ledgerLinearResponse_forces_rcl · IndisputableMonolith/Foundation/LedgerToFactorization.lean
/-- Ledger-linear response forces the RCL polynomial through the existing gate theorem. -/ theorem ledgerLinearResponse_forces_rcl (P : ℝ → ℝ → ℝ) (h : LedgerLinearResponse P) : ∀ u v, P u v = rclCombiner u v := by intro u v rw [gate_forces_rcl P (factorizationGate_of_ledgerLinearResponse P h) u v] rflA ledger-linear response in the second argument forces the combiner to equal the RCL combiner. ledgerLinearResponse_forces_rcl · IndisputableMonolith/Foundation/LedgerToFactorization.leanTHEOREM monotone_additive_isLinear · IndisputableMonolith/Foundation/LedgerToFactorization.lean
/-- Monotone additive real responses are linear. This is the order-regularity replacement for the continuity gate in the additive Cauchy step. -/ theorem monotone_additive_isLinear {f : ℝ → ℝ} (hadd : ∀ x y, f (x + y) = f x + f y) (hmono : Monotone f) : ∀ x, f x = f 1 * x := by have hf0 : f 0 = 0 := by have h := hadd 0 0 rw [add_zero] at h linarith let F : ℝ →+ ℝ := AddMonoidHom.mk' f (fun a b => hadd a b) have hFcoe : ∀ y, F y = f y := fun _ => rfl have hFq : ∀ q : ℚ, f (q : ℝ) = f 1 * (q : ℝ) := by intro q have h := map_ratCast_smul F ℝ ℝ q (1 : ℝ) simp only [smul_eq_mul, mul_one, hFcoe] at h rw [h] ring intro x set c := f 1 with hc_def have hc : 0 ≤ c := by have hmle : f 0 ≤ f 1 := hmono (by norm_num) rw [hf0] at hmle exact hmle rcases eq_or_lt_of_le hc with hc0 | hcpos · have hub : f x ≤ 0 := by obtain ⟨r, hxr, -⟩ := exists_rat_btwn (lt_add_one x) have hmr := hmono hxr.le rw [hFq r, ← hc0, zero_mul] at hmr exact hmr have hlb : 0 ≤ f x := by obtain ⟨q, -, hqx⟩ := exists_rat_btwn (sub_one_lt x) have hmq := hmono hqx.le rw [hFq q, ← hc0, zero_mul] at hmq exact hmq rw [← hc0, zero_mul] linarith · refine le_antisymm ?_ ?_ · by_contra hcon push_neg at hcon have hxlt : x < f x / c := by rw [lt_div_iff₀ hcpos] linarith [mul_comm c x] obtain ⟨r, hxr, hrlt⟩ := exists_rat_btwn hxlt have h1 : f x ≤ c * (r : ℝ) := by have hm := hmono hxr.le rwa [hFq r] at hm have h2 : c * (r : ℝ) < f x := by have := (lt_div_iff₀ hcpos).mp hrlt linarith [mul_comm (r : ℝ) c] linarith · by_contra hcon push_neg at hcon have hxlt : f x / c < x := by rw [div_lt_iff₀ hcpos] linarith [mul_comm c x] obtain ⟨q, hqlt, hqx⟩ := exists_rat_btwn hxlt have h1 : c * (q : ℝ) ≤ f x := by have hm := hmono hqx.le rwa [hFq q] at hm have h2 : f x < c * (q : ℝ) := by have := (div_lt_iff₀ hcpos).mp hqlt linarith [mul_comm (q : ℝ) c] linarithA monotone additive real response is linear. monotone_additive_isLinear · IndisputableMonolith/Foundation/LedgerToFactorization.leanTHEOREM ledgerLinearResponse_from_primitiveLedgerPosting · IndisputableMonolith/Foundation/LedgerToFactorization.lean
/-- Primitive ledger posting plus continuity forces completed real ledger-linear response. -/ theorem ledgerLinearResponse_from_primitiveLedgerPosting (P : ℝ → ℝ → ℝ) (h : PrimitiveLedgerPostingSemantics P) (hcont : ∀ u, Continuous fun v => P u v) : LedgerLinearResponse P := ledgerLinearResponse_from_free_ledger P (freeLedgerCombinerSemantics_from_primitiveLedgerPosting P h hcont)A primitive posting rule plus continuity forces a ledger-linear response. ledgerLinearResponse_from_primitiveLedgerPosting · IndisputableMonolith/Foundation/LedgerToFactorization.lean