Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion certificates/affine-vector-screens.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
"scripts/experiments/affine_vector_screens.py": "756778eeca27f490adc7354a122dc50c40375156259991469c47a90949118ea1",
"scripts/experiments/affine_vector_witnesses.json": "672a4318c48f5286ce088d34736c38957b7f662a5f753d440dbc638e7da5f62a",
"scripts/experiments/cube_core_family.py": "e58f1f4067bda2d4838343f42ec2505316f006561f0702e869847d88b85413a8",
"scripts/experiments/single_intersection.py": "08ddae46e5621a5b4c525b504e67ae655abe9b49461d894feaa7abc89a51847d"
"scripts/experiments/single_intersection.py": "6874d41b75590369182ed61e0c6da5b547e035e0e43b50ea2b39e1f3861dca6d"
},
"status": "NINE SPECIFIED CENTRAL MATRICES REJECTED; NO NEW KAPPA",
"upstream_commit": "adc7f1241b42e322a6451854ab7e4b4c146bf78a"
Expand Down
2 changes: 1 addition & 1 deletion certificates/single-intersection.json
Original file line number Diff line number Diff line change
Expand Up @@ -52854,7 +52854,7 @@
"source_sha256": {
"docs/research/single-intersection.md": "c3a9be97b38f4ac1e7983842d9f23656671e877ad5144f41894818f4551aa4dd",
"scripts/audit_single_intersection.py": "1de7f9a62edc93c624ff2693ae9bb725cf6dc9735ff1caad56f6913aae9448ee",
"scripts/experiments/single_intersection.py": "08ddae46e5621a5b4c525b504e67ae655abe9b49461d894feaa7abc89a51847d",
"scripts/experiments/single_intersection.py": "6874d41b75590369182ed61e0c6da5b547e035e0e43b50ea2b39e1f3861dca6d",
"scripts/experiments/single_intersection_witnesses.json": "c2308a3d21991f5828b0519b191b470f48b2fbbcaa5af0f7aed3986cc7534185"
},
"status": "BOUNDED TWO-FIELD RANK SCREEN; NO COMPETITIVE SIDE CIRCUIT OR NEW KAPPA",
Expand Down
97 changes: 97 additions & 0 deletions docs/research/single-intersection-packing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Exact packed Gram replay

This verification tooling contribution targets `minor_rows` in
`scripts/experiments/single_intersection.py`. It changes neither the historical
single-intersection search domain nor the selected multiplication bound.

The matrix entry is `C[S,T] = [S == T or popcount(S & T) == j]` over F2.
Distinct labels make every diagonal entry one. The intersection relation is
symmetric, so one exact popcount determines both off-diagonal entries.
Byte buffers store bit `b` at byte `b // 8`, bit `b % 8`; little-endian integer
conversion preserves the packed-row convention consumed by binary elimination.
The final partial byte has zero padding. Every matrix entry is retained.

The baseline at commit `66849e1475c930fd7732b1a0067ffee7e1e95f60` builds each
row by summing shifted arbitrary-precision integers. Profiling all 5,257 cases
and four committed orbit witnesses took 39.151 seconds, with 30.878 seconds
inside `minor_rows` (profiling overhead included). This motivated switching
from the initial feature-construction hypothesis to matrix packing. No rank,
feature-basis independence, transposition-closure, or input rejection check
is removed. No persistent cache is introduced.

The contribution is by merramil with substantial OpenAI Codex assistance,
under Apache-2.0. It builds on Douglas R. Colkitt's preserved historical
single-intersection audit (`d55bcd62ceb8f322bcf311a5a66e94c3ac7724f0`) and
retains that audit's mathematical scope and attribution. Assignment seed 86
selected verification engineering; the three candidates were gather schedules,
coded-carry controls, and single-intersection replay (86 modulo 3 selects the
last). The initial open-PR snapshot had 582 entries and no title claiming this
engine. The only open issue was #650, so the scope was claimed locally.

## Verification contract

Tests compare complete packed rows with the predecessor's directed formula,
including permutations, negative controls, and byte-boundary sizes. The bounded
benchmark compares every entry of all four committed orbit Gram matrices
and the complete audit output. Only the changed implementation's source hash
may differ from the committed certificate. Existing malformed orbit witnesses
still fail, including with Python optimization enabled.

The full matrices remain quadratic in space and time. This is an implementation
speedup for finite verification, not a new construction, rank theorem, expanded
search, or proof of the conditional multiplication theorem.

## Reproduce and measured result

From the repository root, using standard-library Python 3.11 or newer on
macOS or Linux:

```sh
python3 -B research/single-intersection-packing/benchmark.py --rounds 3 --output /tmp/single-intersection-packing.json
```

