Labelled samples force distinct same-label pairs
ProvedPvsNP.square_card_le_labels_mul_off_diagonal_add_cardcombinatoricscomplexity-theoryformal-verification
For a finite sample labelled in a finite set, its squared cardinality is at most the number of labels times the sum of its size and the number of distinct ordered pairs with matching labels.
Preamble
import Mathlib
Formal statement
theorem PvsNP.square_card_le_labels_mul_off_diagonal_add_card {Item Label : Type*}
[DecidableEq Item] [DecidableEq Label] [Fintype Label]
(sample : Finset Item) (label : Item → Label) :
sample.card ^ 2 ≤ Fintype.card Label *
(sample.card + ((sample ×ˢ sample).filter
(fun p => p.1 ≠ p.2 ∧ label p.1 = label p.2)).card) := by sorrySource
Adaptive sparse rejection and iterated replay with bounded schedule variability.