Documentation

CslibFrontier.Logics.Propositional.CSP.Planar.Substitution.CopyPartition

The disjoint occurrence partition across actual gadget copies #

Every fixed gadget contributes its free and auxiliary words at the literal replacement prefix offset. Across all source constraint positions these words partition all actual target occurrences. Empty blocks and closed components are retained, without assumptions on source names, source arities or source certificates.

theorem Cslib.Complexity.CSP.GadgetRotation.shifted_boundaryBlocks_perm_range {Src Rel : Type} {arity : Rel → ℕ} {sem : Rel → List Bool → Bool} {srcArity : Src → ℕ} {srcSem : Src → List Bool → Bool} (gadgets : (r : Src) → Logic.PL.CSP.PPGadget arity sem (Logic.PL.CSP.booleanRelation srcArity srcSem r)) (witnesses : (r : Src) → OrderedBoundary.GadgetWitness (gadgets r)) (F : Logic.PL.CSP Src ℕ) (r : Src) (i : ℕ) :
(List.map (fun (x : ℕ) => occurrencePrefix (fun (s : Src) => (gadgets s).template) F i + x) (freeBoundaryBlocks (gadgets r) (witnesses r) ++ auxiliaryBoundaryBlocks (gadgets r) (witnesses r)).flatten).Perm (List.map (fun (x : ℕ) => occurrencePrefix (fun (s : Src) => (gadgets s).template) F i + x) (List.range (gadgets r).template.vars.length))

Each copy's full shifted occurrence word enumerates exactly its literal target interval.

theorem Cslib.Complexity.CSP.GadgetRotation.nodup_shifted_boundaryBlocks {Src Rel : Type} {arity : Rel → ℕ} {sem : Rel → List Bool → Bool} {srcArity : Src → ℕ} {srcSem : Src → List Bool → Bool} (gadgets : (r : Src) → Logic.PL.CSP.PPGadget arity sem (Logic.PL.CSP.booleanRelation srcArity srcSem r)) (witnesses : (r : Src) → OrderedBoundary.GadgetWitness (gadgets r)) (F : Logic.PL.CSP Src ℕ) :
(List.flatMap (fun (x : Logic.PL.Constraint Src ℕ × ℕ) => match x with | ({ rel := relation, scope := scope }, i) => List.map (fun (x : ℕ) => occurrencePrefix (fun (r : Src) => (gadgets r).template) F i + x) (freeBoundaryBlocks (gadgets relation) (witnesses relation) ++ auxiliaryBoundaryBlocks (gadgets relation) (witnesses relation)).flatten) (List.zipIdx F)).Nodup

The complete shifted copy words are duplicate-free before regrouping free blocks into source-variable cycles. In particular duplicate source constraints remain separate copies.

theorem Cslib.Complexity.CSP.GadgetRotation.mem_shifted_boundaryBlocks_iff {Src Rel : Type} {arity : Rel → ℕ} {sem : Rel → List Bool → Bool} {srcArity : Src → ℕ} {srcSem : Src → List Bool → Bool} (gadgets : (r : Src) → Logic.PL.CSP.PPGadget arity sem (Logic.PL.CSP.booleanRelation srcArity srcSem r)) (witnesses : (r : Src) → OrderedBoundary.GadgetWitness (gadgets r)) (B : ℕ) (F : Logic.PL.CSP Src ℕ) (index : ℕ) :
index ∈ List.flatMap (fun (x : Logic.PL.Constraint Src ℕ × ℕ) => match x with | ({ rel := relation, scope := scope }, i) => List.map (fun (x : ℕ) => occurrencePrefix (fun (r : Src) => (gadgets r).template) F i + x) (freeBoundaryBlocks (gadgets relation) (witnesses relation) ++ auxiliaryBoundaryBlocks (gadgets relation) (witnesses relation)).flatten) (List.zipIdx F) ↔ index < (Logic.PL.CSP.replaceGadgets B (fun (r : Src) => (gadgets r).template) F).vars.length

The shifted copy words cover exactly the actual target occurrence interval, on all raw source bodies. This is not yet a statement about their regrouped vertex-cycle order or genus.

theorem Cslib.Complexity.CSP.GadgetRotation.shifted_boundaryBlocks_perm_target_range {Src Rel : Type} {arity : Rel → ℕ} {sem : Rel → List Bool → Bool} {srcArity : Src → ℕ} {srcSem : Src → List Bool → Bool} (gadgets : (r : Src) → Logic.PL.CSP.PPGadget arity sem (Logic.PL.CSP.booleanRelation srcArity srcSem r)) (witnesses : (r : Src) → OrderedBoundary.GadgetWitness (gadgets r)) (B : ℕ) (F : Logic.PL.CSP Src ℕ) :
(List.flatMap (fun (x : Logic.PL.Constraint Src ℕ × ℕ) => match x with | ({ rel := relation, scope := scope }, i) => List.map (fun (x : ℕ) => occurrencePrefix (fun (r : Src) => (gadgets r).template) F i + x) (freeBoundaryBlocks (gadgets relation) (witnesses relation) ++ auxiliaryBoundaryBlocks (gadgets relation) (witnesses relation)).flatten) (List.zipIdx F)).Perm (List.range (Logic.PL.CSP.replaceGadgets B (fun (r : Src) => (gadgets r).template) F).vars.length)

Reordering all literal copy words only permutes the target occurrence enumeration. The target binary names do not affect this positional partition.