Documentation

CslibFrontier.Logics.Propositional.CSP.PrimitivePositive.ExpansionSymbols

Interpreted symbol maps for primitive-positive gadgets #

A map of relation symbols preserving declared arities and interpretations preserves an actual gadget, including its ordered scopes and its exact auxiliary count. The symbol map need not be injective. In particular, this permits a structural probe tag without changing the underlying original-language gadget.

Main definitions #

def Cslib.Logic.PL.CSP.PPGadget.mapRelation {Rel Other : Type} {arity : Rel → ℕ} {sem : Rel → List Bool → Bool} {otherArity : Other → ℕ} {otherSem : Other → List Bool → Bool} {n : ℕ} {R : Set (Fin n → Bool)} (g : PPGadget arity sem R) (f : Rel → Other) (ha : ∀ (r : Rel), otherArity (f r) = arity r) (hs : ∀ (r : Rel) (xs : List Bool), otherSem (f r) xs = sem r xs) :
PPGadget otherArity otherSem R

Map interpreted relation symbols, retaining every constraint occurrence, ordered scope, free label and auxiliary label. No injectivity or finiteness of the alphabets is required.

def Cslib.Logic.PL.CSP.PPGadget.withProbe {Rel : Type} {arity : Rel → ℕ} {sem : Rel → List Bool → Bool} {Src : Type} {srcArity : Src → ℕ} {srcSem : Src → List Bool → Bool} (gadgets : (r : Src) → PPGadget arity sem (booleanRelation srcArity srcSem r)) (n : ℕ) (r : Option Src) :
PPGadget (Option.elim' n arity) (Option.elim' (fun (x : List Bool) => true) sem) (booleanRelation (Option.elim' n srcArity) (Option.elim' (fun (x : List Bool) => true) srcSem) r)

Extend a replacement family by a structural symbol with n ordered ports and constant true interpretation. Original symbols use the interpreted symbol map; the added symbol uses the actual atom with no auxiliaries. This permits expansion to retain a boundary probe.