Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Probability that a uniform perfect matching contains prescribed disjoint pairs

Proved
QuantumBipartiteTesting.Bipartiteness.uniform_matching_contains

by Shuze Chen · Nov 18, 2026 · Mathlib 0df444a (Lean v4.33.1)

finite-probabilityperfect-matchingquantum-query-complexity

Let NNN be even and let EEE be a set of pairwise vertex-disjoint, nonloop unordered pairs from an NNN-element set. For a uniformly chosen perfect matching σ\sigmaσ, the probability that all prescribed pairs occur is

Pr⁡[E⊆σ]=∏a=0∣E∣−11N−2a−1.\Pr[E\subseteq\sigma]=\prod_{a=0}^{|E|-1}\frac{1}{N-2a-1}.Pr[E⊆σ]=a=0∏∣E∣−1​N−2a−11​.

The empty product is one, including the empty matching on zero vertices. This finite counting formula gives the matching probabilities within each hidden block of the graph sampling construction.

Formalization Note Perfect matchings use the existing fixed-point-free involution type DerandSq.PM; probabilities are normalized finite sums.

Preamble
import Definitions.Def_DerandSq_PM
import Definitions.Def_QuantumBipartiteTesting_Bipartiteness_Reduction
open QuantumBipartiteTesting.Bipartiteness Finset
open scoped BigOperators Classical
Formal statement
theorem QuantumBipartiteTesting.Bipartiteness.uniform_matching_contains (N : ℕ) (hN : Even N) (E : Finset (Sym2 (Fin N)))
    (hloop : ∀ p ∈ E, ¬ p.IsDiag)
    (hdisj : ∀ p ∈ E, ∀ q ∈ E, (∃ x, x ∈ p ∧ x ∈ q) → p = q) :
    Average univ (fun σ : DerandSq.PM N => if ∀ a b, s(a,b) ∈ E → σ.val a = b then (1:ℝ) else 0) =
      ∏ a ∈ range E.card, ((N:ℝ)-2*a-1)⁻¹ := by sorry
Source
Kayal–Sen–Szabó, https://github.com/sigact-stoc/stoc2027/releases/download/papers-1/878.pdf, Appendix A.2, printed p.30, definition and probabilistic interpretation of R_d immediately before (A.2). Counting proof adapted from accepted public Prove2Me submission 27ec2b7d-adb9-48ae-aa0c-5fe28fdd5865 (BordenaveCollins.tendsto_expFix), Part C: perfect matchings containing a partial matching, Apache 2.0.

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