Actual edge offsets in concatenated CSP bodies #
The original incidence edge index commutes with literal body concatenation: each local edge shifts by exactly the preceding bodies' occurrence count. No constraints or names are identified.
theorem Cslib.Complexity.CSP.incidenceEdgeIndex_flatMapOccurrence {α Rel V : Type} [DecidableEq V] (l : List α) (f : α → Logic.PL.CSP Rel V) (i : Fin l.length) (o : (f l[↑i]).Occurrence) :
incidenceEdgeIndex (Logic.PL.CSP.flatMapOccurrence l f i o) = (Logic.PL.CSP.vars (List.flatMap f (List.take (↑i) l))).length + incidenceEdgeIndex o
The actual incidence edge of a copied occurrence has precisely the original local edge index plus the preceding bodies' variable-word length.