# Re-run instructions — W1 unequal-cardinality transplant census Everything below reproduces the computation recorded in `evidence/w1_results.json`. All arithmetic is exact (Python `fractions.Fraction`); no floating point is used anywhere in the census. ## What you need - Python 3. The census script imports only the standard library (`json`, `random`, `subprocess`, `sys`, `time`, `fractions`, `math`). No third-party packages. - The input pool, assembled at the paths listed in `evidence/MANIFEST.md` under "Inputs (not copied)": the index file `wave33/analysis/bank_map.json` (its `bank` entries give the first 53 pool paths) plus every `*.json` file in `wave38/p1/banked/` (9 files), i.e. the 62 scheme files in total. Verify each file's SHA-256 against the manifest before running. - The script itself: `evidence/w1_census.py`. ## Layout requirement (read first) `w1_census.py` hard-codes the working root near the top: ```python ROOT = '/home/hatch/workspace/matmul-pilot/' ``` Either recreate that directory layout and place the pool files at the manifest paths under it, or edit `ROOT` to point at your own tree root. All input and output paths in the script are built from `ROOT`, and the output is written to `ROOT + 'wave41/w1_results.json'`. **Preserve the original output before running:** the script overwrites `wave41/w1_results.json`. Copy the bundled `evidence/w1_results.json` aside as your reference copy first, and run the script in a separate tree (or restore the reference copy afterwards) so the comparison below is against the untouched original. ## Command ```sh python3 w1_census.py ``` (The script's location does not matter; it reads and writes only through `ROOT`.) The digest coefficients are drawn from `random.Random(20261123)`, so the run is deterministic. ## Expected console output The run prints, in order (timings will vary): ``` pool files: 62 DUP content: results/wave2_control_r26.json == results/lensC_333_r26_Q.json (skipped) DUP content: wave3/exact/control_r26.json == results/lensC_333_r26_Q.json (skipped) distinct schemes in census: 60 (…s) subset sums: {1: 1391, 2: 15443, 3: 109278, 4: 553427} total=679539 (…s) cardinality (2,1) done: candidate pairs so far 1, verified hits so far 1 (…s) cardinality (3,2) done: candidate pairs so far 24, verified hits so far 24 (…s) cardinality (4,3) done: candidate pairs so far 277, verified hits so far 277 (…s) GROUP wave22/ladder/wave22_333_r25_Q_split-of-metaflip24.json <- wave22/ladder/wave22_333_r24_Q_metaflip.json: 277 pairs, candidate rank 24, exact_ok=True W1 DONE: 277 verified hits in 1 groups; 277 digest candidate pairs; …s ``` The two `DUP content` lines are the deduplication of the three rank-26 records into one scheme (62 files → 60 distinct schemes). The in-script assertion `S == TGT` re-judges every scheme by exact reconstruction before it enters the census; a pool file that does not reconstruct the ⟨3,3,3⟩ tensor exactly aborts the run. ## Comparing against the recorded output Compare the regenerated `wave41/w1_results.json` with the bundled `evidence/w1_results.json` on these fields — all must match exactly: - `n_distinct_schemes` = 60 - `subset_counts` = {1: 1391, 2: 15443, 3: 109278, 4: 553427} (total 679,539) - `candidate_digest_pairs` = 277 - `verified_hits`: 277 entries, all with `base_scheme` = `wave22/ladder/wave22_333_r25_Q_split-of-metaflip24.json` and `src_scheme` = `wave22/ladder/wave22_333_r24_Q_metaflip.json`; counts by (big_size, small_size): (2,1): 1, (3,2): 23, (4,3): 253; every entry has `trivial_zero_term` = false - `judged_groups`: exactly one group, with `n_hit_pairs_in_group` = 277, `candidate_rank` = 24, `exact_tensor_ok` = true The only field expected to differ is `wall_s` (timing). ## Runtime / hardware The recorded run's `wall_s` in `w1_results.json` is ≈ 31.7 seconds end to end (≈ 5.5 s pool loading and re-judging, ≈ 25.5 s subset generation, < 1 s comparison and candidate assembly). The source report does not state a hardware class for this run, so none is claimed here; the computation is small (single-threaded, exact integer/Fraction arithmetic) and any ordinary desktop Python 3 should reproduce it in the same order of time. ## Notes - The script shells out to `verify.py` only when a judged group has a rank-23 base and an exactly reconstructing candidate (the rank-22 find protocol). No such group occurs in this census, so that code path is not exercised by the re-run and `verify.py` is not required. - Scope reminder: this reproduces the unequal-cardinality census at depth ≤ 4 on the 60-scheme bank. The equal-cardinality closure at depth ≤ 4 cited in the claim rests on earlier waves (8 schemes) and is not re-run by this script.