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 @@ -143,7 +143,7 @@
"source_sha256": {
"docs/research/affine-vector-screens.md": "22e5beab6df8127fc4377142768fc1a0a3317d7e8fba52c089670ecf1aa076b6",
"scripts/audit_affine_vectors.py": "a3fccaeadb9a5db72c33787a055a54374504a6aa231907080396b2cf822e94a7",
"scripts/experiments/affine_vector_screens.py": "756778eeca27f490adc7354a122dc50c40375156259991469c47a90949118ea1",
"scripts/experiments/affine_vector_screens.py": "c499289fc25b5d180df22f70694a7b1c4cfed68f00a9a59bbf4f7ae1b52327a9",
"scripts/experiments/affine_vector_witnesses.json": "672a4318c48f5286ce088d34736c38957b7f662a5f753d440dbc638e7da5f62a",
"scripts/experiments/cube_core_family.py": "e58f1f4067bda2d4838343f42ec2505316f006561f0702e869847d88b85413a8",
"scripts/experiments/single_intersection.py": "6874d41b75590369182ed61e0c6da5b547e035e0e43b50ea2b39e1f3861dca6d"
Expand Down
20 changes: 20 additions & 0 deletions research/leech-minor-production/NOTICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Attribution and license

Prepared by Wentao Li ([VictorLiwentao](https://github.com/VictorLiwentao),
[@Is__Victor](https://x.com/Is__Victor), wentaol4@illinois.edu) with substantial
AI assistance for orientation, overlap search, profiling, production wiring,
packaging, benchmarking and writing. Not independent human peer review.
Apache-2.0; see the repository root `LICENSE`.

The exact base-256 byte-lane algorithm and its no-carry argument were introduced
by **Jerry Chen (@CubeJerry)** in the opt-in adapter
`research/leech-minor-byte-lanes/` (incorporated
[CrocSwap/integer-mult-bounds#898](https://github.com/CrocSwap/integer-mult-bounds/pull/898);
see that package's NOTICE.md). This package wires an equivalent check into the
production `scripts/experiments/affine_vector_screens.py:leech_minor` path used
by `make verify-certificates`.

The original affine/vector screens, Golay inventory, Leech line generators,
rational span witnesses, binary elimination and nine-screen certificate are by
**Douglas R. Colkitt**. Upstream material retains its own source notices and
license.
103 changes: 103 additions & 0 deletions research/leech-minor-production/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Production byte-lane Leech-minor rows

**Tooling improvement; no new kappa.** At base
`0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2`,
`scripts/experiments/affine_vector_screens.py:leech_minor` still built each
binary row with the historical pairwise sparse-dot genexpr. Jerry Chen's
opt-in adapter `research/leech-minor-byte-lanes/` (incorporated
[CrocSwap/integer-mult-bounds#898](https://github.com/CrocSwap/integer-mult-bounds/pull/898))
already proved an exact base-256 byte-lane algorithm with identical receipts.
This package wires that equivalent check into the **production** source used by
`scripts/audit_affine_vectors.py` / `make verify-certificates`.

Only the source pin for `scripts/experiments/affine_vector_screens.py` changes
inside `certificates/affine-vector-screens.json`. Every matrix entry is still
materialised; Golay inventory, norms, rational span witnesses, binary
elimination, polynomial-code screens and the retained historical `2^-31`
language are unchanged. Selected frontier untouched.

## Reproduce

Python **3.12**, standard library only, from the repository root:

```sh
python3.12 -I -B research/leech-minor-production/verify.py
python3.12 -I -O -B research/leech-minor-production/verify.py
python3.12 -B scripts/research_package.py --package research/leech-minor-production
python3.12 -I -B research/leech-minor-production/benchmark.py --rounds 5
```

Expected:

```text
PASS_LEECH_MINOR_PRODUCTION leech_cases=5 code_cases=4 certs=1 no_new_kappa
PASS_REGISTERED_RESEARCH_PACKAGE research/leech-minor-production outcome=completed
PASS_IDENTICAL_LEECH_MINOR_PRODUCTION_RECEIPTS
```

Default verify is read-only. Use `--write-certificate` only after editing the
production source. Timing is host-descriptive and is not a correctness gate.

On Linux / CPython 3.12.3, five alternating fresh-process pairs gave median
**leech-only 5.579 → 1.043 s (5.35×)** and **complete audit 9.465 → 4.213 s
(2.25×)**. Samples are in [`RESULT.json`](RESULT.json).

## Why the byte lanes are equivalent

Coordinates of every Leech sample vector lie in `[-4,4]`. For each coordinate
`k`, pack nonnegative base-256 integers

```text
P_k = sum_j (v_j[k] + 4) 256^j
M_k = sum_j (4 - v_j[k]) 256^j
```

For a row vector `u` with `||u||_1 <= 31` (true of every historical Leech row:
l1 norms 8, 16 or 26),

```text
S_u = sum_{u[k]>0} u[k] P_k + sum_{u[k]<0} (-u[k]) M_k
```

has byte `j` equal to `dot(u,v_j) + 4 ||u||_1`, with every digit at most
`8*31 < 256` and no inter-column carries. Decoding bytes and comparing to
`shift + 4 ||u||_1`, while forcing the diagonal, returns exactly
`C[i,j] = (i == j or dot(v_i,v_j) == shift)` in the original column order.
This is the same argument as `research/leech-minor-byte-lanes/README.md`.

## Overlap and credit

Closest priors:

- [Jerry Chen / leech-minor-byte-lanes](../leech-minor-byte-lanes/) — opt-in
byte-lane adapter (#898 incorporated); this package is the production wiring.
- [CrocSwap/integer-mult-bounds#756](https://github.com/CrocSwap/integer-mult-bounds/pull/756)
— identical-receipt tooling quality bar.
- Open leave-alone tooling on other objects (#1922 joint frames, #2054/#2150
shared/mixed-point, #2100 ternary, #2117 DisjointTensor.frame_data, #2194
production verify_factor, #1861 parity-side) was not reopened.

Douglas R. Colkitt authored the affine/vector screens and original checker.
Jerry Chen authored the byte-lane algorithm. Prepared by Wentao Li
([VictorLiwentao](https://github.com/VictorLiwentao),
[@Is__Victor](https://x.com/Is__Victor)) with substantial AI assistance, under
Apache-2.0.

## Open next questions

1. **Question:** Should the four polynomial-code screens in the same audit
receive a similar production packing pass?
**Why it matters:** After Leech minors shrink, the unchanged cubic-code path
is a larger share of the complete audit.
**First step:** Profile `audit_affine_vectors.certificate` with production
lanes already merged.
**Blocked by:** No open identical-receipt adapter yet for
`polynomial_code_witness`.

2. **Question:** Should `research/leech-minor-byte-lanes/` note that production
now ships the same algorithm?
**Why it matters:** That package's source-admission string match expects the
historical pairwise block.
**First step:** Add a one-line status note without editing pinned evidence.
**Blocked by:** Maintainer preference on touching incorporated historical
packages.
142 changes: 142 additions & 0 deletions research/leech-minor-production/RESULT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
{
"ai_assistance": "Substantial AI assistance for orientation, overlap search, profiling, implementation, packaging, benchmarking and writing. Not independent human peer review.",
"base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2",
"complete_audit": {
"median_baseline_seconds": 9.46477570900015,
"median_optimized_seconds": 4.212500120000186,
"median_ratio": 2.246830964837986,
"rounds": 5,
"samples": [
{
"baseline_seconds": 9.46477570900015,
"optimized_seconds": 4.516600023000137,
"order": [
"baseline",
"optimized"
],
"ratio": 2.0955532171992513,
"round": 0
},
{
"baseline_seconds": 12.871481419000247,
"optimized_seconds": 4.212500120000186,
"order": [
"optimized",
"baseline"
],
"ratio": 3.0555444634621587,
"round": 1
},
{
"baseline_seconds": 10.286713764999604,
"optimized_seconds": 5.023797816999831,
"order": [
"baseline",
"optimized"
],
"ratio": 2.047597084856958,
"round": 2
},
{
"baseline_seconds": 9.034710279999672,
"optimized_seconds": 4.105965091000144,
"order": [
"optimized",
"baseline"
],
"ratio": 2.2003865302710035,
"round": 3
},
{
"baseline_seconds": 8.674803519999841,
"optimized_seconds": 3.795328679999784,
"order": [
"baseline",
"optimized"
],
"ratio": 2.2856527725025213,
"round": 4
}
],
"scope": "audit"
},
"engines": {
"baseline": "research/leech-minor-production/baseline.py",
"optimized": "scripts/experiments/affine_vector_screens.py"
},
"environment": {
"cpu_affinity_set": false,
"executable": "/usr/bin/python3.12",
"implementation": "CPython",
"os_caches_flushed": false,
"platform": "Linux-6.12.94+-x86_64-with-glibc2.39",
"python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]"
},
"leech_only": {
"median_baseline_seconds": 5.579358917999798,
"median_optimized_seconds": 1.0430829469996752,
"median_ratio": 5.348912024732329,
"rounds": 5,
"samples": [
{
"baseline_seconds": 5.555424422000215,
"optimized_seconds": 0.6638417809999737,
"order": [
"baseline",
"optimized"
],
"ratio": 8.368597128116638,
"round": 0
},
{
"baseline_seconds": 5.502019425999606,
"optimized_seconds": 1.0430829469996752,
"order": [
"optimized",
"baseline"
],
"ratio": 5.274766922252559,
"round": 1
},
{
"baseline_seconds": 5.914984036000078,
"optimized_seconds": 0.8409578649998366,
"order": [
"baseline",
"optimized"
],
"ratio": 7.033627108061148,
"round": 2
},
{
"baseline_seconds": 5.984793322999849,
"optimized_seconds": 1.187062658999821,
"order": [
"optimized",
"baseline"
],
"ratio": 5.041682743219666,
"round": 3
},
{
"baseline_seconds": 5.579358917999798,
"optimized_seconds": 1.1603133880003043,
"order": [
"baseline",
"optimized"
],
"ratio": 4.808493098244192,
"round": 4
}
],
"scope": "leech"
},
"no_new_kappa": true,
"predecessor": "research/leech-minor-byte-lanes/",
"source_sha256": {
"baseline.py": "756778eeca27f490adc7354a122dc50c40375156259991469c47a90949118ea1",
"research/leech-minor-byte-lanes/lanes.py": "2c242d4284e1c8520cbc0cfbbb20ddf186c662e5f6173bed400bbd4022df34c7",
"scripts/experiments/affine_vector_screens.py": "c499289fc25b5d180df22f70694a7b1c4cfed68f00a9a59bbf4f7ae1b52327a9"
},
"status": "PASS_IDENTICAL_LEECH_MINOR_PRODUCTION_RECEIPTS"
}
60 changes: 60 additions & 0 deletions research/leech-minor-production/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"schema_version": 1,
"base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2",
"files": [
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "e8870e5917057d59b730eb14721a778639eca050",
"sha256": "d46eb6d5b3e279428753d770653663fbdf1063e55c255ea073d768f344927ef7"
},
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11",
"sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32"
},
{
"path": "certificates/affine-vector-screens.json",
"usage": "provenance",
"git_blob": "7553cd304e62c7a3c9136046663d418cb068f0e8",
"sha256": "e7920c3305bd5e3058d2614fadc064ec1f658029183325f600c7ee4b56a7906e"
},
{
"path": "docs/research/affine-vector-screens.md",
"usage": "provenance",
"git_blob": "13f454478b554408cb55fdb31d514162b5c4b241",
"sha256": "22e5beab6df8127fc4377142768fc1a0a3317d7e8fba52c089670ecf1aa076b6"
},
{
"path": "scripts/audit_affine_vectors.py",
"usage": "provenance",
"git_blob": "9f5e3dff5e7c0444d160fec3a773fd702b0bc569",
"sha256": "a3fccaeadb9a5db72c33787a055a54374504a6aa231907080396b2cf822e94a7"
},
{
"path": "scripts/experiments/affine_vector_screens.py",
"usage": "provenance",
"git_blob": "0686b47d4844bedc9dddfacb0bff52ec552120a2",
"sha256": "756778eeca27f490adc7354a122dc50c40375156259991469c47a90949118ea1"
},
{
"path": "scripts/experiments/affine_vector_witnesses.json",
"usage": "input",
"git_blob": "0e9a488ac4912cbf2bb83894c1b6c9b607cc02cd",
"sha256": "672a4318c48f5286ce088d34736c38957b7f662a5f753d440dbc638e7da5f62a"
},
{
"path": "research/leech-minor-byte-lanes/lanes.py",
"usage": "input",
"git_blob": "095173fba90d619d8ff9cc46e28431af85fee65d",
"sha256": "2c242d4284e1c8520cbc0cfbbb20ddf186c662e5f6173bed400bbd4022df34c7"
},
{
"path": "research/leech-minor-byte-lanes/README.md",
"usage": "provenance",
"git_blob": "f6f50385e8f08aea1b1eda245681b4add515cdc2",
"sha256": "5ac99737af9ab3422faef2825d8e592d32d7dcb90fff83cd025702e895fead26"
}
]
}
Loading
Loading