A finite allocation problem begins with a list of permitted choices. Each recipient may use some resources but not others, and a resource may be assigned at most once. Knowing that every recipient has an available resource is insufficient: several recipients may all depend on the same small pool. A useful theorem must decide whether the compatibility pattern permits all requirements to be met simultaneously.
This mission develops the matching results in the chapter on systems of distinct representatives in D. Yogeshwaran's Discrete Mathematics—Lecture Notes, §6.1. Its endpoint allows different recipients to require different numbers of resources. The classical one-resource problem, the regular-graph case, and the case in which a bounded number of assignments may remain unfilled are retained as separate source-numbered results. The project concerns established theorems, not a new conjecture about the existence of matchings.
A finite simple graph consists of a finite set of vertices and unordered pairs of distinct vertices called edges. A bipartition is a pair of disjoint sets whose union is the vertex set, such that every edge joins a vertex in to a vertex in . The left vertices represent recipients and the right vertices represent resources. An edge records that the resource is permitted for that recipient. These graph conventions follow Definition 1.1 of the notes.
For a vertex , the neighbor set contains the vertices joined to . For a set of vertices, write . A matching is an edge set in which no vertex is used twice. It is complete on if every left vertex is used, and perfect if every vertex is used. A subgraph may retain selected edges of the original graph. Its degree counts the retained neighbors of .
A demand is a natural number attached to each . Unlike a complete ordinary matching, the capstone may assign more than one resource to a recipient. Resources still have capacity one, and a demand may be zero.
The ordinary matching criterion is Theorem 6.2:
The development also includes Exercise 6.3, asserting that a -regular bipartite graph has a perfect matching when . Proposition 6.4 states the quantitative deficit version:
The capstone is the prescribed-degree equivalence of Exercise 6.5:
This statement retains the entire demand function and does not fix a uniform demand, restrict demands to positive values, or replace integral selections by real weights.
The set-theoretic interface is Corollary 6.9. A finite family of arbitrary sets has a system of distinct representatives, meaning an injective choice , exactly when
Only the index family is finite; the sets themselves may be infinite.
The demand criterion characterizes feasibility entirely in terms of the original compatibility graph and the requested multiplicities. Its necessity identifies an obstruction to any assignment, while its sufficiency asserts that no other obstruction exists. The deficit theorem gives a quantitative statement when complete coverage is unavailable. The regular case gives a distinct consequence for graphs described through their degrees, rather than through a separately supplied collection of neighborhood inequalities. These are the respective contents of Exercises 6.3 and 6.5 and Proposition 6.4.
Mathlib already provides finite-family and graph versions of Hall's theorem in its Hall development and graph interface. The source-aligned development therefore reuses established infrastructure. Its additional work consists of connecting exact graph degrees and edge counts to the source statements, retaining the deficit and zero-demand cases, and supplying an arbitrary-set representatives interface. Local proofs of the five theorem statements have been checked in Lean 4.29.0-rc3 with Mathlib 777aaa6.
Independent local choices do not guarantee a matching: different choices can collide at one resource. Replacing distinct selections by nonnegative real allocations would change the conclusion. Counting total demand alone also misses obstructions carried by proper subsets of recipients.
Several representation issues matter even after the mathematics is known. A left-saturating matching need not be perfect. A subgraph's vertex set may omit isolated ambient vertices. Cardinality conventions for infinite sets can turn a superficially plausible formula into a different assertion. Finally, a theorem that assumes all neighborhood inequalities has not established those inequalities merely because a graph is regular. The individual interfaces must distinguish these obligations rather than hide them inside a definition.
The graph results use finite vertex types and native SimpleGraph and Subgraph objects. Both disjointness and coverage of the bipartition are explicit. Local-finiteness instances supply finite neighbor enumerations; they impose no further restriction on finite graphs. The complete-matching predicate combines the native matching condition with inclusion of the prescribed vertex set.
Degrees in the capstone are cardinalities of finite subgraph neighbor sets. The deficit conclusion counts unordered subgraph edges. Natural subtraction is truncated at zero, an equivalent convention for these nonnegative cardinality lower bounds. Empty graphs, empty index families, and zero demands remain admissible. In the representatives theorem, arbitrary sets are measured by extended cardinality; infinity is never replaced by zero.
The reusable outputs are the source-aligned graph statements, the complete-matching interface, the prescribed-degree equivalence, and the arbitrary-set representatives criterion. Equivalent proofs and clearer reusable interfaces are within scope. Placeholder conclusions, extra assumptions that exclude the difficult cases, and fractional substitutes for the integral capstone are not.
namespace YogeshwaranDM
theorem capacitated_hall_iff {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
[G.LocallyFinite] (L R : Set V) (hG : G.IsBipartiteWith L R)
(hcover : L ∪ R = Set.univ) (d : L → ℕ) :
(∃ H : G.Subgraph, (∀ x : L, (H.neighborSet x).ncard = d x) ∧
∀ y ∈ R, (H.neighborSet y).ncard ≤ 1) ↔
∀ S : Finset L, ∑ x ∈ S, d x ≤ (S.biUnion (fun x => G.neighborFinset x)).card := by sorry
end YogeshwaranDM
Exercise 6.5 — Hall's criterion with prescribed left degrees. Let be a finite simple bipartite graph with vertex partition . For every , prescribe a demand , allowing zero. Then
Formalization note. The witness is an actual native subgraph, not a fractional allocation or an assumed matching. A vertex's degree is the cardinality of its neighbor set in that subgraph, with degree zero outside the subgraph's vertex set. All finite cardinalities and all demands are natural numbers.
No open leaves. Every sub-goal is proved or awaiting decomposition.