File: Mathlib/Combinatorics/SimpleGraph/Matching.lean

full_name: SimpleGraph.Subgraph.IsMatching
code: /--
The subgraph `M` of `G` is a matching if every vertex of `M` is incident to exactly one edge in `M`.
We say that the vertices in `M.support` are *matched* or *saturated*.
-/
def IsMatching (M : Subgraph G) : Prop 
goal: Prop

full_name: SimpleGraph.Subgraph.IsMatching.toEdge
code: /-- Given a vertex, returns the unique edge of the matching it is incident to. -/
noncomputable def IsMatching.toEdge (h : M.IsMatching) (v : M.verts) : M.edgeSet 
goal: ↑M.edgeSet

full_name: SimpleGraph.Subgraph.IsMatching.toEdge_eq_of_adj
code: theorem IsMatching.toEdge_eq_of_adj (h : M.IsMatching) (hv : v ∈ M.verts) (hvw : M.Adj v w) :
    h.toEdge ⟨v, hv⟩ = ⟨s(v, w), hvw⟩ 
goal: h.toEdge ⟨v, hv⟩ = ⟨s(v, w), hvw⟩

full_name: SimpleGraph.Subgraph.IsMatching.toEdge.surjective
code: theorem IsMatching.toEdge.surjective (h : M.IsMatching) : Surjective h.toEdge 
goal: Function.Surjective h.toEdge

full_name: SimpleGraph.Subgraph.IsMatching.toEdge_eq_toEdge_of_adj
code: theorem IsMatching.toEdge_eq_toEdge_of_adj (h : M.IsMatching)
    (hv : v ∈ M.verts) (hw : w ∈ M.verts) (ha : M.Adj v w) :
    h.toEdge ⟨v, hv⟩ = h.toEdge ⟨w, hw⟩ 
goal: h.toEdge ⟨v, hv⟩ = h.toEdge ⟨w, hw⟩

full_name: SimpleGraph.Subgraph.IsMatching.map_ofLE
code: lemma IsMatching.map_ofLE (h : M.IsMatching) (hGG' : G ≤ G') :
    (M.map (Hom.ofLE hGG')).IsMatching 
goal: (SimpleGraph.Subgraph.map (SimpleGraph.Hom.ofLE hGG') M).IsMatching

full_name: SimpleGraph.Subgraph.IsMatching.sup
code: lemma IsMatching.sup (hM : M.IsMatching) (hM' : M'.IsMatching)
    (hd : Disjoint M.support M'.support) : (M ⊔ M').IsMatching 
goal: (M ⊔ M').IsMatching

full_name: SimpleGraph.Subgraph.IsMatching.iSup
code: lemma IsMatching.iSup {ι : Sort _} {f : ι → Subgraph G} (hM : (i : ι) → (f i).IsMatching)
    (hd : Pairwise fun i j ↦ Disjoint (f i).support (f j).support) :
    (⨆ i, f i).IsMatching 
goal: (⨆ i, f i).IsMatching

full_name: SimpleGraph.Subgraph.IsMatching.subgraphOfAdj
code: lemma IsMatching.subgraphOfAdj (h : G.Adj v w) : (G.subgraphOfAdj h).IsMatching 
goal: (G.subgraphOfAdj h).IsMatching

full_name: SimpleGraph.Subgraph.IsMatching.coeSubgraph
code: lemma IsMatching.coeSubgraph {G' : Subgraph G} {M : Subgraph G'.coe} (hM : M.IsMatching) :
    M.coeSubgraph.IsMatching 
goal: (SimpleGraph.Subgraph.coeSubgraph M).IsMatching

full_name: SimpleGraph.Subgraph.IsPerfectMatching
code: /--
The subgraph `M` of `G` is a perfect matching on `G` if it's a matching and every vertex `G` is
matched.
-/
def IsPerfectMatching (M : G.Subgraph) : Prop 
goal: Prop

full_name: SimpleGraph.Subgraph.IsMatching.support_eq_verts
code: theorem IsMatching.support_eq_verts (h : M.IsMatching) : M.support = M.verts 
goal: M.support = M.verts

full_name: SimpleGraph.Subgraph.isMatching_iff_forall_degree
code: theorem isMatching_iff_forall_degree [∀ v, Fintype (M.neighborSet v)] :
    M.IsMatching ↔ ∀ v : V, v ∈ M.verts → M.degree v = 1 
goal: M.IsMatching ↔ ∀ v ∈ M.verts, M.degree v = 1

full_name: SimpleGraph.Subgraph.IsMatching.even_card
code: theorem IsMatching.even_card [Fintype M.verts] (h : M.IsMatching) : Even M.verts.toFinset.card 
goal: Even M.verts.toFinset.card

full_name: SimpleGraph.Subgraph.isPerfectMatching_iff
code: theorem isPerfectMatching_iff : M.IsPerfectMatching ↔ ∀ v, ∃! w, M.Adj v w 
goal: M.IsPerfectMatching ↔ ∀ (v : V), ∃! w, M.Adj v w

full_name: SimpleGraph.Subgraph.isPerfectMatching_iff_forall_degree
code: theorem isPerfectMatching_iff_forall_degree [∀ v, Fintype (M.neighborSet v)] :
    M.IsPerfectMatching ↔ ∀ v, M.degree v = 1 
goal: M.IsPerfectMatching ↔ ∀ (v : V), M.degree v = 1

full_name: SimpleGraph.Subgraph.IsPerfectMatching.even_card
code: theorem IsPerfectMatching.even_card [Fintype V] (h : M.IsPerfectMatching) :
    Even (Fintype.card V) 
goal: Even (Fintype.card V)

full_name: SimpleGraph.Subgraph.IsMatching.induce_connectedComponent
code: lemma IsMatching.induce_connectedComponent (h : M.IsMatching) (c : ConnectedComponent G) :
    (M.induce (M.verts ∩ c.supp)).IsMatching 
goal: (M.induce (M.verts ∩ c.supp)).IsMatching

full_name: SimpleGraph.Subgraph.IsPerfectMatching.induce_connectedComponent_isMatching
code: lemma IsPerfectMatching.induce_connectedComponent_isMatching (h : M.IsPerfectMatching)
    (c : ConnectedComponent G) : (M.induce c.supp).IsMatching 
goal: (M.induce c.supp).IsMatching

full_name: SimpleGraph.ConnectedComponent.even_card_of_isPerfectMatching
code: lemma even_card_of_isPerfectMatching [DecidableEq V]
    (c : ConnectedComponent G) (hM : M.IsPerfectMatching) :
    Even (Fintype.card c.supp) 
goal: Even (Fintype.card ↑c.supp)

full_name: SimpleGraph.ConnectedComponent.odd_matches_node_outside
code: lemma odd_matches_node_outside {u : Set V} {c : ConnectedComponent (Subgraph.deleteVerts ⊤ u).coe}
    (hM : M.IsPerfectMatching) (codd : Odd (Nat.card c.supp)) :
    ∃ᵉ (w ∈ u) (v : ((⊤ : G.Subgraph).deleteVerts u).verts), M.Adj v w ∧ v ∈ c.supp 
goal: ∃ w ∈ u, ∃ v, M.Adj (↑v) w ∧ v ∈ c.supp