theorem
proved
RCL_holds
show as:
view math explainer →
open explainer
Generate a durable explainer page for this declaration.
open lean source
IndisputableMonolith.Algebra.CostAlgebra on GitHub at line 98.
browse module
All declarations in this module, on Recognition.
explainer page
depends on
used by
formal source
95
96/-- **THEOREM: J satisfies the RCL.**
97 This is the foundational identity — everything else follows. -/
98theorem RCL_holds : SatisfiesRCL J := by
99 intro x y hx hy
100 unfold J Jcost
101 have hx0 : x ≠ 0 := ne_of_gt hx
102 have hy0 : y ≠ 0 := ne_of_gt hy
103 have hxy0 : x * y ≠ 0 := mul_ne_zero hx0 hy0
104 have hxy_div0 : x / y ≠ 0 := div_ne_zero hx0 hy0
105 field_simp [hx0, hy0, hxy0, hxy_div0]
106 ring
107
108/-! ## §3. Cost Composition as Algebraic Operation -/
109
110/-- **Cost-composition**: The binary operation on costs induced by the RCL.
111 Given two "cost levels" a = J(x) and b = J(y), the composed cost is:
112 a ★ b = 2ab + 2a + 2b = 2(a+1)(b+1) − 2
113
114 This captures how costs combine under multiplication of ratios. -/
115noncomputable def costCompose (a b : ℝ) : ℝ := 2 * a * b + 2 * a + 2 * b
116
117/-- Notation for cost composition -/
118infixl:70 " ★ " => costCompose
119
120/-- **THEOREM: Cost composition is commutative.** -/
121theorem costCompose_comm (a b : ℝ) : a ★ b = b ★ a := by
122 unfold costCompose; ring
123
124/-- **THEOREM: Associator defect for raw RCL composition.**
125 The unnormalized RCL form is not strictly associative; the defect is `2*(a-c)`. -/
126theorem costCompose_assoc_defect (a b c : ℝ) :
127 (a ★ b) ★ c = a ★ (b ★ c) + 2 * (a - c) := by
128 unfold costCompose