Repository navigation
Synthesize optimal weighted reversible binary words with full endpoint replay - #5793
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a bounded constructor for optimal reversible binary linear words with custom XOR/SWAP alphabets and positive integer prices. It searches the full generated finite group, emits a complete potential/closure certificate, and replays the attaining word literally on every input. A closed set excluding the target proves unreachability in the declared alphabet.
Six tests pass normally and under -O on CPython 3.12.14. Every one of the 168 three-role endpoints agrees with an independent truth-table shortest-path oracle. The four-role case covers all 20160 invertible maps and certifies six XORs for full reversal. Tests also cover a cheaper XOR implementation of an expensive SWAP, restricted alphabets, singular targets, false words/potentials and portable source-hash replay.
Credit classical finite-group search and the existing zero-frame feedback censuses, whose larger six/eight-role unit-cost source contracts remain separate. Limits: four arbitrary roles, 18 distinct generators and costs in 1..10^9. No clean ancillas, hidden basis permutations, frame changes or free restoration are introduced. Native phases, tensor semantics and complete caller prices require their own checks. Minimum scalar cost is not a kappa result.
Fresh main/priorities/overlap checked at both checkpoints. Canonical scope #5776. No frontier change. All 6 new tests pass in the hosted plan at this head. The plan fails on the unchanged assignment module (8 failures and 2 errors); replay is skipped. The existing fix is PR #5761. Independent review remains pending.
Base:
de5ec2e7a6074068452f45b1a191b5c72832df4a. Verified head:9ddb022cc1d879a5d3173f8f1f526a2ff504e7b3.Prepared for Ali Romman with substantial OpenAI Codex assistance. Retained tool and mathematical predecessor credits apply. No selected-frontier change.