Skip to content

PR6066 signed halves admit exact restoration with a charged tape kernel - #6092

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
zxv:codex/reversible-signed-half-kernel
Oct 28, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
zxv:codex/reversible-signed-half-kernel

Conversation

@zxv

@zxv zxv commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Result

One signed stochastic half from PR #6066 now has an explicit reversible Boolean word and fixed-tape program. For every signed width W≥2, either sign and either resident coin, it returns the exact rounded value, preserves the coin, and retains the one parity bit needed to restore the dirty input. Reversing the program clears that residue and all W clean working cells. No extra arithmetic guard bit is required within the declared signed input range.

The literal tape program includes every head walk and both head returns. For instruction-word length L, each direction costs 2L+2 interpreter steps, with 2W+2 binary data cells, W clean work bits, one retained parity, a read-only program of L+2 fixed-alphabet cells and a fixed finite interpreter. The program length is O(W²), and its preparation/storage are charged. For example, at W=64 the positive and negative directions cost 203,002 and 386,482 steps respectively. These are explicit baseline costs, not a faster tariff.

Significance for researchers

This resolves the single signed-half lowering requested by PR #6066, with separate integer, gate and tape semantics and a complete local scratch/guard/motion ledger. It provides a concrete primitive to price when composing the optimal retained-log boundary from PR #6091. That composition, clean-work availability, resident random-bit delivery and the other scalar/native operations remain open; none is assigned zero cost.

Validation

CPython 3.12 normal and optimized registered checks pass 2,032 exhaustive signed gate cases through eight bits, 324 literal tape forward/inverse round trips, and 96 larger-width guard cases through 128 bits. Checks include signed endpoints, exact residue/work/coin cleanup, every head return, gate counts, program hashes and rejection controls. Source binding confirms the historical prefix's 18 positive and 66 negative half sites. Exact committed-byte preflight passes at 39df190f3a8a04cccb88ef1a6ca9aad39ed0364d; committed export integrity/input coverage also pass.

python3.12 -B scripts/research_package.py --package research/reversible-signed-half-kernel
python3.12 -B scripts/check_research_commit.py --package research/reversible-signed-half-kernel

Only an isolated research package is added. The resident coin and clean work are explicit caller preconditions. No full prefix/caller, physical sampler, native MOVE, selected cold replay, κ increase, independent human review or formal-kernel approval is claimed. The existing base navigation failures tracked by PR #6050 remain separate.

Open next questions

Install this kernel at one actual reached site with paid coin delivery, clean-work allocation, scalar layout and finite guard bounds. Then lower a rounded ADD and the other SCALEs, handle the inferred-residue sites of PR #6091, and total the physical word's bill before claiming a supplier or exponent effect. A faster tape layout can be compared against this fully specified baseline.

Prepared by zxv with substantial OpenAI Codex assistance. Credit Nick Petalas's PR #6026, Ali Romman's PR #5599, PR #6066's ABI and the retained source lineage. Ripple carries and reversible gate decompositions are classical; the signed stochastic-half/tape contract and source-relative invoice are the contribution. Apache-2.0.

A fresh optimized replay from the committed export also passes. Hosted run 40640170043 stops during planning on the same two unchanged base navigation failures addressed by PR #6050, before this package's scientific job can run. Local scientific checks and the shared CI blocker are separate.

@Mister-Meeseeks
Mister-Meeseeks merged commit c62bc64 into CrocSwap:main Oct 28, 2026
1 of 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