Encyclopedia Cost Cost Ndim Calibration Uniform Weight Of Sum One
ARTICLE 2 claims 2 theorems
Cost Ndim Calibration Uniform Weight Of Sum One
When a cost function's weights are all equal and add to one, each weight must be exactly one divided by the number of dimensions.
The uniform weight rule
In the Recognition Science framework, a cost function assigns a number to a recognition event, a discrete record of something happening. The cost often depends on a set of weights, one per dimension of the problem. The framework's machine-checked library of formal theorems contains a small but precise result about what happens when those weights are forced to be equal.
The theorem, called uniform_weight_of_sum_one, states a simple algebraic fact. One can have n dimensions, where n is a positive whole number. Suppose every weight has the same value, and suppose the sum of all weights equals 1. Then the theorem proves that each individual weight must equal 1/n. The proof is a short chain of arithmetic: if all n weights are equal to some number a, their sum is n times a, and setting that equal to 1 gives a = 1/n. The library also proves a companion fact: if the weights are equal and their squared norm equals 1, then the square of each weight is 1/n.
The result is a calibration relation, not a physical law. It does not say that weights in any real system are uniform. It does not derive the number of dimensions, the value of any constant, or the form of the cost function. It only says what must be true of the weights if uniformity and a sum of one are both assumed. In that sense it is a consistency check: a tool the framework can use when a uniform-weight assumption appears, not a claim that the assumption itself holds.
What the theorem changes is practical. When a cost function is built from n equal weights that sum to one, the framework can replace the whole weight vector with the single number 1/n. That substitution simplifies later calculations and makes the structure of the cost visible. The theorem is a small gear in a larger machine, but it is a gear that turns exactly once and turns correctly.
THEOREM uniform_weight_of_sum_one · IndisputableMonolith/Cost/Ndim/Calibration.lean
/-- If weights are uniform and sum to one, each weight is `1/n` (for `n > 0`). -/
theorem uniform_weight_of_sum_one {n : ℕ} {α : Vec n}
(hn : 0 < n) (hU : UniformWeights α) (hsum : weightSum α = 1) :
∃ a : ℝ, (∀ i : Fin n, α i = a) ∧ a = 1 / (n : ℝ) := by
rcases hU with ⟨a, ha⟩
have hna : (n : ℝ) ≠ 0 := by
exact_mod_cast (Nat.ne_of_gt hn)
have hsum' : (n : ℝ) * a = 1 := by
simpa [weightSum, ha, Finset.card_univ] using hsum
have ha_val : a = 1 / (n : ℝ) := by
apply (eq_div_iff hna).2
linarith [hsum']
exact ⟨a, ha, ha_val⟩
THEOREM uniform_sqNorm_one · IndisputableMonolith/Cost/Ndim/Calibration.lean
/-- Under uniform weights, unit squared norm gives `a² = 1/n` (for `n > 0`). -/
theorem uniform_sqNorm_one {n : ℕ} {α : Vec n}
(hn : 0 < n) (hU : UniformWeights α) (hcurv : sqNorm α = 1) :
∃ a : ℝ, (∀ i : Fin n, α i = a) ∧ a ^ 2 = 1 / (n : ℝ) := by
rcases hU with ⟨a, ha⟩
have hna : (n : ℝ) ≠ 0 := by
exact_mod_cast (Nat.ne_of_gt hn)
have hnorm : (n : ℝ) * a ^ 2 = 1 := by
simpa [sqNorm, dot, ha, pow_two, Finset.card_univ] using hcurv
have hsquare : a ^ 2 = 1 / (n : ℝ) := by
apply (eq_div_iff hna).2
linarith [hnorm]
exact ⟨a, ha, hsquare⟩
What this page does not claim
The theorem does not claim that weights in any real system are equal. The theorem does not derive the number of dimensions or the value of any physical constant. The theorem does not determine the form of the cost function itself.
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/Calibration.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 conditions on a cost function force its weights to be uniform in the first place?
- How does the uniform weight rule connect to the framework's derivation of spatial dimensions?
- What is the role of the squared norm in the framework's calibration relations?
MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND
THEOREM uniform_weight_of_sum_one · IndisputableMonolith/Cost/Ndim/Calibration.lean
/-- If weights are uniform and sum to one, each weight is `1/n` (for `n > 0`). -/ theorem uniform_weight_of_sum_one {n : ℕ} {α : Vec n} (hn : 0 < n) (hU : UniformWeights α) (hsum : weightSum α = 1) : ∃ a : ℝ, (∀ i : Fin n, α i = a) ∧ a = 1 / (n : ℝ) := by rcases hU with ⟨a, ha⟩ have hna : (n : ℝ) ≠ 0 := by exact_mod_cast (Nat.ne_of_gt hn) have hsum' : (n : ℝ) * a = 1 := by simpa [weightSum, ha, Finset.card_univ] using hsum have ha_val : a = 1 / (n : ℝ) := by apply (eq_div_iff hna).2 linarith [hsum'] exact ⟨a, ha, ha_val⟩One can have n dimensions, where n is a positive whole number, every weight has the same value, and the sum of all weights equals 1; then each individual weight must equal 1/n. uniform_weight_of_sum_one · IndisputableMonolith/Cost/Ndim/Calibration.leanTHEOREM uniform_sqNorm_one · IndisputableMonolith/Cost/Ndim/Calibration.lean
/-- Under uniform weights, unit squared norm gives `a² = 1/n` (for `n > 0`). -/ theorem uniform_sqNorm_one {n : ℕ} {α : Vec n} (hn : 0 < n) (hU : UniformWeights α) (hcurv : sqNorm α = 1) : ∃ a : ℝ, (∀ i : Fin n, α i = a) ∧ a ^ 2 = 1 / (n : ℝ) := by rcases hU with ⟨a, ha⟩ have hna : (n : ℝ) ≠ 0 := by exact_mod_cast (Nat.ne_of_gt hn) have hnorm : (n : ℝ) * a ^ 2 = 1 := by simpa [sqNorm, dot, ha, pow_two, Finset.card_univ] using hcurv have hsquare : a ^ 2 = 1 / (n : ℝ) := by apply (eq_div_iff hna).2 linarith [hnorm] exact ⟨a, ha, hsquare⟩The library also proves a companion fact: if the weights are equal and their squared norm equals 1, then the square of each weight is 1/n. uniform_sqNorm_one · IndisputableMonolith/Cost/Ndim/Calibration.lean