Documentation

CslibFrontier.Logics.Propositional.CSP.Planar.Substitution.BoundaryBlocks

Reading fixed substitution blocks from actual gadget boundary tables #

The free-port block starts immediately after that port's structural probe dart. Auxiliary blocks use the original body's first occurrence. Block entries are original local edge-list positions, independent of later source variable names or coincidences. Unused auxiliary names produce empty blocks. These are explicit scans of the supplied fixed table; they do not search for a rotation. Preprocessing is static and nonuniform in the fixed gadget/language size.

def Cslib.Complexity.CSP.GadgetRotation.templateBoundary {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) :

Re-encoding the gadget ports as the existing uniform Boolean/index template retains the literal accepted boundary table and ordered free-port positions.

def Cslib.Complexity.CSP.GadgetRotation.freeBoundaryBlocks {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) :

Local body edge positions in forward cyclic order after each free port's probe corner. The reverse probe scope places port i at appended edge bodyOccurrences+n-1-i.

def Cslib.Complexity.CSP.GadgetRotation.auxiliaryBoundaryBlocks {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) :

Auxiliary corner cycles from the actual body restriction. Unused existential labels remain in the gadget semantics but contribute no target darts.

theorem Cslib.Complexity.CSP.GadgetRotation.length_freeBoundaryBlocks {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) :

Free block selection has exactly one entry for every actual declared free port.

theorem Cslib.Complexity.CSP.GadgetRotation.length_auxiliaryBoundaryBlocks {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) :

Auxiliary block selection includes each declared existential index, including empty blocks.