pith. machine review for the scientific record. sign in
theorem

costCompose_zero_left

proved
show as:
view math explainer →
module
IndisputableMonolith.Algebra.CostAlgebra
domain
Algebra
line
136 · github
papers citing
none yet

open explainer

Read the cached plain-language explainer.

open lean source

IndisputableMonolith.Algebra.CostAlgebra on GitHub at line 136.

browse module

All declarations in this module, on Recognition.

explainer page

A cached Ask Recognition explainer exists for this declaration.

open explainer

depends on

used by

formal source

 133  simpa using (costCompose_assoc_defect a b a)
 134
 135/-- **THEOREM: Left-zero evaluation for raw RCL composition.** -/
 136theorem costCompose_zero_left (a : ℝ) : (0 : ℝ) ★ a = 2 * a := by
 137  unfold costCompose
 138  ring_nf
 139
 140theorem costCompose_zero_right (a : ℝ) : a ★ (0 : ℝ) = 2 * a := by
 141  unfold costCompose
 142  ring_nf
 143
 144/-- **THEOREM: Cost composition preserves non-negativity.**
 145    If a ≥ 0 and b ≥ 0, then a ★ b ≥ 0. -/
 146theorem costCompose_nonneg (a b : ℝ) (ha : 0 ≤ a) (hb : 0 ≤ b) : 0 ≤ a ★ b := by
 147  unfold costCompose
 148  have h1 : 0 ≤ 2 * a * b := by positivity
 149  have h2 : 0 ≤ 2 * a := by linarith
 150  have h3 : 0 ≤ 2 * b := by linarith
 151  linarith
 152
 153/-- **The factored form**: a ★ b = 2(a+1)(b+1) − 2.
 154    This reveals the monoid structure: if we set A = a+1, B = b+1,
 155    then A ★' B = 2AB − 2, and (A ★' B) + 1 = 2AB − 1. -/
 156theorem costCompose_factored (a b : ℝ) :
 157    a ★ b = 2 * (a + 1) * (b + 1) - 2 := by
 158  unfold costCompose; ring
 159
 160/-- The nonnegative `★`-magma has no identity element. -/
 161theorem costCompose_no_identity :
 162    ¬ ∃ e : ℝ, 0 ≤ e ∧ ∀ a : ℝ, 0 ≤ a → e ★ a = a := by
 163  intro h
 164  rcases h with ⟨e, he_nonneg, he⟩
 165  have h0 : e ★ 0 = 0 := he 0 le_rfl
 166  rw [costCompose_zero_right] at h0