Encyclopedia Cost Cost Ndim Symmetry Coeff Perm Invariant Of Uniform

ARTICLE 2 claims 2 theorems

Cost Ndim Symmetry Coeff Perm Invariant Of Uniform

A theorem about when the weights in a multidimensional cost function ignore the ordering of its inputs, and why the reverse direction needs a careful caveat.

Permutation symmetry of weights

In mathematics, a function of several variables often has symmetry properties: its value stays the same when you swap or reorder its inputs. For a cost function that assigns a penalty to a vector of numbers, one natural symmetry is permutation invariance: the cost treats all positions in the vector identically, so reordering the entries leaves the cost unchanged. The Recognition Science library formalizes this idea for a vector of n coefficients, where each coefficient weights one dimension of the input.

The framework's ledger, a discrete record of recognition events, assigns such coefficients when combining costs across dimensions. A key question is when these coefficients are symmetric under permutation. The library defines a predicate UniformWeights for coefficients that are all equal to a single value, and a predicate CoeffPermutationInvariant for coefficients that are unchanged by any permutation of the indices. The theorem coeff_perm_invariant_of_uniform proves that if the weights are uniform, meaning all equal, then they are permutation invariant. This direction is immediate: if every coefficient is the same number, then swapping any two indices leaves the value untouched.

The library also proves the converse, uniform_of_coeff_perm_invariant, but only under the condition that the dimension n is positive. If the coefficients are permutation invariant and there is at least one index, then they must all equal the value at the first index, so they are uniform. The proof uses a swap permutation that exchanges the first index with any other index, and the invariance assumption forces the two coefficients to match. The positivity condition matters because a vector of length zero has no indices to compare, so permutation invariance holds vacuously without implying uniformity.

In Recognition Science, this equivalence matters because it connects a structural symmetry of the cost function to a concrete algebraic form. The framework models the cost of recognition as forced by five plain conditions, and this theorem is a small piece of the larger architecture: it shows that when a cost function treats all dimensions equally, its coefficients collapse to a single number. The practical payoff is that any permutation-invariant cost in the framework can be written with one scalar weight, which simplifies analysis of symmetric problems.

The theorem does not claim that every cost function is permutation invariant, nor that symmetry alone determines the numerical value of the uniform weight. It only establishes the logical bridge between two definitions. A reader should not conclude that the framework's costs always have this symmetry; that would be a separate assumption. The result is a conditional statement: if the weights are uniform, then they are permutation invariant, and conversely under a positivity condition.

THEOREM coeff_perm_invariant_of_uniform · IndisputableMonolith/Cost/Ndim/Symmetry.lean
coeff_perm_invariant_of_uniform · IndisputableMonolith/Cost/Ndim/Symmetry.lean:15
theorem coeff_perm_invariant_of_uniform {n : ℕ} {α : Vec n}
    (hU : UniformWeights α) :
    CoeffPermutationInvariant α := by
  rcases hU with ⟨a, ha⟩
  intro σ i
  simp [ha]
THEOREM uniform_of_coeff_perm_invariant · IndisputableMonolith/Cost/Ndim/Symmetry.lean
uniform_of_coeff_perm_invariant · IndisputableMonolith/Cost/Ndim/Symmetry.lean:22
theorem uniform_of_coeff_perm_invariant {n : ℕ} (hn : 0 < n) {α : Vec n}
    (hperm : CoeffPermutationInvariant α) :
    UniformWeights α := by
  let i0 : Fin n := ⟨0, hn⟩
  refine ⟨α i0, ?_⟩
  intro i
  have h := hperm (Equiv.swap i0 i) i0
  simpa using h

What this page does not claim

Not every cost function in the framework is permutation invariant. The theorem does not determine the numerical value of the uniform weight. The converse direction requires n to be positive; it fails for the empty vector.

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/Symmetry.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