Documentation

CslibFrontier.Computability.Complexity.Problems.CSP.RotationSystem.Primal.Graph

The occurrence-indexed polygon graph of an ordered CSP #

There is one edge per actual argument occurrence, from that variable to the next variable in the same cyclic scope. The edge list uses the existing incidence occurrence order. Unary scopes give loops; repeated names and duplicate constraints retain separate edge positions. No relation arity or bound on the variable universe is used. Nullary constraints contribute no edge.

This is an explicit finite-list construction of the primal face model of [DK15], printed p. 434. The exact occurrence maps and permutation formulas are original reconstruction. The graph alone does not establish geometric realizability or a native time bound.

Main definitions #

Main results #

Argument succession, with an explicit inverse at each constraint position.

Instances For
    def Cslib.Complexity.CSP.polygonNext {Rel V : Type} [DecidableEq V] (F : Logic.PL.CSP Rel V) (i j : ℕ) (v : V) :

    The next dense variable, computed from an occurrence record by bounded list lookups. Invalid records return the supplied variable's dense name; actual occurrences never use it.

    Instances For
      @[simp]

      Actual ordered occurrences read the next scope variable, with cyclic wraparound.

      Dense occurring variables and one listed cyclic-scope edge per occurrence.

      Instances For
        @[simp]

        The polygon construction keeps exactly the incidence edge positions.

        Every argument occurrence retains its own listed polygon edge.

        Instances For

          The listed edge at an occurrence has its two prescribed dense endpoints.

          @[simp]

          Both endpoint choices retain the cyclic scope order, even when the edge is a loop.

          No two occurrence/end pairs are collapsed by equal endpoint labels.

          theorem Cslib.Complexity.CSP.exists_polygonDart {Rel V : Type} [DecidableEq V] {F : Logic.PL.CSP Rel V} (d : (polygonGraph F).Dart) :
          ∃ (o : F.Occurrence), polygonDart o d.2 = d

          Every polygon dart has an occurrence and an end; no additional darts are introduced.

          Occurrence/end coordinates on the actual listed polygon graph. The inverse only recovers indices from the existing occurrence enumeration; it chooses no graph or rotation.

          Instances For

            The exact edge-position map: one edge for each actual argument occurrence.

            Instances For

              Edge count is exactly the number of ordered occurrences, rather than distinct pairs.

              @[simp]

              The forward polygon coordinate map is the explicit occurrence/end map.

              The scope permutation has exactly one orbit per nonempty constraint position.

              theorem Cslib.Complexity.CSP.polygonGraph_endpoints {Rel V : Type} [DecidableEq V] {F : Logic.PL.CSP Rel V} {edge : ℕ × ℕ} (he : edge ∈ (polygonGraph F).edges) :

              Both ends of every polygon edge are declared dense occurring variables.

              Dense vertex count is bounded by actual scope occurrences, independent of label sizes.

              theorem Cslib.Complexity.CSP.polygon_scope_word {Rel V : Type} [DecidableEq V] {F : Logic.PL.CSP Rel V} (i : Fin (List.length F)) :
              (List.ofFn fun (j : Fin F[↑i].2.length) => (polygonDart ⟨i, j⟩ false).vertex) = List.map (fun (x : V) => List.idxOf x F.distinctVars) F[↑i].2

              The forward-dart word at a constraint is its exact original scope after dense naming.

              With positive actual scopes, constraint positions are also bounded by occurrences.