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
70 changes: 70 additions & 0 deletions research/fano-census-row-tables/BENCHMARK-python312.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"status": "PASS_IDENTICAL_COMPLETE_FANO_BENCHMARK",
"pairs": 3,
"seed": 91,
"samples": [
{
"engine": "tables",
"seconds": 7.86429622899999,
"max_rss": 384080,
"receipt_sha256": "e33a4809ad6ec2025aa46ecb5b2f9d790295379d4794bd911e0b67cf7e6aa652",
"pair": 0,
"process_seconds": 7.95168831899997
},
{
"engine": "reference",
"seconds": 21.18855880000001,
"max_rss": 396540,
"receipt_sha256": "e33a4809ad6ec2025aa46ecb5b2f9d790295379d4794bd911e0b67cf7e6aa652",
"pair": 0,
"process_seconds": 21.228497876000006
},
{
"engine": "reference",
"seconds": 21.668193771999995,
"max_rss": 396544,
"receipt_sha256": "e33a4809ad6ec2025aa46ecb5b2f9d790295379d4794bd911e0b67cf7e6aa652",
"pair": 1,
"process_seconds": 21.709772429999987
},
{
"engine": "tables",
"seconds": 8.139907316999995,
"max_rss": 384348,
"receipt_sha256": "e33a4809ad6ec2025aa46ecb5b2f9d790295379d4794bd911e0b67cf7e6aa652",
"pair": 1,
"process_seconds": 8.190792449000014
},
{
"engine": "tables",
"seconds": 7.939002424000023,
"max_rss": 384352,
"receipt_sha256": "e33a4809ad6ec2025aa46ecb5b2f9d790295379d4794bd911e0b67cf7e6aa652",
"pair": 2,
"process_seconds": 8.00499437100001
},
{
"engine": "reference",
"seconds": 21.400470477,
"max_rss": 396536,
"receipt_sha256": "e33a4809ad6ec2025aa46ecb5b2f9d790295379d4794bd911e0b67cf7e6aa652",
"pair": 2,
"process_seconds": 21.444284257999982
}
],
"median_process_seconds": {
"reference": 21.444284257999982,
"tables": 8.00499437100001
},
"speedup": 2.678863127710244,
"python": "3.12.14 (main, Aug 25 2026, 14:00:49) [Clang 22.1.3 ]",
"platform": "Linux-6.18.55-x86_64-with-glibc2.41",
"rss_units": "KiB (Linux)",
"code_sha256": {
"adapter.py": "039399a24b16930a0a7a3c92a5034c2efbe64a0cf52e7bd063ba837d4d605449",
"kernel.py": "decc8e6a4331ffd28460056d49f06758c6fad721e0638ade90a7ee723c367458",
"benchmark.py": "c98692c2654e324ada4743c07a60b626f1880edd5f5b4fc23c7f37ffb773b127",
"SOURCES.json": "65130499f62653607112223322272030e57d7900dc1211944b94c8657e6a3963"
},
"scope": "Whole PR3168 check, pins, route derivation, full census, Fano searches and controls; fresh processes, warm filesystem caches; no full supplier replay."
}
70 changes: 70 additions & 0 deletions research/fano-census-row-tables/BENCHMARK-python313.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"status": "PASS_IDENTICAL_COMPLETE_FANO_BENCHMARK",
"pairs": 3,
"seed": 91,
"samples": [
{
"engine": "tables",
"seconds": 7.848937611999986,
"max_rss": 385980,
"receipt_sha256": "e33a4809ad6ec2025aa46ecb5b2f9d790295379d4794bd911e0b67cf7e6aa652",
"pair": 0,
"process_seconds": 7.889600482999981
},
{
"engine": "reference",
"seconds": 20.233156099999974,
"max_rss": 398308,
"receipt_sha256": "e33a4809ad6ec2025aa46ecb5b2f9d790295379d4794bd911e0b67cf7e6aa652",
"pair": 0,
"process_seconds": 20.27064412200002
},
{
"engine": "reference",
"seconds": 21.05224676199998,
"max_rss": 398304,
"receipt_sha256": "e33a4809ad6ec2025aa46ecb5b2f9d790295379d4794bd911e0b67cf7e6aa652",
"pair": 1,
"process_seconds": 21.089870213999916
},
{
"engine": "tables",
"seconds": 7.440832546000024,
"max_rss": 385980,
"receipt_sha256": "e33a4809ad6ec2025aa46ecb5b2f9d790295379d4794bd911e0b67cf7e6aa652",
"pair": 1,
"process_seconds": 7.481164362000072
},
{
"engine": "tables",
"seconds": 7.285256874000083,
"max_rss": 385988,
"receipt_sha256": "e33a4809ad6ec2025aa46ecb5b2f9d790295379d4794bd911e0b67cf7e6aa652",
"pair": 2,
"process_seconds": 7.326939702000004
},
{
"engine": "reference",
"seconds": 20.68424699400009,
"max_rss": 398308,
"receipt_sha256": "e33a4809ad6ec2025aa46ecb5b2f9d790295379d4794bd911e0b67cf7e6aa652",
"pair": 2,
"process_seconds": 20.72229164999999
}
],
"median_process_seconds": {
"reference": 20.72229164999999,
"tables": 7.481164362000072
},
"speedup": 2.7699286698280656,
"python": "3.13.5 (main, Aug 10 2026, 12:06:59) [GCC 14.2.0]",
"platform": "Linux-6.18.55-x86_64-with-glibc2.41",
"rss_units": "KiB (Linux)",
"code_sha256": {
"adapter.py": "039399a24b16930a0a7a3c92a5034c2efbe64a0cf52e7bd063ba837d4d605449",
"kernel.py": "decc8e6a4331ffd28460056d49f06758c6fad721e0638ade90a7ee723c367458",
"benchmark.py": "c98692c2654e324ada4743c07a60b626f1880edd5f5b4fc23c7f37ffb773b127",
"SOURCES.json": "65130499f62653607112223322272030e57d7900dc1211944b94c8657e6a3963"
},
"scope": "Whole PR3168 check, pins, route derivation, full census, Fano searches and controls; fresh processes, warm filesystem caches; no full supplier replay."
}
56 changes: 56 additions & 0 deletions research/fano-census-row-tables/CLAIM.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"assignment_seed": 91,
"random_source": "secrets.randbelow(100), operating-system randomness",
"track": "verification engineering",
"base_commit": "463113d675af7410ac91d53a4fed51ec6494eb9a",
"claim_time_utc": "2026-10-17T17:49:00Z",
"expected_finish_utc": "2026-10-17T18:43:00Z",
"object": "PR3168 exact 17-coordinate reduced-triple route census; all 1,379,952 triples",
"hypothesis": "Per-invocation tables for exact GF(2) row actions reduce repeated matrix multiplication without changing any product key, relation or full Fano receipt.",
"method": "Precompute actual two-factor rows and exact right actions, retain full triple enumeration, exact packed-int equality and all original downstream controls.",
"deliverable": "Opt-in pinned adapter, equivalence argument, differential controls and alternating complete-check benchmarks.",
"stopping_rule": "Stop if full receipt or semantic controls differ, or complete-check runtime does not improve. No length-eight census or theorem extension.",
"candidates": [
{
"task": "PR626 interval kernels",
"decision": "Rejected: matching logarithm/exp contributions #667/#672 already retained."
},
{
"task": "Owner footprint representation",
"decision": "Rejected: #727 and owner-footprint-crosscheck plus t37-slice-bitmaps cover this mechanism."
},
{
"task": "PR3168 reduced-triple row products",
"decision": "Selected: bounded costly exact workload; no matching acceleration surfaced."
}
],
"diversification": "Seed 91 fixes candidate-test matrix stream and alternating benchmark first arm; object chosen after semantic overlap checks, not on seed alone.",
"coordination": "No pinned sprint issue (GitHub pinnedIssues empty). Local claim under user step 3. No Discussion mutation requested.",
"overlap": {
"open_pr_records": 253,
"discussion_records": 2017,
"complete_pagination": true,
"snapshot_utc": "2026-10-17T17:47:55.995857+00:00",
"queries": [
"centre-seven-owner-fano-independent",
"relation_census",
"route product",
"matrix census",
"route census",
"reduced-triple",
"bytes.translate",
"permutation composition"
],
"predecessors": [
"#3097 centre-seven-owner-information-floor",
"#3168 centre-seven-owner-fano-independent",
"#3147 larger block floor (open; no extension attempted)"
]
},
"result": {
"status": "completed locally; publication pending",
"useful_result": "Exact row tables speed the unchanged complete PR3168 verifier by 2.68x (Python 3.12) and 2.77x (3.13), preserving all triple keys and the full receipt.",
"evidence": "VALIDATION.json; BENCHMARK-python312.json; BENCHMARK-python313.json",
"remaining": "Maintainer review, other-host performance; no new theorem, supplier or kappa."
}
}
61 changes: 61 additions & 0 deletions research/fano-census-row-tables/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Equality of row-table and direct matrix products

