Skip to content

Construct a corrected two-guard reciprocal (no new κ) - #5989

Merged
Mister-Meeseeks merged 2 commits into
CrocSwap:mainfrom
petalas:research/w8-1022af-frontier-obstruction
Oct 28, 2026
Merged

Mister-Meeseeks merged 2 commits into
CrocSwap:mainfrom
petalas:research/w8-1022af-frontier-obstruction

Conversation

@petalas

@petalas petalas commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A changed seeded reciprocal routine meets |1-cy| < 2^(-p-1) for every real 1 <= c < 2 and positive integer p using two fractional guard bits per Newton stage and a bounded final correction. For p>=4, maximum rounded precision is p+2 instead of the credited three-guard routine's p+3. The fixed six-bit warm-up remains.

Claim type: scoped written mathematical proof and explicit numerical construction with exact finite corroboration. This answers Charles Bethin / cbethin's changed-schedule question in #1655. It changes both the intermediate schedule and the final correction; the unchanged-schedule lower bound remains intact. No new kappa or runtime saving is claimed.

six-bit warm-up at x=5/8; start m=2
advance m to min(2m-1,p), round at t=m+2
minimize the exact prefix residual over at most 13 adjacent grid values

The proof establishes the weaker stage invariant |1-cx|<2^-m, proves the window contains the nearest reciprocal of the truncated input, and transfers its residual to the true input. The correction uses at most thirteen integer products and twelve score comparisons. The complete routine uses 2(L+1) Newton products, where L=ceil(log2(p-1)) for p>=2 and zero otherwise; prefix reads and other arithmetic remain charged. It assumes exact intermediate products before rounding.

The proof, construction and verifier were produced by Nick Petalas. Credit cbethin #1655, ToikY #1638, Hanson Sun / bbMisk #1528, Ross Richardson #1678 for separate fixed-schedule context, and the retained manuscript and classical Brent/Newton lineage. The predecessor results are cited rather than audited or replayed. Binary rounding and nearest-grid correction are classical.

Evidence

  • Before: the credited routine uses three fractional guard bits. Research: sharp residual guard count for the seeded reciprocal #1655 excludes two for its unchanged schedule and explicitly leaves a changed schedule open.
  • After: the written induction covers every normalized real input and every positive target. Exact enumeration checks 32,896 half-open real-input cells for targets 1–12, including both residual endpoints. Separate integer-significand traces and an exact-division selection oracle agree. Another 95 cases reach 4,096 bits; twelve input/result corruption controls reject.
  • At c=127379/65536, p=15, this new routine returns 16859/32768 with residual 1087/2147483648 < 2^-16.
  • CPython 3.12.15 warning-strict normal and optimized registered commands passed locally in 1.40 s and 1.43 s. The package launcher passed in 3.22 s. Generated output receipts bind the package files and live source hashes.
  • Committed-byte and source-history validation passed at cd0caac542b147743f273d6e3377a0eec3e4b6e4, covering seven package files and two declared source documents. Whitespace and syntax checks passed.

From the repository root:

~/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/reciprocal-two-guard-correction
~/git/integer-mult-bounds/.venv/bin/python3.12 -W error -B research/reciprocal-two-guard-correction/verify.py
~/git/integer-mult-bounds/.venv/bin/python3.12 -W error -O -B research/reciprocal-two-guard-correction/verify.py
~/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/reciprocal-two-guard-correction --check-source-history

Expected markers: PASS_TWO_GUARD_RECIPROCAL, PASS_REGISTERED_RESEARCH_PACKAGE, PASS_RESEARCH_COMMIT_BYTES.

Limitations

The finite implementation accepts rational inputs with numerator/denominator sizes at most 16,384 bits and targets through 4,096. The written theorem has no such caps. The result is a downstream numerical corollary, outside the selected supplier. It assumes exact products and binary-prefix access. The extra correction products prevent a runtime conclusion from the one-bit precision reduction alone.

Guard optimality, a smaller correction window, correctly rounded inversion, bit-time/tape/storage costs, root/recovery integration, selected-assumption discharge and the complete multiplication theorem remain unproved. No formal proof-kernel run or independent human review is claimed. The selected frontier and all predecessor files remain unchanged.

Open next questions

  • Prove a sharper signed pre-correction bound and reduce the candidate window or product count.
  • Determine whether a changed one-guard/input-prefix contract can attain the true-input residual bound.
  • Bind the complete prefix/product/correction/storage interface to one actual root/recovery caller before pricing a physical implementation.

Related open work

No other open PR studying this seeded numerical reciprocal was found in the live PR/Discussion and main searches. #1638, #1655 and #1678 are merged predecessors on the same numerical interface. This construction changes the schedule and adds a correction; it does not contradict or revalidate their fixed-schedule results.

  • #5986 improves a Gaussian matrix inverse's locality polynomial and radius under retained norm premises. This PR concerns scalar reciprocal residual guards; the two results compute no common numerical quantity.

The nine other open account PRs created since the CLAIM were inspected: #5982, #5983, #5984, #5985, #5986, #5987, #5988, #5990 and #5992. They study Walsh tape cuts, G20 helper splits and carry dispatch, the outer ledger, Gaussian inverse locality, cached chirp movement, frame span, fused connector reads and pooled R437 moments. None computes a competing guard value for this seeded scalar reciprocal. No additional mathematical computation was run to compare other contributions.

CI notes

Both hosted checks passed at exact head cd0caac542b147743f273d6e3377a0eec3e4b6e4: plan in 4m48s and replay (research/reciprocal-two-guard-correction) in 2m59s, in run 40571446634. The completed check list was read once, and the successful run head matches the PR head. Hosted replay certified the registered normal and optimized bounded package checks. Local replay and committed-byte/source-history checks also passed. CI does not establish independent human or proof-kernel acceptance of the written proof or the unpriced physical caller.

Advance claim: #1166 (comment)

Merge Danger

Door: two-way.

Blast Radius: isolated.

Only research/reciprocal-two-guard-correction/ is added. No shared runtime, workflow, frozen predecessor or selected-result record changes.

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