Skip to content

Tooling: 69× faster mixed-point Circuit.verify supports with identical receipts - #2150

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
VictorLiwentao:cursor/mixed-point-verify-masks-60b9
Oct 15, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
VictorLiwentao:cursor/mixed-point-verify-masks-60b9

Conversation

@VictorLiwentao

Copy link
Copy Markdown
Contributor

Change and scope

At base 0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2, merged CrocSwap/integer-mult-bounds#1984 sped up mixed-point scalar_check digests but left the general Circuit.verify path on scripts/experiments/mixed_point_circuit.py on the historical set-intersection genexpr

sum(1<<i for i,source in enumerate(inputs) if len(set(source)&set(target))==r)

Profiling on build(30,3,3,1) shows that genexpr dominates Circuit.verify wall time. This PR replaces it with an equivalent closed-form point-incidence mask: precompute vertex[p], then for each r-subset U of the target keep inputs that contain every point of U and avoid every other target point. Every output support still matches the historical checker, verify still returns True, and support admission uses require so it stays enforced under -O. Only the source pin for scripts/experiments/mixed_point_circuit.py changes 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.verify on the fixed fixture set build(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 (True return and identical output-support fingerprints).

Package: research/mixed-point-verify-masks/.

Validation

python3.12 -I -B research/mixed-point-verify-masks/verify.py
python3.12 -I -O -B research/mixed-point-verify-masks/verify.py
python3.12 -B scripts/research_package.py --package research/mixed-point-verify-masks
python3.12 -I -B research/mixed-point-verify-masks/benchmark.py --rounds 5

Expected:

PASS_MIXED_POINT_VERIFY_MASKS verify_cases=11 mask_cases=3994 certs=2 no_new_kappa
PASS_REGISTERED_RESEARCH_PACKAGE research/mixed-point-verify-masks outcome=completed
PASS_IDENTICAL_MIXED_POINT_VERIFY_MASK_RECEIPTS

Default verify is read-only. Mask nonequivalence mutant, corrupted-support ValueError, and temp-copy digest corruption controls reject. Full make 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_check digests on the same file; this only rewrites general Circuit.verify), CrocSwap/integer-mult-bounds#2001 (ExclusionCircuit / DisjointTensor support masks; same style, different file/relation), CrocSwap/integer-mult-bounds#1861 (open; same parity-side.json, different pin keys), CrocSwap/integer-mult-bounds#2117 (open; same parity-side.json, different pin key disjoint_tensor.py). No competing open PR on mixed-point Circuit.verify at refresh.

Douglas R. Colkitt authored the mixed-point circuit. Prepared by Wentao Li (VictorLiwentao, @Is__Victor) with substantial AI assistance, under Apache-2.0.

…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.
@Mister-Meeseeks
Mister-Meeseeks merged commit 21ec98b into CrocSwap:main Oct 15, 2026
48 of 61 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