Documentation

CslibFrontier.Logics.Propositional.CSP.Planar.Substitution.BoundaryPartition

The positional contents of a free boundary block #

At a distinct boundary marker, the tail of its rooted variable cycle contains exactly the actual body occurrences at that variable. No other probe occurrence survives in this tail. This statement uses indexed occurrences rather than a set of relation tuples or variable names. Repeated body variables and duplicate constraints retain separate positions.

noncomputable def Cslib.Complexity.CSP.GadgetRotation.gadgetProbeOccurrence {Rel : Type} {arity : Rel → ℕ} {sem : Rel → List Bool → Bool} {n : ℕ} {R : Set (Fin n → Bool)} (g : Logic.PL.CSP.PPGadget arity sem R) (i : Fin n) :

The actual unique probe occurrence for a canonical gadget free port.

Positive argument succession on the actual gadget probe reverses the original free-port cycle, with the exact canonical marker coordinates retained.

theorem Cslib.Complexity.CSP.GadgetRotation.incidenceEdgeIndex_gadgetProbeOccurrence {Rel : Type} {arity : Rel → ℕ} {sem : Rel → List Bool → Bool} {n : ℕ} {R : Set (Fin n → Bool)} (g : Logic.PL.CSP.PPGadget arity sem R) (i : Fin n) :

The canonical marker occupies exactly the numeric slot used by free-block preprocessing.

theorem Cslib.Complexity.CSP.GadgetRotation.var_gadgetProbeOccurrence {Rel : Type} {arity : Rel → ℕ} {sem : Rel → List Bool → Bool} {n : ℕ} {R : Set (Fin n → Bool)} (g : Logic.PL.CSP.PPGadget arity sem R) (i : Fin n) :

Canonical marker coordinates retain the named free port, even if it never occurs in the actual gadget body.

theorem Cslib.Complexity.CSP.GadgetRotation.getD_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) (i : Fin n) :

The raw fixed free-block scan is rooted at the actual reversed-scope probe occurrence.

theorem Cslib.Complexity.CSP.GadgetRotation.mem_freeBoundaryBlock_iff {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) (index : ℕ) :
index ∈ (freeBoundaryBlocks g w).getD ↑i [] ↔ ∃ (o : g.body.Occurrence), incidenceEdgeIndex o = index ∧ o.var = Sum.inl i

Free blocks contain exactly the indexed body-prefix occurrences with the selected free label. Distinctness of canonical ports is proved internally from their Fin indices.

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

Each free block is a duplicate-free occurrence word, even at unused free ports.

At an occurring auxiliary port, the executed block is the literal accepted body cycle at its first occurrence. This identifies its cyclic anchoring as well as its members.

theorem Cslib.Complexity.CSP.GadgetRotation.mem_auxiliaryBoundaryBlock_iff {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) (j : Fin g.numAux) (index : ℕ) :

Auxiliary blocks contain exactly the indexed occurrences of their original existential label. Unused auxiliary ports have empty blocks rather than invented darts.

theorem Cslib.Complexity.CSP.GadgetRotation.nodup_auxiliaryBoundaryBlock {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) (j : Fin g.numAux) :

Every auxiliary cycle is a duplicate-free occurrence word.

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

Select the actual occurrence word for any declared canonical gadget variable. Both free and existential ports retain their empty words when unused.

theorem Cslib.Complexity.CSP.GadgetRotation.mem_boundaryBlock_iff {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) (v : Fin n ⊕ Fin g.numAux) (index : ℕ) :
index ∈ boundaryBlock g w v ↔ ∃ (o : g.body.Occurrence), incidenceEdgeIndex o = index ∧ o.var = v

Every local block is exactly the fiber of its named canonical variable.

theorem Cslib.Complexity.CSP.GadgetRotation.mem_shiftBlock_boundaryBlock_iff {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) (offset : ℕ) (v : Fin n ⊕ Fin g.numAux) (index : ℕ) :
index ∈ shiftBlock offset (boundaryBlock g w v) ↔ ∃ (o : g.body.Occurrence), offset + incidenceEdgeIndex o = index ∧ o.var = v

Shifting a local variable word retains the exact copy offset and original occurrence.

theorem Cslib.Complexity.CSP.GadgetRotation.nodup_boundaryBlock {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) (v : Fin n ⊕ Fin g.numAux) :

Every selected word has no repeated occurrence positions.

theorem Cslib.Complexity.CSP.GadgetRotation.disjoint_boundaryBlock {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) {v u : Fin n ⊕ Fin g.numAux} (hvu : v ≠ u) :

Different canonical variables own disjoint occurrence words. Repeated source names have no role here: canonical free ports remain distinct local variables.

The complete free-plus-auxiliary table partitions local occurrence positions without any duplication, including zero arities and unused ports.

theorem Cslib.Complexity.CSP.GadgetRotation.mem_flatten_boundaryBlocks_iff {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) (index : ℕ) :

The local partition covers exactly the actual body's bounded occurrence indices. No interval of variable names, unused port labels, or binary magnitudes is enumerated.

The local words enumerate each actual body occurrence exactly once, in their stored cyclic orders. Only the order between fibers differs from the flat occurrence enumeration.