Skip to content

Tooling: 44× faster production verify_factor via packed-row equality with identical receipts - #2194

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
VictorLiwentao:cursor/central-factor-packed-production-60b9
Oct 15, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
VictorLiwentao:cursor/central-factor-packed-production-60b9

Conversation

@VictorLiwentao

Copy link
Copy Markdown
Contributor

Change and scope

At base 0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2, scripts/experiments/complex_centers.py:verify_factor still used the historical nested entrywise loop over all scatter/gather pairs. Ross Richardson’s opt-in adapter research/central-factor-packed/ already proved an injective packed-row algorithm with identical receipts. This PR wires that equivalent check into the production source used by scripts/audit_complex_centers.py / make verify-certificates.

Only the source pin for scripts/experiments/complex_centers.py changes inside certificates/dyadic-central-factor.json. Every coefficient is still checked; factor generators, side/phase obligations and the retained historical 2^-31 language are unchanged.

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 gave median wall time:

  • factor-only: 2.615 → 0.059 seconds (44.06×)
  • complete audit: 5.784 → 3.356 seconds (1.72×)

Timing is host-descriptive and is not a correctness gate. Every verify_factor receipt matches the baseline checker fieldwise.

Package: research/central-factor-production/.

Validation

python3.12 -I -B research/central-factor-production/verify.py
python3.12 -I -O -B research/central-factor-production/verify.py
python3.12 -B scripts/research_package.py --package research/central-factor-production
python3.12 -I -B research/central-factor-production/benchmark.py --rounds 5

Expected:

PASS_CENTRAL_FACTOR_PRODUCTION heights=[8, 10, 12, 18, 26] ... no_new_kappa
PASS_REGISTERED_RESEARCH_PACKAGE research/central-factor-production outcome=completed
PASS_IDENTICAL_CENTRAL_FACTOR_PRODUCTION_RECEIPTS

Default verify is read-only. Coefficient-mismatch and temp-copy corruption controls reject; require gates remain under -O. 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 delivery): Ross Richardson’s research/central-factor-packed/ (opt-in packed adapter; this is the production wiring), CrocSwap/integer-mult-bounds#756, CrocSwap/integer-mult-bounds#2117 (same dyadic-central-factor.json, different pin key disjoint_tensor.py). No competing open PR on production verify_factor at refresh.

Douglas R. Colkitt authored the dyadic central factor and original checker. Ross Richardson authored the packed algorithm. Prepared by Wentao Li (VictorLiwentao, @Is__Victor) with substantial AI assistance, under Apache-2.0.

Wire Ross Richardson's injective packed-row central-factor check into the
shipped scripts/experiments/complex_centers.py path used by
audit_complex_centers / verify-certificates. Factor receipts stay fieldwise
identical; certificates/dyadic-central-factor.json changes only that source
pin. Sibling pin-restore tests accept the new complex_centers hash.

Package research/central-factor-production/ with baseline, verify, benchmark
and RESULT.json (Linux/CPython 3.12.3 medians: factor 44.06×, audit 1.72×).

Prepared by Wentao Li with substantial AI assistance.
@Mister-Meeseeks
Mister-Meeseeks merged commit c22e42d into CrocSwap:main Oct 15, 2026
55 of 61 checks passed
kumagi added a commit to kumagi/integer-mult-bounds that referenced this pull request Oct 20, 2026
…tree

The packed central-factor audit (batch batch952) refuses to start on
the current tree: admit_sources() rejects at the first stale pin
(reproduced independently; also reported in CrocSwap#1166). Five pinned files
legitimately changed in main after the recorded base 47481c8 ("Record
publication and merge confirmation for all eighteen PRs"), each via an
identical-receipt tooling integration:

- certificates/dyadic-central-factor.json (c22e42d, PR CrocSwap#2194
  integration regenerated the certificate with current source hashes;
  the central_factor bytes are unchanged)
- scripts/exclusion_circuit.py (d7d8bfc, d8029ee)
- scripts/experiments/complex_centers.py (f0c58a2)
- scripts/experiments/disjoint_tensor.py (3e917c5)
- scripts/shared_point_circuit.py (ff889cc)

verify.py compares its regenerated complete receipt byte-for-byte
against the current ROOT/certificates/dyadic-central-factor.json, so the
full audit could never pass with the stale set regardless of the
workflow trigger. After the repin the complete historical audit passes
on the unmodified current tree: PASS_CENTRAL_FACTOR_PACKED,
receipt_sha256 2aabc7e3..., with adapter pins (packed.py, verify.py)
untouched, and test_packed.py passes in both -B and -O -B modes.
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