Repository navigation
Prove optimal weighted borrowed-source pair tours (no new κ) - #4899
Merged
Mister-Meeseeks merged 1 commit intoOct 23, 2026
Merged
Conversation
This was referenced Oct 22, 2026
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.
Summary
Scoped proof with exact finite corroboration, answering Cinna Davis's PR #2271 Open next question 2. For every n>=2 and positive toggle prices sorted c1>=...>=cn, the minimum closed borrowed-anchor tour through every pair mask is
The forest lower bound permits arbitrary intermediate masks and repeated visits. For four toggle sources and two targets per pair, the complete restored-source map costs 26 row ADDs instead of 36 direct ADDs, saving ten. Prices (7,3,2,1) have exact transition optimum 34. The new theorem, constructor, proof and independent finite oracles are produced by Nick Petalas. Cinna Davis retains the borrowed-source interface, transition-sharing example and open-question credit.
Evidence
Exact reproduction from the repository root, CPython 3.12 and standard library only:
Expected direct status:
PASS_WEIGHTED_PAIR_MASK_TOUR. Replace the interpreter prefix with a local CPython 3.12 installation elsewhere.Limitations and unrun obligations
The alphabet permits only anchor toggles from unchanged sources and one anchor write per target. This is an optimum within that class, not an unrestricted CNOT minimum. The all-n real-price theorem is a written proof; the executable supports exact rational prices, 2–64 sources and a uniform 1–8 targets per pair. Native frames, actual caller occurrence, hosting, tape movement and recursive billing remain external. No predecessor executable, full selected cold replay, Lean or Docker run was performed. No supplier admission, complete multiplication theorem, new kappa or selected-frontier change is claimed.
The
bit-helper-contractcard explicitly changes scope from R439 H2/K to this local row-register side result. Canonical base is624de9dc66858af0945e5f8a0942488d62280d43; the source README and catalogue are provenance pins. The advance CLAIM, live open PRs/claims, merged-term searches and main README object/formula searches were checked before publication. Sparse local notes and unpublished work remain overlap limits.Related open work
#3891 prepares and restores one fixed helper response; this result optimizes transitions across the complete varying pair family. Its R439 interface is not imported or rechecked.
#1865 groups exactly commuting complex fanout intervals; this proof concerns binary source-mask tours and makes no physical profile comparison.
#4891 lower-bounds dense dirty-output bank scans under monomial maps; this result prices one-anchor scalar row ADDs with specified pair demands. No predecessor numbers are recomputed for comparison.
#4896 determines dirty-root stock for a fixed repeated source order serving every nonzero mask; this result fixes one borrowed anchor and optimizes weighted transitions through pair masks. Root stock and tour cost are different quantities, and no numerical comparison is inferred.
#4894 studies within-class pair-sum excess on simple binary prefix walks; this result concerns the cost of visiting a prescribed complete pair-mask family and allows repeated walk states. Its census and bounds are not replayed here.
Open next questions
CI notes
Both hosted checks passed for head
1957aba96cf0d0f09d89e0588bdde875885ed44c:planand the registered package replay. Successful CI run. The registered replay executes the warning-strict normal and optimized verification commands. Local registered replay, direct normal/optimized checks, Git-free replay and committed-byte/source-history preflight also pass.The post-CI refresh inspected this account's ten open PRs created since the CLAIM, including this PR. Newly relevant #4896 and adjacent #4894 are listed above; #4891 was already listed. These results optimize different quantities, with no computed numerical disagreement identified.
Merge Danger
Door: two-way. Blast radius: isolated research package. Seven new package files; shared code, predecessor sources and the selected record are unchanged.