Fix a dimension d and binary row matrices A, B and C. Encode a row r by
its nonnegative integer with bit j equal to coordinate j. The direct
reference product computes row i of AB as the XOR of rows B[j] for each
set bit j in A[i]. `row_action` computes that same expression: each loop
iteration removes exactly the least significant set bit, and XORs its
corresponding matrix row. The loop terminates after popcount(r) iterations.

`prepare` computes AB for every ordered pair of distinct route indices.
It collects every row of those products in a finite sorted domain D.
For each right factor C and each row r in D it stores row_action(r,C).
Each reversed row list of AB is replaced by its indices in D. Thus every
lookup made by a reduced triple (a,b,c) is defined and equals the
corresponding row of (AB)C. No involution, route uniqueness, sparsity,
or expectation about the eventual relation histogram is used here.

Every output row is less than 2^d, since XOR preserves that range. Starting
with zero and appending the rows in reverse order by
`key = (key << d) | row` is exactly the reference encoding
sum(row[i] * 2^(d*i)). This encoding is injective on d-by-d binary
matrices. It has no truncated fingerprint or probabilistic equality test.
The unsigned integer array stores individual rows; the product key is an
arbitrary-precision Python integer, so its 289 bits are retained for d=17.

The domain a!=b and b!=c is unchanged. Each triple is inserted once, in the
same order as in the original census. Dictionary class membership therefore
agrees exactly. The class histogram, extraction of all pairs of distinct
words, reversal of the second triple and cyclic-reduction test are unchanged.
The returned total, histogram and relation-word set are consequently equal.
This includes duplicate matrices and classes of size greater than two.

