Repository navigation
Tooling improvement: output-identical fraction-free null_exact fast path for recycled-bit --all exact nesting - #2537
Conversation
… fast path Install an integer fraction-free drop-in for PR97 linalg.null_exact (and an integer frames147.prim) at runtime from recycled-bit-integration/verify.py; frozen PR97/bit-reuse-147 files stay byte-unchanged. VERIFY_NULL=reference restores the Fraction kernel; VERIFY_NULL=audit runs both and asserts equality. Only the verify.py source pin in certificate.json changes. New package research/recycled-bit-nesting-reuse: profile, refuted late_frames basis-reuse idea (2.6% key coverage), same-input timings, equality audits, differential check and negative controls. Prepared by thakrarsagar with substantial AI assistance from Claude (Anthropic, Claude Opus 5.5). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…runs, bench.py Complete full-key equality audit (145,513 null_exact + 1,683,853 prim calls identical) and back-to-back full --all runs (VERIFY_JOBS=3): nesting stage 410 s -> 226 s wall, same five PASS lines and certificate. Add the reproducible audit/timing harness bench.py. Prepared by thakrarsagar with substantial AI assistance from Claude (Anthropic, Claude Opus 5.5). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ust scope, credits) - null_fast/prim_fast materialise their input before the type check; re-pin verify.py (e8da17f2...). - README: speedup given as ~1.44-1.81x from one pair on a loaded host (before = VERIFY_NULL=reference); late_frames time bound for the negative result; trusted-base shift and dropped-vector gap stated; 52 historical receipts; 6fd436d precedent and base pins; Python 3.12 replay not run; PR97 credit to Zhihao Chen / jacklightChen; Open next question 4 (fail-closed guard). - Reran package check and make verify-recycled-bit: same PASS lines, kappa=472154791/10^12. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
DONE: concurrent PR2560 supplied the guard during this investigation, so I abandoned a duplicate guard PR. The independent full-ledger review, exact-source artifact and measured cost are published here: #2560 (comment) Original claim preservedCLAIM (ywz65; substantial OpenAI Codex assistance): I am addressing PR2537's explicit open question about a fail-closed completeness guard for the fast integer nullspace kernel. The author reports that dropping the final null vector can still pass the downstream nesting replay; I will preserve that attribution and reproduce the missing implication on a named actual caller. Proposed contract: authenticate the fixed input A, check A*N^T=0 exactly, and certify that N is independent with rank(A)+rank(N)=the ambient dimension. Modular ranks give cheap lower bounds; a certified dimension sum can therefore prove completeness without assuming modular rank equals rational rank. If a selected prime is unlucky, use an exact rank fallback rather than silently accepting or replacing an incomplete candidate. Controls will include dropped/duplicated/perturbed vectors, modular-only zero mistakes and valid bad-prime cases. Equivalent sign/scaling choices need not be rejected merely for differing from the reference list: the guard certifies a complete rational basis, not canonical byte identity. I plan a source-bound opt-in wrapper and actual-caller reproduction with a fully charged validation/timing report. This does not amend the frozen PR97 files, recertify the full mathematical supplier, or claim a speedup before measurement. PR2537 is pinned at222063b96ec1a109a8c9f40e5d615498a737c6dd. Canonical main refreshed at selection and pivot remains0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2, priority4. The portable-replay card's baseline passed. The prior canonical-comparison and CI-navigation screens were already covered by PR2040/2214 and were discarded uncounted. Cached complete PR/Discussion overlap is supplemented with current source PR/body/comments; current Discussion coverage remains quota-limited. No duplicate completeness-guard claim was found in the bounded screen, which is not a novelty guarantee. |
Status: Tooling improvement (no κ claim; certificate content, predicates and PASS lines unchanged)
Summary
make verify-recycled-bit(research/recycled-bit-integration/verify.py --all) spends most of its exact rational nesting stage in PR97linalg.null_exact(Fraction RREF; about 72% of per-move cost by profile). This PR addsnull_exact_ff, an integer fraction-free kernel that returns the same list of rows aslinalg.null_exact(same RREF pivots/free columns, same sign, same primitive scaling), plus a fasterprim.install_null_kernelpatcheslinalg.null_exact,check_lifted.null_exactandframes147.primat runtime beforeExactis built. The frozen PR97 / bit-reuse-147 files are byte-unchanged. Non-integral or ragged input falls back to the original functions.VERIFY_NULL=referencerestores the original kernel;VERIFY_NULL=auditruns both and asserts equality.Files:
research/recycled-bit-integration/verify.py(+~88 lines), one pin line inresearch/recycled-bit-integration/certificate.json(verify.pya5508f42...->e8da17f2...), and a new note packageresearch/recycled-bit-nesting-reuse/(README, TASK/SOURCES/VERIFY.json, boundedverify.pypackage check, optionalbench.py). This follows the precedent of 6fd436d (PR218 cherry-pick), which edited the same verifier and its pin; it needs maintainer acceptance.Evidence (same shared 4-CPU host, Python 3.14.4, pinned base input)
null_exactcalls insideExact.__init__identical; kernel time 23.43 s -> 2.88 s.null_exactcalls (381.0 -> 48.7 s) and 1,683,853primcalls (70.6 -> 3.6 s), all identical.--all,VERIFY_JOBS=3: nesting stage 410 s -> 226 s wall (a second, more loaded fast run: 284 s), i.e. about 1.44-1.81x from one before/after pair on a loaded host; user CPU 825 -> 369 s. The before-run isVERIFY_NULL=referenceon the patched file. No CI speedup factor is claimed.Negative result (the original hypothesis): seeding
Exact's basis memo from the discardedlate_framesexact_basiscache covers only 2,230 of 86,789 keys (2.6%), and its whole cost is bounded bylate_frames' ~25.5 s per process (≤ ~6% of the stage). Dropped; this was the one pivot.Reproduce
python3 -B research/recycled-bit-nesting-reuse/verify.py && make verify-recycled-bitExpected:
PASS_RECYCLED_BIT_NULL_KERNEL(~30-40 s), thennull_exact kernel: fastand the same PASS lines endingPASS kappa=472154791/1000000000000 = 0.000472154791; full fallback, both suppliers and 47 constraints, with the certificate equal. Optional:research/recycled-bit-nesting-reuse/bench.py(~13 min) reproduces the audit/timing table.Negative controls (in the package check)
Sign-flipped and non-primitive kernel rows differ from the reference;
VERIFY_NULL=auditrejects a wrong kernel (this control caught and fixed a re-entrancy bug during development); with the fast kernel installed a non-nested move is reported and a degenerate framespan(1^9 0^14)is rejected; the certificate pins the currentverify.py, not the base bytes; ragged input raises like the reference and Fraction input falls back.Scope, inherited assumptions, unresolved obligations
recycled-bit-integrationwitness (analytic, fixed-tape, uniform-recursion, prime and ordinary-leaf interfaces) and correctness of the frozen PR97 /frames147.Exactpredicates.null_exact_ff. A reviewer mutant that drops the last null vector still passes the end-to-end replay (inside()only becomes more permissive); a perturbed entry fails. Equivalence rests on the proof sketch plus the complete audit on the pinned input; the package check is the guard and CI runs it only when the package changes. A fail-closed completeness guard (annihilation +len(out) >= k - rank_mod) is Open next question 4.sources()does not pin PR97linalg.py/check_lifted.py(pre-existing); the package SOURCES.json pins them at base bytes.research/community-efficient{200..1000}-audit/record the old verify.py/certificate shas; no live consumer re-hashes them; left unchanged.VERIFY_NULL=audit --allwas not run by the author (a reviewer ran default-modeVERIFY_NULL=auditto PASS);bench.pycovers the same distinct inputs.Base and pins
Base
0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2(origin/main unchanged at submission). Source pins inresearch/recycled-bit-nesting-reuse/SOURCES.json;upstream/,references/partial-gauge/pr97,research/bit-reuse-147,certificates/selected-result.jsonunchanged.Overlap and credit
PR218 (6fd436d) parallelized the unchanged checks; this replaces the dominant exact kernel and keeps the pool. PR239 / PR1461 sped up different verifiers. #2361 changes CI selection only (complementary). No open PR touches
null_exactor recycled-bit-integration (searched before submission).Credit: Douglas Colkitt (recycled-bit-integration, with OpenAI Codex); Thomas Marchand #146, William Porter #147, Rohan Gupta / gupt1156 #148, DaysSky #150; PR97 snapshot by Zhihao Chen / jacklightChen with check_lifted/linalg by Swapnil Jain; Joel Pulikkan / GamingPuzzled (PR218); CubeJerry (PR1461), RichardHoekstra (PR239).
Sprint: track 85-94 Verification engineering, seed 91; claim: #1163 (comment)
Contributor: @thakrarsagar, with substantial AI assistance from Claude (Anthropic, Claude Opus 5.5 via Claude Code, run in an automated sprint loop). Apache-2.0.
🤖 Generated with Claude Code