Positional rotation tables for fixed-gadget replacement #
The target body is exactly replaceGadgets, with its existing even/odd fresh namespaces.
Local rotation blocks use local occurrence positions. At each original variable, its
source successor cycle orders the blocks of its distinct source incidences, even when the
same variable occurs repeatedly in one constraint. Target argument rotations are built
from the target's actual ordered scope lists, so no relation is reflected.
Every loop is funded by a source, template, or target list. Binary source names and invalid binary successor entries are lookup data, not loop bounds. Fixed template preprocessing is nonuniform in the language. This module defines the executed positional table construction; its vertex-fiber and componentwise numerical Euler properties are separate proof obligations.
Number of target occurrences contributed by the actual preceding source constraints.
Expand one recorded source incidence by scanning actual constraint positions. The record's indices are unary positions; relation symbols are read from the original body.
The block for a single original incidence position. Oversized supplied successor values are only used in the bounded lookup of the original occurrence record.
Splice blocks in the actual source rotation at one appearing variable. The start is its first positional occurrence, with no enumeration up to the numeric variable name.
All variable-side target cycles: source-variable blocks first, followed by each copy's private auxiliary-variable cycles in constraint-list order. Empty blocks are harmless.
Each emitted word is either one actual source-variable splice or one auxiliary block at an actual indexed source row. Duplicate source records retain separate copy indices.
Emit one even variable successor and one odd argument successor per target occurrence.
The produced table has exactly two entries per actual target occurrence on all inputs.
The emitted constraint-side rotation has exactly the target's literal argument order, independently of the candidate variable cycles. This is an executed checker equality.
Every emitted raw successor is its exact variable-cycle or original argument successor. This inspects the actual indexed body, retaining duplicate rows and repeated variable names.
The candidate certificate is computed from the literal replacement body and positional source/template blocks. No rotation search is performed.
Every target scope order is preserved by the generated table, including repeated variables and duplicate constraint records.