Tables are created inside each census and discarded afterwards. No successful
validation is cached between invocations. The adapter checks all live source
pins before loading the predecessor from authenticated source bytes. It then
replaces only that new module's `relation_census` function. Original route
derivation, active/spectator checks, pair uniqueness, relation multiplication,
symmetry, all Fano incidence and labelling searches, and the planted/missing
relation controls run unchanged. The entire canonical receipt must equal the
pinned predecessor receipt byte for byte. Default predecessor commands and
all frozen source bytes are unchanged.

This is an algebraic equivalence argument for an implementation change,
supported by finite differential checks. It is not a proof-assistant theorem
or a formal proof of the multiplication bound. The original observation,
faithful representation and support-bound hypotheses remain inherited.

## Work and storage

For n routes, d rows and U distinct rows of the n(n-1) two-factor products,
preparation costs O(n^2 d^2 + n U d) bit-selection steps and O(n^2 d + n U)
stored row indices/actions. Product-key formation then uses d exact row
lookups per triple, instead of up to d^2 bit-selection steps plus packing.
The same n(n-1)^2 triples and all equality classes remain resident.

For the actual input n=112, d=17 and U=18,388. The 2,059,456 table values
occupy 8,237,824 payload bytes on the measured four-byte unsigned-int array
implementation. Pair/domain dictionaries and the unchanged class dictionary
add overhead. Peak process memory is measured separately; the payload count
alone is not a whole-process memory claim. The method does not make an
unbounded larger-word census feasible and adds no length-eight coverage.
115 changes: 115 additions & 0 deletions research/fano-census-row-tables/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Exact row tables for the seven-owner Fano census

**Verification tooling; no new bound, supplier or κ.** An opt-in adapter
accelerates Sudarsh Chaturvedi's PR3168 independent seven-owner verifier. It
replaces repeated binary matrix multiplication by exact per-invocation row
actions. Every one of the 1,379,952 reduced triples remains enumerated, with
full 289-bit product keys and the same complete canonical receipt.

On this Linux host, three alternating fresh-process pairs under CPython
3.12.14 measured a median **21.44 → 8.00 seconds (2.68×)** for the complete
check. The scope includes input/source hashing, chart-swap route derivation,
the entire census, Fano incidence and labelling searches, and original
positive/negative controls. CPython 3.13.5 measured **20.72 → 7.48 seconds (2.77×)** in three further
alternating pairs. Raw samples and process memory are retained in
[BENCHMARK-python312.json](BENCHMARK-python312.json) and
[BENCHMARK-python313.json](BENCHMARK-python313.json). Timing is descriptive,
with no pass threshold. Filesystem caches were warm; the host was shared.

## Reproduce

From the repository root, Python 3.12+ and standard library only:

```sh
python3 -I -B research/fano-census-row-tables/verify.py
```

Expected: `PASS_ALL_EXACT_TRIPLE_KEYS 1379952 rows 18388`, then
`PASS_FANO_ROW_TABLES e33a4809ad6ec2025aa46ecb5b2f9d790295379d4794bd911e0b67cf7e6aa652`.
This command compares **every actual product key** against the original
exact multiply/pack functions, then runs the complete table-backed check.
It checks the full committed PR3168 receipt byte for byte.

