From 04c37d1c9d71808f77a36b3734f6c07a7ee772c1 Mon Sep 17 00:00:00 2001 From: ToikY <27568617+ToikY@users.noreply.github.com> Date: Tue, 13 Oct 2026 07:56:42 -0700 Subject: [PATCH] Research: certify fixed P111 receiver helper minimum Scoped negative result: complete receiver census and independent accounting. Prepared for ToikY with substantial OpenAI Codex assistance. --- research/p111-receiver-census/CLAIM.md | 30 + research/p111-receiver-census/EXPECTED.json | 1889 +++++++++++++++++ research/p111-receiver-census/NOTICE.md | 27 + research/p111-receiver-census/PROOF.md | 143 ++ research/p111-receiver-census/README.md | 108 + research/p111-receiver-census/SOURCES.json | 65 + research/p111-receiver-census/VALIDATION.md | 37 + research/p111-receiver-census/independent.py | 287 +++ research/p111-receiver-census/test_package.py | 135 ++ research/p111-receiver-census/verify.py | 223 ++ 10 files changed, 2944 insertions(+) create mode 100644 research/p111-receiver-census/CLAIM.md create mode 100644 research/p111-receiver-census/EXPECTED.json create mode 100644 research/p111-receiver-census/NOTICE.md create mode 100644 research/p111-receiver-census/PROOF.md create mode 100644 research/p111-receiver-census/README.md create mode 100644 research/p111-receiver-census/SOURCES.json create mode 100644 research/p111-receiver-census/VALIDATION.md create mode 100644 research/p111-receiver-census/independent.py create mode 100644 research/p111-receiver-census/test_package.py create mode 100644 research/p111-receiver-census/verify.py diff --git a/research/p111-receiver-census/CLAIM.md b/research/p111-receiver-census/CLAIM.md new file mode 100644 index 0000000000..82bf840042 --- /dev/null +++ b/research/p111-receiver-census/CLAIM.md @@ -0,0 +1,30 @@ +# Bit supplier claim — seed 15 + +- Started 2026-10-13 07:35 PDT; finish by 08:35 PDT. Stop experiments by 08:20 and reserve the final 15 minutes for verification and handoff. +- OS randomness: `secrets.randbelow(100)` returned **15** (bit supplier). +- Exact base: `007664306fff84fbb1c9a1b4053b69f439764034`. +- Current selected result: PR890, conditional kappa `1661957774647029/10^18`, retaining the PR589/555 bit supplier. +- Object: PR555's frozen puncture set `[10,15,51,53,56,66,72,89,111]`, L3 plan and `plan_thirds` seed 552, retained by PR589. +- Hypothesis: choosing different receivers for the nine pseudo-target totals can reduce the complete helper count below 439. +- Domain: every one of the `3^9 = 19,683` receiver vectors with entries 1, 2 or 3, retaining the source generator's ordered mini-node solves, iterative missing-carrier closure, and extra-carrier reuse before allocating junk wires. This is a generator-defined class, not unrestricted helper optimality. +- Deliverable: an exact complete helper census, an independent calculation, source pins, meaningful failure controls, and either a verified improved candidate or a scoped negative result. +- Three narrow candidates: (0) this receiver census; (1) orientation/precision repair of a frozen PR941 matching optimum; (2) complete small-wire phase-A resynthesis. Seed `15 % 3 = 0` selects the receiver census. Candidate 1 depends on a large pending closure; candidate 2 overlaps PR904/936/952. The original PR555 discovery sampled only 3–6 receiver choices per keeper-plan seed, rather than this complete domain. +- Overlap: open PR metadata inspected through #955, plus all-state receiver/puncture searches. Frame-only and single-relocation work (#886/#933), decoder copy floors, and recent circuit resynthesis are distinct and are not reopened. No open sprint coordination issue was found among the current issues (#650 and #913); claim recorded locally. +- All work stays under this package. No selected-frontier change or merge is authorized. Prepared for ToikY with substantial OpenAI Codex assistance; Apache-2.0 and predecessor credits retained. + +## Result and handoff + +Completed the declared cube: 19,683 receiver assignments, represented by 60 +block-local records and checked separately by a full-vector set-valued engine. +All use 439–443 helpers; 2,646 attain 439. The shipped receiver choice already +attains the fixed-family minimum. One completed census was the stopping rule; +no further keeper-plan or circuit search followed. Scope and remaining supplier +obligations are in PROOF.md and README.md. + +Both complete record digests match; seven package tests, 59 original-generator +controls, twelve base source-object checks and seventeen selected-record tests +pass. The final overlap refresh reached PR961 and found no receiver-family +census duplicate; upstream main still equals the recorded base. No coordination +issue was available. The result's source branch is +https://github.com/ToikY/integer-mult-bounds/tree/codex/bit-supplier-seed15 . +No new kappa is claimed. diff --git a/research/p111-receiver-census/EXPECTED.json b/research/p111-receiver-census/EXPECTED.json new file mode 100644 index 0000000000..b7480fd8c2 --- /dev/null +++ b/research/p111-receiver-census/EXPECTED.json @@ -0,0 +1,1889 @@ +{ + "baseline": [ + [ + 2, + 1, + 1, + 1, + 1, + 3, + 2, + 1, + 2 + ], + 439, + 10, + 0, + [ + [ + 0, + [ + 49, + 57, + 59 + ] + ], + [ + 1, + [ + 0 + ] + ], + [ + 3, + [ + 21, + 29 + ] + ], + [ + 5, + [ + 40, + 54, + 84, + 100 + ] + ] + ], + [ + 9, + 9, + 12, + 9, + 12, + 9, + 12, + 12, + 12, + 12 + ] + ], + "case_count": 19683, + "groups": { + "0": [ + 15, + 66, + 72 + ], + "1": [ + 10, + 51 + ], + "2": [], + "3": [ + 56, + 111 + ], + "4": [], + "5": [ + 53, + 89 + ], + "6": [], + "7": [], + "8": [], + "9": [] + }, + "histogram": { + "439": 2646, + "440": 8127, + "441": 6642, + "442": 2052, + "443": 216 + }, + "local_tables": { + "0": [ + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 49, + 57, + 59 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0xaa07000000000040", + "0xaa03000000000000", + "0xaa01000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000060", + "0x8a07000000000260", + "0xa207000000000240" + ], + "rank": 9, + "receivers": [ + 1, + 1, + 1 + ], + "reusable_extras": 3, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 49, + 57, + 59 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0xaa07000000000040", + "0xaa03000000000000", + "0xaa00000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000260", + "0x8a07000000000260", + "0xa207000000000240" + ], + "rank": 9, + "receivers": [ + 1, + 1, + 2 + ], + "reusable_extras": 3, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 49, + 57, + 59 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0xaa07000000000040", + "0xaa03000000000000", + "0xaa01000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000260", + "0x8a07000000000260", + "0xa207000000000240" + ], + "rank": 9, + "receivers": [ + 1, + 1, + 3 + ], + "reusable_extras": 3, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 5, + 49, + 57 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0xaa07000000000040", + "0xaa03000000000000", + "0xaa01000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000060", + "0x8207000000000260", + "0xa207000000000260" + ], + "rank": 9, + "receivers": [ + 1, + 2, + 1 + ], + "reusable_extras": 3, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 5, + 49, + 57 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0xaa07000000000040", + "0xaa03000000000000", + "0xaa00000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000260", + "0x8207000000000260", + "0xa207000000000260" + ], + "rank": 9, + "receivers": [ + 1, + 2, + 2 + ], + "reusable_extras": 3, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 5, + 49, + 57 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0xaa07000000000040", + "0xaa03000000000000", + "0xaa01000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000260", + "0x8207000000000260", + "0xa207000000000260" + ], + "rank": 9, + "receivers": [ + 1, + 2, + 3 + ], + "reusable_extras": 3, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 49, + 57, + 59 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0xaa07000000000040", + "0xaa03000000000000", + "0xaa01000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000060", + "0x8a07000000000260", + "0xa207000000000260" + ], + "rank": 9, + "receivers": [ + 1, + 3, + 1 + ], + "reusable_extras": 3, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 49, + 57, + 59 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0xaa07000000000040", + "0xaa03000000000000", + "0xaa00000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000260", + "0x8a07000000000260", + "0xa207000000000260" + ], + "rank": 9, + "receivers": [ + 1, + 3, + 2 + ], + "reusable_extras": 3, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 49, + 57, + 59 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0xaa07000000000040", + "0xaa03000000000000", + "0xaa01000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000260", + "0x8a07000000000260", + "0xa207000000000260" + ], + "rank": 9, + "receivers": [ + 1, + 3, + 3 + ], + "reusable_extras": 3, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 4, + "extras": [ + 48, + 49, + 50, + 57 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0x2a07000000000040", + "0xaa07000000000000", + "0xaa01000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000060", + "0x8a07000000000260", + "0xa207000000000240" + ], + "rank": 9, + "receivers": [ + 2, + 1, + 1 + ], + "reusable_extras": 4, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 49, + 50, + 57 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0x2a07000000000040", + "0xaa07000000000000", + "0xaa00000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000260", + "0x8a07000000000260", + "0xa207000000000240" + ], + "rank": 9, + "receivers": [ + 2, + 1, + 2 + ], + "reusable_extras": 3, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 4, + "extras": [ + 48, + 49, + 50, + 57 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0x2a07000000000040", + "0xaa07000000000000", + "0xaa01000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000260", + "0x8a07000000000260", + "0xa207000000000240" + ], + "rank": 9, + "receivers": [ + 2, + 1, + 3 + ], + "reusable_extras": 4, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 4, + "extras": [ + 5, + 48, + 49, + 57 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0x2a07000000000040", + "0xaa07000000000000", + "0xaa01000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000060", + "0x8207000000000260", + "0xa207000000000260" + ], + "rank": 9, + "receivers": [ + 2, + 2, + 1 + ], + "reusable_extras": 4, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 5, + 49, + 57 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0x2a07000000000040", + "0xaa07000000000000", + "0xaa00000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000260", + "0x8207000000000260", + "0xa207000000000260" + ], + "rank": 9, + "receivers": [ + 2, + 2, + 2 + ], + "reusable_extras": 3, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 4, + "extras": [ + 5, + 48, + 49, + 57 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0x2a07000000000040", + "0xaa07000000000000", + "0xaa01000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000260", + "0x8207000000000260", + "0xa207000000000260" + ], + "rank": 9, + "receivers": [ + 2, + 2, + 3 + ], + "reusable_extras": 4, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 4, + "extras": [ + 48, + 49, + 50, + 57 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0x2a07000000000040", + "0xaa07000000000000", + "0xaa01000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000060", + "0x8a07000000000260", + "0xa207000000000260" + ], + "rank": 9, + "receivers": [ + 2, + 3, + 1 + ], + "reusable_extras": 4, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 49, + 50, + 57 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0x2a07000000000040", + "0xaa07000000000000", + "0xaa00000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000260", + "0x8a07000000000260", + "0xa207000000000260" + ], + "rank": 9, + "receivers": [ + 2, + 3, + 2 + ], + "reusable_extras": 3, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 4, + "extras": [ + 48, + 49, + 50, + 57 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0x2a07000000000040", + "0xaa07000000000000", + "0xaa01000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000260", + "0x8a07000000000260", + "0xa207000000000260" + ], + "rank": 9, + "receivers": [ + 2, + 3, + 3 + ], + "reusable_extras": 4, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 49, + 57, + 59 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0xaa07000000000040", + "0xaa07000000000000", + "0xaa01000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000060", + "0x8a07000000000260", + "0xa207000000000240" + ], + "rank": 8, + "receivers": [ + 3, + 1, + 1 + ], + "reusable_extras": 3, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 49, + 57, + 59 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0xaa07000000000040", + "0xaa07000000000000", + "0xaa00000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000260", + "0x8a07000000000260", + "0xa207000000000240" + ], + "rank": 9, + "receivers": [ + 3, + 1, + 2 + ], + "reusable_extras": 3, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 49, + 57, + 59 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0xaa07000000000040", + "0xaa07000000000000", + "0xaa01000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000260", + "0x8a07000000000260", + "0xa207000000000240" + ], + "rank": 9, + "receivers": [ + 3, + 1, + 3 + ], + "reusable_extras": 3, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 5, + 49, + 57 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0xaa07000000000040", + "0xaa07000000000000", + "0xaa01000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000060", + "0x8207000000000260", + "0xa207000000000260" + ], + "rank": 8, + "receivers": [ + 3, + 2, + 1 + ], + "reusable_extras": 3, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 5, + 49, + 57 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0xaa07000000000040", + "0xaa07000000000000", + "0xaa00000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000260", + "0x8207000000000260", + "0xa207000000000260" + ], + "rank": 9, + "receivers": [ + 3, + 2, + 2 + ], + "reusable_extras": 3, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 5, + 49, + 57 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0xaa07000000000040", + "0xaa07000000000000", + "0xaa01000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000260", + "0x8207000000000260", + "0xa207000000000260" + ], + "rank": 9, + "receivers": [ + 3, + 2, + 3 + ], + "reusable_extras": 3, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 49, + 57, + 59 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0xaa07000000000040", + "0xaa07000000000000", + "0xaa01000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000060", + "0x8a07000000000260", + "0xa207000000000260" + ], + "rank": 8, + "receivers": [ + 3, + 3, + 1 + ], + "reusable_extras": 3, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 49, + 57, + 59 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0xaa07000000000040", + "0xaa07000000000000", + "0xaa00000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000260", + "0x8a07000000000260", + "0xa207000000000260" + ], + "rank": 9, + "receivers": [ + 3, + 3, + 2 + ], + "reusable_extras": 3, + "target_count": 9 + }, + { + "block": 0, + "closure_rounds": 3, + "cost": 3, + "extras": [ + 49, + 57, + 59 + ], + "junk": 0, + "needs": [ + "0xaa07000000000020", + "0xaa07000000000040", + "0xaa07000000000000", + "0xaa01000000000260", + "0x8206000000000260", + "0x2a03000000000260", + "0xaa07000000000260", + "0x8a07000000000260", + "0xa207000000000260" + ], + "rank": 9, + "receivers": [ + 3, + 3, + 3 + ], + "reusable_extras": 3, + "target_count": 9 + } + ], + "1": [ + { + "block": 1, + "closure_rounds": 2, + "cost": 1, + "extras": [ + 0 + ], + "junk": 0, + "needs": [ + "0x98380000000000000009", + "0x98380000000000000008", + "0x98180000000000000001", + "0x8380000000000001009", + "0x98280000000000001009", + "0x90300000000000001009", + "0x98180000000000001009", + "0x88380000000000001009", + "0x88280000000000001001", + "0x90180000000000001009" + ], + "rank": 9, + "receivers": [ + 1, + 1 + ], + "reusable_extras": 1, + "target_count": 10 + }, + { + "block": 1, + "closure_rounds": 2, + "cost": 1, + "extras": [ + 0 + ], + "junk": 0, + "needs": [ + "0x98380000000000000009", + "0x98380000000000000008", + "0x98180000000000000001", + "0x88380000000000001009", + "0x98280000000000001009", + "0x90300000000000001009", + "0x98180000000000001009", + "0x88380000000000001009", + "0x88280000000000001009", + "0x90180000000000001009" + ], + "rank": 9, + "receivers": [ + 1, + 2 + ], + "reusable_extras": 1, + "target_count": 10 + }, + { + "block": 1, + "closure_rounds": 2, + "cost": 1, + "extras": [ + 0 + ], + "junk": 0, + "needs": [ + "0x98380000000000000009", + "0x98380000000000000008", + "0x98180000000000000001", + "0x8380000000000001009", + "0x98280000000000001009", + "0x90300000000000001009", + "0x98180000000000001009", + "0x88380000000000001009", + "0x88280000000000001009", + "0x90180000000000001009" + ], + "rank": 9, + "receivers": [ + 1, + 3 + ], + "reusable_extras": 1, + "target_count": 10 + }, + { + "block": 1, + "closure_rounds": 2, + "cost": 1, + "extras": [ + 0 + ], + "junk": 0, + "needs": [ + "0x98380000000000000009", + "0x98380000000000000000", + "0x98380000000000000001", + "0x8380000000000001009", + "0x98280000000000001009", + "0x90300000000000001009", + "0x98180000000000001009", + "0x88380000000000001009", + "0x88280000000000001001", + "0x90180000000000001009" + ], + "rank": 9, + "receivers": [ + 2, + 1 + ], + "reusable_extras": 1, + "target_count": 10 + }, + { + "block": 1, + "closure_rounds": 2, + "cost": 1, + "extras": [ + 0 + ], + "junk": 0, + "needs": [ + "0x98380000000000000009", + "0x98380000000000000000", + "0x98380000000000000001", + "0x88380000000000001009", + "0x98280000000000001009", + "0x90300000000000001009", + "0x98180000000000001009", + "0x88380000000000001009", + "0x88280000000000001009", + "0x90180000000000001009" + ], + "rank": 9, + "receivers": [ + 2, + 2 + ], + "reusable_extras": 1, + "target_count": 10 + }, + { + "block": 1, + "closure_rounds": 2, + "cost": 1, + "extras": [ + 0 + ], + "junk": 0, + "needs": [ + "0x98380000000000000009", + "0x98380000000000000000", + "0x98380000000000000001", + "0x8380000000000001009", + "0x98280000000000001009", + "0x90300000000000001009", + "0x98180000000000001009", + "0x88380000000000001009", + "0x88280000000000001009", + "0x90180000000000001009" + ], + "rank": 9, + "receivers": [ + 2, + 3 + ], + "reusable_extras": 1, + "target_count": 10 + }, + { + "block": 1, + "closure_rounds": 2, + "cost": 1, + "extras": [ + 0 + ], + "junk": 0, + "needs": [ + "0x98380000000000000009", + "0x98380000000000000008", + "0x98380000000000000001", + "0x8380000000000001009", + "0x98280000000000001009", + "0x90300000000000001009", + "0x98180000000000001009", + "0x88380000000000001009", + "0x88280000000000001001", + "0x90180000000000001009" + ], + "rank": 9, + "receivers": [ + 3, + 1 + ], + "reusable_extras": 1, + "target_count": 10 + }, + { + "block": 1, + "closure_rounds": 2, + "cost": 1, + "extras": [ + 0 + ], + "junk": 0, + "needs": [ + "0x98380000000000000009", + "0x98380000000000000008", + "0x98380000000000000001", + "0x88380000000000001009", + "0x98280000000000001009", + "0x90300000000000001009", + "0x98180000000000001009", + "0x88380000000000001009", + "0x88280000000000001009", + "0x90180000000000001009" + ], + "rank": 9, + "receivers": [ + 3, + 2 + ], + "reusable_extras": 1, + "target_count": 10 + }, + { + "block": 1, + "closure_rounds": 2, + "cost": 1, + "extras": [ + 0 + ], + "junk": 0, + "needs": [ + "0x98380000000000000009", + "0x98380000000000000008", + "0x98380000000000000001", + "0x8380000000000001009", + "0x98280000000000001009", + "0x90300000000000001009", + "0x98180000000000001009", + "0x88380000000000001009", + "0x88280000000000001009", + "0x90180000000000001009" + ], + "rank": 9, + "receivers": [ + 3, + 3 + ], + "reusable_extras": 1, + "target_count": 10 + } + ], + "2": [ + { + "block": 2, + "closure_rounds": 1, + "cost": 0, + "extras": [], + "junk": 0, + "needs": [ + "0x8040420010410080100000000", + "0x108040420010410080100020000", + "0x108040020010400000102020000", + "0x108000420010410000102020000", + "0x108040420000400080002020000", + "0x108040420010410080102020000", + "0x108040020000010080102020000", + "0x108040420010000080102020000", + "0x108000020010410080102020000", + "0x108040400010410080102020000", + "0x100040420010410080102000000", + "0x40420010410080100000000" + ], + "rank": 12, + "receivers": [], + "reusable_extras": 0, + "target_count": 12 + } + ], + "3": [ + { + "block": 3, + "closure_rounds": 2, + "cost": 3, + "extras": [ + 21, + 29, + 105 + ], + "junk": 0, + "needs": [ + "0x200000202804000202020000000", + "0x2000200804000202000200000", + "0x202000002804000200020200000", + "0x200000202804000202020200000", + "0x202000200000000202020200000", + "0x202000200800000202020200000", + "0x202000200004000202020200000", + "0x202000202804000200020200000", + "0x202000002804000200020200000", + "0x200000202804000202000200000" + ], + "rank": 9, + "receivers": [ + 1, + 1 + ], + "reusable_extras": 3, + "target_count": 10 + }, + { + "block": 3, + "closure_rounds": 2, + "cost": 2, + "extras": [ + 21, + 29 + ], + "junk": 0, + "needs": [ + "0x202804000202020000000", + "0x2000202804000202000200000", + "0x202000002804000200020200000", + "0x200000202804000202020200000", + "0x202000200000000202020200000", + "0x202000200800000202020200000", + "0x202000200004000202020200000", + "0x202000202804000200020200000", + "0x202000002804000200020200000", + "0x200000202804000202000200000" + ], + "rank": 9, + "receivers": [ + 1, + 2 + ], + "reusable_extras": 2, + "target_count": 10 + }, + { + "block": 3, + "closure_rounds": 2, + "cost": 3, + "extras": [ + 21, + 29, + 105 + ], + "junk": 0, + "needs": [ + "0x200000202804000202020000000", + "0x2000202804000202000200000", + "0x202000002804000200020200000", + "0x200000202804000202020200000", + "0x202000200000000202020200000", + "0x202000200800000202020200000", + "0x202000200004000202020200000", + "0x202000202804000200020200000", + "0x202000002804000200020200000", + "0x200000202804000202000200000" + ], + "rank": 9, + "receivers": [ + 1, + 3 + ], + "reusable_extras": 3, + "target_count": 10 + }, + { + "block": 3, + "closure_rounds": 2, + "cost": 4, + "extras": [ + 21, + 29, + 71, + 105 + ], + "junk": 0, + "needs": [ + "0x200000202804000202020000000", + "0x2000200804000202000200000", + "0x202000002804000200020200000", + "0x200000202804000202020200000", + "0x202000000000000202020200000", + "0x202000200800000202020200000", + "0x202000200804000202020200000", + "0x202000202804000200020200000", + "0x202000002804000200020200000", + "0x200000202804000202000200000" + ], + "rank": 9, + "receivers": [ + 2, + 1 + ], + "reusable_extras": 4, + "target_count": 10 + }, + { + "block": 3, + "closure_rounds": 2, + "cost": 3, + "extras": [ + 21, + 29, + 71 + ], + "junk": 0, + "needs": [ + "0x202804000202020000000", + "0x2000202804000202000200000", + "0x202000002804000200020200000", + "0x200000202804000202020200000", + "0x202000000000000202020200000", + "0x202000200800000202020200000", + "0x202000200804000202020200000", + "0x202000202804000200020200000", + "0x202000002804000200020200000", + "0x200000202804000202000200000" + ], + "rank": 9, + "receivers": [ + 2, + 2 + ], + "reusable_extras": 3, + "target_count": 10 + }, + { + "block": 3, + "closure_rounds": 2, + "cost": 4, + "extras": [ + 21, + 29, + 71, + 105 + ], + "junk": 0, + "needs": [ + "0x200000202804000202020000000", + "0x2000202804000202000200000", + "0x202000002804000200020200000", + "0x200000202804000202020200000", + "0x202000000000000202020200000", + "0x202000200800000202020200000", + "0x202000200804000202020200000", + "0x202000202804000200020200000", + "0x202000002804000200020200000", + "0x200000202804000202000200000" + ], + "rank": 9, + "receivers": [ + 2, + 3 + ], + "reusable_extras": 4, + "target_count": 10 + }, + { + "block": 3, + "closure_rounds": 2, + "cost": 3, + "extras": [ + 21, + 29, + 105 + ], + "junk": 0, + "needs": [ + "0x200000202804000202020000000", + "0x2000200804000202000200000", + "0x202000002804000200020200000", + "0x200000202804000202020200000", + "0x202000200000000202020200000", + "0x202000200800000202020200000", + "0x202000200804000202020200000", + "0x202000202804000200020200000", + "0x202000002804000200020200000", + "0x200000202804000202000200000" + ], + "rank": 9, + "receivers": [ + 3, + 1 + ], + "reusable_extras": 3, + "target_count": 10 + }, + { + "block": 3, + "closure_rounds": 2, + "cost": 2, + "extras": [ + 21, + 29 + ], + "junk": 0, + "needs": [ + "0x202804000202020000000", + "0x2000202804000202000200000", + "0x202000002804000200020200000", + "0x200000202804000202020200000", + "0x202000200000000202020200000", + "0x202000200800000202020200000", + "0x202000200804000202020200000", + "0x202000202804000200020200000", + "0x202000002804000200020200000", + "0x200000202804000202000200000" + ], + "rank": 9, + "receivers": [ + 3, + 2 + ], + "reusable_extras": 2, + "target_count": 10 + }, + { + "block": 3, + "closure_rounds": 2, + "cost": 3, + "extras": [ + 21, + 29, + 105 + ], + "junk": 0, + "needs": [ + "0x200000202804000202020000000", + "0x2000202804000202000200000", + "0x202000002804000200020200000", + "0x200000202804000202020200000", + "0x202000200000000202020200000", + "0x202000200800000202020200000", + "0x202000200804000202020200000", + "0x202000202804000200020200000", + "0x202000002804000200020200000", + "0x200000202804000202000200000" + ], + "rank": 9, + "receivers": [ + 3, + 3 + ], + "reusable_extras": 3, + "target_count": 10 + } + ], + "4": [ + { + "block": 4, + "closure_rounds": 1, + "cost": 0, + "extras": [], + "junk": 0, + "needs": [ + "0x40108040401080404010000000", + "0x40108040401080404000800000", + "0x4040008040401080004010800000", + "0x4040108040401080404000800000", + "0x4040108000000080404010800000", + "0x4040108040000080404010800000", + "0x4040108000400080404010800000", + "0x4040008040400000404010800000", + "0x4040100040401000400010800000", + "0x4040000040401080000010800000", + "0x108040401080404000000000", + "0x4000100040401080404010800000" + ], + "rank": 12, + "receivers": [], + "reusable_extras": 0, + "target_count": 12 + } + ], + "5": [ + { + "block": 5, + "closure_rounds": 2, + "cost": 4, + "extras": [ + 40, + 54, + 84, + 100 + ], + "junk": 0, + "needs": [ + "0x801004020040010800000000", + "0x10801004020040010001000000", + "0x10800004020040010001080000", + "0x10801004020040000001080000", + "0x10801004020040010801080000", + "0x10801000020000010801080000", + "0x10801004000040010801080000", + "0x10801000020040010801080000", + "0x10801004020040010800000000", + "0x801004020040010800000000" + ], + "rank": 9, + "receivers": [ + 1, + 1 + ], + "reusable_extras": 4, + "target_count": 10 + }, + { + "block": 5, + "closure_rounds": 2, + "cost": 4, + "extras": [ + 40, + 54, + 84, + 100 + ], + "junk": 0, + "needs": [ + "0x801004020040010800000000", + "0x10801004020040010001000000", + "0x10800004020040010001080000", + "0x10001004020040000001080000", + "0x10801004020040010801080000", + "0x10801000020000010801080000", + "0x10801004000040010801080000", + "0x10801004020040010801080000", + "0x10801004020040010800000000", + "0x801004020040010800000000" + ], + "rank": 8, + "receivers": [ + 1, + 2 + ], + "reusable_extras": 4, + "target_count": 10 + }, + { + "block": 5, + "closure_rounds": 2, + "cost": 4, + "extras": [ + 40, + 54, + 84, + 100 + ], + "junk": 0, + "needs": [ + "0x801004020040010800000000", + "0x10801004020040010001000000", + "0x10800004020040010001080000", + "0x10801004020040000001080000", + "0x10801004020040010801080000", + "0x10801000020000010801080000", + "0x10801004000040010801080000", + "0x10801004020040010801080000", + "0x10801004020040010800000000", + "0x801004020040010800000000" + ], + "rank": 8, + "receivers": [ + 1, + 3 + ], + "reusable_extras": 4, + "target_count": 10 + }, + { + "block": 5, + "closure_rounds": 3, + "cost": 5, + "extras": [ + 40, + 54, + 65, + 84, + 100 + ], + "junk": 0, + "needs": [ + "0x801004020040010800000000", + "0x10801004020040010001000000", + "0x10800004020040010001080000", + "0x10801004020040000001080000", + "0x10801004020040010801080000", + "0x10801000000000010801080000", + "0x10801004000040010801080000", + "0x10801000020040010801080000", + "0x10801004020040010800000000", + "0x801004020040010800000000" + ], + "rank": 9, + "receivers": [ + 2, + 1 + ], + "reusable_extras": 5, + "target_count": 10 + }, + { + "block": 5, + "closure_rounds": 2, + "cost": 4, + "extras": [ + 40, + 54, + 84, + 100 + ], + "junk": 0, + "needs": [ + "0x801004020040010800000000", + "0x10801004020040010001000000", + "0x10800004020040010001080000", + "0x10001004020040000001080000", + "0x10801004020040010801080000", + "0x10801000000000010801080000", + "0x10801004000040010801080000", + "0x10801004020040010801080000", + "0x10801004020040010800000000", + "0x801004020040010800000000" + ], + "rank": 8, + "receivers": [ + 2, + 2 + ], + "reusable_extras": 4, + "target_count": 10 + }, + { + "block": 5, + "closure_rounds": 3, + "cost": 5, + "extras": [ + 40, + 54, + 65, + 84, + 100 + ], + "junk": 0, + "needs": [ + "0x801004020040010800000000", + "0x10801004020040010001000000", + "0x10800004020040010001080000", + "0x10801004020040000001080000", + "0x10801004020040010801080000", + "0x10801000000000010801080000", + "0x10801004000040010801080000", + "0x10801004020040010801080000", + "0x10801004020040010800000000", + "0x801004020040010800000000" + ], + "rank": 8, + "receivers": [ + 2, + 3 + ], + "reusable_extras": 5, + "target_count": 10 + }, + { + "block": 5, + "closure_rounds": 2, + "cost": 4, + "extras": [ + 40, + 54, + 84, + 100 + ], + "junk": 0, + "needs": [ + "0x801004020040010800000000", + "0x10801004020040010001000000", + "0x10800004020040010001080000", + "0x10801004020040000001080000", + "0x10801004020040010801080000", + "0x10801000000000010801080000", + "0x10801004000040010801080000", + "0x10801000020040010801080000", + "0x10801004020040010800000000", + "0x801004020040010800000000" + ], + "rank": 9, + "receivers": [ + 3, + 1 + ], + "reusable_extras": 4, + "target_count": 10 + }, + { + "block": 5, + "closure_rounds": 2, + "cost": 4, + "extras": [ + 40, + 54, + 84, + 100 + ], + "junk": 0, + "needs": [ + "0x801004020040010800000000", + "0x10801004020040010001000000", + "0x10800004020040010001080000", + "0x10001004020040000001080000", + "0x10801004020040010801080000", + "0x10801000000000010801080000", + "0x10801004000040010801080000", + "0x10801004020040010801080000", + "0x10801004020040010800000000", + "0x801004020040010800000000" + ], + "rank": 8, + "receivers": [ + 3, + 2 + ], + "reusable_extras": 4, + "target_count": 10 + }, + { + "block": 5, + "closure_rounds": 2, + "cost": 4, + "extras": [ + 40, + 54, + 84, + 100 + ], + "junk": 0, + "needs": [ + "0x801004020040010800000000", + "0x10801004020040010001000000", + "0x10800004020040010001080000", + "0x10801004020040000001080000", + "0x10801004020040010801080000", + "0x10801000000000010801080000", + "0x10801004000040010801080000", + "0x10801004020040010801080000", + "0x10801004020040010800000000", + "0x801004020040010800000000" + ], + "rank": 8, + "receivers": [ + 3, + 3 + ], + "reusable_extras": 4, + "target_count": 10 + } + ], + "6": [ + { + "block": 6, + "closure_rounds": 1, + "cost": 0, + "extras": [], + "junk": 0, + "needs": [ + "0x284800000000021400004800", + "0x120000284800000000121400004800", + "0x120000284800000000001400004800", + "0x120000284000000000021400004000", + "0x120000204800000000120000004800", + "0x120000284800000000120000004800", + "0x120000084800000000120400000800", + "0x120000004800000000120000004800", + "0x120000280000000000121400004800", + "0x120000284800000000101400004800", + "0x100000284800000000120400004000", + "0x20000284800000000121400004000" + ], + "rank": 12, + "receivers": [], + "reusable_extras": 0, + "target_count": 12 + } + ], + "7": [ + { + "block": 7, + "closure_rounds": 1, + "cost": 0, + "extras": [], + "junk": 0, + "needs": [ + "0x2834000000000000000000cc000082", + "0x83c000000000000000000cc000002", + "0x282c0000000000000000008c000082", + "0x281c000000000000000000c8000002", + "0x283c000000000000000000cc000082", + "0x282c000000000000000000c4000082", + "0x283c000000000000000000c8000082", + "0x203c00000000000000000084000082", + "0x281c0000000000000000004c000082", + "0x2838000000000000000000cc000082", + "0x283c000000000000000000c4000000", + "0x83c000000000000000000cc000080" + ], + "rank": 12, + "receivers": [], + "reusable_extras": 0, + "target_count": 12 + } + ], + "8": [ + { + "block": 8, + "closure_rounds": 1, + "cost": 0, + "extras": [], + "junk": 0, + "needs": [ + "0x4100a5000000000000000000550000", + "0xa5000000000000000000550014", + "0x100a5000000000000000000550014", + "0x410025000000000000000000550014", + "0x410021000000000000000000140014", + "0x4100a4000000000000000000510014", + "0x410025000000000000000000140014", + "0x4100a5000000000000000000450014", + "0x4100a1000000000000000000540014", + "0x4100a4000000000000000000450014", + "0x4100a4000000000000000000550014", + "0xa5000000000000000000550004" + ], + "rank": 12, + "receivers": [], + "reusable_extras": 0, + "target_count": 12 + } + ], + "9": [ + { + "block": 9, + "closure_rounds": 1, + "cost": 0, + "extras": [], + "junk": 0, + "needs": [ + "0x412100000000848200000000", + "0x40000412000000000848200000100", + "0x840000412000000000808200002100", + "0x840000412100000000848200002100", + "0x840000002100000000848200002100", + "0x840000002100000000840000002100", + "0x800000002100000000848000002100", + "0x840000012100000000840200002100", + "0x840000412000000000008200002100", + "0x840000412100000000008200000100", + "0x840000012100000000848200002100", + "0x800000412100000000848200002000" + ], + "rank": 12, + "receivers": [], + "reusable_extras": 0, + "target_count": 12 + } + ] + }, + "minimizers": 2646, + "minimum_R": 439, + "record_sha256": "5598bbe4112493b6f6b55051a0364b7e576e253b8c2a85f8f05dcbb5d2ef7316" +} diff --git a/research/p111-receiver-census/NOTICE.md b/research/p111-receiver-census/NOTICE.md new file mode 100644 index 0000000000..d1e56f3bb3 --- /dev/null +++ b/research/p111-receiver-census/NOTICE.md @@ -0,0 +1,27 @@ +# Attribution and provenance + +Prepared for ToikY with substantial OpenAI Codex assistance, including +separate AI inspection of the generator's accounting and block +dependencies. This is not independent human peer review. + +The exact repository base is +`007664306fff84fbb1c9a1b4053b69f439764034`. +The selected result at that base is PR890, with the unchanged PR589 +bit supplier on PR555. The source manifest accompanying this package pins +the exact files used by the census; historical PR numbers identify +provenance and do not replace those byte-level pins. + +Credit eumemic for PR555's punctured R439 generator, PR543's R420 +interleaved-source skeleton, and the inherited E8 geometry and circuit +machinery. Credit DreamingOfClouds for PR545's punctured-star construction +and PR589's two transports. The original generator's discovery code +sampled receiver choices; this contribution checks the complete receiver +domain for one frozen puncture, plan, and free-keeper assignment. It does +not claim the receiver mechanism, puncturing, mutable-source interface, +or predecessor constructions as new. + +The construction lineage includes the retained PR493 carrier skeleton, +the PR510 nine-stage chain and their credited predecessors. Original +copyright notices and licenses remain unchanged. New code and prose are +provided under the repository's Apache License 2.0; see the repository +LICENSE. No code or other file under `upstream/` is changed. diff --git a/research/p111-receiver-census/PROOF.md b/research/p111-receiver-census/PROOF.md new file mode 100644 index 0000000000..790ace6a50 --- /dev/null +++ b/research/p111-receiver-census/PROOF.md @@ -0,0 +1,143 @@ +# Fixed-plan receiver census: scope and complete helper bill + +The minimum helper count is **439**, attained by **2,646 of 19,683** +receiver assignments in one frozen P111 generator. This note proves why +ten small tables cover that complete domain. It is an optimality statement +only for the generator-defined class, not for bit suppliers or XOR circuits. + +## Object and domain + +The source is eumemic's PR555 generator in +`research/e8-bit-p111-tuned/code/gen_p3.py`, its frozen `data/plan-l3.json`, +and the parameters in `data/punct.json`. The punctured lines are +`P = [10,15,51,53,56,66,72,89,111]`. Freeze the free-keeper choices and +their assignment to D6 nodes produced by `plan_thirds` with seed 552. +Freeze all other construction rules, including the order and residual +convention in `express`, monotone missing-carrier closure, and junk-wire +reuse. Assignment seed 15 selects this investigation; it does not change +the inherited seed 552. + +For each punctured line, its two eligible `(z,z)` D6 nodes may direct the +first, second, or both free keepers to its pseudo-target. Thus a receiver +choice is a vector in `{1,2,3}^9`, of size 19,683. The nine punctured lines +occupy distinct orthogonal four-frames. Their eighteen controlled D6 nodes +are therefore distinct, so no two entries overwrite one receiver choice. +The verifier must check these facts rather than infer them from the size +of P. Original receiver choices outside these eighteen nodes stay fixed. + +Let B be a supplying D4 block and C its orthogonal complementary block. +The variable pseudo-targets served by B are the punctured lines in C: + +| B | Variable pseudo-targets | Local assignments | Minimum extra cost | Minimizers | +|---|---|---:|---:|---:| +| 0 | 15, 66, 72 | 27 | 3 | 21 | +| 1 | 10, 51 | 9 | 1 | 9 | +| 3 | 56, 111 | 9 | 2 | 2 | +| 5 | 53, 89 | 9 | 4 | 7 | +| 2, 4, 6, 7, 8, 9 | none | one per block | 0 each | 1 each | + +There are 60 local table entries. Their Cartesian product represents +all 19,683 global assignments, without identifying different circuits as +equivalent or sampling assignments. + +## Why the tables separate + +All source responses below are exact vectors over F2 on the 111 live +source coordinates. Punctured coordinates are absent. In particular, +a free keeper whose selected line is punctured has zero source response; +it still carries arbitrary helper dirt and is still charged as a helper. + +Before the mini-nodes, the fixed cell/quad/D6 construction gives each +free keeper its fixed source response. A receiver choice for p in C +selects a designated free keeper in B and the desired replacement +response computed from p's hyperplane, d-single line, and D6 responses. +If both keepers are received, the second keeper's response is included +exactly as in the original generator. These data involve only B and C. + +For a mini-node in B, the generator's ordered donor list contains B's +free keepers, B's extra carriers, and B's freed home sources. Retain the +original order, including the sequential order of pseudo-target writes. +An unsuccessful `express` call adds its precise residual coordinates to +B's missing set and skips that write. Rebuild from the original initial +responses after adjoining the missing carriers, as the original generator +does. This is not replacement by an arbitrary minimum-rank extension: +different residual or elimination conventions could select different +carriers and would define a different search class. + +Each added carrier belongs to B. The missing-carrier update is monotone +and does not consult another block's variable state. A completed local +closure therefore depends only on the receiver choices for p in C. +The census records failures or nonconvergence if present; it must not +silently discard them as successful cases. + +The subsequent D6 additions use those modified free keepers. Each live +target in C receives only the D6 responses and keeper responses determined +by this same local choice. Its remaining Q-part consequently depends only +on B's local table entry. Free-cell keepers and the home sources used by +the phase-B block node are distinct registers. Other mini-nodes cannot +alter these home-source responses. Geometry, the live port set, retained +totals, and complementary-block assignments are fixed. + +Global helper numbers may shift when another block uses more carriers; +that relabeling does not change this dependence. The original donor order +within each class is retained. The local record must nevertheless match +the original generator on the selected parameters and checked variants. + +## Complete helper count + +The fixed allocation is 240 carrier registers, 180 cell-empty registers, +and nine pseudo-target totals: **429 helpers**. Puncturing does not remove +the two carrier registers allocated per original E8 line. Sources and +targets are separate and are not included in R. + +For block B let e_B be its extra-carrier count, n_B its number of live +target outputs, and r_B the F2 rank of their Q-part source responses. +The phase-B generator appends a fresh independent dirt direction whenever +a required row is dependent. Exactly n_B-r_B such directions are needed: +every dependent row gets its own new coordinate; these coordinates cannot +create a new relation among the original source coordinates. + +Let a_B count the extra carriers eligible for this reuse under the actual +generator predicate. Each eligible carrier has the same source response +as an available home source, so their sum supplies a zero-source dirt +direction. The generator uses each eligible carrier at most once. The +remaining newly allocated junk helpers are therefore + +`j_B = max(0, n_B - r_B - a_B)`. + +The complete count is + +`R(choice) = 429 + sum_B (e_B(choice_B) + j_B(choice_B))`. + +An extra carrier reused as junk is counted once, in e_B. Unused extra +carriers remain paid. Do not assume a_B=e_B without checking the original +eligibility predicate. Node elimination and randomized LU lowering occur +after these allocations and allocate no further helper registers; their +trial count cannot lower R in this fixed class. + +Every global assignment is a choice of one entry per independent table. +Thus summing the per-table minima gives a lower bound on R for the entire +class. Concatenating local minimizing choices attains that bound whenever +the corresponding generator construction succeeds. Here the minimum is +`429+3+1+2+4=439`, with `21*9*2*7=2646` minimizing assignments. The complete +helper-count histogram is `{439:2646, 440:8127, 441:6642, 442:2052, 443:216}`. +The two implementations agree on the complete per-assignment record digest, +not only on this histogram. The selected receiver choice attains the minimum. + +## Limits + +This does not optimize the punctured set, skeleton plan, free-keeper +assignment, extra-carrier basis, greedy closure rule, register reuse +architecture, or frame schedule. A helper-count minimum need not minimize +ADDs, signed prefix growth, the recursive profile, or a hosted invoice. +Other assignments with 439 helpers may improve those quantities. Arbitrary +extra-carrier vectors and alternative elimination/residual rules are outside +the class, even if they implement the same endpoint. No such circuit is +excluded by this census. + +Finite F2 source accounting and reconstruction do not discharge the +inherited arbitrary-dirt, frame, physical realization, whole-call hosting, +all-size compilation, precision/tape, or analytic transfer obligations. +A proposed supplier replacement still needs its complete checks and +invoice. This package does not change the selected frontier or claim a +new kappa, a practical runtime improvement, or a full multiplication proof. diff --git a/research/p111-receiver-census/README.md b/research/p111-receiver-census/README.md new file mode 100644 index 0000000000..2ebc3b501d --- /dev/null +++ b/research/p111-receiver-census/README.md @@ -0,0 +1,108 @@ +# Receiver choices cannot lower this frozen P111 word below 439 helpers + +**Scoped negative result; no new kappa.** PR555's discovery sampled receiver +choices for its nine pseudo-target totals. For its frozen puncture set and +keeper plan (inherited by PR589), this package exhausts all **19,683** choices. +None uses fewer than the shipped **439 helpers**. Exactly **2,646** attain 439. + +| Helpers | Receiver assignments | +|---:|---:| +| 439 | 2,646 | +| 440 | 8,127 | +| 441 | 6,642 | +| 442 | 2,052 | +| 443 | 216 | + +The complete cost is `429 + extra carriers + newly allocated junk wires`. +It includes the 240 carrier helpers, 180 cell-empty helpers, nine totals, +every carrier added by the generator's missing-response closure, and every +remaining independent dirt direction needed by phase B. An extra carrier +reused as a junk direction is still paid once. All 60 block-local cases have +enough eligible carriers for their rank deficits, so no additional junk wire +is allocated in this particular domain. + +This closes **receiver choice alone** as a route to fewer helpers in this +specific generator family. It does not close further optimization of the +2,646 equal-helper words' ADD counts, frame profiles, or precision costs. +It does not optimize the punctured set or keeper plan. + +## Reproduce + +From the repository root, using ordinary Python 3.11+ and the predecessor's +NumPy dependency: + +```sh +python3 -I -B research/p111-receiver-census/verify.py +python3 -I -B research/p111-receiver-census/independent.py +python3 -I -B research/p111-receiver-census/test_package.py +``` + +The first command takes less than a second on the recorded machine and prints: + +```text +PASS_P111_RECEIVER_CENSUS cases=19683 local_rows=60 min_helpers=439 minimizers=2646 no_new_kappa +``` + +The independent command takes about 20 seconds and compares the complete +assignment digest, helper histogram and selected-word calibration. It also +runs 59 completed original-generator controls (55 distinct global vectors), +including every changing block-table entry. The test command repeats both +checkers from a minimal offline directory with spaces, checks preservation +of all input files, and tests mathematical and package failure modes. +Optimized Python (`-O`) is explicitly rejected because the retained geometry +setup and direct generator controls use assertions. No network or solver is +needed; default checks do not write artifacts or bytecode. + +`EXPECTED.json` retains every block-local record, exact residual-carrier set, +Q-response rank and source form, closure pass count, full histogram and record +digest. Each global record is serialized in sorted-puncture lexicographic +order as `[receiver_vector,R,extra_count,junk_count,nonempty_block_carrier_sets, +block_ranks]`, with compact JSON followed by a newline. Both engines obtain +SHA-256 `5598bbe4112493b6f6b55051a0364b7e576e253b8c2a85f8f05dcbb5d2ef7316`. + +## Why the result is checkable + +The main checker reduces the receiver cube to ten independent supplying-block +tables (60 entries), then enumerates the full Cartesian product. The separate +checker uses sets of source indices, symmetric difference and its own Gaussian +elimination; it propagates all 19,683 complete receiver vectors directly. +They share only the pinned predecessor geometry and frozen keeper-plan setup, +not receiver propagation or rank routines. [PROOF.md](PROOF.md) explains the +separation and full helper bill. + +A concrete control catches an undercount: if a failed mini-node write updates +its destination anyway, block 0 with choices `(2,1,1)` appears to need only +three extra carriers instead of four. Other controls cover punctured source +111's zero response, carrier reuse versus new junk allocation, invalid receiver +values and exact span membership. This tests failure modes rather than only +the final minimum. + +## Pins, stopping rule and limits + +Base: `007664306fff84fbb1c9a1b4053b69f439764034`. At this base the selected +conditional result is PR890, kappa `1661957774647029/10^18`, using PR589 on +PR555 for the bit supplier. [SOURCES.json](SOURCES.json) pins all twelve +consumed source/input files with SHA-256 and base Git blob identities. +The current selected pointer is contextual, not a mutable input to this census. + +The domain fixes the punctures `[10,15,51,53,56,66,72,89,111]`, skeleton plan, +`plan_thirds` seed 552, the generator's ordered mini-node elimination and +missing-carrier rule, and its extra-carrier reuse policy. Assignment seed 15 +selected this task; it did not replace the predecessor's seed 552. The stopping +rule was one complete receiver census and verification of its result. Coverage +is complete; no search of another keeper plan or circuit family followed. + +No new circuit is installed and no supplier invoice or new kappa is claimed. +The shared historical geometry setup uses NumPy numerical span calculations; +this package does not independently reconstruct or formally prove that geometry. +Its new arithmetic is exact F2 helper accounting. Full arbitrary-dirt/frame +replay of every receiver word, physical realization, whole-call hosting, +uniform recursive compilation, precision/tape accounting and analytic transfer +are not established here. A replacement supplier would still need those checks. +Full repository verification, selected cold replay, Linux/hosted CI and a full +formal multiplication proof were not run or claimed. + +Credit eumemic (PR543/555), DreamingOfClouds (PR545/589), and the retained +construction lineage; see [NOTICE.md](NOTICE.md). Prepared for **ToikY** with +substantial **OpenAI Codex assistance**, including separately written checks +and model review. No independent human review is claimed. Apache-2.0. diff --git a/research/p111-receiver-census/SOURCES.json b/research/p111-receiver-census/SOURCES.json new file mode 100644 index 0000000000..d5936ce84e --- /dev/null +++ b/research/p111-receiver-census/SOURCES.json @@ -0,0 +1,65 @@ +{ + "base_commit": "007664306fff84fbb1c9a1b4053b69f439764034", + "files": [ + { + "path": "research/e8-bit-carrier-skeleton/code/skeleton/e8.py", + "sha256": "721d859a6517d665ca84d03ef89668da3aae7433ffb0ee47faf37f2aeb85450e", + "git_blob": "92e83a2e0c1f67551f583630a728b2a880b06f51" + }, + { + "path": "research/e8-bit-carrier-skeleton/code/skeleton/gen.py", + "sha256": "7cdcf48078ed4beacd2e240aa8145e4aa6984558748d07659cb1b252786e073a", + "git_blob": "9811c127d41521e906462a75322a29f0e193629c" + }, + { + "path": "research/e8-bit-carrier-skeleton/code/skeleton/geom.py", + "sha256": "bb356568fa05e7bfd5fcd9012903611cf742729a99b4dc3a13685355b2678ae3", + "git_blob": "9e5fe3a781dc52e07b7c5de3a44c8be6f5024cd4" + }, + { + "path": "research/e8-bit-carrier-skeleton/code/skeleton/wordkit.py", + "sha256": "2b6c12d96f24a4e81f2c807827c2b74cf80037367fc8034e8c871dd5ce008351", + "git_blob": "7cc4e6d618d9d0166efe8be75a019b6aecee0582" + }, + { + "path": "research/e8-bit-carrier-skeleton/data/skeleton/d4part-pairs.json", + "sha256": "d69ffe3326140bc541b8f1639e02db43a5835ab8ca02cc742b5bee2bf2ef1ba9", + "git_blob": "7ea439877369b6c2e94bb47980d08944d61454fb" + }, + { + "path": "research/e8-bit-p111-tuned/code/gen_p3.py", + "sha256": "438b83f10d70ceca7cf78049420204b7de2dc61682f913c50a62596106ad84cd", + "git_blob": "ab21c9c19fc2386f273cd568b46282efcdd77fff" + }, + { + "path": "research/e8-bit-p111-tuned/code/nodeopt.py", + "sha256": "6a5896f60b1fe05c41ab28ce822dff782c635e12d0c74fad20b5ce2a4010fa3f", + "git_blob": "dd30a2e4e6e33ba60669d7b421229a2f6e53d6ad" + }, + { + "path": "research/e8-bit-p111-tuned/code/planio.py", + "sha256": "c0a687f61aed29455cea953d8a3e49a32136edb3cd4213c46880c146a6ca7fa3", + "git_blob": "0d5874976a18cc7db7e58fdc177568d538a59c01" + }, + { + "path": "research/e8-bit-p111-tuned/code/pwordl.py", + "sha256": "6d8fccd44508e4705b6446e0a64482a5221a3efc5663c5ca7ae90d44581ac50a", + "git_blob": "a90bed93e227c3916aca67817794f35e24123ceb" + }, + { + "path": "research/e8-bit-p111-tuned/data/plan-l3.json", + "sha256": "d5c2494b4baae801143049e172db303b3c8e25a002e9d9715a1d79dcb2d74c58", + "git_blob": "0d6e198897bd2090b96dee443543f00b6a54e065" + }, + { + "path": "research/e8-bit-p111-tuned/data/punct.json", + "sha256": "dd371e1d6fe57602f242920b582ec4c133efc8ede4a849fd701ac90b7f6e1853", + "git_blob": "d61f73c78578f5159ab9a5d40c99468291e5ea7c" + }, + { + "path": "research/e8-bit-p111-tuned/tune/bitE8mut-p111-tuned.json.gz", + "sha256": "e3e301e62bc2b41dbf1ceac0acf3d35824ebeab1848c5a2142d4577b109da52f", + "git_blob": "85a4499bf9e4911a705d50567a2c2ef6cf23739a" + } + ] +} diff --git a/research/p111-receiver-census/VALIDATION.md b/research/p111-receiver-census/VALIDATION.md new file mode 100644 index 0000000000..51e387fc03 --- /dev/null +++ b/research/p111-receiver-census/VALIDATION.md @@ -0,0 +1,37 @@ +# Executed validation + +Base `007664306fff84fbb1c9a1b4053b69f439764034`, macOS arm64, ordinary +CPython 3.12.14 with NumPy 2.3.5. The package is new and isolated; +no existing source, generator, selected record, or `upstream/` file is changed. + +- Main exact block-table census: all 60 rows and 19,683 assignments pass the + complete frozen receipt. Minimum 439; 2,646 minimizers. +- Independent set-valued full-vector census: every record matches the same + SHA-256, `5598bbe4112493b6f6b55051a0364b7e576e253b8c2a85f8f05dcbb5d2ef7316`. +- Original generator: 59 completed word controls, 55 distinct receiver vectors, + with 54 changing-block representatives plus five global controls. All helper + counts, extra-carrier sets and new-junk counts agree. These use `NODEOPT=1`: + lowering effort allocates no helpers, and no optimized ADD invoice is claimed. +- Separate AI model review ran 51 distinct original-generator variants covering + all 60 local entries, and independently confirmed the failed-write, punctured + response and carrier-reuse controls. This is not human peer review. +- Seven package tests pass. The minimal offline closure includes only this + package and its twelve pinned inputs. Both full checkers pass there without + Git or network access; before/after byte snapshots are identical. Source + corruption, omitted pins, invalid receiver vectors, a numeric-type receipt + mutation, and disabled Python assertions are rejected. +- Every consumed source file's SHA-256 and Git blob identity passes. All twelve + Git blob identities separately match the exact base tree. +- The selected-record binding check and its 17 focused tests pass. An initial + run rejected eight Python bytecode files generated during exploratory imports + inside inventoried predecessor packages. They were removed, and both new + entrypoints now disable bytecode writes before loading those packages. No + source bytes or inventory expectations were changed to repair that failure. + +The geometry/keeper-plan setup is shared pinned predecessor code. The independent +claim concerns receiver propagation, elimination and helper accounting, not +independently established E8 geometry. Original controls check their generator's +runtime assertions; they are not a new native or hosted supplier replay. +Full `make verify`, the selected complex cold replay, full changed-supplier +precision/hosting invoices, Linux or hosted CI, and formal theorem verification +were not performed. No performance improvement or new kappa is asserted. diff --git a/research/p111-receiver-census/independent.py b/research/p111-receiver-census/independent.py new file mode 100644 index 0000000000..69fa889016 --- /dev/null +++ b/research/p111-receiver-census/independent.py @@ -0,0 +1,287 @@ +#!/usr/bin/env python3 +"""Independent set-valued receiver census, frozen PR555 geometry/thirds. + +Prepared for ToikY with substantial OpenAI Codex assistance; Apache-2.0. +Credits eumemic's PR555 generator and its retained construction lineage. +Shares geometry and frozen plan_thirds setup with the historical generator, +but implements source-form propagation and F2 linear algebra independently. +""" +import argparse +import hashlib +import itertools +import json +from pathlib import Path +import random +import sys + +sys.dont_write_bytecode = True # Preserve hash-inventoried predecessor packages. +import time + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] + + +def check_sources(): + manifest = json.loads((HERE / 'SOURCES.json').read_text()) + if manifest['base_commit'] != '007664306fff84fbb1c9a1b4053b69f439764034': + raise RuntimeError('unexpected source base') + required = {'research/e8-bit-p111-tuned/' + p for p in + ('code/gen_p3.py', 'code/pwordl.py', 'code/planio.py', 'code/nodeopt.py', + 'data/plan-l3.json', 'data/punct.json', 'tune/bitE8mut-p111-tuned.json.gz')} + required |= {'research/e8-bit-carrier-skeleton/code/skeleton/' + p + for p in ('e8.py', 'geom.py', 'gen.py', 'wordkit.py')} + required.add('research/e8-bit-carrier-skeleton/data/skeleton/d4part-pairs.json') + paths = [item['path'] for item in manifest['files']] + if len(paths) != len(set(paths)) or required != set(paths): + raise RuntimeError('duplicate, missing, or unexpected source pin') + for item in manifest['files']: + path = ROOT / item['path'] + path.resolve().relative_to(ROOT.resolve()) + payload = path.read_bytes() + blob = b'blob ' + str(len(payload)).encode() + b'\0' + payload + if (hashlib.sha256(payload).hexdigest() != item['sha256'] or + hashlib.sha1(blob).hexdigest() != item['git_blob']): + raise RuntimeError('source pin mismatch: ' + item['path']) + + +def reduce_row(row, pivots): + row = set(row) + for pivot in sorted(pivots, reverse=True): + if pivot in row: + row.symmetric_difference_update(pivots[pivot]) + return frozenset(row) + + +def make_span(rows): + pivots = {} + for row in rows: + residual = reduce_row(row, pivots) + if residual: + pivots[max(residual)] = residual + return pivots + + +class Census: + def __init__(self, repo): + self.repo = Path(repo) + self.data = self.repo / 'research/e8-bit-p111-tuned/data' + code = self.repo / 'research/e8-bit-p111-tuned/code' + sys.path.insert(0, str(code)) + import gen_p3 + self.gen = gen_p3 + self.g = g = gen_p3.Geom() + self.sol = sol = gen_p3.load_plan(str(self.data / 'plan-l3.json')) + self.prm = json.loads((self.data / 'punct.json').read_text()) + self.ps = tuple(sorted(self.prm['punctured'])) + self.live = frozenset(range(120)) - set(self.ps) + fl, self.assign = gen_p3.plan_thirds(g, sol, random.Random(self.prm['thirds_seed'])) + self.freeline = fl + self.dcell = {} + self.keepline = {} + self.home = {} + self.host = {} + for f in g.frames4: + for t in f: + c = tuple(sorted(set(f) - {t, sol['partner'][t]})) + self.dcell[t] = c + self.keepline[c] = sol['kline'][t] + self.home[sol['kline'][t]] = c + self.host[t] = tuple(sorted((t, sol['qhost'][t]))) + for c in itertools.combinations(f, 2): + if c not in self.keepline: + self.keepline[c] = c[fl.get(c, 0)] + self.zz = tuple(c for c in g.cells if c not in set(self.host.values())) + self.zzp = {p: tuple(sorted(c for c in self.zz if g.phi[c[0]] == g.phi[p])) for p in self.ps} + # Reproduce stable branch identifiers: their numeric ordering affects + # the generator's residual-carrier selection, although not span rank. + branch = {} + next_wire = 240 + for s in range(120): + for c in g.cells_of[s]: + if c == self.home[s]: + branch[s, c] = s if s in self.live else None + else: + branch[s, c] = next_wire + next_wire += 1 + assert next_wire == 480 + self.keepers = {c: branch[self.keepline[c], c] for c in g.cells} + self.original = {w: frozenset({self.keepline[c]}) & self.live + for c, w in self.keepers.items() if w is not None} + self.fk = {h: self.keepers[self.assign[h]] for h in self.zz} + self.ex = {} + for h in g.cells: + e = frozenset() + for q in g.d6quads[h]: + all_lines = frozenset(x for c in g.qcells[q] for x in c) + d, qc = frozenset(g.dcell[h]), frozenset(g.qcell[q, h]) + extra = {'D': d, 'Q': qc, '0': frozenset()}[sol['ext'][q, h]] + e ^= all_lines ^ d ^ qc ^ extra + self.ex[h] = e & self.live + self.hyp = {t: frozenset(gen_p3.e8.bits(gen_p3.e8.HYP[t])) & self.live for t in range(120)} + self.taub = {b: tuple(p for p in self.ps if g.comp[g.blk[p]] == b) for b in range(10)} + self.free_wires = {b: tuple(sorted({self.fk[h] for h in self.zz if g.cblk[h] == g.comp[b]})) for b in range(10)} + self.freed = {b: tuple(self.keepline[self.dcell[q]] for q in self.ps + if g.blk[q] == b and self.keepline[self.dcell[q]] in self.live) for b in range(10)} + self.src = {b: frozenset(self.keepline[c] for c in g.cells + if c in set(self.home.values()) and g.cblk[c] == b + and self.keepers[c] is not None and self.keepline[c] in self.live) + for b in range(10)} + self.targets = {b: tuple(t for t in sorted(self.live) if g.blk[t] == g.comp[b]) for b in range(10)} + + def evaluate(self, masks): + g = self.g + rcv = dict(self.sol['rcv']) + for p, mask in zip(self.ps, masks): + for i, h in enumerate(self.zzp[p]): + rcv[h] = p if mask & (1 << i) else next(t for t in h if t != p) + extras = {b: set() for b in range(10)} + for iteration in range(20): + rewritten = dict(self.original) + missing = {b: set() for b in range(10)} + for b in range(10): + if not self.taub[b]: + continue + # Extra-carrier identity is distinct from its source line. + wires = list(self.free_wires[b]) + [('extra', s) for s in sorted(extras[b])] + list(self.freed[b]) + cont = {w: (frozenset({w[1]}) if isinstance(w, tuple) + else self.original.get(w, frozenset({w}))) for w in wires} + planned = [] + for p in self.taub[b]: + lp = self.keepline[self.dcell[p]] + wanted = self.hyp[p] ^ {lp} ^ self.ex[self.host[p]] + for h in self.zzp[p]: + wanted ^= self.ex[h] + mine = [h for h in self.zzp[p] if rcv[h] == p] + for h in mine[1:]: + wanted ^= self.original[self.fk[h]] + planned.append((self.fk[mine[0]], wanted)) + for dest, wanted in planned: + span = make_span(cont[w] for w in wires if w != dest) + residual = reduce_row(wanted ^ cont[dest], span) + if residual: + missing[b].update(residual) + else: + cont[dest] = wanted + rewritten[dest] = wanted + if not any(missing.values()): + break + for b in range(10): + extras[b].update(missing[b]) + else: + raise RuntimeError('historical 20-pass carrier rule did not terminate') + rank = [] + deficits = [] + junk = [] + for b in range(10): + forms = [] + for t in self.targets[b]: + wanted = self.hyp[t] + c = self.dcell[t] + if self.keepers[c] is not None and self.keepline[c] in self.live: + wanted ^= self.original[self.keepers[c]] + for x in g.phi[t]: + if x == t: + continue + h = tuple(sorted((t, x))) + wanted ^= self.ex[h] + if h in self.fk and rcv[h] == t: + wanted ^= rewritten[self.fk[h]] + if not wanted <= self.src[b]: + raise RuntimeError(('Q need outside live source block', b, t, sorted(wanted - self.src[b]))) + forms.append(wanted) + r = len(make_span(forms)) + deficit = len(forms) - r + reusable = len(extras[b] & self.src[b]) + rank.append(r) + deficits.append(deficit) + junk.append(max(0, deficit - reusable)) + nextra, njunk = sum(map(len, extras.values())), sum(junk) + return {'masks': list(masks), 'R': 429 + nextra + njunk, + 'extra_carriers': nextra, 'junk_wires': njunk, + 'extras': [[b, sorted(extras[b])] for b in range(10) if extras[b]], + 'ranks': rank, 'deficits': deficits, 'passes': iteration + 1} + + def direct_check(self, masks): + expected = self.evaluate(masks) + gen = self.gen + gen.NODEOPT[0] = 1 + extras = {} + for _ in range(20): + result = gen.build(self.g, self.sol, self.ps, self.freeline, self.assign, + extras=extras, verbose=False, rcvsel=dict(zip(self.ps, masks))) + if result[0] != 'missing': + break + for b, ls in result[1].items(): + extras[b] = sorted(set(extras.get(b, [])) | set(ls)) + else: + raise RuntimeError('direct build did not finish') + word = result[1] + actual = (word['R'], word['stats']['extra_carriers'], word['stats']['junk_wires'], + [[b, ls] for b, ls in sorted(extras.items())]) + wanted = (expected['R'], expected['extra_carriers'], expected['junk_wires'], expected['extras']) + if actual != wanted: + raise RuntimeError(('direct comparison failure', masks, wanted, actual)) + return expected + + +def main(): + p = argparse.ArgumentParser() + p.add_argument('--output') + args = p.parse_args() + if not __debug__: + raise SystemExit('Run without -O: inherited generator setup and direct controls use assertions.') + check_sources() + start = time.monotonic() + census = Census(ROOT) + controls = [(1,) * 9, (2,) * 9, (3,) * 9, + tuple(census.prm['receivers'][str(x)] for x in census.ps), + tuple(random.Random(15 + i).choice((1, 2, 3)) for i in range(9))] + for masks in controls: + census.direct_check(masks) + direct_count = len(controls) + for ps in census.taub.values(): + if not ps: + continue + for combo in itertools.product((1, 2, 3), repeat=len(ps)): + masks = [1] * 9 + for puncture, mask in zip(ps, combo): + masks[census.ps.index(puncture)] = mask + census.direct_check(tuple(masks)) + direct_count += 1 + digest = hashlib.sha256() + histogram, best = {}, None + out = open(args.output, 'w') if args.output else None + try: + for masks in itertools.product((1, 2, 3), repeat=9): + record = census.evaluate(masks) + wire_record = [record['masks'], record['R'], record['extra_carriers'], record['junk_wires'], record['extras'], record['ranks']] + line = json.dumps(wire_record, separators=(',', ':')) + '\n' + digest.update(line.encode()) + if out: + out.write(line) + r = record['R'] + histogram[r] = histogram.get(r, 0) + 1 + if best is None or r < best['R']: + best = record + finally: + if out: + out.close() + baseline = census.evaluate(controls[3]) + baseline_record = [baseline['masks'], baseline['R'], baseline['extra_carriers'], + baseline['junk_wires'], baseline['extras'], baseline['ranks']] + receipt = {'case_count': sum(histogram.values()), 'record_sha256': digest.hexdigest(), + 'minimum_R': min(histogram), 'minimizers': histogram[min(histogram)], + 'histogram': {str(k): v for k, v in sorted(histogram.items())}, + 'baseline': baseline_record} + expected = json.loads((HERE / 'EXPECTED.json').read_text()) + actual_json = json.dumps(receipt, sort_keys=True, separators=(',', ':')) + expected_json = json.dumps({k: expected[k] for k in receipt}, sort_keys=True, separators=(',', ':')) + if actual_json != expected_json: + raise RuntimeError('independent receipt mismatch: ' + actual_json) + print('PASS_INDEPENDENT_RECEIVER_CENSUS', actual_json, + 'original_full_word_controls=' + str(direct_count), + 'elapsed_s=' + str(round(time.monotonic() - start, 3))) + + +if __name__ == '__main__': + main() diff --git a/research/p111-receiver-census/test_package.py b/research/p111-receiver-census/test_package.py new file mode 100644 index 0000000000..6ba3c199e1 --- /dev/null +++ b/research/p111-receiver-census/test_package.py @@ -0,0 +1,135 @@ +#!/usr/bin/env python3 +"""Failure controls and offline-closure checks for the receiver census. +Prepared for ToikY with substantial OpenAI Codex assistance; Apache-2.0. +""" +import hashlib +import importlib.util +import itertools +import json +from pathlib import Path +import shutil +import subprocess +import sys + +sys.dont_write_bytecode = True # Preserve hash-inventoried predecessor packages. +import tempfile +import types +import unittest + +HERE = Path(__file__).resolve().parent +spec = importlib.util.spec_from_file_location('receiver_verify', HERE / 'verify.py') +v = importlib.util.module_from_spec(spec) +spec.loader.exec_module(v) + + +class Controls(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.model = v.Model() + + def test_block_lower_bounds_and_attainment(self): + rows = {b: [self.model.local(b, m) for m in itertools.product((1, 2, 3), + repeat=len(self.model.groups[b]))] for b in range(10)} + minima = {b: min(t['cost'] for t in ts) for b, ts in rows.items()} + self.assertEqual(minima, {0: 3, 1: 1, 2: 0, 3: 2, 4: 0, 5: 4, 6: 0, 7: 0, 8: 0, 9: 0}) + multiplicity = 1 + for b, ts in rows.items(): + multiplicity *= sum(t['cost'] == minima[b] for t in ts) + self.assertEqual(multiplicity, 2646) + self.assertEqual(429 + sum(minima.values()), 439) + + def test_failed_write_must_not_change_donor_contents(self): + text = (HERE / 'verify.py').read_text() + anchor = 'missing |= remainder # A failed predecessor write is skipped.' + self.assertEqual(text.count(anchor), 1) + mutant = types.ModuleType('failed_write_mutant') + mutant.__file__ = str(HERE / 'verify.py') + exec(compile(text.replace(anchor, 'missing |= remainder; content[destination] = wanted'), + mutant.__file__, 'exec'), mutant.__dict__) + bad = mutant.Model().local(0, (2, 1, 1)) + good = self.model.local(0, (2, 1, 1)) + self.assertEqual(good['extras'], [48, 49, 50, 57]) + self.assertEqual(bad['extras'], [49, 50, 57]) + self.assertEqual((good['cost'], bad['cost']), (4, 3)) + + def test_extra_reuse_and_junk_are_both_priced(self): + row = self.model.local(0, (3, 1, 1)) + self.assertEqual((row['target_count'], row['rank'], row['reusable_extras']), (9, 8, 3)) + self.assertEqual(row['junk'], 0) + self.assertEqual(v.junk_count(9, 8, 0), 1) + # Synthetic deficient transfer: two demanded equal rows need one independent + # dirty direction. One eligible carrier supplies it but is still paid once. + self.assertEqual(len(v.echelon([1, 1])), 1) + self.assertEqual(v.junk_count(2, 1, 0), 1) + self.assertEqual(1 + v.junk_count(2, 1, 1), 1) + + def test_punctured_keeper_is_zero(self): + model = v.Model() + wire = model.fk[(53, 62)] + self.assertEqual(wire, 462) + self.assertEqual(model.initial[wire], 0) + good = model.local(5, (1, 1)) + model.initial[wire] = 1 << 111 + try: + bad = model.local(5, (1, 1)) + except ValueError: + return + self.assertNotEqual(v.canonical(good), v.canonical(bad)) + self.assertIn(111, bad['extras']) + + def test_receiver_domain_rejects_invalid_values(self): + for masks in ((0, 1, 1), (4, 1, 1), (True, 1, 1), (1, 1)): + with self.subTest(masks=masks), self.assertRaises(ValueError): + self.model.local(0, masks) + + def test_echelon_against_explicit_span(self): + vectors = [0b10101, 0b11000, 0b01101, 0b00011] + span = {0} + for x in vectors: + span |= {s ^ x for s in tuple(span)} + self.assertEqual(1 << len(v.echelon(vectors)), len(span)) + for x in range(32): + self.assertEqual(v.residual(x, vectors) == 0, x in span) + + def test_minimal_offline_copy_and_corruptions(self): + with tempfile.TemporaryDirectory(prefix='p111 receiver closure ') as tmp: + root = Path(tmp) + package = root / 'research/p111-receiver-census' + shutil.copytree(HERE, package, ignore=shutil.ignore_patterns('__pycache__')) + for name in v.REQUIRED: + target = root / name + target.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(v.ROOT / name, target) + def snapshot(): + return {str(p.relative_to(root)): hashlib.sha256(p.read_bytes()).hexdigest() + for p in root.rglob('*') if p.is_file()} + def run(name='verify.py', flags=(), ok=True): + proc = subprocess.run([sys.executable, '-I', '-B', *flags, str(package / name)], + cwd=tmp, capture_output=True, text=True, timeout=90) + self.assertEqual(proc.returncode == 0, ok, proc.stdout + proc.stderr) + return proc.stdout + proc.stderr + before = snapshot() + self.assertIn('PASS_P111_RECEIVER_CENSUS', run()) + self.assertIn('PASS', run('independent.py')) + self.assertEqual(before, snapshot(), 'verification changed its input closure') + self.assertIn('ordinary Python', run(flags=('-O',), ok=False)) + expected = package / 'EXPECTED.json' + saved = expected.read_bytes() + value = json.loads(saved); value['minimum_R'] = 439.0 + expected.write_text(json.dumps(value)) + self.assertIn('receipt mismatch', run(ok=False)) + expected.write_bytes(saved) + pins = package / 'SOURCES.json'; saved = pins.read_bytes() + value = json.loads(saved); value['files'].pop() + pins.write_text(json.dumps(value)) + self.assertIn('source pin', run(ok=False)) + pins.write_bytes(saved) + source = root / v.REQUIRED[0] + source.write_bytes(source.read_bytes() + b'\n# corruption control\n') + self.assertIn('source SHA256', run(ok=False)) + + +if __name__ == '__main__': + if not __debug__: + raise SystemExit('ordinary Python required: pinned predecessor setup uses assertions; omit -O') + unittest.main() diff --git a/research/p111-receiver-census/verify.py b/research/p111-receiver-census/verify.py new file mode 100644 index 0000000000..9cd00a3202 --- /dev/null +++ b/research/p111-receiver-census/verify.py @@ -0,0 +1,223 @@ +#!/usr/bin/env python3 +"""Exact receiver census for one frozen PR555/589 helper construction. + +Prepared for ToikY with substantial OpenAI Codex assistance. Apache-2.0. +The construction formulas are adapted from eumemic's gen_p3.py; see NOTICE.md. +""" +import collections +import gzip +import hashlib +import itertools +import json +from pathlib import Path +import random +import sys + +sys.dont_write_bytecode = True # Preserve hash-inventoried predecessor packages. + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +BASE = '007664306fff84fbb1c9a1b4053b69f439764034' +REQUIRED = tuple(sorted([ + 'research/e8-bit-carrier-skeleton/code/skeleton/' + name + for name in ('e8.py', 'gen.py', 'geom.py', 'wordkit.py') +] + [ + 'research/e8-bit-p111-tuned/code/' + name + for name in ('gen_p3.py', 'nodeopt.py', 'planio.py', 'pwordl.py') +] + [ + 'research/e8-bit-carrier-skeleton/data/skeleton/d4part-pairs.json', + 'research/e8-bit-p111-tuned/data/plan-l3.json', + 'research/e8-bit-p111-tuned/data/punct.json', + 'research/e8-bit-p111-tuned/tune/bitE8mut-p111-tuned.json.gz', +])) + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def canonical(value): + return json.dumps(value, sort_keys=True, separators=(',', ':')) + + +def check_sources(root=ROOT, here=HERE): + manifest = json.loads((here / 'SOURCES.json').read_text()) + need(manifest['base_commit'] == BASE, 'wrong source base') + need(sorted(row['path'] for row in manifest['files']) == list(REQUIRED), + 'missing, duplicate or unexpected source pin') + for row in manifest['files']: + data = (root / row['path']).read_bytes() + need(hashlib.sha256(data).hexdigest() == row['sha256'], 'source SHA256: ' + row['path']) + blob = b'blob ' + str(len(data)).encode() + b'\0' + data + need(hashlib.sha1(blob).hexdigest() == row['git_blob'], 'source Git blob: ' + row['path']) + + +def echelon(vectors): + basis = {} + for value in vectors: + while value: + pivot = value.bit_length() - 1 + if pivot in basis: + value ^= basis[pivot] + else: + basis[pivot] = value + break + return basis + + +def residual(value, vectors): + basis = echelon(vectors) + for pivot in sorted(basis, reverse=True): + if value >> pivot & 1: + value ^= basis[pivot] + return value + + +def junk_count(targets, rank, reusable): + need(0 <= rank <= targets and reusable >= 0, 'invalid rank or reuse count') + return max(0, targets - rank - reusable) + + +class Model: + def __init__(self): + # Source checks precede the import of every predecessor implementation. + check_sources() + sys.path.insert(0, str(ROOT / 'research/e8-bit-p111-tuned/code')) + import gen_p3 as gen + self.gen = gen + self.G = G = gen.Geom() + self.sol = sol = gen.load_plan(ROOT / 'research/e8-bit-p111-tuned/data/plan-l3.json') + self.params = json.loads((ROOT / 'research/e8-bit-p111-tuned/data/punct.json').read_text()) + self.P = P = self.params['punctured'] + need(P == [10, 15, 51, 53, 56, 66, 72, 89, 111], 'wrong puncture set') + self.live = live = ((1 << 120) - 1) ^ sum(1 << p for p in P) + self.freeline, self.thirds = gen.plan_thirds(G, sol, random.Random(self.params['thirds_seed'])) + self.dcell, self.keep, self.home, self.qhost, self.zz = gen.derive(G, sol, self.freeline) + self.ex = {H: (gen.ex_part(G, sol, G.d6quads[H][0], H) + ^ gen.ex_part(G, sol, G.d6quads[H][1], H)) & live for H in G.cells} + self.hyp = [int(x) for x in gen.e8.HYP] + self.zzp = {p: sorted(H for H in self.zz if G.phi[H[0]] == G.phi[p]) for p in P} + need(len({G.phi[p] for p in P}) == 9, 'receiver frames overlap') + need(all(len(hs) == 2 and all(p in H for H in hs) for p, hs in self.zzp.items()), + 'receiver domain is not nine independent pairs') + branch, helper = {}, 240 + for source in range(120): + for cell in G.cells_of[source]: + if cell == self.home[source]: + branch[source, cell] = source if live >> source & 1 else None + else: + branch[source, cell] = helper + helper += 1 + need(helper == 480, 'fixed carrier count changed') + self.fk = {H: branch[self.keep[self.thirds[H]], self.thirds[H]] for H in self.zz} + self.initial = {self.fk[H]: (1 << self.keep[self.thirds[H]]) & live for H in self.zz} + self.groups = {b: [p for p in P if G.comp[G.blk[p]] == b] for b in range(10)} + self.baseline = [self.params['receivers'][str(p)] for p in P] + + def local(self, block, masks): + G, P, live = self.G, self.P, self.live + ps, complement = self.groups[block], G.comp[block] + need(len(masks) == len(ps) and all(type(x) is int and 1 <= x <= 3 for x in masks), + 'invalid receiver vector') + receiver = dict(self.sol['rcv']) + for p, choice in zip(ps, masks): + for i, H in enumerate(self.zzp[p]): + receiver[H] = p if choice >> i & 1 else (H[0] if H[1] == p else H[1]) + keepers = sorted({self.fk[H] for H in self.zz if G.cblk[H] == complement}) + freed = [self.keep[self.dcell[q]] for q in P + if G.blk[q] == block and live >> self.keep[self.dcell[q]] & 1] + extras, rounds = [], 0 + while True: + rounds += 1 + content = {w: self.initial[w] for w in keepers} + # These identifiers preserve the original relative carrier/source order. + extra_wires = {s: 1000 + s for s in extras} + content.update({extra_wires[s]: 1 << s for s in extras}) + content.update({s: 1 << s for s in freed}) + wires = keepers + [extra_wires[s] for s in extras] + freed + missing = 0 + for p in ps: + wanted = (self.hyp[p] & live) ^ (1 << self.keep[self.dcell[p]]) ^ self.ex[self.qhost[p]] + for H in self.zzp[p]: + wanted ^= self.ex[H] + mine = [H for H in self.zzp[p] if receiver[H] == p] + destination = self.fk[mine[0]] + for H in mine[1:]: + wanted ^= self.initial[self.fk[H]] + remainder = residual(wanted ^ content[destination], + [content[w] for w in wires if w != destination]) + if remainder: + missing |= remainder # A failed predecessor write is skipped. + else: + content[destination] = wanted + if not missing: + break + new = sorted(set(extras) | {i for i in range(120) if missing >> i & 1}) + need(new != extras and rounds < 20, 'missing-carrier closure did not finish') + extras = new + targets = [t for t in range(120) if G.blk[t] == complement and live >> t & 1] + needs = [] + for t in targets: + value = self.hyp[t] & live + line = self.keep[self.dcell[t]] + if live >> line & 1: + value ^= 1 << line + for x in G.phi[t]: + if x == t: + continue + H = tuple(sorted((t, x))) + value ^= self.ex[H] + if H in receiver and receiver[H] == t: + value ^= content[self.fk[H]] + need(value & ~(G.blocks[block] & live) == 0, 'delivery escapes its supplying block') + needs.append(value) + dual = set(self.home.values()) + sources = [self.keep[c] for c in G.cells if c in dual and G.cblk[c] == block + and live >> self.keep[c] & 1] + reusable = sum(s in sources for s in extras) + rank = len(echelon(needs)) + junk = junk_count(len(needs), rank, reusable) + return dict(block=block, receivers=list(masks), extras=extras, junk=junk, rank=rank, + target_count=len(needs), reusable_extras=reusable, cost=len(extras) + junk, + closure_rounds=rounds, needs=[hex(n) for n in needs]) + + def census(self): + tables = {b: [self.local(b, masks) for masks in itertools.product((1, 2, 3), + repeat=len(self.groups[b]))] for b in range(10)} + lookup = {b: {tuple(row['receivers']): row for row in tables[b]} for b in tables} + histogram, digest = collections.Counter(), hashlib.sha256() + minimum, minimizers, baseline = 999, 0, None + for masks in itertools.product((1, 2, 3), repeat=9): + selection = dict(zip(self.P, masks)) + rows = [lookup[b][tuple(selection[p] for p in self.groups[b])] for b in range(10)] + extra, junk = sum(len(r['extras']) for r in rows), sum(r['junk'] for r in rows) + total = 429 + extra + junk + record = [list(masks), total, extra, junk, + [[b, row['extras']] for b, row in enumerate(rows) if row['extras']], + [row['rank'] for row in rows]] + digest.update((json.dumps(record, separators=(',', ':')) + '\n').encode()) + histogram[total] += 1 + if total < minimum: + minimum, minimizers = total, 0 + if total == minimum: + minimizers += 1 + if list(masks) == self.baseline: + baseline = record + shipped = json.loads(gzip.decompress((ROOT / 'research/e8-bit-p111-tuned/tune/bitE8mut-p111-tuned.json.gz').read_bytes())) + need(shipped['R'] == baseline[1] and shipped['v'] == 111, 'selected word calibration failed') + return dict(case_count=sum(histogram.values()), record_sha256=digest.hexdigest(), + minimum_R=minimum, minimizers=minimizers, histogram=dict(sorted(histogram.items())), + baseline=baseline, groups=self.groups, local_tables=tables) + + +def main(): + need(__debug__, 'ordinary Python required: pinned predecessor setup uses assertions; omit -O') + actual = Model().census() + expected = json.loads((HERE / 'EXPECTED.json').read_text()) + need(canonical(actual) == canonical(expected), 'complete census receipt mismatch') + print('PASS_P111_RECEIVER_CENSUS cases=19683 local_rows=60 min_helpers=439 minimizers=2646 no_new_kappa') + + +if __name__ == '__main__': + main()