Repository navigation
Research: SWAP tables - #6971
Merged
Mister-Meeseeks merged 1 commit intoNov 10, 2026
Merged
Mister-Meeseeks merged 1 commit into
Mister-Meeseeks merged 1 commit into
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.
Result and scope
No new κ. This closes the current SWAP/SIGNED_SWAP source class on the
same two-work-port coded lifecycle ABI as the preceding ADD/SCALE provider.
The exact ordered operations are
(x,y) -> (y,x)and(x,y) -> (y,-x).The all-width theorem gives exact final signed admission, whole-pair validation
before either public write, preserved complete shapes, head return and physical
work erasure through unchanged
execute_tableandController.primitive.SWAP always succeeds on its admitted common shape/grid. SIGNED_SWAP succeeds
exactly when no old first-operand component is most-negative in its original
width; the old second operand may be most-negative. There is no extra
intermediate-word headroom requirement. The 130-row and 171-row tables contain
only local branch/write/unit-move/goto/halt/reject instructions, with no
numerical callback or decoded field length.
The source binder covers 10,920 current services: 2,808 right-boundary swaps,
3,120 left-boundary swaps and 4,992 outer signed swaps. Together with the frozen
scalar provider, this supplies tables for all 377,762 original
ADD/SCALE/SWAP/SIGNED_SWAP services in the exact 642,410-event caller. This is
one physical compiler/lifecycle implication; all five selected assumptions
remain globally, and conditional κ remains 0.003125804.
Novelty and exact dependencies
#3098 supplies older aligned scalar-recipe
execution. #969 defers historical names and pays
boundary copies, explicitly excluding physical-array/current production
admission. #4516 verifies the older caller's exact
Laurent signs. This package executes every original current two-output service
on actual coded fields, keeps the current operand order, and proves its complete
two-work-port physical contract. Classical swapping and signed negation are
credited background, not new arithmetic discoveries or count improvements.
7c49fe32c55de02c2c873655c804b16e4c3fef0a.caller.py, selected word and controller haveGit blob/SHA256 pins in
SOURCES.json; the original semantic source is alsoretained unchanged as a reference-only file.
ab239cb6ee884e7a900dd9101c34448077fad0b0.are pinned at
13193a22b1070a74a8580c5d3ea27470443f815aand retained forthe actual mixed right-boundary replay. No predecessor file is modified.
Reproduction and checks
Eight bounded normal/optimized commands check arithmetic, complete source
binding, real unchanged-controller blocks and controls against exact committed
receipts. The independent direct permutation/sign oracle covers all 2,728
signed x,y pairs at widths 1–5 for both operations, plus 96 wider/mixed-width
fields up to width 129. Thirty-two boundary/failure controls include late
component overflow, signed minimum/zero cases, aliases, shape/source failures,
four code mutants, physical ordered inverse, dirty extra work and shrinking
retained backing.
On all 13,444 public fields, the actual full 5,720-service right boundary
executes 11,015,757 physical actions and 1,493,648 table steps; the actual first
104-service signed block executes 216,813 actions and 28,912 steps. Every
public endpoint and spectator is checked. Receipts bind exact source cuts,
compiled code, executed tables, complete physical input/output bodies and
decoded outputs. These are explicit entry-cut fixtures, not execution of the
omitted preceding native services or the complete recursive caller.
A separate lead AI mathematical review checked the exact original source
order, finite-carry identity, most-negative iff guard, staging induction and
full lifecycle/cost premises. Its independent integer enumeration checked all
8,190 first inputs at widths 1–12, with 8,178 admitted, without importing
table code. This review is distinct from physical executor replay and from
human or proof-kernel acceptance.
Limits and remaining obligations
The complete positive bill is
O(V+D+Q)and current work backing is2V+3+O(1), with erased historical backing retained as a maximum. Actualmatching coordinate shapes/grids, distinct owners, head origins and valid
dirty work remain premises. Rejection preserves both public contents but may
leave heads advanced and work occupied; no physical rollback is claimed.
No native phase/Gaussian/MOVE service, row/recursive return, whole-caller
precision/error contract, global ownership theorem, complete historical
numerical allowance or analytic recovery is supplied. The new tables do not
alter paid jobs, productive targets or the selected certificate.
Credit and assistance
Prepared for @CubeJerry, with substantial OpenAI assistance in mathematical
derivation, source analysis, implementation and verification. Preserve the
preceding scalar/lifecycle package, Jose Manuel/jmbarrancoml's
#3098 lineage, ToikY's
#969 package, the exact controller replay of
#4516, Ali Romman's productive caller and
#5356 continuation source, DreamingOfClouds'
#6030 selected word, and the retained native/compiler
lineage. Separate AI review does not establish independent human or formal
proof-kernel admission.