Documentation

CslibFrontier.Computability.Complexity.Problems.Graph.Matching.Labeling

Constructive matching and minimum-defect correspondence #

The choice constraints use the original normalized graph incidences. A valid local labeling selects at most one original edge at each vertex; mutually selected edges therefore give an actual Mathlib matching. Every Mathlib matching supplies a feasible comparison labeling, with private unmatched ports precisely at its uncovered vertices.

A vertex's choice constraint is at its position in the distinct vertex list.

The unary false pin follows all choice constraints in distinct vertex order.

The actual choice incidence of the variable x at vertex v.

Instances For
    @[simp]
    theorem Cslib.Complexity.Graph.var_choiceOccurrence {G : Graph} (v : ℕ) (hv : v ∈ G.vertices) (x : ℕ) (hx : x ∈ G.matchingScope v) :
    (G.choiceOccurrence v hv x hx).var = x

    Choice incidence reads its supplied original variable.

    The actual false-pin incidence for the private port of v.

    Instances For
      @[simp]
      theorem Cslib.Complexity.Graph.var_pinOccurrence {G : Graph} (v : ℕ) (hv : v ∈ G.vertices) :
      (G.pinOccurrence v hv).var = 2 * v + 1

      Every valid generated labeling labels each private port's pin false.

      Unary pins prevent every private unmatched port from being mutually selected.

      theorem Cslib.Complexity.Graph.choice_unique {G : Graph} {f : G.matchingInstance.OccurrenceLabeling Bool} (hf : Logic.PL.CSP.ValidLabeling Logic.PL.CSP.Table.sem f) (v : ℕ) (hv : v ∈ G.vertices) (x y : ℕ) (hx : x ∈ G.matchingScope v) (hy : y ∈ G.matchingScope v) (hfx : f (G.choiceOccurrence v hv x hx) = true) (hfy : f (G.choiceOccurrence v hv y hy) = true) :
      x = y

      Two true ports in one choice constraint name the same variable.

      Original positions with both endpoint labels true.

      Instances For

        Mutual selection contains only original even-tagged edges; private pins never contribute.

        Every feasible generated labeling has precisely one true incidence per declared vertex.