Executable checked cyclic-difference compiler #
The input is the original list CSP and a supplied ordered numerical rotation certificate. Original variable names and certificate entries remain binary. Edge variables are dense actual occurrence positions. Every enumeration is funded by actual constraint/scope/occurrence lists. Static accepted-tuple and cyclic-difference tables depend only on the fixed language, with no uniform language-preprocessing claim. In particular, no solver or recognizer is a parameter.
Black constraints use the ordered cyclic-difference tables. White scopes are the complete orbits
of B⁻¹ A⁻¹, enumerated by bounded scans in increasing edge-position order; their parity does
not depend on the starting point or direction. Long white scopes use a width-three parity chain.
Auxiliary blocks are consecutive and start immediately after the original occurrence positions.
Nullaries have no edge variables: true nullaries are omitted, and false nullaries are rejected
by the static relation-nonemptiness test. All malformed guards reject to two incompatible pins.
This is a numerical supplied-certificate implementation of the forward direction in [DK15], Section 3, Lemma 5/Corollary 4/Theorem 2, printed pp. 439–440. It asserts no geometric embedding construction, bare recognition, reverse reduction or solver. The bounded scans, parity-chain expansion and binary encoding implementation are original.
Main definitions #
Cslib.Complexity.CSP.CyclicCompiler.compile: total compiler on original raw typed inputs.
Constraint-side cyclic successor table, indexed by actual edge positions.
Instances For
White face successor B⁻¹ A⁻¹: invert the supplied variable rotation by scanning its
actual list, then invert the actual cyclic argument successor list. Missing entries are total.
Instances For
Complete boundary of one candidate white orbit, in increasing edge-position order. Repeated source vertices remain separate positions; parity is invariant under this enumeration.
Instances For
Keep exactly the least position of each white orbit, including singleton orbits.
Instances For
Original cyclic scope order, with every argument replaced by its dense edge position.
Instances For
One static difference table per positive actual constraint position. True nullaries are handled by the outer nonemptiness guard and contribute no black dart orbit.
Instances For
Each white face gets exactly its own consecutive auxiliary block.
Instances For
Output body after the input guards. No interpretation of a quotient or choice is executed.
Instances For
Actual total compiler. Bad arity, invalid rotations and occurring empty relations reject honestly to an unsatisfiable edge instance whose two relations are even delta-matroids.
Instances For
Every listed white boundary is distinct and bounded by the actual occurrence count, including for malformed certificates.
No raw boundary scan emits more candidate white faces than original edges.