Encyclopedia Cost Cost Ndim Calibration Weight Sum Uniform

ARTICLE 3 claims 3 theorems

Cost Ndim Calibration Weight Sum Uniform

When a set of weights is uniform, its total is just the number of weights times the common value, a simple fact with a precise scope.

Uniform weights and their sum

In linear algebra, a weight is a number assigned to each item in a list, often used to emphasize some items over others. A uniform weight assignment gives every item the same number, say a. The sum of all weights is then the number of items, often written n, multiplied by a. This is the elementary fact that the declaration weightSum_uniform formalizes.

The declaration is a theorem in the framework's machine-checked library of formal theorems. It states: if a vector of real numbers has uniform weights, then its sum equals n times the common weight a. The proof is short: from the uniformity assumption, each entry is a, so summing over n entries gives n copies of a. The theorem does not require n to be positive; it holds even for an empty list, where the sum is zero.

In Recognition Science, this lemma supports calibration relations for cost functions in higher dimensions. A companion theorem shows that if uniform weights sum to one, then each weight is exactly 1/n for positive n. Another shows that if the squared norm of uniform weights equals one, then the square of the common weight is 1/n. These are simple algebraic consequences, not deep physical claims.

What the theorem does not claim is more important than what it proves. It does not assert that weights are uniform; uniformity is a hypothesis, not a conclusion. It does not say anything about the origin or meaning of the weights, only about their sum under a given condition. It also does not derive any cost function or physical constant; it is a stepping stone, not a destination.

For a reader, the practical lesson is that uniform weights behave predictably: the total scales linearly with the count, and normalization forces each weight to the reciprocal of the count. This is the kind of small, exact fact that larger proofs rely on without restating.

THEOREM weightSum_uniform · IndisputableMonolith/Cost/Ndim/Calibration.lean
theorem weightSum_uniform {n : ℕ} {α : Vec n}
    (hU : UniformWeights α) :
    ∃ a : ℝ, weightSum α = (n : ℝ) * a := by
  rcases hU with ⟨a, ha⟩
  refine ⟨a, ?_⟩
  unfold weightSum
  simp [ha, Finset.card_univ]
THEOREM uniform_weight_of_sum_one · IndisputableMonolith/Cost/Ndim/Calibration.lean
uniform_weight_of_sum_one · IndisputableMonolith/Cost/Ndim/Calibration.lean:35
/-- 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 prove that weights are uniform; uniformity is a hypothesis. It does not derive any cost function or physical constant. It says nothing about the meaning or origin of the weights.

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:

MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND