Documentation

CslibFrontier.Logics.Propositional.CSP.Planar.Embedding.ExpansionProbe

Expanding an actual ordered body while retaining its exterior probe #

The probe is an atom over a separate structural symbol. All original symbols expand by the existing replacement compiler; the probe remains one star in exactly its old reversed order. Applying the full substitution theorem to this augmented body therefore gives a checked boundary for the actual expanded body. No target genus, fiber or order fact is supplied by the caller. The preprocessing is static and nonuniform.

Main definitions #

Main results #

def Cslib.Complexity.CSP.OrderedBoundary.GadgetWitness.withProbe {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) → GadgetWitness (gadgets r)) (n : ℕ) (r : Option Src) :

Extend actual replacement witnesses by the ordered tautological probe atom. The original symbol cases keep exactly the same scopes and certificate tables.

theorem Cslib.Complexity.CSP.OrderedBoundary.verifyRotationCertificate_replaceGadgets_probe {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) → GadgetWitness (gadgets r)) (B : ℕ) (hB : ∀ (r : Src), (gadgets r).numAux ≤ B) (F : Logic.PL.CSP Src ℕ) (hF : Logic.PL.CSP.WellFormed srcArity F) (ports : List ℕ) (c : Graph.RotationCertificate) (hc : verifyRotationCertificate (probeBody F ports) c = true) :
verifyRotationCertificate (probeBody (Logic.PL.CSP.replaceGadgets B (fun (r : Src) => (gadgets r).template) F) (List.map (fun (x : ℕ) => 2 * x) ports)) (GadgetRotation.replacementCertificate B (fun (r : Option Src) => (Logic.PL.CSP.PPGadget.withProbe gadgets ports.length r).template) (fun (r : Option Src) => GadgetRotation.freeBoundaryBlocks (Logic.PL.CSP.PPGadget.withProbe gadgets ports.length r) (GadgetWitness.withProbe gadgets witnesses ports.length r)) (fun (r : Option Src) => GadgetRotation.auxiliaryBoundaryBlocks (Logic.PL.CSP.PPGadget.withProbe gadgets ports.length r) (GadgetWitness.withProbe gadgets witnesses ports.length r)) (probeBody F ports) c) = true

The existing deterministic block splice accepts the literal expanded body with its unchanged probe order. The structural probe is replaced by its actual atom, so this is an exact checker contract, including nullaries and closed components.

def Cslib.Complexity.CSP.OrderedBoundary.Witness.replaceGadgets {Src Rel : Type} {arity : Rel → ℕ} {sem : Rel → List Bool → Bool} {srcArity : Src → ℕ} {srcSem : Src → List Bool → Bool} {F : Logic.PL.CSP Src ℕ} {ports : List ℕ} (w : Witness F ports) (hn : ports.Nodup) (hF : Logic.PL.CSP.WellFormed srcArity F) (gadgets : (r : Src) → Logic.PL.CSP.PPGadget arity sem (Logic.PL.CSP.booleanRelation srcArity srcSem r)) (witnesses : (r : Src) → GadgetWitness (gadgets r)) (B : ℕ) (hB : ∀ (r : Src), (gadgets r).numAux ≤ B) :
Witness (Logic.PL.CSP.replaceGadgets B (fun (r : Src) => (gadgets r).template) F) (List.map (fun (x : ℕ) => 2 * x) ports)

Expand the literal numeric body of an actual checked ordered macro, retaining its listed free ports in their original positive order. The actual probe atom and target certificate are constructed internally. Distinctness is needed only for the probe-deletion API; repeated names inside source scopes and duplicate constraints are unrestricted.