Mathematics / Original Research / Combinatorics
The Aharoni–Berger Rainbow Matching Conjecture for n ≤ 6: Exact Thresholds, Obstruction Classifications, and a Deterministic Global Bound in Lean 4
Lean 4 proof of the Aharoni–Berger conjecture for all n ≤ 6 in arbitrary bipartite multigraphs and in simple graphs, with the exact values f(4) = 5, f(5) = 6, f(6) = 7 (no earlier proof located), complete obstruction classifications at small orders, and machine-checked proofs of Drisko's theorem and the Barát–Gyárfás–Sárközy bound.
- Author
- Ali Uyar
- Scope
- Machine-checked in Lean 4
- Status
- Standalone result
- Original theorem
- For 2 ≤ n ≤ 6, every family of n matchings of size n + 1 in a bipartite multigraph has a full rainbow matching (Lean: AharoniBerger.Solution.ab_n2 … ab_n6 : Target_AB_n2 … Target_AB_n6), and size n can fail (ab_size_sharp).
Machine-checked in Lean 4 ✓
Abstract
The Aharoni–Berger conjecture (2009), which generalizes the Brualdi–Stein conjecture on partial transversals of Latin squares, asserts that every bipartite multigraph formed as the union of n matchings of size n + 1 contains a rainbow matching of size n. It is open in general. For n = 4, 5, 6 the uniform finite bound of Kotlar and Ziv gives matching sizes 6, 8 and 10.
We prove the conjecture for every n ≤ 6 in Lean 4.34.0 (standard library only): f(n) = n + 1 for 2 ≤ n ≤ 6 in unrestricted bipartite multigraphs, where parallel edges of distinct colours and arbitrary finite vertex sets are allowed. For simple graphs we prove f_simp(n) = n + 1 for n ∈ {2, 4, 5, 6} and f_simp(3) = 3, with lower-bound witnesses. We classify all rainbow-free (2,2), (3,3,3) and (4,4,4,5) families, and check in Lean that each of 43 listed multigraph (5,5,5,5,6) representatives is an obstruction (the list itself comes from a computer enumeration outside Lean). The case n = 6 is closed by common 7 × 7 board decision trees and a reflective bitmask cover-tree verifier (24,080 simple nodes; 238,710 unrestricted multigraph nodes across 35 off-board profiles); the certificates come from an untrusted C++ search and are replayed in the Lean kernel. The development also formalizes known results: Drisko's theorem with sharpness, the Barát–Gyárfás–Sárközy rectangular bound, and a deterministic fourth-moment re-derivation of f(n) ≤ n + ⌊n/q⌋ for every fixed q ≥ 1 and n ≥ N(q). No earlier proof of the exact values for n = 4, 5, 6 was located; priority is not established.
Context
The general finite bounds (⌊5n/3⌋ by Kotlar–Ziv, ⌈3n/2⌉ + 1 by Aharoni–Kotlar–Ziv) do not reach the conjectured values f(4) = 5, f(5) = 6, f(6) = 7, and asymptotic results such as n + O(n^{3/4}) say nothing at small n. This work reaches those values exactly, in the full multigraph setting where the conjecture is tight, and the obstruction classifications show what rainbow-free families just below the threshold look like. The global bound adds no new asymptotics; it shows that reserve-sampling arguments can be machine-checked without measure theory.
Credits
Conjecture: R. Aharoni and E. Berger (2009). Drisko's theorem: A. A. Drisko (1998), bipartite form by Aharoni–Berger (2009). Rectangular bound: Barát, Gyárfás and Sárközy (2017). Reserve-sampling principle: Munhá Correia, Pokrovskiy and Sudakov (2023). The n = 3 case can be deduced from Aharoni–Haxell (2000) and Stein's rectangle theorem. The Lean proofs of these known results are formalizations. No third-party Lean code was adapted. The Lean development, certificate generators and searches were produced with AI coding agents operated by the author; the agent and model were not recorded.
Cite
@misc{uyar2026_aharoni_berger_rainbow,
author = {Uyar, Ali},
title = {The Aharoni–Berger Rainbow Matching Conjecture for n ≤ 6: Exact Thresholds, Obstruction Classifications, and a Deterministic Global Bound in Lean 4},
year = {2026},
publisher = {Zenodo},
doi = {10.5281/zenodo.24765080},
url = {https://doi.org/10.5281/zenodo.24765080},
note = {Machine-checked in Lean 4. Code: https://github.com/aliuyar1234/verified-combinatorics/tree/main/43-aharoni-berger-rainbow}
}