Actual copied occurrences in the exact replacement body #
The positional map follows the existing template renaming, instantiation and flat-map in
replaceGadgets. Its edge index is the already proved copy offset. Its constraint and argument
coordinates retain the local body row and scope positions, including duplicate records.
Copy an actual local occurrence through the exact original replacement operation.
The copied occurrence's edge index is the literal prefix offset used by the executed table. This identifies positions, without rank preservation assumptions about dense names.
Copied constraints retain their actual local row position after the preceding bodies. This offset counts rows, independently of their arities or repeated relation records.
Copied argument positions keep exactly their local scope indices.
The actual copied occurrence map preserves the original positive scope successor. Neither local nor source scope names need to be distinct.
The actual copied occurrence reads its original instantiated free or private name.
The typed copied occurrences exhaust the actual replacement body's occurrences. The existing public incidence-index inverse recovers the unique local positional source.
Equality of copied constraint positions retains both the source copy and local body row. Repeated relation records and nullary rows are not identified.
The exact replacement retains every copy/local occurrence identity. In particular coincident free labels and duplicate source rows never identify their indexed edges.
Actual target occurrences correspond bijectively to their original copy/local positions. The inverse is proof-side finite choice; the executed compiler continues to use literal scans.
The forward copy/local coordinate map is exactly the original positional occurrence map.