indexed_disjoint_cross_edges_form_matching
Injectively indexed edges with disjoint endpoint ranges form a matching of the expected size.
Statement
theorem indexed_disjoint_cross_edges_form_matching {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (r : ℕ) (f g : Fin r → V) (hf : Function.Injective f) (hg : Function.Injective g) (hdis : ∀ i j, f i ≠ g j) (hadj : ∀ i, G.Adj (f i) (g i)) : ∃ N : G.Subgraph, N.IsMatching ∧ N.edgeSet.ncard = r ∧ N.verts = Set.range f ∪ Set.range g
- Source
- Indexed matching construction for OP-1957; https://arxiv.org/abs/2611.22690.
- Verified
- 26 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- extendible_matchable_two_k_vertices_complement_matchableIn a finite k-extendible graph, the complement of any matchable set of exactly 2k vertices is matchable.
- Used by 16
- maximum_matching_unmatched_independentThe vertices left uncovered by a maximum matching inside a vertex set form an independent set.
- extendible_independent_common_nonneighbor_deficit_le_zeroUnder the stated high-degree extendibility and independence assumptions, a nonempty independent U and a disjoint anticomplete W satisfy…
- extendible_balanced_cut_matching_deficiency_odd_boundIn an order-4k k-extendible graph with the stated 2k-separator and degree bounds, a balanced side containing a matching with deficit r has…
- extendible_balanced_cut_odd_bound_of_even_cross_matchingThe opposite side has at most r odd components if the specified crossing matching meets every odd component in an even number of vertices.
- in1261_seven_target_edge_not_extendibleDeleting the edge from vertex 0 to vertex 14 leaves the explicit seven-by-seven control graph not 7-extendible.
- extendible_balanced_cut_odd_bound_of_parity_cross_matchingFor the stated order-4k extendible graph and balanced-side matching with deficiency r, the opposite side has at most r+1 odd components…
- balanced_cut_separator_implies_min_degreeThe displayed 2k-separator property forces minimum degree at least 2k.
- balanced_cut_extend_internal_matchingThe separator cross-matching extends a balanced-side matching of k−r edges to a k-matching, leaving exactly r vertices on that side…
- extendible_balanced_cut_exposed_barrier_odd_boundIf every vertex of an opposite-side set X can be matched to distinct vertices left uncovered by a balanced-side (k−r)-matching, then the…
- maximum_matching_forbids_two_edge_three_edge_exchangeA maximum matching forbids replacing two matching edges by two edges from distinct uncovered vertices and an edge joining the two…
- high_min_degree_matching_extends_to_sizeA matching with at most k edges extends to size k in a sufficiently large graph of minimum degree at least 2k.
- force_one_cross_edge_extend_perfectIn the displayed extendible graph, a crossing edge from an uncovered vertex to the opposite side can be forced into a perfect matching…
- maximum_matching_forbids_one_edge_two_uncovered_exchangeA maximum matching cannot contain an edge whose two endpoints have distinct uncovered neighbors.
- two_crossing_adjacent_endpoints_impossibleWith the displayed extendibility, degree and balanced-half maximum matching assumptions, two distinct vertices unmatched by a maximum…
- four_groups_with_double_edge_have_five_matchingFour disjoint vertex groups each containing an edge, one containing two disjoint edges, contain a five-edge matching.
- extendible_independent_common_nonneighbor_deficit_le_oneUnder the stated high-degree extendibility and independence assumptions, a nonempty independent U and a disjoint anticomplete W satisfy…
The proof, explained
The proof constructs a matching from the r cross edges connecting f(i) and g(i). Because f and g are injective and have disjoint ranges A and B, composing their inverses yields a bijection between A and B connecting adjacent vertices, which gives a matching subgraph N with vertex set A ∪ B. Since |A| = r, |B| = r, and the sets are disjoint, N has 2r vertices, and since any matching satisfies 2|E(N)| = |V(N)|, the matching consists of exactly r edges.
The image sets A = range(f) and B = range(g) are disjoint.
Any vertex in A has the form f(i) and any vertex in B has the form g(j) for indices i, j ∈ {0, ..., r - 1}. If f(i) = g(j), this contradicts the hypothesis that the images are disjoint, so A and B have no vertices in common.
uses
Set.disjoint_left.mprclassical let A : Set V := Set.range f let B : Set V := Set.range g have hAB : Disjoint A B := by apply Set.disjoint_left.mpr rintro x ⟨i,rfl⟩ ⟨j,hj⟩ exact hdis i j hj.symm
There is a bijection e : A ≃ B pairing each f(i) with g(i).
Because f and g are injective, they restrict to bijections between {0, ..., r - 1} and their ranges A and B. Composing the inverse of the first bijection with the second yields a bijection e from A to B.
uses
Equiv.ofInjectivelet ef : Fin r ≃ A := Equiv.ofInjective f hf let eg : Fin r ≃ B := Equiv.ofInjective g hg let e : A ≃ B := ef.symm.trans eg
Every vertex v ∈ A is adjacent in G to its partner e(v) ∈ B.
For any v ∈ A, writing v = f(i) for the unique index i, its image under e is g(i). The hypothesis that f(i) is adjacent to g(i) for every index i directly implies that v and e(v) are adjacent.
uses
Equiv.apply_ofInjective_symmhave he : ∀ v : A, G.Adj v (e v) := by intro v have hfv : f (ef.symm v) = v.val := Equiv.apply_ofInjective_symm hf v have hgv : (e v).val = g (ef.symm v) := by rfl rw [← hfv,hgv] exact hadj (ef.symm v)
There exists a matching subgraph N of G whose vertex set is A ∪ B.
By applying a general lemma that builds a matching from a bijection between disjoint sets of adjacent vertices, we obtain a subgraph N that is a matching spanning A ∪ B. This provides the desired witness, leaving only its edge count to be verified.
uses
SimpleGraph.Subgraph.IsMatching.exists_of_disjoint_sets_of_equivobtain ⟨N,hverts,hN⟩ := SimpleGraph.Subgraph.IsMatching.exists_of_disjoint_sets_of_equiv hAB e he refine ⟨N,hN,?_,hverts⟩
The matching N has exactly r edges.
In any matching, twice the number of edges equals the number of vertices. Since f and g are injective maps from a set of size r, both A and B have cardinality r. Because A and B are disjoint, the vertex set of N has cardinality r + r = 2r. Linear arithmetic then yields that the number of edges in N is r.
uses
in1076_matching_twice_card,Set.ncard_range_of_injective,Set.ncard_union_eqhave hn := in1076_matching_twice_card hN have hA : A.ncard = r := by simpa [A] using Set.ncard_range_of_injective hf have hB : B.ncard = r := by simpa [B] using Set.ncard_range_of_injective hg rw [hverts, Set.ncard_union_eq hAB, hA, hB] at hn omega
Set.disjoint_left.mpr- Two sets are disjoint if no element of the first belongs to the second.
Equiv.ofInjective- An injective function induces a bijection between its domain and its range.
Equiv.apply_ofInjective_symm- Applying an injective function to the preimage of an element in its range recovers that element.
SimpleGraph.Subgraph.IsMatching.exists_of_disjoint_sets_of_equiv- Given two disjoint vertex sets and a bijection between them pairing adjacent vertices, there exists a matching subgraph whose vertex set is their union.
in1076_matching_twice_card- In any matching subgraph of a finite graph, twice the number of edges equals the number of vertices.
Set.ncard_range_of_injective- The cardinality of the range of an injective map equals the cardinality of its domain.
Set.ncard_union_eq- The cardinality of the union of two disjoint finite sets is the sum of their cardinalities.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
theorem indexed_disjoint_cross_edges_form_matching {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (r : ℕ) (f g : Fin r → V) (hf : Function.Injective f) (hg : Function.Injective g) (hdis : ∀ i j, f i ≠ g j) (hadj : ∀ i, G.Adj (f i) (g i)) : ∃ N : G.Subgraph, N.IsMatching ∧ N.edgeSet.ncard = r ∧ N.verts = Set.range f ∪ Set.range g := by classical let A : Set V := Set.range f let B : Set V := Set.range g have hAB : Disjoint A B := by apply Set.disjoint_left.mpr rintro x ⟨i,rfl⟩ ⟨j,hj⟩ exact hdis i j hj.symm let ef : Fin r ≃ A := Equiv.ofInjective f hf let eg : Fin r ≃ B := Equiv.ofInjective g hg let e : A ≃ B := ef.symm.trans eg have he : ∀ v : A, G.Adj v (e v) := by intro v have hfv : f (ef.symm v) = v.val := Equiv.apply_ofInjective_symm hf v have hgv : (e v).val = g (ef.symm v) := by rfl rw [← hfv,hgv] exact hadj (ef.symm v) obtain ⟨N,hverts,hN⟩ := SimpleGraph.Subgraph.IsMatching.exists_of_disjoint_sets_of_equiv hAB e he refine ⟨N,hN,?_,hverts⟩ have hn := in1076_matching_twice_card hN have hA : A.ncard = r := by simpa [A] using Set.ncard_range_of_injective hf have hB : B.ncard = r := by simpa [B] using Set.ncard_range_of_injective hg rw [hverts, Set.ncard_union_eq hAB, hA, hB] at hn omega