Documentation

CslibFrontier.Logics.Propositional.CSP.Planar.Substitution.SourceParity

The internally induced vertex-even source labeling #

Every actual source edge receives the sum of its copied free block. Source-variable parity comes from the literal supplied white-cycle splice; constraint parity comes from the internally proved even marker tuple. Repeated source names and vanished or empty blocks are retained.

def Cslib.Complexity.CSP.GadgetRotation.sourceEdgeLabels {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 ℕ) (x : Fin (incidenceGraph (Logic.PL.CSP.replaceGadgets B (fun (r : Src) => (gadgets r).template) F)).edges.length → Bool) :

A source incidence gets the sum of exactly its actual shifted free block.

theorem Cslib.Complexity.CSP.GadgetRotation.sourceEdgeLabels_incidenceDart {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 ℕ) (x : Fin (incidenceGraph (Logic.PL.CSP.replaceGadgets B (fun (r : Src) => (gadgets r).template) F)).edges.length → Bool) (o : F.Occurrence) (side : Bool) (a : Fin (srcArity o.relation)) (ha : ↑o.snd = ↑a) :
sourceEdgeLabels gadgets witnesses B F x (incidenceDart o side).1 = copiedFreeLabels gadgets witnesses B F o.fst x a

The induced source edge bit agrees with the internally determined marker at that original scope position. The finite coordinate equality retains the indexed position.

theorem Cslib.Complexity.CSP.GadgetRotation.vertexParity_sourceEdgeLabels_variable {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 ℕ) (hF : Logic.PL.CSP.WellFormed srcArity F) (c : Graph.RotationCertificate) (hc : Graph.RotationCertificate.verifyRotation (incidenceGraph F) c = true) (x : Fin (incidenceGraph (Logic.PL.CSP.replaceGadgets B (fun (r : Src) => (gadgets r).template) F)).edges.length → Bool) (hx : (incidenceGraph (Logic.PL.CSP.replaceGadgets B (fun (r : Src) => (gadgets r).template) F)).VertexEven x) (o : F.Occurrence) :

The literal source white cycle has zero induced parity, including arbitrarily long stretches of empty replacement blocks. Its anchoring uses the original first-occurrence API.

theorem Cslib.Complexity.CSP.GadgetRotation.vertexParity_sourceEdgeLabels_constraint {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 : ℕ) (hB : ∀ (r : Src), (gadgets r).numAux ≤ B) (F : Logic.PL.CSP Src ℕ) (hF : Logic.PL.CSP.WellFormed srcArity F) (x : Fin (incidenceGraph (Logic.PL.CSP.replaceGadgets B (fun (r : Src) => (gadgets r).template) F)).edges.length → Bool) (hx : (incidenceGraph (Logic.PL.CSP.replaceGadgets B (fun (r : Src) => (gadgets r).template) F)).VertexEven x) (o : F.Occurrence) :

Original source constraints have even induced parity by the complete marker-tuple calculation. The proof uses every indexed scope position, with no injectivity premise.

theorem Cslib.Complexity.CSP.GadgetRotation.vertexEven_sourceEdgeLabels {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 : ℕ) (hB : ∀ (r : Src), (gadgets r).numAux ≤ B) (F : Logic.PL.CSP Src ℕ) (hF : Logic.PL.CSP.WellFormed srcArity F) (c : Graph.RotationCertificate) (hc : Graph.RotationCertificate.verifyRotation (incidenceGraph F) c = true) (x : Fin (incidenceGraph (Logic.PL.CSP.replaceGadgets B (fun (r : Src) => (gadgets r).template) F)).edges.length → Bool) (hx : (incidenceGraph (Logic.PL.CSP.replaceGadgets B (fun (r : Src) => (gadgets r).template) F)).VertexEven x) :
(incidenceGraph F).VertexEven (sourceEdgeLabels gadgets witnesses B F x)

Every target vertex-even labeling internally induces a vertex-even labeling on the accepted source. No source genus or supplied source-color provider is needed for this step.