Use a fresh output path. Expected final status:
`PASS_IDENTICAL_GRAM_ROWS_AND_COMPLETE_CERTIFICATES`. Timing is descriptive,
not a pass threshold. The benchmark imports the preserved, hash-pinned complete
predecessor module, compares all 100,203,737 Gram entries, then runs three
alternating baseline/packed pairs in fresh, sequential interpreters. Each
worker recomputes the complete 5,257-case certificate, including feature-basis
independence, every adjacent-image closure check, exact Gram ranks, and all
other controls. Its full serialized output must have the original certificate
SHA256 after restoring exactly the implementation-source binding. The matrix
comparison happens outside the timing workers; it does not warm their caches.

[RESULT.json](../../research/single-intersection-packing/RESULT.json) records
every sample and source pin. On CPython 3.13.1 / macOS arm64, median full-audit
time was **13.766 to 6.597 seconds (2.087x faster)**. This trades memory for
speed: median process peak RSS increased from **49,266,688 to 68,845,568 bytes**
(about 40%). In-place buffer conversion avoids explicitly retaining two full
matrix lists, but Python allocator behavior still raises observed peak RSS.
These timings cover this historical finite audit, not supplier cold replay
or integer multiplication runtime.

Run the focused tests with:

```sh
python3 -B -m unittest discover -s tests -p 'test_single_intersection*.py' -v
python3 -B -O -m unittest discover -s tests -p 'test_single_intersection*.py' -v
```

The 16 tests include changed-source, changed-rank, changed-screen-row,
changed-other-source-binding, and wrong-matrix-entry rejection controls.
Only two generated certificate bindings change: `single-intersection.json`
and `affine-vector-screens.json`. Tests reconstruct and hash each complete
predecessor certificate after restoring that one binding. No selected-frontier
artifact or `upstream/` source changes.

The complete `make verify-tests` run passed **557 tests in 86 isolated
interpreters and 20 patch-application checks**. Both affected certificate
producers, selected-record integrity, and `git diff --check` passed.
[VALIDATION.json](../../research/single-intersection-packing/VALIDATION.json)
records the exact commands and scope. The broad `make verify-research` target
would regenerate unrelated certificates, so only its two affected producers
were rerun. Full `make verify`, selected-supplier cold replay, Lean builds, and
remote Linux CI are outside this local validation.

The final pre-submission overlap refresh covered 594 open PRs through #775;
none claimed this single-intersection packing change.
22 changes: 22 additions & 0 deletions research/single-intersection-packing/NOTICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Attribution and scope

Contributor: merramil, with substantial OpenAI Codex assistance. Apache-2.0.

`baseline.py` is an exact, unmodified copy of
`scripts/experiments/single_intersection.py` at
`66849e1475c930fd7732b1a0067ffee7e1e95f60`, SHA256
`08ddae46e5621a5b4c525b504e67ae655abe9b49461d894feaa7abc89a51847d`.
It was introduced in Douglas R. Colkitt's historical research preservation
commit `d55bcd62ceb8f322bcf311a5a66e94c3ac7724f0`. The benchmark retains it
only as a pinned comparison implementation, under the repository's Apache-2.0
license. All original construction, rank-screen, and orbit-proof credit remains
with that work and its cited mathematical sources.

The closest concurrent tooling PRs inspected were #707 (Bareiss determinant
prefixes for selected R420 frames) and #756 (balanced-Fano meet-in-the-middle
replay). Neither supplies code or a dependency here; this contribution packs
the historical single-intersection binary Gram matrix.

