Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

A selected-index challenge reuses exactly one matching tag

Proved
PvsNP.late_query_distinct_tag_count

by Jie Luo · Nov 28, 2026 · Mathlib 0df444a (Lean v4.33.1)

combinatoricscomplexity-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 sorry
Source
Block-counting step of a late INDEX embedding into small-slack Gap-MCSP.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me