The loss of distinct sample buckets is bounded by colliding pairs
ProvedPvsNP.sorted_bucket_loss_le_pairscomplexity-theoryformal-verification
Assign each index to a bucket. The total number of indices less the number of used buckets is at most the number of pairs of distinct indices in the same bucket counted in increasing order.
Preamble
import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.Finset.Max import Mathlib.Data.Finset.Prod import Lean.Elab.Tactic.Omega set_option autoImplicit false
Formal statement
theorem PvsNP.sorted_bucket_loss_le_pairs {Bucket : Type} [DecidableEq Bucket]
(size : ℕ) (bucket : Fin size → Bucket) :
size - ((Finset.univ : Finset (Fin size)).image bucket).card ≤
((Finset.univ : Finset (Fin size × Fin size)).filter
(fun p => p.1 < p.2 ∧ bucket p.1 = bucket p.2)).card := by sorrySource
Finite support accounting for succinct history updates.