diff --git a/research/r439-four-block-composition/CERTIFICATE.json b/research/r439-four-block-composition/CERTIFICATE.json new file mode 100644 index 0000000000..41ff9d66ab --- /dev/null +++ b/research/r439-four-block-composition/CERTIFICATE.json @@ -0,0 +1,743 @@ +{ + "assignment_seed": 1, + "base_commit": "407d52ff15b2217b6e22bce44728b4c3907b6515", + "block_maps": { + "blocks": [ + { + "boolean_inputs": 1024, + "forward_columns_sha256": "ca3d415d5cfc76f433e8355b9b6b4eddf64e64ca62e2de45226813bf4ef7b279", + "frame": 507, + "gates_sha256": "0e2f9b5ad4408fd8039a902b1377e24972537458069ff9b0015423da31d00bfd", + "integer_forward_equal": true, + "new_reverse_columns_sha256": "b1c95de2d3fe89d6796f242a2d90bcb4096f71d4034542ee5e8af82213b0b1c1", + "old_reverse_columns_sha256": "dbc86289d24c831faf9565645fce681ce2118cc3f6f757f7f98114d35b2f4d26", + "original_adds": 35, + "registers": [ + 0, + 3, + 11, + 61, + 62, + 63, + 68, + 69, + 72, + 465 + ], + "replacement_adds": 30, + "reverse_positive_dominated": true, + "reverse_strict_entries": 10, + "source_slice": [ + 128, + 163 + ] + }, + { + "boolean_inputs": 4096, + "forward_columns_sha256": "81225962c0426fedcb9878f747e71c7960c8ba5f8622da0c905d2ce390e918d6", + "frame": 519, + "gates_sha256": "5cfdb98ca0a1d9623ad5fe002807047fa8fadfadd53014e5c2103b795a9f4e6b", + "integer_forward_equal": true, + "new_reverse_columns_sha256": "a35f20aa5603e8b05fdd3bff9cd4b6d2d1f709a45477059c098fbfc27559ef30", + "old_reverse_columns_sha256": "2041588919fbe1579edd2fefdf56e1ef61450c44a96a343043e7f0a508c63c89", + "original_adds": 42, + "registers": [ + 15, + 23, + 30, + 41, + 49, + 53, + 59, + 70, + 75, + 82, + 91, + 96 + ], + "replacement_adds": 32, + "reverse_positive_dominated": true, + "reverse_strict_entries": 22, + "source_slice": [ + 163, + 205 + ] + }, + { + "boolean_inputs": 2048, + "forward_columns_sha256": "e133f085e15fb198a7b9d3e3b66627fccce1c19dd976582c8241f6c308c96a4e", + "frame": 508, + "gates_sha256": "172355851c6a9bdec83d6a704908ad81e30c7d1fbf9d9b16201ff417d367c088", + "integer_forward_equal": true, + "new_reverse_columns_sha256": "10285e653e5afbb4c84dbea8040a2f778c065bd20dbe787fd90330cd4f128387", + "old_reverse_columns_sha256": "a5dc648af05104a6a0a27ba6d00593938952fa7761903607c5f6372a3c263c31", + "original_adds": 37, + "registers": [ + 19, + 27, + 35, + 43, + 57, + 65, + 66, + 74, + 89, + 97, + 466 + ], + "replacement_adds": 30, + "reverse_positive_dominated": true, + "reverse_strict_entries": 20, + "source_slice": [ + 205, + 242 + ] + }, + { + "boolean_inputs": 4096, + "forward_columns_sha256": "57ba1808989de77c9bfb4151295f30813e1e958c7d8ad62ab4b2cb2cec173d18", + "frame": 524, + "gates_sha256": "de6bfaf42eb97e4fd99b93b244b6e4155749e6a763ed4351f3a97b27f9e4b7bf", + "integer_forward_equal": true, + "new_reverse_columns_sha256": "55f7ed325b656499b63fa635443e0f1326b3a7f0e631f8efd1c89d31db8dfebf", + "old_reverse_columns_sha256": "be4f9dccf334477594ab971923a87b3aa5c25acf685595045ef24f9276652bab", + "original_adds": 41, + "registers": [ + 8, + 12, + 31, + 37, + 40, + 45, + 73, + 78, + 81, + 86, + 105, + 110 + ], + "replacement_adds": 27, + "reverse_positive_dominated": true, + "reverse_strict_entries": 27, + "source_slice": [ + 449, + 490 + ] + } + ], + "boolean_inputs": 11264, + "combined_b_sha256": "8900150f31c61b2e4780ce0286854be580e09211797d0f861e171d2dc16d6c00", + "combined_forward_columns_sha256": "c567511419530f1610410c1cda04a6b4c79c1eebddc728c350539cac0e9228cf", + "combined_forward_equal": true, + "combined_register_count": 447, + "combined_reverse_dominated": true, + "combined_reverse_strict_entries": 298, + "forward_adds_saved": 36, + "new_combined_reverse_columns_sha256": "787b3524c1c43d58ebffe5286f1f5d6a33859b0462ed39a49cee07d33e6409c4", + "old_combined_reverse_columns_sha256": "a15dd76189a27a8f2cf703e33adfc92f3cd24ee5310a4f78cdbbf1f16d57203b", + "original_b_adds": 934, + "replacement_b_adds": 898, + "status": "PASS_R439_FOUR_BLOCK_MAPS" + }, + "columns_per_word": 661, + "controls_rejected": [ + "stale baseline cleanup", + "drop frame 507 gate and rebuild cleanup", + "drop frame 508 gate and rebuild cleanup", + "drop frame 519 gate and rebuild cleanup", + "drop frame 524 gate and rebuild cleanup", + "shifted splice source", + "missing dirty compensation", + "illegal frame after composition", + "drop literal exported ADD" + ], + "frames": [ + 507, + 508, + 519, + 524 + ], + "kappa_claim": "none; unchanged recursive profile; hosted adoption remains open", + "native_records": { + "original": { + "adds": 24305, + "copies": 9, + "erasures": 9, + "moves": 2911, + "paid_histogram": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "payload_prefix_bits": 93, + "payload_prefix_upper": "9528119495320518471870892800", + "positive_prefix": [ + 49347, + 1113070 + ], + "rank_mass": 5129, + "records": 27234, + "records_sha256": "ea44aa047a2a9cf034de8b56b2166c49cf2dbdf9cd9ed6a20299a4f2b05ef09a" + }, + "replacement": { + "adds": 24233, + "copies": 9, + "erasures": 9, + "moves": 2911, + "paid_histogram": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "payload_prefix_bits": 93, + "payload_prefix_upper": "6828189949769144673901978368", + "positive_prefix": [ + 49347, + 942262 + ], + "rank_mass": 5129, + "records": 27162, + "records_sha256": "781f6510044bdda85d9edfc8405d923e45d3dea22c58dd2bbe6c9b692e368514" + } + }, + "reconstructed_word_sha256": "7740adf8c901fa7a845659f1abcc833425ccee877123c20f9727551d9d665b03", + "status": "PASS_R439_FOUR_BLOCK_COMPOSITION", + "subset_cover_edges": 32, + "subsets": [ + { + "columns": 661, + "frames": [], + "mask": 0, + "native_records": { + "adds": 24305, + "copies": 9, + "erasures": 9, + "moves": 2911, + "paid_histogram": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "payload_prefix_bits": 93, + "payload_prefix_upper": "9528119495320518471870892800", + "positive_prefix": [ + 49347, + 1113070 + ], + "rank_mass": 5129, + "records": 27234, + "records_sha256": "ea44aa047a2a9cf034de8b56b2166c49cf2dbdf9cd9ed6a20299a4f2b05ef09a" + }, + "word_sha256": "5642fd0e35a1acc11acff8d0c08350c1617e95f310d4d35ad63a651f9eeeba0b" + }, + { + "columns": 661, + "frames": [ + 507 + ], + "mask": 1, + "native_records": { + "adds": 24295, + "copies": 9, + "erasures": 9, + "moves": 2911, + "paid_histogram": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "payload_prefix_bits": 93, + "payload_prefix_upper": "9257646390457307514450801408", + "positive_prefix": [ + 49347, + 1097158 + ], + "rank_mass": 5129, + "records": 27224, + "records_sha256": "6e9bd3b124c3eb0794637aa33ed297421a4c74e3e7cbc748650d0beb8f923587" + }, + "word_sha256": "0f35e69cb568e780e83d8bec32cfa98c36bfe2cfb42d1adb9f53d6babddb485b" + }, + { + "columns": 661, + "frames": [ + 508 + ], + "mask": 2, + "native_records": { + "adds": 24291, + "copies": 9, + "erasures": 9, + "moves": 2911, + "paid_histogram": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "payload_prefix_bits": 93, + "payload_prefix_upper": "9071207030719981341925085952", + "positive_prefix": [ + 49347, + 1086054 + ], + "rank_mass": 5129, + "records": 27220, + "records_sha256": "b75649641476366d4f8766cf6168121ab7f00cfa7f4df499a95212eb18e54129" + }, + "word_sha256": "5a8d0e42ca5ac00269e1589a16fe992ced14a671baddca29244a11410c0ecc90" + }, + { + "columns": 661, + "frames": [ + 507, + 508 + ], + "mask": 3, + "native_records": { + "adds": 24281, + "copies": 9, + "erasures": 9, + "moves": 2911, + "paid_histogram": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "payload_prefix_bits": 93, + "payload_prefix_upper": "8880845114044975301969695488", + "positive_prefix": [ + 49347, + 1074598 + ], + "rank_mass": 5129, + "records": 27210, + "records_sha256": "7e52053e65f1e386008e683d36b43a0d101375ab7223a556b0ada00165787c5c" + }, + "word_sha256": "e713938c63c5a71a22eef059157c7ac08099d09e6347f9da1b8eb51845b314bd" + }, + { + "columns": 661, + "frames": [ + 519 + ], + "mask": 4, + "native_records": { + "adds": 24285, + "copies": 9, + "erasures": 9, + "moves": 2911, + "paid_histogram": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "payload_prefix_bits": 93, + "payload_prefix_upper": "8176146235754724278798992128", + "positive_prefix": [ + 49347, + 1031082 + ], + "rank_mass": 5129, + "records": 27214, + "records_sha256": "1d4e22ec19384f3b93d6a6bd357fd76b1bfa73d27992c10aa0a7a46746be7c50" + }, + "word_sha256": "be3a8f25c5fb0bee8c13e6f979d7654d3f463a5f3e90a25eb556306eb8a352fc" + }, + { + "columns": 661, + "frames": [ + 507, + 519 + ], + "mask": 5, + "native_records": { + "adds": 24275, + "copies": 9, + "erasures": 9, + "moves": 2911, + "paid_histogram": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "payload_prefix_bits": 93, + "payload_prefix_upper": "7925739430767838243492780800", + "positive_prefix": [ + 49347, + 1015170 + ], + "rank_mass": 5129, + "records": 27204, + "records_sha256": "f74e3595733dab61d338b56e17682e0f2ddeeb1ef00f8b57136c8459696fc85d" + }, + "word_sha256": "ba5ef7d15f2137d33504c1c0ab7e7099de6a9ad06535ab553334e493db807cce" + }, + { + "columns": 661, + "frames": [ + 508, + 519 + ], + "mask": 6, + "native_records": { + "adds": 24271, + "copies": 9, + "erasures": 9, + "moves": 2911, + "paid_histogram": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "payload_prefix_bits": 93, + "payload_prefix_upper": "7753303099802929864780069632", + "positive_prefix": [ + 49347, + 1004066 + ], + "rank_mass": 5129, + "records": 27200, + "records_sha256": "91fdd324619d710b679a4806cc5d96ee3ae2f765d0fde15a53462ba2bc678b0f" + }, + "word_sha256": "ee1ea76da5742684df80bf0198e3df9d3a11504c2344eb0c3c7885b5a1866534" + }, + { + "columns": 661, + "frames": [ + 507, + 508, + 519 + ], + "mask": 7, + "native_records": { + "adds": 24261, + "copies": 9, + "erasures": 9, + "moves": 2911, + "paid_histogram": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "payload_prefix_bits": 93, + "payload_prefix_upper": "7577388111947882240343571200", + "positive_prefix": [ + 49347, + 992610 + ], + "rank_mass": 5129, + "records": 27190, + "records_sha256": "e40afde7450eb7a33623942c02a797fb53f4298e56bd0c97ccc3d43c29cf19df" + }, + "word_sha256": "665babae8c32e0938d6a33bd84d69d14cd189896c005dba83acc6a0719a23a4d" + }, + { + "columns": 661, + "frames": [ + 524 + ], + "mask": 8, + "native_records": { + "adds": 24277, + "copies": 9, + "erasures": 9, + "moves": 2911, + "paid_histogram": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "payload_prefix_bits": 93, + "payload_prefix_upper": "8605984659754060080882125568", + "positive_prefix": [ + 49347, + 1057838 + ], + "rank_mass": 5129, + "records": 27206, + "records_sha256": "d327f7eb09168262a2bd07b61be5e61cce95f4ddd2d7af8217e8aa48abfde1ab" + }, + "word_sha256": "1b082ad8571d0af3ae4b29ae33c07f3ba0c38e120d90eb9e548dde2e93723b52" + }, + { + "columns": 661, + "frames": [ + 507, + 524 + ], + "mask": 9, + "native_records": { + "adds": 24267, + "copies": 9, + "erasures": 9, + "moves": 2911, + "paid_histogram": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "payload_prefix_bits": 93, + "payload_prefix_upper": "8385544758136447294958469888", + "positive_prefix": [ + 49347, + 1044202 + ], + "rank_mass": 5129, + "records": 27196, + "records_sha256": "571b8f32b09ae54500dd31c9ba6e63cb959b484a1d1da86c02623b57c840a68f" + }, + "word_sha256": "baaf1a07850659da7ff824a8814656e72250c9a4a956c4cf130c3e7eb7f74469" + }, + { + "columns": 661, + "frames": [ + 508, + 524 + ], + "mask": 10, + "native_records": { + "adds": 24263, + "copies": 9, + "erasures": 9, + "moves": 2911, + "paid_histogram": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "payload_prefix_bits": 93, + "payload_prefix_upper": "8249134548864277533628207872", + "positive_prefix": [ + 49347, + 1035674 + ], + "rank_mass": 5129, + "records": 27192, + "records_sha256": "f1f90788d0b4aafac4bd4cbd3d11fe84719dfeb19595a700cc0653892bceb7ce" + }, + "word_sha256": "c4864c0706535cd29ef051c2b267ce348c053cc95b55b92e28138955ffe726bc" + }, + { + "columns": 661, + "frames": [ + 507, + 508, + 524 + ], + "mask": 11, + "native_records": { + "adds": 24253, + "copies": 9, + "erasures": 9, + "moves": 2911, + "paid_histogram": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "payload_prefix_bits": 93, + "payload_prefix_upper": "8068154112111762674028000000", + "positive_prefix": [ + 49347, + 1024250 + ], + "rank_mass": 5129, + "records": 27182, + "records_sha256": "52cf793021d44280eac651dd8f9316a27bad9215c201b3da6731a8fca64c4c6f" + }, + "word_sha256": "3a5e4d57550f201db7afdcc0fd0e9bb873a0483a311180f34db1d6e427932616" + }, + { + "columns": 661, + "frames": [ + 519, + 524 + ], + "mask": 12, + "native_records": { + "adds": 24257, + "copies": 9, + "erasures": 9, + "moves": 2911, + "paid_histogram": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "payload_prefix_bits": 93, + "payload_prefix_upper": "7323663353102367075479520000", + "positive_prefix": [ + 49347, + 975850 + ], + "rank_mass": 5129, + "records": 27186, + "records_sha256": "f19889a24725c143d025c3eb070062a8c1d28756b0b38d1a839ea4be63f1ed22" + }, + "word_sha256": "0a4fe39e662203c3c13fbc3941730ffd83ba104ca7bae9eb8a549d1dc42bc0a7" + }, + { + "columns": 661, + "frames": [ + 507, + 519, + 524 + ], + "mask": 13, + "native_records": { + "adds": 24247, + "copies": 9, + "erasures": 9, + "moves": 2911, + "paid_histogram": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "payload_prefix_bits": 93, + "payload_prefix_upper": "7120419534008231328139629312", + "positive_prefix": [ + 49347, + 962214 + ], + "rank_mass": 5129, + "records": 27176, + "records_sha256": "e100056f25a4620bd01e55327cee344e3fd99744f16b4d7d9ec678de0643ac47" + }, + "word_sha256": "38b74b30ff5080f1f6194bfa0141a3adfaed06f7b96582929f97e69e124476a9" + }, + { + "columns": 661, + "frames": [ + 508, + 519, + 524 + ], + "mask": 14, + "native_records": { + "adds": 24243, + "copies": 9, + "erasures": 9, + "moves": 2911, + "paid_histogram": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "payload_prefix_bits": 93, + "payload_prefix_upper": "6994763812251477538138374912", + "positive_prefix": [ + 49347, + 953686 + ], + "rank_mass": 5129, + "records": 27172, + "records_sha256": "d163e73ed1bec0816561e7e9aa026c367c2ff1b5ed635c33a9da7b4f9a5802e9" + }, + "word_sha256": "75538c9ce33e11905b8065adaabe53dd30f4206e1981bc7755be768a069d50cc" + }, + { + "columns": 661, + "frames": [ + 507, + 508, + 519, + 524 + ], + "mask": 15, + "native_records": { + "adds": 24233, + "copies": 9, + "erasures": 9, + "moves": 2911, + "paid_histogram": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "payload_prefix_bits": 93, + "payload_prefix_upper": "6828189949769144673901978368", + "positive_prefix": [ + 49347, + 942262 + ], + "rank_mass": 5129, + "records": 27162, + "records_sha256": "781f6510044bdda85d9edfc8405d923e45d3dea22c58dd2bbe6c9b692e368514" + }, + "word_sha256": "7740adf8c901fa7a845659f1abcc833425ccee877123c20f9727551d9d665b03" + } + ] +} diff --git a/research/r439-four-block-composition/CLAIM.md b/research/r439-four-block-composition/CLAIM.md new file mode 100644 index 0000000000..cd9c9773af --- /dev/null +++ b/research/r439-four-block-composition/CLAIM.md @@ -0,0 +1,52 @@ +# Local sprint claim + +- Track: bit supplier; assignment seed **1**, sampled with the operating system's + cryptographic RNG by rejecting bytes >= 200 and reducing modulo 100. +- Draw time: 2026-10-13 15:43:50 UTC. +- Base: `407d52ff15b2217b6e22bce44728b4c3907b6515`. +- Selected result at base: conditional kappa `1661960547713947/10^18`, + PR942 T37 with unchanged PR589/555 bit supplier. Followed the selected + source manifest, assembly, batch952 maintainer review and PR ledger. +- Object: composition of the retained phase-B frame 507/508/519/524 schedules + from PR880/873/908/914 on the actual PR589 word, including literal cleanup. +- Method: deterministic exact integer maps, positive reverse domination, + full dirty-column and exported-record replay; enumerate all 16 subsets of + these four replacements and price the complete word. No circuit search. +- Expected deliverable: source-pinned finite composition witness and verifier, + explicit cost and precision accounting, mutation controls and scoped note. +- Expected finish: 2026-10-13 16:24 UTC (09:24 America/Los_Angeles). + +Three alternatives considered: (1) another single-frame positive factorization; +(2) changing the frozen PR589 gate-frame assignment; (3) composing disjoint, +reviewed, reverse-dominated phase-B schedules. The third was chosen because +single frames are crowded and the fixed-word frame-only search is already +closed. Seed 1 chose the phase-B, reverse-dominated composition route from +these alternatives; it did not license repeating the existing seed-1 frame267 +search. The bounded object is these four schedules, not all possible splices. + +Coordination checked through Curiosity Bot's GitHub issues/PR provider and live +issue listing. No pinned sprint issue was present (only issues 913 and 650), so +this is a local claim. Reviewed the retained batch932/batch952 ledgers and +negative results in r439-bsection-survey and bit589-frame-optimum. The former +excludes single-write whole-block searches on several frames, not composition +of their already constructed factors. Recent PR973 changes frame509; PR980 +changes phase A and explicitly does not compose phase B; PR941/965/967 change +D. None of those pending implementations is consumed here. Live PR metadata +will be checked again before handoff. + +One delegated worker checks only these four block maps independently. Another +prepares only their native multistage harness. Substantial OpenAI Codex AI +assistance is disclosed; no independent human review is claimed. + +## Result update + +Completed and submitted as [PR989](https://github.com/CrocSwap/integer-mult-bounds/pull/989). +The combined word saves **72 ADDs**, from 24,305 to 24,233, with unchanged paid +profile and a reverse positive bound of 942,262. All 16 subset words, 32 cover +relations, 661 dirty columns per word, five package tests, native legality and +5/9/11-stage checks passed, including nine local and 96 native bridge controls. +No new kappa is claimed. The final metadata refresh through PR986 found a +different phase-A frame281 boundary result; no same four-block composition was +found. The retained claim is local because no pinned sprint issue was present. +Exact receipts, predecessor attribution and open adoption obligations accompany +the PR. No frontier was edited and no PR was merged or closed. diff --git a/research/r439-four-block-composition/NATIVE-ENVIRONMENT.json b/research/r439-four-block-composition/NATIVE-ENVIRONMENT.json new file mode 100644 index 0000000000..cee3327c1b --- /dev/null +++ b/research/r439-four-block-composition/NATIVE-ENVIRONMENT.json @@ -0,0 +1,153 @@ +{ + "boost_header_sha256": { + "C:\\Users\\wilds\\AppData\\Local\\rattler\\cache\\pkgs\\libboost-headers-1.88.0-h57928b3_7\\Library\\include\\boost\\multiprecision\\cpp_int.hpp": "4099045e8ac3e3507779c08980272b261a86498a23a4d0bb0786849f5424595a", + "C:\\Users\\wilds\\AppData\\Local\\rattler\\cache\\pkgs\\libboost-headers-1.88.0-h57928b3_7\\Library\\include\\boost\\version.hpp": "26446b268b3ece5640f913db846f6541f8e6c3dd6fcedfc8aec92669c222443c" + }, + "boost_include": "C:\\Users\\wilds\\AppData\\Local\\rattler\\cache\\pkgs\\libboost-headers-1.88.0-h57928b3_7\\Library\\include", + "boost_version_header": "// Boost version.hpp configuration header file ------------------------------//\n\n// (C) Copyright John maddock 1999. Distributed under the Boost\n// Software License, Version 1.0. (See accompanying file\n// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n\n// See http://www.boost.org/libs/config for documentation\n\n#ifndef BOOST_VERSION_HPP\n#define BOOST_VERSION_HPP\n\n//\n// Caution: this is the only Boost header that is guaranteed\n// to change with every Boost release. Including this header\n// will cause a recompile every time a new Boost version is\n// used.\n//\n// BOOST_VERSION % 100 is the patch level\n// BOOST_VERSION / 100 % 1000 is the minor version\n// BOOST_VERSION / 100000 is the major version\n\n#define BOOST_VERSION 108800\n\n//\n// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION\n// but as a *string* in the form \"x_y[_z]\" where x is the major version\n// number, y is the minor version number, and z is the patch level if not 0.\n// This is used by to select which library version to link to.\n\n#define BOOST_LIB_VERSION \"1_88\"\n\n#endif\n", + "commands": { + "compile-columns2": [ + "C:\\Program Files\\Microsoft Visual Studio\\18\\Community\\VC\\Tools\\MSVC\\14.51.36231\\bin\\Hostx64\\x64\\cl.exe", + "/nologo", + "/O2", + "/std:c++17", + "/EHsc", + "/DHDIM=8", + "/DNCOPY=9", + "/DVPORTS=111", + "/DRHELP=439", + "/IF:\\MEESEEKS MATH\\r439-four-block-review\\research\\e8-bit-carrier-skeleton\\portable-include", + "/IF:\\MEESEEKS MATH\\r439-four-block-review\\research\\e8-bit-carrier-skeleton\\code\\bit\\checkers", + "/IC:\\Users\\wilds\\AppData\\Local\\rattler\\cache\\pkgs\\libboost-headers-1.88.0-h57928b3_7\\Library\\include", + "/DKPAIRS=2", + "/Fe:F:\\MEESEEKS MATH\\r439-final-native\\bin\\columns2.exe", + "/Fo:F:\\MEESEEKS MATH\\r439-final-native\\bin\\columns2.obj", + "F:\\MEESEEKS MATH\\r439-four-block-review\\research\\e8-bit-carrier-skeleton\\code\\bit\\checkers\\columns_k.cpp" + ], + "compile-columns4": [ + "C:\\Program Files\\Microsoft Visual Studio\\18\\Community\\VC\\Tools\\MSVC\\14.51.36231\\bin\\Hostx64\\x64\\cl.exe", + "/nologo", + "/O2", + "/std:c++17", + "/EHsc", + "/DHDIM=8", + "/DNCOPY=9", + "/DVPORTS=111", + "/DRHELP=439", + "/IF:\\MEESEEKS MATH\\r439-four-block-review\\research\\e8-bit-carrier-skeleton\\portable-include", + "/IF:\\MEESEEKS MATH\\r439-four-block-review\\research\\e8-bit-carrier-skeleton\\code\\bit\\checkers", + "/IC:\\Users\\wilds\\AppData\\Local\\rattler\\cache\\pkgs\\libboost-headers-1.88.0-h57928b3_7\\Library\\include", + "/DKPAIRS=4", + "/Fe:F:\\MEESEEKS MATH\\r439-final-native\\bin\\columns4.exe", + "/Fo:F:\\MEESEEKS MATH\\r439-final-native\\bin\\columns4.obj", + "F:\\MEESEEKS MATH\\r439-four-block-review\\research\\e8-bit-carrier-skeleton\\code\\bit\\checkers\\columns_k.cpp" + ], + "compile-columns5": [ + "C:\\Program Files\\Microsoft Visual Studio\\18\\Community\\VC\\Tools\\MSVC\\14.51.36231\\bin\\Hostx64\\x64\\cl.exe", + "/nologo", + "/O2", + "/std:c++17", + "/EHsc", + "/DHDIM=8", + "/DNCOPY=9", + "/DVPORTS=111", + "/DRHELP=439", + "/IF:\\MEESEEKS MATH\\r439-four-block-review\\research\\e8-bit-carrier-skeleton\\portable-include", + "/IF:\\MEESEEKS MATH\\r439-four-block-review\\research\\e8-bit-carrier-skeleton\\code\\bit\\checkers", + "/IC:\\Users\\wilds\\AppData\\Local\\rattler\\cache\\pkgs\\libboost-headers-1.88.0-h57928b3_7\\Library\\include", + "/DKPAIRS=5", + "/Fe:F:\\MEESEEKS MATH\\r439-final-native\\bin\\columns5.exe", + "/Fo:F:\\MEESEEKS MATH\\r439-final-native\\bin\\columns5.obj", + "F:\\MEESEEKS MATH\\r439-four-block-review\\research\\e8-bit-carrier-skeleton\\code\\bit\\checkers\\columns_k.cpp" + ], + "compile-legality": [ + "C:\\Program Files\\Microsoft Visual Studio\\18\\Community\\VC\\Tools\\MSVC\\14.51.36231\\bin\\Hostx64\\x64\\cl.exe", + "/nologo", + "/O2", + "/std:c++17", + "/EHsc", + "/DHDIM=8", + "/DNCOPY=9", + "/DVPORTS=111", + "/DRHELP=439", + "/IF:\\MEESEEKS MATH\\r439-four-block-review\\research\\e8-bit-carrier-skeleton\\portable-include", + "/IF:\\MEESEEKS MATH\\r439-four-block-review\\research\\e8-bit-carrier-skeleton\\code\\bit\\checkers", + "/IC:\\Users\\wilds\\AppData\\Local\\rattler\\cache\\pkgs\\libboost-headers-1.88.0-h57928b3_7\\Library\\include", + "/Fe:F:\\MEESEEKS MATH\\r439-final-native\\bin\\legality.exe", + "/Fo:F:\\MEESEEKS MATH\\r439-final-native\\bin\\legality.obj", + "F:\\MEESEEKS MATH\\r439-four-block-review\\research\\e8-bit-carrier-skeleton\\code\\bit\\checkers\\legality_h.cpp" + ], + "original-cohort": [ + "C:\\Users\\wilds\\AppData\\Local\\Programs\\Python\\Python314\\python.exe", + "-I", + "-B", + "F:\\MEESEEKS MATH\\r439-four-block-review\\research\\e8-bit-carrier-skeleton\\code\\bit\\regression\\stage_cohort.py", + "F:\\MEESEEKS MATH\\r439-final-native\\local\\original", + "F:\\MEESEEKS MATH\\r439-final-native\\local\\original", + "F:\\MEESEEKS MATH\\r439-final-native\\original\\cin", + "F:\\MEESEEKS MATH\\r439-final-native\\original\\cout" + ], + "original-columns2": [ + "F:\\MEESEEKS MATH\\r439-final-native\\bin\\columns2.exe", + "F:\\MEESEEKS MATH\\r439-final-native\\original\\cout\\COHORT249-RECORDS.bin", + "F:\\MEESEEKS MATH\\r439-final-native\\original\\cout\\columns2.json" + ], + "original-columns4": [ + "F:\\MEESEEKS MATH\\r439-final-native\\bin\\columns4.exe", + "F:\\MEESEEKS MATH\\r439-final-native\\original\\cout\\COHORT249-RECORDS.bin", + "F:\\MEESEEKS MATH\\r439-final-native\\original\\cout\\columns4.json" + ], + "original-columns5": [ + "F:\\MEESEEKS MATH\\r439-final-native\\bin\\columns5.exe", + "F:\\MEESEEKS MATH\\r439-final-native\\original\\cout\\COHORT249-RECORDS.bin", + "F:\\MEESEEKS MATH\\r439-final-native\\original\\cout\\columns5.json" + ], + "original-legality": [ + "F:\\MEESEEKS MATH\\r439-final-native\\bin\\legality.exe", + "F:\\MEESEEKS MATH\\r439-final-native\\original\\cin", + "F:\\MEESEEKS MATH\\r439-final-native\\original\\cout", + "F:\\MEESEEKS MATH\\r439-final-native\\original\\cout\\legality.json" + ], + "replacement-cohort": [ + "C:\\Users\\wilds\\AppData\\Local\\Programs\\Python\\Python314\\python.exe", + "-I", + "-B", + "F:\\MEESEEKS MATH\\r439-four-block-review\\research\\e8-bit-carrier-skeleton\\code\\bit\\regression\\stage_cohort.py", + "F:\\MEESEEKS MATH\\r439-final-native\\local\\replacement", + "F:\\MEESEEKS MATH\\r439-final-native\\local\\replacement", + "F:\\MEESEEKS MATH\\r439-final-native\\replacement\\cin", + "F:\\MEESEEKS MATH\\r439-final-native\\replacement\\cout" + ], + "replacement-columns2": [ + "F:\\MEESEEKS MATH\\r439-final-native\\bin\\columns2.exe", + "F:\\MEESEEKS MATH\\r439-final-native\\replacement\\cout\\COHORT249-RECORDS.bin", + "F:\\MEESEEKS MATH\\r439-final-native\\replacement\\cout\\columns2.json" + ], + "replacement-columns4": [ + "F:\\MEESEEKS MATH\\r439-final-native\\bin\\columns4.exe", + "F:\\MEESEEKS MATH\\r439-final-native\\replacement\\cout\\COHORT249-RECORDS.bin", + "F:\\MEESEEKS MATH\\r439-final-native\\replacement\\cout\\columns4.json" + ], + "replacement-columns5": [ + "F:\\MEESEEKS MATH\\r439-final-native\\bin\\columns5.exe", + "F:\\MEESEEKS MATH\\r439-final-native\\replacement\\cout\\COHORT249-RECORDS.bin", + "F:\\MEESEEKS MATH\\r439-final-native\\replacement\\cout\\columns5.json" + ], + "replacement-legality": [ + "F:\\MEESEEKS MATH\\r439-final-native\\bin\\legality.exe", + "F:\\MEESEEKS MATH\\r439-final-native\\replacement\\cin", + "F:\\MEESEEKS MATH\\r439-final-native\\replacement\\cout", + "F:\\MEESEEKS MATH\\r439-final-native\\replacement\\cout\\legality.json" + ] + }, + "compiler_command": [ + "C:\\Program Files\\Microsoft Visual Studio\\18\\Community\\VC\\Tools\\MSVC\\14.51.36231\\bin\\Hostx64\\x64\\cl.exe" + ], + "compiler_path": "C:\\Program Files\\Microsoft Visual Studio\\18\\Community\\VC\\Tools\\MSVC\\14.51.36231\\bin\\Hostx64\\x64\\cl.exe", + "compiler_sha256": "b0a1818ebae6da7f18230a84e76ce839212584ac4c2ab55b97a0d5268085da57", + "compiler_version_output": "Microsoft (R) C/C++ Optimizing Compiler Version 19.51.36260 for x64\nCopyright (C) Microsoft Corporation. All rights reserved.\n\nCompiler Passes:\n C:\\Program Files\\Microsoft Visual Studio\\18\\Community\\VC\\Tools\\MSVC\\14.51.36231\\bin\\Hostx64\\x64\\cl.exe: Version 19.51.36260.0\n C:\\Program Files\\Microsoft Visual Studio\\18\\Community\\VC\\Tools\\MSVC\\14.51.36231\\bin\\Hostx64\\x64\\c1.dll: Version 19.51.36260.0\n C:\\Program Files\\Microsoft Visual Studio\\18\\Community\\VC\\Tools\\MSVC\\14.51.36231\\bin\\Hostx64\\x64\\c1xx.dll: Version 19.51.36260.0\n C:\\Program Files\\Microsoft Visual Studio\\18\\Community\\VC\\Tools\\MSVC\\14.51.36231\\bin\\Hostx64\\x64\\c2.dll: Version 19.51.36260.0\n C:\\Program Files\\Microsoft Visual Studio\\18\\Community\\VC\\Tools\\MSVC\\14.51.36231\\bin\\Hostx64\\x64\\c1xx.dll: Version 19.51.36260.0\n C:\\Program Files\\Microsoft Visual Studio\\18\\Community\\VC\\Tools\\MSVC\\14.51.36231\\bin\\Hostx64\\x64\\link.exe: Version 14.51.36260.0\n C:\\Program Files\\Microsoft Visual Studio\\18\\Community\\VC\\Tools\\MSVC\\14.51.36231\\bin\\Hostx64\\x64\\mspdb140.dll: Version 14.51.36260.0\n C:\\Program Files\\Microsoft Visual Studio\\18\\Community\\VC\\Tools\\MSVC\\14.51.36231\\bin\\Hostx64\\x64\\1033\\clui.dll: Version 19.51.36260.0\n\ncl : Command line error D8003 : missing source filename\n", + "platform": "Windows-11-10.0.26300-SP0", + "python": "3.14.5 (tags/v3.14.5:5607950, May 10 2026, 10:43:50) [MSC v.1944 64 bit (AMD64)]", + "python_executable": "C:\\Users\\wilds\\AppData\\Local\\Programs\\Python\\Python314\\python.exe", + "source_pins_canonical_sha256": "a6a6e3e1c38fbf7f73a25ef8eeea0fbded04232b5e3db96a23552ace89e0b8ee" +} diff --git a/research/r439-four-block-composition/NATIVE.json b/research/r439-four-block-composition/NATIVE.json new file mode 100644 index 0000000000..b537bb10ec --- /dev/null +++ b/research/r439-four-block-composition/NATIVE.json @@ -0,0 +1,1202 @@ +{ + "original": { + "legality": { + "all_final_frames_pass": true, + "common_frame_ADDs": 24305, + "containment_pairs_checked": 2386, + "copies": 9, + "donor_intersections": 0, + "erasures": 9, + "max_inherited_integer_abs": 2, + "nested_MOVEs": 2911, + "new_frame_ids_collision": false, + "nondegeneracy_checked_by_separate_exact_bank_audit": true, + "old_max_frame_id": 635, + "paid_histogram": [ + [ + 1, + 1323 + ], + [ + 2, + 1342 + ], + [ + 3, + 79 + ], + [ + 4, + 44 + ], + [ + 5, + 102 + ], + [ + 6, + 11 + ], + [ + 7, + 19 + ] + ], + "rank_mass": 5129, + "records": 27234, + "scope": "Independent chronological geometry/copy/source-owner audit. F2 all-column replay is in the separately freshly compiled transform receipt; address transform theorem and bank completion remain separate.", + "selected_helpers": 0, + "selected_pairs": 0, + "source_owner_intersections": 0, + "status": "PASS_INDEPENDENT_COHORT_LEGALITY_SOURCE_OWNERS_AND_LIFECYCLE" + }, + "stages": { + "11": { + "bridge_additions": 2664, + "copied_center_original_source_immutable": true, + "formal_columns_checked": 1549, + "fresh_center_copies": 99, + "global_live_registers": 1549, + "independent_dirty_registers": 439, + "local_odd_scalar_additions": 24305, + "local_raw_H": [ + [ + 1, + 1323 + ], + [ + 2, + 1342 + ], + [ + 3, + 79 + ], + [ + 4, + 44 + ], + [ + 5, + 102 + ], + [ + 6, + 11 + ], + [ + 7, + 19 + ] + ], + "local_registers": 661, + "local_scalar_additions": 24305, + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + }, + { + "omit_bridge": 6, + "rejected": true + }, + { + "omit_bridge": 7, + "rejected": true + }, + { + "omit_bridge": 8, + "rejected": true + }, + { + "omit_bridge": 9, + "rejected": true + }, + { + "omit_bridge": 10, + "rejected": true + }, + { + "omit_bridge": 11, + "rejected": true + }, + { + "omit_bridge": 12, + "rejected": true + }, + { + "omit_bridge": 13, + "rejected": true + }, + { + "omit_bridge": 14, + "rejected": true + }, + { + "omit_bridge": 15, + "rejected": true + }, + { + "omit_bridge": 16, + "rejected": true + }, + { + "omit_bridge": 17, + "rejected": true + }, + { + "omit_bridge": 18, + "rejected": true + }, + { + "omit_bridge": 19, + "rejected": true + }, + { + "omit_bridge": 20, + "rejected": true + }, + { + "omit_bridge": 21, + "rejected": true + }, + { + "omit_bridge": 22, + "rejected": true + }, + { + "omit_bridge": 23, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 93, + "payload_prefix_upper": "9528119495320518471870892800", + "reverse_fresh_center_copies": 45, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "signed_lift_prefix": [ + { + "bits": 16, + "cancellation_free_signed_row_l1_upper": "49347", + "reverse": false + }, + { + "bits": 21, + "cancellation_free_signed_row_l1_upper": "1113070", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stage_additions": 267355, + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 4 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 5 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 6 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 7 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 8 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 9 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 10 + } + ], + "status": "PASS_NEW_COHORT249_ALL_BRIDGED_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + }, + "5": { + "bridge_additions": 666, + "copied_center_original_source_immutable": true, + "five_stage_additions": 121525, + "formal_columns_checked": 883, + "fresh_center_copies": 45, + "global_live_registers": 883, + "independent_dirty_registers": 439, + "local_odd_scalar_additions": 24305, + "local_raw_H": [ + [ + 1, + 1323 + ], + [ + 2, + 1342 + ], + [ + 3, + 79 + ], + [ + 4, + 44 + ], + [ + 5, + 102 + ], + [ + 6, + 11 + ], + [ + 7, + 19 + ] + ], + "local_registers": 661, + "local_scalar_additions": 24305, + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 93, + "payload_prefix_upper": "9528119495320518471870892800", + "reverse_fresh_center_copies": 18, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "signed_lift_prefix": [ + { + "bits": 16, + "cancellation_free_signed_row_l1_upper": "49347", + "reverse": false + }, + { + "bits": 21, + "cancellation_free_signed_row_l1_upper": "1113070", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 4 + } + ], + "status": "PASS_NEW_COHORT249_ALL_FIVE_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + }, + "9": { + "bridge_additions": 1998, + "copied_center_original_source_immutable": true, + "formal_columns_checked": 1327, + "fresh_center_copies": 81, + "global_live_registers": 1327, + "independent_dirty_registers": 439, + "local_odd_scalar_additions": 24305, + "local_raw_H": [ + [ + 1, + 1323 + ], + [ + 2, + 1342 + ], + [ + 3, + 79 + ], + [ + 4, + 44 + ], + [ + 5, + 102 + ], + [ + 6, + 11 + ], + [ + 7, + 19 + ] + ], + "local_registers": 661, + "local_scalar_additions": 24305, + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + }, + { + "omit_bridge": 6, + "rejected": true + }, + { + "omit_bridge": 7, + "rejected": true + }, + { + "omit_bridge": 8, + "rejected": true + }, + { + "omit_bridge": 9, + "rejected": true + }, + { + "omit_bridge": 10, + "rejected": true + }, + { + "omit_bridge": 11, + "rejected": true + }, + { + "omit_bridge": 12, + "rejected": true + }, + { + "omit_bridge": 13, + "rejected": true + }, + { + "omit_bridge": 14, + "rejected": true + }, + { + "omit_bridge": 15, + "rejected": true + }, + { + "omit_bridge": 16, + "rejected": true + }, + { + "omit_bridge": 17, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 93, + "payload_prefix_upper": "9528119495320518471870892800", + "reverse_fresh_center_copies": 36, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "signed_lift_prefix": [ + { + "bits": 16, + "cancellation_free_signed_row_l1_upper": "49347", + "reverse": false + }, + { + "bits": 21, + "cancellation_free_signed_row_l1_upper": "1113070", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stage_additions": 218745, + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 4 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 5 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 6 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 7 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 8 + } + ], + "status": "PASS_NEW_COHORT249_ALL_BRIDGED_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + } + } + }, + "replacement": { + "legality": { + "all_final_frames_pass": true, + "common_frame_ADDs": 24233, + "containment_pairs_checked": 2386, + "copies": 9, + "donor_intersections": 0, + "erasures": 9, + "max_inherited_integer_abs": 2, + "nested_MOVEs": 2911, + "new_frame_ids_collision": false, + "nondegeneracy_checked_by_separate_exact_bank_audit": true, + "old_max_frame_id": 635, + "paid_histogram": [ + [ + 1, + 1323 + ], + [ + 2, + 1342 + ], + [ + 3, + 79 + ], + [ + 4, + 44 + ], + [ + 5, + 102 + ], + [ + 6, + 11 + ], + [ + 7, + 19 + ] + ], + "rank_mass": 5129, + "records": 27162, + "scope": "Independent chronological geometry/copy/source-owner audit. F2 all-column replay is in the separately freshly compiled transform receipt; address transform theorem and bank completion remain separate.", + "selected_helpers": 0, + "selected_pairs": 0, + "source_owner_intersections": 0, + "status": "PASS_INDEPENDENT_COHORT_LEGALITY_SOURCE_OWNERS_AND_LIFECYCLE" + }, + "stages": { + "11": { + "bridge_additions": 2664, + "copied_center_original_source_immutable": true, + "formal_columns_checked": 1549, + "fresh_center_copies": 99, + "global_live_registers": 1549, + "independent_dirty_registers": 439, + "local_odd_scalar_additions": 24233, + "local_raw_H": [ + [ + 1, + 1323 + ], + [ + 2, + 1342 + ], + [ + 3, + 79 + ], + [ + 4, + 44 + ], + [ + 5, + 102 + ], + [ + 6, + 11 + ], + [ + 7, + 19 + ] + ], + "local_registers": 661, + "local_scalar_additions": 24233, + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + }, + { + "omit_bridge": 6, + "rejected": true + }, + { + "omit_bridge": 7, + "rejected": true + }, + { + "omit_bridge": 8, + "rejected": true + }, + { + "omit_bridge": 9, + "rejected": true + }, + { + "omit_bridge": 10, + "rejected": true + }, + { + "omit_bridge": 11, + "rejected": true + }, + { + "omit_bridge": 12, + "rejected": true + }, + { + "omit_bridge": 13, + "rejected": true + }, + { + "omit_bridge": 14, + "rejected": true + }, + { + "omit_bridge": 15, + "rejected": true + }, + { + "omit_bridge": 16, + "rejected": true + }, + { + "omit_bridge": 17, + "rejected": true + }, + { + "omit_bridge": 18, + "rejected": true + }, + { + "omit_bridge": 19, + "rejected": true + }, + { + "omit_bridge": 20, + "rejected": true + }, + { + "omit_bridge": 21, + "rejected": true + }, + { + "omit_bridge": 22, + "rejected": true + }, + { + "omit_bridge": 23, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 93, + "payload_prefix_upper": "6828189949769144673901978368", + "reverse_fresh_center_copies": 45, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "signed_lift_prefix": [ + { + "bits": 16, + "cancellation_free_signed_row_l1_upper": "49347", + "reverse": false + }, + { + "bits": 20, + "cancellation_free_signed_row_l1_upper": "942262", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stage_additions": 266563, + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": false, + "stage": 4 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": true, + "stage": 5 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": false, + "stage": 6 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": true, + "stage": 7 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": false, + "stage": 8 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": true, + "stage": 9 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": false, + "stage": 10 + } + ], + "status": "PASS_NEW_COHORT249_ALL_BRIDGED_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + }, + "5": { + "bridge_additions": 666, + "copied_center_original_source_immutable": true, + "five_stage_additions": 121165, + "formal_columns_checked": 883, + "fresh_center_copies": 45, + "global_live_registers": 883, + "independent_dirty_registers": 439, + "local_odd_scalar_additions": 24233, + "local_raw_H": [ + [ + 1, + 1323 + ], + [ + 2, + 1342 + ], + [ + 3, + 79 + ], + [ + 4, + 44 + ], + [ + 5, + 102 + ], + [ + 6, + 11 + ], + [ + 7, + 19 + ] + ], + "local_registers": 661, + "local_scalar_additions": 24233, + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 93, + "payload_prefix_upper": "6828189949769144673901978368", + "reverse_fresh_center_copies": 18, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "signed_lift_prefix": [ + { + "bits": 16, + "cancellation_free_signed_row_l1_upper": "49347", + "reverse": false + }, + { + "bits": 20, + "cancellation_free_signed_row_l1_upper": "942262", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": false, + "stage": 4 + } + ], + "status": "PASS_NEW_COHORT249_ALL_FIVE_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + }, + "9": { + "bridge_additions": 1998, + "copied_center_original_source_immutable": true, + "formal_columns_checked": 1327, + "fresh_center_copies": 81, + "global_live_registers": 1327, + "independent_dirty_registers": 439, + "local_odd_scalar_additions": 24233, + "local_raw_H": [ + [ + 1, + 1323 + ], + [ + 2, + 1342 + ], + [ + 3, + 79 + ], + [ + 4, + 44 + ], + [ + 5, + 102 + ], + [ + 6, + 11 + ], + [ + 7, + 19 + ] + ], + "local_registers": 661, + "local_scalar_additions": 24233, + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + }, + { + "omit_bridge": 6, + "rejected": true + }, + { + "omit_bridge": 7, + "rejected": true + }, + { + "omit_bridge": 8, + "rejected": true + }, + { + "omit_bridge": 9, + "rejected": true + }, + { + "omit_bridge": 10, + "rejected": true + }, + { + "omit_bridge": 11, + "rejected": true + }, + { + "omit_bridge": 12, + "rejected": true + }, + { + "omit_bridge": 13, + "rejected": true + }, + { + "omit_bridge": 14, + "rejected": true + }, + { + "omit_bridge": 15, + "rejected": true + }, + { + "omit_bridge": 16, + "rejected": true + }, + { + "omit_bridge": 17, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 93, + "payload_prefix_upper": "6828189949769144673901978368", + "reverse_fresh_center_copies": 36, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "signed_lift_prefix": [ + { + "bits": 16, + "cancellation_free_signed_row_l1_upper": "49347", + "reverse": false + }, + { + "bits": 20, + "cancellation_free_signed_row_l1_upper": "942262", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stage_additions": 218097, + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": false, + "stage": 4 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": true, + "stage": 5 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": false, + "stage": 6 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": true, + "stage": 7 + }, + { + "fresh_copies": 9, + "scalar_additions": 24233, + "signed_inverse": false, + "stage": 8 + } + ], + "status": "PASS_NEW_COHORT249_ALL_BRIDGED_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + } + } + } +} diff --git a/research/r439-four-block-composition/README.md b/research/r439-four-block-composition/README.md new file mode 100644 index 0000000000..1a0ff99288 --- /dev/null +++ b/research/r439-four-block-composition/README.md @@ -0,0 +1,171 @@ +# Four reviewed R439 schedules compose: 72 fewer complete ADDs + +**Finite bit-supplier construction; no new kappa.** The phase-B schedules from +PR880, PR873, PR908 and PR914 compose on the selected PR589 bit word, reducing +the complete local program from **24,305 to 24,233 ADDs**. This package supplies +a single reconstructed word, checks every one of the 16 subsets of these four +replacements, and preserves every paid recursive rank. Its new evidence is +composition and complete accounting, not priority for the individual circuits. + +Base commit: `407d52ff15b2217b6e22bce44728b4c3907b6515`. The accepted conditional +result there is PR942's `kappa = 1661960547713947/10^18`, with the unchanged +PR589/555 bit supplier. The selected certificate and upstream sources are +unchanged. [SOURCES.json](SOURCES.json) pins every consumed predecessor artifact, +the supplier word, Python/native checkers and contextual sources by SHA-256 and +base Git object. + +| Full local charge | Original | Four-block composition | +|---|---:|---:| +| B ADDs | 934 | 898 | +| C literal cleanup ADDs | 2,629 | 2,593 | +| All ADDs (including D, A and scatter) | 24,305 | 24,233 | +| Exported records | 27,234 | 27,162 | +| MOVEs | 2,911 | 2,911 | +| COPY / ERASE pairs | 9 | 9 | +| Persistent registers / dirty helpers | 661 / 439 | 661 / 439 | +| Paid rank mass | 5,129 | 5,129 | +| Forward positive prefix bound | 49,347 | 49,347 | +| Reverse positive prefix bound | 1,113,070 | 942,262 | +| Local payload envelope | 93 bits | 93 bits | + +The paid profile remains `{1:1323,2:1342,3:79,4:44,5:102,6:11,7:19}`. +The nine copies retain rank seven and decoder constant 63. No helper, clean +initialization, source access, frame, COPY, restoration call or recursive child +is introduced. Both the changed forward gates and their required cleanup are +counted. No measured multiplication runtime improvement is asserted. + +## Reproduce + +Python 3.11+ and its standard library, from the repository root: + +```sh +python -I -B research/r439-four-block-composition/verify.py +``` + +Expected final line: + +```text +PASS_R439_FOUR_BLOCK_COMPOSITION subsets=16 cover_edges=32 adds=24305->24233 columns=661 controls=9 +``` + +The command reads immutable sources, builds all 16 words in temporary storage, +checks exact certificates, and changes no committed artifact. `--output PATH` +retains all words and record streams in a **new** directory; an existing path +is refused. `--write-certificate` explicitly regenerates this package's receipt. +Use `python -I -B research/r439-four-block-composition/test_package.py` for the +isolated execution and artifact corruption controls. + +The native harness uses an existing C++17 compiler and Boost headers: + +```sh +python -I -B research/r439-four-block-composition/native.py +``` + +Set `CXX` and `BOOST_INCLUDE` when they are not on the default compiler path. +For MSVC, use an x64 developer environment and `CXX=cl`. This rebuilds the +unchanged legality and 5/9/11-stage formal-column checkers for the original and +composed words. Expected marker: + +```text +PASS_R439_FOUR_BLOCK_NATIVE words=2 saving=72 stages=5,9,11 columns=883,1327,1549 bridge_controls=96 +``` + +See [VALIDATION.md](VALIDATION.md) for what actually ran, environment details, +failures corrected during development and remaining scope. A command being +provided is not evidence it passed; the recorded receipts are separate. + +## Exact composition argument + +The four disjoint **source intervals**, in their original execution order, are: + +| Frame | PR / contributor | Original B slice | ADDs | +|---|---|---|---:| +| 507 | [PR880](https://github.com/CrocSwap/integer-mult-bounds/pull/880), Krishnendu Purohit / Deftsalt-debug | `[128,163)` | 35 -> 30 | +| 519 | [PR908](https://github.com/CrocSwap/integer-mult-bounds/pull/908), Ross Richardson | `[163,205)` | 42 -> 32 | +| 508 | [PR873](https://github.com/CrocSwap/integer-mult-bounds/pull/873), Aaron Wang / navinor | `[205,242)` | 37 -> 30 | +| 524 | [PR914](https://github.com/CrocSwap/integer-mult-bounds/pull/914), Ross Richardson | `[449,490)` | 41 -> 27 | + +For each block, `check_blocks.py` evolves integer basis columns and independently +enumerates all Boolean inputs. It imports neither the composition builder nor +predecessor verification/search code. It establishes the same positive integer +forward matrix, the same set of participating physical registers, and entrywise +domination of the reversed-positive matrix. There are **11,264 Boolean inputs** +across the blocks. The combined B matrix is also checked on all **447 B +participant columns**; its reverse has **298 strictly smaller entries** and none +larger. Registers outside this participant set are untouched by B. + +Embed each block matrix into the full register space by identity on untouched +registers. Every intervening positive matrix is nonnegative. If `Q' <= Q` +entrywise, then `L Q' R <= L Q R` for any nonnegative `L,R`. Substituting one +block at a time therefore preserves the complete forward map and dominates the +complete reverse-positive map. This argument does not require disjoint wire +sets. Within an addition-only block, every intermediate nonnegative coordinate +is bounded by its terminal coordinate, so it also controls intermediate +prefixes. COPY/ERASE in the surrounding word is separately interpreted and +priced from the emitted instructions. + +The builder applies original source indices from right to left. An independent +streaming builder in `check_blocks.py` must produce exactly the same combined B. +It then rebuilds C as the literal full-frame reverse of every source/helper +write in A and B. That reverse restores arbitrary incoming dirt over F2; +no inverse identity over the positive integers is asserted. The original +owning checker verifies H1-H5, the decomposition and all 661 dirty-input columns. +All 661 complete register frame paths must match the original. + +All **16 subsets** are exported and independently interpreted by the retained +PR880 set-valued record interpreter. Each of the **32 cover relations** in the +subset cube must save exactly twice the appropriate block saving and must not +increase either measured positive prefix bound. The complete local bound +`64 F^3 B^2` falls from `9528119495320518471870892800` to +`6828189949769144673901978368`, both below `2^104`. This local formula alone is +not a substitute for the separate native multistage checks. + +Nine negative controls reject stale cleanup, removal of a gate from each of the +four frames even after cleanup is regenerated, a shifted source slice, missing +dirty compensation, an illegal frame and a removed literal exported ADD. + +## Coverage, overlap and limits + +This is a deterministic composition of four fixed witnesses, with exhaustive +coverage of their 16 subsets; there is no randomized circuit search, claimed +optimality or new parameter endpoint. The OS assignment seed is **1**; the +alternatives and local sprint claim are in [CLAIM.md](CLAIM.md). + +The predecessor schedules were individually reviewed in the maintainer's +[batch952 review](../../docs/research/community-batch952-review.md), which +explicitly does not compose the individual bit candidates. Their exact +reviewed heads are retained in SOURCES.json. This package adds fresh evidence +for their interaction and a single runnable composition. The unchanged +fixed-word frame optimum and single-write obstructions do not forbid this +combination of already constructed scalar schedules. + +Contemporaneous PR973 changes the different frame509 block. PR980's admission +experiment changes phase A and explicitly leaves phase B uncomposed. PR941, +PR965 and PR967 change D under the semantic boundary interface. None of those +pending artifacts or savings is imported here; this composition is not claimed +to be the smallest known R439 circuit. + +Full hosted supplier emission, the parent invoice, binding of a substituted +bit supplier and outer assembly remain adoption work. The recursive moment is +unchanged, so these ADD savings cannot on their own increase kappa. All inherited +all-size/compiler, common-label/mutable-source realization, whole-call hosting, +precision/tape/exact-recovery and analytic obligations remain. Finite replay +does not formally verify the multiplication theorem. The selected frontier is +unchanged; broad regenerating suites are not used to retest unchanged sources. + +## Attribution and license + +Prepared for **@woklerx**, with substantial **OpenAI Codex assistance** in +selection, implementation, proof explanation, testing and writing. Delegated +Codex workers independently implemented block replay and reviewed the package; +this is not independent human peer review. + +Circuit credit belongs to the four predecessors listed above. Supplier credit +remains with **DreamingOfClouds** (PR589 and PR545), **eumemic** (PR555/543), +and the retained PR503/510 lineage. The record exporter and native framework +retain **Dylan Crow**, **Zhihao Chen**, **DaysSky**, and the full lineage in +[the supplier NOTICE](../e8-bit-p111-tuned/NOTICE.md). The reused record +interpreter is from PR880, itself crediting **mtpsl / PR691**; the native harness +adapts PR880's **Ali Romman / PR688** lineage and Ross Richardson's frame524 +environment reporting. Existing notices remain intact. New files are +**Apache-2.0** under the repository license. diff --git a/research/r439-four-block-composition/SOURCES.json b/research/r439-four-block-composition/SOURCES.json new file mode 100644 index 0000000000..4d089f33bc --- /dev/null +++ b/research/r439-four-block-composition/SOURCES.json @@ -0,0 +1,129 @@ +{ + "base_commit": "407d52ff15b2217b6e22bce44728b4c3907b6515", + "context_inputs": [ + "certificates/selected-result.json", + "research/community-frontier942-audit/SELECTED-SOURCE.json", + "research/community-frontier942-audit/ASSEMBLY.json", + "docs/research/community-batch952-review.md", + "research/r439-block1-schedule/native.py", + "research/r439-frame524-seed13/native.py" + ], + "execution_inputs": [ + "research/e8-bit-p111-tuned/tune/bitE8mut-p111-tuned.json.gz", + "research/e8-bit-p111-tuned/code/xcheck_p.py", + "research/e8-bit-carrier-skeleton/code/bit/export_records.py", + "research/r439-block1-schedule/verify.py", + "research/r439-block1-schedule/CANDIDATE.json", + "research/r439-block508-schedule/CERTIFICATE.json", + "research/r439-frame519-seed02/CANDIDATE.json", + "research/r439-frame524-seed13/CANDIDATE.json" + ], + "files": { + "certificates/selected-result.json": { + "base_git_blob": "3d7529d77a5f22d8c6f64f98bd5a0e71b8eee892", + "sha256": "1d35283cb0ce3f8db1f285683933517f9e87475d295e2b6316399ad9928c81c3" + }, + "docs/research/community-batch952-review.md": { + "base_git_blob": "512ce9f18b32007bea71452eb5f3eb85c4d577ad", + "sha256": "04db59dfc2c31453229b6061bbf59547e71ce3abdc0ce0f6779144bb0dde127b" + }, + "research/community-frontier942-audit/ASSEMBLY.json": { + "base_git_blob": "9e71e9c1a1c1cbd1979f0c7bac87495322cbfad0", + "sha256": "4b2894956e594e408e111d806c842f2ed2c32aefcadff93fad69ff0b46f1991a" + }, + "research/community-frontier942-audit/SELECTED-SOURCE.json": { + "base_git_blob": "7bb22cec9e1150f81c2d695c73d9f5fe4c847f84", + "sha256": "1cd8dfde15919d1c3df9796b262e67898143d9793d2b86ee7b0a47fc903654c9" + }, + "research/e8-bit-carrier-skeleton/code/bit/checkers/columns_k.cpp": { + "base_git_blob": "42bb232fbec4de703e70cc13dc2f39a3b43a3a01", + "sha256": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2" + }, + "research/e8-bit-carrier-skeleton/code/bit/checkers/json.hpp": { + "base_git_blob": "82d69f7c5d044c9887c96b90c97f5639083ecd14", + "sha256": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63" + }, + "research/e8-bit-carrier-skeleton/code/bit/checkers/legality_h.cpp": { + "base_git_blob": "cb1233c7e96b1aa8bbf4d2e4165d75ab0dca64b9", + "sha256": "6c1ef2b24e57781d6951c172a1024fc4300e6fd392c9d6672079a7806ab663b3" + }, + "research/e8-bit-carrier-skeleton/code/bit/export_records.py": { + "base_git_blob": "3632d370486a02f5456f7643ced03f8c925b2350", + "sha256": "8a5999601f917dbb492bb9ae9a344611f18cc7cedc53dc3c76496a369e530eb3" + }, + "research/e8-bit-carrier-skeleton/code/bit/regression/stage_cohort.py": { + "base_git_blob": "f6d7afe3e623208c4207b6a683a1e3e49249e31c", + "sha256": "6c288f6f234b528c1a7c0a4adfb724e91e0fe6b18c8dffad96af3f973de1829a" + }, + "research/e8-bit-carrier-skeleton/portable-include/bits/stdc++.h": { + "base_git_blob": "fc5664e929d9a81d9b4926bee049a93330be86ec", + "sha256": "420094be2af295eed03a983dd66debbbe9cfb78d8252859f4498a615a0074b99" + }, + "research/e8-bit-p111-tuned/code/xcheck_p.py": { + "base_git_blob": "184f5dcf94a486cc7db91ca4db5865916bf26009", + "sha256": "af3decc877e27c00001cf56f50c6c09566e8e101297ab34c7860aed96a06d80e" + }, + "research/e8-bit-p111-tuned/tune/bitE8mut-p111-tuned.json.gz": { + "base_git_blob": "85a4499bf9e4911a705d50567a2c2ef6cf23739a", + "sha256": "e3e301e62bc2b41dbf1ceac0acf3d35824ebeab1848c5a2142d4577b109da52f" + }, + "research/r439-block1-schedule/CANDIDATE.json": { + "base_git_blob": "de2944f7388e7ba4461127c2db3a4b48e270747c", + "sha256": "ba500f1c0793291be4f7e00ffd3f2a33179c246c91a50045838195323f27601e" + }, + "research/r439-block1-schedule/native.py": { + "base_git_blob": "43bbf5ebb5480f256fac75d17d6eeb37919f6359", + "sha256": "502712f170b9ac59fddf018552f180a44d03fa1215d080168a7bf5d3c30a9d2f" + }, + "research/r439-block1-schedule/verify.py": { + "base_git_blob": "1ef1dad266d6c636f7481c279e62472614e36c81", + "sha256": "e19eeed4f2f99fe5de58dd1982623e18e1039a0d768c6aaab263075fc0ec71db" + }, + "research/r439-block508-schedule/CERTIFICATE.json": { + "base_git_blob": "65b4e81a6ea00d6ba30f5e73a4aa49eadbc5e305", + "sha256": "9ea4fe5868c94c8a43de2f7c0fd9cb466192071d8d96a2bab099f67214d4dd31" + }, + "research/r439-frame519-seed02/CANDIDATE.json": { + "base_git_blob": "a1ea48a5b39675c12ed2448ba153f8e2003cb33c", + "sha256": "dbc98e37719ff3a034c164a44a141346146ddd70f0276766e5ee7554ff515821" + }, + "research/r439-frame524-seed13/CANDIDATE.json": { + "base_git_blob": "0ae9182bb55355da81b0016e474680e8ab7c5a98", + "sha256": "a412477c76af69945b272e07c1338d1819877bd7138d94a2e761e34ea89fe4cb" + }, + "research/r439-frame524-seed13/native.py": { + "base_git_blob": "22b27866a547081d82c2c113094af57b71fa31a5", + "sha256": "361a255fa06f28c9fd2e13db9c003ff626ac63a46f2e06029eb0b69786a8b1d2" + } + }, + "native_inputs": [ + "research/e8-bit-carrier-skeleton/code/bit/regression/stage_cohort.py", + "research/e8-bit-carrier-skeleton/code/bit/checkers/legality_h.cpp", + "research/e8-bit-carrier-skeleton/code/bit/checkers/columns_k.cpp", + "research/e8-bit-carrier-skeleton/code/bit/checkers/json.hpp", + "research/e8-bit-carrier-skeleton/portable-include/bits/stdc++.h" + ], + "predecessor_prs": { + "873": { + "author": "navinor", + "reviewed_head": "117c48527dd4f066dad103121761154cf1bb39cd", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/873" + }, + "880": { + "author": "Deftsalt-debug", + "reviewed_head": "554532392ae15ef3c2e90050df3a90a4d0ac573e", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/880" + }, + "908": { + "author": "RossRichardson", + "reviewed_head": "7deb3ca8ee112249b5eec22acd24e214383078bd", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/908" + }, + "914": { + "author": "RossRichardson", + "reviewed_head": "dba9199e8cbb0136bcba6b769c36753a61092190", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/914" + } + }, + "supplier_head": "a5afc8c6169ea61ba7c51dfd3cade02cc7b13b46" +} diff --git a/research/r439-four-block-composition/VALIDATION.md b/research/r439-four-block-composition/VALIDATION.md new file mode 100644 index 0000000000..99a5a50bc7 --- /dev/null +++ b/research/r439-four-block-composition/VALIDATION.md @@ -0,0 +1,86 @@ +# Validation receipt + +Completed locally on 2026-10-13 on Windows, CPython **3.14.5**. Native checks +used the existing **MSVC 19.51.36260** x64 compiler and **Boost 1.88.0** headers. +No packages were installed or global settings changed. Exact compiler/header +hashes and commands are in `NATIVE-ENVIRONMENT.json`. + +## Completed checks + +- `python -I -B research/r439-four-block-composition/verify.py`: all **16** + subset words, **32** cover edges, all **661** dirty-input columns per word, + full H1-H5/decomposition, all complete frame paths, emitted record semantics, + exact cost/prefix bounds and **9** negative controls passed. The final + native invocation also replayed this command and compared the complete + deterministic `CERTIFICATE.json`. +- Independent `check_blocks.py`: **11,264** local Boolean inputs, exact local + integer maps, reversed-positive domination, all **447** B participant + columns and independent full-B splice construction passed. **298** entries + strictly decrease in the combined reversed-positive matrix, none increases. +- `python -I -O -B research/r439-four-block-composition/test_package.py`: + **5 tests passed**, 32.760 seconds on the final isolated worktree. They + reproduce the full package with only declared inputs and no Git metadata; + reject an altered subset receipt, corruption of all **13** execution/native + source inputs, an omitted witness, four rehashed circuit corruptions, and + an edit outside the claimed B slices. The same five tests previously passed + without `-O` in 32.869 seconds. +- `python -I -B research/r439-four-block-composition/native.py`: fresh compiled + legality and **5/9/11-stage** formal-column checks passed for both words. + Column counts are **883/1327/1549** per word, with **96** bridge-omission + controls rejected in total. The final run in the isolated worktree produced + identical mathematical `NATIVE.json` to the first run. Its canonical JSON + SHA-256 is `3cdf18f8d82e162d5d6909cd096f7863441f9f71dbd5a5547f71006eef50f580`. + Canonical here means `json.dumps(value, sort_keys=True, separators=(",", ":"))` + encoded as UTF-8, retaining every field. The environment receipt uses the + same canonical form for its source-registry digest. +- `python -I -B scripts/verify_selected_result.py`: passed with unchanged + selected `kappa = 1661960547713947/10^18` and source/proof-supplement inventory. + +The final native run retained logs and generated words outside the checkout at +`F:\MEESEEKS MATH\r439-final-native`. Ordinary replay uses temporary storage; +these local paths are not needed to reproduce the contribution. In the +restricted sandbox, package tests needed TEMP/TMP redirected to an accessible +workspace directory; no source or mathematical assertion was altered for this. + +## Development findings + +An early source registry listed the frame508 nomination file while the +independent reader consumed its reviewed `CERTIFICATE.json`. The registry and +declared input list were corrected to the actually consumed file **before** +the isolated-source and final native runs. A later provenance-only addition +made the first environment receipt's registry digest outdated; the final native +run regenerated that environment evidence and reproduced identical mathematics. +An ad hoc changed-destination control was initially a no-op, was corrected to +change the destination, and then rejected. Committed controls make real edits. + +Concurrent work changed the original shared checkout's branch. The contribution +was copied to a separate worktree at the same exact base and reverified there; +unrelated files and branches were not staged, reset or removed. + +Git staging exposed CRLF-to-LF normalization of generated receipts. Final JSON +artifacts were normalized to UTF-8/LF, generators now request LF explicitly, +and the environment's registry digest was changed to canonical JSON so it is +independent of checkout line endings. The existing native mathematical receipt +was compared field for field with both fresh runs; only serialization and +environment digest metadata changed. The final local verifier was rerun after +this portability fix. + +## Overlap and scope + +The assignment/base is recorded in CLAIM.md. Immediately before packaging, +Curiosity Bot refreshed recent PRs through **#984**, including #973's distinct +frame509 and #980's phase-A admission work. No competing four-block composition +was found in those results or the R439 composition query; this is a bounded +metadata check, not a claim to have exhaustively reviewed every open PR. +Fetched `origin/main` was `55645f9d4d806d67875c1c8b9840b0b039ece22e`; its changes +since the base do not alter the consumed supplier/checker or four predecessor +directories. The contribution retains its exact original base. + +No global source generator or selected construction is changed, so validation +is the affected isolated package plus selected-record integrity, not a repeat +of expensive unrelated `make verify`/selected complex ancestry regeneration. +The full hosted parent invoice, supplier adoption and outer assembly were not +run. No Linux CI, Lean multiplication proof, unrestricted circuit optimum, +new bit exponent or new kappa is claimed. Inherited assumptions are listed in +README.md. Review and independent replay were AI-assisted; no human review is +implied. diff --git a/research/r439-four-block-composition/check_blocks.py b/research/r439-four-block-composition/check_blocks.py new file mode 100644 index 0000000000..d5081b108e --- /dev/null +++ b/research/r439-four-block-composition/check_blocks.py @@ -0,0 +1,242 @@ +#!/usr/bin/env python3 +"""Independent finite checks for four reviewed positive-transfer splices. + +This module imports no predecessor verifier, search code, or composition +builder. Integer maps are recovered one input column at a time. Boolean maps +are separately replayed on every local input. + +Composition argument: each new forward block matrix equals its old matrix, +and each new reversed-positive block matrix is entrywise no greater. Embed +these maps as identity outside the block registers. All intervening matrices +have nonnegative entries, so substitution in their ordered product preserves +forward equality and reverse domination. This does not require disjoint wire +sets; the source intervals must be disjoint. The full B products are also +checked directly below. Within a positive-addition block, every intermediate +coordinate is bounded by its terminal coordinate on nonnegative inputs. + +Literal reverse cleanup is an inverse over F2 because every singleton addition +is an involution there. That statement does not assert equality of the complete +positive-integer word including cleanup. Full-word cleanup, hosting, and native +accounting checks belong to the composition verifier. + +Prepared with substantial OpenAI Codex assistance. Apache-2.0. +""" + +import argparse +import copy +import gzip +import hashlib +import json +from pathlib import Path + + +SOURCE_WORD = "research/e8-bit-p111-tuned/tune/bitE8mut-p111-tuned.json.gz" +SPECS = ( + (507, 128, 163, 30, (0, 3, 11, 61, 62, 63, 68, 69, 72, 465), + "research/r439-block1-schedule/CANDIDATE.json"), + (519, 163, 205, 32, (15, 23, 30, 41, 49, 53, 59, 70, 75, 82, 91, 96), + "research/r439-frame519-seed02/CANDIDATE.json"), + (508, 205, 242, 30, (19, 27, 35, 43, 57, 65, 66, 74, 89, 97, 466), + "research/r439-block508-schedule/CERTIFICATE.json"), + (524, 449, 490, 27, (8, 12, 31, 37, 40, 45, 73, 78, 81, 86, 105, 110), + "research/r439-frame524-seed13/CANDIDATE.json"), +) + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def digest(value): + return hashlib.sha256(json.dumps(value, sort_keys=True, + separators=(",", ":")).encode()).hexdigest() + + +def load_blocks(root): + """Decode only the pinned four witnesses, normalizing physical gates.""" + blocks = [] + for frame, start, stop, count, registers, source in SPECS: + item = json.loads((Path(root) / source).read_text(encoding="utf-8")) + if frame == 507: + need(item["phase"] == "B" and item["frame"] == frame + and item["start"] == start and item["stop"] == stop, + "frame507 witness binding changed") + need(item["registers"] == list(registers), "frame507 wire order changed") + gates = [] + for op in item["replacement"]: + need(type(op) is list and len(op) == 2 + and all(type(x) is int and 0 <= x < len(registers) for x in op), + "invalid frame507 local index") + gates.append([frame, registers[op[0]], [registers[op[1]]]]) + elif frame == 508: + binding = item["binding"] + need(binding["section"] == "B" and binding["frame"] == frame + and binding["slice"] == [start, stop] + and binding["registers"] == list(registers), + "frame508 witness binding changed") + gates = item["gates"] + elif frame == 519: + need(item["frame"] == frame and item["slice"] == [start, stop] + and item["registers"] == list(registers), + "frame519 witness binding changed") + gates = [g for factor in item["factors"] for g in factor["program"]] + else: + need(item["frame"] == frame and item["source_range"] == [start, stop] + and item["registers"] == list(registers), + "frame524 witness binding changed") + gates = item["candidate_gates"] + need(len(gates) == count, "predecessor gate count changed") + blocks.append(dict(frame=frame, start=start, stop=stop, + registers=list(registers), gates=gates, source=source)) + return blocks + + +def validate_gates(gates, registers, frame=None, singleton=False): + allowed = set(registers) + need(type(gates) is list, "gate sequence must be a list") + for gate in gates: + need(type(gate) is list and len(gate) == 3, "malformed gate") + f, dst, sources = gate + need(type(f) is int and f >= 0 and (frame is None or f == frame), + "wrong gate frame") + need(type(dst) is int and dst in allowed, "unexpected destination") + need(type(sources) is list and sources, "empty or malformed source list") + need(not singleton or len(sources) == 1, "non-elementary replacement") + need(all(type(src) is int and src in allowed and src != dst for src in sources), + "unexpected or self source") + need(len(sources) == len(set(sources)), "duplicate source") + + +def transfer_columns(gates, registers, reverse=False): + """Recover a matrix as columns by separately executing integer unit inputs.""" + positions = {r: i for i, r in enumerate(registers)} + order = list(reversed(gates)) if reverse else gates + columns = [] + for input_wire in range(len(registers)): + values = [int(j == input_wire) for j in range(len(registers))] + for _, dst, sources in order: + for src in sources: + values[positions[dst]] += values[positions[src]] + columns.append(values) + return columns + + +def boolean_table(gates, registers): + """Independent truth-table interpreter using one packed scalar per input.""" + positions = {r: i for i, r in enumerate(registers)} + result = [] + for bits in range(1 << len(registers)): + state = bits + for _, dst, sources in gates: + parity = 0 + for src in sources: + parity ^= (state >> positions[src]) & 1 + state ^= parity << positions[dst] + result.append(state) + return result + + +def participants(gates): + return sorted({wire for _, dst, sources in gates for wire in [dst, *sources]}) + + +def domination_counts(old, new): + need(len(old) == len(new) and all(len(a) == len(b) for a, b in zip(old, new)), + "matrix dimensions differ") + need(all(b <= a for col_a, col_b in zip(old, new) for a, b in zip(col_a, col_b)), + "reverse-positive domination failed") + return sum(b < a for col_a, col_b in zip(old, new) for a, b in zip(col_a, col_b)) + + +def verify_blocks(word, blocks, candidate_b=None): + """Check exact witnesses and their combined B map; return fresh evidence.""" + need(type(blocks) is list and len(blocks) == len(SPECS), "wrong block set") + need(type(word.get("B")) is list, "source lacks B") + original_b = word["B"] + combined_b = [] + cursor = 0 + receipts = [] + for block, spec in zip(blocks, SPECS): + frame, start, stop, count, registers, source = spec + need(type(block) is dict, "block must be an object") + need(all(type(block.get(k)) is int for k in ("frame", "start", "stop")), + "noninteger block binding") + need(type(block.get("registers")) is list + and all(type(r) is int for r in block["registers"]), + "noninteger register binding") + need((block["frame"], block["start"], block["stop"]) == (frame, start, stop) + and block["registers"] == list(registers) and block["source"] == source, + "block binding changed") + need(cursor <= start < stop <= len(original_b), "overlapping or invalid slices") + old = original_b[start:stop] + new = block["gates"] + validate_gates(old, registers, frame, singleton=True) + validate_gates(new, registers, frame, singleton=True) + need(len(new) == count, "replacement length changed") + need(participants(old) == participants(new) == list(registers), + "changed physical participant set") + old_forward = transfer_columns(old, registers) + new_forward = transfer_columns(new, registers) + need(old_forward == new_forward, "local integer map differs") + old_reverse = transfer_columns(old, registers, reverse=True) + new_reverse = transfer_columns(new, registers, reverse=True) + strict = domination_counts(old_reverse, new_reverse) + old_table, new_table = boolean_table(old, registers), boolean_table(new, registers) + need(old_table == new_table, "local Boolean truth table differs") + inverse_table = boolean_table(list(reversed(new)), registers) + need(all(inverse_table[value] == i for i, value in enumerate(new_table)), + "literal local Boolean inverse failed") + receipts.append(dict(frame=frame, source_slice=[start, stop], + original_adds=len(old), replacement_adds=len(new), + registers=list(registers), boolean_inputs=len(old_table), + integer_forward_equal=True, + reverse_positive_dominated=True, + reverse_strict_entries=strict, + forward_columns_sha256=digest(old_forward), + old_reverse_columns_sha256=digest(old_reverse), + new_reverse_columns_sha256=digest(new_reverse), + gates_sha256=digest(new))) + combined_b.extend(copy.deepcopy(original_b[cursor:start])) + combined_b.extend(copy.deepcopy(new)) + cursor = stop + combined_b.extend(copy.deepcopy(original_b[cursor:])) + all_registers = participants(original_b) + if candidate_b is not None: + validate_gates(candidate_b, all_registers) + need(candidate_b == combined_b, "candidate B differs from independent composition") + validate_gates(original_b, all_registers) + validate_gates(combined_b, all_registers) + need(participants(combined_b) == all_registers, "combined B participants changed") + old_map = transfer_columns(original_b, all_registers) + new_map = transfer_columns(combined_b, all_registers) + need(old_map == new_map, "combined B integer map differs") + old_reverse = transfer_columns(original_b, all_registers, reverse=True) + new_reverse = transfer_columns(combined_b, all_registers, reverse=True) + strict = domination_counts(old_reverse, new_reverse) + old_adds = sum(len(g[2]) for g in original_b) + new_adds = sum(len(g[2]) for g in combined_b) + need(old_adds - new_adds == 36, "combined B saving differs from 36") + return dict(status="PASS_R439_FOUR_BLOCK_MAPS", blocks=receipts, + original_b_adds=old_adds, replacement_b_adds=new_adds, + forward_adds_saved=old_adds - new_adds, + boolean_inputs=sum(x["boolean_inputs"] for x in receipts), + combined_register_count=len(all_registers), + combined_forward_equal=True, combined_reverse_dominated=True, + combined_reverse_strict_entries=strict, + combined_forward_columns_sha256=digest(old_map), + old_combined_reverse_columns_sha256=digest(old_reverse), + new_combined_reverse_columns_sha256=digest(new_reverse), + combined_b_sha256=digest(combined_b)) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--root", type=Path, default=Path(__file__).resolve().parents[2]) + args = parser.parse_args() + word = json.loads(gzip.decompress((args.root / SOURCE_WORD).read_bytes())) + print(json.dumps(verify_blocks(word, load_blocks(args.root)), sort_keys=True, indent=2)) + + +if __name__ == "__main__": + main() diff --git a/research/r439-four-block-composition/native.py b/research/r439-four-block-composition/native.py new file mode 100644 index 0000000000..607ca18b8a --- /dev/null +++ b/research/r439-four-block-composition/native.py @@ -0,0 +1,170 @@ +#!/usr/bin/env python3 +"""Fresh unchanged native legality and 5/9/11-stage checks for the composed word. + +Adapted from Krishnendu Purohit (@Deftsalt-debug)'s r439-block1-schedule/native.py, +which credits Ali Romman / PR688's r420-two-block-composition/native.py. +Environment reporting follows Ross Richardson's r439-frame524-seed13/native.py. +These predecessors and this contribution include substantial OpenAI Codex +assistance. Apache-2.0; original checker/exporter source notices are retained. + +Requires Python 3, a C++17 compiler and Boost headers; installs nothing. Linux: + BOOST_INCLUDE=/usr/include CXX=c++ python3 native.py --output /tmp/r439-native +Windows: run from an x64 Visual Studio developer shell with CXX=cl and set +BOOST_INCLUDE to the directory containing boost/multiprecision/cpp_int.hpp. +GCC/Clang are also supported. A literal compiler path containing spaces is valid. +Use --write-receipt once to save NATIVE.json and NATIVE-ENVIRONMENT.json; a normal +run independently regenerates all records and compares the mathematical receipt. +""" +import argparse +import importlib.util +import json +import os +from pathlib import Path +import platform +import shlex +import shutil +import subprocess +import sys +import tempfile + +sys.dont_write_bytecode = True +HERE = Path(__file__).resolve().parent +spec = importlib.util.spec_from_file_location("composition_verifier", HERE / "verify.py") +verify = importlib.util.module_from_spec(spec) +spec.loader.exec_module(verify) + + +def run(out, write): + pins = json.loads((HERE / "SOURCES.json").read_text()) + package = verify.ROOT / "research/e8-bit-carrier-skeleton" + bit = package / "code/bit" + checkers = bit / "checkers" + required = [p.relative_to(verify.ROOT).as_posix() for p in + (bit / "regression/stage_cohort.py", checkers / "legality_h.cpp", + checkers / "columns_k.cpp", checkers / "json.hpp", + package / "portable-include/bits/stdc++.h")] + verify.need(pins["native_inputs"] == required, "native input coverage mismatch") + for path in required: + verify.need(verify.sha((verify.ROOT / path).read_bytes()) == pins["files"][path]["sha256"], + "native source hash mismatch: " + path) + raw_compiler = os.environ.get("CXX", "c++") + compiler = ([raw_compiler] if Path(raw_compiler).is_file() else + shlex.split(raw_compiler, posix=os.name != "nt")) + if os.name == "nt": + compiler = [part.strip('"') for part in compiler] + verify.need(bool(compiler), "CXX must name a C++17 compiler") + executable = shutil.which(compiler[0]) + verify.need(executable is not None, "CXX compiler not found: " + compiler[0]) + boost = Path(os.environ.get("BOOST_INCLUDE", "/usr/include")).resolve() + boost_headers = [boost / "boost/version.hpp", boost / "boost/multiprecision/cpp_int.hpp"] + verify.need(all(p.is_file() for p in boost_headers), "Set BOOST_INCLUDE to a Boost header root") + local = out / "local" + local.mkdir() + verify.run(local, False) + certificate = json.loads((HERE / "CERTIFICATE.json").read_text()) + bindir = out / "bin" + bindir.mkdir() + msvc = Path(compiler[0]).stem.lower() in ("cl", "clang-cl") + includes = [package / "portable-include", checkers, boost] + definitions = ["HDIM=8", "NCOPY=9", "VPORTS=111", "RHELP=439"] + flags = (["/nologo", "/O2", "/std:c++17", "/EHsc"] if msvc else ["-O2", "-std=c++17"]) + flags += [("/D" if msvc else "-D") + x for x in definitions] + flags += [("/I" if msvc else "-I") + str(x) for x in includes] + commands = {} + + def call(name, command): + commands[name] = list(map(str, command)) + with (out / (name + ".log")).open("w") as log: + subprocess.run(commands[name], check=True, cwd=bindir, stdout=log, stderr=subprocess.STDOUT) + + def compile_checker(name, source, extra=()): + binary = bindir / (name + (".exe" if os.name == "nt" else "")) + output = ["/Fe:" + str(binary), "/Fo:" + str(bindir / (name + ".obj"))] if msvc else ["-o", binary] + call("compile-" + name, compiler + flags + list(extra) + output + [checkers / source]) + return binary + + def receipt(path): + data = json.loads(path.read_text()) + # Only execution time and the temporary absolute stream pathname vary. + data.pop("seconds", None) + data.pop("local_scalar_stream", None) + return data + + legality_binary = compile_checker("legality", "legality_h.cpp") + column_binaries = {pairs: compile_checker("columns" + str(pairs), "columns_k.cpp", + [("/D" if msvc else "-D") + "KPAIRS=" + str(pairs)]) for pairs in (2, 4, 5)} + results = {} + for name, additions in (("original", 24305), ("replacement", 24233)): + records = local / name + cin, cout = out / name / "cin", out / name / "cout" + call(name + "-cohort", [sys.executable, "-I", "-B", bit / "regression/stage_cohort.py", + records, records, cin, cout]) + call(name + "-legality", [legality_binary, cin, cout, cout / "legality.json"]) + legality = receipt(cout / "legality.json") + verify.need(legality["status"] == "PASS_INDEPENDENT_COHORT_LEGALITY_SOURCE_OWNERS_AND_LIFECYCLE", + "native legality did not pass") + verify.need(legality["rank_mass"] == 5129 and legality["copies"] == legality["erasures"] == 9 + and legality["common_frame_ADDs"] == additions, "native legality price mismatch") + results[name] = {"legality": legality, "stages": {}} + for pairs in (2, 4, 5): + path = cout / ("columns" + str(pairs) + ".json") + call(name + "-columns" + str(pairs), [column_binaries[pairs], cout / "COHORT249-RECORDS.bin", path]) + data = receipt(path) + status = ("PASS_NEW_COHORT249_ALL_FIVE_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" if pairs == 2 else + "PASS_NEW_COHORT249_ALL_BRIDGED_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL") + verify.need(data["status"] == status, "native columns did not pass") + verify.need(data["formal_columns_checked"] == 222 * pairs + 439, "column coverage mismatch") + controls = data["negative_controls"] + verify.need(len(controls) == 6 * (pairs - 1) and all(c["rejected"] for c in controls), + "native bridge control failed") + expected = certificate["native_records"][name] + verify.need(data["local_scalar_additions"] == expected["adds"] == additions and + data["payload_prefix_upper"] == expected["payload_prefix_upper"] and + [int(x["cancellation_free_signed_row_l1_upper"]) for x in data["signed_lift_prefix"]] + == expected["positive_prefix"], "native/Python prefix or count mismatch") + results[name]["stages"][str(2 * pairs + 1)] = data + for stages in ("5", "9", "11"): + old, new = (results[name]["stages"][stages] for name in ("original", "replacement")) + verify.need(old["local_raw_H"] == new["local_raw_H"] and + old["local_scalar_additions"] - new["local_scalar_additions"] == 72, + "native paid profile or saving mismatch") + verify.need(int(new["payload_prefix_upper"]) <= int(old["payload_prefix_upper"]), + "native prefix increased") + path = HERE / "NATIVE.json" + if write: + path.write_text(json.dumps(results, indent=2, sort_keys=True) + "\n", encoding="utf-8", newline="\n") + version = subprocess.run(compiler + (["/Bv"] if msvc else ["--version"]), + capture_output=True, text=True) + environment = {"python": sys.version, "python_executable": sys.executable, + "platform": platform.platform(), "compiler_command": compiler, + "compiler_path": str(Path(executable).resolve()), + "compiler_sha256": verify.sha(Path(executable).read_bytes()), + "compiler_version_output": version.stdout + version.stderr, + "boost_include": str(boost), + "boost_header_sha256": {str(p): verify.sha(p.read_bytes()) for p in boost_headers}, + "boost_version_header": boost_headers[0].read_text(), + "source_pins_canonical_sha256": verify.sha(verify.canonical( + json.loads((HERE / "SOURCES.json").read_text(encoding="utf-8")))), + "commands": commands} + (HERE / "NATIVE-ENVIRONMENT.json").write_text(json.dumps(environment, indent=2, sort_keys=True) + "\n", + encoding="utf-8", newline="\n") + else: + verify.need(results == json.loads(path.read_text()), "native receipt mismatch") + print("PASS_R439_FOUR_BLOCK_NATIVE words=2 saving=72 stages=5,9,11 columns=883,1327,1549 bridge_controls=96") + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--output", type=Path, help="fresh directory for logs and execution artifacts") + parser.add_argument("--write-receipt", action="store_true") + args = parser.parse_args() + if args.output: + args.output.mkdir(parents=True, exist_ok=False) + run(args.output.resolve(), args.write_receipt) + else: + with tempfile.TemporaryDirectory(prefix="r439-four-block-native-") as temporary: + run(Path(temporary), args.write_receipt) + + +if __name__ == "__main__": + main() diff --git a/research/r439-four-block-composition/test_package.py b/research/r439-four-block-composition/test_package.py new file mode 100644 index 0000000000..ef622e1c1c --- /dev/null +++ b/research/r439-four-block-composition/test_package.py @@ -0,0 +1,132 @@ +#!/usr/bin/env python3 +"""Isolated-source replay and adversarial package checks; standard library only. + +Run: python3 -I -B research/r439-four-block-composition/test_package.py +Copies only declared execution/native inputs and the local verifier into a +temporary repository. Does not modify sources, compile C++, or use the network. +Prepared with substantial OpenAI Codex assistance. Apache-2.0. +""" +import contextlib +import copy +import gzip +import importlib.util +import io +import json +from pathlib import Path +import shutil +import sys +import tempfile +import unittest + +sys.dont_write_bytecode = True +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] + + +def module(path, name): + spec = importlib.util.spec_from_file_location(name, path) + result = importlib.util.module_from_spec(spec) + spec.loader.exec_module(result) + return result + + +class PackageTests(unittest.TestCase): + def setUp(self): + self.temporary = tempfile.TemporaryDirectory(prefix="r439-package-test-") + self.addCleanup(self.temporary.cleanup) + self.root = Path(self.temporary.name) + self.here = self.root / HERE.relative_to(ROOT) + self.here.mkdir(parents=True) + self.pins = json.loads((HERE / "SOURCES.json").read_text(encoding="utf-8")) + for name in ("verify.py", "check_blocks.py", "SOURCES.json", "CERTIFICATE.json"): + shutil.copyfile(HERE / name, self.here / name) + for name in self.pins["execution_inputs"] + self.pins["native_inputs"]: + target = self.root / name + target.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(ROOT / name, target) + self.verify = module(self.here / "verify.py", "isolated_composition_verifier") + self.blocks = module(self.here / "check_blocks.py", "isolated_composition_blocks") + + def write_json(self, path, value): + path.write_text(json.dumps(value) + "\n", encoding="utf-8") + + def test_declared_inputs_suffice_and_certificate_corruption_is_rejected(self): + # The temporary root has no Git metadata, context files, search code, + # predecessor native harness, or predecessor SOURCES manifests. + output = self.root / "positive" + output.mkdir() + with contextlib.redirect_stdout(io.StringIO()): + report = self.verify.run(output, False) + self.assertEqual(report["subset_cover_edges"], 32) + self.assertEqual(len(report["subsets"]), 16) + self.assertEqual(report["native_records"]["replacement"]["adds"], 24233) + certificate = self.here / "CERTIFICATE.json" + altered = json.loads(certificate.read_text(encoding="utf-8")) + altered["subsets"][7]["native_records"]["adds"] -= 1 + self.write_json(certificate, altered) + output = self.root / "bad-certificate" + output.mkdir() + with contextlib.redirect_stdout(io.StringIO()): + with self.assertRaisesRegex(ValueError, "certificate mismatch"): + self.verify.run(output, False) + + def test_every_consumed_source_is_hash_checked(self): + self.verify.sources() + for name in self.pins["execution_inputs"] + self.pins["native_inputs"]: + with self.subTest(source=name): + path = self.root / name + original = path.read_bytes() + try: + path.write_bytes(original + b"\ncorrupted source\n") + with self.assertRaisesRegex(ValueError, "source hash mismatch"): + self.verify.sources() + finally: + path.write_bytes(original) + + def test_execution_closure_cannot_omit_a_witness(self): + altered = copy.deepcopy(self.pins) + altered["execution_inputs"].pop() + self.write_json(self.here / "SOURCES.json", altered) + with self.assertRaisesRegex(ValueError, "execution closure changed"): + self.verify.sources() + + def test_rehashed_gate_corruption_still_fails_mathematics(self): + word = json.loads(gzip.decompress((self.root / self.verify.WORD).read_bytes())) + for frame, _, _, _, _, name in self.blocks.SPECS: + with self.subTest(frame=frame): + path = self.root / name + original = path.read_bytes() + altered = json.loads(original) + if frame == 507: + altered["replacement"][0].reverse() + else: + gates = (altered["gates"] if frame == 508 else + altered["factors"][0]["program"] if frame == 519 else + altered["candidate_gates"]) + gate = gates[0] + gate[1], gate[2][0] = gate[2][0], gate[1] + pins = copy.deepcopy(self.pins) + try: + self.write_json(path, altered) + pins["files"][name]["sha256"] = self.verify.sha(path.read_bytes()) + self.write_json(self.here / "SOURCES.json", pins) + self.verify.sources() + witnesses = self.blocks.load_blocks(self.root) + with self.assertRaisesRegex(ValueError, "local integer map differs"): + self.blocks.verify_blocks(word, witnesses) + finally: + path.write_bytes(original) + self.write_json(self.here / "SOURCES.json", self.pins) + + def test_unscoped_combined_gate_change_is_rejected(self): + word = json.loads(gzip.decompress((self.root / self.verify.WORD).read_bytes())) + witnesses = self.blocks.load_blocks(self.root) + combined = self.verify.build(word, witnesses, 15) + # Touch an unchanged gate before the earliest replacement slice. + combined["B"][0][0] += 1 + with self.assertRaisesRegex(ValueError, "candidate B differs from independent composition"): + self.blocks.verify_blocks(word, witnesses, combined["B"]) + + +if __name__ == "__main__": + unittest.main(verbosity=2) diff --git a/research/r439-four-block-composition/verify.py b/research/r439-four-block-composition/verify.py new file mode 100644 index 0000000000..ebfbae12ce --- /dev/null +++ b/research/r439-four-block-composition/verify.py @@ -0,0 +1,233 @@ +#!/usr/bin/env python3 +"""Compose four reviewed R439 blocks and replay all 16 subsets. No new kappa. + +Prepared for woklerx with substantial OpenAI Codex assistance. Apache-2.0. +Uses the pinned PR880 record interpreter and PR589 interface checker; +check_blocks.py independently verifies the local and combined block maps. +""" +import argparse +import copy +import gzip +import hashlib +import importlib.util +import json +from pathlib import Path +import struct +import subprocess +import sys +import tempfile + +sys.dont_write_bytecode = True +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +BASE = "407d52ff15b2217b6e22bce44728b4c3907b6515" +WORD = "research/e8-bit-p111-tuned/tune/bitE8mut-p111-tuned.json.gz" +AUDITOR = "research/e8-bit-p111-tuned/code/xcheck_p.py" +EXPORTER = "research/e8-bit-carrier-skeleton/code/bit/export_records.py" +HELPERS = "research/r439-block1-schedule/verify.py" +CANDIDATES = [ + "research/r439-block1-schedule/CANDIDATE.json", + "research/r439-block508-schedule/CERTIFICATE.json", + "research/r439-frame519-seed02/CANDIDATE.json", + "research/r439-frame524-seed13/CANDIDATE.json"] +EXECUTION_INPUTS = [WORD, AUDITOR, EXPORTER, HELPERS, *CANDIDATES] +FRAMES = [507, 508, 519, 524] +SAVINGS = {507: 5, 508: 7, 519: 10, 524: 14} + + +def need(ok, message): + if not ok: + raise ValueError(message) + + +def canonical(value): + return json.dumps(value, sort_keys=True, separators=(",", ":")).encode() + + +def sha(data): + return hashlib.sha256(data).hexdigest() + + +def module(path, name): + spec = importlib.util.spec_from_file_location(name, path) + loaded = importlib.util.module_from_spec(spec) + spec.loader.exec_module(loaded) + return loaded + + +def sources(): + pins = json.loads((HERE / "SOURCES.json").read_text(encoding="utf-8")) + need(pins["base_commit"] == BASE, "wrong base commit") + need(pins["execution_inputs"] == EXECUTION_INPUTS, "execution closure changed") + for name in pins["execution_inputs"] + pins["native_inputs"]: + need(sha((ROOT / name).read_bytes()) == pins["files"][name]["sha256"], + "source hash mismatch: " + name) + return pins + + +def build(base, blocks, mask): + need(type(mask) is int and 0 <= mask < 16, "invalid subset mask") + need(sorted(b["frame"] for b in blocks) == FRAMES, "wrong four-block inventory") + active = [b for b in blocks if mask & (1 << FRAMES.index(b["frame"]))] + by_position = sorted(active, key=lambda b: b["start"]) + need(all(a["stop"] <= b["start"] for a, b in zip(by_position, by_position[1:])), + "overlapping source slices") + out = copy.deepcopy(base) + # Original indices remain valid when replaced from right to left. + for b in reversed(by_position): + old = base["B"][b["start"]:b["stop"]] + need(old and all(g[0] == b["frame"] for g in old), "wrong splice location") + out["B"][b["start"]:b["stop"]] = copy.deepcopy(b["gates"]) + out["C"] = [[1, d, list(ss)] for _, d, ss in reversed(out["A"] + out["B"]) + if not 111 <= d < 222] + return out + + +def reject(label, fn, exceptions): + try: + fn() + except exceptions: + return label + raise ValueError("negative control accepted: " + label) + + +def audit_subset(word, base, helper, auditor, geometry, selected): + need(helper.paths(word) == helper.paths(base), "frame paths changed") + need(word["C"] == helper.cleanup(word), "nonliteral cleanup") + for key in base: + if key not in ("B", "C"): + need(word[key] == base[key], "unscoped word change: " + key) + result = helper.audit(word, auditor, geometry) + need(result["columns"] == 661, "incomplete dirty-column coverage") + return result + + +def export(word, destination, helper): + word_path = destination.with_suffix(".json") + word_path.write_text(json.dumps(word, separators=(",", ":")) + "\n", encoding="utf-8", newline="\n") + result = subprocess.run([sys.executable, "-I", "-B", str(ROOT / EXPORTER), + str(word_path), str(destination)], + capture_output=True, text=True, encoding="utf-8") + need(result.returncode == 0, "export failed: " + result.stdout + result.stderr) + return helper.records_check(destination, word) + + +def run(output, write_certificate): + sources() + independent = module(HERE / "check_blocks.py", "composition_blocks") + helper = module(ROOT / HELPERS, "pinned_pr880_helpers") + auditor = module(ROOT / AUDITOR, "pinned_pr589_auditor") + base = json.loads(gzip.decompress((ROOT / WORD).read_bytes())) + blocks = independent.load_blocks(ROOT) + combined = build(base, blocks, 15) + block_report = independent.verify_blocks(base, blocks, candidate_b=combined["B"]) + geometry, labels, baseline, h, c, _ = auditor.check(base) + need(all(h.values()) and all(c.values()), "baseline H1-H5/interface failure") + receipts = [] + for mask in range(16): + active = [f for i, f in enumerate(FRAMES) if mask & (1 << i)] + word = build(base, blocks, mask) + audited = audit_subset(word, base, helper, auditor, geometry, active) + name = "original" if mask == 0 else "replacement" if mask == 15 else f"subset-{mask:02d}" + invoice = export(word, output / name, helper) + expected = 24305 - 2 * sum(SAVINGS[f] for f in active) + need(invoice["adds"] == expected, "incorrect complete ADD count") + if receipts: + original = receipts[0]["native_records"] + for key in ("moves", "copies", "erasures", "paid_histogram", "rank_mass"): + need(invoice[key] == original[key], "paid charge changed: " + key) + need(all(a <= b for a, b in zip(invoice["positive_prefix"], original["positive_prefix"])), + "complete positive prefix exceeds baseline") + need(invoice["rank_mass"] == 5129 and invoice["copies"] == invoice["erasures"] == 9, + "incorrect paid profile or copy lifecycle") + receipts.append({"mask": mask, "frames": active, "columns": audited["columns"], + "native_records": invoice, "word_sha256": sha(canonical(word))}) + print(f"subset={mask:02d} frames={active} adds={invoice['adds']} prefix={invoice['positive_prefix']}", + flush=True) + + # Every cover relation of the subset cube must retain the exact saving and + # improve (or preserve) the measured complete positive bound. + cover_edges = 0 + for mask in range(16): + for i, frame in enumerate(FRAMES): + if mask & (1 << i): + continue + before = receipts[mask]["native_records"] + after = receipts[mask | (1 << i)]["native_records"] + need(before["adds"] - after["adds"] == 2 * SAVINGS[frame], "nonadditive saving") + need(all(a <= b for a, b in zip(after["positive_prefix"], before["positive_prefix"])), + "subset cover increases prefix") + cover_edges += 1 + need(cover_edges == 32, "incomplete subset-cover coverage") + + exceptions = (ValueError, helper.Reject, auditor.Reject) + controls = [] + wrong = copy.deepcopy(combined) + wrong["C"] = copy.deepcopy(base["C"]) + # The old inverse still restores the Boolean endpoint; the interface + # deliberately demands the newly charged literal inverse. + controls.append(reject("stale baseline cleanup", lambda: audit_subset( + wrong, base, helper, auditor, geometry, FRAMES), exceptions)) + for frame in FRAMES: + wrong = copy.deepcopy(combined) + index = next(i for i, g in enumerate(wrong["B"]) if g[0] == frame) + wrong["B"].pop(index) + wrong["C"] = helper.cleanup(wrong) + controls.append(reject(f"drop frame {frame} gate and rebuild cleanup", lambda: helper.audit( + wrong, auditor, geometry), exceptions)) + wrong = copy.deepcopy(blocks) + wrong[0]["start"] += 1 + controls.append(reject("shifted splice source", lambda: independent.verify_blocks(base, wrong), exceptions)) + wrong = copy.deepcopy(combined) + wrong["D"][0][2].pop() + controls.append(reject("missing dirty compensation", lambda: helper.audit( + wrong, auditor, geometry), exceptions)) + wrong = copy.deepcopy(combined) + index = next(i for i, g in enumerate(wrong["B"]) if g[0] == 507) + wrong["B"][index][0] = 0 + controls.append(reject("illegal frame after composition", lambda: helper.audit( + wrong, auditor, geometry), exceptions)) + path = output / "replacement" / "249-records.bin" + raw = path.read_bytes() + entries = list(struct.iter_unpack("<6i", raw)) + i = next(i for i, r in enumerate(entries) if r[0] == 1 and r[5] == 4 and r[4] == 507) + try: + path.write_bytes(raw[:24*i] + raw[24*(i+1):]) + controls.append(reject("drop literal exported ADD", lambda: helper.records_check( + path.parent, combined), exceptions)) + finally: + path.write_bytes(raw) + + report = {"status": "PASS_R439_FOUR_BLOCK_COMPOSITION", "base_commit": BASE, + "assignment_seed": 1, "frames": FRAMES, "subsets": receipts, + "subset_cover_edges": cover_edges, "block_maps": block_report, + "native_records": {"original": receipts[0]["native_records"], + "replacement": receipts[15]["native_records"]}, + "controls_rejected": controls, "columns_per_word": 661, + "reconstructed_word_sha256": receipts[15]["word_sha256"], + "kappa_claim": "none; unchanged recursive profile; hosted adoption remains open"} + target = HERE / "CERTIFICATE.json" + if write_certificate: + target.write_text(json.dumps(report, indent=2, sort_keys=True) + "\n", encoding="utf-8", newline="\n") + else: + need(canonical(report) == canonical(json.loads(target.read_text(encoding="utf-8"))), + "certificate mismatch") + print(f"PASS_R439_FOUR_BLOCK_COMPOSITION subsets=16 cover_edges=32 adds=24305->24233 columns=661 controls={len(controls)}") + return report + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--output", type=Path, help="fresh output directory (existing destinations refused)") + parser.add_argument("--write-certificate", action="store_true") + args = parser.parse_args() + if args.output: + args.output.mkdir(parents=True, exist_ok=False) + run(args.output.resolve(), args.write_certificate) + else: + with tempfile.TemporaryDirectory(prefix="r439-composition-") as tmp: + run(Path(tmp), args.write_certificate) + + +if __name__ == "__main__": + main()