Skip to content

Tooling: exact Gram prefix reuse with pinned equivalence and timing evidence - #707

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
cbethin:codex/seed88-gram-prefix-performance
Oct 13, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
cbethin:codex/seed88-gram-prefix-performance

Conversation

@cbethin

@cbethin cbethin commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

The selected R420 Gram checker recomputes determinants for a full matrix and its leading principal blocks. This adds an optional, source-pinned adapter that supplies those exact values from one Bareiss pass, with the original pivoted determinant as the zero-pivot fallback.

Status: tooling improvement with a scoped performance result; no new κ. Determinant batches improve by 1.84–2.01× across four retained 31-pair local runs. Complete-process wall timings vary in direction; this PR claims no reliable full-check wall speedup. The README records every run, including slower results and a follow-up with child CPU measurements. Default verification commands, frozen inputs, upstream/, and the selected frontier remain unchanged.

Reproduce with Python 3.11+ and the standard library:

python3 -B research/gram-prefix-performance/verify.py
python3 -B research/gram-prefix-performance/test_kernel.py --mutations
python3 -B research/gram-prefix-performance/benchmark.py --pairs 31 --out /tmp/gram-prefix-result.json

Use a fresh output path. Expected: 23 tests pass, four kernel mutations are detected, and PASS_GRAM_PREFIX_BENCHMARK. The benchmark uses POSIX resource on macOS or Linux.

Validation completed locally:

  • All 3,360 actual determinant requests across 672 selected frames agree exactly; all complete checker outputs match. The original rank, annihilator, prime-witness, residual, and positivity checks execute unchanged.
  • 23 tests pass on Python 3.13 and 3.14, including complete frame regeneration from the pinned R420 word. A minimal offline checkout in a path with spaces also passes.
  • Independent permutation-oracle tests cover small matrices, including all 530 binary matrices of dimensions 1–3. Seed-88 larger cases and determinant identities reach dimension 16.
  • Four broken kernels are detected. Frame/source corruption, singular and indefinite Gram cases, invalid witnesses, disabled assertions, and output reuse are rejected. Tested mathematical rejection arguments agree across engines.
  • The selected source-inventory check and whitespace check pass. The exact prefix identity, fallback contract, and bounded cache argument are documented.

Base: 66849e1475c930fd7732b1a0067ffee7e1e95f60. OS-random assignment seed: 88, verification engineering. There is no pinned sprint coordination issue, so the claim is local. Initial overlap review covered 513 open PRs; the final refresh through #704 found distinct scopes. PR239 uses dual Gram matrices; PR367 optimizes rank/canonical bases; PR452 shares producer prefixes; PR662/667/672 optimize other exact kernels. None is a code dependency.

Credit: Dylan Crow's Gram checker/exporter, DreamingOfClouds' prime-witness determinant, eumemic's selected R420 supplier, and the retained construction lineage. Prepared for Charles Bethin with substantial OpenAI Codex assistance; Apache-2.0. NOTICE.md gives detailed attribution.

The full repository suite, supplier cold replay, assembly, and Lean were not rerun for this isolated adapter. Dedicated Linux CI is supplied, with remote status separate from local evidence. All inherited compiler, hosting, precision, tape, and analytic assumptions remain. This is not a formal proof of the full multiplication theorem.

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