Repository navigation
Tooling: 69× faster mixed-point Circuit.verify supports with identical receipts - #2150
Merged
Mister-Meeseeks merged 1 commit intoOct 15, 2026
Conversation
…l receipts Replace Circuit.verify's exact-|source∩target|=r set-intersection genexpr with an equivalent closed-form point-incidence mask. Package research/mixed-point-verify-masks with identical True receipts, pin-only certificate updates, and registered replay. No new kappa. Prepared by Wentao Li with substantial AI assistance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change and scope
At base
0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2, merged CrocSwap/integer-mult-bounds#1984 sped up mixed-pointscalar_checkdigests but left the generalCircuit.verifypath onscripts/experiments/mixed_point_circuit.pyon the historical set-intersection genexprProfiling on
build(30,3,3,1)shows that genexpr dominatesCircuit.verifywall time. This PR replaces it with an equivalent closed-form point-incidence mask: precomputevertex[p], then for each r-subsetUof the target keep inputs that contain every point ofUand avoid every other target point. Every output support still matches the historical checker,verifystill returnsTrue, and support admission usesrequireso it stays enforced under-O. Only the source pin forscripts/experiments/mixed_point_circuit.pychanges inside the two certificates that bind that file.Tooling improvement; no new kappa. Selected frontier untouched.
Result
On Linux / CPython 3.12.3 (Linux-6.12.94+-x86_64-with-glibc2.39), five alternating fresh-process pairs timing only
Circuit.verifyon the fixed fixture setbuild(20,3,3,{0,1}),build(26,3,3,{0,1}),build(30,3,3,1)(construction excluded) gave median wall time 8.331 → 0.121 seconds (69.03×). Timing is host-descriptive and is not a correctness gate. Every verify receipt matches the baseline checker (Truereturn and identical output-support fingerprints).Package:
research/mixed-point-verify-masks/.Validation
Expected:
Default verify is read-only. Mask nonequivalence mutant, corrupted-support
ValueError, and temp-copy digest corruption controls reject. Fullmake verify, selected cold replay, Lean, and multiplication-theorem obligations were not rerun for this isolated historical-checker change.Overlap and credit
Closest priors (different objects or delivery): CrocSwap/integer-mult-bounds#756, merged CrocSwap/integer-mult-bounds#1984 (
scalar_checkdigests on the same file; this only rewrites generalCircuit.verify), CrocSwap/integer-mult-bounds#2001 (ExclusionCircuit / DisjointTensor support masks; same style, different file/relation), CrocSwap/integer-mult-bounds#1861 (open; sameparity-side.json, different pin keys), CrocSwap/integer-mult-bounds#2117 (open; sameparity-side.json, different pin keydisjoint_tensor.py). No competing open PR on mixed-pointCircuit.verifyat refresh.Douglas R. Colkitt authored the mixed-point circuit. Prepared by Wentao Li (VictorLiwentao, @Is__Victor) with substantial AI assistance, under Apache-2.0.