AFTD Auto-Formalizing Theoretical Domains

matching_vertices_card_at_most_twice_edges

theoremverified

The vertices of a matching with k edges fit in a set of at most 2k vertices.

Statement

theorem matching_vertices_card_at_most_twice_edges {V : Type*} [Fintype V] {k : ℕ}
    {H : SimpleGraph V} (M : H.Subgraph) (hM : M.IsMatching) (hMk : M.edgeSet.ncard = k) :
    ∃ S : Finset V, (∀ x, x ∈ M.verts → x ∈ S) ∧ S.card ≤ 2*k
Source
The matching-cardinality proof used in the proved complement-matching theorem.
Verified
20 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
Used by 2

Lean source view module on GitHub

theorem matching_vertices_card_at_most_twice_edges {V : Type*} [Fintype V] {k : ℕ}
    {H : SimpleGraph V} (M : H.Subgraph) (hM : M.IsMatching) (hMk : M.edgeSet.ncard = k) :
    ∃ S : Finset V, (∀ x, x ∈ M.verts → x ∈ S) ∧ S.card ≤ 2*k := by
  classical
  refine ⟨M.verts.toFinset, by simp, ?_⟩
  have h := in1076_matching_twice_card hM
  rw [hMk] at h
  have hc : M.verts.toFinset.card = M.verts.ncard := by
    rw [Set.ncard_eq_toFinset_card M.verts, Set.toFinite_toFinset]
  omega
See it in the graphDiscuss this resultChallenge it