Skip to content

NOR-19: streamed cached verifier cuts Python peak allocation 52.5% at 4.33x native CPU speed - #181

Merged
patrickdugan merged 13 commits into
mainfrom
research/nor19-streamed-cached-verifier-20261116
Nov 16, 2026
Merged

patrickdugan merged 13 commits into
mainfrom
research/nor19-streamed-cached-verifier-20261116

Conversation

@patrickdugan

Copy link
Copy Markdown
Contributor

NOR-19: coefficient-streamed exact cached public verifier

Continues merged NOR-18R #178. The pure MathCan companion NOR-19 #101 proves exact streamed finite-list equality, two-demo parity, and an abstract 32/4/0 materialized candidate-output buffer bound, with green Lean kernel and standard axiom checks.

Source-locked design

The original NOR-18 288-case source JSON SHA-256 is 9905aa23466b98ba2068e6daf9206d35c453b8b3b75bd27c3ab7ff8f0db4041b. NOR-19 checks all original source digests before extracting 64 previously unbenchmarked public sources, with 32 late_source, 16 signed and 16 rational cases across four cohorts. The fixture contains degree-192 public demonstrations, degree-256 public query INPUT and header, excluding planted program identities and withheld query OUTPUT.

Five fixed algorithms share the same exact public certificate semantics: original native independent16, original eager cached16, streaming query-first, preregistered streaming verify-first, and four-at-a-time chunked verify-first. Every algorithm recomputes sixteen hypothetical query outputs. Streaming compares exact integer coefficients against the public demonstration and stops on the first mismatch, retaining only four shared unary transforms for the active demonstration, without materializing any complete candidate-output vectors. All five reproduce every source's original exact mask and future-output unanimity certificate.

First measured results: 64 sources, CPython 3.12.16 x86_64

Original green Actions run: https://github.com/MoralityLabAI/Compactification-Theory/actions/runs/43804264372

Algorithm Median complete CPU Median complete tracemalloc peak Median verification-only peak
Original native 16 19.420 ms 67.13 KiB 16.89 KiB
Original eager cached 16 4.240 ms 119.43 KiB 72.98 KiB
Streamed query-first 4.268 ms 61.47 KiB 8.92 KiB
Streamed verify-first (primary) 4.235 ms 61.49 KiB 8.92 KiB
Four-output chunk verify-first 4.059 ms 62.99 KiB 19.18 KiB

The preregistered primary passed all criteria. Median paired complete Python peak ratio streaming/cached 0.474714, a 52.5% memory reduction metric, below the 0.80 threshold, with streaming lower on 64/64 sources. Median paired complete CPU native/streamed speedup 4.33448×, above the required 2.0×. Four-cohort bootstrap percentile 95% intervals [0.46918,0.48832] for memory ratio and [4.32170,4.35296] for CPU speedup, conditional on one hosted runner and four original source cohorts.

The four cached implementations perform the same 4,476,928 reciprocal integer products over these 64 public sources, whereas native independent sixteen checks repeat 28,192,768. Tracemalloc sampled each complete case and verifier-only phase in separate untimed passes. Coarse isolated-process RSS was about 28,888 KiB and did not resolve the allocation differences. CPU timing includes fresh public query-output simulation in each mode.

Source-controlled evidence and audit

Original hosted artifact ID 14198011159. The first public source fixture (1,290,607 bytes, SHA-256 97fc9ccd3830bc666e6af6d0a86d3b000ef2b8d0a7a29a406ff38fbd08707f3f) and complete original results (680,861 bytes, SHA-256 16d6ce9acb042aff76d48f46b7d07ff76a4efca1ade26314cdc52926eb0e1a16) are preserved byte-for-byte as a source-controlled ZIP at research/nor19_streamed_verifier/results/nor19_original_hosted.zip. The one-shot writer was removed.

Independent hosted receipt audit green on https://github.com/MoralityLabAI/Compactification-Theory/actions/runs/43805203218, reconstructing all 64 native exact masks/certificates, all 2240 original nanosecond samples, 640 separate memory records, 320 reciprocal bigint ledgers and 8192 bootstrap draws. Frozen receipt, executable benchmark, unit tests, standalone auditor and full protocol/result notes are included.

This is a measurable Python temporary-allocation result on previously untimed cases drawn from the same NOR-18 generator corpus. It does not claim constant total memory, cross-platform CPU results, or safety for arbitrary theorem proving. Final three-job PR CI gates merge.

patrickdugan and others added 13 commits November 16, 2026 12:22
…s with source-locked CPU and memory benchmarking
…ent peak allocation reduction at 4.33x speedup
…y profiles, 320 bigint ledgers and frozen original bytes
… CPU speedup and public-only frozen evidence
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