Encyclopedia Cost Cost Ndim Core Dot Log Hadamard Inv
ARTICLE 3 claims 3 theorems
Cost Ndim Core Dot Log Hadamard Inv
A single vector identity that turns the cost of an inverse into a sign flip, and why that matters for reciprocity.
Componentwise inversion
The declaration dot_log_hadamardInv is a small piece of the framework's ledger, a discrete record of recognition events. It states a precise algebraic fact about how the framework's cost function behaves when you replace each component of a vector by its reciprocal. In plain terms: the weighted log-sum of the componentwise inverse is exactly the negative of the weighted log-sum of the original vector. The weights stay fixed; only the sign of the aggregate flips.
This identity is not a physical law by itself. It is a definitional consequence of how the framework builds its multi-component cost. The cost function JcostN takes a vector of positive real numbers, applies a componentwise logarithm, takes a weighted dot product, and feeds the result into the scalar cost Jcost. The theorem dot_log_hadamardInv is the step that shows why the whole construction is invariant under componentwise inversion: because the log-sum changes sign, and the scalar cost depends on the log-sum through a hyperbolic cosine, the cost of the inverse equals the cost of the original. The framework's library proves this as a theorem, not as an assumption.
What the declaration does not claim is just as important. It does not say that the cost function is symmetric under any other transformation, such as scaling or permutation of components. It does not assert that the identity holds when the vector components are not all positive, because the logarithm is undefined there. It does not claim that the weighted dot product itself is invariant; only the final cost is. And it does not derive the scalar cost Jcost from this identity; that uniqueness theorem lives elsewhere in the framework's library. This declaration is a supporting lemma, not the main result.
THEOREM dot_log_hadamardInv · IndisputableMonolith/Cost/Ndim/Core.lean
/-- Log-aggregate of a componentwise inverse. -/
theorem dot_log_hadamardInv {n : ℕ} (α x : Vec n) :
dot α (logVec (hadamardInv x)) = - dot α (logVec x) := by
unfold dot logVec hadamardInv
calc
∑ i : Fin n, α i * Real.log ((x i)⁻¹)
= ∑ i : Fin n, α i * (-Real.log (x i)) := by
refine Finset.sum_congr rfl ?_
intro i hi
rw [Real.log_inv]
_ = ∑ i : Fin n, -(α i * Real.log (x i)) := by
refine Finset.sum_congr rfl ?_
intro i hi
ring
_ = - (∑ i : Fin n, α i * Real.log (x i)) := by
simp
THEOREM JcostN_reciprocal · IndisputableMonolith/Cost/Ndim/Core.lean
/-- Reciprocity under componentwise inversion. -/
theorem JcostN_reciprocal {n : ℕ} (α x : Vec n) :
JcostN α (hadamardInv x) = JcostN α x := by
rw [JcostN_eq_cosh_logsum, JcostN_eq_cosh_logsum]
rw [dot_log_hadamardInv, Real.cosh_neg]
THEOREM dot_log_hadamardInv · IndisputableMonolith/Cost/Ndim/Core.lean
/-- Log-aggregate of a componentwise inverse. -/
theorem dot_log_hadamardInv {n : ℕ} (α x : Vec n) :
dot α (logVec (hadamardInv x)) = - dot α (logVec x) := by
unfold dot logVec hadamardInv
calc
∑ i : Fin n, α i * Real.log ((x i)⁻¹)
= ∑ i : Fin n, α i * (-Real.log (x i)) := by
refine Finset.sum_congr rfl ?_
intro i hi
rw [Real.log_inv]
_ = ∑ i : Fin n, -(α i * Real.log (x i)) := by
refine Finset.sum_congr rfl ?_
intro i hi
ring
_ = - (∑ i : Fin n, α i * Real.log (x i)) := by
simp
What this page does not claim
The declaration does not prove symmetry under scaling or permutation of components. The declaration does not derive the scalar cost function Jcost. The declaration does not apply to vectors with non-positive components.
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/Cost/Ndim/Core.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:
- How does the scalar cost Jcost itself get its uniqueness theorem?
- What other transformations preserve the multi-component cost function?
- How does this componentwise reciprocity generalize to the full forcing chain?
- What happens to the cost when vector components are allowed to be zero or negative?
MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND
THEOREM dot_log_hadamardInv · IndisputableMonolith/Cost/Ndim/Core.lean
/-- Log-aggregate of a componentwise inverse. -/ theorem dot_log_hadamardInv {n : ℕ} (α x : Vec n) : dot α (logVec (hadamardInv x)) = - dot α (logVec x) := by unfold dot logVec hadamardInv calc ∑ i : Fin n, α i * Real.log ((x i)⁻¹) = ∑ i : Fin n, α i * (-Real.log (x i)) := by refine Finset.sum_congr rfl ?_ intro i hi rw [Real.log_inv] _ = ∑ i : Fin n, -(α i * Real.log (x i)) := by refine Finset.sum_congr rfl ?_ intro i hi ring _ = - (∑ i : Fin n, α i * Real.log (x i)) := by simpThe weighted log-sum of the componentwise inverse is exactly the negative of the weighted log-sum of the original vector. dot_log_hadamardInv · IndisputableMonolith/Cost/Ndim/Core.leanTHEOREM JcostN_reciprocal · IndisputableMonolith/Cost/Ndim/Core.lean
/-- Reciprocity under componentwise inversion. -/ theorem JcostN_reciprocal {n : ℕ} (α x : Vec n) : JcostN α (hadamardInv x) = JcostN α x := by rw [JcostN_eq_cosh_logsum, JcostN_eq_cosh_logsum] rw [dot_log_hadamardInv, Real.cosh_neg]The cost of the inverse equals the cost of the original. JcostN_reciprocal · IndisputableMonolith/Cost/Ndim/Core.leanTHEOREM dot_log_hadamardInv · IndisputableMonolith/Cost/Ndim/Core.lean
/-- Log-aggregate of a componentwise inverse. -/ theorem dot_log_hadamardInv {n : ℕ} (α x : Vec n) : dot α (logVec (hadamardInv x)) = - dot α (logVec x) := by unfold dot logVec hadamardInv calc ∑ i : Fin n, α i * Real.log ((x i)⁻¹) = ∑ i : Fin n, α i * (-Real.log (x i)) := by refine Finset.sum_congr rfl ?_ intro i hi rw [Real.log_inv] _ = ∑ i : Fin n, -(α i * Real.log (x i)) := by refine Finset.sum_congr rfl ?_ intro i hi ring _ = - (∑ i : Fin n, α i * Real.log (x i)) := by simpThe identity holds only when the vector components are all positive. dot_log_hadamardInv · IndisputableMonolith/Cost/Ndim/Core.lean