mathlib3 documentation

combinatorics.simple_graph.matching

Matchings #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

A matching for a simple graph is a set of disjoint pairs of adjacent vertices, and the set of all the vertices in a matching is called its support (and sometimes the vertices in the support are said to be saturated by the matching). A perfect matching is a matching whose support contains every vertex of the graph.

In this module, we represent a matching as a subgraph whose vertices are each incident to at most one edge, and the edges of the subgraph represent the paired vertices.

Main definitions #

TODO #

def simple_graph.subgraph.is_matching {V : Type u} {G : simple_graph V} (M : G.subgraph) :
Prop

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.

Equations
noncomputable def simple_graph.subgraph.is_matching.to_edge {V : Type u} {G : simple_graph V} {M : G.subgraph} (h : M.is_matching) (v : (M.verts)) :

Given a vertex, returns the unique edge of the matching it is incident to.

Equations
theorem simple_graph.subgraph.is_matching.to_edge_eq_of_adj {V : Type u} {G : simple_graph V} {M : G.subgraph} (h : M.is_matching) {v w : V} (hv : v M.verts) (hvw : M.adj v w) :
h.to_edge v, hv⟩ = (v, w), hvw⟩
theorem simple_graph.subgraph.is_matching.to_edge_eq_to_edge_of_adj {V : Type u} {G : simple_graph V} {M : G.subgraph} {v w : V} (h : M.is_matching) (hv : v M.verts) (hw : w M.verts) (ha : M.adj v w) :
h.to_edge v, hv⟩ = h.to_edge w, hw⟩

The subgraph M of G is a perfect matching on G if it's a matching and every vertex G is matched.

Equations