Skip to content

Replace 119 periodic inverse updates with a certified direct solve - #5260

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
aliromman:codex/periodic-gaussian-direct-solve-20261023
Oct 23, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
aliromman:codex/periodic-gaussian-direct-solve-20261023

Conversation

@aliromman

Copy link
Copy Markdown
Contributor

Result and scope

Replaces 119 whole-period Gaussian inverse updates with a certified sparse direct solve on the original Reference(384,1,2,4,18,320). All 385 outputs, true periodic entries, hole 192, arbitrary signed complex input and the original 33-bit input/output grid remain covered. An exact factor certificate proves the error bound for every allowed input, including the internal word-size bound.

Proof and complete cost boundary, exact receipt, solver, local timing trials, and source pins.

The solve uses 1,398 integer products versus 731,136 in the retained weighted recurrence. Preparation adds 319 factor products, 349 divisions and 668 certificate products. The solve includes 2,310 component divisions/truncations and all final output rounding. Internal arithmetic uses 48 fractional bits with checked 128-bit magnitude limits; input/output remain on the 33-bit grid.

In five sequential local trials, median factor preparation plus solve was 0.00823 s versus 0.19839 s for the recurrence, about 24x faster. With retained factors, the median solve was 0.00320 s, about 62x faster. Shared original-source generation took 77.27 s. These are consumer timings on a shared macOS host, not equal cold-start or complete multiplication speedups. Exact product counts do not equate multiplication, division, rational certification and movement costs.

The universal input error bound is below 2.324e-7; the full inherited-analytic target is 2^-20. This is a constructive finite-source host-array result. It does not admit a physical tape implementation or a production parameter family. The complete kappa calculation and selected 60403/20000000 are unchanged.

Method and predecessor credit

Jose Manuel supplied the immutable rational Reference. JoyboyBrian supplied the complete all-output service in PR #5159 and the 119-update weighted improvement in PR #5216. Their coefficient producer, gap and analytic budget are retained.

Dugongue's PR #4554 already gives a native band/Woodbury construction; see its proof and Ryanson Jonathan's independent audit. Classical elimination and periodic band solving are not claimed as new. The existing executable requires off-diagonal norm at most one quarter; this actual fixture exceeds one half.

The added boundary uses the exact sparse residual eta=||LU-Hhat||<d, where d is the original row gap. This gives a certified inverse margin without weakening the predecessor's contract. The proof pays coefficient error, both triangular solve errors, internal ranges and final grid truncation. The source support and period crossings are retained. No frozen predecessor file is changed.

Prepared for Ali Romman with substantial OpenAI Codex assistance; Apache-2.0. Earlier Gaussian and precision contributors remain credited in the source notices.

Validation and overlap

CPython 3.12.13, standard library:

python3.12 -B scripts/research_package.py --package research/periodic-gaussian-direct-solve

Expected markers:

PASS_PERIODIC_GAUSSIAN_DIRECT_SOLVE products=1398 previous_products=731136 no_new_kappa
PASS_REGISTERED_RESEARCH_PACKAGE research/periodic-gaussian-direct-solve outcome=completed

Normal and optimized registered replay pass. The checker regenerates the original source and checks all 148,225 original entries and the exact returned residual. It replays the retained 119-update comparator. An independent pivoted rational solver checks 105 complex right-hand sides on 35 matrices. Ten small rejection controls and the actual dropped-periodic-entry control pass. Four real code mutations fail with assertions disabled, including a suppressed factor defect and wrong output-grid conversion. A separate one-row control rejects an unfunded uniform word size.

Exact source pins, base ancestry, committed-byte preflight, official export integrity and a Git-free read-only optimized exported replay pass. The full-history wrapper is unrun in this shallow checkout. No independent human or proof-kernel review, physical/native admission, selected cold replay or archive-wide sweep ran.

Base and last refreshed canonical main: ff3cc58e370d0f678e529246f8c73e8094e18fcf, priority 7. This takes the periodic-service handoff and changes the generic audit card to a constructive caller algorithm. The final overlap scan covered 323 open PRs, 4,524 Discussion records and 134 of 7,091 local notes. Its focused matches were this claim and task. Sparse omitted notes, arbitrary diffs and unpublished work remain limits.

Open next question

Bind the factor owner to one admitted physical caller and pay setup, ordered tape delivery, retained storage and restoration. A production-family result also needs uniform fill, certificate-success and word-width bounds. The present finite-source consumer saving does not discharge those obligations.

@Mister-Meeseeks
Mister-Meeseeks merged commit 3b785d5 into CrocSwap:main Oct 23, 2026
2 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