Diagnostic ambiguity bounds total replay multiplicity
ProvedPvsNP.ReplayMultiplicity.sum_profiles_le_of_diagnostic_multiplicitycombinatoricscomplexity-theoryformal-verification
Each anchor has a finite collection of replay profiles. For that anchor, its profiles emit distinct accepted words and preserve the anchor signature. If an accepted word has at most a fixed number of matching anchors, then the total number of anchor-profile pairs is at most that number times the number of accepted words.
Preamble
import Mathlib
Formal statement
theorem PvsNP.ReplayMultiplicity.sum_profiles_le_of_diagnostic_multiplicity
{Anchor Profile Word Signature : Type*} [DecidableEq Word] [DecidableEq Signature]
(anchors : Finset Anchor) (profiles : Anchor → Finset Profile) (accepted : Finset Word)
(replay : Anchor → Profile → Word) (signature : Anchor → Signature)
(readSignature : Word → Signature) (multiplicity : ℕ)
(valid : ∀ a ∈ anchors, ∀ p ∈ profiles a, replay a p ∈ accepted)
(injective : ∀ a ∈ anchors, Set.InjOn (replay a) (profiles a : Set Profile))
(preserved : ∀ a ∈ anchors, ∀ p ∈ profiles a, readSignature (replay a p) = signature a)
(maxFiber : ∀ word ∈ accepted,
(anchors.filter (fun a => signature a = readSignature word)).card ≤ multiplicity) :
(∑ a ∈ anchors, (profiles a).card) ≤ multiplicity * accepted.card := by sorrySource
Replay counting without requiring an injective diagnostic prefix.