Skip to content

Reduce complete query-controller replay time by 37.88% (no κ) - #6395

Open
petalas wants to merge 2 commits into
CrocSwap:mainfrom
petalas:research/w8-1102a-signed-moment
Open

petalas wants to merge 2 commits into
CrocSwap:mainfrom
petalas:research/w8-1102a-signed-moment

Conversation

@petalas

@petalas petalas commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Exact integer Taylor evaluation reduces the complete frozen PR4440 caller's local median wall time by 37.88%, from 7.509418 s to 4.665133 s, with identical complete scientific results and exact exponential endpoints. Claim type: scoped implementation-equivalence proof, finite conformance and a complete-command performance measurement. No new kappa.

 retain the complete original scientific caller
- reduce Fractions throughout the separate exponential's 48 Taylor steps
+ evaluate the same polynomial with integer Horner steps
+ assemble the same geometric remainder and two exact rational endpoints
 retain every scientific check, input, expected result and rejection control

This contribution was produced by Nick Petalas. Credit ywz65's PR2552 for the integer Taylor method and explicit question about other retained interval engines. Cinna Davis's PR4440 and the retained zxv, Jacob Alan Sussman, native, BIT, compiler and outer lineage supply the scientific caller. Integer arithmetic and Horner evaluation are standard. The new step is the exact fixed-loop/remainder implementation and source-specific complete-command improvement. Frozen sources and credit lines retain their bytes.

Evidence

Five alternating fresh-process pairs on CPython 3.12.15, macOS 27.0.1 arm64, with concurrent work on an 18-logical-CPU host:

  • Baseline median 7.509418 s, range 7.328053–8.100158 s.
  • Candidate median 4.665133 s, range 4.486905–4.762185 s.
  • Zero failures across ten full processes. All 98 exponential calls and 4,704 loop steps remain. Complete scientific output and ordered exact-call trace hashes agree. Startup, imports, source authentication, the whole caller, complete receipt comparison, trace hashing and full output serialization are timed. Profiling is outside timing; Fraction/gcd work in rational tail certification is the affected cost. No timing threshold runs in CI.

The written endpoint proof preserves the source's terms j=0 through 48 and F/(1-x/50) remainder exactly. Its earlier integer-Taylor predecessor uses a different stopping rule, dyadic output rounding and another remainder; those contracts are not silently transferred.

Local checks pass:

  • Warning-strict normal and optimized direct commands, each about 30 s, and both registered commands, ending PASS_REGISTERED_RESEARCH_PACKAGE.
  • Direct equality of every ordered exact exponential input/output tuple and the entire retained scientific result.
  • 158 independent powers/factorials oracle cases, seven boundary rejections and three actual arithmetic mutants. The exact endpoint guard rejects an omitted tiny remainder even if a displayed result survives.
  • Metadata and all 26 source pins; exact committed bytes, modes and full declared source ancestry; official 35-payload-file export and declared-input coverage.
  • Normal and optimized read-only Git-free replay with an empty executable PATH, preserving all 36 exported files and modes. Actual exported-source corruption rejects at the SHA256 binding guard. The final metadata-only head also passes an optimized read-only exported replay.

Scientific implementation commit: 83e5af122c3eef1e4c21d4a84b16b7b7cb923e23. Head 541729c38176ed96359d88ac99fb1587a7db795a only clarifies metadata wording about exact rational output without dyadic rounding. Source bindings use canonical main 7c49fe32c55de02c2c873655c804b16e4c3fef0a, priority revision 8, refreshed before publication.

Reproduce from the repository root, using the actual local interpreter path:

/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -B research/query-controller-integer-taylor/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -O -B research/query-controller-integer-taylor/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/query-controller-integer-taylor
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/query-controller-integer-taylor --check-source-history --check-modes
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -B research/query-controller-integer-taylor/benchmark.py --pairs 5

Another CPython 3.12 executable may replace that path. Standard library only. Generated receipts and benchmark reports go to stdout; redirect them outside the checkout. The package README records all raw timing samples, hashes, environment, proof and limits.

Limitations and unrun obligations

The implementation domain is exact int/Fraction x with 0<=x<1 and numerator/denominator bit lengths at most 16,384. The adapter is local to a fresh process. The performance result covers this exact caller and host; no universal speed guarantee or automatic production migration is claimed. Managed Python allocation is a documented bounded-runtime deviation.

This is implementation work, not a new scientific audit or admission of PR4440. No native all-width theorem, physical multiplier, selected cold replay, Lean, Docker or full supplier admission was run. The selected frontier and five framework assumptions remain. Independent human and formal proof-kernel review are unclaimed. No registered check was deferred solely to CI.

Open next questions

Can a source-specific integer evaluation help another exact moment engine with a different polynomial or remainder? First pin that engine, derive its exact endpoints and time its unchanged complete caller. No further optimization or migration is reserved.

Related open work

No open submission for this exact exponential engine or complete PR4440 runtime workload appeared in the live engine/caller searches. Adjacent caller and compiler work has separate contracts and quantities:

The completion refresh inspected all 15 account PRs still open and created since the advance CLAIM at 2026-11-02T19:33:12Z, including this PR. The other 14 are #6381 through #6394. None studies this exact fixed-step exponential, its exact endpoint trace or the complete PR4440 runtime measurement. The related distinctions above remain. No disagreement on a common computed quantity was identified, and no extra computation checked another contribution's numbers. Main, merged keyword, live claim and local reservation checks supplement the body searches; unpublished work and arbitrary historical diffs remain outside coverage.

CI notes

Both hosted checks passed at exact head 541729c38176ed96359d88ac99fb1587a7db795a in Registered research packages run 41514316445. The completed check list was read once with gh pr checks 6395 --repo CrocSwap/integer-mult-bounds: plan passed in 3m41s, and replay (research/query-controller-integer-taylor) passed in 3m38s. Separate run metadata confirms status completed, conclusion success and the matching head.

Hosted success covers execution of the registered normal/optimized finite replay and its metadata/source checks. It does not establish the local timing percentage, independent scientific acceptance or a formal-kernel theorem. Every listed registered, committed/source-history and export check also passed locally. No CI failure remains.

Merge Danger

Door: two-way. Blast radius: isolated.

Only nine files in a new opt-in research package are added. Shared code, frozen evidence and selected-frontier files are unchanged.

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.

1 participant