Skip to content

Research: exact restoration contracts and resource bounds for rounded borrowing - #1135

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
aliromman:codex/k9-rounded-borrowing
Oct 14, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
aliromman:codex/k9-rounded-borrowing

Conversation

@aliromman

@aliromman aliromman commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

PR #1057 proves exact restoration with three dirty arrays when every child is additive. The rounded leaves from PR #985 and the precision proof in PR #1054 do not supply that contract. This package identifies the actual borrowed boundary and proves its necessary and sufficient translation condition.

Review files: Proof and scope · Evidence · Source pins and credit.

The result is a scoped obstruction and resource tradeoff. It makes no new kappa claim.

  • An exact additive wrapper on the same arbitrary fine grid has integer slope. It cannot approximate the valid PR #985 map x -> 4x/3 with error below 1/3 on the physical interval [-1,1], even with more guard bits or unlimited restored workspace. Restricted source grids and different output grids are explicit escapes.
  • For componentwise nearest rounding of Pz/q, the safe translations are exactly Ph=0 mod q. A correction that cannot reread the old helper needs one saved state per quotient class. For a coprime scalar on L entries this gives q^L states when the admitted source and displacement ranges contain a complete residue domain. Smaller finite domains can need fewer states. Readable current data and displacement can recover the old helper without a saved summary; the proof accounts for that escape at the actual borrowing boundary.
  • A nonzero additive result from fixed signed offset averaging needs at least q variable calls. The matching q-call construction returns the q-scaled integer map. A separate exact integer lift pays for denominator growth, initialized low bits, all local operations, source access, and inverse calls. It is a comparison construction, not a fast rounded supplier.

The written proof is supported by deterministic exact checks: 716 reduced scalar ratios, 3,495,180 residue responses, all 700 normalized functions on cyclic groups of orders 2 through 5 at the emitted child boundary, six matrix quotients, 380 pinned rounded leaf executions, 22 finite exact lifts, and nine mathematical controls. A read-only relocated replay under optimized Python passes. Three real subprocess controls reject a changed pinned source, a discarded residue, and an occupied output file.

Reproduce from the repository root with the Python standard library:

OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 VECLIB_MAXIMUM_THREADS=1 python3 -I -B research/rounded-borrowing-contract/test_package.py

Expected final markers:

PASS_ROUNDED_BORROWING_CONTRACT ratios=716 responses=3495180 rounded_leaves=380 exact_lifts=22 controls=9
PASS_ROUNDED_BORROWING_PACKAGE controls=3 relocation=1

The selected-record check and all 25 selected unit tests passed on the exact experiment base. Full make verify, the selected cold replay, remote CI, and a physical tape compiler were not run. This change only adds the isolated research package. Finite replay is not a formal proof of the full multiplication theorem.

Experiment base: abdc6a7002abdbcd9e21bfc5e1a795784deacfdf. Source pins: PR #1057 78a062df1dcab2bffea5ff4d8243f3da6e465414; PR #985 da1cdf8ed4ac9b1b8378dfec73f77ff4e81a4f70; PR #1054 6bc675be1554b3a3be771147f21f9dc2c6dae50a. The package freezes exact source and context bytes. During the work, main ba82555c64e1879e4b7decce28186f208fcb8262 selected PR #1042 at conditional kappa=1672188119205421/10^18; this package does not alter that selection or any supplier call moment.

The proof, failed approaches, finite domains, overlap checks, and validation receipt are in research/rounded-borrowing-contract/. It credits Gareth Davidson (@bitplane)'s PR #1057 and the retained predecessor lineage. Prepared for Ali Romman (@aliromman) with substantial OpenAI Codex assistance in the research, proof, implementation, verification, and text. New material is Apache-2.0. No independent human or proof-assistant review is claimed.

@Mister-Meeseeks
Mister-Meeseeks merged commit 71cad44 into CrocSwap:main Oct 14, 2026
60 checks passed
@Mister-Meeseeks

Copy link
Copy Markdown
Contributor

100-PR batch review at 4c35687d7c0da8e6cf33f17e418ecf31c95ff3ad.

Merged to main, preserving the original contributor commits and package attribution.

Reviewed scope: Same-grid rounding fails the exact additive borrowed-child contract; safe-translation lattice, restricted summary-state bound and fully charged modular/integer escapes.

The pinned scoped command passed; the batch ledger contains its command, input hashes, environment and log. This incorporates the research/tooling contribution and does not change the selected κ or discharge the inherited multiplication-theorem assumptions.

Batch review, attribution and evidence. Thank you for the contribution.

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