A selected-index challenge reuses exactly one matching tag
ProvedPvsNP.late_query_distinct_tag_countcombinatoricscomplexity-theory
A finite family contributes one tagged value per index, and a challenge contributes distinct tagged values at a selected index. The union cardinality is the sum of the family and challenge cardinalities, minus one exactly when the selected family value belongs to the challenge.
Preamble
import Mathlib.Data.Finset.Card import Mathlib.Data.Fintype.Card set_option autoImplicit false
Formal statement
theorem PvsNP.late_query_distinct_tag_count {Index Value : Type}
[Fintype Index] [DecidableEq Index] [DecidableEq Value]
(data : Index → Value) (selected : Index) (challenge : Finset Value) :
((Finset.univ.image (fun i => (i, data i))) ∪
(challenge.image (fun v => (selected, v)))).card +
(if data selected ∈ challenge then 1 else 0) =
Fintype.card Index + challenge.card := by sorrySource
Block-counting step of a late INDEX embedding into small-slack Gap-MCSP.