Documentation

CslibFrontier.Logics.Propositional.CSP.Planar.Substitution.BoundaryColors

Exact boundary-block corner-color paths #

Cutting the actual probe-variable cycle after its unique canonical marker gives precisely the executed free boundary block. Its corner colors run from the reverse marker to the marker. An empty block explicitly forces the two marker colors to agree. Auxiliary words retain their literal body successors outside the probe ports and give closed paths in those same probe colors, including empty auxiliary words.

theorem Cslib.Complexity.CSP.GadgetRotation.isChain_freeBoundaryBlock_colors {Rel : Type} {arity : Rel → ℕ} {sem : Rel → List Bool → Bool} {n : ℕ} {R : Set (Fin n → Bool)} (g : Logic.PL.CSP.PPGadget arity sem R) (w : OrderedBoundary.GadgetWitness g) (i : Fin n) (P : (incidenceGraph (OrderedBoundary.probeBody g.body (List.ofFn Sum.inl))).Dart → Bool) (hP : ∀ (d : (incidenceGraph (OrderedBoundary.probeBody g.body (List.ofFn Sum.inl))).Dart), P ((OrderedBoundary.Witness.probeRotation w).rotate d) = P d.reverse) :
have marker := incidenceDart (gadgetProbeOccurrence g i) false; List.IsChain (fun (p q : Bool × Bool) => p.2 = q.1) ((P marker.reverse, P marker.reverse) :: List.map (fun (j : ℕ) => (Graph.Dart.colorAtIndex P (2 * j), Graph.Dart.colorAtIndex P (2 * j + 1))) ((freeBoundaryBlocks g w).getD ↑i []) ++ [(P marker, P marker)])

The computed free block is an exact entry/exit color path in the literal decoded probe rotation. The theorem includes unused free ports, whose block is empty.

An unused free port has equal colors on its two marker ends. This follows from the actual first-return word, rather than assuming that every boundary block is nonempty.

The exact free-block color path telescopes to its actual marker-edge bit. This also computes zero for an empty block, without requiring an occurring free port.

An actual marker-edge labeling obtained from clockwise colors is zero whenever that port's computed body block is empty. This includes every unused canonical free port.

theorem Cslib.Complexity.CSP.GadgetRotation.isChain_auxiliaryBoundaryBlock_colors {Rel : Type} {arity : Rel → ℕ} {sem : Rel → List Bool → Bool} {n : ℕ} {R : Set (Fin n → Bool)} (g : Logic.PL.CSP.PPGadget arity sem R) (w : OrderedBoundary.GadgetWitness g) (a : Fin g.numAux) (P : (incidenceGraph (OrderedBoundary.probeBody g.body (List.ofFn Sum.inl))).Dart → Bool) (hP : ∀ (d : (incidenceGraph (OrderedBoundary.probeBody g.body (List.ofFn Sum.inl))).Dart), P ((OrderedBoundary.Witness.probeRotation w).rotate d) = P d.reverse) :
∃ (color : Bool), List.IsChain (fun (p q : Bool × Bool) => p.2 = q.1) ((color, color) :: List.map (fun (j : ℕ) => (Graph.Dart.colorAtIndex P (2 * j), Graph.Dart.colorAtIndex P (2 * j + 1))) ((auxiliaryBoundaryBlocks g w).getD ↑a []) ++ [(color, color)])

The actual auxiliary body cycle is a closed path of the probe's corner colors. The prefix restriction leaves every successor unchanged outside the canonical free ports; unused auxiliary ports give an empty closed path.