Documentation

CslibFrontier.Computability.Complexity.Problems.Graph.Matching.Correctness

Complete unweighted matching correctness #

Maximum output is optimal against every actual Mathlib matching, with no supplied solver, model or runtime hypothesis. Successful perfect search returns exactly the original edge pairs of a perfect Mathlib subgraph; decision is equivalent to existence of a perfect matching. All claims use the normalized existing Graph.induced convention on every raw graph.

The executable position scan is exactly the semantic mutually selected edge set.

The total algorithm returns a Mathlib maximum matching on every raw input.

Every returned position names an actual normalized original edge.

Returned canonical positions never repeat.

Every returned edge is an original edge between distinct declared vertices.

The public edge pairs are precisely the executable conversion of returned positions.

The number of returned original edge pairs is the actual subgraph's edge cardinality.

Maximum output is as large as every actual matching, including matchings with no extension of the particular returned edges.

theorem Cslib.Complexity.Graph.mem_verts_matchingOfPositions_iff {G : Graph} {S : Finset ℕ} (hS : ∀ i ∈ S, i < G.edgeList.length) (v : ℕ) (hv : v ∈ G.vertices) :
⟨v, hv⟩ ∈ (G.matchingOfPositions S).verts ↔ ∃ i ∈ S, incident (G.edgeList.getD i (0, 0)) v = true

Covered vertices of valid position sets are exactly the endpoints of selected original edges.

The executable coverage scan is exactly spanning of the returned Mathlib subgraph.

A maximum matching spans exactly when any perfect matching exists.

Complete successful perfect-search specification in the existing Mathlib subgraph model.

Complete perfect decision, including normalization, empty graphs and isolates.

Search fails exactly when the actual induced graph has no perfect matching.

The returned original endpoint pairs are exactly the edges of the certified subgraph.