On Representatives of Subsets: Two Partitions into m Classes Have a Common System of Representatives When Any k Classes of One Meet at Least k Classes of the OtherResearch Paper
Motivation
Many assignment questions reduce to one combinatorial question: given finitely many sets, can one choose a different element from each? Workers are matched to jobs they are qualified for, rows of a matrix to columns with nonzero entries. The criterion for when this is possible is Hall's marriage theorem, first stated and proved by P. Hall in a five-page note in 1935 (DOI 10.1112/jlms/s1-10.37.26). It underlies bipartite matching, the integrality of the assignment polytope, the Birkhoff–von Neumann theorem on doubly stochastic matrices, and transversal theory in matroids.
Hall's note was written with a second question in view. In 1916 D. König proved, in the language of bipartite graphs, that if a set of things is divided into classes of things in two ways, then one can choose things that represent every class of both divisions at once ("Über Graphen und ihre Anwendungen", Math. Annalen 77 (1916), 453). Van der Waerden (1927) and Sperner (1927) gave the set-theoretic form and a short proof. Hall's contribution was a criterion for a common system of representatives of two divisions in which the classes need not have equal sizes, obtained from the marriage theorem in two short steps.
Setting
Let be any set, finite or infinite, and let
be a finite system of subsets of . The sets may be infinite and need not be distinct; when one speaks of of the sets, indices are meant, so a repeated set is counted with multiplicity. A complete set of distinct representatives, or C.D.R., of (1) is a choice of pairwise distinct elements of with
The system satisfies Hall's condition when any of the sets contain between them at least elements of , for . The meet of all C.D.R.s, written , is the set of elements of that occur as a representative in every C.D.R. of (1).
A division of into classes is a family of pairwise disjoint sets whose union is . The paper writes and for intersection and union; this mission writes and .
In Lean the system is T : ι → Set α over a finite index type, a C.D.R. is an injective a : ι → α with a i ∈ T i (IsCDR), Hall's condition is HallCondition, and the meet of all C.D.R.s is cdrMeet, all in the namespace HallReps.CDR.
Formalization targets
Goal: Theorem 3 (pp. 29–30)
Let be divided into classes in two ways, , each a division into pairwise disjoint classes. If, for each , any of the classes contain between them elements from at least of the classes , then for some permutation of there are elements
The set and the classes may be infinite, and no class is assumed non-empty.
Milestones
- Lemma (p. 27). If is a C.D.R. of (1) and is the meet of all C.D.R.s, the sets whose representative lies in contain between them exactly the elements of , and there are of them.
- Induction step, p. 28. With (4) the system and the meet of its C.D.R.s: if , then (1) has a C.D.R.
- Induction step, p. 29. If (4) has a C.D.R. and , then some of the sets, including , have union exactly , where .
- Theorem 1 (p. 27). Hall's condition is sufficient for a C.D.R. of (1).
- Theorem 2 (p. 29). If is divided into any number of classes and any of the sets contain between them elements from at least classes, there are lying in pairwise different classes.
A companion item states König's theorem (§1, p. 26), which the paper deduces from Theorem 3 on p. 30.
Significance
Theorem 3 gives a necessary and sufficient criterion for two partitions of a set into classes to admit a common system of representatives. Necessity is immediate, and the paper proves sufficiency. It contains König's theorem, and through it the statement that a regular bipartite multigraph has a perfect matching, as the case of equal class sizes. Hall remarks that R. Rado's generalization of König's theorem (1933) also follows. Theorem 2, the passage from "distinct elements" to "elements of distinct classes", is the form used for transversals of partitions and is the first instance of what later became the theory of common transversals and matroid intersection.
On the formal side, Hall's theorem for finite sets is in Mathlib as Finset.all_card_le_biUnion_card_iff_existsInjective' (in Mathlib/Combinatorics/Hall/Finite.lean), and the platform already has a proved equivalence for arbitrary sets with a finite index type (YogeshwaranDM.sdr_iff, included in this mission as a reference item) as well as finite bipartite-graph forms. For that reason Theorem 1 is a milestone and not the goal. What this mission adds is Hall's own proof structure, namely the meet of all C.D.R.s and the Lemma about it, which has not been formalized; Theorems 2 and 3 for divisions of a possibly infinite set; and König's theorem in its set-partition form. To our knowledge none of these statements has a machine-checked proof on the platform.
Difficulty
Theorem 3 does not follow from Theorem 1 applied to the classes directly. Theorem 1 produces distinct elements, but the conclusion needs elements in distinct classes , and two distinct elements of may lie in the same . The paper's route goes through Theorem 2, which allows any number of classes. That route needs Theorem 1 for systems whose sets can be infinite, because a single may meet infinitely many classes, so the finite-set version of Hall's theorem in Mathlib is not enough on its own. In Hall's own proof of Theorem 1, the work lies in the Lemma. It is an exchange statement about all C.D.R.s at once, whose object is defined by a universal quantifier over C.D.R.s, and it must be established over an arbitrary finite index type with possibly infinite sets.
Formalization scope
- The ground set is a type
α, with no finiteness or decidability assumed. The system (1) isT : ι → Set αwith[Finite ι](orFin (m + 1)in the two induction steps, where the paper's is the Leanm + 1, its last set isT (Fin.last m), and (4) isfun i : Fin m => T i.castSucc). - Cardinalities of unions of the are
Set.encardinℕ∞, so an infinite union counts as infinite.Set.ncardis used only for subsets ofFin m, for the finite set (with its finiteness stated), and in König's theorem. - " of the sets" is a
Finset ιof indices, so repeated sets count with multiplicity. - Divisions into classes are class maps:
cls : α → κin Theorem 2, withκarbitrary, andp q : α → Fin min Theorem 3 and König's theorem. A class map makes the classes cover and be pairwise disjoint by construction. Empty classes are allowed. - In Theorem 3 the permutation is existential and chosen together with the representatives. is
p (a i) = i ∧ q (a i) = σ i. - Added or dropped hypotheses: the Lemma assumes a C.D.R. exists, as the page does (without one,
cdrMeetis all ofα). The first induction step omits the page's C.D.R. of (4), because its hypothesis already implies one. König's theorem adds , which the page presumes and without which the statement is false. - The trivializing formalizations are ruled out. Typing the as
Finset αwould reduce Theorem 1 to Mathlib and lose the page's "It is not necessary that the sets shall be finite". Measuring unions byncardwould make Hall's condition fail exactly when a union is infinite. An infinite index type would make Theorem 1 and the Lemma false. None of these is used. - Useful contributions include proofs of the Lemma and of the induction steps, a proof of Theorem 1 either from them or from Mathlib's Hall theorem via a reduction to finite sets, and the reductions Theorem 1 → Theorem 2 → Theorem 3 → König.
Selected references
- P. Hall, On representatives of subsets, J. London Math. Soc. 10 (1935), 26–30. https://doi.org/10.1112/jlms/s1-10.37.26
- D. König, Über Graphen und ihre Anwendungen auf Determinantentheorie und Mengenlehre, Math. Annalen 77 (1916), 453–465. https://doi.org/10.1007/BF01456961
- B. L. van der Waerden, Ein Satz über Klasseneinteilungen von endlichen Mengen, Abh. Math. Sem. Hamburg 5 (1927), 185–188. https://doi.org/10.1007/BF02952519
- R. Rado, Bemerkungen zur Kombinatorik im Anschluss an Untersuchungen von Herrn D. König, Sitzungsber. Berliner Math. Ges. 32 (1933), 60–75.
- Mathlib,
Mathlib/Combinatorics/Hall/Finite.leanandMathlib/Combinatorics/Hall/Basic.lean. https://github.com/leanprover-community/mathlib4