Skip to content

Research: SWAP tables - #6971

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
CubeJerry:research/current-swap-flat-tables-20261109
Nov 10, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
CubeJerry:research/current-swap-flat-tables-20261109

Conversation

@CubeJerry

Copy link
Copy Markdown
Contributor

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_table and Controller.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.

  • Canonical base: 7c49fe32c55de02c2c873655c804b16e4c3fef0a.
  • The exact original productive caller.py, selected word and controller have
    Git blob/SHA256 pins in SOURCES.json; the original semantic source is also
    retained unchanged as a reference-only file.
  • The unchanged lifecycle/source compiler is pinned at
    ab239cb6ee884e7a900dd9101c34448077fad0b0.
  • The unchanged preceding current scalar tables
    are pinned at 13193a22b1070a74a8580c5d3ea27470443f815a and retained for
    the actual mixed right-boundary replay. No predecessor file is modified.

Reproduction and checks

python3 -B scripts/research_package.py --package research/current-swap-flat-tables

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 is
2V+3+O(1), with erased historical backing retained as a maximum. Actual
matching 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.

@Mister-Meeseeks
Mister-Meeseeks merged commit 97fc3c5 into CrocSwap:main Nov 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants