Repository navigation
Research: Compact rounded ADD - #6990
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.
Summary
The literal rounded scalar predecessor leaves the current large-numerator
ADD class unbuilt because its direct carry graph grows with numerical
coefficient size. This package supplies a compact two-bank fixed-rational
ADD table, an all-size signed/cancellation/lifecycle proof, and three exact
current source witnesses. No new kappa and no complete caller admission.
For fixed reduced q=a/b, b=2^d o, L=max(bitlength|a|,bitlength b), K=L+2,
the table forms the signed widened numerator bx+ay+floor(b/2) by L
binary Horner passes. Each pass has carry bounded by 4. A signed residue
scan, exact odd quotient and low-bit discard implement total nearest-up
rounding. The graph has O(LK+o²+Ko) states/rows, with the explicit current
restriction o<=125. This is not a logarithmic-size arbitrary-divisor claim.
The complete sum is checked after division, preserving cancellation even
when the separate product exceeds the public width. Per-component numerator
markers provide rewind geometry, so the service needs exactly the existing
two private work roles. All components are staged before public installation.
Exact result and source pins
Canonical parent:
7c49fe32c55de02c2c873655c804b16e4c3fef0a.The source is DreamingOfClouds' #6936 at tested
head
03626137d0bd57f09b0bf9597376183ce6fa9683. Its laterd360b1182b6d21b1ee2354856abcb50646ad618bchanges only VERIFY.json timeout;the tested word pin remains unchanged. Six immutable dependencies have
exact commit/path/Git-blob/SHA-256 receipts in
DEPENDENCIES.json.The current coefficient census contains 61,052 ADD and one COPY event,
4,462 reduced coefficients, L<=24 and o<=125. Only three exact local ADD
tokens are constructed and registered:
These represent the largest coefficient, odd denominator and denominator
two-adic power. The old direct carry bound at 252 would be 14,975,296;
that large graph is not instantiated. COPY's caller zero-target contract
is not inferred from generic ADD and no COPY token is installed here.
Complete primitive bill and limits
For R components, S=sum(w_i+1), U=1+S+(K+1)R, initial contiguous dirty
lengths A_N,A_O and borrowed context charge Q_c, the proof gives
for physical tape actions plus executed control rows. Every source reread,
reversal, widening, staging, copying, head reset and retirement is retained.
Historical private backing is max(H_N,3U)+max(H_O,3S), plus inherited
public/context/ancestor and finite-controller storage. Positive finite
coefficient/table/source setup is separate. No exchange rate to an old
supplier tariff or optimistic rounded-scan margin is asserted.
Canonical encoding, matched common-grid shapes, physically distinct tapes,
public origin heads and contiguous old private bodies are explicit premises.
Successful calls preserve source/contexts, restore heads and retire private
history. Detected failure before installation protects the whole public
field but may leave work and heads dirty. This is an actual unchanged
Controller.primitive/execute_tableservice, not host arithmetic onruntime payloads, but it does not execute the complete recursive Controller.
Reproduction and verification
Expected: four PASS_COMPACT_ROUNDED_ADD_* lines. Registered attempts have
120-second caps; standard library only and no runtime Git/network/solver.
The independent direct-floor oracle covers 1,952 exhaustive pairs plus
signed endpoints and W<d. Literal history tests include dirty long-to-short
reuse, late overflow and failure reuse, source/context preservation and
canonical shape errors. Five arithmetic mutants are detected. The proof,
not the finite tested widths, establishes the universal statement.
VERIFY.jsonand the four JSON receipts define exact replay coverage.A separate lead AI reviewed the proof/cost and independently ran 219 mixed-
width fields (139 successes,80 correct overflow rejections), including all
source maxima, dirty history and displaced context heads. Its unchanged
script and receipt are included with exact reviewed hashes in
REVIEW.md.Novelty, credit and open obligations
Prepared for @CubeJerry, with substantial OpenAI assistance in proof,
implementation, source analysis and verification. Credit DreamingOfClouds'
#6936 and #6937;
CubeJerry's lifecycle/exact-scalar predecessors and rounded-scalar package
at
6476455a1cf7cd29d6a2a81c3b6f02fd3a3bbf57; the source precision packageat
56bc9383594a3efc303148e00bb746851abd1ed5; canonical signed-streamarithmetic; and NickPetalas' #3094 one-carry
circuit work. Binary Horner arithmetic and division are classical.
OVERLAP.mdrecords the bounded predecessor check.REVIEW.mddistinguishesindependent AI mathematical checks, physical execution and regression replay.
The new result is the compact literal current arithmetic/lifecycle join,
its cancellation-safe signed proof and full positive cost, and actual large
coefficient source witnesses. Full catalogue construction/recursive bindings,
native operators, formats/error/owned history, complete physical supplier
invoice and outer recovery remain open. The five inherited assumptions are
not globally discharged. No selected certificate or accepted exponent changes.