Skip to content

Coupled inverse rounding restores dirty inputs in the PR6026 scalar prefix - #6066

Merged
Mister-Meeseeks merged 3 commits into
CrocSwap:mainfrom
zxv:codex/reversible-stochastic-shears
Oct 28, 2026
Merged

Mister-Meeseeks merged 3 commits into
CrocSwap:mainfrom
zxv:codex/reversible-stochastic-shears

Conversation

@zxv

@zxv zxv commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Result

The historical scalar prefix in Nick Petalas's PR #6026 admits an exact logical compute–accumulate–uncompute interface that preserves its fresh stochastic forward law. It restores all 748 arbitrary dirty working values, leaves the random tape unchanged and clears 84 owned parity bits.

A dyadic stochastic ADD is inverted with its complemented matched coin:

$$ S(-n,d,d-1-U)=-S(n,d,U). $$

A signed half-SCALE instead saves one parity bit. Its inverse reconstructs the input and clears that bit by recomputing the parity. One bit is locally necessary for that isolated halving; global optimality of the 84-bit source log is not claimed. Fresh coins are used across forward events, while only matched inverse events reuse them.

After copying the rounded result to disjoint arbitrary dirty output accumulators, the complete endpoint is

$$ (x,y,U,0)\longmapsto(x,y+F_U(x),U,0), $$

where $F_U$ is the forward rounded map. The logical source ledger is 19,926 arithmetic macros, 11,713 read-only random bits read twice, and 84 residue bits returned clean, per real stream sample. These are macro/resource counts, not a physical bit-operation or tape tariff.

Significance for researchers

This supplies the scalar random-tape and dirty-restoration lifecycle asked for by PR #6026, while preserving its forward rounding distribution. Its error bound is a cited source premise, not an independently strengthened concentration result. A complete native caller remains open: physical random sampling, reversible integer arithmetic, finite guard widths, scratch cleanup, the next MOVE and the full bill are not supplied. No new supplier or κ is claimed.

The exact source is the archived PR #5599 prefix used by the predecessor. It is deliberately not transferred to the different currently selected PR #6030 word.

The restored tape may be correlated with the retained rounded output. It cannot automatically serve as fresh randomness for a later adaptive call; new independent coin blocks or a separate conditional-error proof are required. An exact two-shear counterexample checks this limitation.

Validation

CPython 3.12.8 normal and optimized registered checks pass 1,023 signed coin identities, 516 signed-half recoveries, 784 changing-source tiny protocols with exact unbiased means, and 16 complete 9,589-event source-bound protocols. The entire word's opcodes, coefficient classes, 84 halvings and 11,713-bit tape ledger are reconstructed from authenticated source bytes. Missing parity, uncomplemented inverse coins and invalid domains reject. All checks use exact integer/rational arithmetic; the full-word tapes test pathwise restoration rather than estimate a tail by Monte Carlo.

Committed bytes pass. The optional full-history preflight is unavailable in this shallow checkout; source pins use the reachable base. The navigation repair from PR #6050 is included, with frozen packages unchanged. No selected or native cold replay, proof assistant or independent human review is claimed.

Fresh read-only Git-free export replay also passes at head 2711ca28367c5bbbb54ce9601928e885d87ca165, under optimized isolated CPython with empty PATH/PYTHONPATH; exported file hashes remain unchanged. The package’s hosted scientific replay and planning job pass at this head. Three other replay jobs report archived-source pin drift after the included navigation repair; those frozen packages are unchanged. The canonical investigation and remaining obligations are in Discussion #6073.

Open next questions

Lower one signed-half macro to an explicit reversible integer/tape program with its complete scratch and guard ledger. Separately, test whether chronological half/double structure can reduce the 84 parity bits, and bind the next native MOVE before propagating the copied-output error to a full caller.

Prepared by zxv with substantial OpenAI Codex assistance. The stochastic prefix, its influence proof, the source word and all predecessor attribution remain unchanged. Antithetic sampling, residue retention and compute/uncompute retain their classical status.

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