See [the engineering note](../../docs/research/single-intersection-packing.md)
for the equivalence argument and verification scope. No new multiplication
exponent, broader negative result, or full theorem verification is claimed.
92 changes: 92 additions & 0 deletions research/single-intersection-packing/RESULT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"status": "PASS_IDENTICAL_GRAM_ROWS_AND_COMPLETE_CERTIFICATES",
"base_commit": "66849e1475c930fd7732b1a0067ffee7e1e95f60",
"assignment_seed": 86,
"python": "3.13.1 (main, Dec 3 2024, 17:59:52) [Clang 16.0.0 (clang-1600.0.26.4)]",
"platform": "macOS-26.5.1-arm64-arm-64bit-Mach-O",
"machine": "arm64",
"source_pins": {
"research/single-intersection-packing/baseline.py": "08ddae46e5621a5b4c525b504e67ae655abe9b49461d894feaa7abc89a51847d",
"scripts/experiments/single_intersection_witnesses.json": "c2308a3d21991f5828b0519b191b470f48b2fbbcaa5af0f7aed3986cc7534185",
"scripts/audit_single_intersection.py": "1de7f9a62edc93c624ff2693ae9bb725cf6dc9735ff1caad56f6913aae9448ee"
},
"packed_source_sha256": "6874d41b75590369182ed61e0c6da5b547e035e0e43b50ea2b39e1f3861dca6d",
"row_comparisons": [
{
"h": 20,
"k": 6,
"j": 2,
"rows": 1140,
"entries_compared": 1299600,
"packed_rows_sha256": "f230204454368c722bb34307e0daf1356126df03208a2531277516b4ad41fb2d"
},
{
"h": 32,
"k": 6,
"j": 2,
"rows": 4960,
"entries_compared": 24601600,
"packed_rows_sha256": "ee09dd3c8190623f7f0e518a48fc2726ce905fb8eeb24cd0e7bddc692005e0e2"
},
{
"h": 38,
"k": 6,
"j": 2,
"rows": 8436,
"entries_compared": 71166096,
"packed_rows_sha256": "3a53896a8f14e3384a283e0530865c190e1631d25e2f81f9c9c5ae212d914049"
},
{
"h": 23,
"k": 7,
"j": 3,
"rows": 1771,
"entries_compared": 3136441,
"packed_rows_sha256": "9b1919d552c6fb54798470ba193a7ebe8a4d4cc2210737667dd77cb495d10957"
}
],
"samples": [
{
"engine": "baseline",
"audit_seconds": 14.628344791941345,
"peak_rss_bytes": 49266688,
"certificate_sha256_with_original_source_binding": "59bca430c5cda9050b346f0f89ff980c9e610a30786cd19677911a1eb433d5b8"
},
{
"engine": "packed",
"audit_seconds": 6.6083968337625265,
"peak_rss_bytes": 66437120,
"certificate_sha256_with_original_source_binding": "59bca430c5cda9050b346f0f89ff980c9e610a30786cd19677911a1eb433d5b8"
},
{
"engine": "packed",
"audit_seconds": 6.596809957176447,
"peak_rss_bytes": 71843840,
"certificate_sha256_with_original_source_binding": "59bca430c5cda9050b346f0f89ff980c9e610a30786cd19677911a1eb433d5b8"
},
{
"engine": "baseline",
"audit_seconds": 13.502197874709964,
"peak_rss_bytes": 48578560,
"certificate_sha256_with_original_source_binding": "59bca430c5cda9050b346f0f89ff980c9e610a30786cd19677911a1eb433d5b8"
},
{
"engine": "baseline",
"audit_seconds": 13.766040291637182,
"peak_rss_bytes": 51019776,
"certificate_sha256_with_original_source_binding": "59bca430c5cda9050b346f0f89ff980c9e610a30786cd19677911a1eb433d5b8"
},
{
"engine": "packed",
"audit_seconds": 6.383586917072535,
"peak_rss_bytes": 68845568,
"certificate_sha256_with_original_source_binding": "59bca430c5cda9050b346f0f89ff980c9e610a30786cd19677911a1eb433d5b8"
}
],
"median_audit_seconds": {
"baseline": 13.766040291637182,
"packed": 6.596809957176447
},
"speedup": 2.0867723007029437,
"scope": "Four committed orbit witnesses and 5,257 historical cases; no new kappa."
}
59 changes: 59 additions & 0 deletions research/single-intersection-packing/VALIDATION.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"status": "PASS_SCOPED_VERIFICATION",
"base_commit": "66849e1475c930fd7732b1a0067ffee7e1e95f60",
"assignment_seed": 86,
"checks": [
{
"command": "PYTHONDONTWRITEBYTECODE=1 make verify-tests",
"exit_code": 0,
"tests": 557,
"isolated_modules": 86,
"patch_checks": 20,
"log_sha256": "77c358c471a9a051ab3af9c228320ecaf19574c1ee90e784803e1baaac028ba2"
},
{
"command": "python3 -B -m unittest discover -s tests -p 'test_single_intersection*.py' -v",
"exit_code": 0,
"tests": 16
},
{
"command": "python3 -B -O -m unittest discover -s tests -p 'test_single_intersection*.py' -v",
"exit_code": 0,
"tests": 16
},
{
"command": "python3 -B scripts/audit_single_intersection.py",
"exit_code": 0,
"cases": 5257
},
{
"command": "python3 -B scripts/audit_affine_vectors.py",
"exit_code": 0,
"cases": 9
},
{
"command": "python3 -B scripts/verify_selected_result.py",
"exit_code": 0
},
{
"command": "python3 -B research/single-intersection-packing/benchmark.py --rounds 3 --output research/single-intersection-packing/RESULT.json",
"exit_code": 0,
"receipt": "RESULT.json",
"entries_compared": 100203737,
"fresh_process_samples": 6
},
{
"command": "git diff --check",
"exit_code": 0
}
],
"regenerated_certificates": "Only the single_intersection.py source binding changes in single-intersection.json and affine-vector-screens.json. Tests hash the complete predecessor certificate after restoring that binding.",
"not_run": [
"Full make verify",
"Whole make verify-research target (would regenerate unrelated certificates)",
"Selected supplier cold replay",
"Lean builds",
"Remote Linux CI"
],
"scope": "Historical finite verification tooling; no new kappa, mathematical search, or full theorem verification."
}
Loading