```sh
python3 -I -B -m unittest discover -s research/fano-census-row-tables -p 'test_*.py' -v
python3 -I -B research/fano-census-row-tables/benchmark.py --pairs 3 --out /tmp/new-fano-benchmark.json
python3 scripts/research_package.py --package research/fano-census-row-tables
```

Expected: seven test groups; `PASS_IDENTICAL_COMPLETE_FANO_BENCHMARK`; and
successful registered replay. Use a fresh benchmark/output path. The benchmark
runs both complete engines in separate processes, alternating their order,
and checks every receipt. `adapter.py --engine reference` selects the original
engine; the default is `tables`. No existing command is changed.

## Exactness, controls and limits

[PROOF.md](PROOF.md) gives the row-action and injective packing argument.
The 12,432 ordered pairs reach 18,388 distinct rows. Tables store the exact
right action of each of the 112 routes on those rows. No intermediate row,
triple, equality class or relation is sampled or omitted. No successful
validation is cached across invocations. The existing pair uniqueness,
spectator block, involution, symmetry and relation-identity checks all remain.

The complete result retains histogram `{1: 1379852, 2: 50}`, all 100 relation
words (50 braid edges), 30 labelled Fano planes, all 28 six-cycle constraints,
zero valid Fano labellings and the original planted/missing-relation controls.
Additional tests use a separate parity-of-dot-products oracle, exhaustive
small row domains, seed-91 dense 17-coordinate matrices, noncommuting factors,
duplicate/zero matrices and classes larger than two. Four corrupted kernels
are detected: lost high bit, reversed row order, wrong packing stride and a
wrong table entry. Same-size/same-mtime source mutation is rejected after
prior success; restoration works; missing sources and output reuse fail.
Tests also run with optimized Python.

This is an implementation-equivalence contribution, not another independent
mathematical verification of the support-seven theorem. It inherits the
original observation model, faithful cover-group representation and earlier
support bound. It does not add support-eight or length-eight coverage,
physical acquisition/restoration accounting, supplier admission or a new κ.
The full selected cold replay, `make verify`, Lean and hosted CI were not run
for this isolated opt-in stage. All-size/compiler, realization, hosting,
precision/tape and analytic assumptions remain.

## Sources and coordination

Exact base: `463113d675af7410ac91d53a4fed51ec6494eb9a`.
[SOURCES.json](SOURCES.json) records live input SHA-256 and Git blob pins.
The source archive remains immutable and its member hashes are still checked
by the original chart-swap derivation. The selected context at this base is
PR1094, conditional κ = `836330098538459/500000000000000000`, with PR589/555
bit ancestry; the selected-source inventory is unchanged.

OS assignment seed **91** selected verification engineering. Three narrow
candidates, method, stopping rule and the local claim are in [CLAIM.json](CLAIM.json).
No pinned sprint coordination issue existed. Overlap checks covered 253 open
PRs and 2,017 Discussion records with complete pagination, plus local package
notes. PR3147's larger-block question is distinct and is not investigated here.
The ledger classifies #3097 and #3168 as partially reviewed archival intake;
this tool does not promote their theorem status. PR3168 source head is
`b8844f08d8832eb87f8a5725f50d9c5eaac953d8`; PR3097 source head is
`ef7a52f4b0acf7cc8c51f9d81274d106abeffa24`. A finite replay is not a formal
proof of the multiplication theorem.

## Open next questions

Should this become the PR3168 default after review? A feasible next step is
to review the exact row/packing argument and reproduce the all-product
comparison and complete benchmark on another host. Maintainer review is the
remaining adoption step. No extension of the research family is proposed.

## Credit and license

Sudarsh Chaturvedi (`Sudarsh3301`), with Claude assistance, supplied PR3168's
independent census, Fano searches and controls. Gonzalo Mier (`Gonzalo-Mier`) supplied PR3097's support-seven claim and first
census, prepared with OpenAI Codex assistance. The chart-swap derivation
and earlier block-repair result retain Ross Richardson and Aaron Wang/navinor
(PR2391) credit; ywz65 supplied the selected centre observation interface.
Rohan Arun, Jeremy Kothe, Hao Yan and the cumulative PR1094/589/555 supplier
lineage retain their original attribution. Douglas Colkitt supplied the
source-bound review and research-package infrastructure.

This adapter, table engine, differential tests and benchmark were prepared by
**Charan**, with substantial **OpenAI Codex assistance** in design, code,
explanation, tests and handoff. No delegated or independent human review was
used. Apache-2.0. Frozen predecessor sources and notices remain unchanged.
Loading