One separated prefix has at most the average number of nearby candidates
ProvedPvsNP.packed_prefix_has_small_neighborhoodcomplexity-theoryformal-verification
Let a nonempty finite set of Boolean prefixes have pairwise Hamming distance greater than twice a given radius. In any finite candidate family with a prefix associated to each candidate, some member of the separated set has at most the total number of candidates divided by the number of separated prefixes within its radius.
Preamble
import Mathlib.InformationTheory.Hamming import Mathlib.Algebra.Order.BigOperators.Group.Finset import Lean.Elab.Tactic.Omega set_option autoImplicit false
Formal statement
theorem PvsNP.packed_prefix_has_small_neighborhood {Position Candidate : Type}
[Fintype Position] [DecidableEq Position]
(prefixes : Finset (Position → Bool)) (candidates : Finset Candidate)
(view : Candidate → Position → Bool) (radius : ℕ)
(nonempty : prefixes.Nonempty)
(separated : ∀ a ∈ prefixes, ∀ b ∈ prefixes, a ≠ b → 2 * radius < hammingDist a b) :
∃ a ∈ prefixes, prefixes.card *
(candidates.filter fun c => hammingDist a (view c) ≤ radius).card ≤ candidates.card := by sorrySource
Counting candidates near a packing of feasible prefixes in the one-way truth-table model.