A bounded positioned adjacent value transposition #
CrossInsertion.transposeAdjacent moves the suffix past the selected pair by actual RIGHT
calls, executes the existing CROSS tail program, then moves the suffix back by actual LEFT
calls. Invalid binary positions retain the ENTIRE input before insertion. The selected values
are exchanged at fresh names, not by permuting the original names. Raw cycles are never canceled.
This original routing step toward #3091 uses one fixed actual gadget and its witness outside runtime. Sorting schedules, accumulated swap bounds, the native planarization compiler and full hardness remain open there.
Main definitions #
CrossInsertion.transposeAdjacent: the guarded executed routing program.
Main results #
CrossInsertion.ports_transposeAdjacent: the exact directed output word.CrossInsertion.accepted_transposeAdjacent: full checker preservation internally.CrossInsertion.recover_transposeAdjacent: source satisfaction and exact swapped values.CrossInsertion.eval_transposeAdjacent_iff: extension on every old even name.CrossInsertion.wellFormed_transposeAdjacent_iff: exact arity on all raw inputs.CrossInsertion.computableInPolyTime_transposeAdjacent: plain all-raw runtime.
Select positions j,j+1 using a binary index. The suffix length funds both literal
rotation loops. Invalid positions preserve the entire raw input before insertion.
Out-of-range binary positions preserve every row, name and raw table entry.
Every table check is derived from actual preceding accepted output, including both loops.
The actual directed port word has fresh middle names carrying reversed values. Repeated names and malformed tables need no premise.
A tail position executes exactly the old tail primitive, including its complete table.
Recover the source assignment on EVERY old even name from one satisfying output, and recover the complete directed swapped word. No checker or syntax premise is needed.
Exact extension at a valid selected pair. The fresh output word carries y,x, and
all old even names, including unused names, agree with the original assignment.
Wrong-arity old constraints stay wrong-arity; the actual CROSS supplies the new scopes.
Total raw component counts. Only a successful guard inserts the actual gadget; invalid requests preserve every component and never change the boundary length.
Each successful request appends the fixed template's relation-symbol word after all old rows; invalid requests preserve the word exactly. This includes arbitrary encoded Rel.
One positioned operation adds at most one bit to old names. Rotations preserve name multisets; no accumulated repeated-swap bound is asserted.
Plain polynomial time on EVERY raw state and binary position for any encoded alphabet. The position is capped by actual unary port length before either loop. Reachable rotation states have an internal component/bit-width budget; no growth provider is a hypothesis.
A valid raw step emits the actual dart count, with entry widths reset by its final restriction. Arbitrary malformed source entries require no input bound or acceptance.