diff --git a/research/gf2-full-network/CODE-SOURCES.json b/research/gf2-full-network/CODE-SOURCES.json new file mode 100644 index 0000000000..cacb2a0c7d --- /dev/null +++ b/research/gf2-full-network/CODE-SOURCES.json @@ -0,0 +1,143 @@ +{ + "coverage": "Every current immutable package file, including README/TASK, all executable source, all 42 immutable ancestor inputs, measured full driver/anchor/guard, fixed SOURCES/VERIFY metadata, all canonical transport and all eight original run records. Byte identity permits Git 0644 and readonly 0444 modes; measured source modes remain checked before/after each run.", + "evidence_binding": "Canonical payload logical hashes bind to immutable anchor; transport manifest retains archive-container hashes. Original performance receipts, profile failure and local-input-index stop are immutable historical evidence, not reused PASS inputs. CODE authentication is additional packaging/transport cost and is not part of a bare-CLI performance claim.", + "excluded_mutable": [ + "CODE-SOURCES.json", + "VALIDATION.json", + "PUBLICATION-STATUS.json" + ], + "exclusion_reasons": { + "CODE-SOURCES.json": "Self-referential manifest; authenticate its exact bytes through committed package identity.", + "PUBLICATION-STATUS.json": "Reserved optional parent-owned publication/hosted-CI status; absent at freeze and never a scientific PASS substitute.", + "VALIDATION.json": "Parent-owned fresh publication-check status; never a scientific PASS substitute." + }, + "file_count": 117, + "files": { + "README.md": "654841654eb8f88c6ad80f5cebb424548a8c2236f237869434e03d6a83eeaa64", + "SOURCE-PINS.json": "88bba3caf5975f30fa7abceaea9454110cf3b069233e8241a2ca13d1dff171a7", + "SOURCES.json": "ef4ceeef85aaa99a8c859e227ce2f75b1c421571e7e8ac235096ba49d375231a", + "TASK.json": "ad8f73482b2c4b9361f8989326715a943d4981fce21d6871bd4f2f8fc6fc4b38", + "VERIFY.json": "3c003082b10da57a213694de649e9097c79bf0dbfe9197c2bd11a8ffecb8cd78", + "anchor.json": "bbe53360088e1d7183a9801d3954bd723f580cb283d2f8dd0bb7a54ebb80c298", + "archive_support.py": "825093689fea974ec5cb88a133d73715b9f2d50da60a53a4efabeecc92bff63f", + "check_artifacts.py": "115d36662856ded048d3a57210b4cbe4a8091375e79d5fcac2856d5d0cfe234f", + "engine/compare_side_verifier.py": "6e507bb0c7e00d090a60289fddb6c55e90c946d0850c42c3c5e3e15c27604a68", + "engine/finite_controls.py": "df989a831aac43cc1af95169dad8c64a7548760e6e1f96976da996703f2c8f7a", + "engine/native_backend.py": "e473c38245c3668715b5a78dfe980b2fe3ed0d0c9b8c97c666fbae6ecf1fffd5", + "engine/native_gf2.c": "e9c3c9194a08718bd1575c1cf08c6c6772d3b644c2e274c25a84a1f9249d06cc", + "engine/profile_side_verifier.py": "9c994378171c20a91539418d93cb8387e1daa93465d6862beefea90e12999c2a", + "engine/source/complex_circuit.py": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1", + "engine/source/complex_network.py": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b", + "evidence/COMPLETE-GATE.json": "7754b29600bede1e0fe553b1cac324e7934c9fddf37988295758b33c1def094b", + "evidence/ENVIRONMENT.json": "4918c9ec4329426934e9ede063443449bf506f6adeb47bcef2dc07df279db384", + "evidence/FIRST-PAIR-GATE.json": "72b996e102a16f0c9188d761ba2e7d67e7dc1c049c49eee419f2aede5d1fc9bc", + "evidence/FULL-PAIR-ADMISSION.json": "03f45f5805095357143a9650c8c1c87e549e0635e388c7f1ed5f5315a4606829", + "evidence/INDEPENDENT-REVIEW.md": "ea6afa3a610379d1a499513ed772afceb502883ede31c05a2da1ac7d50562b2f", + "evidence/INPUT-COMMIT.json": "895c4ab09ce14b12d3fa658d6be3fd3ea561117d22ec07b106dd78832131428b", + "evidence/LOCAL-INPUT-INDEX-STOP.json": "49a246a34440f29c31844dabaf8429237c14efcfdecf8786e6585a75573099aa", + "evidence/PLAN.json": "0eca7918e548fc080a9d773ac8c5d416d422fb9b4bc46e2c42bd802e218da813", + "evidence/PROFILE-v1-FAILURE.json": "399f182d37f0fae525c5eacc58e3c6cf96a370647cbeed693a46b80aafa8127f", + "evidence/RESULTS.md": "b4e339d46da3639b028579134b52c5e2fc5b38a838a05317cc20e3b4bacb094f", + "evidence/SOURCE-DESIGN.md": "609a4c6aee119ddaed9f10dc2726ece18436179ad9caaced70cebaa58066f8eb", + "evidence/UPSTREAM-REFRESH.json": "43983db67b72244c58b30780086846fa771525ee6e5c70b9187605a365d4b693", + "evidence/canonical/MANIFEST.json": "297e157fd2bac8f801cba6b7491368cf7dd49bae2df59483161e084a1b5fae8c", + "evidence/canonical/complement-transcript.json": "36ef2bbc469c1e701bfc06b0d240aa31575f82132e8d204f0fa2e1802b21fea8", + "evidence/canonical/complex-network.json": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f", + "evidence/canonical/full-return.lossless.json.gz": "2ccdc80933fe4b3d774cf71ad2877864aca64e7de48b62c6391f449f2d2a67c2", + "evidence/canonical/original-stdout.txt": "8f77b724810ec05fb19b35d75d8002d31a6e22ed342a36ee28a5caef8d643015", + "evidence/canonical/rank-trace.json.gz": "20e76cd894807cf84ca740312fdc2a73d1d70740e2f0c5ec55b3d0afdd9311fa", + "evidence/canonical/witness.json.gz": "8e1b8b03320d5e077c0414c3644396faf182bdfa1a72d8067c8fea8a33dbf5d0", + "evidence/publication-v1-failure/REVISION.json": "d62dc4890189a23c56920bf83f33ce54568489cd5595a6ee51805179222cb5b8", + "evidence/publication-v1-failure/receipt.json": "92765dc5ef0d28bc8830fdd1ce6388a38dd9986a7d29ebf2bd9a362d231d2b4a", + "evidence/publication-v1-failure/stderr.txt": "9cc43b411c844bdc69171311f26efbba2d063c20cc5f1ece45f465f92ece9515", + "evidence/publication-v1-failure/stdout.txt": "3a5034b4208e91f156d7658387ea85eb1d0ad98fa283c0e3185e41bf0e4c7342", + "evidence/publication-v1-failure/usage.json": "3f6041fd2731e9551108507c3ca417e521ffb6ab50c4ac5e5489474311e0d7bc", + "evidence/publication-v1-failure/verify_full.py.txt": "427968bde006b0ce605547483433ab1f178be9531ffa9136b8e35245a6dd979e", + "evidence/runs/full-network-B1/receipt.json": "5d99810564df133b6dc181eee9eb5c5221f1116df2776e956d87d864858a5d27", + "evidence/runs/full-network-B1/scientific-receipt.json": "d15bbc1abf12e04badc6a43fbc95a09495554e17241f3849118d1a1e04e9dd31", + "evidence/runs/full-network-B1/stderr.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "evidence/runs/full-network-B1/stdout.txt": "0f6e7069212f9ee752d4123475fde0ca526fc9c41d68bf952022e7cd41612f43", + "evidence/runs/full-network-B1/usage.json": "094d04029c545f0600ad31fabdde4dc28064182c73492203450602cb0dbb0505", + "evidence/runs/full-network-B2/receipt.json": "525d68ac1dbc164c68ae0b2d5064eb1fa44de475f990550b3412d3fa78bc3e3d", + "evidence/runs/full-network-B2/scientific-receipt.json": "78981f93ef8e47517f46e0ce97045846807baf7329f6a488c536c5a64ace9ac7", + "evidence/runs/full-network-B2/stderr.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "evidence/runs/full-network-B2/stdout.txt": "8f7a10dda0295c3d396017a48eeadd0319a160fe1e4d6993df82426b197c5a2d", + "evidence/runs/full-network-B2/usage.json": "ea4d1f8d0d8a09fa3aef146f15481db589c19d43ce5c56ce03e295f6b28cd891", + "evidence/runs/full-network-B3/receipt.json": "6b8eae21187c05dc00a6665b6831bc7ebe3451d2c5f57dc171435c9276c95506", + "evidence/runs/full-network-B3/scientific-receipt.json": "0c7916eb347d9702d19bfe22e192ab3b19d165dfd8221df59e1a40b69eee7495", + "evidence/runs/full-network-B3/stderr.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "evidence/runs/full-network-B3/stdout.txt": "61a94286b63bbfb14e6dca09aed4b5c0d1ecb3deb146ce3bf15b6a7ff44a74fe", + "evidence/runs/full-network-B3/usage.json": "e7372d8ce6add9c3bec1f86aa0779af62e278e2ed1e5074377658010f4dcbfc8", + "evidence/runs/full-network-C1/receipt.json": "e49cc524d24b158d3d42e61ace73696b23b063b1cbda0f957b19a7b9d8cce934", + "evidence/runs/full-network-C1/scientific-finite-controls.json": "7571beca3195287602b694654354560ddf0a885840e819217b8392fddb341342", + "evidence/runs/full-network-C1/scientific-receipt.json": "f477afec2b289b560cdd6583ec53428d27a62aa541f3c781671e7ffbcf4c91e8", + "evidence/runs/full-network-C1/stderr.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "evidence/runs/full-network-C1/stdout.txt": "6707c1cb48a8836730dac7da627201e50ce69ae0e6d77be9dddc6e531a3c22dd", + "evidence/runs/full-network-C1/usage.json": "1315deb855cfc8733bc6142062022a456da2f164ce32085773e9d2d9e6552a84", + "evidence/runs/full-network-C2/receipt.json": "f19ca9455e0a5032293917518187be3e90d8cf664be0a0a94cdb8bda70fa7e73", + "evidence/runs/full-network-C2/scientific-finite-controls.json": "32e9152e923672843de3176f6d0e29a3506fe62ed5ffbc5f5a75f2fa71e25969", + "evidence/runs/full-network-C2/scientific-receipt.json": "3e196c680f0fd0169804da7c8215bc4ff03d231e7af08ee35c76005bc4b8822c", + "evidence/runs/full-network-C2/stderr.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "evidence/runs/full-network-C2/stdout.txt": "1bef720cc7a18ef23b9c9336ebcea0fc327ce72b8ab8ad1fd94b5dfde51bcc7c", + "evidence/runs/full-network-C2/usage.json": "fc7436309d37516f21ba5838e88b1ba6025c060e22b1012ae5b05cfbcd238886", + "evidence/runs/full-network-C3/receipt.json": "e8423e8bd005321fb1e5b806f639814c1ef54e8caa0e3cc98b8ba6d4f3ac32ce", + "evidence/runs/full-network-C3/scientific-finite-controls.json": "307191c8c2c7fc026b0b11b1c204a5d597876fc1e6b4752427f81795c041e237", + "evidence/runs/full-network-C3/scientific-receipt.json": "81ba879f026ee8ed0be4c4be1bbddd4043771fcb2c0617bf392c922253be29eb", + "evidence/runs/full-network-C3/stderr.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "evidence/runs/full-network-C3/stdout.txt": "847d85da1c1e4660bb9b76c4a266c828c51f5d61820ff93f81a27d3496a842b0", + "evidence/runs/full-network-C3/usage.json": "4a0c22609a9850a10f473e43e8b28bde3ba486f47943c6373636cdf321bac3fb", + "evidence/runs/full-network-profile-v1/receipt.json": "b44f2319460c2f3de5a802fe611b79d6ea914197eaec5232fa85c48e7e30a65c", + "evidence/runs/full-network-profile-v1/stderr.txt": "d4a8ee4b536eefd9269d82bf2d3821971a2f9e3bac20c6a720249eaf11746b76", + "evidence/runs/full-network-profile-v1/stdout.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "evidence/runs/full-network-profile-v1/usage.json": "66b32a9d199a7045d9bb74d68a195b2456510e22e554e9f13786500152212e78", + "evidence/runs/full-network-profile-v2/receipt.json": "6884b826de535b6ddefa0b7304cec41cfd4ff1c3cfef42930cb18c34d69226cf", + "evidence/runs/full-network-profile-v2/scientific-receipt.json": "bc3fda46c74b84d0634f65e1a1e3a4a4fb8295dd7d058520b5e30b39d2d05d8a", + "evidence/runs/full-network-profile-v2/stderr.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "evidence/runs/full-network-profile-v2/stdout.txt": "33c1a3007fd8c27abbfe2f7cbbda2afc0d9c81a5b1285c899d67b1c2fe2b0dec", + "evidence/runs/full-network-profile-v2/usage.json": "c1eb62c1868fc3583c60c953d547ec3b29bc30dcc811cc9d132364aef6c0c15b", + "frozen/scripts/audit_short_guards.py": "c2c929c956e617bee739963b517b9069e0d067cfebc6820f401a4e90a1769eb1", + "frozen/scripts/certify.py": "2348d95008276c5d5764f7e028c3918e484582cd589bd4d9b82919161745e53e", + "frozen/scripts/compact_control_layer.py": "e814c9f8d84f2e5d3aa2e06c36697f27f110218addc40ff8df2801fde861ff9f", + "frozen/scripts/complex_circuit.py": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1", + "frozen/scripts/complex_network.py": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b", + "frozen/scripts/exclusion_circuit.py": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3", + "frozen/scripts/paired_exclusion_circuit.py": "8f05f04cf06217befd6d0ee0f2d7d0c5c5eb32cfab8c9a8ca7917fd6d620b7d2", + "frozen/scripts/paired_network.py": "991223dc3c1374284c361ed017e42bf732dd971fa0bea2be2282cfb18257b3f7", + "frozen/scripts/prepare_layers.py": "a6e2adc612f264b1c0e51d18ce6315de9ae5e2ae2420aa22e99a22d8bf304947", + "frozen/scripts/search_network.py": "3a4faa5037d9b8e7ca5828afac193a96b6966a8b114f14937921795b24ec4f6a", + "frozen/scripts/shared_point_circuit.py": "360d9bffc0f55315fe294789b72c71c79e0991524555b3a5f42a2ca504d7da95", + "frozen/scripts/shared_point_network.py": "a85e7f0d8c42d6a27e3846308571ca324a1824ac5c2d59e4daa5c7673c33c697", + "frozen/upstream/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "frozen/upstream/README.md": "8d1ceff898a4e0e681679f91c4def485820be9e99f04e4861f2ce601a364723e", + "frozen/upstream/build/figures/multiplication-flow.tex": "3654d2728b0c98919d61760e1802804ed616546a747f9167a93e17bb8697f320", + "frozen/upstream/build/figures/proof-map.tex": "76d4deacf07bea355412abcfd798c7cbe6dcccef29a4a420a9e2a7b158f23848", + "frozen/upstream/build/main.tex": "42f0f506976bc2084374a71e97edc1549689a7accf35dda4db2a18af4f13c1aa", + "frozen/upstream/build/references.bib": "33cc2df13ccf85330849e8fb34d4ac7613b23f625787457a5b7b9aa6d7369476", + "frozen/upstream/build/sections/00-introduction.tex": "98721f03682ccf1cc7d0850b07adabaa2d8f3afe552e3861753eba9d284d0da0", + "frozen/upstream/build/sections/01-history.tex": "798956c8150c31e3e2f5f29c47110d25ce619faad1374f4d3a0f15fa3ee33ead", + "frozen/upstream/build/sections/02-streams.tex": "606c80db61cad13aa0c3b6060dc4b88dbbe7ac60cdd831aa93f28d908fd09dab", + "frozen/upstream/build/sections/03-motifs.tex": "ed76761194988a01af77ead0ea6469cb5dcd29690ab985a0b5a4006b0f2b69bb", + "frozen/upstream/build/sections/04-swap.tex": "412b170ccaab38dba96e95e3cbfae09f4876a9818f8d278776a746b0f8044906", + "frozen/upstream/build/sections/05-layers.tex": "20cfc8d12099d4e4ed9e3e7eeb6162edd9b6e0e076f24693364cd24377252594", + "frozen/upstream/build/sections/06-transforms.tex": "924316e4bc905066281d8f9e8746a49d8829aeb393688608deb1e61c3c87853c", + "frozen/upstream/build/sections/07-resampling.tex": "8a6b91670f9163afb54892489fa2210c77fe1b058f0325ec7d18b44b94be6e2c", + "frozen/upstream/build/sections/08-assembly.tex": "763d7945b1e1ec4ebae9b799bcefcc45fa9bae6e2ffad799868a9c3d513dbd4a", + "frozen/upstream/build/sections/09-exact-arithmetic.tex": "5714e5d0656c78c6a1fde8d01fd11f1ba856a7ea94149b283bd9a50fdbf516c3", + "frozen/upstream/build/sections/10-transposition.tex": "c14ad8d56112f6578678a58211bc8d63c3a4b60e55078ac73bc38f7348e713cb", + "frozen/upstream/build/sections/11-grouped-rectangles.tex": "6525cd0a01980e56accfeaf06e9d875bc699197ba42c6e22b69435e352275174", + "frozen/upstream/formalization.yaml": "2dcbd0d6e6a22475f53d49bfdfcac9b6d2b470653c332a9f56522f5be166edb9", + "frozen/upstream/manifest.json": "16ab13971694cabab09440c47ebf2fc0496a9d35fc3af33950fda3498f8e2392", + "full_B.py": "4ab2f554c1323a26bc2ffd11a4e692e21382a269b5fdb117d226ef76f34578d8", + "full_C.py": "1ba8e7b76077d8d108039ab238d73c59e25929f1abcb5b9fde5944d5f978ebf4", + "full_driver.py": "0d976d2eb6b845f20d4a3396591a806f966688b88693cd6a5f8a0c9e48925e36", + "guard.py": "7540f8cc4ae4d12ed86c844ef0837a74184d3ada653979608c295c09f200a751", + "reference/certificates/complex-network.json": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f", + "reference/certificates/selected-result.json": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5", + "replay.py": "5f8dd1deb7ebc9634b220ed533cad534862892ee59a01803195f34296c740d90", + "verify.py": "04c37b6e3dc50bfb3b954672f4f2e04f354a084ff465f3df09f59736c7eac01b", + "verify_full.py": "c65351d258bac75ae661298a351861452c81f990dd82768da819c1910cba8cd8" + }, + "files_canonical_json_sha256": "5e1e6b744a89400582c92c23f176fdab2eaa5af539cb562e92d285b77d4d6b24", + "schema_version": 1, + "total_file_bytes": 17870583 +} diff --git a/research/gf2-full-network/README.md b/research/gf2-full-network/README.md new file mode 100644 index 0000000000..e3ce6e1379 --- /dev/null +++ b/research/gf2-full-network/README.md @@ -0,0 +1,59 @@ +# Complete frozen H25 qualification with native GF(2) + +The fixed six-run comparison reduced median wall time **27.84%**, from **39.686181760 to 28.636256246 seconds**, and median CPU **28.09%**, from **39.58 to 28.46 seconds**. Both reductions pass the predeclared 15% and within-arm-spread gates. This measures the complete frozen historical `complex_network.py` H25 CLI **with retained exact observations**, including cold source copies, custody checks, imports and serialization. Every candidate additionally pays compilation/link/load and all unchanged independent finite controls. + +This is not a bare-CLI performance factor, a current selected-frontier replay, a new mathematical construction or κ, or a gain on the separate unresolved PR5864 objective. Hosted correctness checks do not reproduce the local performance factor. + +## Complete caller and exact retained outputs + +The caller remains byte-identical to canonical main `19fdb086ea96af9a9f87936a2b888e10af4ed810`. It executes its original side-map, label and role checks, network counts, logarithm enclosure, saving comparison, parameters, guard/recurrence/constraint/margin checks, dyadic/ceiling checks, real upstream source verification and gate bound. The actual CLI writes its original certificate and prints both original lines. No source-verifier stub or stored PASS substitutes for execution. + +The 32-file closure includes twelve scientific scripts, the upstream manifest and its nineteen payloads. The pinned manuscript commit is `adc7f1241b42e322a6451854ab7e4b4c146bf78a`. The seven native-engine files are unchanged from the historical PR5929 side verification work. The full driver checks source bytes, import identities, runtime bindings, before/after modes and the exact output-file set. Original full-call assertions remain enabled. + +All six runs matched the entire certificate, stdout, typed full return, ordered side witness, rank transcript and complement receipt. The typed representation retains exact Fraction pairs, primitive/container type distinctions and dictionary order. It contains no replacement approximate arithmetic. Observations cover **59,959 rank calls, 252 distinct matrices and 238,685 ordered complement calls**. The canonical complement-stream digest represents 55,839,507 observed bytes; the stored complement artifact is its complete receipt, not the stream itself. + +## Fixed experiment and failures + +| Sample, in executed order | Wall seconds | CPU seconds | +|---|---:|---:| +| B1 | 42.103671320 | 41.64 | +| C1 | 28.636256246 | 28.46 | +| C2 | 28.595429725 | 28.44 | +| B2 | 39.355439922 | 39.28 | +| B3 | 39.686181760 | 39.58 | +| C3 | 33.129227289 | 31.92 | + +The slower C3 is retained. Median savings of 11.049925514 wall seconds and 11.12 CPU seconds exceed maximum within-arm spreads of 4.533797564 and 3.48 seconds. See [COMPLETE-GATE.json](evidence/COMPLETE-GATE.json) and the complete [run receipts](evidence/runs/). + +Profile v1 failed during import because its entry filename shadowed the standard-library `profile` module. Its error is preserved. A separate entry-name repair left the scientific driver unchanged; profile v2 established the anchor and is excluded from sample selection. There were no benchmark rerolls or automatic retries. Eight original guarded commands, including those two profile attempts, cost about 253.41 seconds under the unchanged serial 180-second/1-GiB policy. Coarse phase measurements are nested diagnostics and must not be added as independent savings. + +The local bad-input checkpoint `bb01abd…` is retained only as failed preparation evidence. The actual publication input ancestor is **`7f9c2985de167e95d159040eee26fc03c1e27fb6`**, containing exactly 42 added inputs. No source pin requires unmerged PR5929 history. + +## Portable checks and replay + +Use Linux CPython 3.12 with existing `cc` and Python headers. The unchanged guard additionally uses `/usr/bin/python3.12` and GNU `/usr/bin/time`. No package installation is requested. + +```sh +python3.12 -B research/gf2-full-network/verify.py +python3.12 -B -O research/gf2-full-network/verify.py +python3.12 -B research/gf2-full-network/verify_full.py +python3.12 -B research/gf2-full-network/check_artifacts.py +``` + +The first two commands execute the unchanged finite dense-oracle, exact-order/type/width/iterator, fallback and runtime-binding controls, using a fresh external build. Failed evidence is retained at its reported path. Optimization is deliberate only for finite controls. `verify_full.py` performs one complete candidate correctness run with original assertions, an inner 150-second guard and a 180-second registered timeout; it never reports a hosted speed factor or adds a benchmark sample. Source/engine inputs remain read-only; only new external runtime directories are writable. `CODE-SOURCES.json` authenticates executable wrappers and frozen inputs before work. Dynamic publication status and evidence metadata are separately declared. + +Canonical transport comprises six payloads with **60,831,231 logical bytes**. The checker streams the large witness and rank files, authenticates their complete decompressed bytes against the immutable anchor, checks typed-return structure, and checks the literal reference certificate/stdout and complement receipt. Compressed transport hashes preserve archive identity; regenerated compression is not mathematical identity. See [canonical manifest](evidence/canonical/MANIFEST.json) and [VALIDATION.json](VALIDATION.json) for current check status. + +The reported six samples measure `full_driver.py` under the frozen parent guard. Publication wrappers additionally authenticate the archived evidence; their correctness replays are separate checks and do not replace those samples or establish a new wrapper performance factor. + +For an explicitly requested new complete replay, use `replay.py B|C NEW_EXTERNAL_DIRECTORY`. It serializes calls for this package, runs the unchanged guard with a 180-second limit and 1-GiB sampled group RSS cap, retains failure evidence and never retries. New timing receipts do not replace the fixed experiment. + +## Open next questions + +The scoped full historical caller evaluation is complete. Broader caller integration or another interpreter/runtime requires its own source-bound full contract and paid checks before any performance transfer. No additional parameter search, mathematical construction or timing reroll is authorized by this package. Structured scope and blockers are in [TASK.json](TASK.json). + +## Credit and limits + +Chris R / Clear1nsight with substantial OpenAI Codex and user-requested Astra xhigh assistance; separate agents performed source design and independent static review, with one parent owning all serial scientific execution. Author self-checks are not independent review or human/kernel acceptance. Preserve [PR5929](https://github.com/CrocSwap/integer-mult-bounds/pull/5929), the original CrocSwap/P104 authors and source-specific notices. Packed GF(2) elimination is a standard technique, not a novelty claim. Original upstream license/README are retained under `frozen/upstream/`. + +The unchanged engine supports its exact 64-bit domain and original fallback behavior with stable source, builtins and dispatch. This is not abi3, free-threaded/subinterpreter support, a general C-memory-safety proof or formal verification of the multiplication theorem. Historical certificate status and inherited assumptions remain intact. diff --git a/research/gf2-full-network/SOURCE-PINS.json b/research/gf2-full-network/SOURCE-PINS.json new file mode 100644 index 0000000000..6c0c5746fb --- /dev/null +++ b/research/gf2-full-network/SOURCE-PINS.json @@ -0,0 +1,130 @@ +{ + "scripts/audit_short_guards.py": [ + "c2c929c956e617bee739963b517b9069e0d067cfebc6820f401a4e90a1769eb1", + 436 + ], + "scripts/certify.py": [ + "2348d95008276c5d5764f7e028c3918e484582cd589bd4d9b82919161745e53e", + 436 + ], + "scripts/compact_control_layer.py": [ + "e814c9f8d84f2e5d3aa2e06c36697f27f110218addc40ff8df2801fde861ff9f", + 436 + ], + "scripts/complex_circuit.py": [ + "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1", + 436 + ], + "scripts/complex_network.py": [ + "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b", + 436 + ], + "scripts/exclusion_circuit.py": [ + "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3", + 436 + ], + "scripts/paired_exclusion_circuit.py": [ + "8f05f04cf06217befd6d0ee0f2d7d0c5c5eb32cfab8c9a8ca7917fd6d620b7d2", + 436 + ], + "scripts/paired_network.py": [ + "991223dc3c1374284c361ed017e42bf732dd971fa0bea2be2282cfb18257b3f7", + 436 + ], + "scripts/prepare_layers.py": [ + "a6e2adc612f264b1c0e51d18ce6315de9ae5e2ae2420aa22e99a22d8bf304947", + 436 + ], + "scripts/search_network.py": [ + "3a4faa5037d9b8e7ca5828afac193a96b6966a8b114f14937921795b24ec4f6a", + 436 + ], + "scripts/shared_point_circuit.py": [ + "360d9bffc0f55315fe294789b72c71c79e0991524555b3a5f42a2ca504d7da95", + 436 + ], + "scripts/shared_point_network.py": [ + "a85e7f0d8c42d6a27e3846308571ca324a1824ac5c2d59e4daa5c7673c33c697", + 436 + ], + "upstream/LICENSE": [ + "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + 436 + ], + "upstream/README.md": [ + "8d1ceff898a4e0e681679f91c4def485820be9e99f04e4861f2ce601a364723e", + 436 + ], + "upstream/build/figures/multiplication-flow.tex": [ + "3654d2728b0c98919d61760e1802804ed616546a747f9167a93e17bb8697f320", + 436 + ], + "upstream/build/figures/proof-map.tex": [ + "76d4deacf07bea355412abcfd798c7cbe6dcccef29a4a420a9e2a7b158f23848", + 436 + ], + "upstream/build/main.tex": [ + "42f0f506976bc2084374a71e97edc1549689a7accf35dda4db2a18af4f13c1aa", + 436 + ], + "upstream/build/references.bib": [ + "33cc2df13ccf85330849e8fb34d4ac7613b23f625787457a5b7b9aa6d7369476", + 436 + ], + "upstream/build/sections/00-introduction.tex": [ + "98721f03682ccf1cc7d0850b07adabaa2d8f3afe552e3861753eba9d284d0da0", + 436 + ], + "upstream/build/sections/01-history.tex": [ + "798956c8150c31e3e2f5f29c47110d25ce619faad1374f4d3a0f15fa3ee33ead", + 436 + ], + "upstream/build/sections/02-streams.tex": [ + "606c80db61cad13aa0c3b6060dc4b88dbbe7ac60cdd831aa93f28d908fd09dab", + 436 + ], + "upstream/build/sections/03-motifs.tex": [ + "ed76761194988a01af77ead0ea6469cb5dcd29690ab985a0b5a4006b0f2b69bb", + 436 + ], + "upstream/build/sections/04-swap.tex": [ + "412b170ccaab38dba96e95e3cbfae09f4876a9818f8d278776a746b0f8044906", + 436 + ], + "upstream/build/sections/05-layers.tex": [ + "20cfc8d12099d4e4ed9e3e7eeb6162edd9b6e0e076f24693364cd24377252594", + 436 + ], + "upstream/build/sections/06-transforms.tex": [ + "924316e4bc905066281d8f9e8746a49d8829aeb393688608deb1e61c3c87853c", + 436 + ], + "upstream/build/sections/07-resampling.tex": [ + "8a6b91670f9163afb54892489fa2210c77fe1b058f0325ec7d18b44b94be6e2c", + 436 + ], + "upstream/build/sections/08-assembly.tex": [ + "763d7945b1e1ec4ebae9b799bcefcc45fa9bae6e2ffad799868a9c3d513dbd4a", + 436 + ], + "upstream/build/sections/09-exact-arithmetic.tex": [ + "5714e5d0656c78c6a1fde8d01fd11f1ba856a7ea94149b283bd9a50fdbf516c3", + 436 + ], + "upstream/build/sections/10-transposition.tex": [ + "c14ad8d56112f6578678a58211bc8d63c3a4b60e55078ac73bc38f7348e713cb", + 436 + ], + "upstream/build/sections/11-grouped-rectangles.tex": [ + "6525cd0a01980e56accfeaf06e9d875bc699197ba42c6e22b69435e352275174", + 436 + ], + "upstream/formalization.yaml": [ + "2dcbd0d6e6a22475f53d49bfdfcac9b6d2b470653c332a9f56522f5be166edb9", + 436 + ], + "upstream/manifest.json": [ + "16ab13971694cabab09440c47ebf2fc0496a9d35fc3af33950fda3498f8e2392", + 436 + ] +} diff --git a/research/gf2-full-network/SOURCES.json b/research/gf2-full-network/SOURCES.json new file mode 100644 index 0000000000..46342cb57a --- /dev/null +++ b/research/gf2-full-network/SOURCES.json @@ -0,0 +1,514 @@ +{ + "base_commit": "19fdb086ea96af9a9f87936a2b888e10af4ed810", + "files": [ + { + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "path": "docs/research/agent-task-catalog.json", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81", + "usage": "provenance" + }, + { + "git_blob": "581f8d87008354eb5b869f7ed9de1317ad837ce8", + "path": "certificates/selected-result.json", + "sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5", + "usage": "provenance" + }, + { + "git_blob": "6c0c5746fb991ba87221083c6485046960863331", + "path": "research/gf2-full-network/SOURCE-PINS.json", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/SOURCE-PINS.json", + "sha256": "88bba3caf5975f30fa7abceaea9454110cf3b069233e8241a2ca13d1dff171a7", + "usage": "input" + }, + { + "git_blob": "d94920c274c0a47db9763dd595230d52df0bd073", + "path": "research/gf2-full-network/engine/compare_side_verifier.py", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/engine/compare_side_verifier.py", + "sha256": "6e507bb0c7e00d090a60289fddb6c55e90c946d0850c42c3c5e3e15c27604a68", + "usage": "input" + }, + { + "git_blob": "4168f5c7e4cec0f182750c6908315735011ff061", + "path": "research/gf2-full-network/engine/finite_controls.py", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/engine/finite_controls.py", + "sha256": "df989a831aac43cc1af95169dad8c64a7548760e6e1f96976da996703f2c8f7a", + "usage": "input" + }, + { + "git_blob": "77e55ce9d0afb48f220f6e7416437562b41b67d3", + "path": "research/gf2-full-network/engine/native_backend.py", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/engine/native_backend.py", + "sha256": "e473c38245c3668715b5a78dfe980b2fe3ed0d0c9b8c97c666fbae6ecf1fffd5", + "usage": "input" + }, + { + "git_blob": "0b6a835981d54ce7d807a3f54947eddb9eda4f9d", + "path": "research/gf2-full-network/engine/native_gf2.c", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/engine/native_gf2.c", + "sha256": "e9c3c9194a08718bd1575c1cf08c6c6772d3b644c2e274c25a84a1f9249d06cc", + "usage": "input" + }, + { + "git_blob": "807855eb875673c47da0ed1b5a890a417e28a846", + "path": "research/gf2-full-network/engine/profile_side_verifier.py", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/engine/profile_side_verifier.py", + "sha256": "9c994378171c20a91539418d93cb8387e1daa93465d6862beefea90e12999c2a", + "usage": "input" + }, + { + "git_blob": "9e83a1065cd5b5f337b39de58d61bac335feb7ce", + "path": "research/gf2-full-network/engine/source/complex_circuit.py", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/engine/source/complex_circuit.py", + "sha256": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1", + "usage": "input" + }, + { + "git_blob": "af9bb6d7b31f3006189761d99bdd919da84656a8", + "path": "research/gf2-full-network/engine/source/complex_network.py", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/engine/source/complex_network.py", + "sha256": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b", + "usage": "input" + }, + { + "git_blob": "e5c52c8afe086a2d0c9418833c550c865ebf8615", + "path": "research/gf2-full-network/frozen/scripts/audit_short_guards.py", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/scripts/audit_short_guards.py", + "sha256": "c2c929c956e617bee739963b517b9069e0d067cfebc6820f401a4e90a1769eb1", + "usage": "input" + }, + { + "git_blob": "a773311b726fd1ef98a056f6f76010e872d7908a", + "path": "research/gf2-full-network/frozen/scripts/certify.py", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/scripts/certify.py", + "sha256": "2348d95008276c5d5764f7e028c3918e484582cd589bd4d9b82919161745e53e", + "usage": "input" + }, + { + "git_blob": "11b2e751bfb2fb141b586042b6f6fec4e498c763", + "path": "research/gf2-full-network/frozen/scripts/compact_control_layer.py", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/scripts/compact_control_layer.py", + "sha256": "e814c9f8d84f2e5d3aa2e06c36697f27f110218addc40ff8df2801fde861ff9f", + "usage": "input" + }, + { + "git_blob": "9e83a1065cd5b5f337b39de58d61bac335feb7ce", + "path": "research/gf2-full-network/frozen/scripts/complex_circuit.py", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/scripts/complex_circuit.py", + "sha256": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1", + "usage": "input" + }, + { + "git_blob": "af9bb6d7b31f3006189761d99bdd919da84656a8", + "path": "research/gf2-full-network/frozen/scripts/complex_network.py", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/scripts/complex_network.py", + "sha256": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b", + "usage": "input" + }, + { + "git_blob": "b0e2f3e03d7de791ca936dfd92cee2134c7dd4f5", + "path": "research/gf2-full-network/frozen/scripts/exclusion_circuit.py", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/scripts/exclusion_circuit.py", + "sha256": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3", + "usage": "input" + }, + { + "git_blob": "36d1fa2c0235b9b307243a8735e38a3fbf957113", + "path": "research/gf2-full-network/frozen/scripts/paired_exclusion_circuit.py", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/scripts/paired_exclusion_circuit.py", + "sha256": "8f05f04cf06217befd6d0ee0f2d7d0c5c5eb32cfab8c9a8ca7917fd6d620b7d2", + "usage": "input" + }, + { + "git_blob": "910449dd510c89ca24aa56904d225b86abfb3be7", + "path": "research/gf2-full-network/frozen/scripts/paired_network.py", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/scripts/paired_network.py", + "sha256": "991223dc3c1374284c361ed017e42bf732dd971fa0bea2be2282cfb18257b3f7", + "usage": "input" + }, + { + "git_blob": "8e17b52f9573135426d7ba6865c8c9bc8da8639a", + "path": "research/gf2-full-network/frozen/scripts/prepare_layers.py", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/scripts/prepare_layers.py", + "sha256": "a6e2adc612f264b1c0e51d18ce6315de9ae5e2ae2420aa22e99a22d8bf304947", + "usage": "input" + }, + { + "git_blob": "f03d5c1b2c81afd6c2f1d3ba9e17d4e7bcd31b9b", + "path": "research/gf2-full-network/frozen/scripts/search_network.py", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/scripts/search_network.py", + "sha256": "3a4faa5037d9b8e7ca5828afac193a96b6966a8b114f14937921795b24ec4f6a", + "usage": "input" + }, + { + "git_blob": "d0864271884398d44ee1fc70f0d99bb982418156", + "path": "research/gf2-full-network/frozen/scripts/shared_point_circuit.py", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/scripts/shared_point_circuit.py", + "sha256": "360d9bffc0f55315fe294789b72c71c79e0991524555b3a5f42a2ca504d7da95", + "usage": "input" + }, + { + "git_blob": "0ec7e75046fe714968c49178cd7f83e80e9f9d94", + "path": "research/gf2-full-network/frozen/scripts/shared_point_network.py", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/scripts/shared_point_network.py", + "sha256": "a85e7f0d8c42d6a27e3846308571ca324a1824ac5c2d59e4daa5c7673c33c697", + "usage": "input" + }, + { + "git_blob": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "path": "research/gf2-full-network/frozen/upstream/LICENSE", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/upstream/LICENSE", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "usage": "input" + }, + { + "git_blob": "c8cb3c3857907bf3465017b9f7ef1add4df5c29b", + "path": "research/gf2-full-network/frozen/upstream/README.md", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/upstream/README.md", + "sha256": "8d1ceff898a4e0e681679f91c4def485820be9e99f04e4861f2ce601a364723e", + "usage": "input" + }, + { + "git_blob": "f0297c9cb841ad74a7cee4b541e302073d913236", + "path": "research/gf2-full-network/frozen/upstream/build/figures/multiplication-flow.tex", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/upstream/build/figures/multiplication-flow.tex", + "sha256": "3654d2728b0c98919d61760e1802804ed616546a747f9167a93e17bb8697f320", + "usage": "input" + }, + { + "git_blob": "a2d539e5a794eb8d679c6cad68c6b8d12b0fc880", + "path": "research/gf2-full-network/frozen/upstream/build/figures/proof-map.tex", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/upstream/build/figures/proof-map.tex", + "sha256": "76d4deacf07bea355412abcfd798c7cbe6dcccef29a4a420a9e2a7b158f23848", + "usage": "input" + }, + { + "git_blob": "0b11a3feb14714253c1ca06ee561a31dd2fe8662", + "path": "research/gf2-full-network/frozen/upstream/build/main.tex", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/upstream/build/main.tex", + "sha256": "42f0f506976bc2084374a71e97edc1549689a7accf35dda4db2a18af4f13c1aa", + "usage": "input" + }, + { + "git_blob": "bf01cae12597f2777199c8ee74ee9f6933a1b56e", + "path": "research/gf2-full-network/frozen/upstream/build/references.bib", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/upstream/build/references.bib", + "sha256": "33cc2df13ccf85330849e8fb34d4ac7613b23f625787457a5b7b9aa6d7369476", + "usage": "input" + }, + { + "git_blob": "aa9048eef857c3e694989f5bb5020109e6422502", + "path": "research/gf2-full-network/frozen/upstream/build/sections/00-introduction.tex", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/upstream/build/sections/00-introduction.tex", + "sha256": "98721f03682ccf1cc7d0850b07adabaa2d8f3afe552e3861753eba9d284d0da0", + "usage": "input" + }, + { + "git_blob": "7c6f033138f97315c80e64afb6cc446a1d590538", + "path": "research/gf2-full-network/frozen/upstream/build/sections/01-history.tex", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/upstream/build/sections/01-history.tex", + "sha256": "798956c8150c31e3e2f5f29c47110d25ce619faad1374f4d3a0f15fa3ee33ead", + "usage": "input" + }, + { + "git_blob": "088fceea1867abc76271d7efe7532b779fee9039", + "path": "research/gf2-full-network/frozen/upstream/build/sections/02-streams.tex", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/upstream/build/sections/02-streams.tex", + "sha256": "606c80db61cad13aa0c3b6060dc4b88dbbe7ac60cdd831aa93f28d908fd09dab", + "usage": "input" + }, + { + "git_blob": "cdb0ba527aa8df5d57c151183fd3893c1a7e21ab", + "path": "research/gf2-full-network/frozen/upstream/build/sections/03-motifs.tex", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/upstream/build/sections/03-motifs.tex", + "sha256": "ed76761194988a01af77ead0ea6469cb5dcd29690ab985a0b5a4006b0f2b69bb", + "usage": "input" + }, + { + "git_blob": "951e792b1768e6509561380b8bbfb1d1ccb64c08", + "path": "research/gf2-full-network/frozen/upstream/build/sections/04-swap.tex", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/upstream/build/sections/04-swap.tex", + "sha256": "412b170ccaab38dba96e95e3cbfae09f4876a9818f8d278776a746b0f8044906", + "usage": "input" + }, + { + "git_blob": "5ce8b3c83c455f221bb84858a97230b0285644aa", + "path": "research/gf2-full-network/frozen/upstream/build/sections/05-layers.tex", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/upstream/build/sections/05-layers.tex", + "sha256": "20cfc8d12099d4e4ed9e3e7eeb6162edd9b6e0e076f24693364cd24377252594", + "usage": "input" + }, + { + "git_blob": "de073e9292d58573f7065a3cd4f214e0d05f3444", + "path": "research/gf2-full-network/frozen/upstream/build/sections/06-transforms.tex", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/upstream/build/sections/06-transforms.tex", + "sha256": "924316e4bc905066281d8f9e8746a49d8829aeb393688608deb1e61c3c87853c", + "usage": "input" + }, + { + "git_blob": "256243bf9416baefb82bf9203f80215b9ebe28f2", + "path": "research/gf2-full-network/frozen/upstream/build/sections/07-resampling.tex", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/upstream/build/sections/07-resampling.tex", + "sha256": "8a6b91670f9163afb54892489fa2210c77fe1b058f0325ec7d18b44b94be6e2c", + "usage": "input" + }, + { + "git_blob": "337810a1d9a58a2ecf14123420923c039ba322a6", + "path": "research/gf2-full-network/frozen/upstream/build/sections/08-assembly.tex", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/upstream/build/sections/08-assembly.tex", + "sha256": "763d7945b1e1ec4ebae9b799bcefcc45fa9bae6e2ffad799868a9c3d513dbd4a", + "usage": "input" + }, + { + "git_blob": "4c7a1d63c912d081f70f5b166e9cab92d7774ee6", + "path": "research/gf2-full-network/frozen/upstream/build/sections/09-exact-arithmetic.tex", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/upstream/build/sections/09-exact-arithmetic.tex", + "sha256": "5714e5d0656c78c6a1fde8d01fd11f1ba856a7ea94149b283bd9a50fdbf516c3", + "usage": "input" + }, + { + "git_blob": "e69cc8276220edb8617a371ae9044a911fbc0767", + "path": "research/gf2-full-network/frozen/upstream/build/sections/10-transposition.tex", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/upstream/build/sections/10-transposition.tex", + "sha256": "c14ad8d56112f6578678a58211bc8d63c3a4b60e55078ac73bc38f7348e713cb", + "usage": "input" + }, + { + "git_blob": "44439c716c6290cd6e512ffac91253443b37d3ab", + "path": "research/gf2-full-network/frozen/upstream/build/sections/11-grouped-rectangles.tex", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/upstream/build/sections/11-grouped-rectangles.tex", + "sha256": "6525cd0a01980e56accfeaf06e9d875bc699197ba42c6e22b69435e352275174", + "usage": "input" + }, + { + "git_blob": "e0584d4993df01ec08233ab344ebc1b1039bf7f7", + "path": "research/gf2-full-network/frozen/upstream/formalization.yaml", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/upstream/formalization.yaml", + "sha256": "2dcbd0d6e6a22475f53d49bfdfcac9b6d2b470653c332a9f56522f5be166edb9", + "usage": "input" + }, + { + "git_blob": "01c309e34d36cf3669c43d89c5dfb25cdc31b8af", + "path": "research/gf2-full-network/frozen/upstream/manifest.json", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/frozen/upstream/manifest.json", + "sha256": "16ab13971694cabab09440c47ebf2fc0496a9d35fc3af33950fda3498f8e2392", + "usage": "input" + }, + { + "git_blob": "62a6091887a3894535c1d059e1b0c527d556eb76", + "path": "research/gf2-full-network/reference/certificates/complex-network.json", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/reference/certificates/complex-network.json", + "sha256": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f", + "usage": "input" + }, + { + "git_blob": "581f8d87008354eb5b869f7ed9de1317ad837ce8", + "path": "research/gf2-full-network/reference/certificates/selected-result.json", + "pin": "head:7f9c2985de167e95d159040eee26fc03c1e27fb6:research/gf2-full-network/reference/certificates/selected-result.json", + "sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5", + "usage": "input" + }, + { + "git_blob": "e5c52c8afe086a2d0c9418833c550c865ebf8615", + "path": "scripts/audit_short_guards.py", + "sha256": "c2c929c956e617bee739963b517b9069e0d067cfebc6820f401a4e90a1769eb1", + "usage": "provenance" + }, + { + "git_blob": "a773311b726fd1ef98a056f6f76010e872d7908a", + "path": "scripts/certify.py", + "sha256": "2348d95008276c5d5764f7e028c3918e484582cd589bd4d9b82919161745e53e", + "usage": "provenance" + }, + { + "git_blob": "11b2e751bfb2fb141b586042b6f6fec4e498c763", + "path": "scripts/compact_control_layer.py", + "sha256": "e814c9f8d84f2e5d3aa2e06c36697f27f110218addc40ff8df2801fde861ff9f", + "usage": "provenance" + }, + { + "git_blob": "9e83a1065cd5b5f337b39de58d61bac335feb7ce", + "path": "scripts/complex_circuit.py", + "sha256": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1", + "usage": "provenance" + }, + { + "git_blob": "af9bb6d7b31f3006189761d99bdd919da84656a8", + "path": "scripts/complex_network.py", + "sha256": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b", + "usage": "provenance" + }, + { + "git_blob": "b0e2f3e03d7de791ca936dfd92cee2134c7dd4f5", + "path": "scripts/exclusion_circuit.py", + "sha256": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3", + "usage": "provenance" + }, + { + "git_blob": "36d1fa2c0235b9b307243a8735e38a3fbf957113", + "path": "scripts/paired_exclusion_circuit.py", + "sha256": "8f05f04cf06217befd6d0ee0f2d7d0c5c5eb32cfab8c9a8ca7917fd6d620b7d2", + "usage": "provenance" + }, + { + "git_blob": "910449dd510c89ca24aa56904d225b86abfb3be7", + "path": "scripts/paired_network.py", + "sha256": "991223dc3c1374284c361ed017e42bf732dd971fa0bea2be2282cfb18257b3f7", + "usage": "provenance" + }, + { + "git_blob": "8e17b52f9573135426d7ba6865c8c9bc8da8639a", + "path": "scripts/prepare_layers.py", + "sha256": "a6e2adc612f264b1c0e51d18ce6315de9ae5e2ae2420aa22e99a22d8bf304947", + "usage": "provenance" + }, + { + "git_blob": "f03d5c1b2c81afd6c2f1d3ba9e17d4e7bcd31b9b", + "path": "scripts/search_network.py", + "sha256": "3a4faa5037d9b8e7ca5828afac193a96b6966a8b114f14937921795b24ec4f6a", + "usage": "provenance" + }, + { + "git_blob": "d0864271884398d44ee1fc70f0d99bb982418156", + "path": "scripts/shared_point_circuit.py", + "sha256": "360d9bffc0f55315fe294789b72c71c79e0991524555b3a5f42a2ca504d7da95", + "usage": "provenance" + }, + { + "git_blob": "0ec7e75046fe714968c49178cd7f83e80e9f9d94", + "path": "scripts/shared_point_network.py", + "sha256": "a85e7f0d8c42d6a27e3846308571ca324a1824ac5c2d59e4daa5c7673c33c697", + "usage": "provenance" + }, + { + "git_blob": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "path": "upstream/LICENSE", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "usage": "provenance" + }, + { + "git_blob": "c8cb3c3857907bf3465017b9f7ef1add4df5c29b", + "path": "upstream/README.md", + "sha256": "8d1ceff898a4e0e681679f91c4def485820be9e99f04e4861f2ce601a364723e", + "usage": "provenance" + }, + { + "git_blob": "f0297c9cb841ad74a7cee4b541e302073d913236", + "path": "upstream/build/figures/multiplication-flow.tex", + "sha256": "3654d2728b0c98919d61760e1802804ed616546a747f9167a93e17bb8697f320", + "usage": "provenance" + }, + { + "git_blob": "a2d539e5a794eb8d679c6cad68c6b8d12b0fc880", + "path": "upstream/build/figures/proof-map.tex", + "sha256": "76d4deacf07bea355412abcfd798c7cbe6dcccef29a4a420a9e2a7b158f23848", + "usage": "provenance" + }, + { + "git_blob": "0b11a3feb14714253c1ca06ee561a31dd2fe8662", + "path": "upstream/build/main.tex", + "sha256": "42f0f506976bc2084374a71e97edc1549689a7accf35dda4db2a18af4f13c1aa", + "usage": "provenance" + }, + { + "git_blob": "bf01cae12597f2777199c8ee74ee9f6933a1b56e", + "path": "upstream/build/references.bib", + "sha256": "33cc2df13ccf85330849e8fb34d4ac7613b23f625787457a5b7b9aa6d7369476", + "usage": "provenance" + }, + { + "git_blob": "aa9048eef857c3e694989f5bb5020109e6422502", + "path": "upstream/build/sections/00-introduction.tex", + "sha256": "98721f03682ccf1cc7d0850b07adabaa2d8f3afe552e3861753eba9d284d0da0", + "usage": "provenance" + }, + { + "git_blob": "7c6f033138f97315c80e64afb6cc446a1d590538", + "path": "upstream/build/sections/01-history.tex", + "sha256": "798956c8150c31e3e2f5f29c47110d25ce619faad1374f4d3a0f15fa3ee33ead", + "usage": "provenance" + }, + { + "git_blob": "088fceea1867abc76271d7efe7532b779fee9039", + "path": "upstream/build/sections/02-streams.tex", + "sha256": "606c80db61cad13aa0c3b6060dc4b88dbbe7ac60cdd831aa93f28d908fd09dab", + "usage": "provenance" + }, + { + "git_blob": "cdb0ba527aa8df5d57c151183fd3893c1a7e21ab", + "path": "upstream/build/sections/03-motifs.tex", + "sha256": "ed76761194988a01af77ead0ea6469cb5dcd29690ab985a0b5a4006b0f2b69bb", + "usage": "provenance" + }, + { + "git_blob": "951e792b1768e6509561380b8bbfb1d1ccb64c08", + "path": "upstream/build/sections/04-swap.tex", + "sha256": "412b170ccaab38dba96e95e3cbfae09f4876a9818f8d278776a746b0f8044906", + "usage": "provenance" + }, + { + "git_blob": "5ce8b3c83c455f221bb84858a97230b0285644aa", + "path": "upstream/build/sections/05-layers.tex", + "sha256": "20cfc8d12099d4e4ed9e3e7eeb6162edd9b6e0e076f24693364cd24377252594", + "usage": "provenance" + }, + { + "git_blob": "de073e9292d58573f7065a3cd4f214e0d05f3444", + "path": "upstream/build/sections/06-transforms.tex", + "sha256": "924316e4bc905066281d8f9e8746a49d8829aeb393688608deb1e61c3c87853c", + "usage": "provenance" + }, + { + "git_blob": "256243bf9416baefb82bf9203f80215b9ebe28f2", + "path": "upstream/build/sections/07-resampling.tex", + "sha256": "8a6b91670f9163afb54892489fa2210c77fe1b058f0325ec7d18b44b94be6e2c", + "usage": "provenance" + }, + { + "git_blob": "337810a1d9a58a2ecf14123420923c039ba322a6", + "path": "upstream/build/sections/08-assembly.tex", + "sha256": "763d7945b1e1ec4ebae9b799bcefcc45fa9bae6e2ffad799868a9c3d513dbd4a", + "usage": "provenance" + }, + { + "git_blob": "4c7a1d63c912d081f70f5b166e9cab92d7774ee6", + "path": "upstream/build/sections/09-exact-arithmetic.tex", + "sha256": "5714e5d0656c78c6a1fde8d01fd11f1ba856a7ea94149b283bd9a50fdbf516c3", + "usage": "provenance" + }, + { + "git_blob": "e69cc8276220edb8617a371ae9044a911fbc0767", + "path": "upstream/build/sections/10-transposition.tex", + "sha256": "c14ad8d56112f6578678a58211bc8d63c3a4b60e55078ac73bc38f7348e713cb", + "usage": "provenance" + }, + { + "git_blob": "44439c716c6290cd6e512ffac91253443b37d3ab", + "path": "upstream/build/sections/11-grouped-rectangles.tex", + "sha256": "6525cd0a01980e56accfeaf06e9d875bc699197ba42c6e22b69435e352275174", + "usage": "provenance" + }, + { + "git_blob": "e0584d4993df01ec08233ab344ebc1b1039bf7f7", + "path": "upstream/formalization.yaml", + "sha256": "2dcbd0d6e6a22475f53d49bfdfcac9b6d2b470653c332a9f56522f5be166edb9", + "usage": "provenance" + }, + { + "git_blob": "01c309e34d36cf3669c43d89c5dfb25cdc31b8af", + "path": "upstream/manifest.json", + "sha256": "16ab13971694cabab09440c47ebf2fc0496a9d35fc3af33950fda3498f8e2392", + "usage": "provenance" + } + ], + "git_blob_derivation": "SHA1 of exact Git blob header plus authenticated bytes; parent publication preflight checks committed objects", + "input_commit": "7f9c2985de167e95d159040eee26fc03c1e27fb6", + "input_file_count": 42, + "predecessor": { + "engine_bytes_retained_in_input_ancestor": true, + "head": "a456c246ec72a23f327d4b1394fbb3bf7087a65c", + "history_required": false, + "pr": 5929 + }, + "schema_version": 1, + "scope": "Full frozen historical H25 CLI with retained observations, not bare CLI/current frontier/PR5864/kappa transfer" +} diff --git a/research/gf2-full-network/TASK.json b/research/gf2-full-network/TASK.json new file mode 100644 index 0000000000..5aa9b96e92 --- /dev/null +++ b/research/gf2-full-network/TASK.json @@ -0,0 +1,61 @@ +{ + "actual_scope": "complete-frozen-historical-H25-CLI-with-retained-observations", + "ai_assistance": "Substantial OpenAI Codex and user-requested Astra xhigh source design plus separate static review; parent-only serial scientific execution. No human/kernel acceptance.", + "author": "Chris R / Clear1nsight", + "base_commit": "19fdb086ea96af9a9f87936a2b888e10af4ed810", + "bottleneck_link": "Faster trustworthy replays increase review throughput and let mechanism candidates be checked sooner.", + "evidence": "evidence/COMPLETE-GATE.json, all8 original guard receipts, complete exact canonical artifacts, SOURCE-PINS and anchor", + "open_questions": [ + { + "blocked_by": "No broader caller/runtime evaluation or new research run is authorized by this package.", + "first_step": "Define and authenticate the new full source/output/runtime contract and complete paid controls before requesting any bounded evaluation.", + "question": "Can this exact qualified boundary be carried to another complete caller or runtime without changing coverage?", + "why_it_matters": "The measured factor applies only to this frozen historical H25 caller with retained observations." + } + ], + "original_card": { + "acceptance_gate": "Report before/after wall time on the same fixture, retained checks and invalidation behavior.", + "allowed_variations": [ + "Profile one stage or design one source-bound cache boundary." + ], + "bottleneck_link": "Faster trustworthy replays increase review throughput and let mechanism candidates be checked sooner.", + "first_experiment": "Measure one unchanged fixture, preserve check coverage, and test one optimization with invalidation controls.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Resolve the current selected review, separate complex/ordinary BIT/admitted BIT/outer budgets, and compare the card against live handoffs before starting. Historical ceilings require exact source/model equivalence.", + "scope": "Source-binding orientation only; not a scientific replay or all-size proof. Materialize selected inputs if this checkout is sparse." + }, + "id": "replay-runtime", + "methods": [ + "Profile one isolated replay and optimize the measured bottleneck.", + "Design source-bound reuse with explicit dependency invalidation and negative controls." + ], + "overlap_terms": [ + "replay runtime", + "cache invalidation", + "isolated tests" + ], + "question": "Can one measured replay bottleneck be sped up without dropping coverage?", + "scope_change_triggers": [ + "Skipping coverage or comparing different fixtures to claim speedup." + ], + "starting_points": [ + "scripts/run_isolated_tests.py", + "scripts/verify_replay_coverage.py", + "certificates/selected-result.json" + ] + }, + "outcome": "completed", + "outcome_scope": "Completed scoped historical full-caller experiment; publication correctness checks pending and separate PR5864 objective remains unresolved.", + "schema_version": 1, + "scope_change_reason": "Explicit user Proceed authorized a distinct complete frozen historical H25 CLI evaluation after the earlier side-only work; all outputs and the full cold candidate bill remain included.", + "scope_status": "refined", + "stop_rule": "One profile anchor excluded from selection; fixed BCCBBC only after admitted first pair; retain every failure/sample and stop at source/output/resource/target/noise failure, with no automatic retries.", + "task_id": "replay-runtime", + "time_budget_minutes": 60 +} diff --git a/research/gf2-full-network/VALIDATION.json b/research/gf2-full-network/VALIDATION.json new file mode 100644 index 0000000000..f67bdbd450 --- /dev/null +++ b/research/gf2-full-network/VALIDATION.json @@ -0,0 +1,123 @@ +{ + "checks": { + "publication-canonical-transport": { + "exit": 0, + "label": "publication-canonical-transport", + "optimized": false, + "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]", + "runner_sha256": "7540f8cc4ae4d12ed86c844ef0837a74184d3ada653979608c295c09f200a751", + "runtime_policy_sha256": "ff0f4e928e2beeddd38b4b67a446c5eb75dbf9f1c78cac386fc0c6528108f205", + "sampled_process_group_rss_bytes": 26345472, + "script": "stages/publication-v1/check_transport.py", + "source_bytes_and_modes_unchanged": true, + "source_inventory_sha256": "ed6d9bcbd7d76f82a5a40df784b8c16ef9709ba7235da5598be540e124077e8e", + "status": "PASS", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_bytes": 392, + "stdout_sha256": "1a4f7854eeab9a589528ccc5d001940e74df4473a35518050b1ab2defa67176d", + "termination": null, + "usage": { + "exit": 0, + "kernel_max_rss_kib": 24736, + "system_seconds": 0.05, + "user_seconds": 0.68 + }, + "wall_seconds": 0.7663612379983533 + }, + "publication-finite-normal": { + "exit": 0, + "label": "publication-finite-normal", + "optimized": false, + "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]", + "runner_sha256": "7540f8cc4ae4d12ed86c844ef0837a74184d3ada653979608c295c09f200a751", + "runtime_policy_sha256": "ff0f4e928e2beeddd38b4b67a446c5eb75dbf9f1c78cac386fc0c6528108f205", + "sampled_process_group_rss_bytes": 73506816, + "script": "stages/publication-v1/check_finite.py", + "source_bytes_and_modes_unchanged": true, + "source_inventory_sha256": "ed6d9bcbd7d76f82a5a40df784b8c16ef9709ba7235da5598be540e124077e8e", + "status": "PASS", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_bytes": 575, + "stdout_sha256": "9522d5f1fb2e4dde550559ef599c08919941047cfbe387c5af7131244515424e", + "termination": null, + "usage": { + "exit": 0, + "kernel_max_rss_kib": 41120, + "system_seconds": 0.06, + "user_seconds": 1.97 + }, + "wall_seconds": 2.0647785399924032 + }, + "publication-finite-optimized": { + "exit": 0, + "label": "publication-finite-optimized", + "optimized": true, + "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]", + "runner_sha256": "7540f8cc4ae4d12ed86c844ef0837a74184d3ada653979608c295c09f200a751", + "runtime_policy_sha256": "ff0f4e928e2beeddd38b4b67a446c5eb75dbf9f1c78cac386fc0c6528108f205", + "sampled_process_group_rss_bytes": 73236480, + "script": "stages/publication-v1/check_finite.py", + "source_bytes_and_modes_unchanged": true, + "source_inventory_sha256": "ed6d9bcbd7d76f82a5a40df784b8c16ef9709ba7235da5598be540e124077e8e", + "status": "PASS", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_bytes": 574, + "stdout_sha256": "8b661cc34b2199abdf120c09ad32998a16ebec24ed6ab136b8de03cf1cb83f26", + "termination": null, + "usage": { + "exit": 0, + "kernel_max_rss_kib": 41028, + "system_seconds": 0.07, + "user_seconds": 2.04 + }, + "wall_seconds": 2.21852564701112 + }, + "publication-full-readonly-C-v2": { + "exit": 0, + "label": "publication-full-readonly-C-v2", + "optimized": false, + "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]", + "runner_sha256": "7540f8cc4ae4d12ed86c844ef0837a74184d3ada653979608c295c09f200a751", + "runtime_policy_sha256": "c71bb6ce1a6800940f337ac415e47de59508cec9cbeed690e5576908f0a0edb2", + "sampled_process_group_rss_bytes": 43126784, + "script": "stages/publication-v2/check_full.py", + "source_bytes_and_modes_unchanged": true, + "source_inventory_sha256": "430c2c0870bdff3afa81929182da5c1185873abfb190fc95158ca5cb6e0f3fb3", + "status": "PASS", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_bytes": 1094, + "stdout_sha256": "398adc722aca188a4c758a29dd3ebd45a1028cab3f0f4464f4e1c8d09a77eaac", + "termination": null, + "usage": { + "exit": 0, + "kernel_max_rss_kib": 453844, + "system_seconds": 4.58, + "user_seconds": 40.79 + }, + "wall_seconds": 31.122465827997075 + } + }, + "fixed_performance_samples_unchanged": true, + "full_cleanup_v1_failure": "evidence/publication-v1-failure/", + "historical_experiment": "evidence/COMPLETE-GATE.json", + "hosted_checks_are_not_performance_samples": true, + "immutability": "This mutable check-status file is explicitly excluded from CODE-SOURCES; protected123files unchanged from readonly validation stages except wrapper repair sourcev2 already tested.", + "independent_publication_review": { + "sha256": "1ba3d1fe540fc544f3e85c65710a10bde8a55209a78ae9184e17c8ed1c76af46", + "text": "# Publication source review: complete frozen H25 GF(2)\n\n2026-10-28. **STATIC GO for one corrected publication-v2 full C correctness replay.** The first readonly publication attempt exposed a concrete cleanup defect, now repaired without changing the measured scientific driver, native engine or six performance samples. No remaining source blocker was found. This review supplies source clearance; it does not assert that the corrected run or hosted final-head checks have passed.\n\nReviewed package: `publication-repo/research/gf2-full-network/` under this round. Final reviewed `CODE-SOURCES.json` SHA-256 is `0ce6a3c120fc4f8f7ab98f044b3d7a72ce72310972c3846a4835bfc01e16a0d7`, covering 123 immutable files. Every listed file matched its digest in this static check. The publication-v2 stage has the identical manifest, driver and repaired wrapper. The driver remains `0d976d2eb6b845f20d4a3396591a806f966688b88693cd6a5f8a0c9e48925e36`, retaining the earlier source-review boundary.\n\n## Concrete failure and repair\n\nOriginal `verify_full.py:28` called `shutil.rmtree(temporary)` after successful verification. The full driver copies source directories with `copytree`; readonly export directories therefore retain mode 0555 inside the private runtime tree. Only the runtime root was made writable for the original certificate output. Unprivileged cleanup could not unlink files within the nested readonly engine directories.\n\nThe retained `runtime/runs/publication-full-readonly-C/` receipt confirms outer exit 1 after 33.381816457 seconds, unchanged source bytes/modes, and a `PermissionError` unlinking `finite_controls.py`. The inner scientific guard passed. This was a publication cleanup failure after scientific success, not a discarded timing sample or a changed theorem result. The package preserves the original wrapper as text plus receipt/stdout/stderr/usage and revision explanation in `evidence/publication-v1-failure/`.\n\nRepaired `verify_full.py`, SHA-256 `c65351d258bac75ae661298a351861452c81f990dd82768da819c1910cba8cd8`, changes only nonsymlink directories below its newly created private temporary root to 0755, after the replay's full scientific equality and source authentication checks. It then removes that private tree within the caught block. Immutable package/source directories are never chmodded; copied input file modes remain unchanged when verified. The corrected stage still has 0555 source directories and 0444 source files. This directly addresses the observed failure and justifies one fresh correctness validation, excluded from performance selection.\n\n## Wrappers, freshness and resource boundary\n\n`archive_support.py` authenticates every protected file, rejects symlinks and requires an exact Python/C code census. `CODE-SOURCES.json` itself is bound through committed package identity rather than an impossible self-hash. `VALIDATION.json` and optional publication status are explicitly mutable and never consulted as scientific PASS inputs.\n\n`replay.py` authenticates the guard from source, takes a nonblocking package-specific lock, requires a new output directory outside the repository and runs one B or C subprocess with no retry. It sets the guard's complete protected closure, timeout, aggregate allowance and 1-GiB sampled group RSS cap. The unchanged guard removes ambient Python-path/optimization settings and starts `/usr/bin/python3.12 -B` with external bytecode storage. Full entries reject optimized execution; the full driver additionally rejects already-loaded scientific modules and requires CPython 3.12. All scientific inputs and outputs are fresh private copies; no prior mutable result or PASS receipt replaces live work.\n\n`verify.py` launches the unchanged finite harness with a fresh external build/output directory. It preserves the requested normal or `-O` interpreter mode and checks the resulting mode. The finite controls use explicit checks rather than removable assertions. Both registered modes therefore exercise their controls anew; neither runs the full CLI with assertions disabled.\n\n`verify_full.py` requests one candidate replay with a 150-second inner guard. `VERIFY.json` gives it a 180-second outer timeout, leaving a nominal 30-second wrapper/cleanup margin. This is a bounded correctness check, not a promise of success on every host. The platform dependencies are disclosed. None of these wrappers requires Git or network access at execution time.\n\n## Input and output custody\n\n`SOURCES.json` contains exactly 42 input rows, all pinned to ancestor `7f9c2985de167e95d159040eee26fc03c1e27fb6`. Their paths equal the `VERIFY.json` input set and their hashes equal the retained `INPUT-COMMIT.json` inventory. No executable dependency requires unmerged PR5929 history. Commit ancestry/object verification remains the parent's publication check; I performed no Git operations.\n\n`check_artifacts.py` authenticates the six-payload transport manifest, bounds and streams decompression, and compares complete logical hashes against the immutable anchor. It checks full witness/rank byte counts, the typed-return structure, the literal reference certificate and complement receipt. Its typed validation supplements exact anchored bytes; it does not substitute a new numerical oracle. The README explicitly distinguishes the 55,839,507-byte observed complement stream from its stored digest/count/schema receipt. The large witness and rank artifacts retain their full logical bytes.\n\n## Claim and remaining publication work\n\nThe README/TASK/SOURCES/VERIFY boundary is appropriate: the fixed BCCBBC experiment measures the complete frozen historical H25 CLI **with retained exact observations**, cold copies/imports/custody/serialization, and every candidate's cold compile/link/load plus unchanged independent finite controls. Original full CLI assertions, real upstream verification, certificate and stdout remain executed through the unchanged driver. Publication wrappers add archive authentication overhead and their replays do not replace the measured driver samples.\n\nThe retained complete gate reports 27.843257% median wall and 28.094997% CPU reduction, passing the declared target and noise gates; slower C3 and both profile attempts remain visible. This review does not independently repeat those timings. The claim excludes bare-CLI, selected-frontier, PR5864 and kappa transfers. Predecessor credit and mathematical limitations are retained.\n\nThe parent must finish the already planned corrected readonly replay, commit/export metadata verification and exact-head hosted checks, then update mutable publication status from actual evidence. No new benchmark sequence, control requirement or mathematical work is requested. The earlier PR5864 goal remains separately blocked and paused streams remain paused.\n\nReviewer activity was limited to source/metadata reads, static inventories and hashes, retained receipt inspection, this report, and parent communication. No scientific module import, corpus decoding, compiler/numerical execution, Git/browser operation or delegation was performed.\n" + }, + "pending": [ + "committed-byte/source-history/export checks", + "hosted exact-head CI" + ], + "schema_version": 1, + "status": "PASS_LOCAL_REGISTERED_CHECKS_AND_READONLY_GITFREE" +} diff --git a/research/gf2-full-network/VERIFY.json b/research/gf2-full-network/VERIFY.json new file mode 100644 index 0000000000..f401ee9242 --- /dev/null +++ b/research/gf2-full-network/VERIFY.json @@ -0,0 +1,89 @@ +{ + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "checks": "Fresh unchanged finite dense-oracle, exact-order/type/width/fallback/source/runtime-binding controls; external cold build, no full benchmark.", + "timeout_seconds": 60 + }, + { + "argv": [ + "{python}", + "-B", + "-O", + "{package}/verify.py" + ], + "checks": "Same finite controls in deliberate optimized mode; full scientific assertions are not disabled.", + "timeout_seconds": 60 + }, + { + "argv": [ + "{python}", + "-B", + "{package}/verify_full.py" + ], + "checks": "One complete candidate correctness replay through unchanged full driver and150-second/1GiB inner guard; exact original certificate/stdout/types/witness/rank/complement and source checks; no hosted performance factor.", + "timeout_seconds": 180 + }, + { + "argv": [ + "{python}", + "-B", + "{package}/check_artifacts.py" + ], + "checks": "Bounded complete lossless canonical transport/typed-return/certificate checks; stream58MB witness, no scientific replay or benchmark.", + "timeout_seconds": 60 + } + ], + "inputs": [ + "research/gf2-full-network/SOURCE-PINS.json", + "research/gf2-full-network/engine/compare_side_verifier.py", + "research/gf2-full-network/engine/finite_controls.py", + "research/gf2-full-network/engine/native_backend.py", + "research/gf2-full-network/engine/native_gf2.c", + "research/gf2-full-network/engine/profile_side_verifier.py", + "research/gf2-full-network/engine/source/complex_circuit.py", + "research/gf2-full-network/engine/source/complex_network.py", + "research/gf2-full-network/frozen/scripts/audit_short_guards.py", + "research/gf2-full-network/frozen/scripts/certify.py", + "research/gf2-full-network/frozen/scripts/compact_control_layer.py", + "research/gf2-full-network/frozen/scripts/complex_circuit.py", + "research/gf2-full-network/frozen/scripts/complex_network.py", + "research/gf2-full-network/frozen/scripts/exclusion_circuit.py", + "research/gf2-full-network/frozen/scripts/paired_exclusion_circuit.py", + "research/gf2-full-network/frozen/scripts/paired_network.py", + "research/gf2-full-network/frozen/scripts/prepare_layers.py", + "research/gf2-full-network/frozen/scripts/search_network.py", + "research/gf2-full-network/frozen/scripts/shared_point_circuit.py", + "research/gf2-full-network/frozen/scripts/shared_point_network.py", + "research/gf2-full-network/frozen/upstream/LICENSE", + "research/gf2-full-network/frozen/upstream/README.md", + "research/gf2-full-network/frozen/upstream/build/figures/multiplication-flow.tex", + "research/gf2-full-network/frozen/upstream/build/figures/proof-map.tex", + "research/gf2-full-network/frozen/upstream/build/main.tex", + "research/gf2-full-network/frozen/upstream/build/references.bib", + "research/gf2-full-network/frozen/upstream/build/sections/00-introduction.tex", + "research/gf2-full-network/frozen/upstream/build/sections/01-history.tex", + "research/gf2-full-network/frozen/upstream/build/sections/02-streams.tex", + "research/gf2-full-network/frozen/upstream/build/sections/03-motifs.tex", + "research/gf2-full-network/frozen/upstream/build/sections/04-swap.tex", + "research/gf2-full-network/frozen/upstream/build/sections/05-layers.tex", + "research/gf2-full-network/frozen/upstream/build/sections/06-transforms.tex", + "research/gf2-full-network/frozen/upstream/build/sections/07-resampling.tex", + "research/gf2-full-network/frozen/upstream/build/sections/08-assembly.tex", + "research/gf2-full-network/frozen/upstream/build/sections/09-exact-arithmetic.tex", + "research/gf2-full-network/frozen/upstream/build/sections/10-transposition.tex", + "research/gf2-full-network/frozen/upstream/build/sections/11-grouped-rectangles.tex", + "research/gf2-full-network/frozen/upstream/formalization.yaml", + "research/gf2-full-network/frozen/upstream/manifest.json", + "research/gf2-full-network/reference/certificates/complex-network.json", + "research/gf2-full-network/reference/certificates/selected-result.json" + ], + "python": "3.12", + "requirements": [], + "schema_version": 1, + "status": "ready" +} diff --git a/research/gf2-full-network/anchor.json b/research/gf2-full-network/anchor.json new file mode 100644 index 0000000000..a593a05004 --- /dev/null +++ b/research/gf2-full-network/anchor.json @@ -0,0 +1 @@ +{"base_commit":"19fdb086ea96af9a9f87936a2b888e10af4ed810","driver_sha256":"0d976d2eb6b845f20d4a3396591a806f966688b88693cd6a5f8a0c9e48925e36","engine_pins":{"compare_side_verifier.py":"6e507bb0c7e00d090a60289fddb6c55e90c946d0850c42c3c5e3e15c27604a68","finite_controls.py":"df989a831aac43cc1af95169dad8c64a7548760e6e1f96976da996703f2c8f7a","native_backend.py":"e473c38245c3668715b5a78dfe980b2fe3ed0d0c9b8c97c666fbae6ecf1fffd5","native_gf2.c":"e9c3c9194a08718bd1575c1cf08c6c6772d3b644c2e274c25a84a1f9249d06cc","profile_side_verifier.py":"9c994378171c20a91539418d93cb8387e1daa93465d6862beefea90e12999c2a","source/complex_circuit.py":"d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1","source/complex_network.py":"0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b"},"schema":"gf2-full-network-anchor-v1","science":{"full_cli_certificate_sha256":"1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f","full_cli_stdout_sha256":"8f77b724810ec05fb19b35d75d8002d31a6e22ed342a36ee28a5caef8d643015","full_return_lossless_sha256":"542e4fd73d38b88122d1bf0fffa5f3b092cc4681a14012162daef47e89363cfd","ordered_complements":{"calls":238685,"canonical_stream_bytes":55839507,"schema":"v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors","sha256":"7dec2bf33303c37e1c699609e83768d61df7e19104d34a26a148f66d5ccc4838"},"side":{"exact_witness_sha256":"4b170c1dbfc33c7cb141a2284c6fd69eac7b6d100971d3e9ee625502b5893f82","rank_call_count":59959,"rank_distinct_matrix_count":252,"rank_trace_sha256":"85006ca332bbc57c2ba9fd06f61a0281d4cee600c9f3b449342379bf2aedec8f","result_sha256":"342e99212b12e518902ae9598613f5484113bacee8747c27a13b58a4b1d3986c","serialized_bytes":{"rank_trace":2674272,"result":527,"witness":58143622}},"upstream_commit":"adc7f1241b42e322a6451854ab7e4b4c146bf78a"},"source_pin_sha256":"88bba3caf5975f30fa7abceaea9454110cf3b069233e8241a2ca13d1dff171a7"} diff --git a/research/gf2-full-network/archive_support.py b/research/gf2-full-network/archive_support.py new file mode 100644 index 0000000000..e11ddca588 --- /dev/null +++ b/research/gf2-full-network/archive_support.py @@ -0,0 +1,58 @@ +"""Portable wrappers around unchanged measured full-network code; Apache-2.0.""" +from hashlib import sha256 +import json +import os +from pathlib import Path +import runpy +import sys +import types + +ROOT=Path(__file__).resolve().parent + + +def need(ok,why): + if not ok:raise ValueError(why) + + +def digest(path): + h=sha256() + with path.open('rb') as stream: + for block in iter(lambda:stream.read(1024*1024),b''):h.update(block) + return h.hexdigest() + + +def authenticate(): + manifest=json.loads((ROOT/'CODE-SOURCES.json').read_text()) + need(manifest['schema_version']==1,'code/source manifest version') + for name,expected in manifest['files'].items(): + path=ROOT/name + need(not path.is_symlink() and path.is_file() and digest(path)==expected,'exact protected source: '+name) + expected_code={p for p in manifest['files'] if Path(p).suffix in ('.py','.c')} + actual_code={str(p.relative_to(ROOT)) for p in ROOT.rglob('*') if p.is_file() and p.suffix in ('.py','.c')} + need(actual_code==expected_code,'complete protected code census') + need(not any(p.is_symlink() for p in ROOT.rglob('*')),'no package symlinks') + return manifest + + +def source_module(name,path): + authenticate();raw=path.read_bytes() + module=types.ModuleType(name);module.__file__=str(path) + exec(compile(raw,str(path),'exec'),module.__dict__) + return module + + +def external(path): + path=Path(path).resolve() + need(not path.exists() and not path.is_relative_to(ROOT.parent.parent),'fresh external evidence path required') + return path + + +def full_entry(arm): + need(arm in ('B','C') and sys.flags.optimize==0,'full caller requires B/C and original assertions') + authenticate() + output=external(os.environ['CROC_GF2_FULL_OUTPUT']) + driver=ROOT/'full_driver.py' + sys.argv=[str(driver),'--frozen-root',str(ROOT/'frozen'),'--reference',str(ROOT/'reference/certificates/complex-network.json'), + '--mode','baseline' if arm=='B' else 'candidate','--anchor',str(ROOT/'anchor.json'),'--output',str(output)] + runpy.run_path(str(driver),run_name='__main__') + authenticate() diff --git a/research/gf2-full-network/check_artifacts.py b/research/gf2-full-network/check_artifacts.py new file mode 100644 index 0000000000..9ef7653323 --- /dev/null +++ b/research/gf2-full-network/check_artifacts.py @@ -0,0 +1,69 @@ +"""Bounded complete canonical transport checks; no scientific replay or timing.""" +from hashlib import sha256 +import gzip +import json +from pathlib import Path +import sys +import types +ROOT=Path(__file__).resolve().parent +pins=json.loads((ROOT/'CODE-SOURCES.json').read_text())['files'] +for name in ('check_artifacts.py','archive_support.py'): + if sha256((ROOT/name).read_bytes()).hexdigest()!=pins[name]:raise ValueError('transport wrapper source pin: '+name) +S=types.ModuleType('_gf2_transport_support');S.__file__=str(ROOT/'archive_support.py') +exec(compile((ROOT/'archive_support.py').read_bytes(),S.__file__,'exec'),S.__dict__) + + +def typed(node): + S.need(type(node) is list and bool(node) and type(node[0]) is str,'exact typed node') + tag=node[0] + if tag=='None':S.need(len(node)==1,'typed None') + elif tag=='Fraction':S.need(len(node)==3 and type(node[1]) is type(node[2]) is int and node[2]>0,'exact Fraction pair') + elif tag in ('bool','str'):S.need(len(node)==2 and type(node[1]) is (bool if tag=='bool' else str),'exact primitive type') + elif tag=='int':S.need(len(node)==2 and type(node[1]) is str and str(int(node[1]))==node[1],'canonical exact integer string') + elif tag=='float':S.need(len(node)==2 and type(node[1]) is str and float.fromhex(node[1]).hex()==node[1],'lossless float hex') + elif tag in ('list','tuple'): + S.need(len(node)==2 and type(node[1]) is list,'typed sequence') + for item in node[1]:typed(item) + elif tag=='dict': + S.need(len(node)==2 and type(node[1]) is list,'ordered typed dictionary') + for item in node[1]: + S.need(type(item) is list and len(item)==2,'ordered dictionary pair') + typed(item[0]);typed(item[1]) + else:raise ValueError('unknown exact type tag') + + +def main(): + S.need(len(sys.argv)==1,'no alternate transport input') + S.authenticate();science=json.loads((ROOT/'anchor.json').read_text())['science'] + directory=ROOT/'evidence/canonical';manifest=json.loads((directory/'MANIFEST.json').read_text()) + expected={'witness.json.gz':science['side']['exact_witness_sha256'],'rank-trace.json.gz':science['side']['rank_trace_sha256'], + 'full-return.lossless.json.gz':science['full_return_lossless_sha256'],'complex-network.json':science['full_cli_certificate_sha256'], + 'original-stdout.txt':science['full_cli_stdout_sha256']} + complement=(json.dumps(science['ordered_complements'],sort_keys=True,separators=(',',':'))+'\n').encode() + expected['complement-transcript.json']=sha256(complement).hexdigest() + S.need(manifest['schema_version']==1 and set(manifest['artifacts'])==set(expected),'complete six-payload transport census') + totals={};small={} + for name,expected_hash in expected.items(): + row=manifest['artifacts'][name];path=directory/name + S.need(path.is_file() and not path.is_symlink(),'regular canonical artifact') + S.need(type(row['logical_bytes']) is int and 0<=row['logical_bytes']<=128*1024**2 and row['logical_sha256']==expected_hash,'anchor-bound logical payload') + encoding='gzip' if name.endswith('.gz') else 'plain' + S.need(row['encoding']==encoding and type(row['transport_bytes']) is int and path.stat().st_size==row['transport_bytes'] and S.digest(path)==row['transport_sha256'],'committed transport integrity') + h=sha256();count=0;parts=[] + with (gzip.open(path,'rb') if encoding=='gzip' else path.open('rb')) as stream: + for block in iter(lambda:stream.read(1024*1024),b''): + count+=len(block);S.need(count<=row['logical_bytes'],'bounded complete payload') + h.update(block) + if name not in ('witness.json.gz','rank-trace.json.gz'):parts.append(block) + S.need(count==row['logical_bytes'] and h.hexdigest()==expected_hash,'complete decompressed payload equality') + totals[name]=count + if parts:small[name]=b''.join(parts) + S.need(totals['witness.json.gz']==science['side']['serialized_bytes']['witness'] and totals['rank-trace.json.gz']==science['side']['serialized_bytes']['rank_trace'],'complete witness/rank byte counts') + typed(json.loads(small['full-return.lossless.json.gz'])) + S.need(small['complex-network.json']==(ROOT/'reference/certificates/complex-network.json').read_bytes(),'literal original certificate bytes') + S.need(small['complement-transcript.json']==complement,'complete complement receipt') + S.authenticate() + print(json.dumps(dict(status='PASS_FULL_NETWORK_CANONICAL_TRANSPORT',payload_bytes=totals,full_typed_shape=True,no_benchmark_or_theorem_claim=True,regenerated_container_hash_is_not_mathematical_identity=True),sort_keys=True)) + + +if __name__=='__main__':main() diff --git a/research/gf2-full-network/engine/compare_side_verifier.py b/research/gf2-full-network/engine/compare_side_verifier.py new file mode 100644 index 0000000000..d94920c274 --- /dev/null +++ b/research/gf2-full-network/engine/compare_side_verifier.py @@ -0,0 +1,190 @@ +#!/usr/bin/env python3 +"""One cold finite or complete side-verification run, under the parent's guard. + +The baseline and candidate serialize identical complete result, structural/ +label/role witness, and rank transcript artifacts. Candidate additionally pays +all C compilation/link/load and independent finite/binding/fallback controls. +No profile or warm-build reuse; no orchestration, retry, search or parallelism. +""" +from __future__ import annotations + +import time +START_WALL = time.perf_counter() +import argparse +import hashlib +import json +from pathlib import Path +import resource +import sys + +sys.dont_write_bytecode = True +from native_backend import (ROOT, SOURCE_SHA256, CALLER_SHA256, ComplementTrace, attach_trace, + bind, build_native, guard_module, load_source, require) +from finite_controls import run_controls +from profile_side_verifier import canonical, source_check + +EXPECTED = { + "result_sha256": "342e99212b12e518902ae9598613f5484113bacee8747c27a13b58a4b1d3986c", + "exact_witness_sha256": "4b170c1dbfc33c7cb141a2284c6fd69eac7b6d100971d3e9ee625502b5893f82", + "rank_trace_sha256": "85006ca332bbc57c2ba9fd06f61a0281d4cee600c9f3b449342379bf2aedec8f", + "rank_call_count": 59959, + "rank_distinct_matrix_count": 252, +} + + +def cpu_seconds(): + own = resource.getrusage(resource.RUSAGE_SELF) + children = resource.getrusage(resource.RUSAGE_CHILDREN) + return own.ru_utime + own.ru_stime + children.ru_utime + children.ru_stime + + +def scientific_run(module, phases): + def phase(name, action): + wall, cpu = time.perf_counter(), cpu_seconds() + answer = action() + phases[name] = {"wall_seconds": time.perf_counter() - wall, + "cpu_seconds_including_children": cpu_seconds() - cpu} + return answer + + c = phase("construction", lambda: module.ComplexSideCircuit(25)) + checks = phase("checks_initialization", lambda: module.Checks(c)) + code = phase("compile_roles", lambda: module.compile_roles(c)) + side_map = phase("verify_map", checks.verify_map) + labels = phase("verify_labels", checks.verify_labels) + roles = phase("verify_role_frames", lambda: module.verify_role_frames(c, checks, code)) + result = {"circuit": c.stats(), "side_map": side_map, "labels": labels, "role_frames": roles} + # This exactly matches profile_side_verifier.py's predeclared witness + # representation. Preserve basis and code dict insertion order as lists. + witness = { + "support": c.support, + "args": c.args, + "kind": c.kind, + "active": sorted(c.active), + "pieces": [(target, node, (coefficient.numerator, coefficient.denominator)) + for target, node, coefficient in c.pieces], + "labels": [(key, list(label.basis.items()), label.dim, label.key) + for key, label in checks.cache.items()], + "code": {"roles": code["roles"], "gates": code["gates"], + "sources": list(code["sources"].items()), + "outputs": list(code["outputs"].items())}, + } + return result, witness + + +def write_scientific(output, result, witness, rank_calls): + encoded_result = canonical(result) + encoded_witness = canonical(witness) + encoded_trace = canonical(rank_calls) + receipt = { + "result_sha256": hashlib.sha256(encoded_result).hexdigest(), + "exact_witness_sha256": hashlib.sha256(encoded_witness).hexdigest(), + "rank_trace_sha256": hashlib.sha256(encoded_trace).hexdigest(), + "rank_call_count": len(rank_calls), + "rank_distinct_matrix_count": len({rows for rows, _ in rank_calls}), + } + require(receipt == EXPECTED, "Complete output, ordered witness, or rank trace changed from the frozen profile") + # Same exact bytes and serialization work in both arms; file hashes omit + # a trailing newline exactly as the existing profile's digest did. + (output / "result.json").write_bytes(encoded_result) + (output / "witness.json").write_bytes(encoded_witness) + (output / "rank-trace.json").write_bytes(encoded_trace) + receipt["serialized_bytes"] = {"result": len(encoded_result), "witness": len(encoded_witness), + "rank_trace": len(encoded_trace)} + return receipt + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--mode", choices=("finite", "baseline", "candidate"), required=True) + parser.add_argument("--output", type=Path, required=True) + parser.add_argument("--expected-complement-sha256", help="Lock to the parent-recorded fresh v2 baseline complement stream") + args = parser.parse_args() + require(args.mode != "candidate" or args.expected_complement_sha256 is not None, "Candidate requires the fresh baseline complement SHA-256 before execution") + require(args.expected_complement_sha256 is None or (args.mode != "finite" and len(args.expected_complement_sha256) == 64 and all(c in "0123456789abcdef" for c in args.expected_complement_sha256)), "Invalid or inapplicable expected complement SHA-256") + require(not args.output.exists(), "Refusing to overwrite earlier run evidence") + args.output.mkdir(parents=True) + require(source_check() == 25, "Frozen H changed") + if args.mode != "finite": + require(sys.flags.optimize == 0, "Complete measurements require all unchanged source assertions") + phases = {} + controls = None + native = None + build = None + if args.mode in ("finite", "candidate"): + wall, cpu = time.perf_counter(), cpu_seconds() + native, build = build_native(args.output / "cold-build") + phases["cold_compile_link_load"] = {"wall_seconds": time.perf_counter() - wall, + "cpu_seconds_including_children": cpu_seconds() - cpu} + wall, cpu = time.perf_counter(), cpu_seconds() + controls = run_controls(native) + phases["all_finite_independent_binding_fallback_controls"] = { + "wall_seconds": time.perf_counter() - wall, + "cpu_seconds_including_children": cpu_seconds() - cpu, + } + (args.output / "finite-controls.json").write_text(json.dumps(controls, indent=2, sort_keys=True) + "\n") + complete = None + binding = None + if args.mode != "finite": + rank_calls = [] + wall, cpu = time.perf_counter(), cpu_seconds() + module = load_source("_matrix_complete_" + args.mode) + complement_trace = ComplementTrace(module.Label) + if args.mode == "candidate": + binding = bind(module, native, rank_calls, complement_trace) + else: + guard_module(module) + attach_trace(module, rank_calls, complement_trace) + phases["cold_source_load_guard_bind"] = {"wall_seconds": time.perf_counter() - wall, + "cpu_seconds_including_children": cpu_seconds() - cpu} + result, witness = scientific_run(module, phases) + wall, cpu = time.perf_counter(), cpu_seconds() + complete = write_scientific(args.output, result, witness, rank_calls) + phases["same_complete_witness_trace_serialization"] = { + "wall_seconds": time.perf_counter() - wall, + "cpu_seconds_including_children": cpu_seconds() - cpu, + } + complete["result"] = result + complete["complement_trace"] = complement_trace.receipt() + require(complete["complement_trace"]["calls"] == 238685, "Complete ordered complement call coverage changed") + if args.expected_complement_sha256 is not None: + require(complete["complement_trace"]["sha256"] == args.expected_complement_sha256, "Complete complement stream differs from the fresh baseline") + (args.output / "complement-transcript.json").write_text(json.dumps(complete["complement_trace"], indent=2, sort_keys=True) + "\n") + if binding is not None: + expected_calls = {"complement_native": 238685, "complement_fallback": 0, + "gram_native": 59959, "gram_fallback": 0} + require(binding["counters"] == expected_calls, "Frozen complete native call coverage changed") + complete["native_calls"] = dict(binding["counters"]) + source_files = ("native_gf2.c", "native_backend.py", "finite_controls.py", + "compare_side_verifier.py", "profile_side_verifier.py") + sources = {name: hashlib.sha256((ROOT / name).read_bytes()).hexdigest() for name in source_files} + receipt = { + "status": "FINITE_PASS" if args.mode == "finite" else "COMPLETE_SIDE_PASS", + "mode": args.mode, + "qualification_revision": 2, + "expected_complement_sha256": args.expected_complement_sha256, + "base_main": "de5ec2e7a6074068452f45b1a191b5c72832df4a", + "frozen_sources": {"complex_circuit.py": SOURCE_SHA256, "complex_network.py": CALLER_SHA256}, + "engineering_sources": sources, + "complete": complete, + "controls": controls, + "build": build, + "phases": phases, + "measured_wall_seconds_before_receipt_write": time.perf_counter() - START_WALL, + "process_plus_compiler_cpu_seconds_before_receipt_write": cpu_seconds(), + "environment": {"python": sys.version, "executable": sys.executable, + "platform": sys.platform, "optimization": sys.flags.optimize}, + "measurement_scope": "Cold entire process; parent guard outer wall/CPU is authoritative. Both arms write identical complete witness bytes. Candidate additionally compiles, links, loads and runs every finite/native/binding control.", + "scientific_scope": "Frozen H=25 complex side verification only; no full network certificate, selected frontier, PR5864 gain, new construction, parameter search or kappa admission.", + } + (args.output / "receipt.json").write_text(json.dumps(receipt, indent=2, sort_keys=True) + "\n") + print(json.dumps({"status": receipt["status"], "mode": args.mode, + "wall_seconds": receipt["measured_wall_seconds_before_receipt_write"], + "cpu_seconds_with_compiler": receipt["process_plus_compiler_cpu_seconds_before_receipt_write"], + "complete_hashes": None if complete is None else {key: complete[key] for key in EXPECTED}, + "complement_trace": None if complete is None else complete["complement_trace"], + "controls": None if controls is None else controls["status"], + "phases": phases}, sort_keys=True)) + + +if __name__ == "__main__": + main() diff --git a/research/gf2-full-network/engine/finite_controls.py b/research/gf2-full-network/engine/finite_controls.py new file mode 100644 index 0000000000..4168f5c7e4 --- /dev/null +++ b/research/gf2-full-network/engine/finite_controls.py @@ -0,0 +1,456 @@ +"""Finite independent qualification for the bounded packed GF(2) backend. + +The source oracle is a fresh unchanged module. The second oracle uses dense +0/1 lists and addition modulo two; it never calls the native extension or the +source's packed rank, dot, echelon, reduce, or complement routines. +""" +from __future__ import annotations + +from collections import UserDict +import builtins +from types import FunctionType +import hashlib +from itertools import permutations, product +import json +import time + +from native_backend import ComplementTrace, attach_trace, bind, guard_module, load_source, require + + +def dense_rank(rows, width): + work = [list(row) for row in rows] + require(all(len(row) == width and all(x in (0, 1) for x in row) for row in work), + "Independent oracle requires dense binary rows") + rank = 0 + for column in range(width - 1, -1, -1): + pivot = next((i for i in range(rank, len(work)) if work[i][column]), None) + if pivot is None: + continue + work[rank], work[pivot] = work[pivot], work[rank] + for i in range(rank + 1, len(work)): + if work[i][column]: + work[i] = [(a + b) % 2 for a, b in zip(work[i], work[rank])] + rank += 1 + return rank + + +def dense_vectors(vectors, width): + return [[(value // (2 ** column)) % 2 for column in range(width)] for value in vectors] + + +def pairing_rows(left, right, width): + left_dense = dense_vectors(left, width) + right_dense = dense_vectors(right, width) + return [[sum(a * b for a, b in zip(x, y)) % 2 for y in right_dense] for x in left_dense] + + +def independent_complement(small, big, out): + width = max((x.bit_length() for x in small + big + out), default=0) + big_dense = dense_vectors(big, width) + out_dense = dense_vectors(out, width) + big_rank = dense_rank(big_dense, width) + pairing = pairing_rows(big, small, width) + pairing_rank = dense_rank(pairing, len(small)) + require(all(value == 0 for row in pairing_rows(out, small, width) for value in row), + "Independent oracle found a nonorthogonal complement vector") + require(dense_rank(big_dense + out_dense, width) == big_rank, + "Independent oracle found a complement vector outside the ambient span") + require(len(out) == len(big) - pairing_rank, + "Independent oracle found a wrong number of coefficient-kernel vectors") + require(dense_rank(out_dense, width) == big_rank - pairing_rank, + "Independent oracle found an incomplete complement span") + + +def raw(label, rows, factory=dict): + obj = object.__new__(label) + obj.basis = factory((i, value) for i, value in enumerate(rows)) + return obj + + +def exact_list(actual, expected): + require(type(actual) is list and type(expected) is list, "Complement output is not an exact list") + require(all(type(value) is int for value in actual), "Complement output contains a non-int") + require(actual == expected, "Ordered complement vectors differ from the unchanged source") + + +def capture(action): + try: + value = action() + except Exception as error: + return ("error", type(error).__name__, str(error)) + return ("value", type(value).__name__, value) + + +class IntSubclass(int): + pass + + +class DictSubclass(dict): + pass + + +class ValuesOnly: + def __init__(self, pairs): + self.rows = tuple(value for _, value in pairs) + + def values(self): + return iter(self.rows) + + +class BrokenValues: + def __init__(self, pairs): + self.rows = tuple(value for _, value in pairs) + + def values(self): + def iterator(): + yield from self.rows[:1] + raise ValueError("frozen broken values iterator") + return iterator() + + +def run_controls(native): + oracle = load_source("_matrix_finite_unchanged_oracle") + candidate = load_source("_matrix_finite_candidate") + guard_module(oracle) + state = bind(candidate, native) + counts = {"ordered_complements": 0, "gram_cases": 0, "fallback_cases": 0, + "boundary_cases": 0, "real_label_permutations": 0, "binding_rejections": 0, + "oracle_negative_controls": 0} + transcript = hashlib.sha256() + + def record(tag, *values): + transcript.update(json.dumps((tag, values), separators=(",", ":"), sort_keys=True).encode("ascii") + b"\n") + + def complement_case(small, big): + reference = oracle.Label.complement_in(raw(oracle.Label, small), raw(oracle.Label, big)) + actual = candidate.Label.complement_in(raw(candidate.Label, small), raw(candidate.Label, big)) + exact_list(actual, reference) + independent_complement(list(small), list(big), actual) + record("complement", small, big, actual) + counts["ordered_complements"] += 1 + + def gram_case(vectors): + reference = oracle.Label.nondegenerate(raw(oracle.Label, vectors)) + actual = candidate.Label.nondegenerate(raw(candidate.Label, vectors)) + width = max((x.bit_length() for x in vectors), default=0) + dense = pairing_rows(vectors, vectors, width) + independent = dense_rank(dense, len(vectors)) == len(vectors) + require(type(actual) is bool and actual is reference and actual is independent, + "Gram nondegeneracy differs from an independent oracle") + answer = native.gram_rank(dict(enumerate(vectors))) + if answer is not NotImplemented: + rows, rank = answer + reference_rows = tuple(sum(value * (2 ** j) for j, value in enumerate(row)) for row in dense) + require(type(rows) is tuple and all(type(row) is int for row in rows), "Native Gram row types changed") + require(type(rank) is int and rows == reference_rows and rank == dense_rank(dense, len(vectors)), + "Native Gram transcript differs from the dense oracle") + record("gram", vectors, actual) + counts["gram_cases"] += 1 + + # Exhaustive ordered row lists (including zero/dependence), widths <= 3. + short = [()] + [tuple(row) for n in (1, 2) for row in product(range(8), repeat=n)] + for small in short: + for big in short: + complement_case(small, big) + for n in range(4): + for rows in product(range(8), repeat=n): + gram_case(rows) + + # Cross native word, augmented-width, independent/dependent and permutation + # boundaries without assuming a machine word bound for the Python fallback. + coordinates64 = tuple(1 << i for i in range(64)) + boundary_pairs = [ + ((), coordinates64), + ((1 << 63,), coordinates64[:63]), + (coordinates64[:63], (1 << 63,)), + (coordinates64, ()), + ((1,), coordinates64), # augmented 65 -> fallback + (coordinates64, (1,)), # augmented 65 -> fallback + ((), coordinates64 + (1 << 64,)), # 65 values -> fallback + ((1 << 64,), (1, 1 << 64)), # vector-width fallback + ((1 << 127,), (1 << 64, 1 << 127)), + ((1 << 63 | 7,), (3, 5, 1 << 63, 1 << 63 | 7)), + ((0,) * 32, (0,) * 32), + ] + for small, big in boundary_pairs: + complement_case(small, big) + gram_case(small) + gram_case(big) + counts["boundary_cases"] += 1 + for rows in ((0,), (2 ** 64 - 1,), (1 << 63,), coordinates64, + coordinates64 + (1 << 64,), (1 << 200, 3 << 199)): + gram_case(rows) + counts["boundary_cases"] += 1 + + # Actual Label construction and dictionary insertion order are retained. + for ordered in permutations((1, 2, 4, 8)): + small_o, big_o = oracle.Label(ordered[:2]), oracle.Label(ordered) + small_c, big_c = candidate.Label(ordered[:2]), candidate.Label(ordered) + require(list(small_c.basis.items()) == list(small_o.basis.items()) and + list(big_c.basis.items()) == list(big_o.basis.items()) and + small_c.key == small_o.key and big_c.key == big_o.key, + "Label constructor or canonical keys changed") + actual = small_c.complement_in(big_c) + exact_list(actual, small_o.complement_in(big_o)) + independent_complement(list(small_o.basis.values()), list(big_o.basis.values()), actual) + record("real_label_order", ordered, actual) + counts["real_label_permutations"] += 1 + + # Unsupported kinds must preserve ordinary return/exception behavior; no + # coercion, narrowing or mask repair is allowed before calling the fallback. + fallback_fixtures = [ + ((-1, 2), dict), ((True, False, 2), dict), ((IntSubclass(3), 5), dict), + ((1 << 100, 3), dict), ((1.5, 2), dict), (("1", 2), dict), + ((1, 2), DictSubclass), ((1, 2), UserDict), ((1, 2), ValuesOnly), + ((1, 2), BrokenValues), + ] + for values, factory in fallback_fixtures: + left_o, left_c = raw(oracle.Label, values, factory), raw(candidate.Label, values, factory) + right_o, right_c = raw(oracle.Label, (1, 2, 4)), raw(candidate.Label, (1, 2, 4)) + expected = capture(lambda: left_o.nondegenerate()) + actual = capture(lambda: left_c.nondegenerate()) + require(actual == expected, "Nondegenerate fallback result/exception changed") + expected_pair = capture(lambda: left_o.complement_in(right_o)) + actual_pair = capture(lambda: left_c.complement_in(right_c)) + require(actual_pair == expected_pair, "Complement fallback result/exception changed") + reverse_expected = capture(lambda: right_o.complement_in(left_o)) + reverse_actual = capture(lambda: right_c.complement_in(left_c)) + require(reverse_actual == reverse_expected, "Other-basis fallback result/exception changed") + record("fallback", factory.__name__, repr(values), actual, actual_pair, reverse_actual) + counts["fallback_cases"] += 3 + for factory in (lambda cls: object.__new__(cls), lambda cls: raw(cls, (), lambda _: None)): + left_o, left_c = factory(oracle.Label), factory(candidate.Label) + require(capture(left_o.nondegenerate) == capture(left_c.nondegenerate), "Missing basis fallback changed") + right_o, right_c = raw(oracle.Label, (1,)), raw(candidate.Label, (1,)) + require(capture(lambda: left_o.complement_in(right_o)) == capture(lambda: left_c.complement_in(right_c)), + "Missing self basis exception changed") + require(capture(lambda: right_o.complement_in(left_o)) == capture(lambda: right_c.complement_in(left_c)), + "Missing other basis exception changed") + counts["fallback_cases"] += 3 + class OracleChild(oracle.Label): + pass + class CandidateChild(candidate.Label): + pass + child_o, child_c = OracleChild((3, 5)), CandidateChild((3, 5)) + require(child_c.nondegenerate() is child_o.nondegenerate(), "Subclass nondegenerate fallback changed") + exact_list(child_c.complement_in(candidate.Label((1, 2, 4))), child_o.complement_in(oracle.Label((1, 2, 4)))) + counts["fallback_cases"] += 2 + + # Reject rebinding modules whose helpers or target methods have changed. + for name in ("dot", "rank", "method"): + changed = load_source("_matrix_binding_rejection_" + name) + if name == "method": + changed.Label.complement_in = lambda self, other: [] + else: + setattr(changed, name, lambda *args: 0) + failure = capture(lambda: bind(changed, native)) + require(failure[0] == "error" and failure[1] == "RuntimeError", "Binding guard admitted changed source code") + counts["binding_rejections"] += 1 + for bad in ((1 << 64,), (-1,), (True,), (IntSubclass(1),)): + require(native.gram_rank(dict(enumerate(bad))) is NotImplemented, "Native bound/type fallback failed") + require(native.complement(dict(enumerate((1,))), dict(enumerate(coordinates64))) is NotImplemented, + "Native augmented-width bound failed") + + # These independent checks must catch a mathematically wrong result and a + # same-subspace reordered witness respectively, including under python -O. + bad_math = capture(lambda: independent_complement([1], [1, 2], [1])) + require(bad_math[0] == "error", "Independent complement control accepted a wrong result") + bad_order = capture(lambda: exact_list([4, 2], [2, 4])) + require(bad_order[0] == "error", "Ordered witness control accepted a reordered result") + counts["oracle_negative_controls"] += 2 + + # A bounded fixed corpus drawn from the frozen h25 label families; repeated + # timings include dict conversion and dispatch, and remain diagnostic only. + full = tuple(1 << i for i in range(25)) + star = tuple(3 | (1 << i) for i in range(2, 25)) + fixtures = [(full[:12], full), (star, full), ((7,), full), ((), full)] + for small, big in fixtures: + complement_case(small, big) + gram_case(small) + gram_case(big) + oracle_pairs = [(raw(oracle.Label, u), raw(oracle.Label, v)) for u, v in fixtures] + candidate_pairs = [(raw(candidate.Label, u), raw(candidate.Label, v)) for u, v in fixtures] + micro = {} + micro_results = {} + for name, pairs in (("unchanged_python", oracle_pairs), ("native_with_conversion", candidate_pairs)): + start_wall, start_cpu = time.perf_counter(), time.process_time() + saved = [] + for _ in range(128): + for small, big in pairs: + saved.append((small.complement_in(big), small.nondegenerate(), big.nondegenerate())) + micro[name] = {"wall_seconds": time.perf_counter() - start_wall, + "cpu_seconds": time.process_time() - start_cpu} + micro_results[name] = saved + require(micro_results["unchanged_python"] == micro_results["native_with_conversion"], + "Fixed conversion-plus-kernel micro corpus changed") + require(all(value > 0 for value in state["counters"].values()), "A native or fallback path was untested") + v2 = v2_binding_and_trace_controls(native) + return {"status": "FINITE_NATIVE_GF2_CONTROLS_PASS", "counts": counts, + "native_and_fallback_calls": dict(state["counters"]), + "fixture_sha256": transcript.hexdigest(), "micro": micro, "v2_controls": v2, + "micro_repetitions": 128, "micro_fixtures": len(fixtures), + "micro_scope": "Fixed h25 label families with conversion; diagnostic only, not complete side speed", + "independent_oracle": "Dense binary lists, descending pivots, addition modulo 2; no packed/source/native helpers"} + + +def v2_binding_and_trace_controls(native): + """Fail-closed lookup/dispatch drift and symmetric complete transcript controls.""" + counts = {"prebind_shadow_rejections": 0, "effective_builtins_rejections": 0, + "postbind_drift_rejections": 0, "class_dispatch_rejections": 0, + "real_builtin_drift_rejections": 0, "trace_pairs": 0, + "trace_negative_controls": 0, "native_proxy_rejections": 0} + observed = [] + + def bad_helper(*args, **kwargs): + observed.append("modified helper executed") + return 0 + + def rejected(action, message): + before = list(observed) + outcome = capture(action) + require(outcome[0] == "error" and outcome[1] == "RuntimeError", message) + require(observed == before, "A drift check invoked the modified helper/descriptor") + + class NativeProxy: + def __getattribute__(self, name): + observed.append("native proxy attribute read") + return bad_helper + proxy_source = load_source("_matrix_v2_native_proxy") + rejected(lambda: bind(proxy_source, NativeProxy()), "Native proxy admitted before type check") + counts["native_proxy_rejections"] += 1 + + # Check every relevant effective builtin lookup, not just function bytecode. + for name in ("list", "sum", "enumerate", "len", "range", "next", "max", "all", "tuple", "sorted"): + changed = load_source("_matrix_v2_shadow_" + name) + changed.__dict__[name] = bad_helper + rejected(lambda: bind(changed, native), "Prebind global builtin shadow admitted: " + name) + counts["prebind_shadow_rejections"] += 1 + + # FunctionType captures the active builtins pointer at construction time. + # Restoring module.__builtins__ cannot make this forged function acceptable. + changed = load_source("_matrix_v2_function_builtins") + canonical_builtins = changed.__dict__["__builtins__"] + changed.__dict__["__builtins__"] = dict(canonical_builtins, sum=bad_helper) + forged = FunctionType(changed.Label.nondegenerate.__code__, changed.__dict__) + changed.__dict__["__builtins__"] = canonical_builtins + changed.Label.nondegenerate = forged + rejected(lambda: bind(changed, native), "Forged effective function builtins admitted") + counts["effective_builtins_rejections"] += 1 + changed = load_source("_matrix_v2_module_builtins") + changed.__dict__["__builtins__"] = dict(changed.__dict__["__builtins__"]) + rejected(lambda: bind(changed, native), "Alternate module builtins owner admitted") + counts["effective_builtins_rejections"] += 1 + + for name in ("basis", "__getattribute__"): + changed = load_source("_matrix_v2_pre_descriptor_" + name) + if name == "basis": + changed.Label.basis = property(bad_helper) + else: + changed.Label.__getattribute__ = bad_helper + rejected(lambda: bind(changed, native), "Prebind custom Label dispatch admitted") + counts["class_dispatch_rejections"] += 1 + + mutations = ( + ("dot_identity", lambda module, state: setattr(module, "dot", bad_helper)), + ("rank_identity", lambda module, state: setattr(module, "rank", bad_helper)), + ("sum_shadow", lambda module, state: setattr(module, "sum", bad_helper)), + ("list_shadow", lambda module, state: setattr(module, "list", bad_helper)), + ("module_builtins", lambda module, state: module.__dict__.__setitem__("__builtins__", dict(builtins.__dict__))), + ("dot_code", lambda module, state: setattr(module.dot, "__code__", (lambda x, y: 0).__code__)), + ("dot_defaults", lambda module, state: setattr(module.dot, "__defaults__", (0,))), + ("saved_method_code", lambda module, state: setattr(state["original_nondegenerate"], "__code__", (lambda self: False).__code__)), + ("label_init_code", lambda module, state: setattr(module.Label.__init__, "__code__", (lambda self, vectors: None).__code__)), + ("basis_descriptor", lambda module, state: setattr(module.Label, "basis", property(bad_helper))), + ("getattribute_dispatch", lambda module, state: setattr(module.Label, "__getattribute__", bad_helper)), + ("label_global", lambda module, state: setattr(module, "Label", object)), + ) + for name, mutate in mutations: + module = load_source("_matrix_v2_post_" + name) + state = bind(module, native) + small, big = raw(module.Label, (1,)), raw(module.Label, (1, 2)) + # Capture bound entry points before changing class attribute dispatch. + gram_call = small.nondegenerate + complement_call = small.complement_in + before = dict(state["counters"]) + mutate(module, state) + rejected(gram_call, "Postbind drift admitted by nondegenerate: " + name) + rejected(lambda: complement_call(big), "Postbind drift admitted by complement: " + name) + require(state["counters"] == before, "Drift reached native work or fallback") + counts["postbind_drift_rejections"] += 2 + + # The shared builtins dictionary is restored in finally before any following + # numerical fixture. No altered builtin is called to observe the mutation. + for postbind in (False, True): + module = load_source("_matrix_v2_real_builtin_" + str(postbind)) + if postbind: + state = bind(module, native) + small = raw(module.Label, (1,)) + call = small.nondegenerate + before = dict(state["counters"]) + original_sum = builtins.sum + try: + builtins.sum = bad_helper + rejected(call if postbind else lambda: bind(module, native), "Shared builtin drift admitted") + finally: + builtins.sum = original_sum + if postbind: + require(state["counters"] == before, "Shared builtin drift reached arithmetic") + counts["real_builtin_drift_rejections"] += 1 + + # Native dispatch mutation is rejected even though the wrapper retains the + # original C callable. Restore it before another independently bound module. + module = load_source("_matrix_v2_native_dispatch") + state = bind(module, native) + small = raw(module.Label, (1,)) + before = dict(state["counters"]) + original_native = native.gram_rank + try: + native.gram_rank = bad_helper + rejected(small.nondegenerate, "Changed native dispatch admitted") + finally: + native.gram_rank = original_native + require(state["counters"] == before, "Native dispatch drift reached arithmetic") + counts["postbind_drift_rejections"] += 1 + + # Both complete arms have the same observer and bytes; ordinary unsupported + # integer width still works with tracing, while custom containers are never + # observed by the full-run trace and keep their existing finite fallback tests. + oracle = load_source("_matrix_v2_trace_oracle") + candidate = load_source("_matrix_v2_trace_candidate") + guard_module(oracle) + oracle_rank, candidate_rank = [], [] + oracle_trace = ComplementTrace(oracle.Label) + candidate_trace = ComplementTrace(candidate.Label) + attach_trace(oracle, oracle_rank, oracle_trace) + bind(candidate, native, candidate_rank, candidate_trace) + fixtures = [((), ()), ((), (1, 2, 4)), ((1,), (1, 2, 4)), + ((3, 5), (1, 2, 4)), ((4, 1), (4, 2, 1)), + ((1 << 64,), (1, 1 << 64)), ((1 << 100,), (1, 2, 1 << 100))] + for us, vs in fixtures: + left_o, right_o = raw(oracle.Label, us), raw(oracle.Label, vs) + left_c, right_c = raw(candidate.Label, us), raw(candidate.Label, vs) + exact_list(left_c.complement_in(right_c), left_o.complement_in(right_o)) + require(left_c.nondegenerate() is left_o.nondegenerate(), "Traced Gram result changed") + counts["trace_pairs"] += 1 + require(oracle_trace.receipt() == candidate_trace.receipt() and oracle_rank == candidate_rank, + "Baseline/candidate exact ordered stream differs") + list_trace, none_trace = ComplementTrace(oracle.Label), ComplementTrace(oracle.Label) + list_trace.after(((), ()), []) + none_trace.after(((), ()), None) + require(list_trace.receipt()["sha256"] != none_trace.receipt()["sha256"], "Trace conflates [] with None") + order_a, order_b = ComplementTrace(oracle.Label), ComplementTrace(oracle.Label) + order_a.after(((1,), (1, 2, 4)), [2, 4]) + order_b.after(((1,), (1, 2, 4)), [4, 2]) + require(order_a.receipt()["sha256"] != order_b.receipt()["sha256"], "Trace loses output order") + input_a, input_b = ComplementTrace(oracle.Label), ComplementTrace(oracle.Label) + input_a.after(((1, 2), (1, 2, 4)), [4]) + input_b.after(((2, 1), (1, 2, 4)), [4]) + require(input_a.receipt()["sha256"] != input_b.receipt()["sha256"], "Trace loses input order") + invalid = raw(oracle.Label, (1,), BrokenValues) + rejected(lambda: oracle_trace.before(invalid, raw(oracle.Label, (1,))), "Full trace accepted a side-effecting fallback container") + counts["trace_negative_controls"] += 4 + require(observed == [], "A guarded modified helper was invoked") + return {"status": "V2_RUNTIME_AND_COMPLEMENT_STREAM_PASS", "counts": counts, + "complement_fixture_stream": oracle_trace.receipt(), + "modified_helper_invocations": len(observed), + "runtime_policy": "Reject before native/fallback on source helper, effective builtins, class, function, closure or native dispatch drift"} diff --git a/research/gf2-full-network/engine/native_backend.py b/research/gf2-full-network/engine/native_backend.py new file mode 100644 index 0000000000..77e55ce9d0 --- /dev/null +++ b/research/gf2-full-network/engine/native_backend.py @@ -0,0 +1,386 @@ +"""Source-bound packed GF(2), with a fail-closed stable-runtime boundary. + +Supported bindings use the literal frozen source, ordinary built-ins and the +original Label dispatch. Resolved method/helper globals and built-ins, helper +code/defaults/closures and class/native dispatch must remain unchanged after +binding. Calls run serially with no mutation during a call; detected boundary +drift is rejected before arithmetic or fallback. This is not a sandbox +against arbitrary mutation of this backend or native process memory. +""" +from __future__ import annotations + +import builtins +import hashlib +import importlib.util +import json +from pathlib import Path +import shlex +import subprocess +import sys +import sysconfig +from types import BuiltinFunctionType, CodeType, FunctionType, GetSetDescriptorType, ModuleType + +ROOT = Path(__file__).resolve().parent +SOURCE = ROOT / "source" / "complex_circuit.py" +SOURCE_SHA256 = "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1" +CALLER_SHA256 = "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b" + +# Anchored operations keep drift checks independent of the source's lookup +# environment and avoid executing modified helper functions or descriptors. +_TYPE = type +_LEN = len +_INT = int +_DICT = dict +_LIST = list +_TUPLE = tuple +_OBJECT = object +_RUNTIME_ERROR = RuntimeError +_COMPILE = compile +_DICT_GET = dict.get +_DICT_VALUES = dict.values +_OBJECT_GETATTRIBUTE = object.__getattribute__ +_BUILTINS = builtins.__dict__ +_BUILTIN_NAMES = ("all", "enumerate", "len", "list", "max", "next", "range", + "sorted", "sum", "tuple", "int", "dict", "type", "object") +_CANONICAL_BUILTINS = {name: _BUILTINS[name] for name in _BUILTIN_NAMES} +_HELPER_NAMES = ("echelon", "reduce", "dot", "rank") +_TYPE_BUILTINS = {"list": _LIST, "tuple": _TUPLE, "int": _INT, + "dict": _DICT, "type": _TYPE, "object": _OBJECT} +_BIT_DESCRIPTORS = tuple((_INT, name, getattr(_INT, name)) for name in + ("bit_count", "bit_length", "__and__", "__xor__", "__lshift__", "__rshift__")) + + +def require(condition, message): + if not condition: + raise _RUNTIME_ERROR(message) + + +def _check_builtins(): + for name, expected in _CANONICAL_BUILTINS.items(): + require(_DICT_GET(_BUILTINS, name) is expected, "Runtime drift: builtin " + name) + if name in _TYPE_BUILTINS: + require(expected is _TYPE_BUILTINS[name], "Unexpected builtin type: " + name) + elif name in ("enumerate", "range"): + require(_TYPE(expected) is _TYPE and expected.__name__ == name and + expected.__module__ == "builtins" and not (expected.__flags__ & (1 << 9)), + "Unexpected builtin class: " + name) + else: + require(_TYPE(expected) is BuiltinFunctionType and expected.__name__ == name and + expected.__module__ == "builtins", "Unexpected builtin function: " + name) + for owner, name, descriptor in _BIT_DESCRIPTORS: + require(_TYPE.__getattribute__(owner, name) is descriptor, "Runtime drift: builtin integer semantics") + + +def verify_sources(): + raw = SOURCE.read_bytes() + require(hashlib.sha256(raw).hexdigest() == SOURCE_SHA256, "Frozen complex source changed") + caller = (ROOT / "source" / "complex_network.py").read_bytes() + require(hashlib.sha256(caller).hexdigest() == CALLER_SHA256, "Frozen caller source changed") + return raw + + +def load_source(name): + verify_sources() + spec = importlib.util.spec_from_file_location(name, SOURCE) + require(spec is not None and spec.loader is not None, "Missing frozen module loader") + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +def _code_shape(code): + """Compare source code using only exact immutable values, never user equality.""" + require(_TYPE(code) is CodeType, "Unexpected function code type") + def constant(value): + kind = _TYPE(value) + if value is None or value is Ellipsis: + return ("singleton", value is Ellipsis) + if kind is _INT or kind is bool or kind is str or kind is bytes: + return (kind.__name__, value) + if kind is _TUPLE: + return ("tuple", _TUPLE(constant(item) for item in value)) + if kind is CodeType: + return ("code", _code_shape(value)) + raise _RUNTIME_ERROR("Unexpected mutable or custom constant in frozen function") + fields = (code.co_argcount, code.co_posonlyargcount, code.co_kwonlyargcount, + code.co_nlocals, code.co_stacksize, code.co_flags, code.co_code, + code.co_names, code.co_varnames, code.co_freevars, code.co_cellvars, + code.co_exceptiontable, code.co_linetable, code.co_firstlineno, + code.co_filename, code.co_name, code.co_qualname, code.co_consts) + return _TUPLE(constant(value) for value in fields) + + +def guard_module(module): + """Validate code AND every resolved builtin/helper/Label dispatch owner.""" + _check_builtins() + raw = verify_sources() + require(_TYPE(module) is ModuleType, "Unexpected source module type") + namespace = module.__dict__ + require(_TYPE(_DICT_GET(namespace, "__file__")) is str and _TYPE(_DICT_GET(namespace, "__name__")) is str, "Unexpected source module metadata types") + require(Path(namespace["__file__"]).resolve() == SOURCE.resolve(), "Unexpected source module path") + require(_DICT_GET(namespace, "__builtins__") is _BUILTINS, "Changed source builtins owner") + for name in _BUILTIN_NAMES: + require(name not in namespace, "Source builtin shadow: " + name) + expected = _COMPILE(raw, str(SOURCE), "exec", dont_inherit=True, optimize=sys.flags.optimize) + codes = {code.co_name: code for code in expected.co_consts if _TYPE(code) is CodeType} + + def check(function, expected_code, name): + require(_TYPE(function) is FunctionType, "Non-function replacement: " + name) + require(function.__globals__ is namespace, "Changed function globals: " + name) + # A function captures its own builtins pointer when created; checking + # only the module's current __builtins__ slot would miss a forged one. + require(function.__builtins__ is _BUILTINS, "Changed effective function builtins: " + name) + require(function.__closure__ is None and function.__defaults__ is None and + function.__kwdefaults__ is None, "Changed function calling contract: " + name) + require(_code_shape(function.__code__) == _code_shape(expected_code), + "Changed frozen function code: " + name) + + for name in _HELPER_NAMES: + check(_DICT_GET(namespace, name), codes[name], name) + label = _DICT_GET(namespace, "Label") + require(_TYPE(label) is _TYPE and label.__mro__ == (label, _OBJECT), "Changed Label class shape") + require(_TYPE(label.__module__) is str and label.__module__ == module.__name__, "Changed Label module ownership") + methods = {code.co_name: code for code in codes["Label"].co_consts if _TYPE(code) is CodeType} + attributes = label.__dict__ + require(_LEN(attributes) == 4 + _LEN(methods), "Changed Label class attributes") + for name in ("__module__", "__doc__", "__dict__", "__weakref__"): + require(name in attributes, "Missing original Label descriptor") + for name in ("__dict__", "__weakref__"): + descriptor = attributes[name] + require(_TYPE(descriptor) is GetSetDescriptorType and descriptor.__objclass__ is label, + "Custom Label descriptor: " + name) + for name, code in methods.items(): + check(attributes.get(name), code, "Label." + name) + require(label.__getattribute__ is _OBJECT.__getattribute__ and label.__new__ is _OBJECT.__new__, + "Custom Label attribute or construction dispatch") + return label + + +class RuntimeGuard: + """Identity-only freshness checks; no modified callable is invoked.""" + def __init__(self, module, label, native, original_functions): + self.module = module + self.namespace = module.__dict__ + self.label = label + self.mro = label.__mro__ + self.class_items = _TUPLE(label.__dict__.items()) + self.global_items = _TUPLE((name, self.namespace[name]) for name in _HELPER_NAMES + ("Label", "__builtins__")) + functions = _LIST(original_functions) + functions.extend(value for _, value in self.class_items if _TYPE(value) is FunctionType) + functions.append(self.namespace["rank"]) + self.functions = _TUPLE((function, function.__code__, function.__globals__, function.__builtins__, + function.__defaults__, function.__kwdefaults__, function.__closure__, + () if function.__closure__ is None else + _TUPLE((cell, cell.cell_contents) for cell in function.__closure__)) + for function in functions) + self.native = native + require(_TYPE(native) is ModuleType, "Unexpected native module type") + self.native_items = _TUPLE((name, native.__dict__[name]) for name in ("gram_rank", "complement")) + for name, function in self.native_items: + require(_TYPE(function) is BuiltinFunctionType and function.__self__ is native, + "Changed native entry point: " + name) + self.check() + + def check(self): + # The source globals and Label remain a normal module and exact class; + # lookups below therefore do not invoke user-defined descriptors. + require(_TYPE(self.module) is ModuleType and self.module.__dict__ is self.namespace, + "Runtime drift: source module dispatch") + require(_TYPE(self.label) is _TYPE and self.label.__mro__ is self.mro, + "Runtime drift: Label class dispatch") + for name, value in self.global_items: + require(_DICT_GET(self.namespace, name) is value, "Runtime drift: source helper " + name) + for name, expected in _CANONICAL_BUILTINS.items(): + require(name not in self.namespace and _DICT_GET(_BUILTINS, name) is expected, + "Runtime drift: builtin lookup " + name) + attributes = self.label.__dict__ + require(_LEN(attributes) == _LEN(self.class_items), "Runtime drift: Label descriptors") + for name, value in self.class_items: + require(attributes.get(name) is value, "Runtime drift: Label member " + name) + for function, code, namespace, effective_builtins, defaults, kwdefaults, closure, cells in self.functions: + require(function.__code__ is code and function.__globals__ is namespace and + function.__builtins__ is effective_builtins and function.__defaults__ is defaults and + function.__kwdefaults__ is kwdefaults and function.__closure__ is closure, + "Runtime drift: function code or calling environment") + for cell, value in cells: + require(cell.cell_contents is value, "Runtime drift: wrapper closure") + require(_TYPE(self.native) is ModuleType, "Runtime drift: native module dispatch") + for name, function in self.native_items: + require(_DICT_GET(self.native.__dict__, name) is function, "Runtime drift: native entry point " + name) + + +class ComplementTrace: + """Stream every ordered complement input and typed output, without retention. + + Snapshotting is confined to the exact Label/exact dict/int domain of the + complete H25 workload. Finite fallback tests leave this observer disabled. + """ + def __init__(self, label): + self.label = label + self.count = 0 + self.bytes = 0 + self.hasher = hashlib.sha256() + + def before(self, small, big): + require(_TYPE(small) is self.label and _TYPE(big) is self.label, "Trace requires exact frozen Label objects") + big_dict = _OBJECT_GETATTRIBUTE(big, "__dict__") + small_dict = _OBJECT_GETATTRIBUTE(small, "__dict__") + require(_TYPE(big_dict) is _DICT and _TYPE(small_dict) is _DICT, "Trace requires ordinary instance dictionaries") + vs_basis = _DICT_GET(big_dict, "basis") + us_basis = _DICT_GET(small_dict, "basis") + require(_TYPE(vs_basis) is _DICT and _TYPE(us_basis) is _DICT, "Trace requires exact basis dictionaries") + vs = _TUPLE(_DICT_VALUES(vs_basis)) + us = _TUPLE(_DICT_VALUES(us_basis)) + require(all(_TYPE(value) is _INT for value in us + vs), "Trace requires exact integer vectors") + return us, vs + + def after(self, inputs, output): + us, vs = inputs + if output is None: + result = {"type": "None"} + else: + require(_TYPE(output) is _LIST and all(_TYPE(value) is _INT for value in output), + "Trace requires an exact integer list or None result") + result = {"type": "list", "values": output} + record = {"call": self.count, "us": us, "vs": vs, "result": result} + encoded = json.dumps(record, sort_keys=True, separators=(",", ":"), ensure_ascii=True).encode("ascii") + b"\n" + self.hasher.update(encoded) + self.bytes += _LEN(encoded) + self.count += 1 + + def receipt(self): + return {"calls": self.count, "canonical_stream_bytes": self.bytes, + "sha256": self.hasher.hexdigest(), + "schema": "v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors"} + + +def build_native(directory): + """Always cold compile/link/load once. The parent supplies the outer guard.""" + require(sys.implementation.name == "cpython" and sys.version_info[:2] == (3, 12), + "This qualification is frozen to CPython 3.12") + require(sys.platform.startswith("linux"), "This qualification is frozen to Linux") + directory = Path(directory) + require(not directory.exists(), "Refusing to reuse a native build directory") + directory.mkdir(parents=True) + source = ROOT / "native_gf2.c" + source_before = source.read_bytes() + source_hash = hashlib.sha256(source_before).hexdigest() + suffix = sysconfig.get_config_var("EXT_SUFFIX") + require(_TYPE(suffix) is str and suffix.endswith(".so"), "Unexpected extension suffix") + target = directory / ("_packed_gf2" + suffix) + compiler = shlex.split(sysconfig.get_config_var("CC") or "cc") + require(compiler, "Missing configured C compiler") + command = compiler + ["-shared", "-fPIC", "-O3", "-std=c11", "-Wall", "-Wextra", "-Werror", + "-I" + sysconfig.get_paths()["include"], str(source), "-o", str(target)] + completed = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, + text=True, timeout=90, check=False) + manifest = {"command": command, "returncode": completed.returncode, + "stdout": completed.stdout, "stderr": completed.stderr, + "c_source_sha256": source_hash, "python": sys.version, + "no_cached_binary": True} + (directory / "build.json").write_text(json.dumps(manifest, indent=2, sort_keys=True) + "\n") + require(completed.returncode == 0, "Native compilation failed; see build.json (no retry)") + require(source.read_bytes() == source_before, "Native source changed during compilation") + manifest["extension_sha256"] = hashlib.sha256(target.read_bytes()).hexdigest() + spec = importlib.util.spec_from_file_location("_packed_gf2", target) + require(spec is not None and spec.loader is not None, "Missing extension loader") + native = importlib.util.module_from_spec(spec) + spec.loader.exec_module(native) + (directory / "build.json").write_text(json.dumps(manifest, indent=2, sort_keys=True) + "\n") + return native, manifest + + +def attach_trace(module, rank_calls, complement_trace=None): + """Baseline observers; original arithmetic and return objects stay intact.""" + original_rank = module.rank + original_complement = module.Label.complement_in + + def traced_rank(rows): + frozen_rows = _TUPLE(rows) + answer = original_rank(frozen_rows) + require(_TYPE(answer) is _INT, "Rank output type changed") + rank_calls.append((frozen_rows, answer)) + return answer + + def traced_complement(self, other): + inputs = complement_trace.before(self, other) + answer = original_complement(self, other) + complement_trace.after(inputs, answer) + return answer + + module.rank = traced_rank + if complement_trace is not None: + module.Label.complement_in = traced_complement + return original_rank + + +def bind(module, native, rank_calls=None, complement_trace=None): + """Replace two methods only; any detected runtime drift is a hard failure.""" + require(_TYPE(native) is ModuleType, "Unexpected native module type") + native_complement = _DICT_GET(native.__dict__, "complement") + native_gram = _DICT_GET(native.__dict__, "gram_rank") + require(_TYPE(native_complement) is BuiltinFunctionType and native_complement.__self__ is native and + _TYPE(native_gram) is BuiltinFunctionType and native_gram.__self__ is native, + "Missing or replaced native entry points") + label = guard_module(module) + original_functions = [module.__dict__[name] for name in _HELPER_NAMES] + original_functions.extend(value for value in label.__dict__.values() if _TYPE(value) is FunctionType) + original_complement = label.complement_in + original_nondegenerate = label.nondegenerate + original_dot = module.dot + original_rank = module.rank + if rank_calls is not None: + attach_trace(module, rank_calls) + counters = {"complement_native": 0, "complement_fallback": 0, + "gram_native": 0, "gram_fallback": 0} + runtime = None + + def complement_in(self, other): + runtime.check() + inputs = None if complement_trace is None else complement_trace.before(self, other) + if _TYPE(self) is label and _TYPE(other) is label: + big_dict = _OBJECT_GETATTRIBUTE(other, "__dict__") + small_dict = _OBJECT_GETATTRIBUTE(self, "__dict__") + if _TYPE(big_dict) is _DICT and _TYPE(small_dict) is _DICT: + big = _DICT_GET(big_dict, "basis") + small = _DICT_GET(small_dict, "basis") + if _TYPE(big) is _DICT and _TYPE(small) is _DICT: + result = native_complement(small, big) + if result is not NotImplemented: + counters["complement_native"] += 1 + if complement_trace is not None: + complement_trace.after(inputs, result) + return result + counters["complement_fallback"] += 1 + result = original_complement(self, other) + if complement_trace is not None: + complement_trace.after(inputs, result) + return result + + def nondegenerate(self): + runtime.check() + if _TYPE(self) is label: + instance = _OBJECT_GETATTRIBUTE(self, "__dict__") + if _TYPE(instance) is _DICT: + basis = _DICT_GET(instance, "basis") + if _TYPE(basis) is _DICT: + answer = native_gram(basis) + if answer is not NotImplemented: + rows, rank = answer + if rank_calls is not None: + require(_TYPE(rank) is _INT, "Native rank output type changed") + rank_calls.append((rows, rank)) + counters["gram_native"] += 1 + return rank == _LEN(rows) + counters["gram_fallback"] += 1 + return original_nondegenerate(self) + + label.complement_in = complement_in + label.nondegenerate = nondegenerate + # Set the closure before capturing it, then initialize the guard in place. + # Thus every captured cell identity is its final stable value. + runtime = _OBJECT.__new__(RuntimeGuard) + RuntimeGuard.__init__(runtime, module, label, native, original_functions) + return {"counters": counters, "original_complement": original_complement, + "original_nondegenerate": original_nondegenerate, "original_dot": original_dot, + "original_rank": original_rank, "label": label, "runtime_guard": runtime} diff --git a/research/gf2-full-network/engine/native_gf2.c b/research/gf2-full-network/engine/native_gf2.c new file mode 100644 index 0000000000..0b6a835981 --- /dev/null +++ b/research/gf2-full-network/engine/native_gf2.c @@ -0,0 +1,209 @@ +#define PY_SSIZE_T_CLEAN +#include +#include +#include + +/* This module is deliberately bounded. Unsupported inputs return the sentinel + * NotImplemented; the Python binder calls the unchanged source implementation. + * No Python integer is truncated, and the GIL remains held for each bounded call. + */ +_Static_assert(sizeof(unsigned long long) * CHAR_BIT == 64, + "This finite backend requires 64-bit unsigned long long"); + +/* Read exact dict values in their insertion order. Keys are not observed by the + * original two methods either. Return 1 for supported inputs, 0 for fallback, + * and -1 for a genuine Python error. No caller object is changed. + */ +static int read_vectors(PyObject *basis, uint64_t vectors[64], Py_ssize_t *count) { + Py_ssize_t position = 0; + Py_ssize_t length; + Py_ssize_t at = 0; + PyObject *key; + PyObject *value; + if (!PyDict_CheckExact(basis)) return 0; + length = PyDict_Size(basis); + if (length < 0) return -1; + if (length > 64) return 0; + while (PyDict_Next(basis, &position, &key, &value)) { + unsigned long long converted; + (void)key; + if (!PyLong_CheckExact(value)) return 0; + converted = PyLong_AsUnsignedLongLong(value); + if (PyErr_Occurred()) { + if (PyErr_ExceptionMatches(PyExc_OverflowError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + if (at >= length) { + PyErr_SetString(PyExc_RuntimeError, "basis size changed during conversion"); + return -1; + } + vectors[at++] = (uint64_t)converted; + } + if (at != length) { + PyErr_SetString(PyExc_RuntimeError, "basis size changed during conversion"); + return -1; + } + *count = length; + return 1; +} + +/* XOR folding preserves parity; 0x6996 encodes parity of the low four bits. */ +static unsigned parity64(uint64_t x) { + x ^= x >> 32; + x ^= x >> 16; + x ^= x >> 8; + x ^= x >> 4; + return (unsigned)((UINT64_C(0x6996) >> (x & UINT64_C(15))) & UINT64_C(1)); +} + +/* Only the scalar rank is observed. Forward elimination is sufficient. */ +static Py_ssize_t binary_rank(uint64_t rows[64], Py_ssize_t n) { + Py_ssize_t rank = 0; + unsigned column; + for (column = 0; column < 64 && rank < n; ++column) { + uint64_t bit = UINT64_C(1) << column; + Py_ssize_t pivot = rank; + Py_ssize_t i; + uint64_t temp; + while (pivot < n && !(rows[pivot] & bit)) ++pivot; + if (pivot == n) continue; + temp = rows[rank]; rows[rank] = rows[pivot]; rows[pivot] = temp; + for (i = rank + 1; i < n; ++i) { + if (rows[i] & bit) rows[i] ^= rows[rank]; + } + ++rank; + } + return rank; +} + +/* Return (the original ordered Gram rows, its exact rank), so the same full + * rank transcript can be recorded by both benchmark arms. The public Label + * method still returns exactly bool, including True for the empty basis. + */ +static PyObject *gram_rank(PyObject *self, PyObject *args) { + PyObject *basis; + uint64_t vectors[64]; + uint64_t rows[64]; + uint64_t work[64]; + Py_ssize_t n = 0; + Py_ssize_t i; + Py_ssize_t j; + Py_ssize_t rank; + int accepted; + PyObject *gram; + PyObject *rank_value; + PyObject *answer; + (void)self; + if (!PyArg_ParseTuple(args, "O:gram_rank", &basis)) return NULL; + accepted = read_vectors(basis, vectors, &n); + if (accepted < 0) return NULL; + if (!accepted) Py_RETURN_NOTIMPLEMENTED; + for (i = 0; i < n; ++i) { + uint64_t row = 0; + for (j = 0; j < n; ++j) { + row |= (uint64_t)parity64(vectors[i] & vectors[j]) << (unsigned)j; + } + rows[i] = row; + work[i] = row; + } + rank = binary_rank(work, n); + gram = PyTuple_New(n); + if (gram == NULL) return NULL; + for (i = 0; i < n; ++i) { + PyObject *value = PyLong_FromUnsignedLongLong((unsigned long long)rows[i]); + if (value == NULL) { Py_DECREF(gram); return NULL; } + PyTuple_SET_ITEM(gram, i, value); + } + rank_value = PyLong_FromSsize_t(rank); + if (rank_value == NULL) { Py_DECREF(gram); return NULL; } + answer = PyTuple_New(2); + if (answer == NULL) { Py_DECREF(gram); Py_DECREF(rank_value); return NULL; } + PyTuple_SET_ITEM(answer, 0, gram); + PyTuple_SET_ITEM(answer, 1, rank_value); + return answer; +} + +/* Literal ordered augmented-row algorithm from Label.complement_in. + * low k bits: pairings against self, in self.basis insertion order. + * high n bits: coefficient identity for other.basis, in its insertion order. + * The first available pivot and ALL-row clearing match the source exactly; + * output rows stay in the identical order and are not re-canonicalized. + */ +static PyObject *complement(PyObject *self, PyObject *args) { + PyObject *small; + PyObject *big; + uint64_t us[64]; + uint64_t vs[64]; + uint64_t rows[64]; + Py_ssize_t k = 0; + Py_ssize_t n = 0; + Py_ssize_t i; + Py_ssize_t j; + Py_ssize_t column; + Py_ssize_t rank = 0; + int accepted; + uint64_t low_mask; + PyObject *out; + (void)self; + if (!PyArg_ParseTuple(args, "OO:complement", &small, &big)) return NULL; + accepted = read_vectors(big, vs, &n); + if (accepted < 0) return NULL; + if (!accepted) Py_RETURN_NOTIMPLEMENTED; + accepted = read_vectors(small, us, &k); + if (accepted < 0) return NULL; + if (!accepted || k + n > 64) Py_RETURN_NOTIMPLEMENTED; + for (i = 0; i < n; ++i) { + uint64_t row = UINT64_C(1) << (unsigned)(k + i); + for (j = 0; j < k; ++j) { + row |= (uint64_t)parity64(vs[i] & us[j]) << (unsigned)j; + } + rows[i] = row; + } + for (column = 0; column < k; ++column) { + uint64_t bit = UINT64_C(1) << (unsigned)column; + Py_ssize_t pivot = rank; + uint64_t temp; + while (pivot < n && !(rows[pivot] & bit)) ++pivot; + if (pivot == n) continue; + temp = rows[rank]; rows[rank] = rows[pivot]; rows[pivot] = temp; + for (i = 0; i < n; ++i) { + if (i != rank && (rows[i] & bit)) rows[i] ^= rows[rank]; + } + ++rank; + } + low_mask = k == 64 ? UINT64_MAX : ((UINT64_C(1) << (unsigned)k) - UINT64_C(1)); + out = PyList_New(n - rank); + if (out == NULL) return NULL; + for (i = rank; i < n; ++i) { + uint64_t x = 0; + PyObject *value; + if (rows[i] & low_mask) { + Py_DECREF(out); + PyErr_SetString(PyExc_AssertionError, ""); + return NULL; + } + for (j = 0; j < n; ++j) { + if ((rows[i] >> (unsigned)(k + j)) & UINT64_C(1)) x ^= vs[j]; + } + value = PyLong_FromUnsignedLongLong((unsigned long long)x); + if (value == NULL) { Py_DECREF(out); return NULL; } + PyList_SET_ITEM(out, i - rank, value); + } + return out; +} + +static PyMethodDef methods[] = { + {"gram_rank", gram_rank, METH_VARARGS, "Ordered GF(2) Gram rows and exact rank, or NotImplemented."}, + {"complement", complement, METH_VARARGS, "Exact ordered GF(2) complement vectors, or NotImplemented."}, + {NULL, NULL, 0, NULL} +}; +static struct PyModuleDef module_definition = { + PyModuleDef_HEAD_INIT, "_packed_gf2", "Bounded exact GF(2) verification kernels.", + -1, methods, NULL, NULL, NULL, NULL +}; +PyMODINIT_FUNC PyInit__packed_gf2(void) { + return PyModule_Create(&module_definition); +} diff --git a/research/gf2-full-network/engine/profile_side_verifier.py b/research/gf2-full-network/engine/profile_side_verifier.py new file mode 100644 index 0000000000..807855eb87 --- /dev/null +++ b/research/gf2-full-network/engine/profile_side_verifier.py @@ -0,0 +1,193 @@ +#!/usr/bin/env python3 +"""Diagnostic profile of an unchanged, frozen h=25 side verification scope. + +This is not complex_network.certificate(), a selected-frontier replay, a +construction search, or a performance qualification. Run only under the +parent's serial process-group guard. No compiler or third-party dependency. +""" +from __future__ import annotations + +import argparse +import ast +from collections import Counter +import cProfile +import hashlib +import importlib.util +import json +import os +from pathlib import Path +import pstats +import sys +import time + +BASE_MAIN = "de5ec2e7a6074068452f45b1a191b5c72832df4a" +PINS = { + "complex_circuit.py": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1", + "complex_network.py": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b", +} +ROOT = Path(__file__).resolve().parent + + +def require(condition, message): + if not condition: + raise RuntimeError(message) + + +def canonical(value): + return json.dumps(value, sort_keys=True, separators=(",", ":"), ensure_ascii=True).encode("ascii") + + +def digest(value): + return hashlib.sha256(canonical(value)).hexdigest() + + +def source_check(): + for name, expected in PINS.items(): + actual = hashlib.sha256((ROOT / "source" / name).read_bytes()).hexdigest() + require(actual == expected, "Source digest changed: " + name) + tree = ast.parse((ROOT / "source" / "complex_network.py").read_text()) + hs = [ast.literal_eval(node.value) for node in tree.body + if isinstance(node, ast.Assign) and + any(isinstance(target, ast.Name) and target.id == "H" for target in node.targets)] + require(hs == [25], "The unchanged caller no longer freezes H=25") + return hs[0] + + +def run_side(h, rank_calls, phases): + def phase(name, action): + start_wall = time.perf_counter() + start_cpu = time.process_time() + value = action() + phases[name] = {"wall_seconds": time.perf_counter() - start_wall, + "cpu_seconds": time.process_time() - start_cpu} + return value + + def load(): + spec = importlib.util.spec_from_file_location("_frozen_matrix_complex_circuit", ROOT / "source" / "complex_circuit.py") + require(spec is not None and spec.loader is not None, "Cannot load frozen module") + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + module = phase("load", load) + original_rank = module.rank + + def traced_rank(rows): + frozen_rows = tuple(rows) + result = original_rank(frozen_rows) + require(type(result) is int, "Rank result changed its exact type") + rank_calls.append((frozen_rows, result)) + return result + + module.rank = traced_rank + circuit = phase("construction", lambda: module.ComplexSideCircuit(h)) + checks = phase("checks_initialization", lambda: module.Checks(circuit)) + code = phase("compile_roles", lambda: module.compile_roles(circuit)) + side_map = phase("verify_map", checks.verify_map) + labels = phase("verify_labels", checks.verify_labels) + roles = phase("verify_role_frames", lambda: module.verify_role_frames(circuit, checks, code)) + # These are exactly the complete finite side checks called, in this order, + # by complex_network.certificate(). No mathematical parameters are varied. + result = {"circuit": circuit.stats(), "side_map": side_map, + "labels": labels, "role_frames": roles} + return circuit, checks, code, result + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--output", type=Path, required=True) + args = parser.parse_args() + require(sys.flags.optimize == 0, "This source uses assert; profile must run without -O") + sys.dont_write_bytecode = True + require(not args.output.exists(), "Refusing to overwrite diagnostic evidence") + args.output.mkdir(parents=True) + h = source_check() + profile = cProfile.Profile() + rank_calls = [] + phases = {} + start_wall = time.perf_counter() + start_cpu = time.process_time() + circuit, checks, code, result = profile.runcall(run_side, h, rank_calls, phases) + profile_cpu = time.process_time() - start_cpu + profile_wall = time.perf_counter() - start_wall + profile.dump_stats(str(args.output / "profile.pstats")) + stats = pstats.Stats(profile) + targeted = [] + all_source = [] + for (filename, line, name), (primitive, total, self_time, cumulative, callers) in stats.stats.items(): + if filename.endswith("complex_circuit.py"): + row = {"name": name, "line": line, "primitive_calls": primitive, + "total_calls": total, "self_seconds": self_time, + "cumulative_seconds": cumulative} + all_source.append(row) + if name in {"rank", "echelon", "reduce", "dot", "complement_in", "nondegenerate"}: + targeted.append(row) + shape_counts = Counter((len(rows), max((x.bit_length() for x in rows), default=0)) + for rows, _ in rank_calls) + unique = {} + for rows, rank in rank_calls: + previous = unique.setdefault(rows, rank) + require(previous == rank, "Identical rank matrices produced different outputs") + # Preserve the ordered trace, exact rows and expected outputs. This frozen + # corpus enables a later conversion-plus-native check without a new search. + with (args.output / "rank-trace.jsonl").open("x", encoding="ascii") as output: + for rows, rank in rank_calls: + output.write(canonical({"rows": rows, "rank": rank}).decode("ascii") + "\n") + rank_corpus = [{"rows": rows, "rank": rank} for rows, rank in sorted(unique.items())] + (args.output / "rank-corpus.json").write_bytes(canonical(rank_corpus) + b"\n") + # Basis dictionary insertion order, labels, pivots, role order and coefficient + # numerators/denominators are all hashed without normalization of witnesses. + witnesses = { + "support": circuit.support, + "args": circuit.args, + "kind": circuit.kind, + "active": sorted(circuit.active), + "pieces": [(target, node, (coefficient.numerator, coefficient.denominator)) + for target, node, coefficient in circuit.pieces], + "labels": [(key, list(label.basis.items()), label.dim, label.key) + for key, label in checks.cache.items()], + "code": {"roles": code["roles"], "gates": code["gates"], + "sources": list(code["sources"].items()), + "outputs": list(code["outputs"].items())}, + } + receipt = { + "status": "DIAGNOSTIC_COMPLETE_SIDE_SCOPE_ONLY", + "base_main": BASE_MAIN, + "sources": PINS, + "unchanged_caller": "scripts/complex_network.py:certificate (side verification segment)", + "h": h, + "result": result, + "result_sha256": digest(result), + "exact_witness_sha256": digest(witnesses), + "rank_trace_sha256": digest(rank_calls), + "rank_call_count": len(rank_calls), + "rank_distinct_matrix_count": len(unique), + "rank_shape_counts": [{"rows": r, "columns": c, "calls": n} + for (r, c), n in sorted(shape_counts.items())], + "profiled_complete_side_wall_seconds": profile_wall, + "profiled_complete_side_cpu_seconds": profile_cpu, + "profiled_phases": phases, + "targeted_functions": sorted(targeted, key=lambda item: item["cumulative_seconds"], reverse=True), + "all_source_functions": sorted(all_source, key=lambda item: item["self_seconds"], reverse=True), + "environment": {"python": sys.version, "executable": sys.executable, + "platform": sys.platform, "pid": os.getpid()}, + "limitations": [ + "Profiled timings include cProfile and exact rank-trace instrumentation.", + "Cumulative times are nested and must not be summed.", + "No native code or candidate execution; no speedup established.", + "The complete side verification segment is not the full complex-network certificate.", + "No PR5864 workload is executed and no matrix time counts toward its improvement target.", + "No new construction, parameter search, kappa admission or formal theorem verification.", + ], + } + (args.output / "receipt.json").write_text(json.dumps(receipt, indent=2, sort_keys=True) + "\n") + print(json.dumps({"status": receipt["status"], "h": h, + "wall_seconds": profile_wall, "cpu_seconds": profile_cpu, + "rank_calls": len(rank_calls), "rank_distinct_matrices": len(unique), + "result_sha256": receipt["result_sha256"], + "exact_witness_sha256": receipt["exact_witness_sha256"], + "targeted_functions": receipt["targeted_functions"]}, sort_keys=True)) + + +if __name__ == "__main__": + main() diff --git a/research/gf2-full-network/engine/source/complex_circuit.py b/research/gf2-full-network/engine/source/complex_circuit.py new file mode 100644 index 0000000000..9e83a1065c --- /dev/null +++ b/research/gf2-full-network/engine/source/complex_circuit.py @@ -0,0 +1,454 @@ +#!/usr/bin/env python3 +"""Compressed side correction for the complex network, with binary frames. + +Target S must receive (1/2) * sum{x_T : T disjoint from S} +minus (1/2) * sum{x_T : |S cap T| = 2}. Both sums are computed by +cancellation-free addition graphs and injected as pieces with those weights. + +Labels are subspaces of F2^h with the dot product. A disjoint-sum node carries +the coordinate space of its covered points; a pair-star node carries the span +of its triple indicators, which is orthonormal. An injected piece must leave a +point outside S uncovered: the residual up to t_S^perp then contains an odd +coordinate vector. A disjoint piece covering every point outside S would have +the alternating residual , so the disjoint sum is split. +""" +from fractions import Fraction as Q +from itertools import combinations + +EMPTY = frozenset() + + +def subsets(points, k): + return [frozenset(c) for j in range(min(k, len(points))+1) + for c in combinations(points, j)] + + +class ComplexSideCircuit: + def __init__(self, h): + assert h >= 8, 'Need at least four points outside every target' + self.h = h + self.triples = list(combinations(range(h), 3)) + self.index = {t: i for i, t in enumerate(self.triples)} + self.support = [0]; self.args = [None]; self.kind = [None] + self.lookup = {}; self.input = {} + for i, t in enumerate(self.triples): + self.input[t] = len(self.support) + self.support.append(1 << i); self.args.append(None); self.kind.append('in') + self.points = {} # covered point masks, filled lazily + self.pieces = [] # (target, node, coefficient) + self.build_disjoint() + self.build_pair_stars() + self.prune() + + # -- node store ------------------------------------------------------- + def x(self, *pts): + return self.input[tuple(sorted(pts))] + + def add(self, a, b, kind): + if not a: return b + if not b: return a + sa, sb = self.support[a], self.support[b] + assert not sa & sb, 'Cancellation is forbidden' + key = (kind, sa | sb) + node = self.lookup.get(key) + if node is None: + node = len(self.support) + self.lookup[key] = node + self.support.append(sa | sb); self.args.append((a, b)); self.kind.append(kind) + return node + + def total(self, nodes, kind): + nodes = [x for x in nodes if x] + while len(nodes) > 1: + nodes = [self.add(nodes[i], nodes[i+1], kind) if i+1 < len(nodes) else nodes[i] + for i in range(0, len(nodes), 2)] + return nodes[0] if nodes else 0 + + # -- disjoint sums ---------------------------------------------------- + def vec(self, items, k): + """{E: sum of item nodes whose points avoid E}, |E| <= k.""" + if not items: return {EMPTY: 0} + if len(items) == 1: + p, node = items[0] + return {EMPTY: node, frozenset([p]): 0} if k else {EMPTY: node} + half = len(items)//2 + A = self.vec(items[:half], k); B = self.vec(items[half:], k) + return {ea | eb: self.add(xa, xb, 'd0') for ea, xa in A.items() + for eb, xb in B.items() if len(ea)+len(eb) <= k} + + def pairs(self, pts, weight, k): + """{E: sum of weight(u,v) over pairs avoiding E}, |E| <= k.""" + if len(pts) < 2: return {E: 0 for E in subsets(pts, k)} + half = len(pts)//2; L, R = pts[:half], pts[half:] + PL = self.pairs(L, weight, k); PR = self.pairs(R, weight, k) + rows = {u: self.vec([(r, weight(u, r)) for r in R], k) for u in L} + cross = {} + for ER in subsets(R, k): + for EL, node in self.vec([(u, rows[u][ER]) for u in L], k-len(ER)).items(): + cross[EL, ER] = node + return {EL | ER: self.total([xl, xr, cross[EL, ER]], 'd0') + for EL, xl in PL.items() for ER, xr in PR.items() if len(EL)+len(ER) <= k} + + def tri_parts(self, pts, k): + """Recursive halves and the two mixed families, before combination.""" + half = len(pts)//2; L, R = pts[:half], pts[half:] + TL = self.tri(L, k); TR = self.tri(R, k) + PR = {r: self.pairs(L, lambda u, v, r=r: self.x(u, v, r), k) for r in R} + PL = {u: self.pairs(R, lambda a, b, u=u: self.x(u, a, b), k) for u in L} + return L, R, TL, TR, PR, PL + + def tri(self, pts, k): + """{E: sum of triples inside pts avoiding E}, |E| <= k.""" + if len(pts) < 3: return {E: 0 for E in subsets(pts, k)} + L, R, TL, TR, PR, PL = self.tri_parts(pts, k) + c21 = {}; c12 = {} + for EL in subsets(L, k): + for ER, node in self.vec([(r, PR[r][EL]) for r in R], k-len(EL)).items(): + c21[EL, ER] = node + for ER in subsets(R, k): + for EL, node in self.vec([(u, PL[u][ER]) for u in L], k-len(ER)).items(): + c12[EL, ER] = node + return {EL | ER: self.total([xl, xr, c21[EL, ER], c12[EL, ER]], 'd0') + for EL, xl in TL.items() for ER, xr in TR.items() if len(EL)+len(ER) <= k} + + def build_disjoint(self): + """Six pieces per target, each leaving an outside point uncovered.""" + pts = list(range(self.h)) + L, R, TL, TR, PR, PL = self.tri_parts(pts, 3) + R1, R2 = R[:len(R)//2], R[len(R)//2:] + L1, L2 = L[:len(L)//2], L[len(L)//2:] + for S in self.triples: + E = frozenset(S); EL = E & frozenset(L); ER = E & frozenset(R) + pieces = [TL[EL], TR[ER]] + for half in (R1, R2): + pieces.append(self.vec([(r, PR[r][EL]) for r in half], 3-len(EL))[ER & frozenset(half)]) + for half in (L1, L2): + pieces.append(self.vec([(u, PL[u][ER]) for u in half], 3-len(ER))[EL & frozenset(half)]) + for node in pieces: self.emit(S, node, Q(1, 2)) + + # -- pair stars ------------------------------------------------------- + def build_pair_stars(self): + """Prefix and suffix pair-star sums around each excluded third point.""" + h = self.h + for a, b in combinations(range(h), 2): + others = [u for u in range(h) if u not in (a, b)] + n = len(others) + pre = [0] + for u in others: pre.append(self.add(pre[-1], self.x(a, b, u), 'd2')) + suf = [0]*(n+1) + for i in range(n-1, -1, -1): suf[i] = self.add(self.x(a, b, others[i]), suf[i+1], 'd2') + for i, c in enumerate(others): + S = tuple(sorted((a, b, c))) + self.emit(S, pre[i], Q(-1, 2)); self.emit(S, suf[i+1], Q(-1, 2)) + + def emit(self, S, node, coef): + """Inject a piece, splitting it until it leaves a point outside S uncovered.""" + if not node: return + if self.cover(node) | sum(1 << p for p in S) == (1 << self.h)-1: + a, b = self.args[node] + self.emit(S, a, coef); self.emit(S, b, coef) + else: + self.pieces.append((S, node, coef)) + + # -- bookkeeping ------------------------------------------------------ + def prune(self): + self.active = set(); stack = [node for _, node, _ in self.pieces] + while stack: + node = stack.pop() + if node in self.active: continue + self.active.add(node) + if self.args[node]: stack.extend(self.args[node]) + self.additions = sum(self.args[n] is not None for n in self.active) + self.roles = self.additions + len(self.pieces) + + def cover(self, node): + """Mask of ground points covered by the node's source triples.""" + if node not in self.points: + s = self.support[node]; mask = 0 + while s: + low = s & -s; mask |= sum(1 << p for p in self.triples[low.bit_length()-1]); s ^= low + self.points[node] = mask + return self.points[node] + + def stats(self): + v = len(self.triples) + return dict(h=self.h, v=v, additions=self.additions, injections=len(self.pieces), + roles=self.roles, roles_per_target=round(self.roles/v, 3), + disjoint_additions=sum(self.kind[n] == 'd0' for n in self.active), + pair_star_additions=sum(self.kind[n] == 'd2' for n in self.active)) + + +# -- binary linear algebra on F2^h, vectors as integer masks --------------- +def echelon(vectors): + """Reduced basis {pivot bit: vector}; raises on dependence.""" + basis = {} + for x in vectors: + for bit, b in basis.items(): + if x & bit: x ^= b + assert x, 'Dependent label vectors' + bit = x & -x + for other in basis: + if basis[other] & bit: basis[other] ^= x + basis[bit] = x + return basis + + +def reduce(basis, x): + for bit, b in basis.items(): + if x & bit: x ^= b + return x + + +def dot(x, y): + return (x & y).bit_count() & 1 + + +def rank(rows): + rows = list(rows); r = 0 + for col in range(max((x.bit_length() for x in rows), default=0)): + bit = 1 << col + pivot = next((i for i in range(r, len(rows)) if rows[i] & bit), None) + if pivot is None: continue + rows[r], rows[pivot] = rows[pivot], rows[r] + for i in range(len(rows)): + if i != r and rows[i] & bit: rows[i] ^= rows[r] + r += 1 + return r + + +class Label: + """A binary subspace with a canonical basis.""" + def __init__(self, vectors): + self.basis = echelon(vectors); self.dim = len(self.basis) + self.key = tuple(sorted(self.basis.values())) + + def contains(self, other): + return all(not reduce(self.basis, x) for x in other.basis.values()) + + def nondegenerate(self): + vs = list(self.basis.values()) + return rank([sum(dot(a, b) << j for j, b in enumerate(vs)) for a in vs]) == len(vs) + + def complement_in(self, other): + """Basis of other ∩ self^perp, assuming self ⊆ other.""" + vs = list(other.basis.values()); us = list(self.basis.values()); k = len(us) + rows = [sum(dot(v, u) << j for j, u in enumerate(us)) | 1 << (k+i) + for i, v in enumerate(vs)] + r = 0 + for col in range(k): + bit = 1 << col + piv = next((i for i in range(r, len(rows)) if rows[i] & bit), None) + if piv is None: continue + rows[r], rows[piv] = rows[piv], rows[r] + for i in range(len(rows)): + if i != r and rows[i] & bit: rows[i] ^= rows[r] + r += 1 + out = [] + for row in rows[r:]: + assert not row & ((1 << k)-1) + x = 0 + for i, v in enumerate(vs): + if row >> (k+i) & 1: x ^= v + out.append(x) + return out + + +def odd(vectors): + return any(x.bit_count() & 1 for x in vectors) + + +# -- exact checks ----------------------------------------------------------- +def tmask(t): + return sum(1 << p for p in t) + + +class Checks: + """Exact verification of the side map, labels and compiled roles.""" + def __init__(self, c): + self.c = c; self.h = c.h; self.cache = {}; self.verdicts = {} + self.everything = Label([1 << p for p in range(c.h)]) + + def label(self, node): + if node in self.cache: return self.cache[node] + c = self.c; kind = c.kind[node] + if kind == 'in': + vectors = [tmask(c.triples[node-1])] + elif kind == 'd0': + m = c.cover(node); vectors = [1 << p for p in range(self.h) if m >> p & 1] + else: + s = c.support[node]; ts = [] + while s: + low = s & -s; ts.append(c.triples[low.bit_length()-1]); s ^= low + common = set(ts[0]).intersection(*ts) + assert len(common) >= 2, 'Pair-star node without a common pair' + vectors = [tmask(t) for t in ts] + lab = Label(vectors); self.cache[node] = lab + return lab + + def target_frame(self, S): + t = tmask(S) + key = ('perp', S) + if key not in self.cache: + self.cache[key] = Label([x for x in (1 << p for p in range(self.h)) + if not dot(x, t)] + [tmask((S[0], S[1])), tmask((S[1], S[2]))]) + return self.cache[key] + + def residual_ok(self, small, big): + """small ⊆ big and big ⊖ small is zero or has an odd vector.""" + key = (small.key, big.key) + if key not in self.verdicts: + res = small.complement_in(big) if big.contains(small) else None + self.verdicts[key] = res is not None and (not res or odd(res)) + return self.verdicts[key] + + def label_ok(self, lab): + """Nondegenerate, contains an odd vector, and its complement is zero or does.""" + key = ('label', lab.key) + if key not in self.verdicts: + perp = lab.complement_in(self.everything) + self.verdicts[key] = (lab.nondegenerate() and odd(lab.basis.values()) + and (not perp or odd(perp))) + return self.verdicts[key] + + def verify_map(self): + c = self.c + for node in c.active: + if c.args[node]: + a, b = c.args[node] + assert a < node and b < node and not c.support[a] & c.support[b] + assert c.support[node] == c.support[a] | c.support[b] + got = {} + for S, node, coef in c.pieces: + assert coef in (Q(1, 2), Q(-1, 2)) + key = (S, coef) + assert not got.get(key, 0) & c.support[node], 'Overlapping pieces' + got[key] = got.get(key, 0) | c.support[node] + nonzero = 0 + for S in c.triples: + zero = sum(1 << i for i, T in enumerate(c.triples) if not set(S) & set(T)) + two = sum(1 << i for i, T in enumerate(c.triples) if len(set(S) & set(T)) == 2) + assert got.get((S, Q(1, 2)), 0) == zero and got.get((S, Q(-1, 2)), 0) == two + nonzero += zero.bit_count()+two.bit_count() + return dict(targets=len(c.triples), nonzero_coefficients=nonzero, + side_map_exact=True, coefficients='+1/2 disjoint, -1/2 intersection two') + + def verify_labels(self): + c = self.c; checked = 0 + for node in sorted(c.active): + lab = self.label(node) + assert self.label_ok(lab), node # includes the exit to the full space + if c.args[node]: + for child in c.args[node]: + assert self.residual_ok(self.label(child), lab), (node, child) + checked += 1 + for S, node, coef in c.pieces: + assert self.residual_ok(self.label(node), self.target_frame(S)), (S, node) + checked += 1 + return dict(active_nodes=len(c.active), checked_inclusions=checked, + all_labels_nondegenerate=True, all_residuals_have_odd_vectors=True) + + +def compile_roles(c): + """Reversible roles: one per addition plus one per injected piece.""" + users = {x: [] for x in c.active} + for node in sorted(c.active): + if c.args[node]: + for pos, x in enumerate(c.args[node]): users[x].append(('gate', node, pos)) + for i, (_, node, _) in enumerate(c.pieces): users[node].append(('output', i)) + edge = {}; sources = {}; outputs = {}; gates = []; size = 0 + for node in sorted(c.active): + if c.args[node]: + ins = (edge[node, 0], edge[node, 1]); pivot = ins[0] + else: + pivot = size; size += 1; ins = (pivot,); sources[c.triples[node-1]] = pivot + assert users[node] + outs = (pivot,)+tuple(range(size, size+len(users[node])-1)) + size += len(users[node])-1 + assert len(set(ins)) == len(ins) and set(ins) & set(outs) == {pivot} + gates.append((node, ins, outs)) + for user, slot in zip(users[node], outs): + if user[0] == 'gate': edge[user[1], user[2]] = slot + else: outputs[user[1]] = slot + assert size == c.roles + return dict(roles=size, gates=gates, sources=sources, outputs=outputs) + + +def verify_role_frames(c, checks, code=None): + """Follow every physical role in both directions through its frames.""" + code = code or compile_roles(c) + def step(small, big): assert checks.residual_ok(small, big) + frames = [None]*code['roles'] + for T, slot in code['sources'].items(): frames[slot] = checks.label(c.input[T]) + for node, ins, outs in code['gates']: + lab = checks.label(node) + for slot in set(ins+outs): + if frames[slot] is None: assert checks.label_ok(lab) # entry from D0 + else: step(frames[slot], lab) + frames[slot] = lab + for i, slot in code['outputs'].items(): + S = c.pieces[i][0]; J = checks.target_frame(S) + step(frames[slot], J); frames[slot] = J + for lab in frames: + assert checks.label_ok(lab) # includes the exit residual to D1 + # Reverse stage: complements, traversed backward. U^perp grows iff U shrinks. + # Its entries and exits have the forward residuals U^perp and U, checked above. + back = [None]*code['roles'] + for i, slot in code['outputs'].items(): back[slot] = ('line', c.pieces[i][0]) + for node, ins, outs in reversed(code['gates']): + lab = checks.label(node) + for slot in set(ins+outs): + prev = back[slot] + if prev is None: + assert checks.label_ok(lab) # reverse entry residual is lab^perp + elif prev[0] == 'line': # ⊆ U^perp iff U ⊆ t_S^perp + step(lab, checks.target_frame(prev[1])) + else: + step(lab, prev[1]) # prev^perp ⊆ lab^perp iff lab ⊆ prev + back[slot] = ('node', lab) + for T, slot in code['sources'].items(): + assert back[slot][1].key == checks.label(c.input[T]).key # ends at t_T^perp + return dict(roles=code['roles'], forward_frames_nested=True, + reverse_complement_frames_nested=True) + + +def simulate_invocation(c, code, x, y, side, center, inverse=False): + """Scalar invocation over Q with arbitrary scratch; returns the new state. + + Forward: L,-J,L^-1,-R,V,G,R,L,J,L^-1,G^-1,V^-1 gives y <- y + x. + inverse=True runs the inverted schedule, giving x <- x - y. + """ + h = c.h; T = c.triples + side = list(side); center = dict(center); x = dict(x); y = dict(y) + def L(sign=1): + order = code['gates'] if sign > 0 else list(reversed(code['gates'])) + for node, ins, outs in order: + if sign > 0: + if len(ins) == 2: side[ins[0]] += side[ins[1]] + for o in outs[1:]: side[o] += side[outs[0]] + else: + for o in outs[1:]: side[o] -= side[outs[0]] + if len(ins) == 2: side[ins[0]] -= side[ins[1]] + def J(target, sign): + for i, slot in code['outputs'].items(): + S, _, coef = c.pieces[i]; target[S] += sign*coef*side[slot] + def V(source, sign): + for t, slot in code['sources'].items(): side[slot] += sign*source[t] + def G(source, sign): + for i in range(h): center[i] += sign*sum(source[t] for t in T if i in t) + center['*'] += sign*sum(source.values()) + def R(target, sign): + for t in T: target[t] += sign*(sum(center[i] for i in t)-center['*'])/2 + if not inverse: + L(); J(y, -1); L(-1); R(y, -1); V(x, 1); G(x, 1); R(y, 1) + L(); J(y, 1); L(-1); G(x, -1); V(x, -1) + else: # inverse schedule with logical source y and target x + V(y, 1); G(y, 1); L(); J(x, -1); L(-1); R(x, -1); G(y, -1); V(y, -1) + R(x, 1); L(); J(x, 1); L(-1) + return x, y, side, center + + +if __name__ == '__main__': + import sys, time + for h in map(int, sys.argv[1:] or ['10', '12', '16']): + t = time.time(); c = ComplexSideCircuit(h) + print(c.stats(), f'{time.time()-t:.1f}s', flush=True) diff --git a/research/gf2-full-network/engine/source/complex_network.py b/research/gf2-full-network/engine/source/complex_network.py new file mode 100644 index 0000000000..af9bb6d7b3 --- /dev/null +++ b/research/gf2-full-network/engine/source/complex_network.py @@ -0,0 +1,120 @@ +#!/usr/bin/env python3 +"""Conditional 59/10^11 witness: a compressed complex side circuit. + +The compact-control witness was limited by the original complex motif, whose +v*z_c side wires per invocation dilute its rank deficit. The new side circuit +computes the same correction with shared sums, binary coordinate and pair-star +labels, and the bit network's transparent twelve-operation schedule. The bit +network, compact-control movement and assembly recipe are unchanged. +""" +from fractions import Fraction as Q +from math import comb +from pathlib import Path +import json + +from certify import Parameters, constraints, margins, require, verify_sources +from compact_control_layer import layer_exponents +from complex_circuit import ComplexSideCircuit, Checks, compile_roles, verify_role_frames +from paired_network import BIT_SAVING +from prepare_layers import serializable +from search_network import log_integer_bounds + +ROOT = Path(__file__).resolve().parents[1] +H = 25 +COMPLEX_SAVING = Q(14, 10**9) +LOG_BOUND = Q(966, 100) +KAPPA = Q(59, 10**11) + + +def counts(c): + h = c.h; v = comb(h, 3); m = h**3; N = v**3; I = 3*v*v + R = c.roles; W = 2*N+I*(R+h+1); L = I*(h+1)*h + s = W*m-2*N+2*L + require(L < N, 'Complex deficit is not positive') + return dict(h=h, v=v, m=m, N=N, I=I, side_roles_per_invocation=R, + central_roles=h+1, W=W, L=L, s=s, deficit=W*m-s, eta=Q(W*m-s, W*m), + original_side_wires_per_invocation=v*(comb(h-3, 3)+3*(h-3))) + + +def gate_count(c, n): + """Per invocation: four mixer passes, two copies, two injections, four central gates.""" + per = 4*len(c.active)+4*n['v']+4 + require(n['I']*per <= 12*n['W'], 'The 12W gate bound behind E=64(W+m+1)^3 failed') + return dict(gates_per_invocation=per, total_gates=n['I']*per, twelve_W=12*n['W']) + + +def guard(n, beta, zeta): + """Generalized stopped-depth guard with the new complex constants.""" + m, s, W = n['m'], n['s'], n['W'] + E = 64*(W+m+1)**3; B = s+E + require(m >= 3 and 2 <= s < m**5, 'Unverified coefficient-depth hypothesis') + require(s*(8+E) <= 9*B*B, 'One-piece constant failed') + C1 = 5-4*beta+zeta + raw = max(Q(128*m*B*B), 18*m*B*B*(1+1/zeta)) + C0 = -(-raw.numerator//raw.denominator) + require(9*m*B*B*(1+1/zeta)+18 <= C0, 'Whole-layer constant failed') + return dict(m=m, s=s, E=E, B=B, beta=beta, zeta=zeta, C0=C0, C1=C1) + + +def parameters(): + return Parameters(tau=1-BIT_SAVING, sigma=1-COMPLEX_SAVING, + epsilon=Q(19999, 100000), c=Q(999, 1000), + lam=1-Q(2958, 10**12), lamp=1-Q(2956, 10**12), + kappa=KAPPA, beta=Q(1, 1000), delta=Q(1, 10**6), + C1=Q(49961, 10000)) + + +def witness(p, n): + g = guard(n, p.beta, Q(1, 10000)) + require(p.C1 == g['C1'], 'Guard mismatch') + e = layer_exponents(p.tau, p.sigma, p.beta, p.c) + slacks = constraints(p, layout_model='nonadjacent', assembly_model='tight-gaussian') + slacks['packed_overhead'] = p.lam-e['internal'] # compact control: internal = max exponent + slacks['reserved_axes'] = p.lamp-e['preprocessing'] + for name, slack in slacks.items(): require(slack > 0, 'Constraint failed: '+name) + gs = margins(p, layout_model='nonadjacent', assembly_model='tight-gaussian') + require(min(gs.values()) > p.kappa, 'No final absorption gap') + return dict(parameters=vars(p), guard=g, recurrence=e, constraint_slacks=slacks, + margins=gs, minimum_margin=min(gs.values()), + limiting_margins=[k for k, v in gs.items() if v == min(gs.values())], + absorption_gap=min(gs.values())-p.kappa) + + +def witness_only(): + """Counts and parameter witness without the full finite checks (for the patch).""" + n = counts(ComplexSideCircuit(H)) + require(n['eta'] > COMPLEX_SAVING*LOG_BOUND, 'Complex saving failed') + return witness(parameters(), n) + + +def certificate(): + c = ComplexSideCircuit(H); checks = Checks(c); code = compile_roles(c) + side = checks.verify_map(); labels = checks.verify_labels() + roles = verify_role_frames(c, checks, code) + n = counts(c) + lo, hi = log_integer_bounds(n['m']) + require(hi < LOG_BOUND, 'Logarithm enclosure failed') + require(n['eta'] > COMPLEX_SAVING*LOG_BOUND, 'Complex saving failed') + p = parameters(); w = witness(p, n) + require(Q(1, 2**31) < KAPPA < Q(1, 2**30), 'Unexpected dyadic scale') + # With the bit exponent fixed, g3 <= epsilon*(1-lambda) < epsilon*a_b < a_b/5. + ceiling = BIT_SAVING/5 + require(ceiling < Q(1, 2**30), 'This bit network could cross 2^-30') + return dict(status='CONDITIONAL 59/10^11 WITNESS; COMPRESSED COMPLEX SIDE CIRCUIT; NOT FORMAL VERIFICATION', + upstream_commit=verify_sources(), circuit=c.stats(), side_map=side, + labels=labels, role_frames=roles, gates=gate_count(c, n), + complex_counts=n, complex_saving=COMPLEX_SAVING, log_m_upper=LOG_BOUND, + log_enclosure=(lo, hi), complex_deficit_slack=n['eta']-COMPLEX_SAVING*LOG_BOUND, + bit_saving=BIT_SAVING, witness=w, + improvement_over_compact_control=KAPPA/Q(83, 10**12), + scoped_ceiling=dict(upper=ceiling, below_2_to_minus_30=True, + scope='Published h=50 paired bit network and retained Gaussian margin; not a bound on other networks or algorithms.'), + scope='Conditional on the pinned upstream interfaces, the compact-control movement and guard proofs, the paired bit network, and the written binary-frame transfer for this complex side circuit. Exact arithmetic and finite checks are not formal verification.') + + +if __name__ == '__main__': + result = serializable(certificate()) + (ROOT/'certificates/complex-network.json').write_text(json.dumps(result, indent=2, sort_keys=True)+'\n') + print('PASS conditional', KAPPA, '> 2^-31; minimum margin', result['witness']['minimum_margin']) + print('Side roles per invocation', result['complex_counts']['side_roles_per_invocation'], + 'vs original', result['complex_counts']['original_side_wires_per_invocation']) diff --git a/research/gf2-full-network/evidence/COMPLETE-GATE.json b/research/gf2-full-network/evidence/COMPLETE-GATE.json new file mode 100644 index 0000000000..7d7eb5624e --- /dev/null +++ b/research/gf2-full-network/evidence/COMPLETE-GATE.json @@ -0,0 +1,119 @@ +{ + "all_failures_and_samples_retained": true, + "all_six_scientific_observations_exact_equal": true, + "cold_build_and_all_native_controls_in_every_candidate": true, + "diagnostic_excluded": true, + "driver_sha256": "0d976d2eb6b845f20d4a3396591a806f966688b88693cd6a5f8a0c9e48925e36", + "metrics": { + "cpu_seconds": { + "absolute_saving": 11.119999999999997, + "baseline_median": 39.58, + "baseline_samples": [ + 41.64, + 39.28, + 39.58 + ], + "candidate_median": 28.46, + "candidate_samples": [ + 28.46, + 28.439999999999998, + 31.919999999999998 + ], + "maximum_within_arm_range": 3.4800000000000004, + "noise_pass": true, + "reduction_fraction": 0.2809499747347145, + "target_pass": true + }, + "wall_seconds": { + "absolute_saving": 11.049925514002098, + "baseline_median": 39.68618175998563, + "baseline_samples": [ + 42.103671320015565, + 39.355439921986545, + 39.68618175998563 + ], + "candidate_median": 28.63625624598353, + "candidate_samples": [ + 28.63625624598353, + 28.595429725013673, + 33.12922728899866 + ], + "maximum_within_arm_range": 4.53379756398499, + "noise_pass": true, + "reduction_fraction": 0.27843256831382557, + "target_pass": true + } + }, + "samples": [ + { + "cpu_seconds": 41.64, + "label": "B1", + "sampled_rss_bytes": 407670784, + "wall_seconds": 42.103671320015565 + }, + { + "cpu_seconds": 28.46, + "label": "C1", + "sampled_rss_bytes": 408207360, + "wall_seconds": 28.63625624598353 + }, + { + "cpu_seconds": 28.439999999999998, + "label": "C2", + "sampled_rss_bytes": 416595968, + "wall_seconds": 28.595429725013673 + }, + { + "cpu_seconds": 39.28, + "label": "B2", + "sampled_rss_bytes": 427556864, + "wall_seconds": 39.355439921986545 + }, + { + "cpu_seconds": 39.58, + "label": "B3", + "sampled_rss_bytes": 407625728, + "wall_seconds": 39.68618175998563 + }, + { + "cpu_seconds": 31.919999999999998, + "label": "C3", + "sampled_rss_bytes": 436506624, + "wall_seconds": 33.12922728899866 + } + ], + "science": { + "full_cli_certificate_sha256": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f", + "full_cli_stdout_sha256": "8f77b724810ec05fb19b35d75d8002d31a6e22ed342a36ee28a5caef8d643015", + "full_return_lossless_sha256": "542e4fd73d38b88122d1bf0fffa5f3b092cc4681a14012162daef47e89363cfd", + "ordered_complements": { + "calls": 238685, + "canonical_stream_bytes": 55839507, + "schema": "v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors", + "sha256": "7dec2bf33303c37e1c699609e83768d61df7e19104d34a26a148f66d5ccc4838" + }, + "side": { + "exact_witness_sha256": "4b170c1dbfc33c7cb141a2284c6fd69eac7b6d100971d3e9ee625502b5893f82", + "rank_call_count": 59959, + "rank_distinct_matrix_count": 252, + "rank_trace_sha256": "85006ca332bbc57c2ba9fd06f61a0281d4cee600c9f3b449342379bf2aedec8f", + "result_sha256": "342e99212b12e518902ae9598613f5484113bacee8747c27a13b58a4b1d3986c", + "serialized_bytes": { + "rank_trace": 2674272, + "result": 527, + "witness": 58143622 + } + }, + "upstream_commit": "adc7f1241b42e322a6451854ab7e4b4c146bf78a" + }, + "scope": "Complete frozen historical complex_network.py CLI WITH retained full output/type/ordered witness and transcript observations; no bareCLI/selectedfrontier/PR5864/kappa transfer", + "sequence": [ + "B1", + "C1", + "C2", + "B2", + "B3", + "C3" + ], + "status": "PASS_COMPLETE_FROZEN_H25_CALLER_15_PERCENT_WALL_CPU_AND_NOISE" +} diff --git a/research/gf2-full-network/evidence/ENVIRONMENT.json b/research/gf2-full-network/evidence/ENVIRONMENT.json new file mode 100644 index 0000000000..c3267ba932 --- /dev/null +++ b/research/gf2-full-network/evidence/ENVIRONMENT.json @@ -0,0 +1,10 @@ +{ + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]", + "executable": "/usr/bin/python3", + "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39", + "machine": "x86_64", + "cpu_model": "Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz", + "logical_cpu_count": 8, + "measurement_environment": "PYTHONHASHSEED=0 LC_ALL=C.UTF-8 TZ=UTC; cold per process; compiler child CPU included; parentguard serial; originalassertions on", + "guard_stdout_stderr_cap_bytes": 2097152 +} diff --git a/research/gf2-full-network/evidence/FIRST-PAIR-GATE.json b/research/gf2-full-network/evidence/FIRST-PAIR-GATE.json new file mode 100644 index 0000000000..d6e2de98ae --- /dev/null +++ b/research/gf2-full-network/evidence/FIRST-PAIR-GATE.json @@ -0,0 +1,70 @@ +{ + "status": "PAIR_TARGET_PASS_ADMIT_REMAINDER_FIXED_SEQUENCE", + "wall_reduction": 0.31986320080429165, + "cpu_reduction": 0.31652257444764653, + "science_exact_equal": true, + "samples": { + "B1": { + "exit": 0, + "label": "full-network-B1", + "optimized": false, + "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]", + "runner_sha256": "7540f8cc4ae4d12ed86c844ef0837a74184d3ada653979608c295c09f200a751", + "runtime_policy_sha256": "8d87423d90a0a85e0115c85b74f500847e409c30b7e98850d47b6e36f560c772", + "sampled_process_group_rss_bytes": 407670784, + "script": "stages/qualification-v1/full_B1.py", + "source_bytes_and_modes_unchanged": true, + "source_inventory_sha256": "cd8215aef55d75ba5c7bf9377a9572eb3509b0cd1c699db221435c7b519e25a9", + "status": "PASS", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_bytes": 3665, + "stdout_sha256": "0f6e7069212f9ee752d4123475fde0ca526fc9c41d68bf952022e7cd41612f43", + "termination": null, + "usage": { + "exit": 0, + "kernel_max_rss_kib": 453356, + "system_seconds": 0.32, + "user_seconds": 41.32 + }, + "wall_seconds": 42.103671320015565, + "cpu_seconds": 41.64 + }, + "C1": { + "exit": 0, + "label": "full-network-C1", + "optimized": false, + "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]", + "runner_sha256": "7540f8cc4ae4d12ed86c844ef0837a74184d3ada653979608c295c09f200a751", + "runtime_policy_sha256": "8d87423d90a0a85e0115c85b74f500847e409c30b7e98850d47b6e36f560c772", + "sampled_process_group_rss_bytes": 408207360, + "script": "stages/qualification-v1/full_C1.py", + "source_bytes_and_modes_unchanged": true, + "source_inventory_sha256": "cd8215aef55d75ba5c7bf9377a9572eb3509b0cd1c699db221435c7b519e25a9", + "status": "PASS", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_bytes": 3947, + "stdout_sha256": "6707c1cb48a8836730dac7da627201e50ce69ae0e6d77be9dddc6e531a3c22dd", + "termination": null, + "usage": { + "exit": 0, + "kernel_max_rss_kib": 453852, + "system_seconds": 0.35, + "user_seconds": 28.11 + }, + "wall_seconds": 28.63625624598353, + "cpu_seconds": 28.46 + } + }, + "remaining_sequence": [ + "C2", + "B2", + "B3", + "C3" + ], + "no_final_performance_claim_yet": true, + "final_gate": "threeperarmmedians>=15%wallCPUandmediansavings>maxwithinarmrangeforboth" +} diff --git a/research/gf2-full-network/evidence/FULL-PAIR-ADMISSION.json b/research/gf2-full-network/evidence/FULL-PAIR-ADMISSION.json new file mode 100644 index 0000000000..ca82514297 --- /dev/null +++ b/research/gf2-full-network/evidence/FULL-PAIR-ADMISSION.json @@ -0,0 +1,13 @@ +{ + "decision": "ADMIT_ONE_FROZEN_COMPLETE_B1_C1_PAIR", + "basis": "Fresh full caller/inputs/output/witness/type/coverage anchor passes; verify_labels dominates real complete CLI. Unchanged source-bound C kernel has prior separate segment qualification; none of that historical percentage is transferred to this workload. Fullcaller exact extra stages execute. The next paired test can directly decide complete target with all cold costs.", + "prior_profile": "diagnostic only, excluded from performance samples", + "profile_outer_wall_seconds": 40.92687450101948, + "profile_verify_labels_wall_seconds": 28.431476872006897, + "stage": "outputs/gf2-full-network-20261028/stages/qualification-v1", + "driver_sha256": "0d976d2eb6b845f20d4a3396591a806f966688b88693cd6a5f8a0c9e48925e36", + "anchor_sha256": "bbe53360088e1d7183a9801d3954bd723f580cb283d2f8dd0bb7a54ebb80c298", + "static_review": "INDEPENDENT-REVIEW.md", + "pair_gate": "wall AND CPU >=15% after all source/copy/observation/compile/finite bills; if passes finish already-declared C2 B2 B3 C3; no rerolls", + "separate_PR5864_goal": "blocked and unchanged" +} diff --git a/research/gf2-full-network/evidence/INDEPENDENT-REVIEW.md b/research/gf2-full-network/evidence/INDEPENDENT-REVIEW.md new file mode 100644 index 0000000000..5987d7d522 --- /dev/null +++ b/research/gf2-full-network/evidence/INDEPENDENT-REVIEW.md @@ -0,0 +1,53 @@ +# Independent static review: full historical complex-network GF(2) + +Date: 2026-10-28. **STATIC CLEARANCE FOR ONE GUARDED PROFILE/ANCHOR ATTEMPT.** No open source blocker remains in the final driver. This is not a runtime PASS, a cost admission or permission to skip PLAN's subsequent gates. The parent remains the sole scientific runner. + +Reviewed driver: `source-design/full_driver.py`, 356 lines, SHA-256 `0d976d2eb6b845f20d4a3396591a806f966688b88693cd6a5f8a0c9e48925e36`. Design SHA-256: `609a4c6aee119ddaed9f10dc2726ece18436179ad9caaced70cebaa58066f8eb`. Source inventory SHA-256: `88bba3caf5975f30fa7abceaea9454110cf3b069233e8241a2ca13d1dff171a7`. + +## Scope and complete caller + +[PLAN.json](PLAN.json), lines 2–12 and 24–41, defines the full H25 historical conditional CLI at main `19fdb086ea96af9a9f87936a2b888e10af4ed810`, with PR5929's native predecessor. This is separate from the blocked further-15% PR5864 task and current selected-frontier replay. + +The untouched [complex_network.py](frozen/scripts/complex_network.py), lines 90–112, performs side-map, label and role checks, counts, logarithm enclosure, strict saving comparison, parameters, guard/recurrence/constraint/margin checks, dyadic/ceiling checks, source verification and gate bound. Lines 115–120 perform the actual JSON file write and two stdout lines. The driver executes this complete file through `runpy.run_path(..., run_name='__main__')`, not `witness_only()` or the former side-only harness ([driver](source-design/full_driver.py), lines 257–274). + +Every full mode requires normal assertion execution (driver lines 144–146). The original assertions in [complex_circuit.py](frozen/scripts/complex_circuit.py), including map checks at 313–333, labels at 335–348 and forward/reverse role checks at 376–411, remain in the executed functions. No other imported module's `__main__` search/certificate is invoked. + +## Sources, imports and the real verifier + +The frozen inventory contains twelve scripts, the upstream manifest and all **19** payloads. The driver authenticates the pinned inventory, exact file sets and contents; then cross-checks the manifest's commit, payload set and each digest against that inventory (lines 152–180). The original [certify.verify_sources](frozen/scripts/certify.py), lines 226–232, still reads and hashes every actual payload. Its observational wrapper delegates the original function, and the complete run requires exactly one original-verifier call. No stubbed verifier or cached PASS replaces it. + +The seven engine/input files match published PR5929 bytes. In particular, native backend, finite controls and C kernel hashes are respectively `e473c38245c3668715b5a78dfe980b2fe3ed0d0c9b8c97c666fbae6ecf1fffd5`, `df989a831aac43cc1af95169dad8c64a7548760e6e1f96976da996703f2c8f7a`, and `e9c3c9194a08718bd1575c1cf08c6c6772d3b644c2e274c25a84a1f9249d06cc`. + +Both duplicated engine source files must equal the corresponding frozen scripts (driver lines 192–194). The engine's exact loaded circuit module is registered as `complex_circuit`; afterward, the driver checks the CLI's imported class/function identities and all scientific module paths (lines 209–218 and 270–289). The circuit's alternative filesystem location is explicit and byte-bound, not an unverified replacement module. + +## Observers and exact outputs + +The role observer calls the original function once and returns its original result object. The depth-aware serializer delegates the original recursive serializer once per value and captures only the outer full certificate (driver lines 225–255). Original [prepare_layers.serializable](frozen/scripts/prepare_layers.py), lines 148–155, retains its recursion and conversions. + +The logarithm wrapper's import order is sound: `prepare_layers` first captures its ordinary alias; `search_network.log_integer_bounds` is then wrapped; the full caller subsequently imports that wrapper for its one direct call. No other called full-certificate path adds a hidden second logarithm call. Required coarse-phase counts are checked at driver lines 280–283. These observer changes do not alter Label members or helper globals tracked by the native runtime guard. + +The original certificate must match pinned reference bytes, including formatting/newline, and captured CLI stdout must match both literal lines (driver lines 267–269). Reference SHA-256 is `1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f`. The exact CLI stdout is separately retained and re-emitted; the outer driver also prints clearly separate receipt metadata. + +The added typed full-return representation preserves Fraction pairs, float hex values, exact primitive/container types and dictionary order (driver lines 91–110). Both arms retain the complete side structural/label/role witness and ordered rank transcript through the unchanged PR5929 writer, with its fixed hashes and 59,959 calls. The complete complement receipt requires all 238,685 ordered calls and 55,839,507 canonical bytes, with the retained digest. No sampling or replacement by rank/odd-vector predicates occurs (driver lines 295–321). + +## Native and independent finite boundary + +The unchanged [native backend](source-design/engine/native_backend.py), lines 113–209 and 317–386, binds source/code, effective builtins, Label/helper dispatch and native callables; detects subsequent drift before native work or fallback; and preserves unsupported types/widths through the original methods. The C kernel requires exact dictionaries and nonnegative exact integers fitting 64 bits; augmented complements require total width at most 64. It preserves first-pivot/all-row elimination and ordered complement outputs ([native_gf2.c](source-design/engine/native_gf2.c), lines 17–50 and 129–195). + +Each candidate cold-builds, links and loads once, then executes the entire unchanged finite suite before the full CLI (driver lines 204–207). [finite_controls.py](source-design/engine/finite_controls.py), lines 20–61, provides a separate dense-list/modulo-two oracle; lines 124–260 check ordered results, exact types, short exhaustive cases, boundary widths, permutations, fallback/error behavior and deliberately wrong/reordered controls. Lines 296–456 retain runtime-binding and complete-stream controls. The live independent finite oracle is not replaced by the profile anchor. + +## Repair, cost and remaining gates + +One concrete pre-execution repair was identified: `copytree` preserves readonly directory modes, so a readonly cloned root could not create `certificates/`. The final driver makes only its fresh private runtime root `0755` before that creation (lines 182–191). Copied scientific file modes remain unchanged. Compiler temporary files stay under the new output directory (lines 168–170). Source/engine/reference/anchor bytes and before/after file modes are checked; only the expected certificate may be added to the runtime tree (lines 324–331). + +Both benchmark arms pay fresh copies, imports, custody checks, the complete CLI and identical retained observations; the candidate additionally pays cold build/load and all finite controls. The parent outer wall and process-group CPU receipts are authoritative. Coarse phases are nested diagnostics and must not be summed as independent savings. + +The first profile creates the source-bound full-result anchor and is excluded from performance selection. Both benchmark modes reject an absent or mismatched driver/engine/input/scientific anchor (lines 145–166 and 318–323). A successful profile must precede a separate parent headroom decision. Only then may PLAN's fixed B1,C1 gate and conditional remaining BCCBBC samples proceed, retaining every stop/failure. The 180-second, 1-GiB and aggregate caps remain unchanged. No completion, memory fit, 15% gain, formal verification, new κ or PR5864 improvement is asserted by this static clearance. + +Reviewer actions were source reads, file inventories and hashes only. No scientific import, execution, compilation, timing, Git/browser operation or delegation was performed. + +## Parent runtime follow-up: entry-name correction + +The first parent-created entry, `stages/profile-v1/profile.py`, shadowed the standard-library `profile` module imported by the unchanged helper's `cProfile` dependency. The retained [v1 receipt](runtime/runs/full-network-profile-v1/receipt.json), lines 2–22, records STOP after 0.976437556 seconds, unchanged source bytes/modes and empty stdout; [stderr](runtime/runs/full-network-profile-v1/stderr.txt), lines 21–38, identifies the recursive import and overwrite refusal. This stopped during helper import, before circuit construction or any candidate compilation. It is a retained failed attempt, not a performance sample or evidence against the mathematics. + +The parent made a separate manual entry correction in immutable `profile-v2/full_profile_entry.py`; the v2 stage contains no `profile.py`. I read that entry and verified the driver/backend/finite/C hashes above are unchanged. The driver source clearance therefore carries to the corrected entry. The corrected diagnostic was reported running; no successful profile, anchor or candidate measurement is claimed in this review. [PROFILE-v1-FAILURE.json](PROFILE-v1-FAILURE.json) retains the correction boundary. diff --git a/research/gf2-full-network/evidence/INPUT-COMMIT.json b/research/gf2-full-network/evidence/INPUT-COMMIT.json new file mode 100644 index 0000000000..1e4f3084de --- /dev/null +++ b/research/gf2-full-network/evidence/INPUT-COMMIT.json @@ -0,0 +1,56 @@ +{ + "base": "19fdb086ea96af9a9f87936a2b888e10af4ed810", + "commit": "7f9c2985de167e95d159040eee26fc03c1e27fb6", + "diff": { + "added": 42, + "deleted": 0, + "modified": 0 + }, + "files": { + "SOURCE-PINS.json": "88bba3caf5975f30fa7abceaea9454110cf3b069233e8241a2ca13d1dff171a7", + "engine/compare_side_verifier.py": "6e507bb0c7e00d090a60289fddb6c55e90c946d0850c42c3c5e3e15c27604a68", + "engine/finite_controls.py": "df989a831aac43cc1af95169dad8c64a7548760e6e1f96976da996703f2c8f7a", + "engine/native_backend.py": "e473c38245c3668715b5a78dfe980b2fe3ed0d0c9b8c97c666fbae6ecf1fffd5", + "engine/native_gf2.c": "e9c3c9194a08718bd1575c1cf08c6c6772d3b644c2e274c25a84a1f9249d06cc", + "engine/profile_side_verifier.py": "9c994378171c20a91539418d93cb8387e1daa93465d6862beefea90e12999c2a", + "engine/source/complex_circuit.py": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1", + "engine/source/complex_network.py": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b", + "frozen/scripts/audit_short_guards.py": "c2c929c956e617bee739963b517b9069e0d067cfebc6820f401a4e90a1769eb1", + "frozen/scripts/certify.py": "2348d95008276c5d5764f7e028c3918e484582cd589bd4d9b82919161745e53e", + "frozen/scripts/compact_control_layer.py": "e814c9f8d84f2e5d3aa2e06c36697f27f110218addc40ff8df2801fde861ff9f", + "frozen/scripts/complex_circuit.py": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1", + "frozen/scripts/complex_network.py": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b", + "frozen/scripts/exclusion_circuit.py": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3", + "frozen/scripts/paired_exclusion_circuit.py": "8f05f04cf06217befd6d0ee0f2d7d0c5c5eb32cfab8c9a8ca7917fd6d620b7d2", + "frozen/scripts/paired_network.py": "991223dc3c1374284c361ed017e42bf732dd971fa0bea2be2282cfb18257b3f7", + "frozen/scripts/prepare_layers.py": "a6e2adc612f264b1c0e51d18ce6315de9ae5e2ae2420aa22e99a22d8bf304947", + "frozen/scripts/search_network.py": "3a4faa5037d9b8e7ca5828afac193a96b6966a8b114f14937921795b24ec4f6a", + "frozen/scripts/shared_point_circuit.py": "360d9bffc0f55315fe294789b72c71c79e0991524555b3a5f42a2ca504d7da95", + "frozen/scripts/shared_point_network.py": "a85e7f0d8c42d6a27e3846308571ca324a1824ac5c2d59e4daa5c7673c33c697", + "frozen/upstream/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "frozen/upstream/README.md": "8d1ceff898a4e0e681679f91c4def485820be9e99f04e4861f2ce601a364723e", + "frozen/upstream/build/figures/multiplication-flow.tex": "3654d2728b0c98919d61760e1802804ed616546a747f9167a93e17bb8697f320", + "frozen/upstream/build/figures/proof-map.tex": "76d4deacf07bea355412abcfd798c7cbe6dcccef29a4a420a9e2a7b158f23848", + "frozen/upstream/build/main.tex": "42f0f506976bc2084374a71e97edc1549689a7accf35dda4db2a18af4f13c1aa", + "frozen/upstream/build/references.bib": "33cc2df13ccf85330849e8fb34d4ac7613b23f625787457a5b7b9aa6d7369476", + "frozen/upstream/build/sections/00-introduction.tex": "98721f03682ccf1cc7d0850b07adabaa2d8f3afe552e3861753eba9d284d0da0", + "frozen/upstream/build/sections/01-history.tex": "798956c8150c31e3e2f5f29c47110d25ce619faad1374f4d3a0f15fa3ee33ead", + "frozen/upstream/build/sections/02-streams.tex": "606c80db61cad13aa0c3b6060dc4b88dbbe7ac60cdd831aa93f28d908fd09dab", + "frozen/upstream/build/sections/03-motifs.tex": "ed76761194988a01af77ead0ea6469cb5dcd29690ab985a0b5a4006b0f2b69bb", + "frozen/upstream/build/sections/04-swap.tex": "412b170ccaab38dba96e95e3cbfae09f4876a9818f8d278776a746b0f8044906", + "frozen/upstream/build/sections/05-layers.tex": "20cfc8d12099d4e4ed9e3e7eeb6162edd9b6e0e076f24693364cd24377252594", + "frozen/upstream/build/sections/06-transforms.tex": "924316e4bc905066281d8f9e8746a49d8829aeb393688608deb1e61c3c87853c", + "frozen/upstream/build/sections/07-resampling.tex": "8a6b91670f9163afb54892489fa2210c77fe1b058f0325ec7d18b44b94be6e2c", + "frozen/upstream/build/sections/08-assembly.tex": "763d7945b1e1ec4ebae9b799bcefcc45fa9bae6e2ffad799868a9c3d513dbd4a", + "frozen/upstream/build/sections/09-exact-arithmetic.tex": "5714e5d0656c78c6a1fde8d01fd11f1ba856a7ea94149b283bd9a50fdbf516c3", + "frozen/upstream/build/sections/10-transposition.tex": "c14ad8d56112f6578678a58211bc8d63c3a4b60e55078ac73bc38f7348e713cb", + "frozen/upstream/build/sections/11-grouped-rectangles.tex": "6525cd0a01980e56accfeaf06e9d875bc699197ba42c6e22b69435e352275174", + "frozen/upstream/formalization.yaml": "2dcbd0d6e6a22475f53d49bfdfcac9b6d2b470653c332a9f56522f5be166edb9", + "frozen/upstream/manifest.json": "16ab13971694cabab09440c47ebf2fc0496a9d35fc3af33950fda3498f8e2392", + "reference/certificates/complex-network.json": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f", + "reference/certificates/selected-result.json": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5" + }, + "path": "research/gf2-full-network", + "preserved_failed_local_commit": "bb01abd4ce01a722ef883a42bc6a34e7ce617762", + "publication": "not pushed" +} diff --git a/research/gf2-full-network/evidence/LOCAL-INPUT-INDEX-STOP.json b/research/gf2-full-network/evidence/LOCAL-INPUT-INDEX-STOP.json new file mode 100644 index 0000000000..c71b7f25f6 --- /dev/null +++ b/research/gf2-full-network/evidence/LOCAL-INPUT-INDEX-STOP.json @@ -0,0 +1,12 @@ +{ + "status": "LOCAL_INPUT_INDEX_ERROR_PRESERVED_NOT_PUBLISHED", + "head": "bb01abd4ce01a722ef883a42bc6a34e7ce617762", + "change_counts": { + "A": 42, + "D": 126453, + "M": 0, + "T": 0 + }, + "cause": "New --no-checkout worktree index was not populated from base before adding inputs; preserve local mistaken commit and reconstruct correct tree from exact base", + "scientific_source_change": false +} diff --git a/research/gf2-full-network/evidence/PLAN.json b/research/gf2-full-network/evidence/PLAN.json new file mode 100644 index 0000000000..ec9df5043f --- /dev/null +++ b/research/gf2-full-network/evidence/PLAN.json @@ -0,0 +1,56 @@ +{ + "authorized_by": "User Proceed after concrete full-network GF2 evaluation proposal, 2026-10-28 local", + "scope": "Complete unchanged scripts/complex_network.py CLI H25 historical conditional certificate at source-pinned canonical main; no current selected-frontier/theorem/kappa improvement claim", + "separate_goal": "Further15% complete PR5864 app objective remains blocked and incomplete; this authorized full-network evaluation is a distinct workload and decision", + "baseline_commit": "19fdb086ea96af9a9f87936a2b888e10af4ed810", + "native_predecessor": { + "pr": 5929, + "head": "a456c246ec72a23f327d4b1394fbb3bf7087a65c" + }, + "target": { + "wall_reduction_minimum": 0.15, + "cpu_reduction_minimum": 0.15 + }, + "resource_policy": { + "parent_serial_runner_only": true, + "per_command_wall_seconds": 180, + "sampled_process_group_rss_bytes": 1073741824, + "first_feasibility_seconds": 600, + "round_total_seconds": 1500, + "previous_round_spent_seconds": 790.6046611171041, + "new_scope_not_reset_of_prior_ledger": true, + "automatic_retries": false + }, + "sequence": [ + "static source/closure and live overlap check", + "one complete unchanged baseline profile/anchor diagnostic, excluded from performance selection", + "review full costs/headroom and exact outputs", + "one complete baseline/candidate pair B1,C1 only if admitted", + "if both >=15% wall and CPU at pair with exact outputs, finish fixed C2,B2,B3,C3 BCCBBC sequence", + "finite normal/O and Git-free readonly/source/export checks", + "focused publication via Chrome if useful supported result" + ], + "noise_rule": "For six fixed cold BCCBBC runs, baseline median minus candidate median must exceed max(within-baseline range,within-candidate range) separately for wall and CPU, in addition to15% both; all samples and stops retained; first diagnostic not selected", + "preserve": [ + "unchanged full caller bytes and arithmetic/source checks", + "every original finite check and exact output", + "full original CLI certificate bytes/stdout", + "ordered side witnesses/rank trace/complement stream", + "native finite independent dense oracle, source/type/binding/fallback controls", + "cold compiler/link/load and all new controls in candidate bill", + "all failure evidence and source bytes/modes" + ], + "paused": [ + "kappa research", + "Work1/2 mathematical streams", + "unrelated feeds", + "automations" + ], + "stop": [ + "source/output/coverage/oracle mismatch", + "wall/RSS/aggregate cap", + "first complete pair fails target", + "final medians fail target/noise", + "full caller has unpriced side effects or dependencies" + ] +} diff --git a/research/gf2-full-network/evidence/PROFILE-v1-FAILURE.json b/research/gf2-full-network/evidence/PROFILE-v1-FAILURE.json new file mode 100644 index 0000000000..09d6c1cdc0 --- /dev/null +++ b/research/gf2-full-network/evidence/PROFILE-v1-FAILURE.json @@ -0,0 +1,8 @@ +{ + "status": "PRE_SCIENCE_IMPORT_STOP_RETAINED", + "cause": "Parent entry profile.py shadowed stdlib profile imported by unchanged cProfile dependency", + "correction": "New immutable profile-v2 stage with full_profile_entry.py; driver/engine/caller unchanged; no same-stage retry", + "scientific_work_executed": false, + "timing_sample": false, + "receipt": "runtime/runs/full-network-profile-v1/receipt.json" +} diff --git a/research/gf2-full-network/evidence/RESULTS.md b/research/gf2-full-network/evidence/RESULTS.md new file mode 100644 index 0000000000..2787a89633 --- /dev/null +++ b/research/gf2-full-network/evidence/RESULTS.md @@ -0,0 +1,18 @@ +# Complete frozen H25 verification qualification + +All six declared cold BCCBBC processes pass exact full-caller correctness, the minimum 15% wall AND CPU gate, and the declared repeat-spread noise gate. This is the complete frozen historical `scripts/complex_network.py` CLI with retained full typed return, ordered side witnesses, rank records and complement observation. It is not an uninstrumented bare-CLI factor or a selected-frontier/PR5864/kappa result. + +| Metric | Baseline median | Native median | Reduction | Saving | Largest within-arm range | +|---|---:|---:|---:|---:|---:| +| Wall seconds | 39.686181760 | 28.636256246 | 27.843257% | 11.049925514 | 4.533797564 | +| CPU seconds, compiler included | 39.58 | 28.46 | 28.094997% | 11.12 | 3.48 | + +No sample was dropped or rerun. C3 was slower and remains in the calculation. The profile anchor is excluded. The initial 0.976-second parent entry import failure is retained separately; it preceded scientific work, and the corrected entry has a distinct frozen stage and basename. + +The full original caller executes side construction, role compilation, every finite side/map/label/role check, exact counts/gates, logarithm enclosure, guard/recurrence/constraint/margin checks, the historical ceiling check, the original 19-payload upstream verifier, original JSON serialization/write and both original stdout lines. Both arms retain the same observations and exact output work. Every candidate additionally pays cold compilation/link/load and the unchanged PR5929 independent dense/finite, type, width, fallback and source/live-binding controls. Full runs retain original assertions; optimized full verification is rejected. + +The full certificate matches committed SHA-256 `1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f`. Lossless ordered full-return SHA-256 `542e4fd73d38b88122d1bf0fffa5f3b092cc4681a14012162daef47e89363cfd` matches the independently generated baseline anchor in every arm. All original side identities match PR5929: 59,959Gram-rank records, 238,685ordered complements and 55,839,507canonical complement-stream bytes. The complete 58,143,622-byte ordered witness, 2,674,272-byte rank transcript, typed return, certificate, stdout and complement receipt are retained in canonical lossless artifacts with independent logical and transport hashes. + +Parent ran every scientific/compiler process serially, under 180 seconds per command and 1 GiB sampled process-group RSS. Source bytes/modes are unchanged in every successful receipt. Environment: Linux x86-64, CPython 3.12.3, GCC 13.3. Metadata, read-only export and hosted checks are publication obligations, recorded separately from these six local performance samples. + +Existing PR5929 source design/native kernel is reused unchanged and credited. Its earlier 29.27% side-segment result is separate. Original CrocSwap authors/notices and upstream license remain preserved. Chris R/Clear1nsight with substantial OpenAI Codex implementation and user-requested Astra xhigh source design/independent review. This is finite engineering evidence, not a formal proof or new mathematical admission. The original further 15% PR5864 app goal remains blocked and incomplete; paused mathematical streams, feeds and automations remain paused. diff --git a/research/gf2-full-network/evidence/SOURCE-DESIGN.md b/research/gf2-full-network/evidence/SOURCE-DESIGN.md new file mode 100644 index 0000000000..f5d1915940 --- /dev/null +++ b/research/gf2-full-network/evidence/SOURCE-DESIGN.md @@ -0,0 +1,54 @@ +# Full historical complex-network GF(2) evaluation + +## Source and scope + +The fixed caller is `scripts/complex_network.py` at canonical main `19fdb086ea96af9a9f87936a2b888e10af4ed810`, with `H=25`. Its bytes match PR5929's frozen caller (`0da395e…`). The circuit bytes likewise match (`d623617f…`). PR5929's seven engine/input files are copied unchanged into `engine/` and individually pinned. No old source or evidence is edited. + +The evaluation target is the **complete historical CLI with retained exact observations**. It is distinct from the prior side-only scope, the blocked further-15% PR5864 objective and current selected-frontier replay. No gain, new construction, parameter search, mathematical admission or bare-CLI performance factor is inferred here. + +## What the complete caller adds + +The original `certificate()` first constructs the side circuit, initializes checks, compiles roles and calls all three side-verification functions. It then performs: + +1. Exact network counts and positive-deficit check. +2. Rational logarithm enclosure and strict saving comparison. +3. Fixed rational parameters, stopped-depth guard constants, compact-control recurrence, every strict constraint slack, every margin and absorption gap. +4. Dyadic-scale and retained-bit ceiling checks. +5. The real `certify.verify_sources()` and gate-count bound. + +The return includes all those observations and the unchanged historical conditional status/scope. The literal CLI applies the original recursive `serializable`, writes `certificates/complex-network.json` with its existing sorted/indented JSON and newline, then prints its two original lines. The reference file hash is `1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f`. Fractions become strings in that file, so an additional typed full-return representation preserves exact Fraction numerator/denominator, int/bool/float/string distinctions, tuple/list distinctions and dictionary insertion order. + +## Closed inputs + +`SOURCE-PINS.json` is a byte-identical copy of the parent's authenticated 32-file inventory, pinned by its own hash. Twelve Python modules form the complete import closure: + +- `complex_network`, `complex_circuit`, `certify`; +- `compact_control_layer`, `prepare_layers`, `search_network`; +- `paired_network`, `shared_point_network`, `shared_point_circuit`; +- `paired_exclusion_circuit`, `exclusion_circuit`, `audit_short_guards`. + +Their external imports are standard-library modules. Importing the related modules does not call their `__main__` certificate/search routines; no h50 graph or unrelated search should be executed. The complete caller still imports those modules normally and pays their cold cost. + +The remaining files are `upstream/manifest.json` and all 19 payloads it names: license, README, formalization YAML, main/bibliography, twelve sections and two figures. The manuscript commit is `adc7f1241b42e322a6451854ab7e4b4c146bf78a`. The original verifier reads the manifest and hashes every payload; the wrapper additionally pins the manifest itself and independently checks its complete file inventory. No network fetch, source-verifier stub or substituted PASS is permitted. The previously missing `upstream/` tree was a cheap blocker, now resolved by the parent's complete frozen copy. + +## Untouched CLI invocation + +`full_driver.py` accepts explicit `--frozen-root`, `--reference` (the JSON file), `--mode profile|baseline|candidate`, and a new external `--output`. Both benchmark arms additionally require `--anchor`. All inputs and the unchanged engine are copied into that output directory inside the measured process. The wrapper never writes or chmods the immutable stage. It retains actual input file modes in both copies; only the fresh private runtime root is made writable so the original CLI can create its certificate. Readonly and Git-export storage modes need not equal the historical inventory's local 0664 mode. + +The engine loads its pinned circuit with canonical module name `complex_circuit`; that exact object is registered in `sys.modules`. Its two source copies must equal the corresponding frozen scripts byte-for-byte. Other scientific modules resolve only from the private full scripts tree. The original caller executes once through `runpy.run_path(..., run_name='__main__')`, with original argv semantics, normal assertion mode and original ROOT-derived output location. Its actual import identities and output file set are checked afterward. + +An observational wrapper around the original `verify_role_frames` delegates exactly once, preserves its returned object, and retains `c`, `checks` and `code`. A depth-aware `serializable` observer delegates the original routine once per value and captures only the outer full certificate. Lightweight phase wrappers expose construction/map/label/role, logarithm, source-hashing and outer serialization costs. They do not replace checks, sum nested durations or justify projected speedups. The original source stdout is captured, compared byte-for-byte and re-emitted; wrapper metadata is separately identified. + +## Exact evidence and binding + +Both arms reconstruct the same complete side structural/basis/role witness and ordered Gram-rank transcript using the unchanged PR5929 writer. They require its three exact hashes, 59,959 rank calls and 252 distinct matrices. Every ordered complement input/output is streamed with the original canonical schema, requiring 238,685 calls, 55,839,507 canonical bytes and digest `7dec2bf…`. No witness is sampled or reduced to only an odd-vector predicate. + +The candidate binds only the published `Label.complement_in` and `Label.nondegenerate` implementation. Its exact-domain/fallback, resolved-builtins, function-code/closure, class and native-dispatch guards remain unchanged. Observation wrappers do not alter Label dispatch. A fresh process, serial calls and no in-call environment mutation remain mandatory. Every candidate pays cold compilation/link/load and the entire unchanged finite independent dense-oracle, ordering, width/type/iterator/fallback and binding suite before the full CLI. + +Profile mode runs the literal baseline path once and emits a new anchor of full file/stdout bytes, typed full return and all retained side observations. It is excluded from performance selection. Baseline/candidate samples reject an anchor from different driver, engine, input pins or scientific observations. The existing side-only hashes do not predeclare a full-caller timing or typed-return result. + +## Resource boundary and immediate checks + +The additional source closure is modest and its arithmetic uses exact scalars; static inspection exposes no newly invoked large graph or third-party dependency. Nevertheless, retained side objects, full witness serialization, compiler and all controls determine actual peak RSS and cost. No numerical headroom or gain is projected. The parent's unchanged serial 180-second/1-GiB guard and aggregate caps govern the first diagnostic and any admitted fixed comparison. + +Before execution, the independent reviewer should check canonical module identity, one original role call, intact recursive serialization, real source verification, exact CLI bytes, complete source custody and anchor gating. Runtime correctness and cost remain untested by this source-owning agent. All work here was static reading, copying, authoring and source hashing; no scientific imports, compilation, corpus decoding or timing was performed. diff --git a/research/gf2-full-network/evidence/UPSTREAM-REFRESH.json b/research/gf2-full-network/evidence/UPSTREAM-REFRESH.json new file mode 100644 index 0000000000..c547891428 --- /dev/null +++ b/research/gf2-full-network/evidence/UPSTREAM-REFRESH.json @@ -0,0 +1,47 @@ +{ + "canonical_main": "19fdb086ea96af9a9f87936a2b888e10af4ed810", + "paths": { + "AGENTS.md": { + "sha256": "fbee67ab9e0ae4629a35fd9dba69c8f7e29e4a15392eb2d0f75d8768ffb65f40" + }, + "CONTRIBUTING.md": { + "sha256": "fcd1a8d0e52342a23b8ffa9e905e85ccc539fb084145ef016dfc93cedfb3d924" + }, + "autoresearch.md": { + "sha256": "d16f0d3bb4d4b213d06c128db6d6460b0fe9ec1ac5a6c1ea1febf1db40e7b60d" + }, + "docs/research/agent-procedure.md": { + "sha256": "8367063f9f2d48543415451e026f83224ea962b28801bea6904e6e425ed023e4" + }, + "docs/research/research-family-status.md": { + "sha256": "92c8010dfd9fc33e921f70526231f8689e06ea784f1b1387d895344b227f36d7" + }, + "docs/research/research-package-guide.md": { + "sha256": "5e3aa8b2ce657f943ef5fd187473a01a92a7073ef7e05b30affa08979daa2c6e" + }, + "docs/research/research-priorities.json": { + "available": false + }, + "certificates/selected-result.json": { + "sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5" + }, + "docs/research/agent-task-catalog.json": { + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81" + } + }, + "priority_revision": 8, + "freshly_fetched": true, + "claim": "https://github.com/CrocSwap/integer-mult-bounds/pull/5929#issuecomment-6451967873", + "chrome_overlap": { + "H25_open_prs": [ + 5929, + 5972 + ], + "GF2_discussions": [ + 1587, + 1166 + ], + "recent_handoff_page_read": true, + "coverage": "bounded title/body searches and newest handoff page, not exhaustive" + } +} diff --git a/research/gf2-full-network/evidence/canonical/MANIFEST.json b/research/gf2-full-network/evidence/canonical/MANIFEST.json new file mode 100644 index 0000000000..95917d3e64 --- /dev/null +++ b/research/gf2-full-network/evidence/canonical/MANIFEST.json @@ -0,0 +1,47 @@ +{ + "artifacts": { + "complement-transcript.json": { + "encoding": "plain", + "logical_bytes": 227, + "logical_sha256": "36ef2bbc469c1e701bfc06b0d240aa31575f82132e8d204f0fa2e1802b21fea8", + "transport_bytes": 227, + "transport_sha256": "36ef2bbc469c1e701bfc06b0d240aa31575f82132e8d204f0fa2e1802b21fea8" + }, + "complex-network.json": { + "encoding": "plain", + "logical_bytes": 5662, + "logical_sha256": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f", + "transport_bytes": 5662, + "transport_sha256": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f" + }, + "full-return.lossless.json.gz": { + "encoding": "gzip", + "logical_bytes": 7311, + "logical_sha256": "542e4fd73d38b88122d1bf0fffa5f3b092cc4681a14012162daef47e89363cfd", + "transport_bytes": 2360, + "transport_sha256": "2ccdc80933fe4b3d774cf71ad2877864aca64e7de48b62c6391f449f2d2a67c2" + }, + "original-stdout.txt": { + "encoding": "plain", + "logical_bytes": 137, + "logical_sha256": "8f77b724810ec05fb19b35d75d8002d31a6e22ed342a36ee28a5caef8d643015", + "transport_bytes": 137, + "transport_sha256": "8f77b724810ec05fb19b35d75d8002d31a6e22ed342a36ee28a5caef8d643015" + }, + "rank-trace.json.gz": { + "encoding": "gzip", + "logical_bytes": 2674272, + "logical_sha256": "85006ca332bbc57c2ba9fd06f61a0281d4cee600c9f3b449342379bf2aedec8f", + "transport_bytes": 22029, + "transport_sha256": "20e76cd894807cf84ca740312fdc2a73d1d70740e2f0c5ec55b3d0afdd9311fa" + }, + "witness.json.gz": { + "encoding": "gzip", + "logical_bytes": 58143622, + "logical_sha256": "4b170c1dbfc33c7cb141a2284c6fd69eac7b6d100971d3e9ee625502b5893f82", + "transport_bytes": 16995263, + "transport_sha256": "8e1b8b03320d5e077c0414c3644396faf182bdfa1a72d8067c8fea8a33dbf5d0" + } + }, + "schema_version": 1 +} diff --git a/research/gf2-full-network/evidence/canonical/complement-transcript.json b/research/gf2-full-network/evidence/canonical/complement-transcript.json new file mode 100644 index 0000000000..00290f932b --- /dev/null +++ b/research/gf2-full-network/evidence/canonical/complement-transcript.json @@ -0,0 +1 @@ +{"calls":238685,"canonical_stream_bytes":55839507,"schema":"v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors","sha256":"7dec2bf33303c37e1c699609e83768d61df7e19104d34a26a148f66d5ccc4838"} diff --git a/research/gf2-full-network/evidence/canonical/complex-network.json b/research/gf2-full-network/evidence/canonical/complex-network.json new file mode 100644 index 0000000000..62a6091887 --- /dev/null +++ b/research/gf2-full-network/evidence/canonical/complex-network.json @@ -0,0 +1,143 @@ +{ + "bit_saving": "37/12500000000", + "circuit": { + "additions": 80595, + "disjoint_additions": 68595, + "h": 25, + "injections": 27600, + "pair_star_additions": 12000, + "roles": 108195, + "roles_per_target": 47.041, + "v": 2300 + }, + "complex_counts": { + "I": 15870000, + "L": 10315500000, + "N": 12167000000, + "W": 1741801270000, + "central_roles": 26, + "deficit": 3703000000, + "eta": "28/205789375", + "h": 25, + "m": 15625, + "original_side_wires_per_invocation": 3693800, + "s": 27215641140750000, + "side_roles_per_invocation": 108195, + "v": 2300 + }, + "complex_deficit_slack": "6761797/8231575000000000", + "complex_saving": "7/500000000", + "gates": { + "gates_per_invocation": 340784, + "total_gates": 5408242080000, + "twelve_W": 20901615240000 + }, + "improvement_over_compact_control": "590/83", + "labels": { + "active_nodes": 82895, + "all_labels_nondegenerate": true, + "all_residuals_have_odd_vectors": true, + "checked_inclusions": 188790 + }, + "log_enclosure": [ + "1003674733095412338935264801206694829502804118660273821722358572561777951813562324984581151664909098376456139346987946438356114944865114544057566309229396051200891281693308045036569381219925884240815457348697380244265196736/103936362434495646010619550865033734742948881177937982419226476521510946436948314218071351858470876811875561920539687733866419026027866373569756270393100104240876895441796280524990301784985328254889750901950661699188332905", + "119905674780465260758132999318298249674205865631153226854493684575647168973933813765866273005815485563618924127097549911779010579460799218169313950759672923946122257420539013677630274686709038285230521425787947340179037163618384721/12416930765507746510068682343342696843957626338057657633016923061769841067667425271918924168691987416458733797440474694605908192976129102762466882436295692453310093108779928980052174719912913882184162241086372384329699504384000000" + ], + "log_m_upper": "483/50", + "role_frames": { + "forward_frames_nested": true, + "reverse_complement_frames_nested": true, + "roles": 108195 + }, + "scope": "Conditional on the pinned upstream interfaces, the compact-control movement and guard proofs, the paired bit network, and the written binary-frame transfer for this complex side circuit. Exact arithmetic and finite checks are not formal verification.", + "scoped_ceiling": { + "below_2_to_minus_30": true, + "scope": "Published h=50 paired bit network and retained Gaussian margin; not a bound on other networks or algorithms.", + "upper": "37/62500000000" + }, + "side_map": { + "coefficients": "+1/2 disjoint, -1/2 intersection two", + "nonzero_coefficients": 3693800, + "side_map_exact": true, + "targets": 2300 + }, + "status": "CONDITIONAL 59/10^11 WITNESS; COMPRESSED COMPLEX SIDE CIRCUIT; NOT FORMAL VERIFICATION", + "upstream_commit": "adc7f1241b42e322a6451854ab7e4b4c146bf78a", + "witness": { + "absorption_gap": "29261/25000000000000000", + "constraint_slacks": { + "K_dominates_log_p": "19979001/100000000", + "K_smaller_than_ell": "60021999/100000000", + "alpha_below_sqrt_p": "80001/400000", + "beta_below_one": "999/1000", + "beta_positive": "1/1000", + "c_positive": "999/1000", + "crt_layout": "2960037/1250000000000000", + "delta_below_one_eighth": "124999/1000000", + "delta_positive": "1/1000000", + "dimension_upper_bound": "40003/300000", + "epsilon_positive": "19999/100000", + "gamma_sublinear": "40003/200000", + "gaussian_cost": "23/2000000", + "guard_width": "829961/1000000000", + "kappa_positive": "59/100000000000", + "lambda_above_sigma": "5521/500000000000", + "lambda_above_tau": "1/500000000000", + "lambda_below_one": "1479/500000000000", + "lambda_prime_above_lambda": "1/500000000000", + "lambda_prime_below_one": "739/250000000000", + "leaf_cost": "1103/100000000000", + "packed_overhead": "1/500000000000", + "prefix_cost": "60021999/100000000", + "prime_interval_growth": "30001/50000", + "r_superpolynomial": "80001/100000", + "reserved_axes": "249749999261/250000000000", + "scalar_cost": "800009/1000000", + "sigma_below_one": "7/500000000", + "sigma_positive": "499999993/500000000", + "tau_below_one": "37/12500000000", + "tau_positive": "12499999963/12500000000" + }, + "guard": { + "B": 338201706233372774319109678801287590064, + "C0": 321727027889740762489223803495350305328695729120143793284991524019954162292886152000000, + "C1": "49961/10000", + "E": 338201706233372774319082463160146840064, + "beta": "1/1000", + "m": 15625, + "s": 27215641140750000, + "zeta": "1/10000" + }, + "limiting_margins": [ + "g3" + ], + "margins": { + "g1": "60021999/100000000", + "g2": "739223037/1250000000000000000", + "g3": "14779261/25000000000000000", + "g4": "2960037/1250000000000000", + "g5": "23/2000000", + "g6": "800009/1000000", + "g7": "19999/100000" + }, + "minimum_margin": "14779261/25000000000000000", + "parameters": { + "C1": "49961/10000", + "beta": "1/1000", + "c": "999/1000", + "delta": "1/1000000", + "epsilon": "19999/100000", + "kappa": "59/100000000000", + "lam": "499999998521/500000000000", + "lamp": "249999999261/250000000000", + "sigma": "499999993/500000000", + "tau": "12499999963/12500000000" + }, + "recurrence": { + "internal": "12499999963/12500000000", + "layer": "12499999963/12500000000", + "leaf": "499999993007/500000000000", + "preprocessing": "1/1000" + } + } +} diff --git a/research/gf2-full-network/evidence/canonical/full-return.lossless.json.gz b/research/gf2-full-network/evidence/canonical/full-return.lossless.json.gz new file mode 100644 index 0000000000..e751ba95d9 Binary files /dev/null and b/research/gf2-full-network/evidence/canonical/full-return.lossless.json.gz differ diff --git a/research/gf2-full-network/evidence/canonical/original-stdout.txt b/research/gf2-full-network/evidence/canonical/original-stdout.txt new file mode 100644 index 0000000000..ea0a81bb3a --- /dev/null +++ b/research/gf2-full-network/evidence/canonical/original-stdout.txt @@ -0,0 +1,2 @@ +PASS conditional 59/100000000000 > 2^-31; minimum margin 14779261/25000000000000000 +Side roles per invocation 108195 vs original 3693800 diff --git a/research/gf2-full-network/evidence/canonical/rank-trace.json.gz b/research/gf2-full-network/evidence/canonical/rank-trace.json.gz new file mode 100644 index 0000000000..8b071cc725 Binary files /dev/null and b/research/gf2-full-network/evidence/canonical/rank-trace.json.gz differ diff --git a/research/gf2-full-network/evidence/canonical/witness.json.gz b/research/gf2-full-network/evidence/canonical/witness.json.gz new file mode 100644 index 0000000000..4d7d6a59c7 Binary files /dev/null and b/research/gf2-full-network/evidence/canonical/witness.json.gz differ diff --git a/research/gf2-full-network/evidence/publication-v1-failure/REVISION.json b/research/gf2-full-network/evidence/publication-v1-failure/REVISION.json new file mode 100644 index 0000000000..08bc595fe1 --- /dev/null +++ b/research/gf2-full-network/evidence/publication-v1-failure/REVISION.json @@ -0,0 +1,8 @@ +{ + "status": "SCIENTIFIC_PASS_PUBLICATION_CLEANUP_STOP_RETAINED", + "inner_scientific_guard_status": "PASS", + "failure": "shutil.rmtree cannot unlink inside0555 private cloned engine dirs", + "repair": "Only private external temporary clone directories become0755 after all source/scientific checks; remove temporary root inside caughttry so any cleanup failure reports evidence path", + "changed_scientific_code_or_benchmark_samples": false, + "next": "One source-reviewed corrected full readonly publication replay, excluded from performance selection" +} diff --git a/research/gf2-full-network/evidence/publication-v1-failure/receipt.json b/research/gf2-full-network/evidence/publication-v1-failure/receipt.json new file mode 100644 index 0000000000..cea5919b9c --- /dev/null +++ b/research/gf2-full-network/evidence/publication-v1-failure/receipt.json @@ -0,0 +1,23 @@ +{ + "exit": 1, + "label": "publication-full-readonly-C", + "optimized": false, + "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]", + "runner_sha256": "7540f8cc4ae4d12ed86c844ef0837a74184d3ada653979608c295c09f200a751", + "runtime_policy_sha256": "ff0f4e928e2beeddd38b4b67a446c5eb75dbf9f1c78cac386fc0c6528108f205", + "sampled_process_group_rss_bytes": 53157888, + "script": "stages/publication-v1/check_full.py", + "source_bytes_and_modes_unchanged": true, + "source_inventory_sha256": "ed6d9bcbd7d76f82a5a40df784b8c16ef9709ba7235da5598be540e124077e8e", + "status": "STOP", + "stderr_bytes": 1638, + "stderr_sha256": "9cc43b411c844bdc69171311f26efbba2d063c20cc5f1ece45f465f92ece9515", + "stdout_bytes": 947, + "stdout_sha256": "3a5034b4208e91f156d7658387ea85eb1d0ad98fa283c0e3185e41bf0e4c7342", + "termination": null, + "usage": { + "raw": "Command exited with non-zero status 1\n{\"user_seconds\":43.34,\"system_seconds\":4.77,\"kernel_max_rss_kib\":453552,\"exit\":1}\n" + }, + "wall_seconds": 33.3818164569966 +} diff --git a/research/gf2-full-network/evidence/publication-v1-failure/stderr.txt b/research/gf2-full-network/evidence/publication-v1-failure/stderr.txt new file mode 100644 index 0000000000..e8114ba283 --- /dev/null +++ b/research/gf2-full-network/evidence/publication-v1-failure/stderr.txt @@ -0,0 +1,25 @@ +Traceback (most recent call last): + File "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/stages/publication-v1/check_full.py", line 5, in + runpy.run_path(str(script),run_name='__main__') + File "", line 286, in run_path + File "", line 98, in _run_module_code + File "", line 88, in _run_code + File "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/stages/publication-v1/package/verify_full.py", line 32, in + if __name__=='__main__':main() + ^^^^^^ + File "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/stages/publication-v1/package/verify_full.py", line 28, in main + else:shutil.rmtree(temporary) + ^^^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/lib/python3.12/shutil.py", line 785, in rmtree + _rmtree_safe_fd(fd, path, onexc) + File "/usr/lib/python3.12/shutil.py", line 686, in _rmtree_safe_fd + _rmtree_safe_fd(dirfd, fullname, onexc) + File "/usr/lib/python3.12/shutil.py", line 686, in _rmtree_safe_fd + _rmtree_safe_fd(dirfd, fullname, onexc) + File "/usr/lib/python3.12/shutil.py", line 686, in _rmtree_safe_fd + _rmtree_safe_fd(dirfd, fullname, onexc) + File "/usr/lib/python3.12/shutil.py", line 717, in _rmtree_safe_fd + onexc(os.unlink, fullname, err) + File "/usr/lib/python3.12/shutil.py", line 715, in _rmtree_safe_fd + os.unlink(entry.name, dir_fd=topfd) +PermissionError: [Errno 13] Permission denied: 'finite_controls.py' diff --git a/research/gf2-full-network/evidence/publication-v1-failure/stdout.txt b/research/gf2-full-network/evidence/publication-v1-failure/stdout.txt new file mode 100644 index 0000000000..1e8f19b699 --- /dev/null +++ b/research/gf2-full-network/evidence/publication-v1-failure/stdout.txt @@ -0,0 +1 @@ +{"exit": 0, "label": "complete-C", "optimized": false, "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39", "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]", "runner_sha256": "7540f8cc4ae4d12ed86c844ef0837a74184d3ada653979608c295c09f200a751", "runtime_policy_sha256": "9f44d808d289c073d749f0a9b77a748784895ad25d0f74a0aad32d55ed65d463", "sampled_process_group_rss_bytes": 407900160, "script": "full_C.py", "source_bytes_and_modes_unchanged": true, "source_inventory_sha256": "53340091e61a64b3c3b3045df6eea2e36a81dfa242fb2d68c99f69c21244b43f", "status": "PASS", "stderr_bytes": 0, "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "stdout_bytes": 3969, "stdout_sha256": "3bd0a544756b8e748bcfc265338c1986504a28327bbf2bb85058e45d813d196f", "termination": null, "usage": {"exit": 0, "kernel_max_rss_kib": 453552, "system_seconds": 0.44, "user_seconds": 30.91}, "wall_seconds": 31.691533826990053} diff --git a/research/gf2-full-network/evidence/publication-v1-failure/usage.json b/research/gf2-full-network/evidence/publication-v1-failure/usage.json new file mode 100644 index 0000000000..188ace82e8 --- /dev/null +++ b/research/gf2-full-network/evidence/publication-v1-failure/usage.json @@ -0,0 +1,2 @@ +Command exited with non-zero status 1 +{"user_seconds":43.34,"system_seconds":4.77,"kernel_max_rss_kib":453552,"exit":1} diff --git a/research/gf2-full-network/evidence/publication-v1-failure/verify_full.py.txt b/research/gf2-full-network/evidence/publication-v1-failure/verify_full.py.txt new file mode 100644 index 0000000000..aaa120d23b --- /dev/null +++ b/research/gf2-full-network/evidence/publication-v1-failure/verify_full.py.txt @@ -0,0 +1,32 @@ +"""One complete C correctness replay; never a hosted performance-factor claim.""" +from hashlib import sha256 +import json +from pathlib import Path +import sys +import types +ROOT=Path(__file__).resolve().parent +pins=json.loads((ROOT/'CODE-SOURCES.json').read_text())['files'] +for name in ('verify_full.py','archive_support.py','replay.py'): + if sha256((ROOT/name).read_bytes()).hexdigest()!=pins[name]:raise ValueError('full correctness wrapper pin: '+name) +S=types.ModuleType('_gf2_verify_full_support');S.__file__=str(ROOT/'archive_support.py') +exec(compile((ROOT/'archive_support.py').read_bytes(),S.__file__,'exec'),S.__dict__) + + +def main(): + import shutil + import tempfile + S.need(len(sys.argv)==1 and sys.flags.optimize==0,'one full correctness run with original assertions') + S.authenticate();temporary=Path(tempfile.mkdtemp(prefix='gf2-full-correctness-')) + replay=S.source_module('_gf2_verify_full_replay',ROOT/'replay.py') + try: + result=replay.run('C',temporary/'run',timeout=150) + S.need(result['scientific']['science']==json.loads((ROOT/'anchor.json').read_text())['science'],'full exact anchor equality') + S.authenticate() + except BaseException as error: + error.add_note('Full correctness evidence retained at '+str(temporary)) + raise + else:shutil.rmtree(temporary) + print(json.dumps(dict(status='PASS_GF2_FULL_C_CORRECTNESS',hosted_performance_factor_claim=False,fixed_benchmark_sample=False,inner_timeout_seconds=150))) + + +if __name__=='__main__':main() diff --git a/research/gf2-full-network/evidence/runs/full-network-B1/receipt.json b/research/gf2-full-network/evidence/runs/full-network-B1/receipt.json new file mode 100644 index 0000000000..8ae82daeda --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-B1/receipt.json @@ -0,0 +1,26 @@ +{ + "exit": 0, + "label": "full-network-B1", + "optimized": false, + "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]", + "runner_sha256": "7540f8cc4ae4d12ed86c844ef0837a74184d3ada653979608c295c09f200a751", + "runtime_policy_sha256": "8d87423d90a0a85e0115c85b74f500847e409c30b7e98850d47b6e36f560c772", + "sampled_process_group_rss_bytes": 407670784, + "script": "stages/qualification-v1/full_B1.py", + "source_bytes_and_modes_unchanged": true, + "source_inventory_sha256": "cd8215aef55d75ba5c7bf9377a9572eb3509b0cd1c699db221435c7b519e25a9", + "status": "PASS", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_bytes": 3665, + "stdout_sha256": "0f6e7069212f9ee752d4123475fde0ca526fc9c41d68bf952022e7cd41612f43", + "termination": null, + "usage": { + "exit": 0, + "kernel_max_rss_kib": 453356, + "system_seconds": 0.32, + "user_seconds": 41.32 + }, + "wall_seconds": 42.103671320015565 +} diff --git a/research/gf2-full-network/evidence/runs/full-network-B1/scientific-receipt.json b/research/gf2-full-network/evidence/runs/full-network-B1/scientific-receipt.json new file mode 100644 index 0000000000..4335a746b3 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-B1/scientific-receipt.json @@ -0,0 +1,355 @@ +{ + "base_commit": "19fdb086ea96af9a9f87936a2b888e10af4ed810", + "build": null, + "compiler_tmpdir": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B1/compiler-tmp", + "driver_sha256": "0d976d2eb6b845f20d4a3396591a806f966688b88693cd6a5f8a0c9e48925e36", + "engine_custody": { + "compare_side_verifier.py": { + "bytes": 10571, + "mode": 292, + "sha256": "6e507bb0c7e00d090a60289fddb6c55e90c946d0850c42c3c5e3e15c27604a68" + }, + "finite_controls.py": { + "bytes": 23815, + "mode": 292, + "sha256": "df989a831aac43cc1af95169dad8c64a7548760e6e1f96976da996703f2c8f7a" + }, + "native_backend.py": { + "bytes": 20334, + "mode": 292, + "sha256": "e473c38245c3668715b5a78dfe980b2fe3ed0d0c9b8c97c666fbae6ecf1fffd5" + }, + "native_gf2.c": { + "bytes": 7425, + "mode": 292, + "sha256": "e9c3c9194a08718bd1575c1cf08c6c6772d3b644c2e274c25a84a1f9249d06cc" + }, + "profile_side_verifier.py": { + "bytes": 8959, + "mode": 292, + "sha256": "9c994378171c20a91539418d93cb8387e1daa93465d6862beefea90e12999c2a" + }, + "source/complex_circuit.py": { + "bytes": 19732, + "mode": 292, + "sha256": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1" + }, + "source/complex_network.py": { + "bytes": 6105, + "mode": 292, + "sha256": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b" + } + }, + "environment": { + "executable": "/usr/bin/python3.12", + "platform": "linux", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]" + }, + "finite_controls": null, + "frozen_custody": { + "scripts/audit_short_guards.py": { + "bytes": 7956, + "mode": 292, + "sha256": "c2c929c956e617bee739963b517b9069e0d067cfebc6820f401a4e90a1769eb1" + }, + "scripts/certify.py": { + "bytes": 11276, + "mode": 292, + "sha256": "2348d95008276c5d5764f7e028c3918e484582cd589bd4d9b82919161745e53e" + }, + "scripts/compact_control_layer.py": { + "bytes": 7892, + "mode": 292, + "sha256": "e814c9f8d84f2e5d3aa2e06c36697f27f110218addc40ff8df2801fde861ff9f" + }, + "scripts/complex_circuit.py": { + "bytes": 19732, + "mode": 292, + "sha256": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1" + }, + "scripts/complex_network.py": { + "bytes": 6105, + "mode": 292, + "sha256": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b" + }, + "scripts/exclusion_circuit.py": { + "bytes": 9450, + "mode": 292, + "sha256": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3" + }, + "scripts/paired_exclusion_circuit.py": { + "bytes": 2289, + "mode": 292, + "sha256": "8f05f04cf06217befd6d0ee0f2d7d0c5c5eb32cfab8c9a8ca7917fd6d620b7d2" + }, + "scripts/paired_network.py": { + "bytes": 4933, + "mode": 292, + "sha256": "991223dc3c1374284c361ed017e42bf732dd971fa0bea2be2282cfb18257b3f7" + }, + "scripts/prepare_layers.py": { + "bytes": 8196, + "mode": 292, + "sha256": "a6e2adc612f264b1c0e51d18ce6315de9ae5e2ae2420aa22e99a22d8bf304947" + }, + "scripts/search_network.py": { + "bytes": 4314, + "mode": 292, + "sha256": "3a4faa5037d9b8e7ca5828afac193a96b6966a8b114f14937921795b24ec4f6a" + }, + "scripts/shared_point_circuit.py": { + "bytes": 13167, + "mode": 292, + "sha256": "360d9bffc0f55315fe294789b72c71c79e0991524555b3a5f42a2ca504d7da95" + }, + "scripts/shared_point_network.py": { + "bytes": 3119, + "mode": 292, + "sha256": "a85e7f0d8c42d6a27e3846308571ca324a1824ac5c2d59e4daa5c7673c33c697" + }, + "upstream/LICENSE": { + "bytes": 11357, + "mode": 292, + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + "upstream/README.md": { + "bytes": 541, + "mode": 292, + "sha256": "8d1ceff898a4e0e681679f91c4def485820be9e99f04e4861f2ce601a364723e" + }, + "upstream/build/figures/multiplication-flow.tex": { + "bytes": 847, + "mode": 292, + "sha256": "3654d2728b0c98919d61760e1802804ed616546a747f9167a93e17bb8697f320" + }, + "upstream/build/figures/proof-map.tex": { + "bytes": 524, + "mode": 292, + "sha256": "76d4deacf07bea355412abcfd798c7cbe6dcccef29a4a420a9e2a7b158f23848" + }, + "upstream/build/main.tex": { + "bytes": 1882, + "mode": 292, + "sha256": "42f0f506976bc2084374a71e97edc1549689a7accf35dda4db2a18af4f13c1aa" + }, + "upstream/build/references.bib": { + "bytes": 9790, + "mode": 292, + "sha256": "33cc2df13ccf85330849e8fb34d4ac7613b23f625787457a5b7b9aa6d7369476" + }, + "upstream/build/sections/00-introduction.tex": { + "bytes": 11515, + "mode": 292, + "sha256": "98721f03682ccf1cc7d0850b07adabaa2d8f3afe552e3861753eba9d284d0da0" + }, + "upstream/build/sections/01-history.tex": { + "bytes": 9689, + "mode": 292, + "sha256": "798956c8150c31e3e2f5f29c47110d25ce619faad1374f4d3a0f15fa3ee33ead" + }, + "upstream/build/sections/02-streams.tex": { + "bytes": 11311, + "mode": 292, + "sha256": "606c80db61cad13aa0c3b6060dc4b88dbbe7ac60cdd831aa93f28d908fd09dab" + }, + "upstream/build/sections/03-motifs.tex": { + "bytes": 31874, + "mode": 292, + "sha256": "ed76761194988a01af77ead0ea6469cb5dcd29690ab985a0b5a4006b0f2b69bb" + }, + "upstream/build/sections/04-swap.tex": { + "bytes": 19884, + "mode": 292, + "sha256": "412b170ccaab38dba96e95e3cbfae09f4876a9818f8d278776a746b0f8044906" + }, + "upstream/build/sections/05-layers.tex": { + "bytes": 46811, + "mode": 292, + "sha256": "20cfc8d12099d4e4ed9e3e7eeb6162edd9b6e0e076f24693364cd24377252594" + }, + "upstream/build/sections/06-transforms.tex": { + "bytes": 33854, + "mode": 292, + "sha256": "924316e4bc905066281d8f9e8746a49d8829aeb393688608deb1e61c3c87853c" + }, + "upstream/build/sections/07-resampling.tex": { + "bytes": 22053, + "mode": 292, + "sha256": "8a6b91670f9163afb54892489fa2210c77fe1b058f0325ec7d18b44b94be6e2c" + }, + "upstream/build/sections/08-assembly.tex": { + "bytes": 46444, + "mode": 292, + "sha256": "763d7945b1e1ec4ebae9b799bcefcc45fa9bae6e2ffad799868a9c3d513dbd4a" + }, + "upstream/build/sections/09-exact-arithmetic.tex": { + "bytes": 6950, + "mode": 292, + "sha256": "5714e5d0656c78c6a1fde8d01fd11f1ba856a7ea94149b283bd9a50fdbf516c3" + }, + "upstream/build/sections/10-transposition.tex": { + "bytes": 2398, + "mode": 292, + "sha256": "c14ad8d56112f6578678a58211bc8d63c3a4b60e55078ac73bc38f7348e713cb" + }, + "upstream/build/sections/11-grouped-rectangles.tex": { + "bytes": 7405, + "mode": 292, + "sha256": "6525cd0a01980e56accfeaf06e9d875bc699197ba42c6e22b69435e352275174" + }, + "upstream/formalization.yaml": { + "bytes": 73925, + "mode": 292, + "sha256": "2dcbd0d6e6a22475f53d49bfdfcac9b6d2b470653c332a9f56522f5be166edb9" + }, + "upstream/manifest.json": { + "bytes": 6217, + "mode": 292, + "sha256": "16ab13971694cabab09440c47ebf2fc0496a9d35fc3af33950fda3498f8e2392" + } + }, + "measurement": "Parent outer guard is authoritative. Phases are nested observations, not additive costs. Profile is excluded from performance selection. Every timed arm includes copies, source checks, original CLI and retained full witnesses/transcripts; candidate additionally pays cold build/load/all finite controls.", + "mode": "baseline", + "native_calls": null, + "native_predecessor_pr": 5929, + "phases": { + "checks_initialization": { + "calls": 1, + "cpu_seconds_with_children": 0.0001079999999995529, + "wall_seconds": 0.00010796598508022726 + }, + "cold_certify_import": { + "calls": 1, + "cpu_seconds_with_children": 0.008097999999999939, + "wall_seconds": 0.008197507006116211 + }, + "cold_complex_module_load": { + "calls": 1, + "cpu_seconds_with_children": 0.01277499999999998, + "wall_seconds": 0.013128021004376933 + }, + "cold_engine_import": { + "calls": 1, + "cpu_seconds_with_children": 0.041035000000000044, + "wall_seconds": 0.043566201988141984 + }, + "cold_prepare_import": { + "calls": 1, + "cpu_seconds_with_children": 0.0072790000000000354, + "wall_seconds": 0.016366670024581254 + }, + "compile_roles": { + "calls": 1, + "cpu_seconds_with_children": 0.6908230000000004, + "wall_seconds": 0.8413900150044356 + }, + "complete_original_cli": { + "calls": 1, + "cpu_seconds_with_children": 38.959421, + "wall_seconds": 39.27583644501283 + }, + "engine_custody": { + "calls": 1, + "cpu_seconds_with_children": 0.0026479999999999837, + "wall_seconds": 0.002697159012313932 + }, + "fresh_engine_copy": { + "calls": 1, + "cpu_seconds_with_children": 0.001931000000000016, + "wall_seconds": 0.0022246230219025165 + }, + "fresh_root_copy": { + "calls": 1, + "cpu_seconds_with_children": 0.007979999999999987, + "wall_seconds": 0.06242200400447473 + }, + "full_log_integer_bounds": { + "calls": 1, + "cpu_seconds_with_children": 0.0005049999999968691, + "wall_seconds": 0.0005052119959145784 + }, + "identical_lossless_side_serialization": { + "calls": 1, + "cpu_seconds_with_children": 1.1996499999999983, + "wall_seconds": 1.1996787980024237 + }, + "input_custody": { + "calls": 1, + "cpu_seconds_with_children": 0.01242500000000002, + "wall_seconds": 0.013132498977938667 + }, + "original_serializable": { + "calls": 1, + "cpu_seconds_with_children": 0.00018099999999776628, + "wall_seconds": 0.00018295799964107573 + }, + "original_upstream_verify_sources": { + "calls": 1, + "cpu_seconds_with_children": 0.002079000000009046, + "wall_seconds": 0.0020764229993801564 + }, + "side_construction": { + "calls": 1, + "cpu_seconds_with_children": 2.170162, + "wall_seconds": 2.2056040469906293 + }, + "verify_labels": { + "calls": 1, + "cpu_seconds_with_children": 27.23334, + "wall_seconds": 27.24539458801155 + }, + "verify_map": { + "calls": 1, + "cpu_seconds_with_children": 7.048207, + "wall_seconds": 7.165842581016477 + }, + "verify_role_frames": { + "calls": 1, + "cpu_seconds_with_children": 1.774670999999998, + "wall_seconds": 1.774711590987863 + } + }, + "private_root_permission": "runtime-root is0755; copied input file modes are retained and checked; immutable stages are never chmodded", + "process_and_compiler_cpu_seconds_before_receipt": 41.249183, + "process_wall_seconds_before_receipt": 41.39030711899977, + "science": { + "full_cli_certificate_sha256": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f", + "full_cli_stdout_sha256": "8f77b724810ec05fb19b35d75d8002d31a6e22ed342a36ee28a5caef8d643015", + "full_return_lossless_sha256": "542e4fd73d38b88122d1bf0fffa5f3b092cc4681a14012162daef47e89363cfd", + "ordered_complements": { + "calls": 238685, + "canonical_stream_bytes": 55839507, + "schema": "v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors", + "sha256": "7dec2bf33303c37e1c699609e83768d61df7e19104d34a26a148f66d5ccc4838" + }, + "side": { + "exact_witness_sha256": "4b170c1dbfc33c7cb141a2284c6fd69eac7b6d100971d3e9ee625502b5893f82", + "rank_call_count": 59959, + "rank_distinct_matrix_count": 252, + "rank_trace_sha256": "85006ca332bbc57c2ba9fd06f61a0281d4cee600c9f3b449342379bf2aedec8f", + "result_sha256": "342e99212b12e518902ae9598613f5484113bacee8747c27a13b58a4b1d3986c", + "serialized_bytes": { + "rank_trace": 2674272, + "result": 527, + "witness": 58143622 + } + }, + "upstream_commit": "adc7f1241b42e322a6451854ab7e4b4c146bf78a" + }, + "scientific_imports": { + "audit_short_guards": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B1/runtime-root/scripts/audit_short_guards.py", + "certify": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B1/runtime-root/scripts/certify.py", + "compact_control_layer": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B1/runtime-root/scripts/compact_control_layer.py", + "complex_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B1/engine/source/complex_circuit.py", + "exclusion_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B1/runtime-root/scripts/exclusion_circuit.py", + "paired_exclusion_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B1/runtime-root/scripts/paired_exclusion_circuit.py", + "paired_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B1/runtime-root/scripts/paired_network.py", + "prepare_layers": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B1/runtime-root/scripts/prepare_layers.py", + "search_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B1/runtime-root/scripts/search_network.py", + "shared_point_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B1/runtime-root/scripts/shared_point_circuit.py", + "shared_point_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B1/runtime-root/scripts/shared_point_network.py" + }, + "scope": "Complete frozen historical complex-network CLI with retained observations; conditional certificate only. No bare-CLI factor, selected-frontier, new kappa or PR5864 speed claim.", + "source_pin_sha256": "88bba3caf5975f30fa7abceaea9454110cf3b069233e8241a2ca13d1dff171a7", + "status": "FULL_NETWORK_COMPLETE_PASS" +} diff --git a/research/gf2-full-network/evidence/runs/full-network-B1/stderr.txt b/research/gf2-full-network/evidence/runs/full-network-B1/stderr.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/research/gf2-full-network/evidence/runs/full-network-B1/stdout.txt b/research/gf2-full-network/evidence/runs/full-network-B1/stdout.txt new file mode 100644 index 0000000000..a820e10947 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-B1/stdout.txt @@ -0,0 +1,3 @@ +PASS conditional 59/100000000000 > 2^-31; minimum margin 14779261/25000000000000000 +Side roles per invocation 108195 vs original 3693800 +{"cpu_seconds_with_compiler": 41.249183, "mode": "baseline", "phases": {"checks_initialization": {"calls": 1, "cpu_seconds_with_children": 0.0001079999999995529, "wall_seconds": 0.00010796598508022726}, "cold_certify_import": {"calls": 1, "cpu_seconds_with_children": 0.008097999999999939, "wall_seconds": 0.008197507006116211}, "cold_complex_module_load": {"calls": 1, "cpu_seconds_with_children": 0.01277499999999998, "wall_seconds": 0.013128021004376933}, "cold_engine_import": {"calls": 1, "cpu_seconds_with_children": 0.041035000000000044, "wall_seconds": 0.043566201988141984}, "cold_prepare_import": {"calls": 1, "cpu_seconds_with_children": 0.0072790000000000354, "wall_seconds": 0.016366670024581254}, "compile_roles": {"calls": 1, "cpu_seconds_with_children": 0.6908230000000004, "wall_seconds": 0.8413900150044356}, "complete_original_cli": {"calls": 1, "cpu_seconds_with_children": 38.959421, "wall_seconds": 39.27583644501283}, "engine_custody": {"calls": 1, "cpu_seconds_with_children": 0.0026479999999999837, "wall_seconds": 0.002697159012313932}, "fresh_engine_copy": {"calls": 1, "cpu_seconds_with_children": 0.001931000000000016, "wall_seconds": 0.0022246230219025165}, "fresh_root_copy": {"calls": 1, "cpu_seconds_with_children": 0.007979999999999987, "wall_seconds": 0.06242200400447473}, "full_log_integer_bounds": {"calls": 1, "cpu_seconds_with_children": 0.0005049999999968691, "wall_seconds": 0.0005052119959145784}, "identical_lossless_side_serialization": {"calls": 1, "cpu_seconds_with_children": 1.1996499999999983, "wall_seconds": 1.1996787980024237}, "input_custody": {"calls": 1, "cpu_seconds_with_children": 0.01242500000000002, "wall_seconds": 0.013132498977938667}, "original_serializable": {"calls": 1, "cpu_seconds_with_children": 0.00018099999999776628, "wall_seconds": 0.00018295799964107573}, "original_upstream_verify_sources": {"calls": 1, "cpu_seconds_with_children": 0.002079000000009046, "wall_seconds": 0.0020764229993801564}, "side_construction": {"calls": 1, "cpu_seconds_with_children": 2.170162, "wall_seconds": 2.2056040469906293}, "verify_labels": {"calls": 1, "cpu_seconds_with_children": 27.23334, "wall_seconds": 27.24539458801155}, "verify_map": {"calls": 1, "cpu_seconds_with_children": 7.048207, "wall_seconds": 7.165842581016477}, "verify_role_frames": {"calls": 1, "cpu_seconds_with_children": 1.774670999999998, "wall_seconds": 1.774711590987863}}, "science": {"full_cli_certificate_sha256": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f", "full_cli_stdout_sha256": "8f77b724810ec05fb19b35d75d8002d31a6e22ed342a36ee28a5caef8d643015", "full_return_lossless_sha256": "542e4fd73d38b88122d1bf0fffa5f3b092cc4681a14012162daef47e89363cfd", "ordered_complements": {"calls": 238685, "canonical_stream_bytes": 55839507, "schema": "v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors", "sha256": "7dec2bf33303c37e1c699609e83768d61df7e19104d34a26a148f66d5ccc4838"}, "side": {"exact_witness_sha256": "4b170c1dbfc33c7cb141a2284c6fd69eac7b6d100971d3e9ee625502b5893f82", "rank_call_count": 59959, "rank_distinct_matrix_count": 252, "rank_trace_sha256": "85006ca332bbc57c2ba9fd06f61a0281d4cee600c9f3b449342379bf2aedec8f", "result_sha256": "342e99212b12e518902ae9598613f5484113bacee8747c27a13b58a4b1d3986c", "serialized_bytes": {"rank_trace": 2674272, "result": 527, "witness": 58143622}}, "upstream_commit": "adc7f1241b42e322a6451854ab7e4b4c146bf78a"}, "status": "FULL_NETWORK_COMPLETE_PASS", "wall_seconds": 41.39030711899977} diff --git a/research/gf2-full-network/evidence/runs/full-network-B1/usage.json b/research/gf2-full-network/evidence/runs/full-network-B1/usage.json new file mode 100644 index 0000000000..fed1a6a860 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-B1/usage.json @@ -0,0 +1 @@ +{"user_seconds":41.32,"system_seconds":0.32,"kernel_max_rss_kib":453356,"exit":0} diff --git a/research/gf2-full-network/evidence/runs/full-network-B2/receipt.json b/research/gf2-full-network/evidence/runs/full-network-B2/receipt.json new file mode 100644 index 0000000000..c00da88b73 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-B2/receipt.json @@ -0,0 +1,26 @@ +{ + "exit": 0, + "label": "full-network-B2", + "optimized": false, + "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]", + "runner_sha256": "7540f8cc4ae4d12ed86c844ef0837a74184d3ada653979608c295c09f200a751", + "runtime_policy_sha256": "8d87423d90a0a85e0115c85b74f500847e409c30b7e98850d47b6e36f560c772", + "sampled_process_group_rss_bytes": 427556864, + "script": "stages/qualification-v1/full_B2.py", + "source_bytes_and_modes_unchanged": true, + "source_inventory_sha256": "cd8215aef55d75ba5c7bf9377a9572eb3509b0cd1c699db221435c7b519e25a9", + "status": "PASS", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_bytes": 3667, + "stdout_sha256": "8f7a10dda0295c3d396017a48eeadd0319a160fe1e4d6993df82426b197c5a2d", + "termination": null, + "usage": { + "exit": 0, + "kernel_max_rss_kib": 453332, + "system_seconds": 0.31, + "user_seconds": 38.97 + }, + "wall_seconds": 39.355439921986545 +} diff --git a/research/gf2-full-network/evidence/runs/full-network-B2/scientific-receipt.json b/research/gf2-full-network/evidence/runs/full-network-B2/scientific-receipt.json new file mode 100644 index 0000000000..cb91b93386 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-B2/scientific-receipt.json @@ -0,0 +1,355 @@ +{ + "base_commit": "19fdb086ea96af9a9f87936a2b888e10af4ed810", + "build": null, + "compiler_tmpdir": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B2/compiler-tmp", + "driver_sha256": "0d976d2eb6b845f20d4a3396591a806f966688b88693cd6a5f8a0c9e48925e36", + "engine_custody": { + "compare_side_verifier.py": { + "bytes": 10571, + "mode": 292, + "sha256": "6e507bb0c7e00d090a60289fddb6c55e90c946d0850c42c3c5e3e15c27604a68" + }, + "finite_controls.py": { + "bytes": 23815, + "mode": 292, + "sha256": "df989a831aac43cc1af95169dad8c64a7548760e6e1f96976da996703f2c8f7a" + }, + "native_backend.py": { + "bytes": 20334, + "mode": 292, + "sha256": "e473c38245c3668715b5a78dfe980b2fe3ed0d0c9b8c97c666fbae6ecf1fffd5" + }, + "native_gf2.c": { + "bytes": 7425, + "mode": 292, + "sha256": "e9c3c9194a08718bd1575c1cf08c6c6772d3b644c2e274c25a84a1f9249d06cc" + }, + "profile_side_verifier.py": { + "bytes": 8959, + "mode": 292, + "sha256": "9c994378171c20a91539418d93cb8387e1daa93465d6862beefea90e12999c2a" + }, + "source/complex_circuit.py": { + "bytes": 19732, + "mode": 292, + "sha256": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1" + }, + "source/complex_network.py": { + "bytes": 6105, + "mode": 292, + "sha256": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b" + } + }, + "environment": { + "executable": "/usr/bin/python3.12", + "platform": "linux", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]" + }, + "finite_controls": null, + "frozen_custody": { + "scripts/audit_short_guards.py": { + "bytes": 7956, + "mode": 292, + "sha256": "c2c929c956e617bee739963b517b9069e0d067cfebc6820f401a4e90a1769eb1" + }, + "scripts/certify.py": { + "bytes": 11276, + "mode": 292, + "sha256": "2348d95008276c5d5764f7e028c3918e484582cd589bd4d9b82919161745e53e" + }, + "scripts/compact_control_layer.py": { + "bytes": 7892, + "mode": 292, + "sha256": "e814c9f8d84f2e5d3aa2e06c36697f27f110218addc40ff8df2801fde861ff9f" + }, + "scripts/complex_circuit.py": { + "bytes": 19732, + "mode": 292, + "sha256": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1" + }, + "scripts/complex_network.py": { + "bytes": 6105, + "mode": 292, + "sha256": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b" + }, + "scripts/exclusion_circuit.py": { + "bytes": 9450, + "mode": 292, + "sha256": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3" + }, + "scripts/paired_exclusion_circuit.py": { + "bytes": 2289, + "mode": 292, + "sha256": "8f05f04cf06217befd6d0ee0f2d7d0c5c5eb32cfab8c9a8ca7917fd6d620b7d2" + }, + "scripts/paired_network.py": { + "bytes": 4933, + "mode": 292, + "sha256": "991223dc3c1374284c361ed017e42bf732dd971fa0bea2be2282cfb18257b3f7" + }, + "scripts/prepare_layers.py": { + "bytes": 8196, + "mode": 292, + "sha256": "a6e2adc612f264b1c0e51d18ce6315de9ae5e2ae2420aa22e99a22d8bf304947" + }, + "scripts/search_network.py": { + "bytes": 4314, + "mode": 292, + "sha256": "3a4faa5037d9b8e7ca5828afac193a96b6966a8b114f14937921795b24ec4f6a" + }, + "scripts/shared_point_circuit.py": { + "bytes": 13167, + "mode": 292, + "sha256": "360d9bffc0f55315fe294789b72c71c79e0991524555b3a5f42a2ca504d7da95" + }, + "scripts/shared_point_network.py": { + "bytes": 3119, + "mode": 292, + "sha256": "a85e7f0d8c42d6a27e3846308571ca324a1824ac5c2d59e4daa5c7673c33c697" + }, + "upstream/LICENSE": { + "bytes": 11357, + "mode": 292, + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + "upstream/README.md": { + "bytes": 541, + "mode": 292, + "sha256": "8d1ceff898a4e0e681679f91c4def485820be9e99f04e4861f2ce601a364723e" + }, + "upstream/build/figures/multiplication-flow.tex": { + "bytes": 847, + "mode": 292, + "sha256": "3654d2728b0c98919d61760e1802804ed616546a747f9167a93e17bb8697f320" + }, + "upstream/build/figures/proof-map.tex": { + "bytes": 524, + "mode": 292, + "sha256": "76d4deacf07bea355412abcfd798c7cbe6dcccef29a4a420a9e2a7b158f23848" + }, + "upstream/build/main.tex": { + "bytes": 1882, + "mode": 292, + "sha256": "42f0f506976bc2084374a71e97edc1549689a7accf35dda4db2a18af4f13c1aa" + }, + "upstream/build/references.bib": { + "bytes": 9790, + "mode": 292, + "sha256": "33cc2df13ccf85330849e8fb34d4ac7613b23f625787457a5b7b9aa6d7369476" + }, + "upstream/build/sections/00-introduction.tex": { + "bytes": 11515, + "mode": 292, + "sha256": "98721f03682ccf1cc7d0850b07adabaa2d8f3afe552e3861753eba9d284d0da0" + }, + "upstream/build/sections/01-history.tex": { + "bytes": 9689, + "mode": 292, + "sha256": "798956c8150c31e3e2f5f29c47110d25ce619faad1374f4d3a0f15fa3ee33ead" + }, + "upstream/build/sections/02-streams.tex": { + "bytes": 11311, + "mode": 292, + "sha256": "606c80db61cad13aa0c3b6060dc4b88dbbe7ac60cdd831aa93f28d908fd09dab" + }, + "upstream/build/sections/03-motifs.tex": { + "bytes": 31874, + "mode": 292, + "sha256": "ed76761194988a01af77ead0ea6469cb5dcd29690ab985a0b5a4006b0f2b69bb" + }, + "upstream/build/sections/04-swap.tex": { + "bytes": 19884, + "mode": 292, + "sha256": "412b170ccaab38dba96e95e3cbfae09f4876a9818f8d278776a746b0f8044906" + }, + "upstream/build/sections/05-layers.tex": { + "bytes": 46811, + "mode": 292, + "sha256": "20cfc8d12099d4e4ed9e3e7eeb6162edd9b6e0e076f24693364cd24377252594" + }, + "upstream/build/sections/06-transforms.tex": { + "bytes": 33854, + "mode": 292, + "sha256": "924316e4bc905066281d8f9e8746a49d8829aeb393688608deb1e61c3c87853c" + }, + "upstream/build/sections/07-resampling.tex": { + "bytes": 22053, + "mode": 292, + "sha256": "8a6b91670f9163afb54892489fa2210c77fe1b058f0325ec7d18b44b94be6e2c" + }, + "upstream/build/sections/08-assembly.tex": { + "bytes": 46444, + "mode": 292, + "sha256": "763d7945b1e1ec4ebae9b799bcefcc45fa9bae6e2ffad799868a9c3d513dbd4a" + }, + "upstream/build/sections/09-exact-arithmetic.tex": { + "bytes": 6950, + "mode": 292, + "sha256": "5714e5d0656c78c6a1fde8d01fd11f1ba856a7ea94149b283bd9a50fdbf516c3" + }, + "upstream/build/sections/10-transposition.tex": { + "bytes": 2398, + "mode": 292, + "sha256": "c14ad8d56112f6578678a58211bc8d63c3a4b60e55078ac73bc38f7348e713cb" + }, + "upstream/build/sections/11-grouped-rectangles.tex": { + "bytes": 7405, + "mode": 292, + "sha256": "6525cd0a01980e56accfeaf06e9d875bc699197ba42c6e22b69435e352275174" + }, + "upstream/formalization.yaml": { + "bytes": 73925, + "mode": 292, + "sha256": "2dcbd0d6e6a22475f53d49bfdfcac9b6d2b470653c332a9f56522f5be166edb9" + }, + "upstream/manifest.json": { + "bytes": 6217, + "mode": 292, + "sha256": "16ab13971694cabab09440c47ebf2fc0496a9d35fc3af33950fda3498f8e2392" + } + }, + "measurement": "Parent outer guard is authoritative. Phases are nested observations, not additive costs. Profile is excluded from performance selection. Every timed arm includes copies, source checks, original CLI and retained full witnesses/transcripts; candidate additionally pays cold build/load/all finite controls.", + "mode": "baseline", + "native_calls": null, + "native_predecessor_pr": 5929, + "phases": { + "checks_initialization": { + "calls": 1, + "cpu_seconds_with_children": 0.00011899999999975819, + "wall_seconds": 0.00011770101264119148 + }, + "cold_certify_import": { + "calls": 1, + "cpu_seconds_with_children": 0.004872000000000043, + "wall_seconds": 0.004872203018749133 + }, + "cold_complex_module_load": { + "calls": 1, + "cpu_seconds_with_children": 0.006765999999999994, + "wall_seconds": 0.006765390979126096 + }, + "cold_engine_import": { + "calls": 1, + "cpu_seconds_with_children": 0.030687999999999993, + "wall_seconds": 0.030686862010043114 + }, + "cold_prepare_import": { + "calls": 1, + "cpu_seconds_with_children": 0.003684999999999994, + "wall_seconds": 0.0036916589888278395 + }, + "compile_roles": { + "calls": 1, + "cpu_seconds_with_children": 0.423743, + "wall_seconds": 0.4238316960108932 + }, + "complete_original_cli": { + "calls": 1, + "cpu_seconds_with_children": 36.82342, + "wall_seconds": 36.84268290398177 + }, + "engine_custody": { + "calls": 1, + "cpu_seconds_with_children": 0.0015740000000000753, + "wall_seconds": 0.0015721209929324687 + }, + "fresh_engine_copy": { + "calls": 1, + "cpu_seconds_with_children": 0.0022179999999999978, + "wall_seconds": 0.002216478023910895 + }, + "fresh_root_copy": { + "calls": 1, + "cpu_seconds_with_children": 0.007475999999999983, + "wall_seconds": 0.02265488400007598 + }, + "full_log_integer_bounds": { + "calls": 1, + "cpu_seconds_with_children": 0.00043399999999849115, + "wall_seconds": 0.00043424699106253684 + }, + "identical_lossless_side_serialization": { + "calls": 1, + "cpu_seconds_with_children": 1.2114559999999983, + "wall_seconds": 1.2146476329944562 + }, + "input_custody": { + "calls": 1, + "cpu_seconds_with_children": 0.008126999999999968, + "wall_seconds": 0.008125677006319165 + }, + "original_serializable": { + "calls": 1, + "cpu_seconds_with_children": 0.0001469999999983429, + "wall_seconds": 0.0001483919913880527 + }, + "original_upstream_verify_sources": { + "calls": 1, + "cpu_seconds_with_children": 0.002313999999998373, + "wall_seconds": 0.002313801000127569 + }, + "side_construction": { + "calls": 1, + "cpu_seconds_with_children": 2.003161, + "wall_seconds": 2.0039629240054637 + }, + "verify_labels": { + "calls": 1, + "cpu_seconds_with_children": 26.857797000000005, + "wall_seconds": 26.87378448600066 + }, + "verify_map": { + "calls": 1, + "cpu_seconds_with_children": 5.665053, + "wall_seconds": 5.666641563992016 + }, + "verify_role_frames": { + "calls": 1, + "cpu_seconds_with_children": 1.845056999999997, + "wall_seconds": 1.8458280370105058 + } + }, + "private_root_permission": "runtime-root is0755; copied input file modes are retained and checked; immutable stages are never chmodded", + "process_and_compiler_cpu_seconds_before_receipt": 38.912362, + "process_wall_seconds_before_receipt": 38.7821343439864, + "science": { + "full_cli_certificate_sha256": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f", + "full_cli_stdout_sha256": "8f77b724810ec05fb19b35d75d8002d31a6e22ed342a36ee28a5caef8d643015", + "full_return_lossless_sha256": "542e4fd73d38b88122d1bf0fffa5f3b092cc4681a14012162daef47e89363cfd", + "ordered_complements": { + "calls": 238685, + "canonical_stream_bytes": 55839507, + "schema": "v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors", + "sha256": "7dec2bf33303c37e1c699609e83768d61df7e19104d34a26a148f66d5ccc4838" + }, + "side": { + "exact_witness_sha256": "4b170c1dbfc33c7cb141a2284c6fd69eac7b6d100971d3e9ee625502b5893f82", + "rank_call_count": 59959, + "rank_distinct_matrix_count": 252, + "rank_trace_sha256": "85006ca332bbc57c2ba9fd06f61a0281d4cee600c9f3b449342379bf2aedec8f", + "result_sha256": "342e99212b12e518902ae9598613f5484113bacee8747c27a13b58a4b1d3986c", + "serialized_bytes": { + "rank_trace": 2674272, + "result": 527, + "witness": 58143622 + } + }, + "upstream_commit": "adc7f1241b42e322a6451854ab7e4b4c146bf78a" + }, + "scientific_imports": { + "audit_short_guards": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B2/runtime-root/scripts/audit_short_guards.py", + "certify": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B2/runtime-root/scripts/certify.py", + "compact_control_layer": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B2/runtime-root/scripts/compact_control_layer.py", + "complex_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B2/engine/source/complex_circuit.py", + "exclusion_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B2/runtime-root/scripts/exclusion_circuit.py", + "paired_exclusion_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B2/runtime-root/scripts/paired_exclusion_circuit.py", + "paired_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B2/runtime-root/scripts/paired_network.py", + "prepare_layers": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B2/runtime-root/scripts/prepare_layers.py", + "search_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B2/runtime-root/scripts/search_network.py", + "shared_point_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B2/runtime-root/scripts/shared_point_circuit.py", + "shared_point_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B2/runtime-root/scripts/shared_point_network.py" + }, + "scope": "Complete frozen historical complex-network CLI with retained observations; conditional certificate only. No bare-CLI factor, selected-frontier, new kappa or PR5864 speed claim.", + "source_pin_sha256": "88bba3caf5975f30fa7abceaea9454110cf3b069233e8241a2ca13d1dff171a7", + "status": "FULL_NETWORK_COMPLETE_PASS" +} diff --git a/research/gf2-full-network/evidence/runs/full-network-B2/stderr.txt b/research/gf2-full-network/evidence/runs/full-network-B2/stderr.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/research/gf2-full-network/evidence/runs/full-network-B2/stdout.txt b/research/gf2-full-network/evidence/runs/full-network-B2/stdout.txt new file mode 100644 index 0000000000..2260e8f633 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-B2/stdout.txt @@ -0,0 +1,3 @@ +PASS conditional 59/100000000000 > 2^-31; minimum margin 14779261/25000000000000000 +Side roles per invocation 108195 vs original 3693800 +{"cpu_seconds_with_compiler": 38.912362, "mode": "baseline", "phases": {"checks_initialization": {"calls": 1, "cpu_seconds_with_children": 0.00011899999999975819, "wall_seconds": 0.00011770101264119148}, "cold_certify_import": {"calls": 1, "cpu_seconds_with_children": 0.004872000000000043, "wall_seconds": 0.004872203018749133}, "cold_complex_module_load": {"calls": 1, "cpu_seconds_with_children": 0.006765999999999994, "wall_seconds": 0.006765390979126096}, "cold_engine_import": {"calls": 1, "cpu_seconds_with_children": 0.030687999999999993, "wall_seconds": 0.030686862010043114}, "cold_prepare_import": {"calls": 1, "cpu_seconds_with_children": 0.003684999999999994, "wall_seconds": 0.0036916589888278395}, "compile_roles": {"calls": 1, "cpu_seconds_with_children": 0.423743, "wall_seconds": 0.4238316960108932}, "complete_original_cli": {"calls": 1, "cpu_seconds_with_children": 36.82342, "wall_seconds": 36.84268290398177}, "engine_custody": {"calls": 1, "cpu_seconds_with_children": 0.0015740000000000753, "wall_seconds": 0.0015721209929324687}, "fresh_engine_copy": {"calls": 1, "cpu_seconds_with_children": 0.0022179999999999978, "wall_seconds": 0.002216478023910895}, "fresh_root_copy": {"calls": 1, "cpu_seconds_with_children": 0.007475999999999983, "wall_seconds": 0.02265488400007598}, "full_log_integer_bounds": {"calls": 1, "cpu_seconds_with_children": 0.00043399999999849115, "wall_seconds": 0.00043424699106253684}, "identical_lossless_side_serialization": {"calls": 1, "cpu_seconds_with_children": 1.2114559999999983, "wall_seconds": 1.2146476329944562}, "input_custody": {"calls": 1, "cpu_seconds_with_children": 0.008126999999999968, "wall_seconds": 0.008125677006319165}, "original_serializable": {"calls": 1, "cpu_seconds_with_children": 0.0001469999999983429, "wall_seconds": 0.0001483919913880527}, "original_upstream_verify_sources": {"calls": 1, "cpu_seconds_with_children": 0.002313999999998373, "wall_seconds": 0.002313801000127569}, "side_construction": {"calls": 1, "cpu_seconds_with_children": 2.003161, "wall_seconds": 2.0039629240054637}, "verify_labels": {"calls": 1, "cpu_seconds_with_children": 26.857797000000005, "wall_seconds": 26.87378448600066}, "verify_map": {"calls": 1, "cpu_seconds_with_children": 5.665053, "wall_seconds": 5.666641563992016}, "verify_role_frames": {"calls": 1, "cpu_seconds_with_children": 1.845056999999997, "wall_seconds": 1.8458280370105058}}, "science": {"full_cli_certificate_sha256": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f", "full_cli_stdout_sha256": "8f77b724810ec05fb19b35d75d8002d31a6e22ed342a36ee28a5caef8d643015", "full_return_lossless_sha256": "542e4fd73d38b88122d1bf0fffa5f3b092cc4681a14012162daef47e89363cfd", "ordered_complements": {"calls": 238685, "canonical_stream_bytes": 55839507, "schema": "v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors", "sha256": "7dec2bf33303c37e1c699609e83768d61df7e19104d34a26a148f66d5ccc4838"}, "side": {"exact_witness_sha256": "4b170c1dbfc33c7cb141a2284c6fd69eac7b6d100971d3e9ee625502b5893f82", "rank_call_count": 59959, "rank_distinct_matrix_count": 252, "rank_trace_sha256": "85006ca332bbc57c2ba9fd06f61a0281d4cee600c9f3b449342379bf2aedec8f", "result_sha256": "342e99212b12e518902ae9598613f5484113bacee8747c27a13b58a4b1d3986c", "serialized_bytes": {"rank_trace": 2674272, "result": 527, "witness": 58143622}}, "upstream_commit": "adc7f1241b42e322a6451854ab7e4b4c146bf78a"}, "status": "FULL_NETWORK_COMPLETE_PASS", "wall_seconds": 38.7821343439864} diff --git a/research/gf2-full-network/evidence/runs/full-network-B2/usage.json b/research/gf2-full-network/evidence/runs/full-network-B2/usage.json new file mode 100644 index 0000000000..8cce3323f3 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-B2/usage.json @@ -0,0 +1 @@ +{"user_seconds":38.97,"system_seconds":0.31,"kernel_max_rss_kib":453332,"exit":0} diff --git a/research/gf2-full-network/evidence/runs/full-network-B3/receipt.json b/research/gf2-full-network/evidence/runs/full-network-B3/receipt.json new file mode 100644 index 0000000000..1b4009653e --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-B3/receipt.json @@ -0,0 +1,26 @@ +{ + "exit": 0, + "label": "full-network-B3", + "optimized": false, + "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]", + "runner_sha256": "7540f8cc4ae4d12ed86c844ef0837a74184d3ada653979608c295c09f200a751", + "runtime_policy_sha256": "8d87423d90a0a85e0115c85b74f500847e409c30b7e98850d47b6e36f560c772", + "sampled_process_group_rss_bytes": 407625728, + "script": "stages/qualification-v1/full_B3.py", + "source_bytes_and_modes_unchanged": true, + "source_inventory_sha256": "cd8215aef55d75ba5c7bf9377a9572eb3509b0cd1c699db221435c7b519e25a9", + "status": "PASS", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_bytes": 3686, + "stdout_sha256": "61a94286b63bbfb14e6dca09aed4b5c0d1ecb3deb146ce3bf15b6a7ff44a74fe", + "termination": null, + "usage": { + "exit": 0, + "kernel_max_rss_kib": 453276, + "system_seconds": 0.29, + "user_seconds": 39.29 + }, + "wall_seconds": 39.68618175998563 +} diff --git a/research/gf2-full-network/evidence/runs/full-network-B3/scientific-receipt.json b/research/gf2-full-network/evidence/runs/full-network-B3/scientific-receipt.json new file mode 100644 index 0000000000..deff002b38 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-B3/scientific-receipt.json @@ -0,0 +1,355 @@ +{ + "base_commit": "19fdb086ea96af9a9f87936a2b888e10af4ed810", + "build": null, + "compiler_tmpdir": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B3/compiler-tmp", + "driver_sha256": "0d976d2eb6b845f20d4a3396591a806f966688b88693cd6a5f8a0c9e48925e36", + "engine_custody": { + "compare_side_verifier.py": { + "bytes": 10571, + "mode": 292, + "sha256": "6e507bb0c7e00d090a60289fddb6c55e90c946d0850c42c3c5e3e15c27604a68" + }, + "finite_controls.py": { + "bytes": 23815, + "mode": 292, + "sha256": "df989a831aac43cc1af95169dad8c64a7548760e6e1f96976da996703f2c8f7a" + }, + "native_backend.py": { + "bytes": 20334, + "mode": 292, + "sha256": "e473c38245c3668715b5a78dfe980b2fe3ed0d0c9b8c97c666fbae6ecf1fffd5" + }, + "native_gf2.c": { + "bytes": 7425, + "mode": 292, + "sha256": "e9c3c9194a08718bd1575c1cf08c6c6772d3b644c2e274c25a84a1f9249d06cc" + }, + "profile_side_verifier.py": { + "bytes": 8959, + "mode": 292, + "sha256": "9c994378171c20a91539418d93cb8387e1daa93465d6862beefea90e12999c2a" + }, + "source/complex_circuit.py": { + "bytes": 19732, + "mode": 292, + "sha256": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1" + }, + "source/complex_network.py": { + "bytes": 6105, + "mode": 292, + "sha256": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b" + } + }, + "environment": { + "executable": "/usr/bin/python3.12", + "platform": "linux", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]" + }, + "finite_controls": null, + "frozen_custody": { + "scripts/audit_short_guards.py": { + "bytes": 7956, + "mode": 292, + "sha256": "c2c929c956e617bee739963b517b9069e0d067cfebc6820f401a4e90a1769eb1" + }, + "scripts/certify.py": { + "bytes": 11276, + "mode": 292, + "sha256": "2348d95008276c5d5764f7e028c3918e484582cd589bd4d9b82919161745e53e" + }, + "scripts/compact_control_layer.py": { + "bytes": 7892, + "mode": 292, + "sha256": "e814c9f8d84f2e5d3aa2e06c36697f27f110218addc40ff8df2801fde861ff9f" + }, + "scripts/complex_circuit.py": { + "bytes": 19732, + "mode": 292, + "sha256": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1" + }, + "scripts/complex_network.py": { + "bytes": 6105, + "mode": 292, + "sha256": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b" + }, + "scripts/exclusion_circuit.py": { + "bytes": 9450, + "mode": 292, + "sha256": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3" + }, + "scripts/paired_exclusion_circuit.py": { + "bytes": 2289, + "mode": 292, + "sha256": "8f05f04cf06217befd6d0ee0f2d7d0c5c5eb32cfab8c9a8ca7917fd6d620b7d2" + }, + "scripts/paired_network.py": { + "bytes": 4933, + "mode": 292, + "sha256": "991223dc3c1374284c361ed017e42bf732dd971fa0bea2be2282cfb18257b3f7" + }, + "scripts/prepare_layers.py": { + "bytes": 8196, + "mode": 292, + "sha256": "a6e2adc612f264b1c0e51d18ce6315de9ae5e2ae2420aa22e99a22d8bf304947" + }, + "scripts/search_network.py": { + "bytes": 4314, + "mode": 292, + "sha256": "3a4faa5037d9b8e7ca5828afac193a96b6966a8b114f14937921795b24ec4f6a" + }, + "scripts/shared_point_circuit.py": { + "bytes": 13167, + "mode": 292, + "sha256": "360d9bffc0f55315fe294789b72c71c79e0991524555b3a5f42a2ca504d7da95" + }, + "scripts/shared_point_network.py": { + "bytes": 3119, + "mode": 292, + "sha256": "a85e7f0d8c42d6a27e3846308571ca324a1824ac5c2d59e4daa5c7673c33c697" + }, + "upstream/LICENSE": { + "bytes": 11357, + "mode": 292, + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + "upstream/README.md": { + "bytes": 541, + "mode": 292, + "sha256": "8d1ceff898a4e0e681679f91c4def485820be9e99f04e4861f2ce601a364723e" + }, + "upstream/build/figures/multiplication-flow.tex": { + "bytes": 847, + "mode": 292, + "sha256": "3654d2728b0c98919d61760e1802804ed616546a747f9167a93e17bb8697f320" + }, + "upstream/build/figures/proof-map.tex": { + "bytes": 524, + "mode": 292, + "sha256": "76d4deacf07bea355412abcfd798c7cbe6dcccef29a4a420a9e2a7b158f23848" + }, + "upstream/build/main.tex": { + "bytes": 1882, + "mode": 292, + "sha256": "42f0f506976bc2084374a71e97edc1549689a7accf35dda4db2a18af4f13c1aa" + }, + "upstream/build/references.bib": { + "bytes": 9790, + "mode": 292, + "sha256": "33cc2df13ccf85330849e8fb34d4ac7613b23f625787457a5b7b9aa6d7369476" + }, + "upstream/build/sections/00-introduction.tex": { + "bytes": 11515, + "mode": 292, + "sha256": "98721f03682ccf1cc7d0850b07adabaa2d8f3afe552e3861753eba9d284d0da0" + }, + "upstream/build/sections/01-history.tex": { + "bytes": 9689, + "mode": 292, + "sha256": "798956c8150c31e3e2f5f29c47110d25ce619faad1374f4d3a0f15fa3ee33ead" + }, + "upstream/build/sections/02-streams.tex": { + "bytes": 11311, + "mode": 292, + "sha256": "606c80db61cad13aa0c3b6060dc4b88dbbe7ac60cdd831aa93f28d908fd09dab" + }, + "upstream/build/sections/03-motifs.tex": { + "bytes": 31874, + "mode": 292, + "sha256": "ed76761194988a01af77ead0ea6469cb5dcd29690ab985a0b5a4006b0f2b69bb" + }, + "upstream/build/sections/04-swap.tex": { + "bytes": 19884, + "mode": 292, + "sha256": "412b170ccaab38dba96e95e3cbfae09f4876a9818f8d278776a746b0f8044906" + }, + "upstream/build/sections/05-layers.tex": { + "bytes": 46811, + "mode": 292, + "sha256": "20cfc8d12099d4e4ed9e3e7eeb6162edd9b6e0e076f24693364cd24377252594" + }, + "upstream/build/sections/06-transforms.tex": { + "bytes": 33854, + "mode": 292, + "sha256": "924316e4bc905066281d8f9e8746a49d8829aeb393688608deb1e61c3c87853c" + }, + "upstream/build/sections/07-resampling.tex": { + "bytes": 22053, + "mode": 292, + "sha256": "8a6b91670f9163afb54892489fa2210c77fe1b058f0325ec7d18b44b94be6e2c" + }, + "upstream/build/sections/08-assembly.tex": { + "bytes": 46444, + "mode": 292, + "sha256": "763d7945b1e1ec4ebae9b799bcefcc45fa9bae6e2ffad799868a9c3d513dbd4a" + }, + "upstream/build/sections/09-exact-arithmetic.tex": { + "bytes": 6950, + "mode": 292, + "sha256": "5714e5d0656c78c6a1fde8d01fd11f1ba856a7ea94149b283bd9a50fdbf516c3" + }, + "upstream/build/sections/10-transposition.tex": { + "bytes": 2398, + "mode": 292, + "sha256": "c14ad8d56112f6578678a58211bc8d63c3a4b60e55078ac73bc38f7348e713cb" + }, + "upstream/build/sections/11-grouped-rectangles.tex": { + "bytes": 7405, + "mode": 292, + "sha256": "6525cd0a01980e56accfeaf06e9d875bc699197ba42c6e22b69435e352275174" + }, + "upstream/formalization.yaml": { + "bytes": 73925, + "mode": 292, + "sha256": "2dcbd0d6e6a22475f53d49bfdfcac9b6d2b470653c332a9f56522f5be166edb9" + }, + "upstream/manifest.json": { + "bytes": 6217, + "mode": 292, + "sha256": "16ab13971694cabab09440c47ebf2fc0496a9d35fc3af33950fda3498f8e2392" + } + }, + "measurement": "Parent outer guard is authoritative. Phases are nested observations, not additive costs. Profile is excluded from performance selection. Every timed arm includes copies, source checks, original CLI and retained full witnesses/transcripts; candidate additionally pays cold build/load/all finite controls.", + "mode": "baseline", + "native_calls": null, + "native_predecessor_pr": 5929, + "phases": { + "checks_initialization": { + "calls": 1, + "cpu_seconds_with_children": 7.799999999980045e-05, + "wall_seconds": 7.766199996694922e-05 + }, + "cold_certify_import": { + "calls": 1, + "cpu_seconds_with_children": 0.0050080000000000124, + "wall_seconds": 0.005007674015359953 + }, + "cold_complex_module_load": { + "calls": 1, + "cpu_seconds_with_children": 0.007201000000000013, + "wall_seconds": 0.007199090003268793 + }, + "cold_engine_import": { + "calls": 1, + "cpu_seconds_with_children": 0.03180000000000005, + "wall_seconds": 0.03179865100537427 + }, + "cold_prepare_import": { + "calls": 1, + "cpu_seconds_with_children": 0.0034190000000000054, + "wall_seconds": 0.0034164249955210835 + }, + "compile_roles": { + "calls": 1, + "cpu_seconds_with_children": 0.4601970000000004, + "wall_seconds": 0.4602043409831822 + }, + "complete_original_cli": { + "calls": 1, + "cpu_seconds_with_children": 36.946802999999996, + "wall_seconds": 36.9577529229864 + }, + "engine_custody": { + "calls": 1, + "cpu_seconds_with_children": 0.0015680000000000138, + "wall_seconds": 0.0015666490071453154 + }, + "fresh_engine_copy": { + "calls": 1, + "cpu_seconds_with_children": 0.001377000000000017, + "wall_seconds": 0.0013764659815933555 + }, + "fresh_root_copy": { + "calls": 1, + "cpu_seconds_with_children": 0.0069049999999999945, + "wall_seconds": 0.02324625800247304 + }, + "full_log_integer_bounds": { + "calls": 1, + "cpu_seconds_with_children": 0.0004049999999935494, + "wall_seconds": 0.00040486399666406214 + }, + "identical_lossless_side_serialization": { + "calls": 1, + "cpu_seconds_with_children": 1.3208640000000003, + "wall_seconds": 1.3208754350198433 + }, + "input_custody": { + "calls": 1, + "cpu_seconds_with_children": 0.007475000000000009, + "wall_seconds": 0.007473533012671396 + }, + "original_serializable": { + "calls": 1, + "cpu_seconds_with_children": 0.0001409999999992806, + "wall_seconds": 0.00014300498878583312 + }, + "original_upstream_verify_sources": { + "calls": 1, + "cpu_seconds_with_children": 0.0021630000000030236, + "wall_seconds": 0.0021598360035568476 + }, + "side_construction": { + "calls": 1, + "cpu_seconds_with_children": 1.91855, + "wall_seconds": 1.918588976986939 + }, + "verify_labels": { + "calls": 1, + "cpu_seconds_with_children": 27.036111000000005, + "wall_seconds": 27.04202196697588 + }, + "verify_map": { + "calls": 1, + "cpu_seconds_with_children": 5.651154, + "wall_seconds": 5.655990925995866 + }, + "verify_role_frames": { + "calls": 1, + "cpu_seconds_with_children": 1.850075000000004, + "wall_seconds": 1.8502157629991416 + } + }, + "private_root_permission": "runtime-root is0755; copied input file modes are retained and checked; immutable stages are never chmodded", + "process_and_compiler_cpu_seconds_before_receipt": 39.166801, + "process_wall_seconds_before_receipt": 39.02328489799402, + "science": { + "full_cli_certificate_sha256": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f", + "full_cli_stdout_sha256": "8f77b724810ec05fb19b35d75d8002d31a6e22ed342a36ee28a5caef8d643015", + "full_return_lossless_sha256": "542e4fd73d38b88122d1bf0fffa5f3b092cc4681a14012162daef47e89363cfd", + "ordered_complements": { + "calls": 238685, + "canonical_stream_bytes": 55839507, + "schema": "v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors", + "sha256": "7dec2bf33303c37e1c699609e83768d61df7e19104d34a26a148f66d5ccc4838" + }, + "side": { + "exact_witness_sha256": "4b170c1dbfc33c7cb141a2284c6fd69eac7b6d100971d3e9ee625502b5893f82", + "rank_call_count": 59959, + "rank_distinct_matrix_count": 252, + "rank_trace_sha256": "85006ca332bbc57c2ba9fd06f61a0281d4cee600c9f3b449342379bf2aedec8f", + "result_sha256": "342e99212b12e518902ae9598613f5484113bacee8747c27a13b58a4b1d3986c", + "serialized_bytes": { + "rank_trace": 2674272, + "result": 527, + "witness": 58143622 + } + }, + "upstream_commit": "adc7f1241b42e322a6451854ab7e4b4c146bf78a" + }, + "scientific_imports": { + "audit_short_guards": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B3/runtime-root/scripts/audit_short_guards.py", + "certify": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B3/runtime-root/scripts/certify.py", + "compact_control_layer": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B3/runtime-root/scripts/compact_control_layer.py", + "complex_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B3/engine/source/complex_circuit.py", + "exclusion_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B3/runtime-root/scripts/exclusion_circuit.py", + "paired_exclusion_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B3/runtime-root/scripts/paired_exclusion_circuit.py", + "paired_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B3/runtime-root/scripts/paired_network.py", + "prepare_layers": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B3/runtime-root/scripts/prepare_layers.py", + "search_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B3/runtime-root/scripts/search_network.py", + "shared_point_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B3/runtime-root/scripts/shared_point_circuit.py", + "shared_point_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-B3/runtime-root/scripts/shared_point_network.py" + }, + "scope": "Complete frozen historical complex-network CLI with retained observations; conditional certificate only. No bare-CLI factor, selected-frontier, new kappa or PR5864 speed claim.", + "source_pin_sha256": "88bba3caf5975f30fa7abceaea9454110cf3b069233e8241a2ca13d1dff171a7", + "status": "FULL_NETWORK_COMPLETE_PASS" +} diff --git a/research/gf2-full-network/evidence/runs/full-network-B3/stderr.txt b/research/gf2-full-network/evidence/runs/full-network-B3/stderr.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/research/gf2-full-network/evidence/runs/full-network-B3/stdout.txt b/research/gf2-full-network/evidence/runs/full-network-B3/stdout.txt new file mode 100644 index 0000000000..4134ecd379 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-B3/stdout.txt @@ -0,0 +1,3 @@ +PASS conditional 59/100000000000 > 2^-31; minimum margin 14779261/25000000000000000 +Side roles per invocation 108195 vs original 3693800 +{"cpu_seconds_with_compiler": 39.166801, "mode": "baseline", "phases": {"checks_initialization": {"calls": 1, "cpu_seconds_with_children": 7.799999999980045e-05, "wall_seconds": 7.766199996694922e-05}, "cold_certify_import": {"calls": 1, "cpu_seconds_with_children": 0.0050080000000000124, "wall_seconds": 0.005007674015359953}, "cold_complex_module_load": {"calls": 1, "cpu_seconds_with_children": 0.007201000000000013, "wall_seconds": 0.007199090003268793}, "cold_engine_import": {"calls": 1, "cpu_seconds_with_children": 0.03180000000000005, "wall_seconds": 0.03179865100537427}, "cold_prepare_import": {"calls": 1, "cpu_seconds_with_children": 0.0034190000000000054, "wall_seconds": 0.0034164249955210835}, "compile_roles": {"calls": 1, "cpu_seconds_with_children": 0.4601970000000004, "wall_seconds": 0.4602043409831822}, "complete_original_cli": {"calls": 1, "cpu_seconds_with_children": 36.946802999999996, "wall_seconds": 36.9577529229864}, "engine_custody": {"calls": 1, "cpu_seconds_with_children": 0.0015680000000000138, "wall_seconds": 0.0015666490071453154}, "fresh_engine_copy": {"calls": 1, "cpu_seconds_with_children": 0.001377000000000017, "wall_seconds": 0.0013764659815933555}, "fresh_root_copy": {"calls": 1, "cpu_seconds_with_children": 0.0069049999999999945, "wall_seconds": 0.02324625800247304}, "full_log_integer_bounds": {"calls": 1, "cpu_seconds_with_children": 0.0004049999999935494, "wall_seconds": 0.00040486399666406214}, "identical_lossless_side_serialization": {"calls": 1, "cpu_seconds_with_children": 1.3208640000000003, "wall_seconds": 1.3208754350198433}, "input_custody": {"calls": 1, "cpu_seconds_with_children": 0.007475000000000009, "wall_seconds": 0.007473533012671396}, "original_serializable": {"calls": 1, "cpu_seconds_with_children": 0.0001409999999992806, "wall_seconds": 0.00014300498878583312}, "original_upstream_verify_sources": {"calls": 1, "cpu_seconds_with_children": 0.0021630000000030236, "wall_seconds": 0.0021598360035568476}, "side_construction": {"calls": 1, "cpu_seconds_with_children": 1.91855, "wall_seconds": 1.918588976986939}, "verify_labels": {"calls": 1, "cpu_seconds_with_children": 27.036111000000005, "wall_seconds": 27.04202196697588}, "verify_map": {"calls": 1, "cpu_seconds_with_children": 5.651154, "wall_seconds": 5.655990925995866}, "verify_role_frames": {"calls": 1, "cpu_seconds_with_children": 1.850075000000004, "wall_seconds": 1.8502157629991416}}, "science": {"full_cli_certificate_sha256": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f", "full_cli_stdout_sha256": "8f77b724810ec05fb19b35d75d8002d31a6e22ed342a36ee28a5caef8d643015", "full_return_lossless_sha256": "542e4fd73d38b88122d1bf0fffa5f3b092cc4681a14012162daef47e89363cfd", "ordered_complements": {"calls": 238685, "canonical_stream_bytes": 55839507, "schema": "v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors", "sha256": "7dec2bf33303c37e1c699609e83768d61df7e19104d34a26a148f66d5ccc4838"}, "side": {"exact_witness_sha256": "4b170c1dbfc33c7cb141a2284c6fd69eac7b6d100971d3e9ee625502b5893f82", "rank_call_count": 59959, "rank_distinct_matrix_count": 252, "rank_trace_sha256": "85006ca332bbc57c2ba9fd06f61a0281d4cee600c9f3b449342379bf2aedec8f", "result_sha256": "342e99212b12e518902ae9598613f5484113bacee8747c27a13b58a4b1d3986c", "serialized_bytes": {"rank_trace": 2674272, "result": 527, "witness": 58143622}}, "upstream_commit": "adc7f1241b42e322a6451854ab7e4b4c146bf78a"}, "status": "FULL_NETWORK_COMPLETE_PASS", "wall_seconds": 39.02328489799402} diff --git a/research/gf2-full-network/evidence/runs/full-network-B3/usage.json b/research/gf2-full-network/evidence/runs/full-network-B3/usage.json new file mode 100644 index 0000000000..f5db1c701f --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-B3/usage.json @@ -0,0 +1 @@ +{"user_seconds":39.29,"system_seconds":0.29,"kernel_max_rss_kib":453276,"exit":0} diff --git a/research/gf2-full-network/evidence/runs/full-network-C1/receipt.json b/research/gf2-full-network/evidence/runs/full-network-C1/receipt.json new file mode 100644 index 0000000000..e3fe3cc697 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-C1/receipt.json @@ -0,0 +1,26 @@ +{ + "exit": 0, + "label": "full-network-C1", + "optimized": false, + "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]", + "runner_sha256": "7540f8cc4ae4d12ed86c844ef0837a74184d3ada653979608c295c09f200a751", + "runtime_policy_sha256": "8d87423d90a0a85e0115c85b74f500847e409c30b7e98850d47b6e36f560c772", + "sampled_process_group_rss_bytes": 408207360, + "script": "stages/qualification-v1/full_C1.py", + "source_bytes_and_modes_unchanged": true, + "source_inventory_sha256": "cd8215aef55d75ba5c7bf9377a9572eb3509b0cd1c699db221435c7b519e25a9", + "status": "PASS", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_bytes": 3947, + "stdout_sha256": "6707c1cb48a8836730dac7da627201e50ce69ae0e6d77be9dddc6e531a3c22dd", + "termination": null, + "usage": { + "exit": 0, + "kernel_max_rss_kib": 453852, + "system_seconds": 0.35, + "user_seconds": 28.11 + }, + "wall_seconds": 28.63625624598353 +} diff --git a/research/gf2-full-network/evidence/runs/full-network-C1/scientific-finite-controls.json b/research/gf2-full-network/evidence/runs/full-network-C1/scientific-finite-controls.json new file mode 100644 index 0000000000..27cc01afcf --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-C1/scientific-finite-controls.json @@ -0,0 +1 @@ +{"counts":{"binding_rejections":3,"boundary_cases":17,"fallback_cases":38,"gram_cases":621,"oracle_negative_controls":2,"ordered_complements":5344,"real_label_permutations":24},"fixture_sha256":"fbf7cb44bb99c96ee7d393eb91f2ebfbfb94375917c78a902d547320afd75d84","independent_oracle":"Dense binary lists, descending pivots, addition modulo 2; no packed/source/native helpers","micro":{"native_with_conversion":{"cpu_seconds":0.02329199599999998,"wall_seconds":0.02328904700698331},"unchanged_python":{"cpu_seconds":0.16048985399999993,"wall_seconds":0.1604897780052852}},"micro_fixtures":4,"micro_repetitions":128,"micro_scope":"Fixed h25 label families with conversion; diagnostic only, not complete side speed","native_and_fallback_calls":{"complement_fallback":30,"complement_native":5875,"gram_fallback":20,"gram_native":1638},"status":"FINITE_NATIVE_GF2_CONTROLS_PASS","v2_controls":{"complement_fixture_stream":{"calls":7,"canonical_stream_bytes":597,"schema":"v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors","sha256":"ed44b2291db9f1bafc9bdb02e6d3b53e1926b01e549ef8bdccc1991922a6345d"},"counts":{"class_dispatch_rejections":2,"effective_builtins_rejections":2,"native_proxy_rejections":1,"postbind_drift_rejections":25,"prebind_shadow_rejections":10,"real_builtin_drift_rejections":2,"trace_negative_controls":4,"trace_pairs":7},"modified_helper_invocations":0,"runtime_policy":"Reject before native/fallback on source helper, effective builtins, class, function, closure or native dispatch drift","status":"V2_RUNTIME_AND_COMPLEMENT_STREAM_PASS"}} diff --git a/research/gf2-full-network/evidence/runs/full-network-C1/scientific-receipt.json b/research/gf2-full-network/evidence/runs/full-network-C1/scientific-receipt.json new file mode 100644 index 0000000000..202f2919e4 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-C1/scientific-receipt.json @@ -0,0 +1,445 @@ +{ + "base_commit": "19fdb086ea96af9a9f87936a2b888e10af4ed810", + "build": { + "c_source_sha256": "e9c3c9194a08718bd1575c1cf08c6c6772d3b644c2e274c25a84a1f9249d06cc", + "command": [ + "x86_64-linux-gnu-gcc", + "-shared", + "-fPIC", + "-O3", + "-std=c11", + "-Wall", + "-Wextra", + "-Werror", + "-I/usr/include/python3.12", + "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C1/engine/native_gf2.c", + "-o", + "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C1/cold-build/_packed_gf2.cpython-312-x86_64-linux-gnu.so" + ], + "extension_sha256": "d990705af645971612df802a427642bdb4cd79de0bb028a2f8ed3667bcf44c04", + "no_cached_binary": true, + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]", + "returncode": 0, + "stderr": "", + "stdout": "" + }, + "compiler_tmpdir": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C1/compiler-tmp", + "driver_sha256": "0d976d2eb6b845f20d4a3396591a806f966688b88693cd6a5f8a0c9e48925e36", + "engine_custody": { + "compare_side_verifier.py": { + "bytes": 10571, + "mode": 292, + "sha256": "6e507bb0c7e00d090a60289fddb6c55e90c946d0850c42c3c5e3e15c27604a68" + }, + "finite_controls.py": { + "bytes": 23815, + "mode": 292, + "sha256": "df989a831aac43cc1af95169dad8c64a7548760e6e1f96976da996703f2c8f7a" + }, + "native_backend.py": { + "bytes": 20334, + "mode": 292, + "sha256": "e473c38245c3668715b5a78dfe980b2fe3ed0d0c9b8c97c666fbae6ecf1fffd5" + }, + "native_gf2.c": { + "bytes": 7425, + "mode": 292, + "sha256": "e9c3c9194a08718bd1575c1cf08c6c6772d3b644c2e274c25a84a1f9249d06cc" + }, + "profile_side_verifier.py": { + "bytes": 8959, + "mode": 292, + "sha256": "9c994378171c20a91539418d93cb8387e1daa93465d6862beefea90e12999c2a" + }, + "source/complex_circuit.py": { + "bytes": 19732, + "mode": 292, + "sha256": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1" + }, + "source/complex_network.py": { + "bytes": 6105, + "mode": 292, + "sha256": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b" + } + }, + "environment": { + "executable": "/usr/bin/python3.12", + "platform": "linux", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]" + }, + "finite_controls": { + "counts": { + "binding_rejections": 3, + "boundary_cases": 17, + "fallback_cases": 38, + "gram_cases": 621, + "oracle_negative_controls": 2, + "ordered_complements": 5344, + "real_label_permutations": 24 + }, + "fixture_sha256": "fbf7cb44bb99c96ee7d393eb91f2ebfbfb94375917c78a902d547320afd75d84", + "independent_oracle": "Dense binary lists, descending pivots, addition modulo 2; no packed/source/native helpers", + "micro": { + "native_with_conversion": { + "cpu_seconds": 0.02329199599999998, + "wall_seconds": 0.02328904700698331 + }, + "unchanged_python": { + "cpu_seconds": 0.16048985399999993, + "wall_seconds": 0.1604897780052852 + } + }, + "micro_fixtures": 4, + "micro_repetitions": 128, + "micro_scope": "Fixed h25 label families with conversion; diagnostic only, not complete side speed", + "native_and_fallback_calls": { + "complement_fallback": 30, + "complement_native": 5875, + "gram_fallback": 20, + "gram_native": 1638 + }, + "status": "FINITE_NATIVE_GF2_CONTROLS_PASS", + "v2_controls": { + "complement_fixture_stream": { + "calls": 7, + "canonical_stream_bytes": 597, + "schema": "v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors", + "sha256": "ed44b2291db9f1bafc9bdb02e6d3b53e1926b01e549ef8bdccc1991922a6345d" + }, + "counts": { + "class_dispatch_rejections": 2, + "effective_builtins_rejections": 2, + "native_proxy_rejections": 1, + "postbind_drift_rejections": 25, + "prebind_shadow_rejections": 10, + "real_builtin_drift_rejections": 2, + "trace_negative_controls": 4, + "trace_pairs": 7 + }, + "modified_helper_invocations": 0, + "runtime_policy": "Reject before native/fallback on source helper, effective builtins, class, function, closure or native dispatch drift", + "status": "V2_RUNTIME_AND_COMPLEMENT_STREAM_PASS" + } + }, + "frozen_custody": { + "scripts/audit_short_guards.py": { + "bytes": 7956, + "mode": 292, + "sha256": "c2c929c956e617bee739963b517b9069e0d067cfebc6820f401a4e90a1769eb1" + }, + "scripts/certify.py": { + "bytes": 11276, + "mode": 292, + "sha256": "2348d95008276c5d5764f7e028c3918e484582cd589bd4d9b82919161745e53e" + }, + "scripts/compact_control_layer.py": { + "bytes": 7892, + "mode": 292, + "sha256": "e814c9f8d84f2e5d3aa2e06c36697f27f110218addc40ff8df2801fde861ff9f" + }, + "scripts/complex_circuit.py": { + "bytes": 19732, + "mode": 292, + "sha256": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1" + }, + "scripts/complex_network.py": { + "bytes": 6105, + "mode": 292, + "sha256": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b" + }, + "scripts/exclusion_circuit.py": { + "bytes": 9450, + "mode": 292, + "sha256": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3" + }, + "scripts/paired_exclusion_circuit.py": { + "bytes": 2289, + "mode": 292, + "sha256": "8f05f04cf06217befd6d0ee0f2d7d0c5c5eb32cfab8c9a8ca7917fd6d620b7d2" + }, + "scripts/paired_network.py": { + "bytes": 4933, + "mode": 292, + "sha256": "991223dc3c1374284c361ed017e42bf732dd971fa0bea2be2282cfb18257b3f7" + }, + "scripts/prepare_layers.py": { + "bytes": 8196, + "mode": 292, + "sha256": "a6e2adc612f264b1c0e51d18ce6315de9ae5e2ae2420aa22e99a22d8bf304947" + }, + "scripts/search_network.py": { + "bytes": 4314, + "mode": 292, + "sha256": "3a4faa5037d9b8e7ca5828afac193a96b6966a8b114f14937921795b24ec4f6a" + }, + "scripts/shared_point_circuit.py": { + "bytes": 13167, + "mode": 292, + "sha256": "360d9bffc0f55315fe294789b72c71c79e0991524555b3a5f42a2ca504d7da95" + }, + "scripts/shared_point_network.py": { + "bytes": 3119, + "mode": 292, + "sha256": "a85e7f0d8c42d6a27e3846308571ca324a1824ac5c2d59e4daa5c7673c33c697" + }, + "upstream/LICENSE": { + "bytes": 11357, + "mode": 292, + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + "upstream/README.md": { + "bytes": 541, + "mode": 292, + "sha256": "8d1ceff898a4e0e681679f91c4def485820be9e99f04e4861f2ce601a364723e" + }, + "upstream/build/figures/multiplication-flow.tex": { + "bytes": 847, + "mode": 292, + "sha256": "3654d2728b0c98919d61760e1802804ed616546a747f9167a93e17bb8697f320" + }, + "upstream/build/figures/proof-map.tex": { + "bytes": 524, + "mode": 292, + "sha256": "76d4deacf07bea355412abcfd798c7cbe6dcccef29a4a420a9e2a7b158f23848" + }, + "upstream/build/main.tex": { + "bytes": 1882, + "mode": 292, + "sha256": "42f0f506976bc2084374a71e97edc1549689a7accf35dda4db2a18af4f13c1aa" + }, + "upstream/build/references.bib": { + "bytes": 9790, + "mode": 292, + "sha256": "33cc2df13ccf85330849e8fb34d4ac7613b23f625787457a5b7b9aa6d7369476" + }, + "upstream/build/sections/00-introduction.tex": { + "bytes": 11515, + "mode": 292, + "sha256": "98721f03682ccf1cc7d0850b07adabaa2d8f3afe552e3861753eba9d284d0da0" + }, + "upstream/build/sections/01-history.tex": { + "bytes": 9689, + "mode": 292, + "sha256": "798956c8150c31e3e2f5f29c47110d25ce619faad1374f4d3a0f15fa3ee33ead" + }, + "upstream/build/sections/02-streams.tex": { + "bytes": 11311, + "mode": 292, + "sha256": "606c80db61cad13aa0c3b6060dc4b88dbbe7ac60cdd831aa93f28d908fd09dab" + }, + "upstream/build/sections/03-motifs.tex": { + "bytes": 31874, + "mode": 292, + "sha256": "ed76761194988a01af77ead0ea6469cb5dcd29690ab985a0b5a4006b0f2b69bb" + }, + "upstream/build/sections/04-swap.tex": { + "bytes": 19884, + "mode": 292, + "sha256": "412b170ccaab38dba96e95e3cbfae09f4876a9818f8d278776a746b0f8044906" + }, + "upstream/build/sections/05-layers.tex": { + "bytes": 46811, + "mode": 292, + "sha256": "20cfc8d12099d4e4ed9e3e7eeb6162edd9b6e0e076f24693364cd24377252594" + }, + "upstream/build/sections/06-transforms.tex": { + "bytes": 33854, + "mode": 292, + "sha256": "924316e4bc905066281d8f9e8746a49d8829aeb393688608deb1e61c3c87853c" + }, + "upstream/build/sections/07-resampling.tex": { + "bytes": 22053, + "mode": 292, + "sha256": "8a6b91670f9163afb54892489fa2210c77fe1b058f0325ec7d18b44b94be6e2c" + }, + "upstream/build/sections/08-assembly.tex": { + "bytes": 46444, + "mode": 292, + "sha256": "763d7945b1e1ec4ebae9b799bcefcc45fa9bae6e2ffad799868a9c3d513dbd4a" + }, + "upstream/build/sections/09-exact-arithmetic.tex": { + "bytes": 6950, + "mode": 292, + "sha256": "5714e5d0656c78c6a1fde8d01fd11f1ba856a7ea94149b283bd9a50fdbf516c3" + }, + "upstream/build/sections/10-transposition.tex": { + "bytes": 2398, + "mode": 292, + "sha256": "c14ad8d56112f6578678a58211bc8d63c3a4b60e55078ac73bc38f7348e713cb" + }, + "upstream/build/sections/11-grouped-rectangles.tex": { + "bytes": 7405, + "mode": 292, + "sha256": "6525cd0a01980e56accfeaf06e9d875bc699197ba42c6e22b69435e352275174" + }, + "upstream/formalization.yaml": { + "bytes": 73925, + "mode": 292, + "sha256": "2dcbd0d6e6a22475f53d49bfdfcac9b6d2b470653c332a9f56522f5be166edb9" + }, + "upstream/manifest.json": { + "bytes": 6217, + "mode": 292, + "sha256": "16ab13971694cabab09440c47ebf2fc0496a9d35fc3af33950fda3498f8e2392" + } + }, + "measurement": "Parent outer guard is authoritative. Phases are nested observations, not additive costs. Profile is excluded from performance selection. Every timed arm includes copies, source checks, original CLI and retained full witnesses/transcripts; candidate additionally pays cold build/load/all finite controls.", + "mode": "candidate", + "native_calls": { + "complement_fallback": 0, + "complement_native": 238685, + "gram_fallback": 0, + "gram_native": 59959 + }, + "native_predecessor_pr": 5929, + "phases": { + "all_native_finite_independent_controls": { + "calls": 1, + "cpu_seconds_with_children": 1.2747220000000001, + "wall_seconds": 1.2777388819959015 + }, + "checks_initialization": { + "calls": 1, + "cpu_seconds_with_children": 7.300000000043383e-05, + "wall_seconds": 7.220098632387817e-05 + }, + "cold_certify_import": { + "calls": 1, + "cpu_seconds_with_children": 0.0074430000000000884, + "wall_seconds": 0.007443159003742039 + }, + "cold_compile_link_load": { + "calls": 1, + "cpu_seconds_with_children": 0.20845299999999994, + "wall_seconds": 0.21121469399076886 + }, + "cold_complex_module_load": { + "calls": 1, + "cpu_seconds_with_children": 0.011801999999999868, + "wall_seconds": 0.011808373004896566 + }, + "cold_engine_import": { + "calls": 1, + "cpu_seconds_with_children": 0.029615999999999976, + "wall_seconds": 0.029615854989970103 + }, + "cold_prepare_import": { + "calls": 1, + "cpu_seconds_with_children": 0.005469000000000168, + "wall_seconds": 0.00546643600682728 + }, + "compile_roles": { + "calls": 1, + "cpu_seconds_with_children": 0.4116039999999992, + "wall_seconds": 0.4118194069887977 + }, + "complete_original_cli": { + "calls": 1, + "cpu_seconds_with_children": 24.504319, + "wall_seconds": 24.552782502985792 + }, + "engine_custody": { + "calls": 1, + "cpu_seconds_with_children": 0.0013299999999999979, + "wall_seconds": 0.0013290279894135892 + }, + "fresh_engine_copy": { + "calls": 1, + "cpu_seconds_with_children": 0.0012810000000000044, + "wall_seconds": 0.0012795469956472516 + }, + "fresh_root_copy": { + "calls": 1, + "cpu_seconds_with_children": 0.005525000000000002, + "wall_seconds": 0.018503998988308012 + }, + "full_log_integer_bounds": { + "calls": 1, + "cpu_seconds_with_children": 0.0005619999999986192, + "wall_seconds": 0.0005611329979728907 + }, + "identical_lossless_side_serialization": { + "calls": 1, + "cpu_seconds_with_children": 1.2029150000000008, + "wall_seconds": 1.2042208680068143 + }, + "input_custody": { + "calls": 1, + "cpu_seconds_with_children": 0.006855, + "wall_seconds": 0.006855287007056177 + }, + "original_serializable": { + "calls": 1, + "cpu_seconds_with_children": 0.00015999999999749548, + "wall_seconds": 0.000160297000547871 + }, + "original_upstream_verify_sources": { + "calls": 1, + "cpu_seconds_with_children": 0.002006999999998982, + "wall_seconds": 0.0020142020075581968 + }, + "side_construction": { + "calls": 1, + "cpu_seconds_with_children": 1.9836409999999995, + "wall_seconds": 1.9847552279825322 + }, + "verify_labels": { + "calls": 1, + "cpu_seconds_with_children": 15.191200000000002, + "wall_seconds": 15.236444887996186 + }, + "verify_map": { + "calls": 1, + "cpu_seconds_with_children": 5.506254, + "wall_seconds": 5.507646362006199 + }, + "verify_role_frames": { + "calls": 1, + "cpu_seconds_with_children": 1.3741439999999976, + "wall_seconds": 1.3746171279926784 + } + }, + "private_root_permission": "runtime-root is0755; copied input file modes are retained and checked; immutable stages are never chmodded", + "process_and_compiler_cpu_seconds_before_receipt": 28.06481, + "process_wall_seconds_before_receipt": 27.970882914989488, + "science": { + "full_cli_certificate_sha256": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f", + "full_cli_stdout_sha256": "8f77b724810ec05fb19b35d75d8002d31a6e22ed342a36ee28a5caef8d643015", + "full_return_lossless_sha256": "542e4fd73d38b88122d1bf0fffa5f3b092cc4681a14012162daef47e89363cfd", + "ordered_complements": { + "calls": 238685, + "canonical_stream_bytes": 55839507, + "schema": "v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors", + "sha256": "7dec2bf33303c37e1c699609e83768d61df7e19104d34a26a148f66d5ccc4838" + }, + "side": { + "exact_witness_sha256": "4b170c1dbfc33c7cb141a2284c6fd69eac7b6d100971d3e9ee625502b5893f82", + "rank_call_count": 59959, + "rank_distinct_matrix_count": 252, + "rank_trace_sha256": "85006ca332bbc57c2ba9fd06f61a0281d4cee600c9f3b449342379bf2aedec8f", + "result_sha256": "342e99212b12e518902ae9598613f5484113bacee8747c27a13b58a4b1d3986c", + "serialized_bytes": { + "rank_trace": 2674272, + "result": 527, + "witness": 58143622 + } + }, + "upstream_commit": "adc7f1241b42e322a6451854ab7e4b4c146bf78a" + }, + "scientific_imports": { + "audit_short_guards": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C1/runtime-root/scripts/audit_short_guards.py", + "certify": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C1/runtime-root/scripts/certify.py", + "compact_control_layer": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C1/runtime-root/scripts/compact_control_layer.py", + "complex_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C1/engine/source/complex_circuit.py", + "exclusion_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C1/runtime-root/scripts/exclusion_circuit.py", + "paired_exclusion_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C1/runtime-root/scripts/paired_exclusion_circuit.py", + "paired_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C1/runtime-root/scripts/paired_network.py", + "prepare_layers": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C1/runtime-root/scripts/prepare_layers.py", + "search_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C1/runtime-root/scripts/search_network.py", + "shared_point_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C1/runtime-root/scripts/shared_point_circuit.py", + "shared_point_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C1/runtime-root/scripts/shared_point_network.py" + }, + "scope": "Complete frozen historical complex-network CLI with retained observations; conditional certificate only. No bare-CLI factor, selected-frontier, new kappa or PR5864 speed claim.", + "source_pin_sha256": "88bba3caf5975f30fa7abceaea9454110cf3b069233e8241a2ca13d1dff171a7", + "status": "FULL_NETWORK_COMPLETE_PASS" +} diff --git a/research/gf2-full-network/evidence/runs/full-network-C1/stderr.txt b/research/gf2-full-network/evidence/runs/full-network-C1/stderr.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/research/gf2-full-network/evidence/runs/full-network-C1/stdout.txt b/research/gf2-full-network/evidence/runs/full-network-C1/stdout.txt new file mode 100644 index 0000000000..d7643d5a8a --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-C1/stdout.txt @@ -0,0 +1,3 @@ +PASS conditional 59/100000000000 > 2^-31; minimum margin 14779261/25000000000000000 +Side roles per invocation 108195 vs original 3693800 +{"cpu_seconds_with_compiler": 28.06481, "mode": "candidate", "phases": {"all_native_finite_independent_controls": {"calls": 1, "cpu_seconds_with_children": 1.2747220000000001, "wall_seconds": 1.2777388819959015}, "checks_initialization": {"calls": 1, "cpu_seconds_with_children": 7.300000000043383e-05, "wall_seconds": 7.220098632387817e-05}, "cold_certify_import": {"calls": 1, "cpu_seconds_with_children": 0.0074430000000000884, "wall_seconds": 0.007443159003742039}, "cold_compile_link_load": {"calls": 1, "cpu_seconds_with_children": 0.20845299999999994, "wall_seconds": 0.21121469399076886}, "cold_complex_module_load": {"calls": 1, "cpu_seconds_with_children": 0.011801999999999868, "wall_seconds": 0.011808373004896566}, "cold_engine_import": {"calls": 1, "cpu_seconds_with_children": 0.029615999999999976, "wall_seconds": 0.029615854989970103}, "cold_prepare_import": {"calls": 1, "cpu_seconds_with_children": 0.005469000000000168, "wall_seconds": 0.00546643600682728}, "compile_roles": {"calls": 1, "cpu_seconds_with_children": 0.4116039999999992, "wall_seconds": 0.4118194069887977}, "complete_original_cli": {"calls": 1, "cpu_seconds_with_children": 24.504319, "wall_seconds": 24.552782502985792}, "engine_custody": {"calls": 1, "cpu_seconds_with_children": 0.0013299999999999979, "wall_seconds": 0.0013290279894135892}, "fresh_engine_copy": {"calls": 1, "cpu_seconds_with_children": 0.0012810000000000044, "wall_seconds": 0.0012795469956472516}, "fresh_root_copy": {"calls": 1, "cpu_seconds_with_children": 0.005525000000000002, "wall_seconds": 0.018503998988308012}, "full_log_integer_bounds": {"calls": 1, "cpu_seconds_with_children": 0.0005619999999986192, "wall_seconds": 0.0005611329979728907}, "identical_lossless_side_serialization": {"calls": 1, "cpu_seconds_with_children": 1.2029150000000008, "wall_seconds": 1.2042208680068143}, "input_custody": {"calls": 1, "cpu_seconds_with_children": 0.006855, "wall_seconds": 0.006855287007056177}, "original_serializable": {"calls": 1, "cpu_seconds_with_children": 0.00015999999999749548, "wall_seconds": 0.000160297000547871}, "original_upstream_verify_sources": {"calls": 1, "cpu_seconds_with_children": 0.002006999999998982, "wall_seconds": 0.0020142020075581968}, "side_construction": {"calls": 1, "cpu_seconds_with_children": 1.9836409999999995, "wall_seconds": 1.9847552279825322}, "verify_labels": {"calls": 1, "cpu_seconds_with_children": 15.191200000000002, "wall_seconds": 15.236444887996186}, "verify_map": {"calls": 1, "cpu_seconds_with_children": 5.506254, "wall_seconds": 5.507646362006199}, "verify_role_frames": {"calls": 1, "cpu_seconds_with_children": 1.3741439999999976, "wall_seconds": 1.3746171279926784}}, "science": {"full_cli_certificate_sha256": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f", "full_cli_stdout_sha256": "8f77b724810ec05fb19b35d75d8002d31a6e22ed342a36ee28a5caef8d643015", "full_return_lossless_sha256": "542e4fd73d38b88122d1bf0fffa5f3b092cc4681a14012162daef47e89363cfd", "ordered_complements": {"calls": 238685, "canonical_stream_bytes": 55839507, "schema": "v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors", "sha256": "7dec2bf33303c37e1c699609e83768d61df7e19104d34a26a148f66d5ccc4838"}, "side": {"exact_witness_sha256": "4b170c1dbfc33c7cb141a2284c6fd69eac7b6d100971d3e9ee625502b5893f82", "rank_call_count": 59959, "rank_distinct_matrix_count": 252, "rank_trace_sha256": "85006ca332bbc57c2ba9fd06f61a0281d4cee600c9f3b449342379bf2aedec8f", "result_sha256": "342e99212b12e518902ae9598613f5484113bacee8747c27a13b58a4b1d3986c", "serialized_bytes": {"rank_trace": 2674272, "result": 527, "witness": 58143622}}, "upstream_commit": "adc7f1241b42e322a6451854ab7e4b4c146bf78a"}, "status": "FULL_NETWORK_COMPLETE_PASS", "wall_seconds": 27.970882914989488} diff --git a/research/gf2-full-network/evidence/runs/full-network-C1/usage.json b/research/gf2-full-network/evidence/runs/full-network-C1/usage.json new file mode 100644 index 0000000000..f3a74caa48 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-C1/usage.json @@ -0,0 +1 @@ +{"user_seconds":28.11,"system_seconds":0.35,"kernel_max_rss_kib":453852,"exit":0} diff --git a/research/gf2-full-network/evidence/runs/full-network-C2/receipt.json b/research/gf2-full-network/evidence/runs/full-network-C2/receipt.json new file mode 100644 index 0000000000..7ec22cefde --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-C2/receipt.json @@ -0,0 +1,26 @@ +{ + "exit": 0, + "label": "full-network-C2", + "optimized": false, + "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]", + "runner_sha256": "7540f8cc4ae4d12ed86c844ef0837a74184d3ada653979608c295c09f200a751", + "runtime_policy_sha256": "8d87423d90a0a85e0115c85b74f500847e409c30b7e98850d47b6e36f560c772", + "sampled_process_group_rss_bytes": 416595968, + "script": "stages/qualification-v1/full_C2.py", + "source_bytes_and_modes_unchanged": true, + "source_inventory_sha256": "cd8215aef55d75ba5c7bf9377a9572eb3509b0cd1c699db221435c7b519e25a9", + "status": "PASS", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_bytes": 3963, + "stdout_sha256": "1bef720cc7a18ef23b9c9336ebcea0fc327ce72b8ab8ad1fd94b5dfde51bcc7c", + "termination": null, + "usage": { + "exit": 0, + "kernel_max_rss_kib": 453764, + "system_seconds": 0.29, + "user_seconds": 28.15 + }, + "wall_seconds": 28.595429725013673 +} diff --git a/research/gf2-full-network/evidence/runs/full-network-C2/scientific-finite-controls.json b/research/gf2-full-network/evidence/runs/full-network-C2/scientific-finite-controls.json new file mode 100644 index 0000000000..24b362d361 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-C2/scientific-finite-controls.json @@ -0,0 +1 @@ +{"counts":{"binding_rejections":3,"boundary_cases":17,"fallback_cases":38,"gram_cases":621,"oracle_negative_controls":2,"ordered_complements":5344,"real_label_permutations":24},"fixture_sha256":"fbf7cb44bb99c96ee7d393eb91f2ebfbfb94375917c78a902d547320afd75d84","independent_oracle":"Dense binary lists, descending pivots, addition modulo 2; no packed/source/native helpers","micro":{"native_with_conversion":{"cpu_seconds":0.020282467999999998,"wall_seconds":0.020279434975236654},"unchanged_python":{"cpu_seconds":0.14628275699999982,"wall_seconds":0.14630153399775736}},"micro_fixtures":4,"micro_repetitions":128,"micro_scope":"Fixed h25 label families with conversion; diagnostic only, not complete side speed","native_and_fallback_calls":{"complement_fallback":30,"complement_native":5875,"gram_fallback":20,"gram_native":1638},"status":"FINITE_NATIVE_GF2_CONTROLS_PASS","v2_controls":{"complement_fixture_stream":{"calls":7,"canonical_stream_bytes":597,"schema":"v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors","sha256":"ed44b2291db9f1bafc9bdb02e6d3b53e1926b01e549ef8bdccc1991922a6345d"},"counts":{"class_dispatch_rejections":2,"effective_builtins_rejections":2,"native_proxy_rejections":1,"postbind_drift_rejections":25,"prebind_shadow_rejections":10,"real_builtin_drift_rejections":2,"trace_negative_controls":4,"trace_pairs":7},"modified_helper_invocations":0,"runtime_policy":"Reject before native/fallback on source helper, effective builtins, class, function, closure or native dispatch drift","status":"V2_RUNTIME_AND_COMPLEMENT_STREAM_PASS"}} diff --git a/research/gf2-full-network/evidence/runs/full-network-C2/scientific-receipt.json b/research/gf2-full-network/evidence/runs/full-network-C2/scientific-receipt.json new file mode 100644 index 0000000000..4dc44cf782 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-C2/scientific-receipt.json @@ -0,0 +1,445 @@ +{ + "base_commit": "19fdb086ea96af9a9f87936a2b888e10af4ed810", + "build": { + "c_source_sha256": "e9c3c9194a08718bd1575c1cf08c6c6772d3b644c2e274c25a84a1f9249d06cc", + "command": [ + "x86_64-linux-gnu-gcc", + "-shared", + "-fPIC", + "-O3", + "-std=c11", + "-Wall", + "-Wextra", + "-Werror", + "-I/usr/include/python3.12", + "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C2/engine/native_gf2.c", + "-o", + "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C2/cold-build/_packed_gf2.cpython-312-x86_64-linux-gnu.so" + ], + "extension_sha256": "d990705af645971612df802a427642bdb4cd79de0bb028a2f8ed3667bcf44c04", + "no_cached_binary": true, + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]", + "returncode": 0, + "stderr": "", + "stdout": "" + }, + "compiler_tmpdir": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C2/compiler-tmp", + "driver_sha256": "0d976d2eb6b845f20d4a3396591a806f966688b88693cd6a5f8a0c9e48925e36", + "engine_custody": { + "compare_side_verifier.py": { + "bytes": 10571, + "mode": 292, + "sha256": "6e507bb0c7e00d090a60289fddb6c55e90c946d0850c42c3c5e3e15c27604a68" + }, + "finite_controls.py": { + "bytes": 23815, + "mode": 292, + "sha256": "df989a831aac43cc1af95169dad8c64a7548760e6e1f96976da996703f2c8f7a" + }, + "native_backend.py": { + "bytes": 20334, + "mode": 292, + "sha256": "e473c38245c3668715b5a78dfe980b2fe3ed0d0c9b8c97c666fbae6ecf1fffd5" + }, + "native_gf2.c": { + "bytes": 7425, + "mode": 292, + "sha256": "e9c3c9194a08718bd1575c1cf08c6c6772d3b644c2e274c25a84a1f9249d06cc" + }, + "profile_side_verifier.py": { + "bytes": 8959, + "mode": 292, + "sha256": "9c994378171c20a91539418d93cb8387e1daa93465d6862beefea90e12999c2a" + }, + "source/complex_circuit.py": { + "bytes": 19732, + "mode": 292, + "sha256": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1" + }, + "source/complex_network.py": { + "bytes": 6105, + "mode": 292, + "sha256": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b" + } + }, + "environment": { + "executable": "/usr/bin/python3.12", + "platform": "linux", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]" + }, + "finite_controls": { + "counts": { + "binding_rejections": 3, + "boundary_cases": 17, + "fallback_cases": 38, + "gram_cases": 621, + "oracle_negative_controls": 2, + "ordered_complements": 5344, + "real_label_permutations": 24 + }, + "fixture_sha256": "fbf7cb44bb99c96ee7d393eb91f2ebfbfb94375917c78a902d547320afd75d84", + "independent_oracle": "Dense binary lists, descending pivots, addition modulo 2; no packed/source/native helpers", + "micro": { + "native_with_conversion": { + "cpu_seconds": 0.020282467999999998, + "wall_seconds": 0.020279434975236654 + }, + "unchanged_python": { + "cpu_seconds": 0.14628275699999982, + "wall_seconds": 0.14630153399775736 + } + }, + "micro_fixtures": 4, + "micro_repetitions": 128, + "micro_scope": "Fixed h25 label families with conversion; diagnostic only, not complete side speed", + "native_and_fallback_calls": { + "complement_fallback": 30, + "complement_native": 5875, + "gram_fallback": 20, + "gram_native": 1638 + }, + "status": "FINITE_NATIVE_GF2_CONTROLS_PASS", + "v2_controls": { + "complement_fixture_stream": { + "calls": 7, + "canonical_stream_bytes": 597, + "schema": "v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors", + "sha256": "ed44b2291db9f1bafc9bdb02e6d3b53e1926b01e549ef8bdccc1991922a6345d" + }, + "counts": { + "class_dispatch_rejections": 2, + "effective_builtins_rejections": 2, + "native_proxy_rejections": 1, + "postbind_drift_rejections": 25, + "prebind_shadow_rejections": 10, + "real_builtin_drift_rejections": 2, + "trace_negative_controls": 4, + "trace_pairs": 7 + }, + "modified_helper_invocations": 0, + "runtime_policy": "Reject before native/fallback on source helper, effective builtins, class, function, closure or native dispatch drift", + "status": "V2_RUNTIME_AND_COMPLEMENT_STREAM_PASS" + } + }, + "frozen_custody": { + "scripts/audit_short_guards.py": { + "bytes": 7956, + "mode": 292, + "sha256": "c2c929c956e617bee739963b517b9069e0d067cfebc6820f401a4e90a1769eb1" + }, + "scripts/certify.py": { + "bytes": 11276, + "mode": 292, + "sha256": "2348d95008276c5d5764f7e028c3918e484582cd589bd4d9b82919161745e53e" + }, + "scripts/compact_control_layer.py": { + "bytes": 7892, + "mode": 292, + "sha256": "e814c9f8d84f2e5d3aa2e06c36697f27f110218addc40ff8df2801fde861ff9f" + }, + "scripts/complex_circuit.py": { + "bytes": 19732, + "mode": 292, + "sha256": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1" + }, + "scripts/complex_network.py": { + "bytes": 6105, + "mode": 292, + "sha256": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b" + }, + "scripts/exclusion_circuit.py": { + "bytes": 9450, + "mode": 292, + "sha256": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3" + }, + "scripts/paired_exclusion_circuit.py": { + "bytes": 2289, + "mode": 292, + "sha256": "8f05f04cf06217befd6d0ee0f2d7d0c5c5eb32cfab8c9a8ca7917fd6d620b7d2" + }, + "scripts/paired_network.py": { + "bytes": 4933, + "mode": 292, + "sha256": "991223dc3c1374284c361ed017e42bf732dd971fa0bea2be2282cfb18257b3f7" + }, + "scripts/prepare_layers.py": { + "bytes": 8196, + "mode": 292, + "sha256": "a6e2adc612f264b1c0e51d18ce6315de9ae5e2ae2420aa22e99a22d8bf304947" + }, + "scripts/search_network.py": { + "bytes": 4314, + "mode": 292, + "sha256": "3a4faa5037d9b8e7ca5828afac193a96b6966a8b114f14937921795b24ec4f6a" + }, + "scripts/shared_point_circuit.py": { + "bytes": 13167, + "mode": 292, + "sha256": "360d9bffc0f55315fe294789b72c71c79e0991524555b3a5f42a2ca504d7da95" + }, + "scripts/shared_point_network.py": { + "bytes": 3119, + "mode": 292, + "sha256": "a85e7f0d8c42d6a27e3846308571ca324a1824ac5c2d59e4daa5c7673c33c697" + }, + "upstream/LICENSE": { + "bytes": 11357, + "mode": 292, + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + "upstream/README.md": { + "bytes": 541, + "mode": 292, + "sha256": "8d1ceff898a4e0e681679f91c4def485820be9e99f04e4861f2ce601a364723e" + }, + "upstream/build/figures/multiplication-flow.tex": { + "bytes": 847, + "mode": 292, + "sha256": "3654d2728b0c98919d61760e1802804ed616546a747f9167a93e17bb8697f320" + }, + "upstream/build/figures/proof-map.tex": { + "bytes": 524, + "mode": 292, + "sha256": "76d4deacf07bea355412abcfd798c7cbe6dcccef29a4a420a9e2a7b158f23848" + }, + "upstream/build/main.tex": { + "bytes": 1882, + "mode": 292, + "sha256": "42f0f506976bc2084374a71e97edc1549689a7accf35dda4db2a18af4f13c1aa" + }, + "upstream/build/references.bib": { + "bytes": 9790, + "mode": 292, + "sha256": "33cc2df13ccf85330849e8fb34d4ac7613b23f625787457a5b7b9aa6d7369476" + }, + "upstream/build/sections/00-introduction.tex": { + "bytes": 11515, + "mode": 292, + "sha256": "98721f03682ccf1cc7d0850b07adabaa2d8f3afe552e3861753eba9d284d0da0" + }, + "upstream/build/sections/01-history.tex": { + "bytes": 9689, + "mode": 292, + "sha256": "798956c8150c31e3e2f5f29c47110d25ce619faad1374f4d3a0f15fa3ee33ead" + }, + "upstream/build/sections/02-streams.tex": { + "bytes": 11311, + "mode": 292, + "sha256": "606c80db61cad13aa0c3b6060dc4b88dbbe7ac60cdd831aa93f28d908fd09dab" + }, + "upstream/build/sections/03-motifs.tex": { + "bytes": 31874, + "mode": 292, + "sha256": "ed76761194988a01af77ead0ea6469cb5dcd29690ab985a0b5a4006b0f2b69bb" + }, + "upstream/build/sections/04-swap.tex": { + "bytes": 19884, + "mode": 292, + "sha256": "412b170ccaab38dba96e95e3cbfae09f4876a9818f8d278776a746b0f8044906" + }, + "upstream/build/sections/05-layers.tex": { + "bytes": 46811, + "mode": 292, + "sha256": "20cfc8d12099d4e4ed9e3e7eeb6162edd9b6e0e076f24693364cd24377252594" + }, + "upstream/build/sections/06-transforms.tex": { + "bytes": 33854, + "mode": 292, + "sha256": "924316e4bc905066281d8f9e8746a49d8829aeb393688608deb1e61c3c87853c" + }, + "upstream/build/sections/07-resampling.tex": { + "bytes": 22053, + "mode": 292, + "sha256": "8a6b91670f9163afb54892489fa2210c77fe1b058f0325ec7d18b44b94be6e2c" + }, + "upstream/build/sections/08-assembly.tex": { + "bytes": 46444, + "mode": 292, + "sha256": "763d7945b1e1ec4ebae9b799bcefcc45fa9bae6e2ffad799868a9c3d513dbd4a" + }, + "upstream/build/sections/09-exact-arithmetic.tex": { + "bytes": 6950, + "mode": 292, + "sha256": "5714e5d0656c78c6a1fde8d01fd11f1ba856a7ea94149b283bd9a50fdbf516c3" + }, + "upstream/build/sections/10-transposition.tex": { + "bytes": 2398, + "mode": 292, + "sha256": "c14ad8d56112f6578678a58211bc8d63c3a4b60e55078ac73bc38f7348e713cb" + }, + "upstream/build/sections/11-grouped-rectangles.tex": { + "bytes": 7405, + "mode": 292, + "sha256": "6525cd0a01980e56accfeaf06e9d875bc699197ba42c6e22b69435e352275174" + }, + "upstream/formalization.yaml": { + "bytes": 73925, + "mode": 292, + "sha256": "2dcbd0d6e6a22475f53d49bfdfcac9b6d2b470653c332a9f56522f5be166edb9" + }, + "upstream/manifest.json": { + "bytes": 6217, + "mode": 292, + "sha256": "16ab13971694cabab09440c47ebf2fc0496a9d35fc3af33950fda3498f8e2392" + } + }, + "measurement": "Parent outer guard is authoritative. Phases are nested observations, not additive costs. Profile is excluded from performance selection. Every timed arm includes copies, source checks, original CLI and retained full witnesses/transcripts; candidate additionally pays cold build/load/all finite controls.", + "mode": "candidate", + "native_calls": { + "complement_fallback": 0, + "complement_native": 238685, + "gram_fallback": 0, + "gram_native": 59959 + }, + "native_predecessor_pr": 5929, + "phases": { + "all_native_finite_independent_controls": { + "calls": 1, + "cpu_seconds_with_children": 1.244774, + "wall_seconds": 1.2449181789997965 + }, + "checks_initialization": { + "calls": 1, + "cpu_seconds_with_children": 7.000000000045858e-05, + "wall_seconds": 6.948600639589131e-05 + }, + "cold_certify_import": { + "calls": 1, + "cpu_seconds_with_children": 0.004972999999999894, + "wall_seconds": 0.0049734850181266665 + }, + "cold_compile_link_load": { + "calls": 1, + "cpu_seconds_with_children": 0.2347300000000001, + "wall_seconds": 0.23694395500933751 + }, + "cold_complex_module_load": { + "calls": 1, + "cpu_seconds_with_children": 0.006947999999999954, + "wall_seconds": 0.006946792011149228 + }, + "cold_engine_import": { + "calls": 1, + "cpu_seconds_with_children": 0.03512799999999999, + "wall_seconds": 0.0351287960074842 + }, + "cold_prepare_import": { + "calls": 1, + "cpu_seconds_with_children": 0.003538000000000041, + "wall_seconds": 0.0035365690127946436 + }, + "compile_roles": { + "calls": 1, + "cpu_seconds_with_children": 0.4012159999999989, + "wall_seconds": 0.4012432179879397 + }, + "complete_original_cli": { + "calls": 1, + "cpu_seconds_with_children": 24.523470999999997, + "wall_seconds": 24.538060710998252 + }, + "engine_custody": { + "calls": 1, + "cpu_seconds_with_children": 0.0013470000000000149, + "wall_seconds": 0.0013467240205500275 + }, + "fresh_engine_copy": { + "calls": 1, + "cpu_seconds_with_children": 0.0014789999999999526, + "wall_seconds": 0.013941254001110792 + }, + "fresh_root_copy": { + "calls": 1, + "cpu_seconds_with_children": 0.005178999999999989, + "wall_seconds": 0.020863882993580773 + }, + "full_log_integer_bounds": { + "calls": 1, + "cpu_seconds_with_children": 0.0004810000000006198, + "wall_seconds": 0.0004880210035480559 + }, + "identical_lossless_side_serialization": { + "calls": 1, + "cpu_seconds_with_children": 1.2299279999999975, + "wall_seconds": 1.2300507120089605 + }, + "input_custody": { + "calls": 1, + "cpu_seconds_with_children": 0.006196000000000007, + "wall_seconds": 0.006195071997353807 + }, + "original_serializable": { + "calls": 1, + "cpu_seconds_with_children": 0.00014399999999881175, + "wall_seconds": 0.0001449490082450211 + }, + "original_upstream_verify_sources": { + "calls": 1, + "cpu_seconds_with_children": 0.0026159999999997297, + "wall_seconds": 0.0026130040059797466 + }, + "side_construction": { + "calls": 1, + "cpu_seconds_with_children": 2.029509, + "wall_seconds": 2.032118825998623 + }, + "verify_labels": { + "calls": 1, + "cpu_seconds_with_children": 15.081998999999996, + "wall_seconds": 15.091367307992186 + }, + "verify_map": { + "calls": 1, + "cpu_seconds_with_children": 5.787010000000001, + "wall_seconds": 5.78891231000307 + }, + "verify_role_frames": { + "calls": 1, + "cpu_seconds_with_children": 1.1937980000000046, + "wall_seconds": 1.194428655988304 + } + }, + "private_root_permission": "runtime-root is0755; copied input file modes are retained and checked; immutable stages are never chmodded", + "process_and_compiler_cpu_seconds_before_receipt": 28.072429999999997, + "process_wall_seconds_before_receipt": 27.943907899025362, + "science": { + "full_cli_certificate_sha256": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f", + "full_cli_stdout_sha256": "8f77b724810ec05fb19b35d75d8002d31a6e22ed342a36ee28a5caef8d643015", + "full_return_lossless_sha256": "542e4fd73d38b88122d1bf0fffa5f3b092cc4681a14012162daef47e89363cfd", + "ordered_complements": { + "calls": 238685, + "canonical_stream_bytes": 55839507, + "schema": "v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors", + "sha256": "7dec2bf33303c37e1c699609e83768d61df7e19104d34a26a148f66d5ccc4838" + }, + "side": { + "exact_witness_sha256": "4b170c1dbfc33c7cb141a2284c6fd69eac7b6d100971d3e9ee625502b5893f82", + "rank_call_count": 59959, + "rank_distinct_matrix_count": 252, + "rank_trace_sha256": "85006ca332bbc57c2ba9fd06f61a0281d4cee600c9f3b449342379bf2aedec8f", + "result_sha256": "342e99212b12e518902ae9598613f5484113bacee8747c27a13b58a4b1d3986c", + "serialized_bytes": { + "rank_trace": 2674272, + "result": 527, + "witness": 58143622 + } + }, + "upstream_commit": "adc7f1241b42e322a6451854ab7e4b4c146bf78a" + }, + "scientific_imports": { + "audit_short_guards": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C2/runtime-root/scripts/audit_short_guards.py", + "certify": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C2/runtime-root/scripts/certify.py", + "compact_control_layer": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C2/runtime-root/scripts/compact_control_layer.py", + "complex_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C2/engine/source/complex_circuit.py", + "exclusion_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C2/runtime-root/scripts/exclusion_circuit.py", + "paired_exclusion_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C2/runtime-root/scripts/paired_exclusion_circuit.py", + "paired_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C2/runtime-root/scripts/paired_network.py", + "prepare_layers": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C2/runtime-root/scripts/prepare_layers.py", + "search_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C2/runtime-root/scripts/search_network.py", + "shared_point_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C2/runtime-root/scripts/shared_point_circuit.py", + "shared_point_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C2/runtime-root/scripts/shared_point_network.py" + }, + "scope": "Complete frozen historical complex-network CLI with retained observations; conditional certificate only. No bare-CLI factor, selected-frontier, new kappa or PR5864 speed claim.", + "source_pin_sha256": "88bba3caf5975f30fa7abceaea9454110cf3b069233e8241a2ca13d1dff171a7", + "status": "FULL_NETWORK_COMPLETE_PASS" +} diff --git a/research/gf2-full-network/evidence/runs/full-network-C2/stderr.txt b/research/gf2-full-network/evidence/runs/full-network-C2/stderr.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/research/gf2-full-network/evidence/runs/full-network-C2/stdout.txt b/research/gf2-full-network/evidence/runs/full-network-C2/stdout.txt new file mode 100644 index 0000000000..a6580d9a04 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-C2/stdout.txt @@ -0,0 +1,3 @@ +PASS conditional 59/100000000000 > 2^-31; minimum margin 14779261/25000000000000000 +Side roles per invocation 108195 vs original 3693800 +{"cpu_seconds_with_compiler": 28.072429999999997, "mode": "candidate", "phases": {"all_native_finite_independent_controls": {"calls": 1, "cpu_seconds_with_children": 1.244774, "wall_seconds": 1.2449181789997965}, "checks_initialization": {"calls": 1, "cpu_seconds_with_children": 7.000000000045858e-05, "wall_seconds": 6.948600639589131e-05}, "cold_certify_import": {"calls": 1, "cpu_seconds_with_children": 0.004972999999999894, "wall_seconds": 0.0049734850181266665}, "cold_compile_link_load": {"calls": 1, "cpu_seconds_with_children": 0.2347300000000001, "wall_seconds": 0.23694395500933751}, "cold_complex_module_load": {"calls": 1, "cpu_seconds_with_children": 0.006947999999999954, "wall_seconds": 0.006946792011149228}, "cold_engine_import": {"calls": 1, "cpu_seconds_with_children": 0.03512799999999999, "wall_seconds": 0.0351287960074842}, "cold_prepare_import": {"calls": 1, "cpu_seconds_with_children": 0.003538000000000041, "wall_seconds": 0.0035365690127946436}, "compile_roles": {"calls": 1, "cpu_seconds_with_children": 0.4012159999999989, "wall_seconds": 0.4012432179879397}, "complete_original_cli": {"calls": 1, "cpu_seconds_with_children": 24.523470999999997, "wall_seconds": 24.538060710998252}, "engine_custody": {"calls": 1, "cpu_seconds_with_children": 0.0013470000000000149, "wall_seconds": 0.0013467240205500275}, "fresh_engine_copy": {"calls": 1, "cpu_seconds_with_children": 0.0014789999999999526, "wall_seconds": 0.013941254001110792}, "fresh_root_copy": {"calls": 1, "cpu_seconds_with_children": 0.005178999999999989, "wall_seconds": 0.020863882993580773}, "full_log_integer_bounds": {"calls": 1, "cpu_seconds_with_children": 0.0004810000000006198, "wall_seconds": 0.0004880210035480559}, "identical_lossless_side_serialization": {"calls": 1, "cpu_seconds_with_children": 1.2299279999999975, "wall_seconds": 1.2300507120089605}, "input_custody": {"calls": 1, "cpu_seconds_with_children": 0.006196000000000007, "wall_seconds": 0.006195071997353807}, "original_serializable": {"calls": 1, "cpu_seconds_with_children": 0.00014399999999881175, "wall_seconds": 0.0001449490082450211}, "original_upstream_verify_sources": {"calls": 1, "cpu_seconds_with_children": 0.0026159999999997297, "wall_seconds": 0.0026130040059797466}, "side_construction": {"calls": 1, "cpu_seconds_with_children": 2.029509, "wall_seconds": 2.032118825998623}, "verify_labels": {"calls": 1, "cpu_seconds_with_children": 15.081998999999996, "wall_seconds": 15.091367307992186}, "verify_map": {"calls": 1, "cpu_seconds_with_children": 5.787010000000001, "wall_seconds": 5.78891231000307}, "verify_role_frames": {"calls": 1, "cpu_seconds_with_children": 1.1937980000000046, "wall_seconds": 1.194428655988304}}, "science": {"full_cli_certificate_sha256": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f", "full_cli_stdout_sha256": "8f77b724810ec05fb19b35d75d8002d31a6e22ed342a36ee28a5caef8d643015", "full_return_lossless_sha256": "542e4fd73d38b88122d1bf0fffa5f3b092cc4681a14012162daef47e89363cfd", "ordered_complements": {"calls": 238685, "canonical_stream_bytes": 55839507, "schema": "v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors", "sha256": "7dec2bf33303c37e1c699609e83768d61df7e19104d34a26a148f66d5ccc4838"}, "side": {"exact_witness_sha256": "4b170c1dbfc33c7cb141a2284c6fd69eac7b6d100971d3e9ee625502b5893f82", "rank_call_count": 59959, "rank_distinct_matrix_count": 252, "rank_trace_sha256": "85006ca332bbc57c2ba9fd06f61a0281d4cee600c9f3b449342379bf2aedec8f", "result_sha256": "342e99212b12e518902ae9598613f5484113bacee8747c27a13b58a4b1d3986c", "serialized_bytes": {"rank_trace": 2674272, "result": 527, "witness": 58143622}}, "upstream_commit": "adc7f1241b42e322a6451854ab7e4b4c146bf78a"}, "status": "FULL_NETWORK_COMPLETE_PASS", "wall_seconds": 27.943907899025362} diff --git a/research/gf2-full-network/evidence/runs/full-network-C2/usage.json b/research/gf2-full-network/evidence/runs/full-network-C2/usage.json new file mode 100644 index 0000000000..aeaba09189 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-C2/usage.json @@ -0,0 +1 @@ +{"user_seconds":28.15,"system_seconds":0.29,"kernel_max_rss_kib":453764,"exit":0} diff --git a/research/gf2-full-network/evidence/runs/full-network-C3/receipt.json b/research/gf2-full-network/evidence/runs/full-network-C3/receipt.json new file mode 100644 index 0000000000..2d3d534673 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-C3/receipt.json @@ -0,0 +1,26 @@ +{ + "exit": 0, + "label": "full-network-C3", + "optimized": false, + "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]", + "runner_sha256": "7540f8cc4ae4d12ed86c844ef0837a74184d3ada653979608c295c09f200a751", + "runtime_policy_sha256": "8d87423d90a0a85e0115c85b74f500847e409c30b7e98850d47b6e36f560c772", + "sampled_process_group_rss_bytes": 436506624, + "script": "stages/qualification-v1/full_C3.py", + "source_bytes_and_modes_unchanged": true, + "source_inventory_sha256": "cd8215aef55d75ba5c7bf9377a9572eb3509b0cd1c699db221435c7b519e25a9", + "status": "PASS", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_bytes": 3954, + "stdout_sha256": "847d85da1c1e4660bb9b76c4a266c828c51f5d61820ff93f81a27d3496a842b0", + "termination": null, + "usage": { + "exit": 0, + "kernel_max_rss_kib": 453752, + "system_seconds": 0.34, + "user_seconds": 31.58 + }, + "wall_seconds": 33.12922728899866 +} diff --git a/research/gf2-full-network/evidence/runs/full-network-C3/scientific-finite-controls.json b/research/gf2-full-network/evidence/runs/full-network-C3/scientific-finite-controls.json new file mode 100644 index 0000000000..8be952bc4d --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-C3/scientific-finite-controls.json @@ -0,0 +1 @@ +{"counts":{"binding_rejections":3,"boundary_cases":17,"fallback_cases":38,"gram_cases":621,"oracle_negative_controls":2,"ordered_complements":5344,"real_label_permutations":24},"fixture_sha256":"fbf7cb44bb99c96ee7d393eb91f2ebfbfb94375917c78a902d547320afd75d84","independent_oracle":"Dense binary lists, descending pivots, addition modulo 2; no packed/source/native helpers","micro":{"native_with_conversion":{"cpu_seconds":0.024255946000000028,"wall_seconds":0.02425268100341782},"unchanged_python":{"cpu_seconds":0.140536805,"wall_seconds":0.14053679100470617}},"micro_fixtures":4,"micro_repetitions":128,"micro_scope":"Fixed h25 label families with conversion; diagnostic only, not complete side speed","native_and_fallback_calls":{"complement_fallback":30,"complement_native":5875,"gram_fallback":20,"gram_native":1638},"status":"FINITE_NATIVE_GF2_CONTROLS_PASS","v2_controls":{"complement_fixture_stream":{"calls":7,"canonical_stream_bytes":597,"schema":"v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors","sha256":"ed44b2291db9f1bafc9bdb02e6d3b53e1926b01e549ef8bdccc1991922a6345d"},"counts":{"class_dispatch_rejections":2,"effective_builtins_rejections":2,"native_proxy_rejections":1,"postbind_drift_rejections":25,"prebind_shadow_rejections":10,"real_builtin_drift_rejections":2,"trace_negative_controls":4,"trace_pairs":7},"modified_helper_invocations":0,"runtime_policy":"Reject before native/fallback on source helper, effective builtins, class, function, closure or native dispatch drift","status":"V2_RUNTIME_AND_COMPLEMENT_STREAM_PASS"}} diff --git a/research/gf2-full-network/evidence/runs/full-network-C3/scientific-receipt.json b/research/gf2-full-network/evidence/runs/full-network-C3/scientific-receipt.json new file mode 100644 index 0000000000..fb86eaaf10 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-C3/scientific-receipt.json @@ -0,0 +1,445 @@ +{ + "base_commit": "19fdb086ea96af9a9f87936a2b888e10af4ed810", + "build": { + "c_source_sha256": "e9c3c9194a08718bd1575c1cf08c6c6772d3b644c2e274c25a84a1f9249d06cc", + "command": [ + "x86_64-linux-gnu-gcc", + "-shared", + "-fPIC", + "-O3", + "-std=c11", + "-Wall", + "-Wextra", + "-Werror", + "-I/usr/include/python3.12", + "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C3/engine/native_gf2.c", + "-o", + "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C3/cold-build/_packed_gf2.cpython-312-x86_64-linux-gnu.so" + ], + "extension_sha256": "d990705af645971612df802a427642bdb4cd79de0bb028a2f8ed3667bcf44c04", + "no_cached_binary": true, + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]", + "returncode": 0, + "stderr": "", + "stdout": "" + }, + "compiler_tmpdir": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C3/compiler-tmp", + "driver_sha256": "0d976d2eb6b845f20d4a3396591a806f966688b88693cd6a5f8a0c9e48925e36", + "engine_custody": { + "compare_side_verifier.py": { + "bytes": 10571, + "mode": 292, + "sha256": "6e507bb0c7e00d090a60289fddb6c55e90c946d0850c42c3c5e3e15c27604a68" + }, + "finite_controls.py": { + "bytes": 23815, + "mode": 292, + "sha256": "df989a831aac43cc1af95169dad8c64a7548760e6e1f96976da996703f2c8f7a" + }, + "native_backend.py": { + "bytes": 20334, + "mode": 292, + "sha256": "e473c38245c3668715b5a78dfe980b2fe3ed0d0c9b8c97c666fbae6ecf1fffd5" + }, + "native_gf2.c": { + "bytes": 7425, + "mode": 292, + "sha256": "e9c3c9194a08718bd1575c1cf08c6c6772d3b644c2e274c25a84a1f9249d06cc" + }, + "profile_side_verifier.py": { + "bytes": 8959, + "mode": 292, + "sha256": "9c994378171c20a91539418d93cb8387e1daa93465d6862beefea90e12999c2a" + }, + "source/complex_circuit.py": { + "bytes": 19732, + "mode": 292, + "sha256": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1" + }, + "source/complex_network.py": { + "bytes": 6105, + "mode": 292, + "sha256": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b" + } + }, + "environment": { + "executable": "/usr/bin/python3.12", + "platform": "linux", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]" + }, + "finite_controls": { + "counts": { + "binding_rejections": 3, + "boundary_cases": 17, + "fallback_cases": 38, + "gram_cases": 621, + "oracle_negative_controls": 2, + "ordered_complements": 5344, + "real_label_permutations": 24 + }, + "fixture_sha256": "fbf7cb44bb99c96ee7d393eb91f2ebfbfb94375917c78a902d547320afd75d84", + "independent_oracle": "Dense binary lists, descending pivots, addition modulo 2; no packed/source/native helpers", + "micro": { + "native_with_conversion": { + "cpu_seconds": 0.024255946000000028, + "wall_seconds": 0.02425268100341782 + }, + "unchanged_python": { + "cpu_seconds": 0.140536805, + "wall_seconds": 0.14053679100470617 + } + }, + "micro_fixtures": 4, + "micro_repetitions": 128, + "micro_scope": "Fixed h25 label families with conversion; diagnostic only, not complete side speed", + "native_and_fallback_calls": { + "complement_fallback": 30, + "complement_native": 5875, + "gram_fallback": 20, + "gram_native": 1638 + }, + "status": "FINITE_NATIVE_GF2_CONTROLS_PASS", + "v2_controls": { + "complement_fixture_stream": { + "calls": 7, + "canonical_stream_bytes": 597, + "schema": "v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors", + "sha256": "ed44b2291db9f1bafc9bdb02e6d3b53e1926b01e549ef8bdccc1991922a6345d" + }, + "counts": { + "class_dispatch_rejections": 2, + "effective_builtins_rejections": 2, + "native_proxy_rejections": 1, + "postbind_drift_rejections": 25, + "prebind_shadow_rejections": 10, + "real_builtin_drift_rejections": 2, + "trace_negative_controls": 4, + "trace_pairs": 7 + }, + "modified_helper_invocations": 0, + "runtime_policy": "Reject before native/fallback on source helper, effective builtins, class, function, closure or native dispatch drift", + "status": "V2_RUNTIME_AND_COMPLEMENT_STREAM_PASS" + } + }, + "frozen_custody": { + "scripts/audit_short_guards.py": { + "bytes": 7956, + "mode": 292, + "sha256": "c2c929c956e617bee739963b517b9069e0d067cfebc6820f401a4e90a1769eb1" + }, + "scripts/certify.py": { + "bytes": 11276, + "mode": 292, + "sha256": "2348d95008276c5d5764f7e028c3918e484582cd589bd4d9b82919161745e53e" + }, + "scripts/compact_control_layer.py": { + "bytes": 7892, + "mode": 292, + "sha256": "e814c9f8d84f2e5d3aa2e06c36697f27f110218addc40ff8df2801fde861ff9f" + }, + "scripts/complex_circuit.py": { + "bytes": 19732, + "mode": 292, + "sha256": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1" + }, + "scripts/complex_network.py": { + "bytes": 6105, + "mode": 292, + "sha256": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b" + }, + "scripts/exclusion_circuit.py": { + "bytes": 9450, + "mode": 292, + "sha256": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3" + }, + "scripts/paired_exclusion_circuit.py": { + "bytes": 2289, + "mode": 292, + "sha256": "8f05f04cf06217befd6d0ee0f2d7d0c5c5eb32cfab8c9a8ca7917fd6d620b7d2" + }, + "scripts/paired_network.py": { + "bytes": 4933, + "mode": 292, + "sha256": "991223dc3c1374284c361ed017e42bf732dd971fa0bea2be2282cfb18257b3f7" + }, + "scripts/prepare_layers.py": { + "bytes": 8196, + "mode": 292, + "sha256": "a6e2adc612f264b1c0e51d18ce6315de9ae5e2ae2420aa22e99a22d8bf304947" + }, + "scripts/search_network.py": { + "bytes": 4314, + "mode": 292, + "sha256": "3a4faa5037d9b8e7ca5828afac193a96b6966a8b114f14937921795b24ec4f6a" + }, + "scripts/shared_point_circuit.py": { + "bytes": 13167, + "mode": 292, + "sha256": "360d9bffc0f55315fe294789b72c71c79e0991524555b3a5f42a2ca504d7da95" + }, + "scripts/shared_point_network.py": { + "bytes": 3119, + "mode": 292, + "sha256": "a85e7f0d8c42d6a27e3846308571ca324a1824ac5c2d59e4daa5c7673c33c697" + }, + "upstream/LICENSE": { + "bytes": 11357, + "mode": 292, + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + "upstream/README.md": { + "bytes": 541, + "mode": 292, + "sha256": "8d1ceff898a4e0e681679f91c4def485820be9e99f04e4861f2ce601a364723e" + }, + "upstream/build/figures/multiplication-flow.tex": { + "bytes": 847, + "mode": 292, + "sha256": "3654d2728b0c98919d61760e1802804ed616546a747f9167a93e17bb8697f320" + }, + "upstream/build/figures/proof-map.tex": { + "bytes": 524, + "mode": 292, + "sha256": "76d4deacf07bea355412abcfd798c7cbe6dcccef29a4a420a9e2a7b158f23848" + }, + "upstream/build/main.tex": { + "bytes": 1882, + "mode": 292, + "sha256": "42f0f506976bc2084374a71e97edc1549689a7accf35dda4db2a18af4f13c1aa" + }, + "upstream/build/references.bib": { + "bytes": 9790, + "mode": 292, + "sha256": "33cc2df13ccf85330849e8fb34d4ac7613b23f625787457a5b7b9aa6d7369476" + }, + "upstream/build/sections/00-introduction.tex": { + "bytes": 11515, + "mode": 292, + "sha256": "98721f03682ccf1cc7d0850b07adabaa2d8f3afe552e3861753eba9d284d0da0" + }, + "upstream/build/sections/01-history.tex": { + "bytes": 9689, + "mode": 292, + "sha256": "798956c8150c31e3e2f5f29c47110d25ce619faad1374f4d3a0f15fa3ee33ead" + }, + "upstream/build/sections/02-streams.tex": { + "bytes": 11311, + "mode": 292, + "sha256": "606c80db61cad13aa0c3b6060dc4b88dbbe7ac60cdd831aa93f28d908fd09dab" + }, + "upstream/build/sections/03-motifs.tex": { + "bytes": 31874, + "mode": 292, + "sha256": "ed76761194988a01af77ead0ea6469cb5dcd29690ab985a0b5a4006b0f2b69bb" + }, + "upstream/build/sections/04-swap.tex": { + "bytes": 19884, + "mode": 292, + "sha256": "412b170ccaab38dba96e95e3cbfae09f4876a9818f8d278776a746b0f8044906" + }, + "upstream/build/sections/05-layers.tex": { + "bytes": 46811, + "mode": 292, + "sha256": "20cfc8d12099d4e4ed9e3e7eeb6162edd9b6e0e076f24693364cd24377252594" + }, + "upstream/build/sections/06-transforms.tex": { + "bytes": 33854, + "mode": 292, + "sha256": "924316e4bc905066281d8f9e8746a49d8829aeb393688608deb1e61c3c87853c" + }, + "upstream/build/sections/07-resampling.tex": { + "bytes": 22053, + "mode": 292, + "sha256": "8a6b91670f9163afb54892489fa2210c77fe1b058f0325ec7d18b44b94be6e2c" + }, + "upstream/build/sections/08-assembly.tex": { + "bytes": 46444, + "mode": 292, + "sha256": "763d7945b1e1ec4ebae9b799bcefcc45fa9bae6e2ffad799868a9c3d513dbd4a" + }, + "upstream/build/sections/09-exact-arithmetic.tex": { + "bytes": 6950, + "mode": 292, + "sha256": "5714e5d0656c78c6a1fde8d01fd11f1ba856a7ea94149b283bd9a50fdbf516c3" + }, + "upstream/build/sections/10-transposition.tex": { + "bytes": 2398, + "mode": 292, + "sha256": "c14ad8d56112f6578678a58211bc8d63c3a4b60e55078ac73bc38f7348e713cb" + }, + "upstream/build/sections/11-grouped-rectangles.tex": { + "bytes": 7405, + "mode": 292, + "sha256": "6525cd0a01980e56accfeaf06e9d875bc699197ba42c6e22b69435e352275174" + }, + "upstream/formalization.yaml": { + "bytes": 73925, + "mode": 292, + "sha256": "2dcbd0d6e6a22475f53d49bfdfcac9b6d2b470653c332a9f56522f5be166edb9" + }, + "upstream/manifest.json": { + "bytes": 6217, + "mode": 292, + "sha256": "16ab13971694cabab09440c47ebf2fc0496a9d35fc3af33950fda3498f8e2392" + } + }, + "measurement": "Parent outer guard is authoritative. Phases are nested observations, not additive costs. Profile is excluded from performance selection. Every timed arm includes copies, source checks, original CLI and retained full witnesses/transcripts; candidate additionally pays cold build/load/all finite controls.", + "mode": "candidate", + "native_calls": { + "complement_fallback": 0, + "complement_native": 238685, + "gram_fallback": 0, + "gram_native": 59959 + }, + "native_predecessor_pr": 5929, + "phases": { + "all_native_finite_independent_controls": { + "calls": 1, + "cpu_seconds_with_children": 1.227425, + "wall_seconds": 1.2275855469924863 + }, + "checks_initialization": { + "calls": 1, + "cpu_seconds_with_children": 7.700000000010476e-05, + "wall_seconds": 7.611099863424897e-05 + }, + "cold_certify_import": { + "calls": 1, + "cpu_seconds_with_children": 0.005416000000000087, + "wall_seconds": 0.005415920983068645 + }, + "cold_compile_link_load": { + "calls": 1, + "cpu_seconds_with_children": 0.21777799999999997, + "wall_seconds": 0.21753678898676299 + }, + "cold_complex_module_load": { + "calls": 1, + "cpu_seconds_with_children": 0.006381000000000192, + "wall_seconds": 0.006378763006068766 + }, + "cold_engine_import": { + "calls": 1, + "cpu_seconds_with_children": 0.03850099999999995, + "wall_seconds": 0.03850089298794046 + }, + "cold_prepare_import": { + "calls": 1, + "cpu_seconds_with_children": 0.003942999999999808, + "wall_seconds": 0.003940455993870273 + }, + "compile_roles": { + "calls": 1, + "cpu_seconds_with_children": 0.4549339999999993, + "wall_seconds": 0.4549829850147944 + }, + "complete_original_cli": { + "calls": 1, + "cpu_seconds_with_children": 27.925429, + "wall_seconds": 29.078367923997575 + }, + "engine_custody": { + "calls": 1, + "cpu_seconds_with_children": 0.0017240000000000033, + "wall_seconds": 0.0017239000007975847 + }, + "fresh_engine_copy": { + "calls": 1, + "cpu_seconds_with_children": 0.0015730000000000466, + "wall_seconds": 0.0015719660150352865 + }, + "fresh_root_copy": { + "calls": 1, + "cpu_seconds_with_children": 0.006025000000000058, + "wall_seconds": 0.006023566995281726 + }, + "full_log_integer_bounds": { + "calls": 1, + "cpu_seconds_with_children": 0.0006140000000023349, + "wall_seconds": 0.0006134730065241456 + }, + "identical_lossless_side_serialization": { + "calls": 1, + "cpu_seconds_with_children": 1.2417860000000047, + "wall_seconds": 1.2523431289882865 + }, + "input_custody": { + "calls": 1, + "cpu_seconds_with_children": 0.007376999999999967, + "wall_seconds": 0.007374856009846553 + }, + "original_serializable": { + "calls": 1, + "cpu_seconds_with_children": 0.00021699999999924557, + "wall_seconds": 0.00021787398145534098 + }, + "original_upstream_verify_sources": { + "calls": 1, + "cpu_seconds_with_children": 0.003420000000001977, + "wall_seconds": 0.0034182759991381317 + }, + "side_construction": { + "calls": 1, + "cpu_seconds_with_children": 2.0518059999999996, + "wall_seconds": 2.051926429994637 + }, + "verify_labels": { + "calls": 1, + "cpu_seconds_with_children": 16.505060999999998, + "wall_seconds": 17.133974119002232 + }, + "verify_map": { + "calls": 1, + "cpu_seconds_with_children": 7.600691000000002, + "wall_seconds": 8.117029485991225 + }, + "verify_role_frames": { + "calls": 1, + "cpu_seconds_with_children": 1.2754340000000006, + "wall_seconds": 1.2829192350036465 + } + }, + "private_root_permission": "runtime-root is0755; copied input file modes are retained and checked; immutable stages are never chmodded", + "process_and_compiler_cpu_seconds_before_receipt": 31.547, + "process_wall_seconds_before_receipt": 32.53604939501383, + "science": { + "full_cli_certificate_sha256": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f", + "full_cli_stdout_sha256": "8f77b724810ec05fb19b35d75d8002d31a6e22ed342a36ee28a5caef8d643015", + "full_return_lossless_sha256": "542e4fd73d38b88122d1bf0fffa5f3b092cc4681a14012162daef47e89363cfd", + "ordered_complements": { + "calls": 238685, + "canonical_stream_bytes": 55839507, + "schema": "v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors", + "sha256": "7dec2bf33303c37e1c699609e83768d61df7e19104d34a26a148f66d5ccc4838" + }, + "side": { + "exact_witness_sha256": "4b170c1dbfc33c7cb141a2284c6fd69eac7b6d100971d3e9ee625502b5893f82", + "rank_call_count": 59959, + "rank_distinct_matrix_count": 252, + "rank_trace_sha256": "85006ca332bbc57c2ba9fd06f61a0281d4cee600c9f3b449342379bf2aedec8f", + "result_sha256": "342e99212b12e518902ae9598613f5484113bacee8747c27a13b58a4b1d3986c", + "serialized_bytes": { + "rank_trace": 2674272, + "result": 527, + "witness": 58143622 + } + }, + "upstream_commit": "adc7f1241b42e322a6451854ab7e4b4c146bf78a" + }, + "scientific_imports": { + "audit_short_guards": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C3/runtime-root/scripts/audit_short_guards.py", + "certify": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C3/runtime-root/scripts/certify.py", + "compact_control_layer": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C3/runtime-root/scripts/compact_control_layer.py", + "complex_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C3/engine/source/complex_circuit.py", + "exclusion_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C3/runtime-root/scripts/exclusion_circuit.py", + "paired_exclusion_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C3/runtime-root/scripts/paired_exclusion_circuit.py", + "paired_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C3/runtime-root/scripts/paired_network.py", + "prepare_layers": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C3/runtime-root/scripts/prepare_layers.py", + "search_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C3/runtime-root/scripts/search_network.py", + "shared_point_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C3/runtime-root/scripts/shared_point_circuit.py", + "shared_point_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/full-C3/runtime-root/scripts/shared_point_network.py" + }, + "scope": "Complete frozen historical complex-network CLI with retained observations; conditional certificate only. No bare-CLI factor, selected-frontier, new kappa or PR5864 speed claim.", + "source_pin_sha256": "88bba3caf5975f30fa7abceaea9454110cf3b069233e8241a2ca13d1dff171a7", + "status": "FULL_NETWORK_COMPLETE_PASS" +} diff --git a/research/gf2-full-network/evidence/runs/full-network-C3/stderr.txt b/research/gf2-full-network/evidence/runs/full-network-C3/stderr.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/research/gf2-full-network/evidence/runs/full-network-C3/stdout.txt b/research/gf2-full-network/evidence/runs/full-network-C3/stdout.txt new file mode 100644 index 0000000000..c3183c9551 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-C3/stdout.txt @@ -0,0 +1,3 @@ +PASS conditional 59/100000000000 > 2^-31; minimum margin 14779261/25000000000000000 +Side roles per invocation 108195 vs original 3693800 +{"cpu_seconds_with_compiler": 31.547, "mode": "candidate", "phases": {"all_native_finite_independent_controls": {"calls": 1, "cpu_seconds_with_children": 1.227425, "wall_seconds": 1.2275855469924863}, "checks_initialization": {"calls": 1, "cpu_seconds_with_children": 7.700000000010476e-05, "wall_seconds": 7.611099863424897e-05}, "cold_certify_import": {"calls": 1, "cpu_seconds_with_children": 0.005416000000000087, "wall_seconds": 0.005415920983068645}, "cold_compile_link_load": {"calls": 1, "cpu_seconds_with_children": 0.21777799999999997, "wall_seconds": 0.21753678898676299}, "cold_complex_module_load": {"calls": 1, "cpu_seconds_with_children": 0.006381000000000192, "wall_seconds": 0.006378763006068766}, "cold_engine_import": {"calls": 1, "cpu_seconds_with_children": 0.03850099999999995, "wall_seconds": 0.03850089298794046}, "cold_prepare_import": {"calls": 1, "cpu_seconds_with_children": 0.003942999999999808, "wall_seconds": 0.003940455993870273}, "compile_roles": {"calls": 1, "cpu_seconds_with_children": 0.4549339999999993, "wall_seconds": 0.4549829850147944}, "complete_original_cli": {"calls": 1, "cpu_seconds_with_children": 27.925429, "wall_seconds": 29.078367923997575}, "engine_custody": {"calls": 1, "cpu_seconds_with_children": 0.0017240000000000033, "wall_seconds": 0.0017239000007975847}, "fresh_engine_copy": {"calls": 1, "cpu_seconds_with_children": 0.0015730000000000466, "wall_seconds": 0.0015719660150352865}, "fresh_root_copy": {"calls": 1, "cpu_seconds_with_children": 0.006025000000000058, "wall_seconds": 0.006023566995281726}, "full_log_integer_bounds": {"calls": 1, "cpu_seconds_with_children": 0.0006140000000023349, "wall_seconds": 0.0006134730065241456}, "identical_lossless_side_serialization": {"calls": 1, "cpu_seconds_with_children": 1.2417860000000047, "wall_seconds": 1.2523431289882865}, "input_custody": {"calls": 1, "cpu_seconds_with_children": 0.007376999999999967, "wall_seconds": 0.007374856009846553}, "original_serializable": {"calls": 1, "cpu_seconds_with_children": 0.00021699999999924557, "wall_seconds": 0.00021787398145534098}, "original_upstream_verify_sources": {"calls": 1, "cpu_seconds_with_children": 0.003420000000001977, "wall_seconds": 0.0034182759991381317}, "side_construction": {"calls": 1, "cpu_seconds_with_children": 2.0518059999999996, "wall_seconds": 2.051926429994637}, "verify_labels": {"calls": 1, "cpu_seconds_with_children": 16.505060999999998, "wall_seconds": 17.133974119002232}, "verify_map": {"calls": 1, "cpu_seconds_with_children": 7.600691000000002, "wall_seconds": 8.117029485991225}, "verify_role_frames": {"calls": 1, "cpu_seconds_with_children": 1.2754340000000006, "wall_seconds": 1.2829192350036465}}, "science": {"full_cli_certificate_sha256": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f", "full_cli_stdout_sha256": "8f77b724810ec05fb19b35d75d8002d31a6e22ed342a36ee28a5caef8d643015", "full_return_lossless_sha256": "542e4fd73d38b88122d1bf0fffa5f3b092cc4681a14012162daef47e89363cfd", "ordered_complements": {"calls": 238685, "canonical_stream_bytes": 55839507, "schema": "v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors", "sha256": "7dec2bf33303c37e1c699609e83768d61df7e19104d34a26a148f66d5ccc4838"}, "side": {"exact_witness_sha256": "4b170c1dbfc33c7cb141a2284c6fd69eac7b6d100971d3e9ee625502b5893f82", "rank_call_count": 59959, "rank_distinct_matrix_count": 252, "rank_trace_sha256": "85006ca332bbc57c2ba9fd06f61a0281d4cee600c9f3b449342379bf2aedec8f", "result_sha256": "342e99212b12e518902ae9598613f5484113bacee8747c27a13b58a4b1d3986c", "serialized_bytes": {"rank_trace": 2674272, "result": 527, "witness": 58143622}}, "upstream_commit": "adc7f1241b42e322a6451854ab7e4b4c146bf78a"}, "status": "FULL_NETWORK_COMPLETE_PASS", "wall_seconds": 32.53604939501383} diff --git a/research/gf2-full-network/evidence/runs/full-network-C3/usage.json b/research/gf2-full-network/evidence/runs/full-network-C3/usage.json new file mode 100644 index 0000000000..86c76faa83 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-C3/usage.json @@ -0,0 +1 @@ +{"user_seconds":31.58,"system_seconds":0.34,"kernel_max_rss_kib":453752,"exit":0} diff --git a/research/gf2-full-network/evidence/runs/full-network-profile-v1/receipt.json b/research/gf2-full-network/evidence/runs/full-network-profile-v1/receipt.json new file mode 100644 index 0000000000..28c09234c4 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-profile-v1/receipt.json @@ -0,0 +1,23 @@ +{ + "exit": 1, + "label": "full-network-profile-v1", + "optimized": false, + "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]", + "runner_sha256": "7540f8cc4ae4d12ed86c844ef0837a74184d3ada653979608c295c09f200a751", + "runtime_policy_sha256": "499fa281b148ac532a30c3045952553e415b82c7149c3a9be09048ceb4a510a5", + "sampled_process_group_rss_bytes": 40812544, + "script": "stages/profile-v1/profile.py", + "source_bytes_and_modes_unchanged": true, + "source_inventory_sha256": "6aea2934cd09fa090b820ab4c6a7ce8a214422714c76eeaad36248236047c1cb", + "status": "STOP", + "stderr_bytes": 3199, + "stderr_sha256": "d4a8ee4b536eefd9269d82bf2d3821971a2f9e3bac20c6a720249eaf11746b76", + "stdout_bytes": 0, + "stdout_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "termination": null, + "usage": { + "raw": "Command exited with non-zero status 1\n{\"user_seconds\":0.80,\"system_seconds\":0.03,\"kernel_max_rss_kib\":38804,\"exit\":1}\n" + }, + "wall_seconds": 0.9764375559752807 +} diff --git a/research/gf2-full-network/evidence/runs/full-network-profile-v1/stderr.txt b/research/gf2-full-network/evidence/runs/full-network-profile-v1/stderr.txt new file mode 100644 index 0000000000..c5f9a90710 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-profile-v1/stderr.txt @@ -0,0 +1,38 @@ +Traceback (most recent call last): + File "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/stages/profile-v1/profile.py", line 6, in + runpy.run_path(str(root/'full_driver.py'),run_name='__main__') + File "", line 286, in run_path + File "", line 98, in _run_module_code + File "", line 88, in _run_code + File "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/stages/profile-v1/full_driver.py", line 356, in + main() + File "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/stages/profile-v1/full_driver.py", line 200, in main + comparison = importlib.import_module("compare_side_verifier") + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module + return _bootstrap._gcd_import(name[level:], package, level) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "", line 1387, in _gcd_import + File "", line 1360, in _find_and_load + File "", line 1331, in _find_and_load_unlocked + File "", line 935, in _load_unlocked + File "", line 995, in exec_module + File "", line 488, in _call_with_frames_removed + File "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/profile-v1/engine/compare_side_verifier.py", line 24, in + from profile_side_verifier import canonical, source_check + File "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/profile-v1/engine/profile_side_verifier.py", line 13, in + import cProfile + File "/usr/lib/python3.12/cProfile.py", line 12, in + import profile as _pyprofile + File "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/stages/profile-v1/profile.py", line 6, in + runpy.run_path(str(root/'full_driver.py'),run_name='__main__') + File "", line 286, in run_path + File "", line 98, in _run_module_code + File "", line 88, in _run_code + File "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/stages/profile-v1/full_driver.py", line 356, in + main() + File "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/stages/profile-v1/full_driver.py", line 149, in main + need(not output.exists(), "Refusing to overwrite run evidence") + File "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/stages/profile-v1/full_driver.py", line 56, in need + raise RuntimeError(message) +RuntimeError: Refusing to overwrite run evidence diff --git a/research/gf2-full-network/evidence/runs/full-network-profile-v1/stdout.txt b/research/gf2-full-network/evidence/runs/full-network-profile-v1/stdout.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/research/gf2-full-network/evidence/runs/full-network-profile-v1/usage.json b/research/gf2-full-network/evidence/runs/full-network-profile-v1/usage.json new file mode 100644 index 0000000000..c1fe890de9 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-profile-v1/usage.json @@ -0,0 +1,2 @@ +Command exited with non-zero status 1 +{"user_seconds":0.80,"system_seconds":0.03,"kernel_max_rss_kib":38804,"exit":1} diff --git a/research/gf2-full-network/evidence/runs/full-network-profile-v2/receipt.json b/research/gf2-full-network/evidence/runs/full-network-profile-v2/receipt.json new file mode 100644 index 0000000000..ff4e727436 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-profile-v2/receipt.json @@ -0,0 +1,26 @@ +{ + "exit": 0, + "label": "full-network-profile-v2", + "optimized": false, + "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]", + "runner_sha256": "7540f8cc4ae4d12ed86c844ef0837a74184d3ada653979608c295c09f200a751", + "runtime_policy_sha256": "039539e0dc0f27c28ed81bf7c5310d56ea14dca255f931031a9ac4477ab8f809", + "sampled_process_group_rss_bytes": 407506944, + "script": "stages/profile-v2/full_profile_entry.py", + "source_bytes_and_modes_unchanged": true, + "source_inventory_sha256": "c12b49924e90133624033133044a091e3cc582b2e67df13795df3672883ffbd5", + "status": "PASS", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_bytes": 3705, + "stdout_sha256": "33c1a3007fd8c27abbfe2f7cbbda2afc0d9c81a5b1285c899d67b1c2fe2b0dec", + "termination": null, + "usage": { + "exit": 0, + "kernel_max_rss_kib": 453284, + "system_seconds": 0.32, + "user_seconds": 40.51 + }, + "wall_seconds": 40.92687450101948 +} diff --git a/research/gf2-full-network/evidence/runs/full-network-profile-v2/scientific-receipt.json b/research/gf2-full-network/evidence/runs/full-network-profile-v2/scientific-receipt.json new file mode 100644 index 0000000000..2ba8e0c9b8 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-profile-v2/scientific-receipt.json @@ -0,0 +1,355 @@ +{ + "base_commit": "19fdb086ea96af9a9f87936a2b888e10af4ed810", + "build": null, + "compiler_tmpdir": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/profile-v2/compiler-tmp", + "driver_sha256": "0d976d2eb6b845f20d4a3396591a806f966688b88693cd6a5f8a0c9e48925e36", + "engine_custody": { + "compare_side_verifier.py": { + "bytes": 10571, + "mode": 292, + "sha256": "6e507bb0c7e00d090a60289fddb6c55e90c946d0850c42c3c5e3e15c27604a68" + }, + "finite_controls.py": { + "bytes": 23815, + "mode": 292, + "sha256": "df989a831aac43cc1af95169dad8c64a7548760e6e1f96976da996703f2c8f7a" + }, + "native_backend.py": { + "bytes": 20334, + "mode": 292, + "sha256": "e473c38245c3668715b5a78dfe980b2fe3ed0d0c9b8c97c666fbae6ecf1fffd5" + }, + "native_gf2.c": { + "bytes": 7425, + "mode": 292, + "sha256": "e9c3c9194a08718bd1575c1cf08c6c6772d3b644c2e274c25a84a1f9249d06cc" + }, + "profile_side_verifier.py": { + "bytes": 8959, + "mode": 292, + "sha256": "9c994378171c20a91539418d93cb8387e1daa93465d6862beefea90e12999c2a" + }, + "source/complex_circuit.py": { + "bytes": 19732, + "mode": 292, + "sha256": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1" + }, + "source/complex_network.py": { + "bytes": 6105, + "mode": 292, + "sha256": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b" + } + }, + "environment": { + "executable": "/usr/bin/python3.12", + "platform": "linux", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]" + }, + "finite_controls": null, + "frozen_custody": { + "scripts/audit_short_guards.py": { + "bytes": 7956, + "mode": 292, + "sha256": "c2c929c956e617bee739963b517b9069e0d067cfebc6820f401a4e90a1769eb1" + }, + "scripts/certify.py": { + "bytes": 11276, + "mode": 292, + "sha256": "2348d95008276c5d5764f7e028c3918e484582cd589bd4d9b82919161745e53e" + }, + "scripts/compact_control_layer.py": { + "bytes": 7892, + "mode": 292, + "sha256": "e814c9f8d84f2e5d3aa2e06c36697f27f110218addc40ff8df2801fde861ff9f" + }, + "scripts/complex_circuit.py": { + "bytes": 19732, + "mode": 292, + "sha256": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1" + }, + "scripts/complex_network.py": { + "bytes": 6105, + "mode": 292, + "sha256": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b" + }, + "scripts/exclusion_circuit.py": { + "bytes": 9450, + "mode": 292, + "sha256": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3" + }, + "scripts/paired_exclusion_circuit.py": { + "bytes": 2289, + "mode": 292, + "sha256": "8f05f04cf06217befd6d0ee0f2d7d0c5c5eb32cfab8c9a8ca7917fd6d620b7d2" + }, + "scripts/paired_network.py": { + "bytes": 4933, + "mode": 292, + "sha256": "991223dc3c1374284c361ed017e42bf732dd971fa0bea2be2282cfb18257b3f7" + }, + "scripts/prepare_layers.py": { + "bytes": 8196, + "mode": 292, + "sha256": "a6e2adc612f264b1c0e51d18ce6315de9ae5e2ae2420aa22e99a22d8bf304947" + }, + "scripts/search_network.py": { + "bytes": 4314, + "mode": 292, + "sha256": "3a4faa5037d9b8e7ca5828afac193a96b6966a8b114f14937921795b24ec4f6a" + }, + "scripts/shared_point_circuit.py": { + "bytes": 13167, + "mode": 292, + "sha256": "360d9bffc0f55315fe294789b72c71c79e0991524555b3a5f42a2ca504d7da95" + }, + "scripts/shared_point_network.py": { + "bytes": 3119, + "mode": 292, + "sha256": "a85e7f0d8c42d6a27e3846308571ca324a1824ac5c2d59e4daa5c7673c33c697" + }, + "upstream/LICENSE": { + "bytes": 11357, + "mode": 292, + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + "upstream/README.md": { + "bytes": 541, + "mode": 292, + "sha256": "8d1ceff898a4e0e681679f91c4def485820be9e99f04e4861f2ce601a364723e" + }, + "upstream/build/figures/multiplication-flow.tex": { + "bytes": 847, + "mode": 292, + "sha256": "3654d2728b0c98919d61760e1802804ed616546a747f9167a93e17bb8697f320" + }, + "upstream/build/figures/proof-map.tex": { + "bytes": 524, + "mode": 292, + "sha256": "76d4deacf07bea355412abcfd798c7cbe6dcccef29a4a420a9e2a7b158f23848" + }, + "upstream/build/main.tex": { + "bytes": 1882, + "mode": 292, + "sha256": "42f0f506976bc2084374a71e97edc1549689a7accf35dda4db2a18af4f13c1aa" + }, + "upstream/build/references.bib": { + "bytes": 9790, + "mode": 292, + "sha256": "33cc2df13ccf85330849e8fb34d4ac7613b23f625787457a5b7b9aa6d7369476" + }, + "upstream/build/sections/00-introduction.tex": { + "bytes": 11515, + "mode": 292, + "sha256": "98721f03682ccf1cc7d0850b07adabaa2d8f3afe552e3861753eba9d284d0da0" + }, + "upstream/build/sections/01-history.tex": { + "bytes": 9689, + "mode": 292, + "sha256": "798956c8150c31e3e2f5f29c47110d25ce619faad1374f4d3a0f15fa3ee33ead" + }, + "upstream/build/sections/02-streams.tex": { + "bytes": 11311, + "mode": 292, + "sha256": "606c80db61cad13aa0c3b6060dc4b88dbbe7ac60cdd831aa93f28d908fd09dab" + }, + "upstream/build/sections/03-motifs.tex": { + "bytes": 31874, + "mode": 292, + "sha256": "ed76761194988a01af77ead0ea6469cb5dcd29690ab985a0b5a4006b0f2b69bb" + }, + "upstream/build/sections/04-swap.tex": { + "bytes": 19884, + "mode": 292, + "sha256": "412b170ccaab38dba96e95e3cbfae09f4876a9818f8d278776a746b0f8044906" + }, + "upstream/build/sections/05-layers.tex": { + "bytes": 46811, + "mode": 292, + "sha256": "20cfc8d12099d4e4ed9e3e7eeb6162edd9b6e0e076f24693364cd24377252594" + }, + "upstream/build/sections/06-transforms.tex": { + "bytes": 33854, + "mode": 292, + "sha256": "924316e4bc905066281d8f9e8746a49d8829aeb393688608deb1e61c3c87853c" + }, + "upstream/build/sections/07-resampling.tex": { + "bytes": 22053, + "mode": 292, + "sha256": "8a6b91670f9163afb54892489fa2210c77fe1b058f0325ec7d18b44b94be6e2c" + }, + "upstream/build/sections/08-assembly.tex": { + "bytes": 46444, + "mode": 292, + "sha256": "763d7945b1e1ec4ebae9b799bcefcc45fa9bae6e2ffad799868a9c3d513dbd4a" + }, + "upstream/build/sections/09-exact-arithmetic.tex": { + "bytes": 6950, + "mode": 292, + "sha256": "5714e5d0656c78c6a1fde8d01fd11f1ba856a7ea94149b283bd9a50fdbf516c3" + }, + "upstream/build/sections/10-transposition.tex": { + "bytes": 2398, + "mode": 292, + "sha256": "c14ad8d56112f6578678a58211bc8d63c3a4b60e55078ac73bc38f7348e713cb" + }, + "upstream/build/sections/11-grouped-rectangles.tex": { + "bytes": 7405, + "mode": 292, + "sha256": "6525cd0a01980e56accfeaf06e9d875bc699197ba42c6e22b69435e352275174" + }, + "upstream/formalization.yaml": { + "bytes": 73925, + "mode": 292, + "sha256": "2dcbd0d6e6a22475f53d49bfdfcac9b6d2b470653c332a9f56522f5be166edb9" + }, + "upstream/manifest.json": { + "bytes": 6217, + "mode": 292, + "sha256": "16ab13971694cabab09440c47ebf2fc0496a9d35fc3af33950fda3498f8e2392" + } + }, + "measurement": "Parent outer guard is authoritative. Phases are nested observations, not additive costs. Profile is excluded from performance selection. Every timed arm includes copies, source checks, original CLI and retained full witnesses/transcripts; candidate additionally pays cold build/load/all finite controls.", + "mode": "profile", + "native_calls": null, + "native_predecessor_pr": 5929, + "phases": { + "checks_initialization": { + "calls": 1, + "cpu_seconds_with_children": 7.700000000010476e-05, + "wall_seconds": 7.630701293237507e-05 + }, + "cold_certify_import": { + "calls": 1, + "cpu_seconds_with_children": 0.0048819999999999975, + "wall_seconds": 0.004881600005319342 + }, + "cold_complex_module_load": { + "calls": 1, + "cpu_seconds_with_children": 0.007469999999999977, + "wall_seconds": 0.007469646981917322 + }, + "cold_engine_import": { + "calls": 1, + "cpu_seconds_with_children": 0.031227000000000005, + "wall_seconds": 0.031225840997649357 + }, + "cold_prepare_import": { + "calls": 1, + "cpu_seconds_with_children": 0.00351900000000005, + "wall_seconds": 0.003515991003951058 + }, + "compile_roles": { + "calls": 1, + "cpu_seconds_with_children": 0.46021199999999984, + "wall_seconds": 0.46021310400101356 + }, + "complete_original_cli": { + "calls": 1, + "cpu_seconds_with_children": 38.413862, + "wall_seconds": 38.45578884801944 + }, + "engine_custody": { + "calls": 1, + "cpu_seconds_with_children": 0.0013130000000000086, + "wall_seconds": 0.0013116140034981072 + }, + "fresh_engine_copy": { + "calls": 1, + "cpu_seconds_with_children": 0.0010519999999999974, + "wall_seconds": 0.0010504020028747618 + }, + "fresh_root_copy": { + "calls": 1, + "cpu_seconds_with_children": 0.00469799999999998, + "wall_seconds": 0.004696172982221469 + }, + "full_log_integer_bounds": { + "calls": 1, + "cpu_seconds_with_children": 0.0004249999999998977, + "wall_seconds": 0.0004239009867887944 + }, + "identical_lossless_side_serialization": { + "calls": 1, + "cpu_seconds_with_children": 1.1930289999999957, + "wall_seconds": 1.1958469099772628 + }, + "input_custody": { + "calls": 1, + "cpu_seconds_with_children": 0.006013999999999964, + "wall_seconds": 0.006014826009050012 + }, + "original_serializable": { + "calls": 1, + "cpu_seconds_with_children": 0.0001580000000060977, + "wall_seconds": 0.00016135399346239865 + }, + "original_upstream_verify_sources": { + "calls": 1, + "cpu_seconds_with_children": 0.0022060000000010405, + "wall_seconds": 0.0022053630091249943 + }, + "side_construction": { + "calls": 1, + "cpu_seconds_with_children": 1.9314599999999997, + "wall_seconds": 1.9318207079777494 + }, + "verify_labels": { + "calls": 1, + "cpu_seconds_with_children": 28.392512000000004, + "wall_seconds": 28.431476872006897 + }, + "verify_map": { + "calls": 1, + "cpu_seconds_with_children": 5.667751999999998, + "wall_seconds": 5.669881440990139 + }, + "verify_role_frames": { + "calls": 1, + "cpu_seconds_with_children": 1.9336330000000004, + "wall_seconds": 1.9340399659995455 + } + }, + "private_root_permission": "runtime-root is0755; copied input file modes are retained and checked; immutable stages are never chmodded", + "process_and_compiler_cpu_seconds_before_receipt": 40.46915, + "process_wall_seconds_before_receipt": 40.33484589200816, + "science": { + "full_cli_certificate_sha256": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f", + "full_cli_stdout_sha256": "8f77b724810ec05fb19b35d75d8002d31a6e22ed342a36ee28a5caef8d643015", + "full_return_lossless_sha256": "542e4fd73d38b88122d1bf0fffa5f3b092cc4681a14012162daef47e89363cfd", + "ordered_complements": { + "calls": 238685, + "canonical_stream_bytes": 55839507, + "schema": "v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors", + "sha256": "7dec2bf33303c37e1c699609e83768d61df7e19104d34a26a148f66d5ccc4838" + }, + "side": { + "exact_witness_sha256": "4b170c1dbfc33c7cb141a2284c6fd69eac7b6d100971d3e9ee625502b5893f82", + "rank_call_count": 59959, + "rank_distinct_matrix_count": 252, + "rank_trace_sha256": "85006ca332bbc57c2ba9fd06f61a0281d4cee600c9f3b449342379bf2aedec8f", + "result_sha256": "342e99212b12e518902ae9598613f5484113bacee8747c27a13b58a4b1d3986c", + "serialized_bytes": { + "rank_trace": 2674272, + "result": 527, + "witness": 58143622 + } + }, + "upstream_commit": "adc7f1241b42e322a6451854ab7e4b4c146bf78a" + }, + "scientific_imports": { + "audit_short_guards": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/profile-v2/runtime-root/scripts/audit_short_guards.py", + "certify": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/profile-v2/runtime-root/scripts/certify.py", + "compact_control_layer": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/profile-v2/runtime-root/scripts/compact_control_layer.py", + "complex_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/profile-v2/engine/source/complex_circuit.py", + "exclusion_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/profile-v2/runtime-root/scripts/exclusion_circuit.py", + "paired_exclusion_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/profile-v2/runtime-root/scripts/paired_exclusion_circuit.py", + "paired_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/profile-v2/runtime-root/scripts/paired_network.py", + "prepare_layers": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/profile-v2/runtime-root/scripts/prepare_layers.py", + "search_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/profile-v2/runtime-root/scripts/search_network.py", + "shared_point_circuit": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/profile-v2/runtime-root/scripts/shared_point_circuit.py", + "shared_point_network": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/gf2-full-network-20261028/runtime/artifacts/profile-v2/runtime-root/scripts/shared_point_network.py" + }, + "scope": "Complete frozen historical complex-network CLI with retained observations; conditional certificate only. No bare-CLI factor, selected-frontier, new kappa or PR5864 speed claim.", + "source_pin_sha256": "88bba3caf5975f30fa7abceaea9454110cf3b069233e8241a2ca13d1dff171a7", + "status": "FULL_NETWORK_PROFILE_ANCHOR_PASS" +} diff --git a/research/gf2-full-network/evidence/runs/full-network-profile-v2/stderr.txt b/research/gf2-full-network/evidence/runs/full-network-profile-v2/stderr.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/research/gf2-full-network/evidence/runs/full-network-profile-v2/stdout.txt b/research/gf2-full-network/evidence/runs/full-network-profile-v2/stdout.txt new file mode 100644 index 0000000000..0f2be38159 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-profile-v2/stdout.txt @@ -0,0 +1,3 @@ +PASS conditional 59/100000000000 > 2^-31; minimum margin 14779261/25000000000000000 +Side roles per invocation 108195 vs original 3693800 +{"cpu_seconds_with_compiler": 40.46915, "mode": "profile", "phases": {"checks_initialization": {"calls": 1, "cpu_seconds_with_children": 7.700000000010476e-05, "wall_seconds": 7.630701293237507e-05}, "cold_certify_import": {"calls": 1, "cpu_seconds_with_children": 0.0048819999999999975, "wall_seconds": 0.004881600005319342}, "cold_complex_module_load": {"calls": 1, "cpu_seconds_with_children": 0.007469999999999977, "wall_seconds": 0.007469646981917322}, "cold_engine_import": {"calls": 1, "cpu_seconds_with_children": 0.031227000000000005, "wall_seconds": 0.031225840997649357}, "cold_prepare_import": {"calls": 1, "cpu_seconds_with_children": 0.00351900000000005, "wall_seconds": 0.003515991003951058}, "compile_roles": {"calls": 1, "cpu_seconds_with_children": 0.46021199999999984, "wall_seconds": 0.46021310400101356}, "complete_original_cli": {"calls": 1, "cpu_seconds_with_children": 38.413862, "wall_seconds": 38.45578884801944}, "engine_custody": {"calls": 1, "cpu_seconds_with_children": 0.0013130000000000086, "wall_seconds": 0.0013116140034981072}, "fresh_engine_copy": {"calls": 1, "cpu_seconds_with_children": 0.0010519999999999974, "wall_seconds": 0.0010504020028747618}, "fresh_root_copy": {"calls": 1, "cpu_seconds_with_children": 0.00469799999999998, "wall_seconds": 0.004696172982221469}, "full_log_integer_bounds": {"calls": 1, "cpu_seconds_with_children": 0.0004249999999998977, "wall_seconds": 0.0004239009867887944}, "identical_lossless_side_serialization": {"calls": 1, "cpu_seconds_with_children": 1.1930289999999957, "wall_seconds": 1.1958469099772628}, "input_custody": {"calls": 1, "cpu_seconds_with_children": 0.006013999999999964, "wall_seconds": 0.006014826009050012}, "original_serializable": {"calls": 1, "cpu_seconds_with_children": 0.0001580000000060977, "wall_seconds": 0.00016135399346239865}, "original_upstream_verify_sources": {"calls": 1, "cpu_seconds_with_children": 0.0022060000000010405, "wall_seconds": 0.0022053630091249943}, "side_construction": {"calls": 1, "cpu_seconds_with_children": 1.9314599999999997, "wall_seconds": 1.9318207079777494}, "verify_labels": {"calls": 1, "cpu_seconds_with_children": 28.392512000000004, "wall_seconds": 28.431476872006897}, "verify_map": {"calls": 1, "cpu_seconds_with_children": 5.667751999999998, "wall_seconds": 5.669881440990139}, "verify_role_frames": {"calls": 1, "cpu_seconds_with_children": 1.9336330000000004, "wall_seconds": 1.9340399659995455}}, "science": {"full_cli_certificate_sha256": "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f", "full_cli_stdout_sha256": "8f77b724810ec05fb19b35d75d8002d31a6e22ed342a36ee28a5caef8d643015", "full_return_lossless_sha256": "542e4fd73d38b88122d1bf0fffa5f3b092cc4681a14012162daef47e89363cfd", "ordered_complements": {"calls": 238685, "canonical_stream_bytes": 55839507, "schema": "v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors", "sha256": "7dec2bf33303c37e1c699609e83768d61df7e19104d34a26a148f66d5ccc4838"}, "side": {"exact_witness_sha256": "4b170c1dbfc33c7cb141a2284c6fd69eac7b6d100971d3e9ee625502b5893f82", "rank_call_count": 59959, "rank_distinct_matrix_count": 252, "rank_trace_sha256": "85006ca332bbc57c2ba9fd06f61a0281d4cee600c9f3b449342379bf2aedec8f", "result_sha256": "342e99212b12e518902ae9598613f5484113bacee8747c27a13b58a4b1d3986c", "serialized_bytes": {"rank_trace": 2674272, "result": 527, "witness": 58143622}}, "upstream_commit": "adc7f1241b42e322a6451854ab7e4b4c146bf78a"}, "status": "FULL_NETWORK_PROFILE_ANCHOR_PASS", "wall_seconds": 40.33484589200816} diff --git a/research/gf2-full-network/evidence/runs/full-network-profile-v2/usage.json b/research/gf2-full-network/evidence/runs/full-network-profile-v2/usage.json new file mode 100644 index 0000000000..07f437a5d5 --- /dev/null +++ b/research/gf2-full-network/evidence/runs/full-network-profile-v2/usage.json @@ -0,0 +1 @@ +{"user_seconds":40.51,"system_seconds":0.32,"kernel_max_rss_kib":453284,"exit":0} diff --git a/research/gf2-full-network/frozen/scripts/audit_short_guards.py b/research/gf2-full-network/frozen/scripts/audit_short_guards.py new file mode 100644 index 0000000000..e5c52c8afe --- /dev/null +++ b/research/gf2-full-network/frozen/scripts/audit_short_guards.py @@ -0,0 +1,183 @@ +#!/usr/bin/env python3 +"""Short working guards and an explicit, still-unproved gathering target. + +The packed gadget and address permutation are checked exactly. No fast tape +implementation of gathering is claimed; independent window moves are linear +in the number of windows and do not achieve the required saving. +""" +from fractions import Fraction as Q +from pathlib import Path +import json + +from certify import require, verify_sources +from prepare_layers import serializable, scenarios + +ROOT=Path(__file__).resolve().parents[1] +ROTATIONS=(('y',-1,0),('z',-1,0),('y',1,0),('z',1,0), + ('z',1,1),('y',1,1),('z',-1,1),('y',-1,1)) + + +def guard_width(p): + require(isinstance(p,int) and p>=2,'Integer p>=2 required') + return 4*(p-1).bit_length()+6 + + +def gather_order(f,K,rho,g): + """Input bit indices in output low-to-high order for one slot. + + Gather the first f-1 windows into the most significant contiguous field. + Keep the remaining coordinates in relative order in a spectator field. + The highest selected bit is omitted and handled separately after undo. + """ + require(f>=1 and K>=1 and 0<=rho>source)&1)<>target)&1)<>(j*g))&1)<<(j*g) for j in range(n)) + + +def rotate_gadget(x,y,z,n,g,*,inverse=False): + """Eight modular rotations on compact n*g-bit slots, omitting the top bit.""" + require(n>=1 and g>=1,'Nonempty compact slots required') + modulus=1<<(n*g) + state={'y':y,'z':z} + operations=reversed(ROTATIONS) if inverse else ROTATIONS + for target,sign,test in operations: + other=state['z' if target=='y' else 'y'] + offset=sum(1<<(j*g) for j in range(n-1) + if x>>(j*g)&1 and (other>>(j*g)&1)==test) + state[target]=(state[target]+(-sign if inverse else sign)*offset)%modulus + return x,state['y'],state['z'] + + +def exceptional(y,z,n,g): + mask=(1<>(j*g))&mask)//2<=maximum + for slot in (y,z) for j in range(n-1)) + + +def compact_add(x,y,z,n,g): + """Exact address map, including the existing exceptional-set correction. + + This simulates addresses, not a tape implementation or its running time. + For g<6 every guard may be exceptional; those cases are finite controls. + """ + out=rotate_gadget(x,y,z,n,g) + if exceptional(out[1],out[2],n,g): + original=rotate_gadget(*out,n,g,inverse=True) + out=(original[0],original[1]^active_mask(original[0],n-1,g),original[2]) + # Supply the most significant selected bit omitted by the rotations. + top=(n-1)*g + return out[0],out[1]^(((out[0]>>top)&1)<>rho)&1)<>spectator_width for v in packed] + updated=compact_add(*data,n,g) + result=[ungather((new<>top)&1)<= 64*p**4,'Short guard inequality failed') + # Before inserting A<=C*p and R superpolynomial, the bad fraction is + # bounded by 80*f*2^-g <= (5/4)*p^-3. This deliberately overcounts. + fraction=Q(80*f,1<0 and + 0=0,'Invalid exponent hypothesis') + gathering=r+theta*c+(1-beta)*max(sigma-r,Q(0)) + compact=tau+(1-beta)*max(sigma-tau,Q(0)) + leaf=sigma+beta*(1-sigma) + return dict(gathering=gathering,compact_gadget=compact,leaf=leaf, + layer=max(gathering,compact,leaf), + status='IMPLICATION OF AN UNPROVED GATHERING BOUND') + + +def monotone_lengths(permutation): + """Small exact LIS/LDS control; no inference about unrestricted tape time.""" + inc=[1]*len(permutation);dec=[1]*len(permutation) + for i,x in enumerate(permutation): + for j in range(i): + if permutation[j]x:dec[i]=max(dec[i],dec[j]+1) + return max(inc,default=0),max(dec,default=0) + + +def monotone_stream_obstruction(guard_bits,active_bits): + """A restricted transpose inside an extreme-field gathering permutation. + + For A guard values and B active values, any global monotone output stream + contains at most A+B-1 of the AB selected records. This only rules out a + bounded number of one-shot global monotone streams; nested local reversals + and coded tape algorithms are outside this model. + """ + require(guard_bits>=1 and active_bits>=1,'Need two nonempty variable fields') + A,B=1<= 20, "C1 must cover the upstream guard bound") + else: + # Caller must also certify m>=3 and 2<=s_c= 2 and p.beta >= Q(9, 10), + "Stopping guard requires C1>=2 and beta>=9/10") + slacks = constraints(p, layout_model=layout_model, assembly_model=assembly_model) + for name, slack in slacks.items(): + require(slack > 0, f"Failed strict constraint: {name} ({slack})") + gs = margins(p, layout_model=layout_model, assembly_model=assembly_model) + if strict_margin: + require(min(gs.values()) > p.kappa, "Need a positive absorption gap") + else: + require(min(gs.values()) >= 2*p.kappa, + "The proposed patch requires every g_i >= 2*kappa") + result = {"parameters": {k: str(v) for k, v in vars(p).items()}, + "constraint_slacks": {k: str(v) for k, v in slacks.items()}, + "margins": {k: str(v) for k, v in gs.items()}, + "minimum_margin": str(min(gs.values())), + "limiting_margins": [k for k, v in gs.items() if v == min(gs.values())], + "all_margins_at_least_twice_kappa": min(gs.values()) >= 2*p.kappa, + "absorption_gap": str(min(gs.values())-p.kappa), + "slack_rule": "strict" if strict_margin else "half", + "generalized_beta": generalized_beta} + if assembly_model != "original" or guard_model != "original": + result.update(assembly_model=assembly_model, guard_model=guard_model) + return result + + +def network(h): + """Generalized counts only; these do not prove the network interface.""" + require(h > 6 and h != 9, "Need spare coordinates and nondegenerate rational form") + v, m = comb(h, 3), h**3 + N, I = v**3, 3*v**2 + zb, zc = 3*comb(h-3, 2), comb(h-3, 3)+3*(h-3) + Wb, Wc = 2*N+I*(v*zb+h), 2*N+I*(v*zc+h+1) + Lb, Lc = I*h*h, I*(h+1)*h + sb, sc = Wb*m-N+2*Lb, Wc*m-2*N+2*Lc + eb, ec = Q(Wb*m-sb, Wb*m), Q(Wc*m-sc, Wc*m) + E = 64*(Wc+m+1)**3 + B = sc+E + nu = 1 + while m**nu < B: + nu += 1 + return dict(h=h, v=v, m=m, N=N, I=I, zb=zb, zc=zc, + Wb=Wb, Wc=Wc, Lb=Lb, Lc=Lc, sb=sb, sc=sc, + eta_b=eb, eta_c=ec, B=B, nu=nu, C1=max(20, nu+3)) + + +def certify_network(h, k, log_bound): + n = network(h) + # A positive Taylor partial sum below exp(log_bound) proves m n["m"], "Could not certify the logarithm bound") + for key in ("eta_b", "eta_c"): + require(n[key] > log_bound*dyadic(k), f"Insufficient deficit: {key}") + require(2*n["Lb"] < n["N"] and 2*n["Lc"] < n["N"], + "The generalized residual lemma requires L A*LOG_BOUND for key in ("eta_b", "eta_c")), + "Rank deficit does not support the requested rational saving") + certify_network(46, 36, 12) # Residual and guard conditions. + return {"h": 46, "saving": str(A), "log_bound": str(LOG_BOUND), + "log_lower": str(lo), "log_upper": str(hi), + "deficit_slacks": {k: str(n[k]-A*LOG_BOUND) for k in ("eta_b", "eta_c")}} + + +def certificates(): + return { + "upstream_commit": verify_sources(), + "scope": "Exact numerical certificates, conditional on the upstream proof interfaces", + "cases": {name: certify_parameters(p) for name, p in { + "baseline_182": BASELINE, "frozen_154": proposed(50), + "same_network_130": proposed(42), "h46_112": proposed(36), + "balanced_frozen_153": balanced(50), + "balanced_same_network_129": balanced(42), + "balanced_h46_111": balanced(36), + "near_supremum_frozen": near_supremum(50), + "near_supremum_same_network": near_supremum(42), + "near_supremum_h46": near_supremum(36), + }.items()} | { + f"pushed_{v}": certify_parameters(pushed(v), generalized_beta=v != "109", + strict_margin=True) + for v in ("109", "108", "rational") + }, + "networks": { + "baseline_h100": certify_network(100, 50, 20), + "improved_h100": certify_network(100, 42, 14), + "improved_h46": certify_network(46, 36, 12), + "rational_h46": certify_rational_network(), + }, + } + + +if __name__ == "__main__": + result = certificates() + out = ROOT / "certificates/parameters.json" + out.parent.mkdir(exist_ok=True) + out.write_text(json.dumps(result, indent=2, sort_keys=True) + "\n") + for name, case in result["cases"].items(): + print(f"PASS {name}: minimum {case['minimum_margin']} ({', '.join(case['limiting_margins'])})") + print(f"Wrote {out.relative_to(ROOT)}") diff --git a/research/gf2-full-network/frozen/scripts/compact_control_layer.py b/research/gf2-full-network/frozen/scripts/compact_control_layer.py new file mode 100644 index 0000000000..11b2e751bf --- /dev/null +++ b/research/gf2-full-network/frozen/scripts/compact_control_layer.py @@ -0,0 +1,156 @@ +#!/usr/bin/env python3 +"""Exact accounting for the written compact-control layer extension. + +Arithmetic checks accompany, and do not replace, the fixed-tape construction +and proof. Historical witnesses and pinned upstream files are unchanged. +""" +from fractions import Fraction as Q +from pathlib import Path +import hashlib +import json + +from certify import Parameters,constraints,margins,network,require,verify_sources +from paired_network import BIT_SAVING +from prepare_layers import guard,packed_exponents,complex_saving_bounds,serializable +from search_network import log_integer_bounds +from audit_short_guards import guard_width + +ROOT=Path(__file__).resolve().parents[1] +COMPLEX_H=25 +COMPLEX_SAVING=Q(418,10**12) +KAPPA=Q(83,10**12) + + +def ceil_log(n,base): + require(n>=1 and base>=2,'Invalid logarithm') + j=0;power=1 + while power=1 and min(m,W)>=2,'Invalid dimensions') + q0=ceil_log(W,2)*ceil_log(2*d,m) + k0=ceil_log(d,m) + H=d*G + front=(2*H+K-1)//K;back=(H+K-1)//K + reserved=q0+front+back + require(q0*K>=k0*ceil_log(W,2),'Insufficient row divisor capacity') + require(front*K>=2*H and back*K>=H,'Insufficient compact fields') + return dict(d=d,D=D,K=K,G=G,compact_capacity=H,row_chunks=q0, + front_chunks=front,back_chunks=back,reserved_chunks=reserved, + recursion_depth_cap=k0,row_bits=q0*K, + mode='individual' if D<=reserved else 'recursive', + active_chunks=max(0,D-reserved), + preprocessed_chunks=min(D,reserved), + front_slack_bits=front*K-2*H,back_slack_bits=back*K-H) + + +def repair_bound(p,n,K): + require(p>=2 and 0<=n<=p,'Invalid repair family') + G=guard_width(p);ell=(p-1).bit_length() + require(K>=G+4*ell+10,'Use the common eventual cutoff') + delta=Q(2*n,1<0,'Positive spacing growth required') + e=packed_exponents(tau,sigma,beta,c,theta=Q(0)) + return dict(internal=e['internal'],leaf=e['leaf'], + preprocessing=max(Q(0),1-c), + layer=max(e['internal'],e['leaf'],1-c,Q(0))) + + +def parameters(): + return Parameters(tau=1-BIT_SAVING,sigma=1-COMPLEX_SAVING, + epsilon=Q(1999,10000),c=Q(1,5), + lam=1-Q(1671,4*10**12),lamp=1-Q(167,4*10**11), + kappa=KAPPA,beta=Q(1,1000),delta=Q(1,10**6),C1=Q(49961,10000)) + + +def check(p,h=COMPLEX_H,zeta=Q(1,10000)): + require(0<1-p.tau<=BIT_SAVING,'Bit exponent exceeds retained witness') + n=network(h);lo,hi=complex_saving_bounds(h) + require(0<1-p.sigma0,'Compact-control constraint: '+name) + gs=margins(p,layout_model='nonadjacent',assembly_model='tight-gaussian') + require(min(gs.values())>p.kappa,'No final absorption gap') + require(Q(1,2**34)0 for v in cs.values()),'Milestone constraint failed') + gs=margins(p,layout_model='nonadjacent',assembly_model='tight-gaussian') + require(min(gs.values())>p.kappa,'Milestone has no absorption gap') + return dict(parameters=vars(p),guard=g,recurrence=e,constraint_slacks=cs, + minimum_margin=min(gs.values()),absorption_gap=min(gs.values())-p.kappa) + + +def certificate(): + from prepare_layers import scenarios + p=parameters();main=check(p);n=network(COMPLEX_H) + _,log_hi=log_integer_bounds(n['m']) + require(n['eta_c']>COMPLEX_SAVING*log_hi,'Simple exponential comparison failed') + targets={} + for key,h in (('hypothetical_39',50),('hypothetical_34',25)): + old=scenarios()[key] + targets[key.replace('hypothetical_','target_')]=milestone(Parameters(**old['parameters']),h) + hi=complex_saving_bounds(COMPLEX_H)[1] + # The Gaussian margin enforces epsilon<1/5; the leaf margin limits + # 1-lambda' to (1-beta)*a_c 2^-34; proof review required.') diff --git a/research/gf2-full-network/frozen/scripts/complex_circuit.py b/research/gf2-full-network/frozen/scripts/complex_circuit.py new file mode 100644 index 0000000000..9e83a1065c --- /dev/null +++ b/research/gf2-full-network/frozen/scripts/complex_circuit.py @@ -0,0 +1,454 @@ +#!/usr/bin/env python3 +"""Compressed side correction for the complex network, with binary frames. + +Target S must receive (1/2) * sum{x_T : T disjoint from S} +minus (1/2) * sum{x_T : |S cap T| = 2}. Both sums are computed by +cancellation-free addition graphs and injected as pieces with those weights. + +Labels are subspaces of F2^h with the dot product. A disjoint-sum node carries +the coordinate space of its covered points; a pair-star node carries the span +of its triple indicators, which is orthonormal. An injected piece must leave a +point outside S uncovered: the residual up to t_S^perp then contains an odd +coordinate vector. A disjoint piece covering every point outside S would have +the alternating residual , so the disjoint sum is split. +""" +from fractions import Fraction as Q +from itertools import combinations + +EMPTY = frozenset() + + +def subsets(points, k): + return [frozenset(c) for j in range(min(k, len(points))+1) + for c in combinations(points, j)] + + +class ComplexSideCircuit: + def __init__(self, h): + assert h >= 8, 'Need at least four points outside every target' + self.h = h + self.triples = list(combinations(range(h), 3)) + self.index = {t: i for i, t in enumerate(self.triples)} + self.support = [0]; self.args = [None]; self.kind = [None] + self.lookup = {}; self.input = {} + for i, t in enumerate(self.triples): + self.input[t] = len(self.support) + self.support.append(1 << i); self.args.append(None); self.kind.append('in') + self.points = {} # covered point masks, filled lazily + self.pieces = [] # (target, node, coefficient) + self.build_disjoint() + self.build_pair_stars() + self.prune() + + # -- node store ------------------------------------------------------- + def x(self, *pts): + return self.input[tuple(sorted(pts))] + + def add(self, a, b, kind): + if not a: return b + if not b: return a + sa, sb = self.support[a], self.support[b] + assert not sa & sb, 'Cancellation is forbidden' + key = (kind, sa | sb) + node = self.lookup.get(key) + if node is None: + node = len(self.support) + self.lookup[key] = node + self.support.append(sa | sb); self.args.append((a, b)); self.kind.append(kind) + return node + + def total(self, nodes, kind): + nodes = [x for x in nodes if x] + while len(nodes) > 1: + nodes = [self.add(nodes[i], nodes[i+1], kind) if i+1 < len(nodes) else nodes[i] + for i in range(0, len(nodes), 2)] + return nodes[0] if nodes else 0 + + # -- disjoint sums ---------------------------------------------------- + def vec(self, items, k): + """{E: sum of item nodes whose points avoid E}, |E| <= k.""" + if not items: return {EMPTY: 0} + if len(items) == 1: + p, node = items[0] + return {EMPTY: node, frozenset([p]): 0} if k else {EMPTY: node} + half = len(items)//2 + A = self.vec(items[:half], k); B = self.vec(items[half:], k) + return {ea | eb: self.add(xa, xb, 'd0') for ea, xa in A.items() + for eb, xb in B.items() if len(ea)+len(eb) <= k} + + def pairs(self, pts, weight, k): + """{E: sum of weight(u,v) over pairs avoiding E}, |E| <= k.""" + if len(pts) < 2: return {E: 0 for E in subsets(pts, k)} + half = len(pts)//2; L, R = pts[:half], pts[half:] + PL = self.pairs(L, weight, k); PR = self.pairs(R, weight, k) + rows = {u: self.vec([(r, weight(u, r)) for r in R], k) for u in L} + cross = {} + for ER in subsets(R, k): + for EL, node in self.vec([(u, rows[u][ER]) for u in L], k-len(ER)).items(): + cross[EL, ER] = node + return {EL | ER: self.total([xl, xr, cross[EL, ER]], 'd0') + for EL, xl in PL.items() for ER, xr in PR.items() if len(EL)+len(ER) <= k} + + def tri_parts(self, pts, k): + """Recursive halves and the two mixed families, before combination.""" + half = len(pts)//2; L, R = pts[:half], pts[half:] + TL = self.tri(L, k); TR = self.tri(R, k) + PR = {r: self.pairs(L, lambda u, v, r=r: self.x(u, v, r), k) for r in R} + PL = {u: self.pairs(R, lambda a, b, u=u: self.x(u, a, b), k) for u in L} + return L, R, TL, TR, PR, PL + + def tri(self, pts, k): + """{E: sum of triples inside pts avoiding E}, |E| <= k.""" + if len(pts) < 3: return {E: 0 for E in subsets(pts, k)} + L, R, TL, TR, PR, PL = self.tri_parts(pts, k) + c21 = {}; c12 = {} + for EL in subsets(L, k): + for ER, node in self.vec([(r, PR[r][EL]) for r in R], k-len(EL)).items(): + c21[EL, ER] = node + for ER in subsets(R, k): + for EL, node in self.vec([(u, PL[u][ER]) for u in L], k-len(ER)).items(): + c12[EL, ER] = node + return {EL | ER: self.total([xl, xr, c21[EL, ER], c12[EL, ER]], 'd0') + for EL, xl in TL.items() for ER, xr in TR.items() if len(EL)+len(ER) <= k} + + def build_disjoint(self): + """Six pieces per target, each leaving an outside point uncovered.""" + pts = list(range(self.h)) + L, R, TL, TR, PR, PL = self.tri_parts(pts, 3) + R1, R2 = R[:len(R)//2], R[len(R)//2:] + L1, L2 = L[:len(L)//2], L[len(L)//2:] + for S in self.triples: + E = frozenset(S); EL = E & frozenset(L); ER = E & frozenset(R) + pieces = [TL[EL], TR[ER]] + for half in (R1, R2): + pieces.append(self.vec([(r, PR[r][EL]) for r in half], 3-len(EL))[ER & frozenset(half)]) + for half in (L1, L2): + pieces.append(self.vec([(u, PL[u][ER]) for u in half], 3-len(ER))[EL & frozenset(half)]) + for node in pieces: self.emit(S, node, Q(1, 2)) + + # -- pair stars ------------------------------------------------------- + def build_pair_stars(self): + """Prefix and suffix pair-star sums around each excluded third point.""" + h = self.h + for a, b in combinations(range(h), 2): + others = [u for u in range(h) if u not in (a, b)] + n = len(others) + pre = [0] + for u in others: pre.append(self.add(pre[-1], self.x(a, b, u), 'd2')) + suf = [0]*(n+1) + for i in range(n-1, -1, -1): suf[i] = self.add(self.x(a, b, others[i]), suf[i+1], 'd2') + for i, c in enumerate(others): + S = tuple(sorted((a, b, c))) + self.emit(S, pre[i], Q(-1, 2)); self.emit(S, suf[i+1], Q(-1, 2)) + + def emit(self, S, node, coef): + """Inject a piece, splitting it until it leaves a point outside S uncovered.""" + if not node: return + if self.cover(node) | sum(1 << p for p in S) == (1 << self.h)-1: + a, b = self.args[node] + self.emit(S, a, coef); self.emit(S, b, coef) + else: + self.pieces.append((S, node, coef)) + + # -- bookkeeping ------------------------------------------------------ + def prune(self): + self.active = set(); stack = [node for _, node, _ in self.pieces] + while stack: + node = stack.pop() + if node in self.active: continue + self.active.add(node) + if self.args[node]: stack.extend(self.args[node]) + self.additions = sum(self.args[n] is not None for n in self.active) + self.roles = self.additions + len(self.pieces) + + def cover(self, node): + """Mask of ground points covered by the node's source triples.""" + if node not in self.points: + s = self.support[node]; mask = 0 + while s: + low = s & -s; mask |= sum(1 << p for p in self.triples[low.bit_length()-1]); s ^= low + self.points[node] = mask + return self.points[node] + + def stats(self): + v = len(self.triples) + return dict(h=self.h, v=v, additions=self.additions, injections=len(self.pieces), + roles=self.roles, roles_per_target=round(self.roles/v, 3), + disjoint_additions=sum(self.kind[n] == 'd0' for n in self.active), + pair_star_additions=sum(self.kind[n] == 'd2' for n in self.active)) + + +# -- binary linear algebra on F2^h, vectors as integer masks --------------- +def echelon(vectors): + """Reduced basis {pivot bit: vector}; raises on dependence.""" + basis = {} + for x in vectors: + for bit, b in basis.items(): + if x & bit: x ^= b + assert x, 'Dependent label vectors' + bit = x & -x + for other in basis: + if basis[other] & bit: basis[other] ^= x + basis[bit] = x + return basis + + +def reduce(basis, x): + for bit, b in basis.items(): + if x & bit: x ^= b + return x + + +def dot(x, y): + return (x & y).bit_count() & 1 + + +def rank(rows): + rows = list(rows); r = 0 + for col in range(max((x.bit_length() for x in rows), default=0)): + bit = 1 << col + pivot = next((i for i in range(r, len(rows)) if rows[i] & bit), None) + if pivot is None: continue + rows[r], rows[pivot] = rows[pivot], rows[r] + for i in range(len(rows)): + if i != r and rows[i] & bit: rows[i] ^= rows[r] + r += 1 + return r + + +class Label: + """A binary subspace with a canonical basis.""" + def __init__(self, vectors): + self.basis = echelon(vectors); self.dim = len(self.basis) + self.key = tuple(sorted(self.basis.values())) + + def contains(self, other): + return all(not reduce(self.basis, x) for x in other.basis.values()) + + def nondegenerate(self): + vs = list(self.basis.values()) + return rank([sum(dot(a, b) << j for j, b in enumerate(vs)) for a in vs]) == len(vs) + + def complement_in(self, other): + """Basis of other ∩ self^perp, assuming self ⊆ other.""" + vs = list(other.basis.values()); us = list(self.basis.values()); k = len(us) + rows = [sum(dot(v, u) << j for j, u in enumerate(us)) | 1 << (k+i) + for i, v in enumerate(vs)] + r = 0 + for col in range(k): + bit = 1 << col + piv = next((i for i in range(r, len(rows)) if rows[i] & bit), None) + if piv is None: continue + rows[r], rows[piv] = rows[piv], rows[r] + for i in range(len(rows)): + if i != r and rows[i] & bit: rows[i] ^= rows[r] + r += 1 + out = [] + for row in rows[r:]: + assert not row & ((1 << k)-1) + x = 0 + for i, v in enumerate(vs): + if row >> (k+i) & 1: x ^= v + out.append(x) + return out + + +def odd(vectors): + return any(x.bit_count() & 1 for x in vectors) + + +# -- exact checks ----------------------------------------------------------- +def tmask(t): + return sum(1 << p for p in t) + + +class Checks: + """Exact verification of the side map, labels and compiled roles.""" + def __init__(self, c): + self.c = c; self.h = c.h; self.cache = {}; self.verdicts = {} + self.everything = Label([1 << p for p in range(c.h)]) + + def label(self, node): + if node in self.cache: return self.cache[node] + c = self.c; kind = c.kind[node] + if kind == 'in': + vectors = [tmask(c.triples[node-1])] + elif kind == 'd0': + m = c.cover(node); vectors = [1 << p for p in range(self.h) if m >> p & 1] + else: + s = c.support[node]; ts = [] + while s: + low = s & -s; ts.append(c.triples[low.bit_length()-1]); s ^= low + common = set(ts[0]).intersection(*ts) + assert len(common) >= 2, 'Pair-star node without a common pair' + vectors = [tmask(t) for t in ts] + lab = Label(vectors); self.cache[node] = lab + return lab + + def target_frame(self, S): + t = tmask(S) + key = ('perp', S) + if key not in self.cache: + self.cache[key] = Label([x for x in (1 << p for p in range(self.h)) + if not dot(x, t)] + [tmask((S[0], S[1])), tmask((S[1], S[2]))]) + return self.cache[key] + + def residual_ok(self, small, big): + """small ⊆ big and big ⊖ small is zero or has an odd vector.""" + key = (small.key, big.key) + if key not in self.verdicts: + res = small.complement_in(big) if big.contains(small) else None + self.verdicts[key] = res is not None and (not res or odd(res)) + return self.verdicts[key] + + def label_ok(self, lab): + """Nondegenerate, contains an odd vector, and its complement is zero or does.""" + key = ('label', lab.key) + if key not in self.verdicts: + perp = lab.complement_in(self.everything) + self.verdicts[key] = (lab.nondegenerate() and odd(lab.basis.values()) + and (not perp or odd(perp))) + return self.verdicts[key] + + def verify_map(self): + c = self.c + for node in c.active: + if c.args[node]: + a, b = c.args[node] + assert a < node and b < node and not c.support[a] & c.support[b] + assert c.support[node] == c.support[a] | c.support[b] + got = {} + for S, node, coef in c.pieces: + assert coef in (Q(1, 2), Q(-1, 2)) + key = (S, coef) + assert not got.get(key, 0) & c.support[node], 'Overlapping pieces' + got[key] = got.get(key, 0) | c.support[node] + nonzero = 0 + for S in c.triples: + zero = sum(1 << i for i, T in enumerate(c.triples) if not set(S) & set(T)) + two = sum(1 << i for i, T in enumerate(c.triples) if len(set(S) & set(T)) == 2) + assert got.get((S, Q(1, 2)), 0) == zero and got.get((S, Q(-1, 2)), 0) == two + nonzero += zero.bit_count()+two.bit_count() + return dict(targets=len(c.triples), nonzero_coefficients=nonzero, + side_map_exact=True, coefficients='+1/2 disjoint, -1/2 intersection two') + + def verify_labels(self): + c = self.c; checked = 0 + for node in sorted(c.active): + lab = self.label(node) + assert self.label_ok(lab), node # includes the exit to the full space + if c.args[node]: + for child in c.args[node]: + assert self.residual_ok(self.label(child), lab), (node, child) + checked += 1 + for S, node, coef in c.pieces: + assert self.residual_ok(self.label(node), self.target_frame(S)), (S, node) + checked += 1 + return dict(active_nodes=len(c.active), checked_inclusions=checked, + all_labels_nondegenerate=True, all_residuals_have_odd_vectors=True) + + +def compile_roles(c): + """Reversible roles: one per addition plus one per injected piece.""" + users = {x: [] for x in c.active} + for node in sorted(c.active): + if c.args[node]: + for pos, x in enumerate(c.args[node]): users[x].append(('gate', node, pos)) + for i, (_, node, _) in enumerate(c.pieces): users[node].append(('output', i)) + edge = {}; sources = {}; outputs = {}; gates = []; size = 0 + for node in sorted(c.active): + if c.args[node]: + ins = (edge[node, 0], edge[node, 1]); pivot = ins[0] + else: + pivot = size; size += 1; ins = (pivot,); sources[c.triples[node-1]] = pivot + assert users[node] + outs = (pivot,)+tuple(range(size, size+len(users[node])-1)) + size += len(users[node])-1 + assert len(set(ins)) == len(ins) and set(ins) & set(outs) == {pivot} + gates.append((node, ins, outs)) + for user, slot in zip(users[node], outs): + if user[0] == 'gate': edge[user[1], user[2]] = slot + else: outputs[user[1]] = slot + assert size == c.roles + return dict(roles=size, gates=gates, sources=sources, outputs=outputs) + + +def verify_role_frames(c, checks, code=None): + """Follow every physical role in both directions through its frames.""" + code = code or compile_roles(c) + def step(small, big): assert checks.residual_ok(small, big) + frames = [None]*code['roles'] + for T, slot in code['sources'].items(): frames[slot] = checks.label(c.input[T]) + for node, ins, outs in code['gates']: + lab = checks.label(node) + for slot in set(ins+outs): + if frames[slot] is None: assert checks.label_ok(lab) # entry from D0 + else: step(frames[slot], lab) + frames[slot] = lab + for i, slot in code['outputs'].items(): + S = c.pieces[i][0]; J = checks.target_frame(S) + step(frames[slot], J); frames[slot] = J + for lab in frames: + assert checks.label_ok(lab) # includes the exit residual to D1 + # Reverse stage: complements, traversed backward. U^perp grows iff U shrinks. + # Its entries and exits have the forward residuals U^perp and U, checked above. + back = [None]*code['roles'] + for i, slot in code['outputs'].items(): back[slot] = ('line', c.pieces[i][0]) + for node, ins, outs in reversed(code['gates']): + lab = checks.label(node) + for slot in set(ins+outs): + prev = back[slot] + if prev is None: + assert checks.label_ok(lab) # reverse entry residual is lab^perp + elif prev[0] == 'line': # ⊆ U^perp iff U ⊆ t_S^perp + step(lab, checks.target_frame(prev[1])) + else: + step(lab, prev[1]) # prev^perp ⊆ lab^perp iff lab ⊆ prev + back[slot] = ('node', lab) + for T, slot in code['sources'].items(): + assert back[slot][1].key == checks.label(c.input[T]).key # ends at t_T^perp + return dict(roles=code['roles'], forward_frames_nested=True, + reverse_complement_frames_nested=True) + + +def simulate_invocation(c, code, x, y, side, center, inverse=False): + """Scalar invocation over Q with arbitrary scratch; returns the new state. + + Forward: L,-J,L^-1,-R,V,G,R,L,J,L^-1,G^-1,V^-1 gives y <- y + x. + inverse=True runs the inverted schedule, giving x <- x - y. + """ + h = c.h; T = c.triples + side = list(side); center = dict(center); x = dict(x); y = dict(y) + def L(sign=1): + order = code['gates'] if sign > 0 else list(reversed(code['gates'])) + for node, ins, outs in order: + if sign > 0: + if len(ins) == 2: side[ins[0]] += side[ins[1]] + for o in outs[1:]: side[o] += side[outs[0]] + else: + for o in outs[1:]: side[o] -= side[outs[0]] + if len(ins) == 2: side[ins[0]] -= side[ins[1]] + def J(target, sign): + for i, slot in code['outputs'].items(): + S, _, coef = c.pieces[i]; target[S] += sign*coef*side[slot] + def V(source, sign): + for t, slot in code['sources'].items(): side[slot] += sign*source[t] + def G(source, sign): + for i in range(h): center[i] += sign*sum(source[t] for t in T if i in t) + center['*'] += sign*sum(source.values()) + def R(target, sign): + for t in T: target[t] += sign*(sum(center[i] for i in t)-center['*'])/2 + if not inverse: + L(); J(y, -1); L(-1); R(y, -1); V(x, 1); G(x, 1); R(y, 1) + L(); J(y, 1); L(-1); G(x, -1); V(x, -1) + else: # inverse schedule with logical source y and target x + V(y, 1); G(y, 1); L(); J(x, -1); L(-1); R(x, -1); G(y, -1); V(y, -1) + R(x, 1); L(); J(x, 1); L(-1) + return x, y, side, center + + +if __name__ == '__main__': + import sys, time + for h in map(int, sys.argv[1:] or ['10', '12', '16']): + t = time.time(); c = ComplexSideCircuit(h) + print(c.stats(), f'{time.time()-t:.1f}s', flush=True) diff --git a/research/gf2-full-network/frozen/scripts/complex_network.py b/research/gf2-full-network/frozen/scripts/complex_network.py new file mode 100644 index 0000000000..af9bb6d7b3 --- /dev/null +++ b/research/gf2-full-network/frozen/scripts/complex_network.py @@ -0,0 +1,120 @@ +#!/usr/bin/env python3 +"""Conditional 59/10^11 witness: a compressed complex side circuit. + +The compact-control witness was limited by the original complex motif, whose +v*z_c side wires per invocation dilute its rank deficit. The new side circuit +computes the same correction with shared sums, binary coordinate and pair-star +labels, and the bit network's transparent twelve-operation schedule. The bit +network, compact-control movement and assembly recipe are unchanged. +""" +from fractions import Fraction as Q +from math import comb +from pathlib import Path +import json + +from certify import Parameters, constraints, margins, require, verify_sources +from compact_control_layer import layer_exponents +from complex_circuit import ComplexSideCircuit, Checks, compile_roles, verify_role_frames +from paired_network import BIT_SAVING +from prepare_layers import serializable +from search_network import log_integer_bounds + +ROOT = Path(__file__).resolve().parents[1] +H = 25 +COMPLEX_SAVING = Q(14, 10**9) +LOG_BOUND = Q(966, 100) +KAPPA = Q(59, 10**11) + + +def counts(c): + h = c.h; v = comb(h, 3); m = h**3; N = v**3; I = 3*v*v + R = c.roles; W = 2*N+I*(R+h+1); L = I*(h+1)*h + s = W*m-2*N+2*L + require(L < N, 'Complex deficit is not positive') + return dict(h=h, v=v, m=m, N=N, I=I, side_roles_per_invocation=R, + central_roles=h+1, W=W, L=L, s=s, deficit=W*m-s, eta=Q(W*m-s, W*m), + original_side_wires_per_invocation=v*(comb(h-3, 3)+3*(h-3))) + + +def gate_count(c, n): + """Per invocation: four mixer passes, two copies, two injections, four central gates.""" + per = 4*len(c.active)+4*n['v']+4 + require(n['I']*per <= 12*n['W'], 'The 12W gate bound behind E=64(W+m+1)^3 failed') + return dict(gates_per_invocation=per, total_gates=n['I']*per, twelve_W=12*n['W']) + + +def guard(n, beta, zeta): + """Generalized stopped-depth guard with the new complex constants.""" + m, s, W = n['m'], n['s'], n['W'] + E = 64*(W+m+1)**3; B = s+E + require(m >= 3 and 2 <= s < m**5, 'Unverified coefficient-depth hypothesis') + require(s*(8+E) <= 9*B*B, 'One-piece constant failed') + C1 = 5-4*beta+zeta + raw = max(Q(128*m*B*B), 18*m*B*B*(1+1/zeta)) + C0 = -(-raw.numerator//raw.denominator) + require(9*m*B*B*(1+1/zeta)+18 <= C0, 'Whole-layer constant failed') + return dict(m=m, s=s, E=E, B=B, beta=beta, zeta=zeta, C0=C0, C1=C1) + + +def parameters(): + return Parameters(tau=1-BIT_SAVING, sigma=1-COMPLEX_SAVING, + epsilon=Q(19999, 100000), c=Q(999, 1000), + lam=1-Q(2958, 10**12), lamp=1-Q(2956, 10**12), + kappa=KAPPA, beta=Q(1, 1000), delta=Q(1, 10**6), + C1=Q(49961, 10000)) + + +def witness(p, n): + g = guard(n, p.beta, Q(1, 10000)) + require(p.C1 == g['C1'], 'Guard mismatch') + e = layer_exponents(p.tau, p.sigma, p.beta, p.c) + slacks = constraints(p, layout_model='nonadjacent', assembly_model='tight-gaussian') + slacks['packed_overhead'] = p.lam-e['internal'] # compact control: internal = max exponent + slacks['reserved_axes'] = p.lamp-e['preprocessing'] + for name, slack in slacks.items(): require(slack > 0, 'Constraint failed: '+name) + gs = margins(p, layout_model='nonadjacent', assembly_model='tight-gaussian') + require(min(gs.values()) > p.kappa, 'No final absorption gap') + return dict(parameters=vars(p), guard=g, recurrence=e, constraint_slacks=slacks, + margins=gs, minimum_margin=min(gs.values()), + limiting_margins=[k for k, v in gs.items() if v == min(gs.values())], + absorption_gap=min(gs.values())-p.kappa) + + +def witness_only(): + """Counts and parameter witness without the full finite checks (for the patch).""" + n = counts(ComplexSideCircuit(H)) + require(n['eta'] > COMPLEX_SAVING*LOG_BOUND, 'Complex saving failed') + return witness(parameters(), n) + + +def certificate(): + c = ComplexSideCircuit(H); checks = Checks(c); code = compile_roles(c) + side = checks.verify_map(); labels = checks.verify_labels() + roles = verify_role_frames(c, checks, code) + n = counts(c) + lo, hi = log_integer_bounds(n['m']) + require(hi < LOG_BOUND, 'Logarithm enclosure failed') + require(n['eta'] > COMPLEX_SAVING*LOG_BOUND, 'Complex saving failed') + p = parameters(); w = witness(p, n) + require(Q(1, 2**31) < KAPPA < Q(1, 2**30), 'Unexpected dyadic scale') + # With the bit exponent fixed, g3 <= epsilon*(1-lambda) < epsilon*a_b < a_b/5. + ceiling = BIT_SAVING/5 + require(ceiling < Q(1, 2**30), 'This bit network could cross 2^-30') + return dict(status='CONDITIONAL 59/10^11 WITNESS; COMPRESSED COMPLEX SIDE CIRCUIT; NOT FORMAL VERIFICATION', + upstream_commit=verify_sources(), circuit=c.stats(), side_map=side, + labels=labels, role_frames=roles, gates=gate_count(c, n), + complex_counts=n, complex_saving=COMPLEX_SAVING, log_m_upper=LOG_BOUND, + log_enclosure=(lo, hi), complex_deficit_slack=n['eta']-COMPLEX_SAVING*LOG_BOUND, + bit_saving=BIT_SAVING, witness=w, + improvement_over_compact_control=KAPPA/Q(83, 10**12), + scoped_ceiling=dict(upper=ceiling, below_2_to_minus_30=True, + scope='Published h=50 paired bit network and retained Gaussian margin; not a bound on other networks or algorithms.'), + scope='Conditional on the pinned upstream interfaces, the compact-control movement and guard proofs, the paired bit network, and the written binary-frame transfer for this complex side circuit. Exact arithmetic and finite checks are not formal verification.') + + +if __name__ == '__main__': + result = serializable(certificate()) + (ROOT/'certificates/complex-network.json').write_text(json.dumps(result, indent=2, sort_keys=True)+'\n') + print('PASS conditional', KAPPA, '> 2^-31; minimum margin', result['witness']['minimum_margin']) + print('Side roles per invocation', result['complex_counts']['side_roles_per_invocation'], + 'vs original', result['complex_counts']['original_side_wires_per_invocation']) diff --git a/research/gf2-full-network/frozen/scripts/exclusion_circuit.py b/research/gf2-full-network/frozen/scripts/exclusion_circuit.py new file mode 100644 index 0000000000..b0e2f3e03d --- /dev/null +++ b/research/gf2-full-network/frozen/scripts/exclusion_circuit.py @@ -0,0 +1,198 @@ +#!/usr/bin/env python3 +"""Cancellation-free circuit for all pair sums avoiding two specified points. + +Every addition has disjoint input supports. Node interning shares equal sums; +support tracking verifies the full linear map, not sampled input values. +""" +from itertools import combinations +from hashlib import sha256 +import json + + +class ExclusionCircuit: + def __init__(self,n): + assert n>=4 + self.n=n + self.inputs=list(combinations(range(n),2)) + self.support=[0]+[1<=3 and 2<=sBIT_SAVING*LOG_BOUND,'Bit saving failed') + require(old['eta_c']>COMPLEX_SAVING*LOG_BOUND,'Complex saving failed') + require(2*old['Lc']=2^40 cutoff failed') + witness=certify_parameters(p,generalized_beta=True,strict_margin=True, + layout_model='nonadjacent',guard_model='stopping',assembly_model='tight-gaussian') + require(Q(witness['minimum_margin'])==p.epsilon*p.beta*BIT_SAVING**2,'Wrong limiting margin') + a_upper=n['eta']/((1-n['eta'])*lo) + ceiling=a_upper*a_upper/(5*(1-a_upper)) + require(ceiling 0, 'Need 00') + n = network(h) + m, s, B = n['m'], n['sc'], n['B'] + E = B-s + require(m >= 3 and 2 <= s < m**5, 'Unverified coefficient-depth hypothesis') + require(s*(8+E) <= 9*B*B, 'One-piece constant failed') + C1 = 5-4*beta+zeta + raw_C0 = max(Q(128*m*B*B), 18*m*B*B*(1+1/zeta)) + C0 = -(-raw_C0.numerator//raw_C0.denominator) + require(9*m*B*B*(1+1/zeta)+18 <= C0, 'Whole-layer constant failed') + return dict(h=h, m=m, s=s, E=E, B=B, beta=beta, zeta=zeta, + C0=C0, C1=C1, one_piece_exponent=5-4*beta) + + +def packed_exponents(tau, sigma, beta, c, *, theta=None): + """Sum the recurrence for either exponent ordering. + + theta=tau is the EXISTING packed bound. Any other theta is only a + hypothetical O(V e^tau K^theta) primitive with the same remaining contract. + """ + require(0 < tau < 1 and 0 <= sigma < 1 and 0 < beta < 1 and c > 0, + 'Invalid recurrence parameters') + theta = tau if theta is None else theta + require(theta >= 0, 'Negative spacing exponent is not supported') + internal = tau+(1-beta)*max(sigma-tau, Q(0))+theta*c + leaf = sigma+beta*(1-sigma) + return dict(internal=internal, leaf=leaf, layer=max(internal, leaf), + theta=theta, hypothetical=theta != tau) + + +def check_parameters(p, g, *, hypothetical_theta=None): + """Check the stated extensions, without relaxing the published checker.""" + require(g == guard(g['beta'],g['zeta'],g['h']), 'Guard certificate was altered') + require(p.beta == g['beta'] and p.C1 == g['C1'], 'Guard/parameter mismatch') + require(1-p.tau <= BIT_SAVING, 'Preparation retains the published bit saving') + require(1-p.sigma < complex_saving_bounds(g['h'])[0], + 'Complex exponent is not supported by the chosen motif') + exp = packed_exponents(p.tau, p.sigma, p.beta, p.c, theta=hypothetical_theta) + slacks = constraints(p, layout_model='nonadjacent', assembly_model='tight-gaussian') + slacks['packed_overhead'] = p.lam-exp['internal'] + for name, slack in slacks.items(): + require(slack > 0, 'Failed preparation constraint: '+name) + gs = margins(p, layout_model='nonadjacent', assembly_model='tight-gaussian') + require(min(gs.values()) > p.kappa, 'No strict final margin') + return dict(status=('HYPOTHETICAL SPARSE PRIMITIVE; NOT A MULTIPLICATION RESULT' + if exp['hypothetical'] else + 'Existing packed routine; conditional preparation estimates'), + parameters=vars(p), guard=g, recurrence=exp, + constraint_slacks=slacks, margins=gs, minimum_margin=min(gs.values())) + + +def complex_saving_bounds(h): + n = network(h) + eta = n['eta_c'] + require(0 < eta < Q(1, 2), 'Complex deficit must be positive') + lo, hi = log_ratio_bounds(1/(1-eta), terms=3) + dlo, dhi = log_integer_bounds(n['m']) + return lo/dhi, hi/dlo + + +def complex_search(): + # L_c3h(h+1) iff h^2-21h-16>0, hence integer h>=22. + bounds = {h: complex_saving_bounds(h) for h in range(22, 200)} + winner = max(bounds, key=lambda h: bounds[h][0]) + lo, hi = bounds[winner] + require(all(lo > b[1] for h, b in bounds.items() if h != winner), + 'Finite winner not separated') + n200 = network(200) + # eta_c<2/(3*z_c*m), log(m)>1; every factor increases for h>=200. + tail = Q(2, 3*n200['zc']*n200['m']-2) + require(log_integer_bounds(n200['m'])[0] > 1, 'Tail log denominator failed') + require(lo > tail, 'Tail could improve the result') + n = network(winner) + certified = Q(418, 10**12) + _, log_hi = log_integer_bounds(n['m']) + require(n['eta_c'] > certified*log_hi, 'Chosen simple complex saving failed') + require(n['Lc'] < n['N'] and 2*n['Lc'] >= n['N'], + 'Expected the complex-only admissibility range') + require(n['sc'] < n['m']**5, 'Guard requires a different depth bound') + fixed50 = Q(169, 10**13) + require(network(50)['eta_c'] > fixed50*log_integer_bounds(50**3)[1], + 'Fixed-h=50 saving failed') + return dict(status='Conditional complex interface; separate-arity integration not patched', + winner_h=winner, admissible_integer_h_minimum=22, + saving_lower=lo, saving_upper=hi, certified_saving=certified, + counts={k:n[k] for k in ('h','m','v','N','Wc','sc','Lc','eta_c')}, + fixed_h50_saving=fixed50, tail_start=200, tail_upper=tail, + finite_enclosures={str(h):dict(lower=b[0],upper=b[1]) for h,b in bounds.items()}, + scope='Original complex motif only, all integer h>=22; no shared bit positivity requirement. Written interface audit required, not a formal proof.') + + +def scenarios(): + a = BIT_SAVING + epsilon = Q(199,1000) + # The published numerical choice remains valid under the generalized proof. + beta = Q(999,1000) + g = guard(beta) + existing = Parameters(1-a, 1-Q(1,10**11), epsilon, beta*a, + 1-(1+beta)*a*a/2, 1-beta*a*a, Q(1,2**59), + beta=beta, delta=Q(1,10000), C1=g['C1']) + result = {'existing_59_control':check_parameters(existing,g)} + # These two rows assume theta=a instead of theta=tau. No such primitive + # is supplied here. They expose exact research targets and guard budgets. + for name,h,ac,beta,c,q,k in ( + ('hypothetical_39',50,Q(1,10**11),Q(1,100),Q(1,200),Q(95,10**13),39), + ('hypothetical_34',25,Q(418,10**12),Q(1,5),Q(1,10),Q(3,10**10),34)): + g = guard(beta,h=h) + exp = packed_exponents(1-a,1-ac,beta,c,theta=a) + lamp = 1-q + lam = (max(1-a,1-ac,exp['internal'])+lamp)/2 + p = Parameters(1-a,1-ac,epsilon,c,lam,lamp,Q(1,2**k), + beta=beta,delta=Q(1,10000),C1=g['C1']) + result[name] = check_parameters(p,g,hypothetical_theta=a) + actual = packed_exponents(p.tau,p.sigma,p.beta,p.c) + require(actual['internal'] > 1, 'Hypothetical target accidentally uses an existing bound') + result[name]['existing_primitive_internal_exponent'] = actual['internal'] + result[name]['missing_hypothesis'] = 'Uniform fixed-tape O(V f^(1-a) K^a) selected-bit primitive, up to fixed powers of log(p) only, including descriptors, exceptional repair, and dirty-scratch restoration.' + return result + + +def certificate(): + return dict(status='PREPARATION PASS; published headline remains conditional 2^-59', + upstream_commit=verify_sources(), complex_family=complex_search(), + scenarios=scenarios(), + verification_boundary='Exact arithmetic and finite recurrence checks accompany written proofs. Sparse scenarios are unproved design targets, not certificates of new algorithms.') + + +def serializable(value): + if isinstance(value,Q): + return str(value) + if isinstance(value,dict): + return {k:serializable(v) for k,v in value.items()} + if isinstance(value,(list,tuple)): + return [serializable(v) for v in value] + return value + + +if __name__ == '__main__': + result = certificate() + (ROOT/'certificates/layer-preparation.json').write_text( + json.dumps(serializable(result),indent=2,sort_keys=True)+'\n') + print('PASS preparation estimates; complex-family optimum h='+str(result['complex_family']['winner_h'])) + print('Published result remains 2^-59. Sparse targets 2^-39 and 2^-34 remain hypothetical.') diff --git a/research/gf2-full-network/frozen/scripts/search_network.py b/research/gf2-full-network/frozen/scripts/search_network.py new file mode 100644 index 0000000000..f03d5c1b2c --- /dev/null +++ b/research/gf2-full-network/frozen/scripts/search_network.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python3 +"""Certify the best shared recurrence exponent within the generalized h family. + +Uses rational enclosures of logarithms, plus a tail bound for all h>=200. +The result concerns the counting formulas, conditional on the network proof. +""" +from fractions import Fraction as Q +import json +from pathlib import Path +from certify import network, require + +ROOT = Path(__file__).resolve().parents[1] + + +def log_ratio_bounds(x, terms=24): + """Bounds for log(x), 1 <= x <= 2, by the atanh series.""" + require(1 <= x <= 2, "Log series expects 1<=x<=2") + z = (x-1)/(x+1) + lower = 2*sum((z**(2*j+1)/Q(2*j+1) for j in range(terms)), Q(0)) + tail = 2*z**(2*terms+1)/((2*terms+1)*(1-z*z)) + return lower, lower+tail + + +def log_integer_bounds(m): + k = m.bit_length()-1 + lo2, hi2 = log_ratio_bounds(Q(2)) + lo, hi = log_ratio_bounds(Q(m, 2**k)) + return k*lo2+lo, k*hi2+hi + + +def saving_bounds(n, bit_only=False): + eta = n["eta_b"] if bit_only else min(n["eta_b"], n["eta_c"]) + require(0 < eta < Q(1, 2), "Need a positive small rank deficit") + # Shared exponent saving is min(-log(1-eta_b),-log(1-eta_c))/log(m). + lo_num, hi_num = log_ratio_bounds(1/(1-eta), terms=3) + lo_den, hi_den = log_integer_bounds(n["m"]) + return lo_num/hi_den, hi_num/lo_den + + +def search(bit_only=False): + bounds = {} + rejected = [] + for h in range(7, 200): + if h == 9: + rejected.append(h) + continue + n = network(h) + if 2*n["Lb"] >= n["N"] or 2*n["Lc"] >= n["N"]: + rejected.append(h) + continue + bounds[h] = saving_bounds(n, bit_only=bit_only) + winner = max(bounds, key=lambda h: bounds[h][0]) + lo, hi = bounds[winner] + require(all(lo > b[1] for h, b in bounds.items() if h != winner), + "Enclosures do not separate a unique winner") + # eta_b < 1/(3*z_b*m), and -log(1-eta_b) < eta_b/(1-eta_b). + # For h>=200, z_b and m increase and log(m)>1. This bounds ALL the tail. + n200 = network(200) + tail_upper = Q(1, 3*n200["zb"]*n200["m"]-1) + require(lo > tail_upper, "Tail could contain a better network") + dyadic_power = 1 + while Q(1, 2**dyadic_power) >= lo: + dyadic_power += 1 + require(hi < Q(1, 2**(dyadic_power-1)), "Cannot certify optimal dyadic saving") + return { + "scope": ("Bit-network saving alone" if bit_only else "Common tau=sigma saving") + + "; generalized counting formulas, construction conditional", + "winner_h": winner, + "saving_lower": str(lo), "saving_upper": str(hi), + "largest_certified_dyadic_saving": f"2^-{dyadic_power}", + "tail_start": 200, "tail_saving_upper": str(tail_upper), + "excluded_h": rejected, + "finite_enclosures": {str(h): {"lower": str(b[0]), "upper": str(b[1])} + for h, b in bounds.items()}, + } + + +def parameter_ceiling(): + """Upper bound for kappa even with variable beta and separate sigma. + + Put a=1-tau. The final g4>0 gives epsilon Q(99, 100)*upper, "Witness below 99% of ceiling") + return {"bit_network_search": result, "kappa_upper": str(upper), + "simple_kappa_upper": str(Q(5838, 10**36)), + "witness": str(witness), "witness_fraction_of_upper": str(witness/upper), + "next_dyadic_excluded": "2^-107", + "scope": "Seven-margin accounting and stated network rank bounds; not all algorithms"} + + +if __name__ == "__main__": + result = search() + result["parameter_ceiling"] = parameter_ceiling() + path = ROOT / "certificates/network-search.json" + path.parent.mkdir(exist_ok=True) + path.write_text(json.dumps(result, indent=2, sort_keys=True)+"\n") + print(f"Certified h={result['winner_h']} best within the stated counting family,") + print(f"including all h>=200 by a tail bound; dyadic saving {result['largest_certified_dyadic_saving']}") diff --git a/research/gf2-full-network/frozen/scripts/shared_point_circuit.py b/research/gf2-full-network/frozen/scripts/shared_point_circuit.py new file mode 100644 index 0000000000..d086427188 --- /dev/null +++ b/research/gf2-full-network/frozen/scripts/shared_point_circuit.py @@ -0,0 +1,296 @@ +#!/usr/bin/env python3 +"""Merge equal sums across the common-point circuits, with exact certificates. + +Supports are represented by their provenance in the small pair circuit, not +by half a million dense global bit vectors. A sum that occurs in two distinct +common-point groups must be a pair-star; its fixed pair and union of vertices +identify its support exactly. +""" +from hashlib import sha256 +from itertools import combinations + +from exclusion_circuit import ExclusionCircuit + + +class SharedPointCircuit: + def __init__(self,h,circuit=None): + """Merge equal pair-star sums across common-point groups. + + Tooling note (shared-point / bit-compression replay): the merge/lookup + loop keeps the historical node-allocation order and output keys, but + pre-sorts the local active set and output items once, unpacks child + mappings without a per-node generator, and binds hot attributes locally. + ``merged_additions``, topology and ``circuit_sha256`` are unchanged. + See ``research/shared-point-init/``. + """ + assert h>=6 and h!=9, 'The ambient form I-J/9 must be nondegenerate' + self.h=h + self.local=circuit or ExclusionCircuit(h-1) + assert self.local.n==h-1, 'Pair circuit has the wrong ground size' + self.inputs=list(combinations(range(h),3)) + self.variables={t:i+1 for i,t in enumerate(self.inputs)} + nin=len(self.inputs) + self.args=[None]*(nin+1) + self.core=[0]+[sum(1<=2: + key=(cval,uval) + hit=lookup.get(key) + if hit is not None: + mapping[node]=hit;self.merged+=1 + continue + new=len(args);mapping[node]=new + append_args((a,b));append_core(cval);append_union(uval) + append_prov((common,node));lookup[key]=new + else: + new=len(args);mapping[node]=new + append_args((a,b));append_core(cval);append_union(uval) + append_prov((common,node)) + outs=self.outputs + for pair,node in outputs_items: + outs[common,tuple(sorted((common,*(pts[x] for x in pair))))]=mapping[node] + self.active=set();stack=list(self.outputs.values());active=self.active + while stack: + n=stack.pop() + if n in active:continue + active.add(n) + edge=args[n] + if edge:stack.extend(edge) + self.additions=sum(args[n] is not None for n in active) + + def support_in(self,node,common): + """Exact pair-input support in coordinates with this common point. + + Tooling note (shared-point / bit-compression frame replay): results are + memoized in a per-instance dense table indexed by ``node * h + common`` + instead of a process-wide ``lru_cache(maxsize=16384)``. The historical + full-size checker (``h=46``) asks for far more than 16384 distinct + ``(node, common)`` pairs during ``verify_frames``, so the small LRU + thrashed. Leaf triples and two-point stars unpack pairs without a + generator or ``sorted`` call. Returned bitmasks are unchanged. See + ``research/shared-point-frame-contains/``. + """ + try: + cache=self._support_in_cache + except AttributeError: + cache=[None]*(len(self.args)*self.h) + self._support_in_cache=cache + h=self.h + idx=node*h+common + hit=cache[idx] + if hit is not None: + return hit + core_row=self.core + core=core_row[node] + assert core&(1<=6 and h%2==0,'Even ground size required') + c=circuit or SharedPointCircuit(h) + require(c.h==h,'Mismatched circuit') + v=comb(h,3);N=v**3;m=h**3;R=c.additions+len(c.outputs) + W=2*N+2*v*v*(R+h);L=3*v*v*h*h;D=N-2*L + return dict(h=h,v=v,N=N,m=m,side_roles_per_invocation=R, + W=W,L=L,D=D,s=W*m-D,eta=Q(D,W*m)) + + +def parameters(): + a=BIT_SAVING + return Parameters(1-a,1-A,Q(1,21),9*a/10,1-19*a*a/20, + 1-9*a*a/10,KAPPA,beta=Q(9,10)) + + +def certificate(): + c=SharedPointCircuit(46);n=counts(circuit=c) + symbolic=c.verify();frames=c.verify_frames() + _,log_hi=log_integer_bounds(n['m']) + require(log_hiBIT_SAVING*LOG_BOUND,'Insufficient saving') + witness=certify_parameters(parameters(),generalized_beta=True,strict_margin=True, + layout_model='nonadjacent') + require(Q(witness['minimum_margin'])==3*BIT_SAVING**2/70,'Wrong minimum') + # Necessary bound for this particular circuit and downstream constraints. + log_lo,_=log_integer_bounds(n['m']) + a_upper=n['eta']/((1-n['eta'])*log_lo) + ceiling=a_upper*a_upper/(20*(1-a_upper)) + require(ceilingQ(1,2**59),'Invalid target saving') + budget=n['D']/(2*n['v']**2*n['m']*target_a*LOG_BOUND)-n['v']-n['h'] + return dict(status='CONDITIONAL 13*2^-66 WITNESS; frame-transfer proof supplied separately', + upstream_commit=verify_sources(),bit_counts={k:str(v) for k,v in n.items()}, + circuit=symbolic,frames=frames,bit_saving=str(BIT_SAVING), + complex_saving_unchanged=str(A),log_m_upper=str(LOG_BOUND), + deficit_slack=str(n['eta']-BIT_SAVING*LOG_BOUND),witness=witness, + exact_circuit_kappa_upper=str(ceiling), + target_59=dict(bit_saving=str(target_a), + sufficient_maximum_integer_side_roles=(budget.numerator-1)//budget.denominator), + scope='Conditional on the written source-span/complement-frame transfer and unchanged upstream interfaces; no general optimality claim.') + + +if __name__=='__main__': + result=certificate() + (ROOT/'certificates/shared-point-network.json').write_text(json.dumps(result,indent=2,sort_keys=True)+'\n') + print('PASS conditional shared-point witness 13*2^-66; minimum',result['witness']['minimum_margin']) + print(result['bit_counts']) + print('Target 59:',result['target_59']) diff --git a/research/gf2-full-network/frozen/upstream/LICENSE b/research/gf2-full-network/frozen/upstream/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/gf2-full-network/frozen/upstream/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/research/gf2-full-network/frozen/upstream/README.md b/research/gf2-full-network/frozen/upstream/README.md new file mode 100644 index 0000000000..c8cb3c3857 --- /dev/null +++ b/research/gf2-full-network/frozen/upstream/README.md @@ -0,0 +1,17 @@ +# [Integer multiplication below n log n](paper.pdf) + +**Author:** OpenAI + +**Date:** September 23, 2026 + +## Citation + +```bibtex +@misc{OAI:Integer-multiplication-below-n-log-n-September-23-2026, + author = {{OpenAI}}, + title = {{Integer multiplication below $n\log n$}}, + howpublished = {OpenAI Math Release preprint + \href{https://github.com/openai/math/blob/main/preprints/Integer-multiplication-below-n-log-n-September-23-2026/paper.pdf}{OAI:Integer-multiplication-below-n-log-n-September-23-2026}}, + year = {2026} +} +``` diff --git a/research/gf2-full-network/frozen/upstream/build/figures/multiplication-flow.tex b/research/gf2-full-network/frozen/upstream/build/figures/multiplication-flow.tex new file mode 100644 index 0000000000..f0297c9cb8 --- /dev/null +++ b/research/gf2-full-network/frozen/upstream/build/figures/multiplication-flow.tex @@ -0,0 +1,17 @@ +\begin{tikzpicture}[ + node distance=10mm, + every node/.style={font=\small}, + box/.style={draw,rounded corners=2pt,align=center,text width=9.6cm,inner sep=5pt}, + >=Stealth] +\node[box] (digits) {Integer product\\radix-digit convolution}; +\node[box,below=of digits] (prime) {Cyclic convolution on distinct prime axes}; +\node[box,below=of prime] (power) {Normalized convolution on power-of-two axes}; +\node[box,below=of power] (ring) {Convolution over $\mathbb C[y]/(y^r+1)$\\ +synthetic transforms and packed polynomial products}; +\draw[->] (digits)--node[right,font=\scriptsize,align=left] + {Chinese-remainder\\address map}(prime); +\draw[->] (prime)--node[right,font=\scriptsize,align=left] + {Gaussian resampling\\and chirps}(power); +\draw[->] (power)--node[right,font=\scriptsize,align=left] + {last-coordinate\\phase twist}(ring); +\end{tikzpicture} diff --git a/research/gf2-full-network/frozen/upstream/build/figures/proof-map.tex b/research/gf2-full-network/frozen/upstream/build/figures/proof-map.tex new file mode 100644 index 0000000000..a2d539e5a7 --- /dev/null +++ b/research/gf2-full-network/frozen/upstream/build/figures/proof-map.tex @@ -0,0 +1,8 @@ +\begin{tikzpicture}[node distance=5mm, every node/.style={font=\small}, box/.style={draw,rounded corners=2pt,align=center,text width=11cm,inner sep=5pt}, >=Stealth] +\node[box] (c) {One edge on the array assigned to a wire role\\ +$D_u g_w\ \xrightarrow{\quad D_vD_u^{-1}\quad}\ D_v g_w$\\ +the frame changes while the logical array stays fixed}; +\node[box,below=of c] (d) {One pointwise gate $G$ on $t$ aligned roles, all in frame $D_v$\\ +$G(D_vg_1,\ldots,D_vg_t)=D_vG(g_1,\ldots,g_t)$}; +\draw[->] (c)--(d); +\end{tikzpicture} diff --git a/research/gf2-full-network/frozen/upstream/build/main.tex b/research/gf2-full-network/frozen/upstream/build/main.tex new file mode 100644 index 0000000000..0b11a3feb1 --- /dev/null +++ b/research/gf2-full-network/frozen/upstream/build/main.tex @@ -0,0 +1,51 @@ +\documentclass[11pt]{article} +\usepackage[T1]{fontenc} +\usepackage{lmodern,microtype} +\usepackage{amsmath,amssymb,amsthm,mathrsfs,mathtools,booktabs,array,longtable} +\usepackage[margin=1in]{geometry} +\usepackage{tikz} +\usetikzlibrary{positioning,arrows.meta} +\usepackage[hyphens]{url} +\usepackage{hyperref} +\hypersetup{colorlinks=true,linkcolor=blue!45!black,citecolor=blue!45!black,urlcolor=blue!45!black,pdftitle={Integer multiplication below n log n},pdfauthor={OpenAI}} +\pdfinfoomitdate=1 +\pdftrailerid{} +\pdfsuppressptexinfo=15 +\newtheorem{theorem}{Theorem} +\newtheorem{lemma}[theorem]{Lemma} +\newtheorem{proposition}[theorem]{Proposition} +\newtheorem{corollary}[theorem]{Corollary} +\theoremstyle{definition} +\newtheorem{definition}[theorem]{Definition} +\newtheorem{remark}[theorem]{Remark} +\newcommand{\norm}[1]{\lVert#1\rVert_\infty} +\title{Integer multiplication below \texorpdfstring{$n\log n$}{n log n}} +\author{OpenAI} +\date{September 23, 2026} +\begin{document} +\maketitle +\begin{abstract} +We give a deterministic algorithm that multiplies two $n$-bit integers +in $O(n(\lg n)^{1-\kappa})$ worst-case time, with +$\kappa=2^{-182}$, on one fixed finite-alphabet Turing machine with a +fixed finite number of one-dimensional tapes. The algorithm is exact +for every input length and disproves the $n\log n$ optimality conjecture +of Sch\"onhage and Strassen in this model. +\end{abstract} +\tableofcontents +\clearpage +\input{sections/00-introduction.tex} +\input{sections/02-streams.tex} +\input{sections/03-motifs.tex} +\input{sections/04-swap.tex} +\input{sections/05-layers.tex} +\input{sections/06-transforms.tex} +\input{sections/07-resampling.tex} +\input{sections/08-assembly.tex} +\input{sections/09-exact-arithmetic.tex} +\input{sections/10-transposition.tex} +\appendix +\input{sections/11-grouped-rectangles.tex} +\bibliographystyle{plain} +\bibliography{references} +\end{document} diff --git a/research/gf2-full-network/frozen/upstream/build/references.bib b/research/gf2-full-network/frozen/upstream/build/references.bib new file mode 100644 index 0000000000..bf01cae125 --- /dev/null +++ b/research/gf2-full-network/frozen/upstream/build/references.bib @@ -0,0 +1,301 @@ +@article{KaratsubaOfman1962, + author = {Karatsuba, A. and Ofman, Yu.}, + title = {Multiplication of Many-Digital Numbers by Automatic Computers}, + journal = {Doklady Akademii Nauk SSSR}, + volume = {145}, + number = {2}, + pages = {293--294}, + year = {1962}, + note = {In Russian}, + url = {https://www.mathnet.ru/eng/dan26729} +} +@article{Toom1963, + author = {Toom, A. L.}, + title = {The Complexity of a Scheme of Functional Elements Simulating the Multiplication of Integers}, + journal = {Doklady Akademii Nauk SSSR}, + volume = {150}, + number = {3}, + pages = {496--498}, + year = {1963}, + note = {In Russian}, + url = {https://www.mathnet.ru/eng/dan27978} +} +@article{SchonhageStrassen1971, + author = {Sch{\"o}nhage, Arnold and Strassen, Volker}, + title = {Schnelle {Multiplikation} gro{\ss}er {Zahlen}}, + journal = {Computing}, + volume = {7}, + pages = {281--292}, + year = {1971}, + doi = {10.1007/BF02242355} +} +@inproceedings{Furer2007, + author = {F{\"u}rer, Martin}, + title = {Faster Integer Multiplication}, + booktitle = {Proceedings of the 39th Annual ACM Symposium on Theory of Computing}, + pages = {57--66}, + year = {2007}, + publisher = {ACM}, + doi = {10.1145/1250790.1250800} +} +@article{Furer2009, + author = {F{\"u}rer, Martin}, + title = {Faster Integer Multiplication}, + journal = {SIAM Journal on Computing}, + volume = {39}, + number = {3}, + pages = {979--1005}, + year = {2009}, + doi = {10.1137/070711761} +} +@article{Nussbaumer1980, + author = {Nussbaumer, H. J.}, + title = {Fast Polynomial Transform Algorithms for Digital Convolution}, + journal = {IEEE Transactions on Acoustics, Speech, and Signal Processing}, + volume = {28}, + number = {2}, + pages = {205--215}, + year = {1980}, + doi = {10.1109/TASSP.1980.1163372} +} +@article{NussbaumerQuandalle1978, + author = {Nussbaumer, H. J. and Quandalle, P.}, + title = {Computation of Convolutions and Discrete {Fourier} Transforms by Polynomial Transforms}, + journal = {IBM Journal of Research and Development}, + volume = {22}, + number = {2}, + pages = {134--144}, + year = {1978}, + doi = {10.1147/rd.222.0134}, + url = {https://bitsavers.org/pdf/ibm/IBM_Journal_of_Research_and_Development/222/ibmrd2202D.pdf} +} +@article{DuttRokhlin1993, + author = {Dutt, A. and Rokhlin, V.}, + title = {Fast {Fourier} Transforms for Nonequispaced Data}, + journal = {SIAM Journal on Scientific Computing}, + volume = {14}, + number = {6}, + pages = {1368--1393}, + year = {1993}, + doi = {10.1137/0914081} +} +@article{RosserSchoenfeld1962, + author = {Rosser, J. Barkley and Schoenfeld, Lowell}, + title = {Approximate Formulas for Some Functions of Prime Numbers}, + journal = {Illinois Journal of Mathematics}, + volume = {6}, + pages = {64--94}, + year = {1962}, + doi = {10.1215/ijm/1255631807} +} +@article{DeKururSahaSaptharishi2013, + author = {De, Anindya and Kurur, P. P. and Saha, Chandan and Saptharishi, Ramprasad}, + title = {Fast Integer Multiplication Using Modular Arithmetic}, + journal = {SIAM Journal on Computing}, + volume = {42}, + number = {2}, + pages = {685--699}, + year = {2013}, + doi = {10.1137/100811167} +} +@article{Schonhage1980, + author = {Sch{\"o}nhage, Arnold}, + title = {Storage Modification Machines}, + journal = {SIAM Journal on Computing}, + volume = {9}, + number = {3}, + pages = {490--508}, + year = {1980}, + doi = {10.1137/0209036} +} +@article{Bluestein1970, + author = {Bluestein, L. I.}, + title = {A Linear Filtering Approach to the Computation of Discrete {Fourier} Transform}, + journal = {IEEE Transactions on Audio and Electroacoustics}, + volume = {18}, + number = {4}, + pages = {451--455}, + year = {1970}, + doi = {10.1109/TAU.1970.1162132} +} + +@article{HarveyHoeven2021, + author = {Harvey, David and van der Hoeven, Joris}, + title = {Integer Multiplication in Time {$O(n\log n)$}}, + journal = {Annals of Mathematics}, + series = {2}, + volume = {193}, + number = {2}, + pages = {563--617}, + year = {2021}, + doi = {10.4007/annals.2021.193.2.4}, + url = {https://www.texmacs.org/joris/nlogn/nlogn.pdf}, + note = {Result numbering refers to the 45-page author-hosted manuscript, + \url{https://www.texmacs.org/joris/nlogn/nlogn.pdf}, + accessed 4 October 2026} +} + +@inproceedings{HarveyHoeven2025, + author = {Harvey, David and van der Hoeven, Joris}, + title = {Integer Multiplication Is at Least as Hard as Matrix Transposition}, + booktitle = {Proceedings of the 66th Annual Symposium on Foundations of Computer Science (FOCS)}, + pages = {1366--1381}, + publisher = {IEEE Computer Society}, + year = {2025}, + doi = {10.1109/FOCS63196.2025.00072}, + eprint = {2503.22848v1}, + archivePrefix = {arXiv}, + primaryClass = {cs.CC}, + url = {https://arxiv.org/abs/2503.22848v1}, + note = {Cited theorem numbering follows arXiv version 1, 28 March 2025, + \url{https://arxiv.org/abs/2503.22848v1}} +} + +@article{HarveyHoevenLecerf2016, + author = {Harvey, David and van der Hoeven, Joris and Lecerf, Gr{\'e}goire}, + title = {Even Faster Integer Multiplication}, + journal = {Journal of Complexity}, + volume = {36}, + pages = {1--30}, + year = {2016}, + doi = {10.1016/j.jco.2016.03.001}, + url = {https://arxiv.org/abs/1407.3360v1} +} + +@inproceedings{HarveyHoeven2019Lattice, + author = {Harvey, David and van der Hoeven, Joris}, + title = {Faster Integer Multiplication Using Short Lattice Vectors}, + booktitle = {Proceedings of the Thirteenth Algorithmic Number Theory Symposium}, + editor = {Scheidler, Renate and Sorenson, Jonathan}, + series = {The Open Book Series}, + volume = {2}, + pages = {293--310}, + publisher = {Mathematical Sciences Publishers}, + year = {2019}, + doi = {10.2140/obs.2019.2.293}, + url = {https://arxiv.org/abs/1802.07932v1}, + note = {Preprint posted 22 February 2018} +} + +@misc{Groff2019, + author = {Groff, Matt}, + title = {Faster Integer Multiplication Using Preprocessing}, + year = {2019}, + eprint = {1911.07124v2}, + archivePrefix = {arXiv}, + primaryClass = {cs.DS}, + url = {https://arxiv.org/abs/1911.07124v2}, + note = {Version 2, 11 December 2019} +} + +@misc{Harvey2023Truncated, + author = {Harvey, David}, + title = {Faster Truncated Integer Multiplication}, + year = {2023}, + eprint = {1703.00640v2}, + archivePrefix = {arXiv}, + primaryClass = {cs.SC}, + url = {https://arxiv.org/abs/1703.00640v2}, + note = {Version 2, 2 August 2023; first posted 2 March 2017} +} + +@article{Brent1976, + author = {Brent, Richard P.}, + title = {Fast Multiple-Precision Evaluation of Elementary Functions}, + journal = {Journal of the ACM}, + volume = {23}, + number = {2}, + pages = {242--251}, + year = {1976}, + url = {https://maths-people.anu.edu.au/~brent/pd/rpb034.pdf}, + note = {Author-hosted copy: + \url{https://maths-people.anu.edu.au/~brent/pd/rpb034.pdf}} +} + +@article{AgarwalCooley1977, + author = {Agarwal, R. C. and Cooley, J. W.}, + title = {New Algorithms for Digital Convolution}, + journal = {IEEE Transactions on Acoustics, Speech, and Signal Processing}, + volume = {25}, + number = {5}, + pages = {392--410}, + year = {1977}, + doi = {10.1109/TASSP.1977.1162981} +} + +@article{FranklWilson1981, + author = {Frankl, Peter and Wilson, Richard M.}, + title = {Intersection Theorems with Geometric Consequences}, + journal = {Combinatorica}, + volume = {1}, + number = {4}, + pages = {357--368}, + year = {1981}, + doi = {10.1007/BF02579457} +} + +@article{Alon1998, + author = {Alon, Noga}, + title = {The {Shannon} Capacity of a Union}, + journal = {Combinatorica}, + volume = {18}, + number = {3}, + pages = {301--310}, + year = {1998}, + doi = {10.1007/PL00009824}, + url = {https://www.tau.ac.il/~nogaa/PDFS/shann3.pdf} +} + +@inproceedings{BarYossefBirkJayramKol2006, + author = {Bar-Yossef, Ziv and Birk, Yitzhak and Jayram, T. S. and Kol, Tomer}, + title = {Index Coding with Side Information}, + booktitle = {Proceedings of the 47th Annual IEEE Symposium on Foundations of Computer Science}, + pages = {197--206}, + publisher = {IEEE Computer Society}, + year = {2006}, + url = {https://webee.technion.ac.il/people/zivby/papers/indexing/indexing.focs.pdf} +} + +@article{LubetzkyStav2009, + author = {Lubetzky, Eyal and Stav, Uri}, + title = {Nonlinear Index Coding Outperforming the Linear Optimum}, + journal = {IEEE Transactions on Information Theory}, + volume = {55}, + number = {8}, + pages = {3544--3551}, + year = {2009}, + doi = {10.1109/TIT.2009.2023702}, + url = {https://arxiv.org/abs/0806.1919}, + note = {Result numbering refers to the 16-page author preprint, + \url{https://arxiv.org/pdf/0806.1919}, accessed 4 October 2026} +} + +@inproceedings{BuhrmanCleveKouckyLoffSpeelman2014, + author = {Buhrman, Harry and Cleve, Richard and Kouck{\'y}, Michal and Loff, Bruno and Speelman, Florian}, + title = {Computing with a Full Memory: Catalytic Space}, + booktitle = {Proceedings of the 46th Annual ACM Symposium on Theory of Computing}, + pages = {857--866}, + publisher = {ACM}, + year = {2014}, + doi = {10.1145/2591796.2591874}, + url = {https://ir.cwi.nl/pub/22659/22659B.pdf} +} + +@article{Grigoriev1982, + author = {Grigor'ev, D. Yu.}, + title = {Additive Complexity in Directed Computations}, + journal = {Theoretical Computer Science}, + volume = {19}, + pages = {39--67}, + year = {1982}, + doi = {10.1016/0304-3975(82)90014-7}, + url = {https://logic.pdmi.ras.ru/~grigorev/pub/additive82.pdf} +} + +@misc{OpenAIExactDFT2026, + author = {{OpenAI}}, + title = {{An explicit power saving for the exact discrete Fourier transform}}, + howpublished = {OpenAI Math Release preprint + \href{https://github.com/openai/math/blob/main/preprints/An-explicit-power-saving-for-the-exact-discrete-Fourier-transform-September-25-2026/main.pdf}{OAI:An-explicit-power-saving-for-the-exact-discrete-Fourier-transform-September-25-2026}}, + year = {2026} +} diff --git a/research/gf2-full-network/frozen/upstream/build/sections/00-introduction.tex b/research/gf2-full-network/frozen/upstream/build/sections/00-introduction.tex new file mode 100644 index 0000000000..aa9048eef8 --- /dev/null +++ b/research/gf2-full-network/frozen/upstream/build/sections/00-introduction.tex @@ -0,0 +1,216 @@ +\section{Introduction} + +Sch\"onhage and Strassen proved in 1971 that two $n$-bit integers can +be multiplied in $O(n\log n\log\log n)$ time on a multitape Turing +machine, and proposed $n\log n$ as the optimal order of growth +\cite[Section~1]{SchonhageStrassen1971}. After a sequence of improvements, +Harvey and van der Hoeven reached the unconditional $O(n\log n)$ upper +bound~\cite{HarveyHoeven2021}. We obtain a strict power saving in the +logarithmic factor, in the same fixed finite-tape model. The algorithm +uses linear combinations of intermediate data to reduce the cost of +both address rearrangement and Fourier-transform layers. + +For a binary string $x$ of length $n$, let $\operatorname{val}(x)$ be +its nonnegative integer value, with the leftmost bit most significant. +For $0\le z<2^k$, let $\operatorname{bin}_k(z)$ denote its binary +representation padded on the left to length $k$. We consider exact +multiplication: on input $x\#y$, with $x,y\in\{0,1\}^n$, the output +must be $\operatorname{bin}_{2n}(\operatorname{val}(x)\operatorname{val}(y))$. +Write $\lg n=\max\{\lceil\log_2 n\rceil,1\}$. + +\begin{theorem}\label{thm:main} +There is one deterministic Turing machine $A$, with a fixed finite +alphabet and a fixed finite number of one-dimensional tapes, that +computes this exact product for every $n\ge1$ and every pair of $n$-bit +inputs. Its worst-case running time satisfies +\[ + T_A(n)=O\!\left(n(\lg n)^{1-\kappa}\right), + \qquad \kappa=2^{-182}. +\] +\end{theorem} + +The bound is asymptotic through all input lengths. The constants and +thresholds in the construction are extremely large; the algorithm is +intended to establish a bit-complexity bound. The theorem refutes an +eventual $\Omega(n\log n)$ lower bound for every fixed multiplication +machine in this model. + +\subsection{The two tape operations} + +Splitting the inputs into radix digits reduces multiplication to +convolution of short integer coefficients. Our starting point is the +Gaussian-resampling reduction of Harvey and van der Hoeven +\cite{HarveyHoeven2021}: it replaces the Fourier transforms needed for +this convolution by multidimensional transforms whose axis lengths are +powers of two. After a further conversion to convolution, one coordinate +is stored as the coefficient list of a polynomial modulo $y^r+1$, with $r$ a power of two. Powers of $y$ then +serve as roots of unity in the remaining axes, and multiplication by +such a root is a signed shift of the coefficient list. These are the +synthetic polynomial transforms of Nussbaumer and Quandalle and +Nussbaumer~\cite{NussbaumerQuandalle1978,Nussbaumer1980}. + +In this representation, the transform calculation consists of address +rearrangements, signed shifts, and two-point butterfly operations. +Scanning an array of $\Theta(n)$ stored bits at each of +$\Theta(\log n)$ transform levels already costs $\Theta(n\log n)$. +We therefore need savings in both movement and arithmetic. Two tape +procedures supply them; in both bounds, $V$ denotes the stored bit volume. + +The first procedure interchanges two disjoint contiguous address fields +of $u$ bits in an array whose addresses form a complete Cartesian +product. Its cost is $O(Vu^\tau)$ for a fixed $\tau<1$. +Although its final effect is an exact permutation, its intermediate +steps form pointwise XOR combinations of data. The final permutation is +exact for arbitrary initial auxiliary values. + +The second procedure applies +\[ + H_0(u,v)=\bigl((u+v)/2,(u-v)/2\bigr) +\] +simultaneously on selected coordinate bits of the numerical arrays. +Each record is a polynomial with complex fixed-point coefficients, and +$H_0$ acts coefficientwise. On the layouts used in the multiplication +algorithm, one selects the same bit position in each of at most $d$ +equal-width address chunks, and the cost is $O(Vd^{\lambda'})$ for a +fixed $\lambda'<1$. Intermediate values are exact Gaussian dyadics, +whose real and imaginary parts have power-of-two denominators. A single +truncation follows the completed contractive layer. +Section~\ref{sec:tape-interchange} proves the address bound, and +Section~\ref{sec:fast-butterfly-layers} gives the numerical layout, +precision hypotheses, and layer bound. + +\subsection{Linear networks and the recursive saving} + +Each procedure arises from its own fixed linear network that exchanges two +banks of values, with prescribed signs, and restores every auxiliary +value. A wire's fixed place in the network is called its role. To use +the network on an array, regard a row as the complete ordered suffix, +including all active address fields, at a fixed prefix and row index. +Distribute rows cyclically among the $W$ roles, padding the row count +for each prefix to a multiple of $W$. Let $V$ now denote the node volume +after padding. All role streams have the same local address set and each +contains $V/W$ bits. A scalar gate is then applied +pointwise to matching addresses on the roles that it touches. + +The representation of a role's array may change along the network. +At a source, gate, or sink $v$, choose an invertible linear operator +$D_v$ on the space of arrays indexed by the common address set. We call $D_v$ its frame: the stored +array is $D_vg$ when the logical array is $g$. All incidences of one +gate have the same frame. Along an edge from $u$ to $v$, the operator +$D_vD_u^{-1}$ changes the stored array from $D_ug$ to $D_vg$. +At a pointwise linear gate $G$, the common frame commutes with the gate: +\[ + G(D_vg_1,\ldots,D_vg_t)=D_vG(g_1,\ldots,g_t). +\] +The supplied input needs no preliminary change of frame: its logical +interpretation is defined by applying the inverse input frame. Thus the +intermediate frames cancel, and a route from input role $w$ to output +role $\rho(w)$ applies +$D_{\mathrm{sink}(\rho(w))}D_{\mathrm{source}(w)}^{-1}$, together with +its prescribed scalar sign. Undoing the role exchange and those signs +leaves the endpoint operator on every role array, including the roles +that carried auxiliary scalar values. + +For the bit procedure, that endpoint operator is an address shear: +two fields, written as vectors $H,D$ over a common residue ring, are +updated by $(H,D)\mapsto(H+D,D)$. Two further linear-cost address +updates complete their interchange. For the numerical procedure, the +endpoint operator becomes the simultaneous $H_0$ layer after diagonal +phase operations and a dyadic scale. The intermediate frames are chosen +so that every edge can be implemented by smaller calls to the same +procedure. + +The finite construction in Section~\ref{sec:finite-networks} attaches +subspaces of a fixed $m$-dimensional space to its gates and terminals. +The subspaces at adjacent vertices are nested. Their dimension changes +count the smaller operations needed on an edge, with an additional +source contribution in the bit construction. The construction uses +three-element subsets: gather and scatter create coefficients depending +on intersection size, and auxiliary wires cancel the unwanted +coefficients. Orthogonality of the corresponding indicator vectors permits +the subspace assignments. The decisive property is that the total +number $s$ of smaller calls satisfies $s0$, the division machine takes $x\#y$ +and returns $\operatorname{bin}_n(q)\#\operatorname{bin}_n(r)$, where +$q=\lfloor a/b\rfloor$ and $r=a-bq$. The square-root machine takes $x$ +and returns $\operatorname{bin}_n(\lfloor\sqrt a\rfloor)$. +Leading zeroes are allowed, and $\kappa$ is as in +Theorem~\ref{thm:main}. +\end{corollary} + +The classical Newton reductions described by +Brent~\cite[Lemmas 2.1--2.4]{Brent1976} compute reciprocal and +square-root approximations at geometrically increasing precisions. +Their multiplication costs are bounded by a geometric sum controlled by +the last precision, and exact remainder and square tests recover the +required integer answers. Section~\ref{sec:exact-arithmetic-proof} +gives the complete fixed-tape implementation. + +\input{sections/01-history.tex} diff --git a/research/gf2-full-network/frozen/upstream/build/sections/01-history.tex b/research/gf2-full-network/frozen/upstream/build/sections/01-history.tex new file mode 100644 index 0000000000..7c6f033138 --- /dev/null +++ b/research/gf2-full-network/frozen/upstream/build/sections/01-history.tex @@ -0,0 +1,164 @@ + +\subsection{Historical context and inherited methods} + +Karatsuba's recursive construction, published jointly +with Ofman in 1962, gave a binary multiplication circuit of size +$O(n^{\log_2 3})$~\cite{KaratsubaOfman1962}. Toom's subsequent use of polynomial +evaluation and interpolation gave circuit size +$n\exp(O(\sqrt{\log n}))$, and hence $O(n^{1+\eta})$ for every fixed +$\eta>0$~\cite{Toom1963}. These early results were formulated in terms of +automata and logical networks. Cook adapted Toom's method to the +Turing-machine setting; the contemporary account of Sch\"onhage and +Strassen credits this adaptation explicitly +\cite[Section~1, p.~282]{SchonhageStrassen1971}. + +In the multitape Turing model, +Sch\"onhage and Strassen proved the bound +$O(n\log n\log\log n)$ in 1971~\cite{SchonhageStrassen1971}. +F\"urer improved it to $n\log n\,2^{O(\log^* n)}$ in 2007, with a full +journal account in 2009~\cite{Furer2007,Furer2009}; here $\log^* n$ counts +iterated logarithms until a constant threshold is reached. +De, Kurur, Saha and Saptharishi developed a modular-arithmetic route to +the same scale~\cite{DeKururSahaSaptharishi2013}. +Later improvements made the exponential factor $8^{\log^* n}$ and then +$4^{\log^* n}$~\cite{HarveyHoevenLecerf2016,HarveyHoeven2019Lattice}. +Harvey and van der Hoeven proved the unconditional +$O(n\log n)$ bound~\cite{HarveyHoeven2021}. + +The multitape bounds just cited concern that fixed model. Sch\"onhage obtained +linear-time multiplication on storage-modification machines~\cite{Schonhage1980}. +Groff later gave a smaller-than-$\log n$ factor in a unit-cost RAM model +with constant-time arbitrary memory access, after polynomial preprocessing +whose cost is excluded from that bound~\cite[Sections~2 and~4]{Groff2019}. +Neither result establishes the bound in the fixed finite-tape model of +Theorem~\ref{thm:main}. + +The transform methods behind these bounds also underlie the present +construction. Sch\"onhage--Strassen multiplication uses roots of unity in +Fermat-type residue rings, where certain multiplications become shifts. +F\"urer combines cheap polynomial roots of unity with more general roots, +reducing the frequency of expensive multiplications. Harvey and van der +Hoeven use Gaussian resampling to pass to multidimensional transforms with +power-of-two dimensions, then evaluate them using polynomial transforms +developed by Nussbaumer and Quandalle and subsequently by +Nussbaumer~\cite{NussbaumerQuandalle1978,Nussbaumer1980,HarveyHoeven2021}. +The Gaussian-gridding work of Dutt and Rokhlin is an earlier conceptual +precursor~\cite{DuttRokhlin1993}; Harvey and van der Hoeven discuss the +connection in~\cite[Section~4.4.3]{HarveyHoeven2021}. The quantitative +resampling and bit-cost estimates used here are those of the latter paper. + +More specifically, the proof adapts Harvey and van der Hoeven's +Gaussian-resampling identity, contraction bounds, and short-convolution +procedures~\cite[Theorem~4.2, Proposition~4.7 and Lemmas~4.8--4.12]{HarveyHoeven2021}. +Their framework already permits arbitrary dimension. Here the source and +target permutations remain in the transform identity, while the faster tape +procedures perform the required axis movements. Bluestein's conversion to +convolution~\cite{Bluestein1970} and the synthetic-root convolution algorithm +are retained; the latter follows the polynomial-transform construction +in~\cite[Section~2.4 and Section~3]{HarveyHoeven2021}. Signed coefficient +packing is a form of Kronecker substitution, with the fixed-tape version +of~\cite[Lemma~2.5]{HarveyHoeven2021} as a direct antecedent. +Calls to the established $O(n\log n)$ multiplier are ordinary subroutine +calls; they do not invoke the improved theorem recursively. + +\subsection{The finite-network ingredients} + +The subset-intersection construction in Section~\ref{sec:finite-networks} +has an earlier source outside multiplication. Alon's presentation of the +Frankl--Wilson construction~\cite{FranklWilson1981} gives low-degree +representations of complementary intersection graphs over different fields +\cite[Section~3, remark after the proof of Theorem~1.1]{Alon1998}. +At the prime $p=2$, its subsets have size three and the two polynomial evaluations +are the intersection count modulo two and the intersection count minus one. +These are the two pairing formulas used here. We change the ground-set +size and express the second pairing through a rational bilinear form. + +The gather and scatter operations, together with the side wires, have the +form of linear index-code decoding: a low-rank linear summary gives the +wanted coordinate plus contributions from known neighboring coordinates, +and those contributions are subtracted. Bar-Yossef, Birk, Jayram and Kol +establish the fitting-matrix formulation and this decoder +\cite[Section~3, proof of Theorem~5]{BarYossefBirkJayramKol2006}. +Lubetzky and Stav treat decoding over other fields and use related +intersection representations to separate their possible ranks +\cite[Proposition~2.1 and Section~2.3]{LubetzkyStav2009}. +These comparisons explain the algebraic role of the two fields here; +they do not supply the subspace labels on the subsequent network. + +Restoring scratch registers with arbitrary initial contents also has a +precise precedent. The transparent-computation construction of Buhrman, +Cleve, Kouck\'y, Loff and Speelman subtracts an initial register value, +performs a computation, adds the resulting value, and reverses the +computation~\cite[Section~3]{BuhrmanCleveKouckyLoffSpeelman2014}. +Our scratch schedule is the linear-readout version of that construction. +The rank reduction used for address shears is a singular-matrix Bruhat +factorization: after reversing the coordinate order, Grigor'ev's +upper-triangular factors become the two lower-triangular factors needed +here~\cite[Appendix~A.2, Proposition~14(c)]{Grigoriev1982}. + +The finite networks and their labels are proved directly in +Section~\ref{sec:finite-networks}. The additional requirements are the +three-stage bank exchange, nested subspaces with a strict total rank or +dimension deficit, and endpoint frames acting on every role. The tape +implementations then turn that deficit into the volume-normalized +recurrences of Sections~\ref{sec:tape-interchange} +and~\ref{sec:fast-butterfly-layers}, including the costs of addressing, +padding, coefficient growth, and finite precision. The cited decoding, +restoration, and factorization results provide ingredients; these further +properties are established in the present proof. + +\subsection{Lower-bound scope and matrix transposition} + +Sch\"onhage and Strassen conjectured $n\log n$ as the optimal order of +multiplication cost~\cite[Section~1]{SchonhageStrassen1971}. In the present +fixed-tape model, an eventual lower bound for every multiplication machine means that, for +each fixed machine $A$, there are constants $c_A>0$ and $N_A$ such that +$T_A(n)\ge c_A n\lg n$ whenever $n\ge N_A$. +Its negation requires one machine satisfying +$\liminf_{n\to\infty}T_A(n)/(n\lg n)=0$. +The power saving proved here gives a limit of zero through all input lengths, +which is a stronger conclusion. + +Harvey and van der Hoeven consider a binary transposition machine +supplied an integer $m\ge1$ and a $k\times k$ binary matrix, where +$k=\lfloor\sqrt m\rfloor$. They proved that if every fixed such machine +has worst-case cost $\Omega(m\lg m)$ through all sufficiently large +supplied values of $m$, then every fixed multiplication machine has the +corresponding eventual lower bound~\cite[Theorem~1.2]{HarveyHoeven2025}. +Combining their quantitative reduction~\cite[Corollary~6.2]{HarveyHoeven2025} +with Theorem~\ref{thm:main} gives a deterministic fixed-tape algorithm +that transposes a row-major $k\times k$ binary matrix in +$O(k^2(\lg k)^{1-\kappa})$ time, with $\kappa$ as in +Theorem~\ref{thm:main}. Section~\ref{sec:transposition} proves the more +general rectangular-matrix bound. + +This comparison concerns unrestricted computation on a fixed number of +one-dimensional tapes. Our address procedure forms XOR combinations of +intermediate data, even though its final effect is a permutation. +It therefore lies outside models restricted to moving data without such +computations; see~\cite[Section~1.4]{HarveyHoeven2025} for the distinction. + +\subsection{Companion application to exact Fourier transforms} + +The complex phase network of Proposition~\ref{prop:complex-motif-interface} +is also used in the companion manuscript~\cite[Section~1.1, Theorem~1.1 +and Corollary~1.2]{OpenAIExactDFT2026}. That manuscript gives a single +algorithm for the exact discrete Fourier transform at every positive +transform length $n$. As $n\to\infty$, its cost is +$O(n(\log n)^{1-10^{-13}})=o(n\log n)$. + +The cost is measured in an exact complex-register model that assigns unit +cost to exact complex field operations. The algorithm accepts every +$x\in\mathbb C^n$, with no bound on its entries or on intermediate complex +magnitudes. Its computation on the input uses only addition, subtraction, +and multiplication by prepared input-independent scalars. The magnitudes +of those scalar coefficients are unrestricted as well. + +Integer operations and random access on $O(\log(n+2))$-bit words have unit +cost, with a fixed number of words for each address or integer. The model +supplies one specified Fourier root $\zeta_{D_*}$ of explicitly computable +order $D_*<1024n^3$. Scalar preparation, schedule construction, and index +work are charged. This is a separate application of the finite network, +with its own uniform array implementation. It is neither a bit-complexity +consequence nor a stable floating-point FFT consequence of the fixed-tape +multiplication theorem, Theorem~\ref{thm:main}. diff --git a/research/gf2-full-network/frozen/upstream/build/sections/02-streams.tex b/research/gf2-full-network/frozen/upstream/build/sections/02-streams.tex new file mode 100644 index 0000000000..088fceea18 --- /dev/null +++ b/research/gf2-full-network/frozen/upstream/build/sections/02-streams.tex @@ -0,0 +1,208 @@ +\section{The machine model and elementary streams} +\label{sec:streams} + +A machine has one fixed finite alphabet and one fixed finite number of +one-dimensional tapes. A step reads and writes at most one cell on each +tape and moves each head by at most one cell. Fixed tracks and finitely +many work tapes change time by a fixed factor. We distinguish moving one +digit in a fixed radix, which needs a bounded number of scans, from +interchanging fields whose numbers of digits grow. The latter permutation +will be realized in Section~\ref{sec:tape-interchange} by computing XOR +combinations of intermediate data streams. The present section supplies +the elementary scans it uses. Every scan includes its counters and the +return of its tape heads. + +\subsection{Array order and elementary scans} + +For a positive integer $a$ write $[a]=\{0,\ldots,a-1\}$. +An array with address set $[a_1]\times\cdots\times[a_t]$ is stored in +lexicographic order, with the first coordinate most significant. Its +entries are bits unless a record width is specified. A trailing record +of $B$ bits can equivalently be regarded as a final address field $[B]$. +An address is implicit in an entry's position in this ordered stream; it +is not stored beside every data bit. +The \emph{logical volume} $V$ is the number of stored data bits. Work +tapes and duplicate streams are charged in time but do not increase $V$ +in recurrences. All the fields discussed below are nonempty. A call +with an empty array is handled directly. + +An address permutation $f$ moves the entry at $x$ to $f(x)$. Thus its +action on an array $A$ is $(fA)(f(x))=A(x)$. Adjacent fields which are +irrelevant to an operation may be replaced by a single field whose length +is their product. In particular, the elementary procedures below have a +fixed number of formal address fields even when a surrounding algorithm +has a growing list of coordinates. Lengths and positions are supplied in +canonical binary on descriptor tapes; no additional tape head is attached to an +address coordinate. Each elementary call receives a fixed number of +collapsed canonical lengths. Constructing them from a longer surrounding +list is work of the caller; recursive calls below construct their own +collapsed descriptors within their stated bounds. + +When one address field is designated as a row field, collapse the fields +before it to a prefix $[P]$ and those after it to a suffix $[B]$. If the +row field has range $[R]$, a \emph{row} at prefix $p$ and row index $r$ +is the complete consecutive block $\{p\}\times\{r\}\times[B]$. +Every row therefore contains $B$ bits in the same suffix order. + +For headers that concatenate a list of positive integer parameters, we use +the self-delimiting code +\begin{equation} + b_v=\lfloor\log_2v\rfloor+1,\qquad + \Gamma(v)=0^{b_v-1}\operatorname{bin}_{b_v}(v),\qquad + |\Gamma(v)|=2b_v-1\quad(v\ge1). + \label{eq:integer-descriptor-code} +\end{equation} +The initial zeroes specify how many further bits follow the first one, +so concatenated codes can be read in order. We use this code when an +interface specifies a header; elementary calls still receive the fixed +number of canonical binary lengths described above. + +\begin{lemma}[Elementary stream operations] +\label{lem:elementary-streams} +Fix a radix $q\ge2$. Each of the following operations on an array of +volume $V$ takes $O(V)$ steps on a fixed number of one-dimensional tapes: +\begin{enumerate} +\item any fixed permutation of the pair of digit values at two specified +radix-$q$ positions, whether or not the positions are adjacent; +\item moving one specified radix-$q$ digit to another position, preserving +the order of the intervening positions; +\item splitting on a specified radix-$q$ digit, applying a fixed +pointwise map to aligned streams, and merging them back; +\item for positive integers $P,R,B$, within each prefix of an array on +$[P]\times[R]\times[B]$, splitting +whole rows cyclically into a fixed number $W$ of streams, and, when $W$ +divides $R$, merging those streams in any fixed order of the row classes. +\end{enumerate} +The bounds include shape preparation, counter initialization and resets, +and returning or clearing the visited portions of work tapes. Their +constants may depend on the fixed radix, the fixed pointwise map, and the +fixed number of row classes. +\end{lemma} + +\begin{proof} +For the first operation split into $q^2$ streams according to the two +specified digits. With these digits fixed, the order of all remaining +digits is unchanged by the permutation. Enumerate output addresses in +their required order and read the stream prescribed by the two preimage +digits. For a digit move use $q$ streams instead. The same observation +shows that splitting on one digit gives streams with the same remaining +address set in the same order. Scan their aligned entries, apply the +fixed pointwise map, and merge according to the output digit; this proves +the third operation. For the fourth, write $r=Wg+w$, where +$0\le w1$. +The same argument gives a unit vector in $Q^\perp$ when it is nonzero. +A triple complement, and the complement of two neighboring triple +lines, contain coordinate units outside supports of sizes at most +three and six, respectively. Full tensor spaces contain coordinate +units as well. In each nonzero tensor summand, tensoring these chosen +norm-one vectors gives a norm-one vector; placing it in that orthogonal +summand gives one in the whole residual. Each residual is nondegenerate +by the decompositions above. Thus every nonzero residual is nonalternating. + +For completeness, every nondegenerate nonalternating binary symmetric +space has an orthonormal basis. Split off unit lines until the +remaining space is alternating. A nonzero nondegenerate alternating +space splits into planes with bases $a,b$ satisfying +$a\cdot a=b\cdot b=0$, $a\cdot b=1$; this follows by choosing a +nonzero $a$, choosing $b$ with $a\cdot b=1$, and taking the orthogonal +complement of their nondegenerate plane. Retain one unit vector $w$ +from the lines already split off. A plane orthogonal to $w$ can be +absorbed into that line: the three vectors +\[ + w+a,\qquad w+b,\qquad w+a+b +\] +are independent, pairwise orthogonal, and have norm one. +Use one of these new unit vectors in place of $w$ for the next plane; +the remaining planes are still orthogonal to it. Repeating this +operation absorbs every alternating plane. +\end{proof} + +The loss ratios have the exact values +\[ + \frac{L_{\rm b}}{N}=\frac{100}{539},\qquad + \frac{L_{\rm c}}{N}=\frac{101}{539}. +\] +In particular, both are smaller than $1/2$. We now turn the dimension +count into the two interfaces needed later. + +\subsection{The rational matrix interface} + +For a nondegenerate rational subspace $U\subset\mathcal F$, write +$P_U$ for the projection onto $U$ along $U^\perp$. Assign $P_U$ to +each gate or sink with label $U$. Assign the source matrix $-P_{U_a}$ +to $X_a$ and zero to every other source. +These are fixed rational $m\times m$ matrices; write $M_v$ for the matrix +at vertex $v$. Define +$\rho(X_a)=Y_a$, $\rho(Y_a)=X_a$, and let $\rho$ fix every auxiliary +wire. + +In the tape application, two address chunks are written as vectors $H,D$ +of $m$ fields. For a matrix $M$, the frame $\Phi_M$ moves the array entry +at $(H,D)$ to $(H+MD,D)$, leaving the other address fields unchanged. +The fields use a radix coprime to the fixed denominators, and addition is +modulo their common range. Hence $\Phi_M$ is an invertible +$\mathbb F_2$-linear permutation of array entries, and +$\Phi_{M'}\Phi_M=\Phi_{M'+M}$. Using $D_v=\Phi_{M_v}$ +in \eqref{eq:common-frame-identity}, the endpoint matrix difference on each +routed role is exactly the shear applied to that role. The following identity +makes it the same shear $H\gets H+D$ on every role; +Section~\ref{sec:tape-interchange} turns that shear into a field interchange +and implements an edge change with one smaller interchange per unit of its +rational rank. + +\begin{proposition}\label{prop:bit-motif-interface} +The bit network has $W_{\rm b}$ wires, uses only pointwise XOR gates, +and sends its input vector to the permutation $\rho$ of that vector. +Its rational matrices are common to all incidences of a gate and obey +\[ + M_{\mathrm{sink}(\rho(w))}-M_{\mathrm{source}(w)}=I_m + \quad\text{for every input role }w. +\] +The sum of the rational ranks of all edge differences is +\begin{align} + s_{\rm b} + &=\sum_{e}\operatorname{rank}_{\mathbb Q} + (M_{\mathrm{head}(e)}-M_{\mathrm{tail}(e)})\\ + &=W_{\rm b}m-N+2L_{\rm b} + =1771765690887858612870000000$. + +For an input $X_a$ the endpoint difference is +$P_{U_a^\perp}-(-P_{U_a})=I_m$. Every other role has zero source +matrix and identity sink matrix. This proves the interface. +\end{proof} + +\subsection{The binary phase interface} + +Use the complex scalar network and binary labels. For a binary vector +$x$, let $\operatorname{wt}(x)$ denote its integer Hamming weight, and +write $[b]\in\{0,1\}$ for the integer representative of $b\in\mathbb F_2$. +For a label $U$, let +\[ + q_U(x)=\operatorname{wt}(P_Ux)\pmod4. +\] +The projection here is over $\mathbb F_2$. +Let +\[ + H=\frac1{\sqrt2}\begin{pmatrix}1&1\\1&-1\end{pmatrix},\quad + C=H\begin{pmatrix}1&0\\0&i\end{pmatrix}H + =aI+bX,\qquad a=\frac{1+i}{2},\quad b=\frac{1-i}{2}, +\] +where $X$ interchanges the two coordinates. On functions of +$x\in\mathbb F_2^m$ define +\[ + \mathcal C_U=H^{\otimes m}\operatorname{diag}_x(i^{q_U(x)})H^{\otimes m}. +\] +The use of $H$ in this definition is an identity of matrices. Each entry +of $\mathcal C_U$ and its inverse is a Gaussian integer divided by $2^m$, +so both preserve arrays over $\mathbb Z[i,1/2]$. The kernels implemented +below have Gaussian dyadic coefficients. + +To apply the scalar network to these functions, replace the scalar on +each wire $w$ by an array +$f_w:\mathbb F_2^m\to\mathbb Z[i,1/2]$. At each address, a gate +applies its scalar linear map to the values on the wires it touches. +The frame in \eqref{eq:common-frame-identity} is $D_v=\mathcal C_U$ at a +vertex with label $U$. On an edge from label $U$ to label $V$, apply +$\mathcal C_V\mathcal C_U^{-1}$ to that wire's array. +All frames are diagonalized by the same matrix $H^{\otimes m}$. +For an integer $k\ge1$, an address for $k$ columns is +$(x^{(1)},\ldots,x^{(k)})\in(\mathbb F_2^m)^k$; every frame and edge +operator is then the tensor product of its one-column version over +these $k$ coordinates. Each scalar gate is still applied once at each +joint address, to the vector of values on the roles it touches. + +\begin{proposition}\label{prop:complex-motif-interface} +For each edge of the complex network, write $U,V$ for its tail and +head labels. Its phase-frame difference +$\mathcal C_V\mathcal C_U^{-1}$ is a product of one translation +kernel $aI+bX_v$, or its inverse, per vector in an orthonormal basis +of the edge residual. Here $(X_vf)(x)=f(x+v)$. +The sum of these basis lengths is +\[ + s_{\rm c}=W_{\rm c}m-2N+2L_{\rm c} + =18738072446366712673080000000$. + +For an edge $e$, write $\mathcal B_e$ for its residual basis and +$K_{e,v}$ for the forward or inverse translation kernel associated +with $v\in\mathcal B_e$. Taking tensor products preserves their +product, so on $k$ columns +\[ + \bigl(\mathcal C_V\mathcal C_U^{-1}\bigr)^{\otimes k} + =\prod_{v\in\mathcal B_e}K_{e,v}^{\otimes k}. +\] +Thus each residual vector contributes one factor acting on all $k$ +columns, and there are $s_{\rm c}$ such factors over the network. + +Let $\rho$ denote the underlying permutation of the complex roles: it +exchanges $X_a,Y_a$ and fixes each scratch role. +By Lemma~\ref{lem:scalar-motifs}, the pointwise scalar network sends an input array at +$X_a$ to $Y_a$ with sign $+1$, an input at $Y_a$ to $X_a$ with sign +$-1$, and each scratch input to its own output with sign $+1$. +Applying \eqref{eq:common-frame-identity} with $D_v=\mathcal C_{U_v}$, +where $U_v$ is the label at vertex $v$, shows that an input role $w$ reaches +output role $\rho(w)$ with that sign and with operator +$\mathcal C_{U_{\mathrm{sink}(\rho(w))}} + \mathcal C_{U_{\mathrm{source}(w)}}^{-1}$. +For $k$ columns, use $D_v=\mathcal C_{U_v}^{\otimes k}$ on the joint +address set in the same identity. The route operator is then the $k$th +tensor power of the displayed address operator, multiplied by its scalar +route sign once. +The zero label has frame $I$, while the full label has frame +$C^{\otimes m}$ because $q_{\mathcal F}(x)=\operatorname{wt}(x)$. +Every pair except $X_a\to Y_a$ has these zero and full labels. +For the remaining pair, write $u=u_a$. Its binary norm is one and +its weight is $3^3=27$. Orthogonal weight additivity yields +\begin{align*} + q_{U_a^\perp}(x)-q_{U_a}(x) + &=\operatorname{wt}(x)-2\operatorname{wt}(u)[u\cdot x]\\ + &=\operatorname{wt}(x)+2[u\cdot x]\pmod4. +\end{align*} +Since $2[u\cdot x]\equiv2\sum_{j\in\operatorname{supp}(u)}x_j +\pmod4$, the operator on $X_a\to Y_a$ is the tensor of $C^{-1}$ on the +27 coordinates of $\operatorname{supp}(u)$ and $C$ elsewhere. +Put $Z=\operatorname{diag}(1,-1)$. Direct multiplication gives +\[ + C=iZC^{-1}Z,\qquad C^{-1}=-iZCZ. +\] +For $k$ columns, let $Z_{a,k}$ be the tensor product of $Z$ on +those 27 coordinates in every column and the identity elsewhere. +Apply $Z_{a,k}$ before the network at $X_a$, and apply +$i^{27k}Z_{a,k}$ after the network at $Y_a$; the latter scalar is +applied once to the whole role. There are $27k$ inverse factors, so +the identity $C=iZC^{-1}Z$ turns each of them into $C$. The operator +on this pair is therefore $C^{\otimes mk}$ as well. +Only the physical $X$ outputs still carry the minus sign of the +scalar exchange. Negate those outputs and send output role $\rho(w)$ +back to role $w$. Every role, including every scratch role, now has +the required forward tensor product. +\end{proof} + +\subsection{Explicit rational bounds for the two recurrences} + +The relative rank deficits are +\[ + \eta_{\rm b}=\frac{W_{\rm b}m-s_{\rm b}}{W_{\rm b}m} + =\frac{339}{22587335000000},\qquad + \eta_{\rm c}=\frac{W_{\rm c}m-s_{\rm c}}{W_{\rm c}m} + =\frac{73}{19906842167500}. +\] +For both recurrences we may use the fixed rational exponent +\begin{equation} + \tau=\sigma=1-2^{-50}. + \label{eq:explicit-motif-exponents} +\end{equation} +Both exact deficits displayed above are greater than $20\cdot2^{-50}$. +Since $m<2^{20}$ and $\log 2<1$, we have $\log m<20$, whence +\[ + m^{1-2^{-50}} + =m\exp(-2^{-50}\log m) + >m(1-20\cdot2^{-50})>m(1-\eta) +\] +for either $\eta=\eta_{\rm b}$ or $\eta=\eta_{\rm c}$. +Consequently +\[ + \frac{s_{\rm b}}{W_{\rm b}}0$, write each chunk as $m$ +consecutive $b=e/m$ digit fields, giving vectors $H,D$ over +$\mathbb Z/q^b\mathbb Z$. We first construct the shear $H\leftarrow H+D$. + +Split whole rows cyclically into $W$ role streams within each prefix +preceding the row field. Write the original row number as +$r=Wg+(w-1)$ with $1\le w\le W$; stream $w$ has row number $g$. +These streams have exactly the same remaining shape, including the +full ranges of $H$ and $D$. Each has +logical volume $V/W$, and its row count is divisible by $W^{k-1}$. + +For a rational matrix $M$, let $\Phi_M$ act on an array by moving its +entry at address $(H,D)$ to $(H+MD,D)$, with every spectator unchanged. +Thus $\Phi_M$ is the array permutation induced by that address map. +Its inverse is $\Phi_{-M}$ and +$\Phi_{M'}\Phi_M=\Phi_{M'+M}$. On every circuit edge apply +$\Phi_{A_e}$ to that role stream; implement it by +Lemma~\ref{lem:matrix-shear}, recursively interchanging each pivot pair +of $b$-digit fields. Execute each circuit gate pointwise at matching +addresses of its role streams. + +The row split supplies the common address set used in the +frame identity~\eqref{eq:common-frame-identity}. Here the frame at a +vertex with matrix $M$ is the address permutation $\Phi_M$, and every +edge changes it by $\Phi_{M'-M}$. The same invariant proof applies +because a common address permutation commutes with every pointwise +bit gate. For the physical input arrays $f_w$, the logical arrays are +$g_w=\Phi_{-M_{\mathrm{in}(w)}}f_w$; this only specifies their +interpretation, with no initial tape operation. The logical circuit +routes $g_w$ to role $\rho(w)$. Thus its physical output satisfies +\[ + f'_{\rho(w)} + =\Phi_{M_{\mathrm{out}(\rho(w))}} + \Phi_{-M_{\mathrm{in}(w)}}f_w + =\Phi_{I_m}f_w, +\] +by~\eqref{eq:finite-shear-contract}. Merge by returning row $g$ of +output role $\rho(w)$ to the original row $Wg+(w-1)$ within the same +preceding prefix. This undoes $\rho$ and restores row order. The result +is $H\leftarrow H+D$ on every original row, including rows assigned +to scratch roles, whose initial values were arbitrary. + +To interchange the two full chunks, perform +\[ + D\leftarrow D-H,\qquad H\leftarrow H+D,\qquad D\leftarrow H-D, +\] +componentwise. Only the middle shear uses the circuit. The other two +updates target the later group and have linear cost. The transformation +sends $(H,D)$ to $(D,H)$. + +The number of recursive calls is the sum of the edge ranks, exactly $s$. +Each acts on one role stream of volume $V/W$, retaining all other +fields as spectators. Splitting, +merging, gates, and triangular operations have total cost $O(V)$ because +their number is fixed. Below we verify that scheduling the recursive +calls on fixed tapes also costs $O(V)$ at this node. Thus if $F_k$ is a +uniform upper bound for time divided by logical volume, then +\begin{equation} +\label{eq:swap-recurrence} + F_0=O(1),\qquad F_k\le(s/W)F_{k-1}+O(1). +\end{equation} +For $a=s/W1$, it is $O(a^k)$. +Hence $F_k=O(e^\tau)$. + +\paragraph{A fixed-tape depth-first schedule.} +Here we complete the implementation assertion used in +\eqref{eq:swap-recurrence}. Reserve $W$ role tapes, a fixed set of +I/O and elementary-operation work tapes, one parking stack tape, and a +separate descriptor stack. Although $W$ is large, it is fixed. +At a call boundary all reusable work tapes, other than the current I/O +and local descriptor, are empty and their heads are at their origins. +The parking and descriptor heads are at the tops of their stacks. + +Before a recursive call, append the $W-1$ inactive role streams to the +parking stack in a fixed order, with separators. Copy the active stream +to the child I/O area, and erase the parent role tapes while traversing +their current contents. Push the parent descriptor and its finite +program counter to the descriptor stack. The role and work tapes are +now available to the child, using the same tapes at every depth. +On return, copy the child output into the designated active role. +Pop the inactive streams in reverse order. To recover a stream in its +original direction, prepare its destination to the known length and +write the popped symbols from the destination's right end toward its +left end. Erase the popped stack cells as they are left. This uses +linear time and ends with the parking head at the previously saved top. +No scan passes through a parked ancestor. Cleanup is always limited to +the region visited by the current call; a reused tape is not swept to +the largest position ever visited by an ancestor. + +Each push, pop, copy, positioning operation, or erasure moves $O(V)$ +symbols at a parent node. There are only the fixed number $s$ of child +calls. This gives precisely the additional $O(V)$ term claimed above, +even though each child itself has volume $V/W$. Temporary storage is +therefore not substituted for logical volume in the factor $s/W$. + +For completeness, descriptor processing also fits this term when the +payload is one bit. Let $V_0$ be the volume at the root of one +power-width call with width $e_0=m^{k_0}$, and $V_j=V_0/W^j$ the volume +of any depth-$j$ child. Here $j\le k_0=\log_m e_0$. The root row +count is at least $W^{k_0}$, so at depth $j$ it is still at least one. +Both original chunk ranges remain present: digits outside the current +subchunks become spectators rather than being removed. Hence +\[ + V_j\ge q^{2e_0},\qquad + j\log W\le(\log_m e_0)\log W=O(e_0)=O(\log V_j). +\] +It follows that +$\log V_0=\log V_j+j\log W=O(\log(2V_j))$. +A local descriptor lists the row field, at most the current $m+m$ +fields, and a fixed number of intervals formed from intervening +spectator fields. Computing products of their lengths, subdividing +target fields, copying lengths, and storing the current instruction take +$(\log(2V_0))^{O(1)}=O(V_j)$ time at that child, since every fixed +power of $\log(2V_j)$ is $O(V_j)$. Before descending, +construct the child's descriptor by retaining its two target fields and +combining each consecutive group of spectator fields into one interval. +The ancestor's subdivision need not remain active in the child. Stack entries contain +finite instructions and binary integers, not new alphabet symbols. +These observations establish one finite machine for every recursion +depth and every choice of spectator lengths. + +\end{proof} + + +We use the rational value $\tau=1-2^{-50}$ established in +\eqref{eq:explicit-motif-exponents}. Its verification uses fixed integer +comparisons and the displayed exponential inequality; it needs no +real-arithmetic oracle. + + +\subsection{Removing width and row restrictions} + +We have proved the fast operation for power widths with enough rows. +Rows for a general array can be supplied by a few of its own high digits. +Their movement will cost less than the final bound. + +\begin{lemma}[Arbitrary-width interchange] +\label{lem:chunk-swap} +There exist fixed $0<\tau<1$ and one fixed finite-alphabet multitape +procedure with the following property. For positive integers $P,G,B$ +and $u\ge1$, it transforms an arbitrary bit array on +\[ + [P]\times[2^u]\times[G]\times[2^u]\times[B] +\] +by the address permutation +\[ + (p,h,g,d,z)\longmapsto(p,d,g,h,z) +\] +in $O(Vu^\tau)$ steps, where $V=PG B\,2^{2u}$. +The integers specifying the shape are part of the input. The time +includes their processing, all padding and unpadding, and fixed-tape +workspace cleanup. In particular, $B=1$ is allowed. +\end{lemma} + +\begin{proof} +First suppose the two ranges are $[q^e]$, where $q$ is the fixed prime +already chosen. Set +\[ + k=\lceil\log_m e\rceil,\qquad + \rho=\left\lceil\frac{k\log W}{2\log q}\right\rceil. +\] +For all sufficiently large $e$, $1\le\rho0,\quad 0<\epsilon<1. +\] +The exponents and comparison constants are fixed, and we impose their +further restrictions in Proposition~\ref{prop:simultaneous-layer}. +Two consequences explain the layout. The polynomial length $r$ grows +faster than every fixed power of $p$, so a scan of a record pays for +polynomial work on its address. Also $K/\log p\to\infty$, which will +make the exceptional set in a packed change of address bits small enough +to repair by sorting. We will obtain cost $O(Vd^{\lambda'})$, with +$\lambda'<1$ and $V$ the logical bit volume, whereas separate butterfly +factors would require $D$ whole-array passes. + +We first construct tensor products of the auxiliary two-point kernel +$C$ from Proposition~\ref{prop:complex-motif-interface}. Its phase +frames express a $C$ tensor product using smaller groups of +selected bits, separated by binary changes of basis. We implement those +changes by moving whole address chunks. Splitting complete rows among +the network's wire roles then reduces the volume of each recursive +call. Finally, we bound the intermediate dyadic values and convert the +completed $C$ layer to the normalized $H_0$ layer. The entire layer is +evaluated exactly before one final truncation. + +\subsection{Phase frames for a simultaneous butterfly layer} +\label{subsec:phase-frames} + +Hold the unselected address bits fixed and regard the stored complex +values on one wire role as a function of the selected bits. The phase +identities below express an edge's residual operator as a product of +two-point kernels on selected directions. + +Put +\[ + H_0=\frac12\begin{pmatrix}1&1\\1&-1\end{pmatrix},\qquad + H=\sqrt2 H_0,\qquad \mathsf S=\operatorname{diag}(1,i),\qquad + Z=\operatorname{diag}(1,-1). +\] +For the bit-flip matrix $X=\bigl(\begin{smallmatrix}0&1\\1&0\end{smallmatrix}\bigr)$, +define +\begin{equation}\label{eq:phase-C} + C=H\mathsf SH=aI+bX,\qquad a=\frac{1+i}{2},\quad b=\frac{1-i}{2}. +\end{equation} +Direct multiplication gives +\begin{equation}\label{eq:phase-basic-identities} + H_0=b\mathsf SC\mathsf S,\qquad C^2=X,\qquad C^4=I,\qquad + C^{-1}=bI+aX=-iZCZ. +\end{equation} +In particular, $C=iZC^{-1}Z$. These identities use only Gaussian dyadic +coefficients. The Hadamard matrices in the definition of +$\mathcal C_U$ are used to prove identities; they need not be executed +by the machine. + +Consider an edge from label $U_-$ to label $U_+$, and choose an +orthonormal basis $v_1,\ldots,v_{\rho_{\rm edge}}$ of its residual. +Proposition~\ref{prop:complex-motif-interface} gives the frame change +\[ + \mathcal C_{U_+}\mathcal C_{U_-}^{-1} + =\prod_{j=1}^{\rho_{\rm edge}}(aI+bX_{v_j})^{\epsilon_j}, + \qquad \epsilon_j\in\{1,-1\}. +\] +Here $(X_vf)(x)=f(x+v)$, and we write $C_v=aI+bX_v$. +The number of directional kernels is precisely +$\rho_{\rm edge}$, including on decreasing edges. The next step puts those directions +into coordinate positions without performing a general transpose. + +\paragraph{Implementing an arbitrary residual basis.} +For $M\in\operatorname{GL}(m,\mathbb F_2)$, let $\mathcal P_M$ be the +address permutation that moves the value at $x$ to $Mx$. Thus +$(\mathcal P_Mf)(x)=f(M^{-1}x)$, and +\begin{equation}\label{eq:phase-conjugation} + \mathcal P_MX_v\mathcal P_M^{-1}=X_{Mv}. +\end{equation} +Extend $v_1,\ldots,v_{\rho_{\rm edge}}$ to a basis of $\mathbb F_2^m$ and take these vectors as +the first $\rho_{\rm edge}$ columns of $M$. The displayed edge identity +then becomes +\begin{equation}\label{eq:phase-edge-coordinate} + \mathcal C_{U_+}\mathcal C_{U_-}^{-1} + =\mathcal P_M\left(\prod_{j=1}^{\rho_{\rm edge}}C_{e_j}^{\epsilon_j}\right) + \mathcal P_M^{-1}, +\end{equation} +where $e_j$ is the $j$th standard basis vector. The matrix $M$ need not +preserve the dot product: equation~\eqref{eq:phase-conjugation} only +uses its invertibility. + +For the array layout used below, take a group of $e=mf$ consecutive +axis chunks and divide it into $m$ consecutive slots of $f$ chunks, +numbered in physical order. +Number the chunks within each slot by $j=0,\ldots,f-1$, starting at +its least significant end. Write $x_{h,j}$ for the selected bit in +chunk $j$ of slot $h$, where $1\le h\le m$. Column $j$ is the vector +$(x_{1,j},\ldots,x_{m,j})$. A frame on this group is the tensor +product of the same phase frame +$\mathcal C_U$ of Proposition~\ref{prop:complex-motif-interface} +on these $f$ columns. + +To implement \eqref{eq:phase-edge-coordinate} on the group, first apply +$\mathcal P_M^{-1}$ separately to each column. For each +$1\le h\le\rho_{\rm edge}$, apply $(C^{\epsilon_h})^{\otimes f}$ to the +$f$ bits $x_{h,0},\ldots,x_{h,f-1}$. This is one child operation +on the $f$ axes in slot $h$. Finally apply $\mathcal P_M$ to every +column. A negative directional kernel still requires only one +forward child, because +\begin{equation}\label{eq:phase-inverse-child} + (C^{-1})^{\otimes f} + =(-i)^f Z^{\otimes f}C^{\otimes f}Z^{\otimes f}. +\end{equation} +The rightmost phase is applied first. All inverse wrappers are address +signs and constant fourth-root phases, so they add no recursive calls. + +Gaussian elimination expresses any $M\in\operatorname{GL}(m,\mathbb F_2)$ +as a product of at most $m(m-1)+3m$ elementary row additions: one clears +at most $m-1$ other entries per pivot, and each row swap is three row +additions. Reversing the elimination gives the required product since +each row addition is an involution. The number is a constant because +$m$ is fixed. Adding row $h'$ to row $h$ in every column applies +$x_{h,j}\leftarrow x_{h,j}\mathbin\oplus x_{h',j}$ for every +$0\le j1$, these segments +are disjoint, and the highest one ends immediately below $j_{f-1}$. +Write their initial values in $y$ and $z$ as +\[ + u_i=2g_i+a_i,\qquad w_i=2h_i+b_i, + \qquad a_i,b_i\in\{0,1\}. +\] +The values $g_i,h_i\in\{0,\ldots,2^{K-1}-1\}$ are the guard values. The +control for this pair of segments is the selected bit $c_i=x_{j_i}$. + +Apply each line of \eqref{eq:eight-packed-additions} simultaneously to all +these segment pairs. Physically, a line updating $y$ by sign $\varepsilon$ +and testing parity $b$ of $z$ is the single cyclic shift +\begin{equation} +\label{eq:packed-cyclic-shift} + y\longleftarrow y+ + \varepsilon\sum_{i=0}^{f-2}2^{j_i} + [\,x_{j_i}=1\,][\,z_{j_i}=b\,] + \pmod{2^L}. +\end{equation} +For a line updating $z$, interchange $y$ and $z$ in this formula. +The shift offset never depends on its target chunk, so each line is a +bijection of the rectangle. Let $S_0$ be their composition. It fixes +the spectator coordinates. + +Let $\mathcal B$ consist of the addresses for which +at least one used guard value, in either $y$ or $z$, fails +\begin{equation} +\label{eq:packed-guard-interval} + 10\le g\le 2^{K-1}-11. +\end{equation} +At an address outside $\mathcal B$, each segment initially lies in +$[20,2^K-21]$. Even displacement eight keeps it inside +$[0,2^K-1]$. Inductively, each packed addition therefore agrees with all +the independent segment additions: no segment carries into or borrows +from the next segment. When $f>1$, the bits below $j_0$ and above the +highest used segment are untouched as well. By +\eqref{eq:eight-packed-result}, $S_0$ +then agrees with the ideal permutation $T_0$ that performs the required +XORs at $j_0,\ldots,j_{f-2}$ and fixes all other address coordinates. + +There are exactly twenty excluded values for each guard in +\eqref{eq:packed-guard-interval}. Since its complete range has +$2^{K-1}$ values, the union bound over the $2(f-1)$ guards gives +\begin{equation} +\label{eq:packed-bad-fraction} + |\mathcal B|\le\delta_{\rm bad}M. +\end{equation} +Indeed, the complete $y,z$ ranges give the same guard distribution at +each choice of spectator coordinates. No record value enters this count. + +The ideal map $T_0$ preserves all guard values and therefore preserves +$\mathcal B$. Both $T_0$ and $S_0$ are bijections, and they agree off +$\mathcal B$. Taking complements in the finite rectangle gives +\[ + S_0(\mathcal B^c)=T_0(\mathcal B^c)=\mathcal B^c, + \qquad S_0(\mathcal B)=\mathcal B. +\] +Thus $T_0S_0^{-1}$ fixes $\mathcal B^c$ and permutes $\mathcal B$. +It remains to implement the rotations and this correction on tapes. + +For one rotation, move its target to the rightmost of the three chunk +positions if necessary. Let $P^{\rm sw}$ be the product of the record +field lengths before the earlier exchanged chunk, let $G^{\rm sw}$ +be the product between the exchanged chunks, and let $B^{\rm sw}$ be +$R$ times the product after the later one. Empty products are one. +The bit array has exactly the shape +\[ + [P^{\rm sw}]\times[2^L]\times[G^{\rm sw}] + \times[2^L]\times[B^{\rm sw}]. +\] +The third chunk lies inside one collapsed spectator interval. +Pass only $L$ and these three positive canonical lengths to +Lemma~\ref{lem:chunk-swap}. Each length is at most $V$, so the local +descriptor has $O(A_{\rm rect})$ bits. The swap costs $O(VL^\tau)$, including +its own padding and cleanup. + +The equal chunk lengths leave the field-length list unchanged by a +completed swap. Keep the permutation of the logical names $x,y,z$ in +finite local state. With the target now after its two controls, collapse +the remaining intervals to obtain +\[ + [\Lambda_0]\times[2^L]_{\rm control\,1}\times[\Lambda_1] + \times[2^L]_{\rm control\,2}\times[\Lambda_2] + \times[2^L]_{\rm target}\times[B_{\rm rot}], +\] +where $B_{\rm rot}$ includes the payload and every displayed spectator +length is positive. Their product with the chunk lengths is $V$. +Together with $K,f,\rho$ and the finite name permutation, these fixed +canonical lengths form an $O(A_{\rm rect})$-bit local descriptor. The offset +routine receives the two current $L$-bit logical control values. A scan +of at most $f\le L$ selected positions evaluates +\eqref{eq:packed-cyclic-shift} in $L^{O(1)}$ time, without reading the +target or spectator values. Lemma~\ref{lem:ordered-affine-streams} +therefore gives an $O(V)$ rotation: its offset work is absorbed by the +$2^L$ nonempty target blocks in each fiber. Undo the swap after the +rotation. The local descriptors and name permutation are updated at +completed swap boundaries; the primitives use their own descriptors +inside padded layouts. +There are at most sixteen swaps and eight rotations in $S_0$. + +To implement the correction, scan the stream with a record-rank counter. +All chunk names are back in their original positions. Dividing the +current rank through the fixed seven field lengths recovers the three +chunk values and their mixed-radix record strides. The strides exclude +the $R$ payload bits. All involved integers have $O(A_{\rm rect})$ bits, so +schoolbook arithmetic, descriptor copying, and resets take at most +$O(A_{\rm rect}^3)$ per record. Test membership in $\mathcal B$ and extract just +those records. For a current exceptional address $q$, compute +$q'=T_0(S_0^{-1}(q))$ by reversing the eight modular additions with +negated offsets, then applying the selected XORs directly. Each reversed +mask uses the current controls of that reversed line. There are at most +$f\le L\le A_{\rm rect}$ selected positions, so this calculation also fits +$O(A_{\rm rect}^3)$ time. + +If $q_h,q'_h$ are the current and destination values of chunk +$h\in\{x,y,z\}$ and $\sigma_h$ is its record stride, the fixed +spectator coordinates give +\[ + \operatorname{rank}(q')=\operatorname{rank}(q)+ + \sum_{h\in\{x,y,z\}}(q'_h-q_h)\sigma_h. +\] +The differences are signed. Attach this destination rank, padded to +$\lceil\log_2M\rceil\le A_{\rm rect}$ bits, to the extracted record, and mark its +hole on a fixed track of the full stream. Hold the full stream untouched +while stable binary radix sorting scans only the extracted records and +keys, least significant key bit first. Since $T_0S_0^{-1}$ permutes +$\mathcal B$, these keys are distinct and are exactly the ranks of the +marked holes. One forward full-stream scan reinserts the sorted records. +This implements $T_0$ everywhere. + +Finally apply the two-bit XOR to $x_{j_{f-1}},y_{j_{f-1}}$ by +Lemma~\ref{lem:elementary-streams}, splitting those chunks at the +selected positions and collapsing the other intervals. Its descriptor +again has a fixed number of positive lengths, each at most $V$. +This costs $O(V)$ and supplies the omitted selected position. When +$f=1$, $S_0,T_0$ are identities, $\mathcal B$ is empty, and this last +step is the entire algorithm. + +The movement costs $O(V(L^\tau+1))$. A fixed number of full record scans +costs $O(MA_{\rm rect}^3+V)$, and the at most $A_{\rm rect}$ radix passes cost +$O(|\mathcal B|A_{\rm rect}(R+A_{\rm rect}))$; skip them when the extracted bank is empty. +The initial descriptor has a fixed number of canonical integers of +$O(A_{\rm rect})$ bits, so its preparation is covered by $O(MA_{\rm rect}^3)$. +All counters, positioning, rewinds, and cleanup are included. +Equation~\eqref{eq:packed-bad-fraction} proves +\eqref{eq:packed-rectangle-time} on a fixed number of tapes. +After division by $V=MR$, its additional terms are bounded by +$A_{\rm rect}^3/R$ and +$80(f-1)2^{-K}A_{\rm rect}(1+A_{\rm rect}/R)$. Under the stated family bounds +the first tends to zero, and the second is +$O(p^2 2^{-K}(1+A_{\rm rect}/R))=o(1)$. This proves the final assertion. +\end{proof} + +\paragraph{Application to a fixed binary change of basis.} +An invertible matrix over $\mathbb F_2$ of fixed order $m\ge3$ is a +product of a fixed number of elementary row additions; a row exchange +is three such additions. In one invocation of the finite network on +$e=mf$ axes, slot $h$ consists of $f$ consecutive $K$-bit axis chunks. +It therefore has address-bit width $L=fK$, and its selected bits +$x_{h,j}$ occupy positions $\rho+jK$ for $0\le j1$. +For these fixed choices +there are a cutoff $p_0$, one fixed finite-alphabet multitape procedure, +and an implicit time constant with the following guarantee. The cutoff +and time constant may depend on the fixed rational parameters +and these constants. For every choice of positive integers $p,d,r$ +with $p\ge p_0$ and +\[ + a_dp^\epsilon\le d\le b_dp^\epsilon,\qquad + 2^{a_rp/d}\le r\le 2^{b_rp/d}, +\] +put $K=\lfloor d^c\rfloor$, and let $1\le D\le d$, $P,S\ge1$, and +$0\le\rho0$ +and $C_w>1$, and choose the layer constants once as +\[ + C_M=C_\ell+1,\qquad + C_{\rm desc}=32(C_\ell+C_w+1). +\] +Use these constants and $C_w$ in +Proposition~\ref{prop:simultaneous-layer}. These fixed choices determine +a cutoff $p_1$, one fixed-tape procedure, and an implicit time constant +with the following guarantee. For every choice of positive integers +$p,d,r$ with $p\geq p_1$ and +\[ + a_dp^\epsilon\leq d\leq b_dp^\epsilon,\qquad + 2^{a_rp/d}\leq r\leq2^{b_rp/d}, +\] +suppose $d\geq2$ and $r=2^\ell$ with an integer $2\leq\ell0$. Thus all participating axes in a +common round have current length $u_i=2^{h+1}$. +The branch bit written at position $h$ is frequency bit $a_i-1-h$; +its frequency significance can differ between long and short axes. +The descriptor locates that named slot after $L$, so the physical +move has not changed which pair the current butterfly uses. The +opposite procedure executes this schedule in reverse order and, +when present, ends with the extra leading round on the long axes. + +For a position $h$ in the remaining chunks, the selected bit has +offset $(h-b)\bmod K$, counted from the least significant bit, in +each of the $D$ consecutive chunks with the same chunk index $j$. +Let $n_P$ and $n_S$ be the numbers of record-address bits before and +after that group. Every combination of those bits occurs, so the +layer sees the complete address set +\[ + [P]\times[2^K]^D\times[S],\qquad + P=2^{n_P},\quad S=2^{n_S},\quad + n_P+DK+n_S=\sum_i a_i\leq D\ell=O(p). +\] +Thus its record count is $PS2^{DK}=M$ and +$\log_2(2M)\leq(C_\ell+1)p=C_Mp$. +The current transform parameters supply $p,d,r,K,w$, and the round +determines $D,P,S$ and the selected offset $\rho$. Encode these values +as the header $\mathcal E$ of Proposition~\ref{prop:simultaneous-layer}. +The same fixed descriptor bound covers every axis choice and round. +Indeed $|\Gamma(v)|\leq2\log_2v+1$, and +$\ell+n_P+n_S\leq d\ell\leq C_\ell p$. Also +$d,D\leq\max\{C_\ell,1\}p$, $K,\rho+1\leq p$, and $w\leq C_wp$. +Adding the nine code lengths therefore gives +\[ + |\mathcal E| + \leq 2C_\ell p+12\log_2p+ + 4\log_2\max\{C_\ell,1\}+2\log_2C_w+9 + \leq C_{\rm desc}p. +\] +The last inequality uses $p\geq1$, $\log_2p\leq p$, and +$\log_2x\leq x$ for $x\geq1$. +This is the descriptor passed to the layer; the longer +table locating named slots remains separate for the transform's address +calculations. +The simultaneous-layer procedure therefore applies at cost +$O(Tpd^{\lambda'})$ per round and $O(Tp\ell d^{\lambda'})$ in total. + +In a round on prefix slots, process the participating bits individually. +Temporarily move one such bit immediately before the polynomial +suffix. In each now adjacent pair, buffer the first record and scan +it with the second, writing the half-sums and half-differences to two +work tapes. Append the half-sum record and then the half-difference +record, and reverse the bit move after +all pairs are processed. Including head returns, the work is +$O(rp)$ per pair and $O(Tp)$ for the moves and scans at coefficient +width $O(p)$. +That width suffices without truncating between axes: after $s\leq D$ +individual $H_0$ factors, the coefficients are exact dyadics on the +$2^{-(p+s)}$ grid and still lie in the disk. A temporary sum has +modulus at most two and needs only a constant number of extra integer +bits. Hence +$p+D+O(1)=O(p)$ bits per component suffice, since $D\leq d$ and +$d\ell=O(p)$. Complete the combined monomial exactly and apply +$Q_p$ once at the end of the round. Write the resulting disk-grid +numerators in the supplied $w$-bit component format. Their magnitudes +are at most $2^p$, so this takes one linear scan within the same bound. +In an opposite round on prefix slots the +inverse monomial comes first and preserves the grid and disk, so the +same width bound holds for its individual factors. There are at +most $b+1\leq K$ rounds on prefix slots, giving cost $O(TpdK)$. + +For each output record of a forward butterfly round, the descriptor +locates the new branch bit $b_i$ and the lower named slots that encode +$k_i$. Read their current values to compute +\eqref{eq:combined-twiddle}. Before an opposite round at position +$h$, all lower positions have already been processed in reverse. +Those slots again index the lower inputs of that level, while slot +$h$ still gives $b_i$. They therefore encode the same $k_i$ needed +by the inverse monomial before its +butterfly. The binary descriptions of the addresses, exponent, and +layout have polynomial length in $p$. Ordinary +fixed-tape arithmetic therefore computes the exponent in +$\operatorname{poly}(p)$ time per polynomial record. Each record +contains $\Theta(rp)$ bits, and $r$ dominates every fixed power of +$p$, so this work fits within its scan cost. The same bound covers +scans of the polynomially many round and layout descriptors. +Growing lists reside on tapes; a fixed number of counter and work +tapes suffices for every number of axes. + +To implement the monomial, write $E=er+s$ with $0\leq s1$. +Let $w$ be an integer with $p+2\leq w\leq C_wp$. +The input supplies $\Gamma(p)\Gamma(r)\Gamma(w)$ and two disk grid +polynomials $f,g\in\mathcal R_r$ in the component format of +Proposition~\ref{prop:simultaneous-layer} with width $w$. +One can compute the exact Gaussian integer +numerators of $fg$, and then return $Q_p(fg/r)$ in that same format, in time +$O(rp\log(rp))$ on a fixed number of tapes. The output is a disk +grid polynomial with error less than $\sqrt2\,2^{-p}$ from $fg/r$. +\end{lemma} +\begin{proof} +The supplied power of two $r$ determines $\ell=\log_2r$. +Write +\[ + f=2^{-p}(a+ib),\qquad g=2^{-p}(c+ie), +\] +where $a,b,c,e\in\mathbb Z[y]$ have degree less than $r$ and +coefficients of absolute value at most $2^p$. Set $B_0=2^{4p}$ +and, for $u\in\{a,b,c,e\}$, define the signed evaluation integer +\[ + A_u=u(B_0)=\sum_{j=0}^{r-1}u_jB_0^j. +\] +The bound +\[ + |A_u|\leq2^p\frac{B_0^r-1}{B_0-1}100$ and integers $k>1$, $0\leq j100$, $2\leq sp/\alpha^4. +\] +Define coordinate permutations by +\[ + (P_su)_j=u_{tj},\qquad (P_tv)_k=v_{-sk}. +\] +There are linear contractions $A:\mathbb C^s\to\mathbb C^t$ and +$B_0:\mathbb C^t\to\mathbb C^s$ satisfying +\begin{equation} + P_sF_s=2^{2\alpha^2}B_0P_tF_tA. + \label{eq:no-sort-one-dimensional} +\end{equation} +There are fixed multitape algorithms for approximations +$\widetilde A:\mathbb D_p^s\to\mathbb D_p^t$ and +$\widetilde B_0:\mathbb D_p^t\to\mathbb D_p^s$, each with error less +than $p^2$ and time +\[ + O(tp^{3/2+\delta}\alpha). +\] +The constant is uniform in $p,s,t,\alpha$. Inputs and outputs use the +scalar component format above and occur in increasing coordinate order. +\end{lemma} + +\begin{proof} +The Gaussian resampling argument uses two maps +$\mathsf S,\mathsf T:\mathbb C^s\to\mathbb C^t$. For $0\leq kp/\alpha^4$, we have +$\alpha^2\theta>p/\alpha^2>1$. Thus $\|N-I\|<1/2$, so $N$ is invertible +by the Neumann series. Put +\[ + \mathsf S'=\mathsf S/2,\qquad + \mathsf J'=N^{-1}/2,\qquad + \mathsf D'=2^{-(2\alpha^2-2)}\mathsf D. +\] +The proof of Proposition~4.7(i) in the cited paper gives +\[ + \|\mathsf S'\|<\frac34,\qquad + \|\mathsf J'\|<\frac78,\qquad + \|\mathsf D'\|<1. +\] +Now set $A=\mathsf S'$ and $B_0=\mathsf D'\mathsf J'C$. +Because $\|C\|=1$, both are contractions. The diagonal map $\mathsf D$ +is invertible, and $C\mathsf T=N\mathsf D^{-1}$, so +\[ + (\mathsf D N^{-1}C)\mathsf T + =\mathsf D N^{-1}(N\mathsf D^{-1})=I. +\] +Applying this left inverse to the first identity in +\eqref{eq:gaussian-public-facts} gives +$\mathsf D N^{-1}CP_tF_t\mathsf S=P_sF_s$. The normalizations in +$\mathsf D'$, $\mathsf J'$, and $\mathsf S'$ have product +$2^{-(2\alpha^2-2)}2^{-1}2^{-1}=2^{-2\alpha^2}$. Hence +\[ + B_0P_tF_tA + =2^{-2\alpha^2}\mathsf D N^{-1}CP_tF_t\mathsf S + =2^{-2\alpha^2}P_sF_s, +\] +which is \eqref{eq:no-sort-one-dimensional}. + +\paragraph{Ordered numerical maps.} +Lemmas~4.8, 4.9 and 4.12 of +\cite{HarveyHoeven2021} supply the following algorithms. Their inputs +and outputs are in increasing coordinate order, and every output is in +the disk grid. The record conversions and tape movement needed to use +these routines in our format are accounted for below. Their numerical +guarantees are +\[ +\begin{array}{c|c|c} + \text{map}&\text{error bound}&\text{time bound}\\ \hline + \widetilde{\mathsf S}'&16p&O(tp^{3/2+\delta}\alpha)\\ + \widetilde{\mathsf J}'&3p^2/4&O(tp^{3/2+\delta}\alpha)\\ + \widetilde{\mathsf D}'&4&O(tp^{1+\delta}). +\end{array} +\] +For $C$, observe that $q_0=0$, $q_{s-1}q_j$, +because $t/s>1$. Thus $C$ selects an ordered subsequence. A forward scan, +with the current input coordinate stored on a work tape, copies a record +exactly when that coordinate equals the next $q_j$. + +The selected indices can themselves be generated in order using only +$O(p)$ work per index. Precompute $t=hs+\rho$ with $0\leq\rhoe^{2/\eta}$, the interval +\[ + (1-2\eta)x8d=2/\eta$. +For either choice, the stated lower bound for the number of primes is +$x/(8d\log x)$ and exceeds $d$: +indeed, $\log x=\Theta(p^{1-\epsilon})$, whereas +$\log(8d^2\log x)=O(\log p)=o(\log x)$, so $x>8d^2\log x$ eventually. +The two intervals are disjoint because +$(1-\eta)r/2<(1-2\eta)r$ for $\eta<1/4$, and both intervals lie above +$2$. We may therefore choose distinct odd primes satisfying +\[ + (1-2\eta)t_i + \left(1-\frac1{2d}\right)^d>\frac12 + \qquad(d\geq2). +\] +Together with $s_i\eta$. Therefore +\[ + \alpha^4\theta_i>\frac{12d^2b}{4d}=3db\geq6b=p. +\] +The choice of $\alpha$ gives +$\alpha=\Theta(p^{1/4+\epsilon/2})$, and \eqref{eq:gamma} already +ensures $2\leq\alpha<\sqrt p$ for large $n$. We also have +$t_i\leq r\leq T<8n/b<2^{6b}=2^p$. +Thus every hypothesis of Lemma~\ref{lem:no-sort-resampling} holds for +all sufficiently large input lengths. The superpolynomial growth of $r$ +established above also supplies the setup condition in +Lemma~\ref{lem:tensor-resampling}. + +The machine finds these primes by scanning the two intervals +deterministically and testing each candidate by trial division through +its square root. Testing every candidate would visit $O(r)$ candidates +and at most $O(\sqrt r)$ trial divisors per candidate. Elementary +division on $O(\log r)$-bit integers and management of a list of at most +$d$ selected primes give the conservative bound +$O(dr^{3/2}\operatorname{poly}(p))$. Its logarithm is +\[ + O(\log p+\log r)=O(\log p+p/d)=o(p). +\] +Since $p=6\lceil\log_2 n\rceil=\Theta(\log n)$, the search takes +$n^{o(1)}=o(n)$ time. +All remaining scalar setup, including comparisons for fixed rational +powers, modular inverses, +prime products and shape descriptors, has cost polynomial in $p$. +For example, $d=\lfloor b^{2^{-75}}\rfloor$ is found by binary search +using exact comparisons $d^{2^{75}}\le b$; the exponent is fixed. +The same procedure computes $K$ and all other fixed rational powers. +All primes and length parameters are therefore generated by the machine; +they are not advice. + +\subsubsection{The radix-digit polynomials} + +Write the two inputs as polynomials in $2^b$, each with +$q=\lceil n/b\rceil$ nonnegative digits. Their product has degree at most +\[ + 2q-2<2n/b\le T/2i$ are divisible by $s_i$, and $\mu_iP_i=1$ modulo +$s_i$. Numerical order of $k$ is lexicographic order of +$(a_d,\ldots,a_1)$. Insert the padding in one nested scan of the full +box $\prod_i[0,t_i)$ in this lexicographic order, with $a_d$ the +outermost counter and $a_1$ the innermost. At an address satisfying +$a_i{\raggedright\arraybackslash}p{.40\linewidth}ll@{}} +\toprule +Operation & Normalized cost & Power of $p$\\ +\midrule +Prefix-slot moves and individual butterfly rounds & $dK$ & $\epsilon(1+c)$\\ +Chunk exchanges for transform layout & $pK^{\tau-1}$ & $1-\epsilon c(1-\tau)$\\ +Simultaneous butterfly rounds & $\ell d^{\lambda'}$ & $1-\epsilon(1-\lambda')$\\ +CRT and axis layouts & $d^2(1+\ell^\tau)$ & $\tau+\epsilon(2-\tau)$\\ +Gaussian line maps & $dp^{1/2+\delta}\alpha$ & $3/4+\delta+3\epsilon/2$\\ +Chirps, twists and scalar products & $dp^\delta$ & $\epsilon+\delta$\\ +Packed polynomial products & $\log(rp)$ & $1-\epsilon$\\ +Final scaling and rounding & $p^\delta$ & absorbed above\\ +Input, padding, carries and output & $1$ & absorbed above\\ +\bottomrule +\end{tabular} +\caption{Costs divided by $Tp$; each coefficient +representation has $O(p)$ bits.}\label{tab:costs} +\end{table} + +The seven dominant powers in Table~\ref{tab:costs} have the following +margins below one: +\begin{equation}\label{eq:margin-list} +\begin{split} + g_1&=1-\epsilon(1+c),\qquad + g_2=\epsilon c(1-\tau),\qquad + g_3=\epsilon(1-\lambda'),\\ + g_4&=1-\tau-\epsilon(2-\tau),\qquad + g_5=1/4-\delta-3\epsilon/2,\\ + g_6&=1-\delta-\epsilon,\qquad g_7=\epsilon. +\end{split} +\end{equation} +Direct substitution gives +\[ + g_1>\frac12,\quad g_2=2^{-181},\quad g_3=2^{-129},\quad + g_4>2^{-51},\quad g_5>\frac18,\quad g_6>\frac12,\quad g_7=2^{-75}. +\] +Thus $\min_i g_i=2^{-181}=2\kappa$. This explicit slack will cover +any remaining fixed power of $\log p$. + +Here $d^2$ is absorbed by $d^2\ell^\tau$, and +$\log(rp)=O(p^{1-\epsilon}+\log p)=O(p^{1-\epsilon})$. +The first three rows are the terms in +\eqref{eq:synthetic-transform-cost}. The prefix-slot moves and +individual butterfly rounds in Lemma~\ref{lem:synthetic-transform-cost} +use $O(dK)$ linear scans. Its positional layout uses $O(p/K)$ exchanges +of width-$K$ chunks, because $d\ell=O(p)$. Each exchange costs +$O(VK^\tau)$ by Lemma~\ref{lem:chunk-swap}, so the normalized total is +\[ + O(p/K)\,K^\tau=O(pK^{\tau-1}). +\] +For the at most $\ell$ simultaneous rounds, +Proposition~\ref{prop:simultaneous-layer} supplies $O(Vd^{\lambda'})$ +per round. Its bound already includes the binary basis changes, +deterministic repair, row padding and removal, all base-$m$ groups, +and fixed-tape cleanup. + +Axis exposure and restoration require $O(d^2)$ adjacent axis moves. +Each costs $O(V(1+\ell^\tau))$: peel a single excess bit when widths +differ by one, exchange their equal-width parts, and restore the bit. +The $d$ CRT rotations copy valid and invalid intervals in $O(dV)$ time. +Their offset setup was bounded above by $O(dTp^C/r)=o(Tp)$, +using at most $T/t_i$ control prefixes for target $i$. + +For Gaussian resampling, axis $i$ has at most $T/t_i$ processed lines. +The line-machine costs therefore sum to +\[ + \sum_{i=1}^d\frac{T}{t_i} + O(t_i p^{3/2+\delta}\alpha) + =O(dTp^{3/2+\delta}\alpha). +\] +Dividing by $V=Tp$ gives the fifth row. The factor +$\alpha=\Theta(p^{1/4+\epsilon/2})$ explains its displayed power of $p$. + +Chirp numerators have $O(p)$ bits and can be computed modulo $2r$ as +sums of $d$ terms $s_i j_i^2(r/t_i)$. Computing their squares and +products with the previously established $O(N\log(2N))$ multiplier +on $N$-bit inputs, +then generating the exponentials, costs $O(dp^{1+\delta})$ per entry. +The smaller twist and scalar pointwise-product costs fit the same row: +they use a fixed number of exact products on $O(p)$-bit component +numerators, followed by linear truncation scans. The two final products +by $S$ also cost $O(p\log p)$ per entry, so their normalized cost is +$O(\log p)=O(p^\delta)$ as listed separately. There are $T/r$ +polynomial records in each pointwise ring product. Four integer +products on $O(rp)$ bits per record therefore cost +$O(Tp\log(rp))$ in total. Signed packing, centered extraction, +negacyclic wrapping, and copying are linear stream passes. These calls +use the previously established multiplier on records of length +$O(rp)=o(n)$; they do not call the improved algorithm being constructed. +The exact source scaling by $2^\gamma$ is a shift of $O(p)$-bit +numerators by $\gamma=O(p)$ places, so it is a linear scan per entry +and fits the final-scaling row. The scalar-format adapters and the exact +removal of sign-extension bits after the ring and source scales also use +linear scans of their $O(p)$-bit components, within the listed scan costs. + +\paragraph{Setup and exceptional streams across all calls.} +We next separate setup at recursion nodes from work repeated for every +polynomial record or every Gaussian line. Here a visit means a node +of the layer or address-layout recursions, or one of their round and +group invocations. The internal recursion of the established integer +multiplier and the iterations of the quoted Gaussian algorithms are +already included in their separately charged running times. +The layer and address-layout recursions have constant branching and +depth $O(\log p)$, and the number of their rounds and base-$m$ groups +is polynomial in $p$. Choose a fixed exponent $A$ so that their +total number of visits is at most $p^A$, and a fixed $C$ bounding +descriptor setup performed once per visit by $p^C$ steps. This setup then +costs at most $p^{A+C}=o(Tp)$. + +At a layer or synthetic-transform visit that processes polynomial +records, there are at most $O(T/r)$ such records, including the +bounded row padding. Every relevant child keeps the whole +length-$r$ polynomial suffix. Consequently $O(p^C)$ descriptor or +address work per record, over these visits, costs at most +$O(Tp^{A+C}/r)=o(Tp)$. Setup before each Gaussian line call has a +different count: +there are at most $2dT/r$ lines per tensor map and only a fixed number +of such maps, so $O(p^C)$ setup per line costs +$O(dTp^C/r)=o(Tp)$. These estimates all use that $r$ exceeds every +fixed power of $p$. + +The general address-swap subroutine also covers one-bit payloads, +where no polynomial suffix is available. For root volume $V_0$ and +current child volume $V_j$, the descriptor estimate in the proof of +Proposition~\ref{prop:power-interchange} gives +$(\log(2V_0))^{O(1)}=O(V_j)$. It uses the invariant that both original +chunk ranges remain present in every child, and therefore includes +polynomial descriptor work even for a one-bit payload. +Elementary counter updates use local length copies, so they do not +rescan a growing descriptor for each data bit. The chirp computation +does scan the axis descriptors at every coefficient; its +$O(Tdp^{1+\delta})$ cost was included in the chirp row. + +For one packed change of basis, let $V_{\rm call}$ be its current +logical volume. The bad-address fraction is +$O(d2^{-K})$, independently of the payload. Each polynomial record +has $\Theta(rp)$ payload bits, and an exceptional record adds an +$O(p)$-bit destination key. Thus the compact exceptional stream has +length +\[ + O\!\left(\frac{V_{\rm call}}{rp}\,d2^{-K}(rp+p)\right) + =O(V_{\rm call}d2^{-K}). +\] +Stable bit sorting makes $O(p)$ scans of this stream, for one-call +cost $O(V_{\rm call}dp2^{-K})$. Extraction and reinsertion use a +constant number of scans of the full current volume; those scans are +already in the node overhead. Since there are at most $p^A$ visits, +each of volume $O(V)$, the compact sorting costs sum to at most +\[ + O\!\left(dp2^{-K}\sum_{\rm calls}V_{\rm call}\right) + =O(Vp^{A'}2^{-K})=o(V) +\] +for another fixed exponent $A'$. Here $d=O(p^\epsilon)$ and +$K=\Theta(p^{\epsilon c})$ with $\epsilon c>0$. Predicate and key +arithmetic is the polynomial work per record counted above. This is +a deterministic worst-case bound. + +Finally, all role, arithmetic, and stack tapes form fixed finite +families. A child parks and restores only its parent's streams, with +the stack head at the active top; copying and cleanup are charged to +that logical volume. No operation repeatedly scans parked ancestors. +Growing axis lists and call states are stored data, not extra tapes or +alphabet symbols. Global setup and prime search cost $o(V)$, as +proved earlier. + +Each of the seven displayed powers is at most $1-2\kappa$ by +\eqref{eq:margin-list}. Any fixed power of $\log p$ is at most $p^\kappa$ +eventually. The complete large-input bound is consequently +\[ + O(Tp\,p^{1-\kappa})=O(n(\log n)^{1-\kappa}). +\] +Fix one cutoff beyond all the size, precision, margin and layout +conditions, and use schoolbook multiplication below it. The finitely +many smaller lengths are included by enlarging the implicit constant. +With $\lg n=\max\{\lceil\log_2n\rceil,1\}$, the resulting single +fixed-alphabet, fixed-tape deterministic machine has worst-case time +$O(n(\lg n)^{1-\kappa})$ for every input length and produces precisely +the required $2n$-bit product. diff --git a/research/gf2-full-network/frozen/upstream/build/sections/09-exact-arithmetic.tex b/research/gf2-full-network/frozen/upstream/build/sections/09-exact-arithmetic.tex new file mode 100644 index 0000000000..4c7a1d63c9 --- /dev/null +++ b/research/gf2-full-network/frozen/upstream/build/sections/09-exact-arithmetic.tex @@ -0,0 +1,154 @@ +\section{Exact division and integer square root} +\label{sec:exact-arithmetic-proof} + +Let $n$ be the supplied input width, let $a$ be the nonnegative dividend +or radicand, and let $b>0$ be the divisor for the division task, with +the values and output conventions of Corollary~\ref{cor:exact-arithmetic}. +Here $p\ge1$ denotes an integer target precision for a Newton routine. + +\begin{proof}[Proof of Corollary~\ref{cor:exact-arithmetic}] +We use the classical Newton reductions as presented by +Brent~\cite[Lemmas 2.1--2.4]{Brent1976}, with their tape costs made +explicit. Set $B(p)=p(\lg p)^{1-\kappa}$. A linear scan handles a zero +dividend or radicand and finds the significant bits of a positive input. +For division write $b=2^h c$, where $0\le ha$, and increment it if +$(s_0+1)^2\le a$; otherwise retain it. The remainder and square tests +cover exact quotients and perfect squares. All final significands, trial +answers and exact test products have $O(n)$ bits; their computation costs +$O(B(n))$, and output padding is linear. Leading zeroes +affect neither normalization bound, since $n$ is the supplied input +length. +\end{proof} diff --git a/research/gf2-full-network/frozen/upstream/build/sections/10-transposition.tex b/research/gf2-full-network/frozen/upstream/build/sections/10-transposition.tex new file mode 100644 index 0000000000..e69cc82762 --- /dev/null +++ b/research/gf2-full-network/frozen/upstream/build/sections/10-transposition.tex @@ -0,0 +1,48 @@ +\section{A consequence for matrix transposition} +\label{sec:transposition} + +For positive integers $n_1,n_2,b$, a row-major $n_1\times n_2$ array +of $b$-bit strings stores +entry $(i,j)$, where $0\le i0$; the bounded cases are absorbed +using the stated convention for $\lg$. Thus the cited transposition +cost is $O(m(\lg m)^{1-\kappa})$. Taking $m=n_1n_2b$ expresses this +bound in matrix bits. In particular, an +$n\times n$ binary matrix can be transposed in +$O(n^2(\lg n)^{1-\kappa})$ time. Dimensions equal to one cause no +exception, since our convention gives $\lg1=1$. diff --git a/research/gf2-full-network/frozen/upstream/build/sections/11-grouped-rectangles.tex b/research/gf2-full-network/frozen/upstream/build/sections/11-grouped-rectangles.tex new file mode 100644 index 0000000000..44439c716c --- /dev/null +++ b/research/gf2-full-network/frozen/upstream/build/sections/11-grouped-rectangles.tex @@ -0,0 +1,160 @@ +\section{Packed additions on grouped rectangles} +\label{sec:grouped-rectangles} + +The simultaneous-layer construction uses the rectangular layout of +Lemma~\ref{lem:packed-selected-bit-rectangle}. We record here a more +general version in which a supplied descriptor lists groups with different +spectator lengths. Each group is a complete rectangle, so the full +rectangular algorithm, including its deterministic repair, can be applied +to one group at a time. The only additional work is reading the group +descriptors and passing consecutive groups through the same local tapes. + +\begin{definition}[Grouped packed stream] +\label{def:grouped-packed-stream} +Let $M,R\ge1$, $K\ge6$, $f\ge1$, $L=fK$, and $0\le\rho7/8" + authors: ["OpenAI"] + id: ../preprints/The-Quasi-Riemann-Hypothesis-September-30-2026/paper.pdf + type: article + + - title: "The second Kahn–Kalai conjecture" + authors: ["OpenAI"] + id: ../preprints/The-second-Kahn-Kalai-conjecture-September-24-2026/paper.pdf + type: article + + - title: "The sharp factor-of-IID threshold for the free Ising model on regular trees" + authors: ["OpenAI"] + id: ../preprints/The-sharp-factor-of-IID-threshold-for-the-free-Ising-model-on-regular-trees-September-26-2026/article.pdf + type: article + + - title: "The strong thin tree conjecture" + authors: ["OpenAI"] + id: ../preprints/The-strong-thin-tree-conjecture-September-23-2026/paper.pdf + type: article + + - title: "The Subcritical Hénon–Lane–Emden Conjecture" + authors: ["OpenAI"] + id: ../preprints/The-Subcritical-Henon-Lane-Emden-Conjecture-September-24-2026/paper.pdf + type: article + + - title: "The symmetric Mahler conjecture and its equality cases" + authors: ["OpenAI"] + id: ../preprints/The-symmetric-Mahler-conjecture-and-its-equality-cases-September-22-2026/paper.pdf + type: article + + - title: "The Unique Games Theorem" + authors: ["OpenAI"] + id: ../preprints/The-Unique-Games-Theorem-September-23-2026/paper.pdf + type: article + + - title: "The weak pinned planar distance theorem" + authors: ["OpenAI"] + id: ../preprints/The-weak-pinned-planar-distance-theorem-September-23-2026/paper.pdf + type: article + + - title: "Thompson's group F is nonamenable" + authors: ["OpenAI"] + id: ../preprints/Thompsons-group-F-is-nonamenable-September-23-2026/paper.pdf + type: article + + - title: "Three fixed points on the symplectic quadric threefold" + authors: ["OpenAI"] + id: ../preprints/A-degenerate-counterexample-to-the-critical-number-Arnold-bound-September-23-2026/paper.pdf + type: article + + - title: "Threshold parallel repetition for finite-dimensional entangled games" + authors: ["OpenAI"] + id: ../preprints/Threshold-parallel-repetition-for-finite-dimensional-entangled-games-September-25-2026/paper.pdf + type: article + + - title: "Tracial projection methods and uniform property Γ" + authors: ["OpenAI"] + id: ../preprints/Tracial-projection-methods-and-uniform-property-Gamma-September-23-2026/paper.pdf + type: article + + - title: "Two limit cycles for quintic Liénard systems" + authors: ["OpenAI"] + id: ../preprints/two-limit-cycles-for-quintic-lienard-systems-September-24-2026/two-limit-cycles-for-quintic-lienard-systems-September-24-2026.pdf + type: article + + - title: "Uniform Bi-Hölder Transport from Weak MTW" + authors: ["OpenAI"] + id: ../preprints/Uniform-Bi-Holder-Transport-from-Weak-MTW-September-25-2026/paper.pdf + type: article + + - title: "Uniform exclusion of Landau–Siegel zeros" + authors: ["OpenAI"] + id: ../preprints/Uniform-exclusion-of-Landau-Siegel-zeros-October-1-2026/paper.pdf + type: article + + - title: "Unitarizability implies amenability for discrete groups" + authors: ["OpenAI"] + id: ../preprints/Unitarizability-Implies-Amenability-for-Countable-Groups-September-23-2026/paper.pdf + type: article + + - title: "Universal-cover splitting for compact Kähler manifolds" + authors: ["OpenAI"] + id: ../preprints/Universal-cover-splitting-for-compact-Kahler-manifolds-September-23-2026/paper.pdf + type: article + + - title: "Weak Hessian bounds along every geodesic in RCD spaces" + authors: ["OpenAI"] + id: ../preprints/Weak-Hessian-bounds-along-every-geodesic-in-RCD-spaces-September-24-2026/weak-hessian-geodesics.pdf + type: article + +related_formalizations: + # Imported libraries, ordered by direct import count in project Lean sources. + - id: https://github.com/leanprover-community/mathlib4 + relationship: builds-on + + - id: https://github.com/AlexKontorovich/PrimeNumberTheoremAnd + relationship: builds-on + + - id: https://github.com/n-yamaguchi-0729/ClassFieldTheory + relationship: builds-on + + - id: https://github.com/CBirkbeck/AINTLIB + relationship: builds-on + + - id: https://github.com/math-inc/strongpnt + relationship: builds-on + + - id: https://github.com/abenenson/rellich-kondrachov + relationship: builds-on + + - id: https://github.com/harfe/fixed-point-theorems-lean4 + relationship: builds-on + + - id: https://github.com/TauCetiProject/TauCeti + relationship: builds-on + + - id: https://github.com/fpvandoorn/carleson + relationship: builds-on + + - id: https://github.com/lana-agents/heights + relationship: builds-on + + - id: https://github.com/Aaron1011/gromov + relationship: builds-on + + - id: https://github.com/lana-agents/iut + relationship: builds-on + + - id: https://github.com/alonamaloh/schoenflies-lean + relationship: builds-on + + - id: https://github.com/leanprover-community/sphere-eversion + relationship: builds-on + + - id: https://github.com/ahhwuhu/zeta_3_irrational + relationship: builds-on + + - id: https://github.com/BennyAvelin/AbsorptionCutoff + relationship: builds-on + + - id: https://github.com/lana-agents/belyi + relationship: builds-on + + - id: https://github.com/PatrickMassot/checkdecls + relationship: builds-on + + - id: https://github.com/leanprover/doc-gen4 + relationship: builds-on + + - id: https://github.com/lana-agents/elliptic-curves + relationship: builds-on + + - id: https://github.com/lana-agents/formal-schemes + relationship: builds-on + + - id: https://github.com/lana-agents/genl + relationship: builds-on + + - id: https://github.com/hanwenzhu/LeanArchitect + relationship: builds-on + + - id: https://github.com/alerad/leancert + relationship: builds-on + + - id: https://github.com/lana-agents/oka + relationship: builds-on + + - id: https://github.com/lana-agents/orbicurve-cores + relationship: builds-on + + - id: https://github.com/lana-agents/pi1 + relationship: builds-on + + - id: https://github.com/b-mehta/PrimeCert + relationship: builds-on + + - id: https://github.com/lana-agents/tate-curves-theta + relationship: builds-on + + - id: https://github.com/lana-agents/tempered-fundamental-groups + relationship: builds-on + +status: + scope: "Partial progress." + # Entries use source-qualified declaration names and the files containing them. + main_results: + - comparator_config: ComparatorChallenges/AbhyankarSathaye.json + declaration: OAI.AbhyankarSathaye.exists_noncoordinate_polynomial + file: OAI/AlgebraicGeometry/AbhyankarSathaye/Counterexample.lean + + - comparator_config: ComparatorChallenges/AmplitudeDamping.json + declaration: OAI.GAD.main + file: OAI/InformationTheory/AmplitudeDamping/Main.lean + + - comparator_config: ComparatorChallenges/ArnoldCounterexample.json + declaration: OAI.ArnoldCounterexample.main + file: OAI/Geometry/Arnold/Main.lean + + - comparator_config: ComparatorChallenges/ArtinCAT0.json + declaration: OAI.ArtinCAT0.main + file: OAI/GroupTheory/ArtinCAT0/Main.lean + + - comparator_config: ComparatorChallenges/AsymptoticallyMinimalLittlewood.json + declaration: OAI.AsymptoticallyMinimalLittlewood.main + file: OAI/Analysis/Littlewood/Main.lean + + - comparator_config: ComparatorChallenges/AuslanderReiten.json + declaration: OAI.ArExplicit.Statement.main + file: OAI/Algebra/AuslanderReiten/All.lean + + - comparator_config: ComparatorChallenges/BackwardIntertwiners.json + declaration: OAI.BackwardIntertwiners.direct_algebra_corollary + file: OAI/Analysis/BackwardIntertwiners/AlgebraCorollary.lean + + - comparator_config: ComparatorChallenges/BassTrace.json + declaration: OAI.BassTrace.RightProjective.bassTraceModules_vanishing_and_support + file: OAI/RingTheory/BassTrace/Main.lean + + - comparator_config: ComparatorChallenges/BiholderTransport.json + declaration: OAI.WeakMTWTransport.uniform_biHolder_transport + file: OAI/Analysis/BiholderTransport/Main.lean + + - comparator_config: ComparatorChallenges/BinPackingGap.json + declaration: OAI.BinPackingGap.main_results + file: OAI/Computability/BinPacking/Main.lean + + - comparator_config: ComparatorChallenges/BinaryMatching.json + declaration: OAI.BinaryMatching.deterministic_approximate_counting + file: OAI/Computability/MatchingCount/BinarySolve.lean + + - comparator_config: ComparatorChallenges/BinarySweep.json + declaration: OAI.binary_sweep_contraction_and_mixing + file: OAI/Probability/BinarySweep/Main.lean + + - comparator_config: ComparatorChallenges/BipartiteCrossing.json + declaration: OAI.Zarankiewicz.mainTarget_proof + file: OAI/Combinatorics/Crossing/Main.lean + + - comparator_config: ComparatorChallenges/BorsukNine.json + declaration: OAI.BorsukNine.main_theorem + file: OAI/Geometry/Borsuk/Counterexample.lean + + - comparator_config: ComparatorChallenges/BoundedRecovery.json + declaration: OAI.BoundedRecovery.bounded_recovery + file: OAI/Analysis/ModularRecovery/Recovery.lean + + - comparator_config: ComparatorChallenges/BoundedTreePotentials.json + declaration: OAI.BoundedTreePotentials.TreeCalculus.main_counterexample + file: OAI/Analysis/TreePotential/Main.lean + + - comparator_config: ComparatorChallenges/BoundedTreewidthL1.json + declaration: OAI.BoundedTreewidthL1.main_theorem + file: OAI/Combinatorics/TreewidthL1/Main.lean + + - comparator_config: ComparatorChallenges/Brennan.json + declaration: OAI.Brennan.main_theorem + file: OAI/Analysis/IntegralMeans/Main.lean + + - comparator_config: ComparatorChallenges/BrennanSharp.json + declaration: OAI.Brennan.Sharp.sharp_endpoints + file: OAI/Analysis/IntegralMeans/SharpEndpoints.lean + + - comparator_config: ComparatorChallenges/C0Absorption.json + declaration: OAI.C0Absorption.main_result + file: OAI/Analysis/C0Absorption/Main.lean + + - comparator_config: ComparatorChallenges/CHObstruction.json + declaration: OAI.CHObstruction.main + file: OAI/ModelTheory/Categoricity/Main.lean + + - comparator_config: ComparatorChallenges/CharacterCriterion.json + declaration: OAI.KirchbergRordam.character_criterion + file: OAI/Analysis/CharacterCriterion/Main.lean + + - comparator_config: ComparatorChallenges/ChoicelessPolynomialTime.json + declaration: OAI.CPTSeparation.main + file: OAI/ModelTheory/Choiceless/Separation.lean + + - comparator_config: ComparatorChallenges/CirculantHadamard.json + declaration: OAI.CirculantHadamard.exists_iff_order_one_or_four + file: OAI/LinearAlgebra/CirculantHadamard/Main.lean + + - comparator_config: ComparatorChallenges/ClassicalON.json + declaration: OAI.ClassicalON.main + file: OAI/Probability/ClassicalON/Main.lean + + - comparator_config: ComparatorChallenges/CliqueFreeLog.json + declaration: OAI.CliqueFreeLog.logarithmic_independence_bound + file: OAI/Combinatorics/CliqueFree/Main.lean + + - comparator_config: ComparatorChallenges/CommonBasesFPRAS.json + declaration: OAI.common_bases_fpras + file: OAI/Combinatorics/MatroidCounting/CommonBases.lean + + - comparator_config: ComparatorChallenges/CommutingDerivations.json + declaration: OAI.AbhyankarSathaye.CommutingDerivations.commuting_derivations_with_ordinary_extras + file: OAI/AlgebraicGeometry/CommutingDerivations/OrdinaryExtraMain.lean + + - comparator_config: ComparatorChallenges/CompactBanach.json + declaration: OAI.CompactBanach.main + file: OAI/Geometry/DoublingHilbert/CompactBanach.lean + + - comparator_config: ComparatorChallenges/CompleteCrossing.json + declaration: OAI.Paper170.complete_graph_crossing_number + file: OAI/Combinatorics/CompleteCrossing/Main.lean + + - comparator_config: ComparatorChallenges/CompleteCrouzeix.json + declaration: OAI.CompleteCrouzeix.main + file: OAI/Analysis/NumericalRange/Main.lean + + - comparator_config: ComparatorChallenges/ComplexCancellation.json + declaration: OAI.ComplexCancellation.main + file: OAI/Algebra/AffineCancellation/Main.lean + + - comparator_config: ComparatorChallenges/Conductivity.json + declaration: OAI.ScalarConductivity.main_nonuniqueness + file: OAI/Analysis/Conductivity/Main.lean + + - comparator_config: ComparatorChallenges/ConjugatePoints.json + declaration: OAI.ThreeManifold.main_theorem + file: OAI/Geometry/ConjugatePoints/ThreeManifold.lean + + - comparator_config: ComparatorChallenges/ContinuumTransition.json + declaration: OAI.ContinuumTemperature.main_theorem + file: OAI/Probability/ContinuumTransition/Main.lean + + - comparator_config: ComparatorChallenges/CoordinateSweeps.json + declaration: OAI.CoordinateSweeps.conditional_main + file: OAI/Probability/CoordinateSweeps/Main.lean + + - comparator_config: ComparatorChallenges/Cotype.json + declaration: OAI.Cotype.mainTarget_proved + file: OAI/Analysis/Cotype/Main.lean + + - comparator_config: ComparatorChallenges/CoulombIonization.json + declaration: OAI.CoulombAtom.generalized_ionization + file: OAI/Analysis/CoulombIonization/Main.lean + + - comparator_config: ComparatorChallenges/CourtadeKumar.json + declaration: OAI.LeanBlast.CourtadeKumar.courtadeKumarAndAttainment + file: OAI/InformationTheory/BooleanNoise/Main.lean + + - comparator_config: ComparatorChallenges/CriticalSK.json + declaration: OAI.CriticalSK.covariance_and_linear_tests + file: OAI/MathematicalPhysics/CriticalSK/Rayleigh.lean + + - comparator_config: ComparatorChallenges/CriticalSKMixing.json + declaration: OAI.CriticalSK.critical_mixing_bounds + file: OAI/MathematicalPhysics/CriticalMixing/Main.lean + + - comparator_config: ComparatorChallenges/CriticalZ3.json + declaration: OAI.CriticalZ3.critical_no_infinite + file: OAI/Probability/CriticalZ3/Main.lean + + - comparator_config: ComparatorChallenges/CycleDecomposition.json + declaration: OAI.ErdosGallai.erdos_gallai + file: OAI/Combinatorics/CycleDecomposition/Main.lean + + - comparator_config: ComparatorChallenges/DaugavetModuli.json + declaration: OAI.ExactModuli.exact_example + file: OAI/Analysis/Daugavet/Main.lean + + - comparator_config: ComparatorChallenges/DegreeRigidity.json + declaration: OAI.TuringRigidity.ManuscriptMain.rigidity + file: OAI/Computability/DegreeRigidity/Main.lean + + - comparator_config: ComparatorChallenges/DeligneDrinfeld.json + declaration: OAI.DeligneDrinfeld.main + file: OAI/Algebra/Drinfeld/Completion.lean + + - comparator_config: ComparatorChallenges/DepthThree.json + declaration: OAI.DepthThreeLowerBound.exists_polynomial_time_language_depth_three_lower_bound + file: OAI/Computability/DepthThree/Main.lean + + - comparator_config: ComparatorChallenges/DiamondDistortion.json + declaration: OAI.DiamondDistortion.headline_all_pairs + file: OAI/Analysis/DiamondDistortion/Descent.lean + + - comparator_config: ComparatorChallenges/DirectCrouzeix.json + declaration: OAI.DirectCrouzeix.complete_crouzeix + file: OAI/Analysis/DirectCrouzeix/CompleteBound.lean + + - comparator_config: ComparatorChallenges/DirectionalBallisticity.json + declaration: OAI.DirectionalTransience.directional_transience_implies_ballisticity + file: OAI/Probability/Ballisticity/Main.lean + + - comparator_config: ComparatorChallenges/DirichletSevenEighths.json + declaration: OAI.DirichletCharacter.LFunction_ne_zero_of_seven_eighths_lt_re + file: OAI/NumberTheory/DirichletL/Nonvanishing.lean + + - comparator_config: ComparatorChallenges/DixmierAllDiscrete.json + declaration: OAI.Dixmier.current_main_theorem + file: OAI/Analysis/Unitarizability/AllDiscrete.lean + + - comparator_config: ComparatorChallenges/DoublingHilbert.json + declaration: OAI.DoublingHilbert.main + file: OAI/Geometry/DoublingHilbert/Main.lean + + - comparator_config: ComparatorChallenges/EgyptianFractions.json + declaration: OAI.Problem337.main_double_log_order + file: OAI/NumberTheory/EgyptianFractions/Main.lean + + - comparator_config: ComparatorChallenges/EgyptianFractions.json + declaration: OAI.Problem337.counting_double_log_order + file: OAI/NumberTheory/EgyptianFractions/Main.lean + + - comparator_config: ComparatorChallenges/EgyptianFractions.json + declaration: OAI.Problem337.prescribed_denominator_corollary + file: OAI/NumberTheory/EgyptianFractions/Main.lean + + - comparator_config: ComparatorChallenges/EntangledGames.json + declaration: OAI.ThresholdParallelRepetition.threshold_parallel_repetition + file: OAI/Probability/EntangledGames/Main.lean + + - comparator_config: ComparatorChallenges/EuclideanFiveColor.json + declaration: OAI.EuclideanFiveColor.no_proper_five_coloring + file: OAI/Geometry/PlaneColoring/Five.lean + + - comparator_config: ComparatorChallenges/EuclideanRamsey.json + declaration: OAI.EuclideanRamsey.classification + file: OAI/Combinatorics/EuclideanRamsey/Main.lean + + - comparator_config: ComparatorChallenges/ExactFourier.json + declaration: OAI.ExactFourier.main_theorem + file: OAI/Computability/FourierCircuit/Main.lean + + - comparator_config: ComparatorChallenges/FactorGeneration.json + declaration: OAI.Generator.single_generation_of_II1_separable_predual + file: OAI/Analysis/FactorGeneration/Main.lean + + - comparator_config: ComparatorChallenges/FinitisticAsymmetry.json + declaration: OAI.LittleFinitistic.extreme_left_right_asymmetry + file: OAI/Algebra/FinitisticAsymmetry/Main.lean + + - comparator_config: ComparatorChallenges/ForestSpace.json + declaration: OAI.ForestSpace.main_theorem + file: OAI/Analysis/ForestSpace/Main.lean + + - comparator_config: ComparatorChallenges/FoulkesHowe.json + declaration: OAI.Problem346.canonical_foulkes_howe_surjective + file: OAI/RepresentationTheory/FoulkesHowe/Stabilization.lean + + - comparator_config: ComparatorChallenges/FreeIsing.json + declaration: OAI.Problem367.free_ising_factor_iff_threshold + file: OAI/Probability/FreeIsing/Main.lean + + - comparator_config: ComparatorChallenges/GaussianMoat.json + declaration: OAI.GaussianMoat.fullMain + file: OAI/NumberTheory/GaussianMoat/Main.lean + + - comparator_config: ComparatorChallenges/GaussianPropeller.json + declaration: OAI.GaussianPropeller.all_partitions + file: OAI/Probability/GaussianPropeller/Main.lean + + - comparator_config: ComparatorChallenges/GaussianReplacement.json + declaration: OAI.CurrentProjection.hybridBlockMain + file: OAI/Probability/GaussianReplacement/Hybrid.lean + + - comparator_config: ComparatorChallenges/GaussianReplacement.json + declaration: OAI.CurrentProjection.fiberBlockMain + file: OAI/Probability/GaussianReplacement/FiberBlock.lean + + - comparator_config: ComparatorChallenges/GotsmanLinial.json + declaration: OAI.LeanBlast.GotsmanLinial.gotsmanLinialStatement + file: OAI/Combinatorics/GotsmanLinial/Main.lean + + - comparator_config: ComparatorChallenges/GrahamSpherical.json + declaration: OAI.GrahamSpherical.full_main + file: OAI/Combinatorics/SphericalRamsey/Main.lean + + - comparator_config: ComparatorChallenges/GrothendieckElementaryExpansion.json + declaration: OAI.Grothendieck.elementary_expansion + file: OAI/CategoryTheory/Globular/ElementaryExpansion.lean + + - comparator_config: ComparatorChallenges/GroupRingDeterminant.json + declaration: OAI.GroupRingDeterminant.main + file: OAI/Analysis/GroupDeterminants/Main.lean + + - comparator_config: ComparatorChallenges/HarmonicArtin.json + declaration: OAI.HarmonicArtin.salvetti_cover_contractible + file: OAI/Topology/ArtinGroups/Realizations/SalvettiCoverContractible.lean + + - comparator_config: ComparatorChallenges/HarmonicGrowth.json + declaration: OAI.HarmonicCounterexample.main + file: OAI/Geometry/HarmonicGrowth/Main.lean + + - comparator_config: ComparatorChallenges/HeckeSevenEighths.json + declaration: OAI.SevenEighths.HeckeFamily.LFunction_ne_zero_of_seven_eighths_lt_re + file: OAI/NumberTheory/DirichletL/Hecke/Nonvanishing.lean + + - comparator_config: ComparatorChallenges/HenonEmden.json + declaration: OAI.HenonLaneEmden.main_nonexistence + file: OAI/Analysis/HenonEmden/Main.lean + + - comparator_config: ComparatorChallenges/HyperbolicCones.json + declaration: OAI.Paper256.main_result + file: OAI/Analysis/HyperbolicCones/Main.lean + + - comparator_config: ComparatorChallenges/HyperbolicObstruction.json + declaration: OAI.HyperbolicObstruction.main + file: OAI/Geometry/HyperbolicGroups/Main.lean + + - comparator_config: ComparatorChallenges/IndependentProducts.json + declaration: OAI.IndependentProducts.main_general + file: OAI/Analysis/ProductSpaces/WeakNullity.lean + + - comparator_config: ComparatorChallenges/IndependentProducts.json + declaration: OAI.IndependentProducts.main_exponential + file: OAI/Analysis/ProductSpaces/Main.lean + + - comparator_config: ComparatorChallenges/IndependentSets.json + declaration: OAI.LargeIndependentSets.mainTheoremReal + file: OAI/Combinatorics/IndependentSets/Main.lean + + - comparator_config: ComparatorChallenges/InfiniteMatroid.json + declaration: OAI.InfiniteMatroidCounterexample.main + file: OAI/Combinatorics/InfiniteMatroid/Main.lean + + - comparator_config: ComparatorChallenges/IsometricImmersion.json + declaration: OAI.SmoothLocal.Geometry.exists_local_metric_without_local_immersion + file: OAI/Geometry/IsometricImmersion/Main.lean + + - comparator_config: ComparatorChallenges/Jacobsthal.json + declaration: OAI.Erdos970.Erdos970Final.erdos_970_quadratic + file: OAI/NumberTheory/Jacobsthal/Conclusions/QuadraticBound.lean + + - comparator_config: ComparatorChallenges/KMedianRecovery.json + declaration: OAI.MetricKMedianRecovery.global_application + file: OAI/Combinatorics/KMedianRecovery/Main.lean + + - comparator_config: ComparatorChallenges/KahlerSplitting.json + declaration: OAI.UniversalCoverSplitting.main + file: OAI/Geometry/KahlerSplitting/Main.lean + + - comparator_config: ComparatorChallenges/KaplanskyFinitelyPresented.json + declaration: OAI.KaplanskyCounterexample.finitelyPresented_counterexample + file: OAI/RingTheory/DirectFiniteness/FinitelyPresented.lean + + - comparator_config: ComparatorChallenges/KaplanskyQuasitrace.json + declaration: OAI.Kaplansky.kaplansky_quasitrace_counterexample + file: OAI/Analysis/Kaplansky/Main.lean + + - comparator_config: ComparatorChallenges/Laughlin.json + declaration: OAI.Laughlin.mainTarget_proved + file: OAI/Analysis/Laughlin/Main.lean + + - comparator_config: ComparatorChallenges/LiebThirring.json + declaration: OAI.SharpLiebThirring.sharp_lieb_thirring + file: OAI/Analysis/LiebThirring/Main.lean + + - comparator_config: ComparatorChallenges/LipschitzEquivalence.json + declaration: OAI.LipschitzCounterexample.main + file: OAI/Analysis/LipschitzEquivalence/Main.lean + + - comparator_config: ComparatorChallenges/LittleFinitistic.json + declaration: OAI.LittleFinitistic.Main.exists_counterexample + file: OAI/Algebra/Finitistic/Main.lean + + - comparator_config: ComparatorChallenges/LogBrunnMinkowski.json + declaration: OAI.LogBrunnMinkowski.main + file: OAI/Geometry/LogVolume/BrunnMinkowski.lean + + - comparator_config: ComparatorChallenges/LogConcaveQuery.json + declaration: OAI.LogConcaveSampling.exact_source_main + file: OAI/Probability/LogConcave/Main.lean + + - comparator_config: ComparatorChallenges/MahlerConjecture.json + declaration: OAI.SymmetricMahler.symmetric_mahler + file: OAI/Analysis/Mahler/MainTheorem.lean + + - comparator_config: ComparatorChallenges/MarkovType.json + declaration: OAI.MarkovSuperreflexivity.hasNontrivialMarkovType_iff_hasEquivalentUCNorm + file: OAI/Analysis/MarkovType/Main.lean + + - comparator_config: ComparatorChallenges/MatchingEntropy.json + declaration: OAI.MatchingEntropy.entropy_main + file: OAI/Combinatorics/PerfectMatching/Main.lean + + - comparator_config: ComparatorChallenges/MatrixFields.json + declaration: OAI.MatrixAllFields.MatrixMultiplication.AllFieldMain.omega_lt_source_constant + file: OAI/LinearAlgebra/MatrixFields/Conclusions/AllFieldsBound.lean + + - comparator_config: ComparatorChallenges/MatrixMultiplication.json + declaration: OAI.MatrixMultiplication.complex_omega_le_nine_quarters + file: OAI/LinearAlgebra/MatrixMultiplication/Main.lean + + - comparator_config: ComparatorChallenges/MatrixMultiplication.json + declaration: OAI.MatrixMultiplication.complex_alpha_gt_93_div_200 + file: OAI/LinearAlgebra/MatrixMultiplication/Main.lean + + - comparator_config: ComparatorChallenges/MatrixMultiplication.json + declaration: OAI.MatrixMultiplication.complex_rectangular_omega_lt_523_div_250 + file: OAI/LinearAlgebra/MatrixMultiplication/Main.lean + + - comparator_config: ComparatorChallenges/MatrixRemoval.json + declaration: OAI.Problem348.no_polynomial_removal_bound + file: OAI/Combinatorics/MatrixRemoval/Main.lean + + - comparator_config: ComparatorChallenges/MaximalSeshadriConstants.json + declaration: OAI.MaximalSeshadri.Geometry.maximalSeshadriConstants + file: OAI/AlgebraicGeometry/Seshadri/Main.lean + + - comparator_config: ComparatorChallenges/MemoryPrecision.json + declaration: OAI.MemoryPrecision.main + file: OAI/Probability/MemoryPrecision/Main.lean + + - comparator_config: ComparatorChallenges/MetricEntropyDuality.json + declaration: OAI.MetricEntropyDuality.exists_entropy_duality_counterexample_with_covers + file: OAI/Analysis/MetricEntropy/Main.lean + + - comparator_config: ComparatorChallenges/MidpointLenses.json + declaration: OAI.SegmentLenses.midpoint_lens_main + file: OAI/Analysis/SegmentLenses/Main.lean + + - comparator_config: ComparatorChallenges/Nagata.json + declaration: OAI.Nagata.nagata_conjecture + file: OAI/AlgebraicGeometry/PlaneCurves/Nagata.lean + + - comparator_config: ComparatorChallenges/OddKaplansky.json + declaration: OAI.OddKaplansky.main_theorem + file: OAI/Algebra/OddKaplansky/Main.lean + + - comparator_config: ComparatorChallenges/OneWayLiveness.json + declaration: OAI.OneWayLiveness.main_theorem + file: OAI/Combinatorics/Automata/Main.lean + + - comparator_config: ComparatorChallenges/OptimalMaxCut.json + declaration: OAI.OptimalMaxCut.main + file: OAI/Computability/MaxCut/Main.lean + + - comparator_config: ComparatorChallenges/PartitionPrinciple.json + declaration: OAI.PartitionPilot.Forcing.TransitiveGround.exists_model_partitionPrinciple_without_choice + file: OAI/SetTheory/PartitionPrinciple/Models/Separation.lean + + - comparator_config: ComparatorChallenges/PerfectCompleteness.json + declaration: OAI.PerfectCompleteness.Theorem11.exists_reduction + file: OAI/Computability/PerfectCompleteness/Theorem11.lean + + - comparator_config: ComparatorChallenges/PeriodicTilingThree.json + declaration: OAI.PeriodicTilingThree.periodic_tiling_counterexample_and_minimality + file: OAI/Geometry/PeriodicTiling/Counterexample.lean + + - comparator_config: ComparatorChallenges/PettyProjectionVolume.json + declaration: OAI.PettyProjection.petty_projection_volume + file: OAI/Geometry/ProjectionBodies/Main.lean + + - comparator_config: ComparatorChallenges/PinchedKahler.json + declaration: OAI.PinchedHartogs.main_theorem + file: OAI/Geometry/Kahler/Main.lean + + - comparator_config: ComparatorChallenges/PinnedDistances.json + declaration: OAI.WeakPinned.main + file: OAI/Geometry/PinnedDistances/Main.lean + + - comparator_config: ComparatorChallenges/PlanarFalconer.json + declaration: OAI.PlanarFalconer.mainTarget_proved + file: OAI/MeasureTheory/Falconer/Main.lean + + - comparator_config: ComparatorChallenges/PlanarFirstPassage.json + declaration: OAI.PlanarFPP.manuscriptMain + file: OAI/Probability/FirstPassage/BoundaryCurve.lean + + - comparator_config: ComparatorChallenges/PlanarL1.json + declaration: OAI.PlanarL1.planar_graph_metrics_embed_L1 + file: OAI/Combinatorics/PlanarL1/Embedding.lean + + - comparator_config: ComparatorChallenges/PlaneColoring.json + declaration: OAI.Problem160.properColoring_seven + file: OAI/Geometry/PlaneColoring/Seven.lean + + - comparator_config: ComparatorChallenges/PosteriorReplicas.json + declaration: OAI.PosteriorReplicas.source_main + file: OAI/Probability/PosteriorReplicas/Main.lean + + - comparator_config: ComparatorChallenges/PowerFreeValues.json + declaration: OAI.QuarticPowerFree.allDegrees + file: OAI/NumberTheory/PowerFree/Main.lean + + - comparator_config: ComparatorChallenges/ProjectionCounterexample.json + declaration: OAI.ProjectionCounterexample.universal_simplex_upper_bound_false + file: OAI/Geometry/ProjectionBody/Counterexample.lean + + - comparator_config: ComparatorChallenges/ProjectionMoments.json + declaration: OAI.ProjectionMoments.main + file: OAI/Probability/ProjectionMoments/Main.lean + + - comparator_config: ComparatorChallenges/ProjectionVolume.json + declaration: OAI.Paper092.product_counterexample + file: OAI/Geometry/ProjectionVolume/ProductCounterexample.lean + + - comparator_config: ComparatorChallenges/QACParity.json + declaration: OAI.QAC.parity_lower_bound + file: OAI/InformationTheory/QuantumCircuit/Parity.lean + + - comparator_config: ComparatorChallenges/QuadricBundles.json + declaration: OAI.QuadricCounterexample.main_theorem + file: OAI/Geometry/QuadricBundles/Main.lean + + - comparator_config: ComparatorChallenges/QuantitativeVanDerWaerden.json + declaration: OAI.QuantitativeVanDerWaerden.uniform_lower_bound + file: OAI/Combinatorics/ProgressionColoring/Main.lean + + - comparator_config: ComparatorChallenges/QuasiRiemannHypothesis.json + declaration: OAI.riemannZeta_ne_zero_of_seven_eighths_lt_re + file: OAI/NumberTheory/DirichletL/Nonvanishing.lean + + - comparator_config: ComparatorChallenges/QuinticLienard.json + declaration: OAI.QuinticLienard.main + file: OAI/Analysis/LienardCycles/Main.lean + + - comparator_config: ComparatorChallenges/RadialTransition.json + declaration: OAI.RadialTransition.main + file: OAI/Probability/RadialTransition/Main.lean + + - comparator_config: ComparatorChallenges/RandomizedMeanPayoff.json + declaration: OAI.randomized_quasipolynomial_mean_payoff + file: OAI/Computability/RandomMean/Main.lean + + - comparator_config: ComparatorChallenges/RationalHitting.json + declaration: OAI.RationalHitting.main + file: OAI/Computability/RationalHitting/Main.lean + + - comparator_config: ComparatorChallenges/RecursivePotentials.json + declaration: OAI.ComparatorModel.RecursivePotentials.main + file: OAI/Analysis/RecursivePotentials/Challenge.lean + + - comparator_config: ComparatorChallenges/ReflexiveFixedPoints.json + declaration: OAI.ReflexiveFixedPoints.exists_fixedPoint_of_canonicallyReflexive + file: OAI/Analysis/Nonexpansive/Main.lean + + - comparator_config: ComparatorChallenges/RegularParity.json + declaration: OAI.QAC.parity_lower_bound_polynomial_size + file: OAI/InformationTheory/QuantumCircuit/Main.lean + + - comparator_config: ComparatorChallenges/RieszQuantitative.json + declaration: OAI.RieszRectifiability.quantitative_higher_codimension_riesz_rectifiability + file: OAI/Analysis/RieszRectifiability/Uniformity/Rectifiability.lean + + - comparator_config: ComparatorChallenges/RyserCovering.json + declaration: OAI.RyserCoveringCounterexample.exists_prime_eventually_counterexampleRank + file: OAI/Combinatorics/Ryser/Construction/Main.lean + + - comparator_config: ComparatorChallenges/RyserOddExtensions.json + declaration: OAI.RyserOdd.eventualOddFailures_and_infinite + file: OAI/Combinatorics/Ryser/OddExtensions.lean + + - comparator_config: ComparatorChallenges/Saxl.json + declaration: OAI.Saxl.saxl_conjecture + file: OAI/RepresentationTheory/Saxl/Main.lean + + - comparator_config: ComparatorChallenges/SecondKahnKalai.json + declaration: OAI.LeanBlast.SecondKahnKalai.secondKahnKalaiBounds + file: OAI/Combinatorics/GraphThreshold/Main.lean + + - comparator_config: ComparatorChallenges/SelfSimilar.json + declaration: OAI.EntropyRateDimension.entropy_rate_dimension + file: OAI/MeasureTheory/SelfSimilar/Main.lean + + - comparator_config: ComparatorChallenges/SensitivitySeparation.json + declaration: OAI.Paper320.quantitative_separation + file: OAI/Combinatorics/Sensitivity/Separation.lean + + - comparator_config: ComparatorChallenges/SeymourSecondNeighborhood.json + declaration: OAI.SeymourSecondNeighborhood.exists_goodVertex + file: OAI/Combinatorics/SecondNeighborhood/Main.lean + + - comparator_config: ComparatorChallenges/SiegelZeros.json + declaration: OAI.SiegelZeros.WeightedTorusJets.exists_absolute_real_zero_gap + file: OAI/NumberTheory/SiegelZeros/Conclusions/Theorem.lean + + - comparator_config: ComparatorChallenges/SignedFiniteBand.json + declaration: OAI.SignedDisk.CenteredDiskEndpoint.main_signed_finite_band + file: OAI/Analysis/SignedDisk/Main.lean + + - comparator_config: ComparatorChallenges/SimpleAmenable.json + declaration: OAI.SimpleAmenable.main + file: OAI/GroupTheory/SimpleAmenable/Main.lean + + - comparator_config: ComparatorChallenges/SingleFold.json + declaration: OAI.SingleFold.main + file: OAI/NumberTheory/SingleFold/Main.lean + + - comparator_config: ComparatorChallenges/SingleLatticeCovering.json + declaration: OAI.SingleLatticeCovering.single_lattice_covering + file: OAI/Geometry/LatticeCovering/Main.lean + + - comparator_config: ComparatorChallenges/SingletonLoopMatching.json + declaration: OAI.LoopMatching.fullEndpoint + file: OAI/Computability/LoopMatching/Main.lean + + - comparator_config: ComparatorChallenges/SmoothYau.json + declaration: OAI.YauCounterexamples.sphere_three + file: OAI/Geometry/SmoothYau/SphereMetric/ThreeSphere.lean + + - comparator_config: ComparatorChallenges/SmoothYau.json + declaration: OAI.YauCounterexamples.sphere_two_torus_two + file: OAI/Geometry/SmoothYau/ProductMetric/SphereProduct.lean + + - comparator_config: ComparatorChallenges/SteinitzBergstrom.json + declaration: OAI.EuclideanSteinitzBergstrom.main + file: OAI/Analysis/Steinitz/Main.lean + + - comparator_config: ComparatorChallenges/StrictMeans.json + declaration: OAI.StrictInverseFirstPower.main + file: OAI/Analysis/StrictMeans/Main.lean + + - comparator_config: ComparatorChallenges/StrongThinTree.json + declaration: OAI.StrongThinTree.strongThinTree + file: OAI/Combinatorics/ThinTrees/Main.lean + + - comparator_config: ComparatorChallenges/StructuralCrouzeix.json + declaration: OAI.StructuralCrouzeixReference.challenge + file: OAI/Analysis/StructuralCrouzeix/Endpoint.lean + + - comparator_config: ComparatorChallenges/SubpolynomialLp.json + declaration: OAI.SubpolynomialLp.source_main + file: OAI/Analysis/LpDimension/Main.lean + + - comparator_config: ComparatorChallenges/SubsphereCurrent.json + declaration: OAI.SubsphereCurrent.full_current_main_scope + file: OAI/Probability/Subsphere/Main.lean + + - comparator_config: ComparatorChallenges/Superstring.json + declaration: OAI.Superstring.main + file: OAI/Computability/Superstring/Main.lean + + - comparator_config: ComparatorChallenges/SymmetricDomains.json + declaration: OAI.Release061.main + file: OAI/Analysis/SymmetricDomains/Main.lean + + - comparator_config: ComparatorChallenges/SymmetricMahlerEquality.json + declaration: OAI.SymmetricMahler.symmetric_mahler_equality + file: OAI/Analysis/Mahler/Classification.lean + + - comparator_config: ComparatorChallenges/SymmetricPolar.json + declaration: OAI.SymmetricPolar.symmetric_polar_main + file: OAI/Geometry/PolarProducts/Main.lean + + - comparator_config: ComparatorChallenges/Tachikawa.json + declaration: OAI.Tachikawa.main_theorem + file: OAI/RingTheory/Tachikawa/Counterexample.lean + + - comparator_config: ComparatorChallenges/TalagrandDiscreteConvexity.json + declaration: OAI.TalagrandDiscreteConvexity.talagrand_discrete_convexity + file: OAI/Combinatorics/DiscreteConvexity/Main.lean + + - comparator_config: ComparatorChallenges/TalagrandExpectationThreshold.json + declaration: OAI.TalagrandThreshold.talagrand_expectation_threshold_equivalence + file: OAI/Combinatorics/ExpectationThreshold/Main.lean + + - comparator_config: ComparatorChallenges/TamingCompatibility.json + declaration: OAI.TamingCompatibility.taming_implies_compatibility + file: OAI/Geometry/TamingCompatibility/Main.lean + + - comparator_config: ComparatorChallenges/ThompsonNonamenability.json + declaration: OAI.ThompsonNonamenability.thompson_F_nonamenable_composition + file: OAI/GroupTheory/Thompson/Main.lean + + - comparator_config: ComparatorChallenges/ThorpRouting.json + declaration: OAI.ThorpNine.main + file: OAI/Probability/ThorpRouting/Main.lean + + - comparator_config: ComparatorChallenges/ThorpWeightedCompatibility.json + declaration: OAI.ThorpCompatibility.weightedCompatibility_main + file: OAI/Probability/ThorpCompatibility/Main.lean + + - comparator_config: ComparatorChallenges/TingleySphereIsometry.json + declaration: OAI.Tingley.tingley_sphere_isometry_full + file: OAI/Analysis/SphereIsometry/Extension.lean + + - comparator_config: ComparatorChallenges/TorsionFreeHyperbolic.json + declaration: OAI.Release075.main + file: OAI/GroupTheory/Hyperbolic/Main.lean + + - comparator_config: ComparatorChallenges/TorsionFreeZeroDivisors.json + declaration: OAI.TorsionFreeZeroDivisors.main + file: OAI/Algebra/GroupRing/Main.lean + + - comparator_config: ComparatorChallenges/TriangularHilbert.json + declaration: OAI.TriangularHilbert.main_estimate + file: OAI/Analysis/TriangularHilbert/Main.lean + + - comparator_config: ComparatorChallenges/TwoWayComplementation.json + declaration: OAI.TwoWayComplementation.complementation_lower_bound_finite + file: OAI/Combinatorics/TwoWayAutomata/Main.lean + + - comparator_config: ComparatorChallenges/TwoWayDeterminization.json + declaration: OAI.TwoWayComplementation.explicit_family_main + file: OAI/Combinatorics/TwoWayAutomata/ExplicitFamily.lean + + - comparator_config: ComparatorChallenges/UniformGamma.json + declaration: OAI.ComparatorModel.CurrentMain.main + file: OAI/Analysis/TracialSplitting/Challenge.lean + + - comparator_config: ComparatorChallenges/UniformSparsestCut.json + declaration: OAI.UniformSparsestCut.mainGap + file: OAI/Combinatorics/SparsestCut/Main.lean + + - comparator_config: ComparatorChallenges/UniqueGamesTheorem.json + declaration: OAI.UniqueGamesTheorem.theorem11 + file: OAI/Computability/UniqueGames/Theorem.lean + + - comparator_config: ComparatorChallenges/UniversalFInfinity.json + declaration: OAI.UniversalFInfinity.universal_group_of_type_FInfinity + file: OAI/GroupTheory/UniversalGroup/Main.lean + + - comparator_config: ComparatorChallenges/VertexCover.json + declaration: OAI.VertexCover.every_fixed_factor_below_two + file: OAI/Computability/VertexCover/Main.lean + + - comparator_config: ComparatorChallenges/VlasovMaxwell.json + declaration: OAI.RVM.global_classical_solution + file: OAI/Analysis/VlasovMaxwell/Main.lean + + - comparator_config: ComparatorChallenges/WeakHessian.json + declaration: OAI.WeakHessian.every_geodesic + file: OAI/Geometry/WeakHessian/Main.lean + + - comparator_config: ComparatorChallenges/WeakMTWGlobalSupport.json + declaration: OAI.WeakMTWGlobalSupport.current_main_convexity + file: OAI/Geometry/WeakMTW/Convexity.lean + + - comparator_config: ComparatorChallenges/YauCounterexample.json + declaration: OAI.Yau.Target.yau_nodal_set_upper_bound_counterexample + file: OAI/Geometry/NodalSets/Main.lean + +automation: + methods: + - method: agent + +review: + status: unchecked + +acknowledgements: >- + Thank you very much to the authors of Lean 4, mathlib, and the other imported + libraries listed above, as well as to the authors of Lake, Comparator, + lean4export, and related tools. diff --git a/research/gf2-full-network/frozen/upstream/manifest.json b/research/gf2-full-network/frozen/upstream/manifest.json new file mode 100644 index 0000000000..01c309e34d --- /dev/null +++ b/research/gf2-full-network/frozen/upstream/manifest.json @@ -0,0 +1,83 @@ +{ + "commit": "adc7f1241b42e322a6451854ab7e4b4c146bf78a", + "files": { + "LICENSE": { + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "url": "https://raw.githubusercontent.com/openai/math/adc7f1241b42e322a6451854ab7e4b4c146bf78a/LICENSE" + }, + "README.md": { + "sha256": "8d1ceff898a4e0e681679f91c4def485820be9e99f04e4861f2ce601a364723e", + "url": "https://raw.githubusercontent.com/openai/math/adc7f1241b42e322a6451854ab7e4b4c146bf78a/preprints/Integer-multiplication-below-n-log-n-September-23-2026/README.md" + }, + "build/figures/multiplication-flow.tex": { + "sha256": "3654d2728b0c98919d61760e1802804ed616546a747f9167a93e17bb8697f320", + "url": "https://raw.githubusercontent.com/openai/math/adc7f1241b42e322a6451854ab7e4b4c146bf78a/preprints/Integer-multiplication-below-n-log-n-September-23-2026/build/figures/multiplication-flow.tex" + }, + "build/figures/proof-map.tex": { + "sha256": "76d4deacf07bea355412abcfd798c7cbe6dcccef29a4a420a9e2a7b158f23848", + "url": "https://raw.githubusercontent.com/openai/math/adc7f1241b42e322a6451854ab7e4b4c146bf78a/preprints/Integer-multiplication-below-n-log-n-September-23-2026/build/figures/proof-map.tex" + }, + "build/main.tex": { + "sha256": "42f0f506976bc2084374a71e97edc1549689a7accf35dda4db2a18af4f13c1aa", + "url": "https://raw.githubusercontent.com/openai/math/adc7f1241b42e322a6451854ab7e4b4c146bf78a/preprints/Integer-multiplication-below-n-log-n-September-23-2026/build/main.tex" + }, + "build/references.bib": { + "sha256": "33cc2df13ccf85330849e8fb34d4ac7613b23f625787457a5b7b9aa6d7369476", + "url": "https://raw.githubusercontent.com/openai/math/adc7f1241b42e322a6451854ab7e4b4c146bf78a/preprints/Integer-multiplication-below-n-log-n-September-23-2026/build/references.bib" + }, + "build/sections/00-introduction.tex": { + "sha256": "98721f03682ccf1cc7d0850b07adabaa2d8f3afe552e3861753eba9d284d0da0", + "url": "https://raw.githubusercontent.com/openai/math/adc7f1241b42e322a6451854ab7e4b4c146bf78a/preprints/Integer-multiplication-below-n-log-n-September-23-2026/build/sections/00-introduction.tex" + }, + "build/sections/01-history.tex": { + "sha256": "798956c8150c31e3e2f5f29c47110d25ce619faad1374f4d3a0f15fa3ee33ead", + "url": "https://raw.githubusercontent.com/openai/math/adc7f1241b42e322a6451854ab7e4b4c146bf78a/preprints/Integer-multiplication-below-n-log-n-September-23-2026/build/sections/01-history.tex" + }, + "build/sections/02-streams.tex": { + "sha256": "606c80db61cad13aa0c3b6060dc4b88dbbe7ac60cdd831aa93f28d908fd09dab", + "url": "https://raw.githubusercontent.com/openai/math/adc7f1241b42e322a6451854ab7e4b4c146bf78a/preprints/Integer-multiplication-below-n-log-n-September-23-2026/build/sections/02-streams.tex" + }, + "build/sections/03-motifs.tex": { + "sha256": "ed76761194988a01af77ead0ea6469cb5dcd29690ab985a0b5a4006b0f2b69bb", + "url": "https://raw.githubusercontent.com/openai/math/adc7f1241b42e322a6451854ab7e4b4c146bf78a/preprints/Integer-multiplication-below-n-log-n-September-23-2026/build/sections/03-motifs.tex" + }, + "build/sections/04-swap.tex": { + "sha256": "412b170ccaab38dba96e95e3cbfae09f4876a9818f8d278776a746b0f8044906", + "url": "https://raw.githubusercontent.com/openai/math/adc7f1241b42e322a6451854ab7e4b4c146bf78a/preprints/Integer-multiplication-below-n-log-n-September-23-2026/build/sections/04-swap.tex" + }, + "build/sections/05-layers.tex": { + "sha256": "20cfc8d12099d4e4ed9e3e7eeb6162edd9b6e0e076f24693364cd24377252594", + "url": "https://raw.githubusercontent.com/openai/math/adc7f1241b42e322a6451854ab7e4b4c146bf78a/preprints/Integer-multiplication-below-n-log-n-September-23-2026/build/sections/05-layers.tex" + }, + "build/sections/06-transforms.tex": { + "sha256": "924316e4bc905066281d8f9e8746a49d8829aeb393688608deb1e61c3c87853c", + "url": "https://raw.githubusercontent.com/openai/math/adc7f1241b42e322a6451854ab7e4b4c146bf78a/preprints/Integer-multiplication-below-n-log-n-September-23-2026/build/sections/06-transforms.tex" + }, + "build/sections/07-resampling.tex": { + "sha256": "8a6b91670f9163afb54892489fa2210c77fe1b058f0325ec7d18b44b94be6e2c", + "url": "https://raw.githubusercontent.com/openai/math/adc7f1241b42e322a6451854ab7e4b4c146bf78a/preprints/Integer-multiplication-below-n-log-n-September-23-2026/build/sections/07-resampling.tex" + }, + "build/sections/08-assembly.tex": { + "sha256": "763d7945b1e1ec4ebae9b799bcefcc45fa9bae6e2ffad799868a9c3d513dbd4a", + "url": "https://raw.githubusercontent.com/openai/math/adc7f1241b42e322a6451854ab7e4b4c146bf78a/preprints/Integer-multiplication-below-n-log-n-September-23-2026/build/sections/08-assembly.tex" + }, + "build/sections/09-exact-arithmetic.tex": { + "sha256": "5714e5d0656c78c6a1fde8d01fd11f1ba856a7ea94149b283bd9a50fdbf516c3", + "url": "https://raw.githubusercontent.com/openai/math/adc7f1241b42e322a6451854ab7e4b4c146bf78a/preprints/Integer-multiplication-below-n-log-n-September-23-2026/build/sections/09-exact-arithmetic.tex" + }, + "build/sections/10-transposition.tex": { + "sha256": "c14ad8d56112f6578678a58211bc8d63c3a4b60e55078ac73bc38f7348e713cb", + "url": "https://raw.githubusercontent.com/openai/math/adc7f1241b42e322a6451854ab7e4b4c146bf78a/preprints/Integer-multiplication-below-n-log-n-September-23-2026/build/sections/10-transposition.tex" + }, + "build/sections/11-grouped-rectangles.tex": { + "sha256": "6525cd0a01980e56accfeaf06e9d875bc699197ba42c6e22b69435e352275174", + "url": "https://raw.githubusercontent.com/openai/math/adc7f1241b42e322a6451854ab7e4b4c146bf78a/preprints/Integer-multiplication-below-n-log-n-September-23-2026/build/sections/11-grouped-rectangles.tex" + }, + "formalization.yaml": { + "sha256": "2dcbd0d6e6a22475f53d49bfdfcac9b6d2b470653c332a9f56522f5be166edb9", + "url": "https://raw.githubusercontent.com/openai/math/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/formalization.yaml" + } + }, + "paper": "preprints/Integer-multiplication-below-n-log-n-September-23-2026", + "repository": "https://github.com/openai/math" +} diff --git a/research/gf2-full-network/full_B.py b/research/gf2-full-network/full_B.py new file mode 100644 index 0000000000..d6f10b7908 --- /dev/null +++ b/research/gf2-full-network/full_B.py @@ -0,0 +1,11 @@ +"""Unchanged full-driver baseline entry; output supplied only by replay guard.""" +from hashlib import sha256 +import json +from pathlib import Path +ROOT=Path(__file__).resolve().parent +pins=json.loads((ROOT/'CODE-SOURCES.json').read_text())['files'] +for name in ('full_B.py','archive_support.py'): + if sha256((ROOT/name).read_bytes()).hexdigest()!=pins[name]:raise ValueError('entry source pin: '+name) +namespace=dict(__file__=str(ROOT/'archive_support.py')) +exec(compile((ROOT/'archive_support.py').read_bytes(),namespace['__file__'],'exec'),namespace) +namespace['full_entry']('B') diff --git a/research/gf2-full-network/full_C.py b/research/gf2-full-network/full_C.py new file mode 100644 index 0000000000..b835526096 --- /dev/null +++ b/research/gf2-full-network/full_C.py @@ -0,0 +1,11 @@ +"""Unchanged full-driver candidate entry; output supplied only by replay guard.""" +from hashlib import sha256 +import json +from pathlib import Path +ROOT=Path(__file__).resolve().parent +pins=json.loads((ROOT/'CODE-SOURCES.json').read_text())['files'] +for name in ('full_C.py','archive_support.py'): + if sha256((ROOT/name).read_bytes()).hexdigest()!=pins[name]:raise ValueError('entry source pin: '+name) +namespace=dict(__file__=str(ROOT/'archive_support.py')) +exec(compile((ROOT/'archive_support.py').read_bytes(),namespace['__file__'],'exec'),namespace) +namespace['full_entry']('C') diff --git a/research/gf2-full-network/full_driver.py b/research/gf2-full-network/full_driver.py new file mode 100644 index 0000000000..f4ff2a4313 --- /dev/null +++ b/research/gf2-full-network/full_driver.py @@ -0,0 +1,356 @@ +#!/usr/bin/env python3 +"""One complete frozen complex-network CLI with retained exact observations. + +Parent-owned serial wall/RSS/aggregate guard is mandatory. Profile mode is one +literal baseline diagnostic/anchor, not a performance sample. Both benchmark +modes require its immutable anchor. No search, retry, orchestration or network. +""" +from __future__ import annotations + +import time +START_WALL = time.perf_counter() +import argparse +from contextlib import redirect_stdout +from fractions import Fraction +import hashlib +import importlib +import io +import json +import os +from pathlib import Path +import resource +import runpy +import shutil +import stat +import sys + +sys.dont_write_bytecode = True +HERE = Path(__file__).resolve().parent +BASE = "19fdb086ea96af9a9f87936a2b888e10af4ed810" +UPSTREAM = "adc7f1241b42e322a6451854ab7e4b4c146bf78a" +PIN_SHA = "88bba3caf5975f30fa7abceaea9454110cf3b069233e8241a2ca13d1dff171a7" +REFERENCE_SHA = "1f763d95c7ff163aa71d13cd82784f16665be8afb21f75e76941e2119562098f" +ENGINE_PINS = { + "native_gf2.c": "e9c3c9194a08718bd1575c1cf08c6c6772d3b644c2e274c25a84a1f9249d06cc", + "native_backend.py": "e473c38245c3668715b5a78dfe980b2fe3ed0d0c9b8c97c666fbae6ecf1fffd5", + "finite_controls.py": "df989a831aac43cc1af95169dad8c64a7548760e6e1f96976da996703f2c8f7a", + "compare_side_verifier.py": "6e507bb0c7e00d090a60289fddb6c55e90c946d0850c42c3c5e3e15c27604a68", + "profile_side_verifier.py": "9c994378171c20a91539418d93cb8387e1daa93465d6862beefea90e12999c2a", + "source/complex_circuit.py": "d623617f7c5cb3189580883a8ab30c0bd3832688ae3f1f0c1f881bbbbff8e0c1", + "source/complex_network.py": "0da395e67ac04fa213494e71012c1b19b544596d34cdce5a3b172b1fb6af5f1b", +} +COMPLEMENT_EXPECTED = { + "calls": 238685, + "canonical_stream_bytes": 55839507, + "sha256": "7dec2bf33303c37e1c699609e83768d61df7e19104d34a26a148f66d5ccc4838", + "schema": "v2-jsonl:call,us,vs,result(type=list+values or type=None); ordered exact integer vectors", +} +EXPECTED_STDOUT = ( + "PASS conditional 59/100000000000 > 2^-31; minimum margin 14779261/25000000000000000\n" + "Side roles per invocation 108195 vs original 3693800\n" +) + + +def need(condition, message): + if not condition: + raise RuntimeError(message) + + +def sha(data): + return hashlib.sha256(data).hexdigest() + + +def canonical(value): + return json.dumps(value, sort_keys=True, separators=(",", ":"), ensure_ascii=True).encode("ascii") + + +def cpu(): + own = resource.getrusage(resource.RUSAGE_SELF) + children = resource.getrusage(resource.RUSAGE_CHILDREN) + return own.ru_utime + own.ru_stime + children.ru_utime + children.ru_stime + + +def inventory(root, pins, *, exact=True): + need(root.is_dir() and not root.is_symlink(), "Missing or symlinked input root") + files = {} + for path in sorted(root.rglob("*")): + need(not path.is_symlink(), "Symlink in frozen inputs: " + str(path)) + if path.is_file(): + relative = str(path.relative_to(root)) + if relative not in pins: + need(not exact, "Undeclared frozen input: " + relative) + continue + raw = path.read_bytes() + expected = pins[relative][0] if type(pins[relative]) is list else pins[relative] + need(sha(raw) == expected, "Frozen input digest changed: " + relative) + files[relative] = {"sha256": sha(raw), "mode": stat.S_IMODE(path.stat().st_mode), "bytes": len(raw)} + need(set(files) == set(pins), "Frozen input inventory incomplete") + return files + + +def typed(value): + """Lossless full return representation, including order and exact types.""" + kind = type(value) + if kind is Fraction: + return ["Fraction", value.numerator, value.denominator] + if value is None: + return ["None"] + if kind is bool: + return ["bool", value] + if kind is int: + return ["int", str(value)] + if kind is float: + return ["float", value.hex()] + if kind is str: + return ["str", value] + if kind is list or kind is tuple: + return [kind.__name__, [typed(item) for item in value]] + if kind is dict: + return ["dict", [[typed(key), typed(item)] for key, item in value.items()]] + raise TypeError("Unsupported exact full-certificate return type: " + kind.__name__) + + +class Phases: + """Observational wrappers delegate each call and preserve its return.""" + def __init__(self): + self.rows = {} + + def call(self, name, function, *args, **kwargs): + wall, used = time.perf_counter(), cpu() + try: + return function(*args, **kwargs) + finally: + row = self.rows.setdefault(name, {"calls": 0, "wall_seconds": 0.0, "cpu_seconds_with_children": 0.0}) + row["calls"] += 1 + row["wall_seconds"] += time.perf_counter() - wall + row["cpu_seconds_with_children"] += cpu() - used + + def wrap(self, owner, attribute, name): + original = getattr(owner, attribute) + def observed(*args, **kwargs): + return self.call(name, original, *args, **kwargs) + setattr(owner, attribute, observed) + return original, observed + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--frozen-root", type=Path, required=True) + parser.add_argument("--reference", type=Path, required=True, help="Pinned original complex-network.json file") + parser.add_argument("--mode", choices=("profile", "baseline", "candidate"), required=True) + parser.add_argument("--output", type=Path, required=True, help="New external directory; every write stays below it") + parser.add_argument("--anchor", type=Path, help="Frozen anchor.json emitted by the one profile run") + args = parser.parse_args() + need(sys.flags.optimize == 0, "Every full-caller mode requires original assertions") + need(sys.implementation.name == "cpython" and sys.version_info[:2] == (3, 12), "Frozen CPython 3.12 required") + need((args.mode == "profile") == (args.anchor is None), "Profile creates the anchor; both benchmark arms require --anchor") + frozen, reference = args.frozen_root.resolve(), args.reference.resolve() + output = args.output.resolve() + need(not output.exists(), "Refusing to overwrite run evidence") + need(not output.is_relative_to(HERE) and not output.is_relative_to(frozen), "Output must be outside immutable sources") + need(reference.is_file() and not reference.is_symlink(), "Reference certificate missing or symlinked") + source_pin_bytes = (HERE / "SOURCE-PINS.json").read_bytes() + need(sha(source_pin_bytes) == PIN_SHA, "Source inventory pin changed") + pins = json.loads(source_pin_bytes) + need(len(pins) == 32, "Frozen closure must contain twelve scripts, manifest and nineteen payloads") + reference_bytes = reference.read_bytes() + need(sha(reference_bytes) == REFERENCE_SHA, "Original full certificate reference changed") + driver_before = Path(__file__).read_bytes() + anchor_bytes = None if args.anchor is None else args.anchor.read_bytes() + expected_anchor = None if anchor_bytes is None else json.loads(anchor_bytes) + if expected_anchor is not None: + need(expected_anchor.get("schema") == "gf2-full-network-anchor-v1" and + expected_anchor.get("base_commit") == BASE and expected_anchor.get("source_pin_sha256") == PIN_SHA and + expected_anchor.get("driver_sha256") == sha(driver_before) and + expected_anchor.get("engine_pins") == ENGINE_PINS, + "Anchor source/driver/engine identity differs; no benchmark permitted") + output.mkdir(parents=True) + compiler_tmp = output / "compiler-tmp" + compiler_tmp.mkdir() + os.environ["TMPDIR"] = str(compiler_tmp) + phases = Phases() + frozen_before = phases.call("input_custody", inventory, frozen, pins) + engine_before = phases.call("engine_custody", inventory, HERE / "engine", ENGINE_PINS) + manifest = json.loads((frozen / "upstream/manifest.json").read_bytes()) + need(manifest["commit"] == UPSTREAM and len(manifest["files"]) == 19, "Wrong pinned upstream manifest") + need({"upstream/" + name for name in manifest["files"]} == + {name for name in pins if name.startswith("upstream/") and name != "upstream/manifest.json"}, + "Source verifier payload closure changed") + for name, info in manifest["files"].items(): + need(info["sha256"] == pins["upstream/" + name][0], "Manifest payload hash differs from independent frozen pin") + + runtime, engine = output / "runtime-root", output / "engine" + phases.call("fresh_root_copy", shutil.copytree, frozen, runtime) + phases.call("fresh_engine_copy", shutil.copytree, HERE / "engine", engine) + # copytree retains readonly source directory permissions. Only this new + # private root is made writable for the original CLI certificate output. + runtime.chmod(0o755) + (runtime / "certificates").mkdir() + runtime_before = inventory(runtime, pins) + copied_engine_before = inventory(engine, ENGINE_PINS) + need(runtime_before == frozen_before and copied_engine_before == engine_before, "Copy changed input bytes or modes") + for name in ("complex_network.py", "complex_circuit.py"): + need((engine / "source" / name).read_bytes() == (runtime / "scripts" / name).read_bytes(), + "PR5929 engine/source differs from the full caller closure") + script_names = {Path(name).stem for name in pins if name.startswith("scripts/")} + engine_names = {"native_backend", "finite_controls", "compare_side_verifier", "profile_side_verifier"} + need(not (script_names | engine_names) & set(sys.modules), "Scientific module already loaded; fresh process required") + sys.path[:0] = [str(engine), str(runtime / "scripts")] + backend = phases.call("cold_engine_import", importlib.import_module, "native_backend") + comparison = importlib.import_module("compare_side_verifier") + native = None + finite = None + build = None + if args.mode == "candidate": + native, build = phases.call("cold_compile_link_load", backend.build_native, output / "cold-build") + finite = phases.call("all_native_finite_independent_controls", importlib.import_module("finite_controls").run_controls, native) + (output / "finite-controls.json").write_bytes(canonical(finite) + b"\n") + + circuit_module = phases.call("cold_complex_module_load", backend.load_source, "complex_circuit") + sys.modules["complex_circuit"] = circuit_module + rank_calls = [] + complement = backend.ComplementTrace(circuit_module.Label) + binding = None + if args.mode == "candidate": + binding = backend.bind(circuit_module, native, rank_calls, complement) + else: + backend.guard_module(circuit_module) + backend.attach_trace(circuit_module, rank_calls, complement) + captures = {} + phases.wrap(circuit_module.ComplexSideCircuit, "__init__", "side_construction") + phases.wrap(circuit_module.Checks, "__init__", "checks_initialization") + phases.wrap(circuit_module, "compile_roles", "compile_roles") + phases.wrap(circuit_module.Checks, "verify_map", "verify_map") + phases.wrap(circuit_module.Checks, "verify_labels", "verify_labels") + original_roles = circuit_module.verify_role_frames + def observe_roles(c, checks, code=None): + need("side" not in captures and code is not None, "Unexpected role-frame invocation") + result = phases.call("verify_role_frames", original_roles, c, checks, code) + captures["side"] = (c, checks, code, result) + return result + circuit_module.verify_role_frames = observe_roles + + certify = phases.call("cold_certify_import", importlib.import_module, "certify") + phases.wrap(certify, "verify_sources", "original_upstream_verify_sources") + prepare = phases.call("cold_prepare_import", importlib.import_module, "prepare_layers") + search = importlib.import_module("search_network") + phases.wrap(search, "log_integer_bounds", "full_log_integer_bounds") + original_serializable = prepare.serializable + depth = 0 + def observe_serializable(value): + nonlocal depth + outer = depth == 0 + if outer: + need("full_return" not in captures and type(value) is dict, "Unexpected outer serialization") + captures["full_return"] = value + depth += 1 + try: + # Recursion still delegates the original serializable exactly once + # per value; only the outer call is captured/timed. + if outer: + return phases.call("original_serializable", original_serializable, value) + return original_serializable(value) + finally: + depth -= 1 + prepare.serializable = observe_serializable + + caller = runtime / "scripts/complex_network.py" + old_argv = sys.argv + stdout = io.StringIO() + try: + sys.argv = [str(caller)] + with redirect_stdout(stdout): + namespace = phases.call("complete_original_cli", runpy.run_path, str(caller), run_name="__main__") + finally: + sys.argv = old_argv + cli_stdout = stdout.getvalue() + need(cli_stdout == EXPECTED_STDOUT, "Original CLI stdout changed") + certificate_bytes = (runtime / "certificates/complex-network.json").read_bytes() + need(certificate_bytes == reference_bytes, "Original CLI certificate bytes differ from the pinned reference") + need(sys.modules["complex_circuit"] is circuit_module and + namespace["ComplexSideCircuit"] is circuit_module.ComplexSideCircuit and + namespace["Checks"] is circuit_module.Checks and namespace["compile_roles"] is circuit_module.compile_roles and + namespace["verify_role_frames"] is observe_roles and namespace["serializable"] is observe_serializable, + "Caller used a different scientific module or observation binding") + need(captures.keys() == {"side", "full_return"}, "Missing exact caller observations") + c, checks, code, role_result = captures["side"] + full_return = captures["full_return"] + need(full_return["role_frames"] is role_result and full_return["upstream_commit"] == UPSTREAM, + "Role return or actual source verification boundary changed") + for name in ("side_construction", "checks_initialization", "compile_roles", "verify_map", "verify_labels", + "verify_role_frames", "original_upstream_verify_sources", "full_log_integer_bounds", + "original_serializable", "complete_original_cli"): + need(phases.rows.get(name, {}).get("calls") == 1, "Original phase was omitted or repeated: " + name) + imports = {} + for name in script_names - {"complex_network"}: + module = sys.modules.get(name) + expected_path = engine / "source/complex_circuit.py" if name == "complex_circuit" else runtime / "scripts" / (name + ".py") + need(module is not None and Path(module.__file__).resolve() == expected_path.resolve(), "Unpinned scientific import: " + name) + imports[name] = str(module.__file__) + if binding is not None: + binding["runtime_guard"].check() + need(binding["counters"] == {"complement_native": 238685, "complement_fallback": 0, + "gram_native": 59959, "gram_fallback": 0}, "Native full-call coverage changed") + + side_result = {key: full_return[key] for key in ("circuit", "side_map", "labels", "role_frames")} + witness = { + "support": c.support, "args": c.args, "kind": c.kind, "active": sorted(c.active), + "pieces": [(target, node, (coefficient.numerator, coefficient.denominator)) for target, node, coefficient in c.pieces], + "labels": [(key, list(label.basis.items()), label.dim, label.key) for key, label in checks.cache.items()], + "code": {"roles": code["roles"], "gates": code["gates"], "sources": list(code["sources"].items()), + "outputs": list(code["outputs"].items())}, + } + side_output = output / "side-observations" + side_output.mkdir() + side_receipt = phases.call("identical_lossless_side_serialization", comparison.write_scientific, + side_output, side_result, witness, rank_calls) + complement_receipt = complement.receipt() + need(complement_receipt == COMPLEMENT_EXPECTED, "Every ordered complement observation must match PR5929") + full_typed_bytes = canonical(typed(full_return)) + (output / "full-return.lossless.json").write_bytes(full_typed_bytes) + (output / "original-stdout.txt").write_text(cli_stdout, encoding="utf-8") + (output / "complement-transcript.json").write_bytes(canonical(complement_receipt) + b"\n") + science = { + "full_cli_certificate_sha256": sha(certificate_bytes), "full_cli_stdout_sha256": sha(cli_stdout.encode("utf-8")), + "full_return_lossless_sha256": sha(full_typed_bytes), "side": side_receipt, + "ordered_complements": complement_receipt, "upstream_commit": UPSTREAM, + } + anchor = {"schema": "gf2-full-network-anchor-v1", "base_commit": BASE, "source_pin_sha256": PIN_SHA, + "driver_sha256": sha(driver_before), "engine_pins": ENGINE_PINS, "science": science} + if expected_anchor is not None: + need(anchor == expected_anchor, "Complete certificate/types/ordered observations differ from frozen anchor") + else: + (output / "anchor.json").write_bytes(canonical(anchor) + b"\n") + need(inventory(frozen, pins) == frozen_before and inventory(HERE / "engine", ENGINE_PINS) == engine_before, + "Immutable source bytes/modes changed") + need(inventory(runtime, pins, exact=False) == runtime_before and inventory(engine, ENGINE_PINS) == copied_engine_before, + "Runtime scientific source bytes/modes changed") + runtime_files = {str(path.relative_to(runtime)) for path in runtime.rglob("*") if path.is_file()} + need(runtime_files == set(pins) | {"certificates/complex-network.json"}, "Unexpected full-caller file side effect") + need(Path(__file__).read_bytes() == driver_before and reference.read_bytes() == reference_bytes and + (anchor_bytes is None or args.anchor.read_bytes() == anchor_bytes), "Driver/reference/anchor changed during run") + receipt = { + "status": "FULL_NETWORK_PROFILE_ANCHOR_PASS" if args.mode == "profile" else "FULL_NETWORK_COMPLETE_PASS", + "mode": args.mode, "science": science, "base_commit": BASE, "native_predecessor_pr": 5929, + "driver_sha256": sha(driver_before), "source_pin_sha256": PIN_SHA, + "frozen_custody": frozen_before, "engine_custody": engine_before, "scientific_imports": imports, + "build": build, "finite_controls": finite, + "private_root_permission": "runtime-root is0755; copied input file modes are retained and checked; immutable stages are never chmodded", + "compiler_tmpdir": str(compiler_tmp), + "native_calls": None if binding is None else dict(binding["counters"]), + "phases": phases.rows, "process_wall_seconds_before_receipt": time.perf_counter() - START_WALL, + "process_and_compiler_cpu_seconds_before_receipt": cpu(), + "environment": {"python": sys.version, "executable": sys.executable, "platform": sys.platform}, + "measurement": "Parent outer guard is authoritative. Phases are nested observations, not additive costs. Profile is excluded from performance selection. Every timed arm includes copies, source checks, original CLI and retained full witnesses/transcripts; candidate additionally pays cold build/load/all finite controls.", + "scope": "Complete frozen historical complex-network CLI with retained observations; conditional certificate only. No bare-CLI factor, selected-frontier, new kappa or PR5864 speed claim.", + } + (output / "receipt.json").write_text(json.dumps(receipt, indent=2, sort_keys=True) + "\n") + sys.stdout.write(cli_stdout) + print(json.dumps({"status": receipt["status"], "mode": args.mode, "science": science, + "wall_seconds": receipt["process_wall_seconds_before_receipt"], + "cpu_seconds_with_compiler": receipt["process_and_compiler_cpu_seconds_before_receipt"], + "phases": phases.rows}, sort_keys=True)) + + +if __name__ == "__main__": + main() diff --git a/research/gf2-full-network/guard.py b/research/gf2-full-network/guard.py new file mode 100644 index 0000000000..bf4265b129 --- /dev/null +++ b/research/gf2-full-network/guard.py @@ -0,0 +1,120 @@ +"""Serial bounded Linux measurements; preserve the complete frozen precision contract.""" +import argparse +import fcntl +import hashlib +import json +import os +from pathlib import Path +import platform +import signal +import statistics +import subprocess +import sys +import tempfile +import time + +HERE = Path(__file__).resolve().parent +SOURCE = HERE +CLOSURE = ('frozen.py','primitive_profile.py','guard.py','dispatch.py','inputs/PR5848.tar','../feasibility/fraction_table.py','../feasibility/finite.py','/usr/lib/python3.12/fractions.py','../feasibility/actual_audit.py') +TIMEOUT = 180 +RSS_CAP = 1024**3 +OUTPUT_CAP = 2*1024**2 +AGGREGATE = 600 +PREVIOUS_WALL_SECONDS = 0 + +def sha(raw): + return hashlib.sha256(raw).hexdigest() + +def inventory(): + result = {} + for name in CLOSURE: + path = SOURCE / name + if path.is_symlink() or not path.is_file(): + raise ValueError('Regular complete runtime file: ' + name) + result[name] = [sha(path.read_bytes()), path.stat().st_mode & 0o777] + return result + +def group_rss(group): + total = 0 + count = 0 + for p in Path('/proc').iterdir(): + if not p.name.isdigit(): + continue + try: + raw = (p/'stat').read_text() + fields = raw[raw.rfind(')')+2:].split() + if int(fields[2]) == group: + total += int(fields[21])*os.sysconf('SC_PAGE_SIZE') + count += 1 + except (FileNotFoundError, ProcessLookupError, PermissionError): + pass + return total, count + +def run(label, script, optimized=False): + records = HERE/'runs' + records.mkdir(exist_ok=True) + prior = list(records.glob('*/receipt.json')) + spent = PREVIOUS_WALL_SECONDS + sum(json.loads(p.read_bytes())['wall_seconds'] for p in prior) + if spent >= AGGREGATE: + raise ValueError('Aggregate budget consumed') + folder = records/label + folder.mkdir() + before = inventory() + env = os.environ.copy() + for key in ('PYTHONPATH','PYTHONOPTIMIZE','PYTHONINSPECT','PYTHONSTARTUP','PYTHONPYCACHEPREFIX'): + env.pop(key,None) + env.update(PYTHONHASHSEED='0', LC_ALL='C.UTF-8', TZ='UTC') + usage = folder/'usage.json' + with tempfile.TemporaryDirectory(prefix='linux5757-bytecode-') as cache: + command = ['/usr/bin/python3.12', '-B', '-X', 'pycache_prefix='+cache] + if optimized: + command.append('-O') + command.append(str(SOURCE/script)) + timed = ['/usr/bin/time','-f','{"user_seconds":%U,"system_seconds":%S,"kernel_max_rss_kib":%M,"exit":%x}', '-o', str(usage),'--',*command] + start = time.monotonic() + peak = 0 + stop = None + with (folder/'stdout.txt').open('wb') as out, (folder/'stderr.txt').open('wb') as err: + p = subprocess.Popen(timed, cwd=SOURCE, env=env, stdout=out, stderr=err, start_new_session=True) + try: + while p.poll() is None: + rss, _ = group_rss(p.pid) + peak = max(peak,rss) + elapsed = time.monotonic()-start + if rss > RSS_CAP: + stop='sampled_group_rss_cap' + elif elapsed > min(TIMEOUT,AGGREGATE-spent): + stop='wall_or_aggregate_cap' + elif max((folder/'stdout.txt').stat().st_size,(folder/'stderr.txt').stat().st_size)>OUTPUT_CAP: + stop='output_cap' + if stop: + os.killpg(p.pid,signal.SIGKILL) + break + time.sleep(0.05) + code=p.wait() + finally: + try: os.killpg(p.pid,signal.SIGKILL) + except ProcessLookupError: pass + p.wait() + elapsed = time.monotonic()-start + stdout=(folder/'stdout.txt').read_bytes() + stderr=(folder/'stderr.txt').read_bytes() + after=inventory() + measurement=None + if usage.exists(): + try: measurement=json.loads(usage.read_bytes()) + except json.JSONDecodeError: measurement={'raw':usage.read_text()} + receipt={'label':label,'script':script,'optimized':optimized,'wall_seconds':elapsed, + 'exit':code,'termination':stop,'sampled_process_group_rss_bytes':peak, + 'usage':measurement,'stdout_sha256':sha(stdout),'stdout_bytes':len(stdout), + 'stderr_sha256':sha(stderr),'stderr_bytes':len(stderr), + 'source_inventory_sha256':sha(json.dumps(before,sort_keys=True,separators=(',',':')).encode()), + 'source_bytes_and_modes_unchanged':before==after, + 'python':sys.version,'platform':platform.platform(), + 'runner_sha256':sha(Path(__file__).read_bytes()),'runtime_policy_sha256':sha(json.dumps(CLOSURE).encode())} + receipt['status']='PASS' if code==0 and stop is None and not stderr and before==after else 'STOP' + (folder/'receipt.json').write_text(json.dumps(receipt,indent=2,sort_keys=True)+'\n') + print(json.dumps(receipt,sort_keys=True),flush=True) + if receipt['status']!='PASS': + raise SystemExit(1) + return receipt diff --git a/research/gf2-full-network/reference/certificates/complex-network.json b/research/gf2-full-network/reference/certificates/complex-network.json new file mode 100644 index 0000000000..62a6091887 --- /dev/null +++ b/research/gf2-full-network/reference/certificates/complex-network.json @@ -0,0 +1,143 @@ +{ + "bit_saving": "37/12500000000", + "circuit": { + "additions": 80595, + "disjoint_additions": 68595, + "h": 25, + "injections": 27600, + "pair_star_additions": 12000, + "roles": 108195, + "roles_per_target": 47.041, + "v": 2300 + }, + "complex_counts": { + "I": 15870000, + "L": 10315500000, + "N": 12167000000, + "W": 1741801270000, + "central_roles": 26, + "deficit": 3703000000, + "eta": "28/205789375", + "h": 25, + "m": 15625, + "original_side_wires_per_invocation": 3693800, + "s": 27215641140750000, + "side_roles_per_invocation": 108195, + "v": 2300 + }, + "complex_deficit_slack": "6761797/8231575000000000", + "complex_saving": "7/500000000", + "gates": { + "gates_per_invocation": 340784, + "total_gates": 5408242080000, + "twelve_W": 20901615240000 + }, + "improvement_over_compact_control": "590/83", + "labels": { + "active_nodes": 82895, + "all_labels_nondegenerate": true, + "all_residuals_have_odd_vectors": true, + "checked_inclusions": 188790 + }, + "log_enclosure": [ + "1003674733095412338935264801206694829502804118660273821722358572561777951813562324984581151664909098376456139346987946438356114944865114544057566309229396051200891281693308045036569381219925884240815457348697380244265196736/103936362434495646010619550865033734742948881177937982419226476521510946436948314218071351858470876811875561920539687733866419026027866373569756270393100104240876895441796280524990301784985328254889750901950661699188332905", + "119905674780465260758132999318298249674205865631153226854493684575647168973933813765866273005815485563618924127097549911779010579460799218169313950759672923946122257420539013677630274686709038285230521425787947340179037163618384721/12416930765507746510068682343342696843957626338057657633016923061769841067667425271918924168691987416458733797440474694605908192976129102762466882436295692453310093108779928980052174719912913882184162241086372384329699504384000000" + ], + "log_m_upper": "483/50", + "role_frames": { + "forward_frames_nested": true, + "reverse_complement_frames_nested": true, + "roles": 108195 + }, + "scope": "Conditional on the pinned upstream interfaces, the compact-control movement and guard proofs, the paired bit network, and the written binary-frame transfer for this complex side circuit. Exact arithmetic and finite checks are not formal verification.", + "scoped_ceiling": { + "below_2_to_minus_30": true, + "scope": "Published h=50 paired bit network and retained Gaussian margin; not a bound on other networks or algorithms.", + "upper": "37/62500000000" + }, + "side_map": { + "coefficients": "+1/2 disjoint, -1/2 intersection two", + "nonzero_coefficients": 3693800, + "side_map_exact": true, + "targets": 2300 + }, + "status": "CONDITIONAL 59/10^11 WITNESS; COMPRESSED COMPLEX SIDE CIRCUIT; NOT FORMAL VERIFICATION", + "upstream_commit": "adc7f1241b42e322a6451854ab7e4b4c146bf78a", + "witness": { + "absorption_gap": "29261/25000000000000000", + "constraint_slacks": { + "K_dominates_log_p": "19979001/100000000", + "K_smaller_than_ell": "60021999/100000000", + "alpha_below_sqrt_p": "80001/400000", + "beta_below_one": "999/1000", + "beta_positive": "1/1000", + "c_positive": "999/1000", + "crt_layout": "2960037/1250000000000000", + "delta_below_one_eighth": "124999/1000000", + "delta_positive": "1/1000000", + "dimension_upper_bound": "40003/300000", + "epsilon_positive": "19999/100000", + "gamma_sublinear": "40003/200000", + "gaussian_cost": "23/2000000", + "guard_width": "829961/1000000000", + "kappa_positive": "59/100000000000", + "lambda_above_sigma": "5521/500000000000", + "lambda_above_tau": "1/500000000000", + "lambda_below_one": "1479/500000000000", + "lambda_prime_above_lambda": "1/500000000000", + "lambda_prime_below_one": "739/250000000000", + "leaf_cost": "1103/100000000000", + "packed_overhead": "1/500000000000", + "prefix_cost": "60021999/100000000", + "prime_interval_growth": "30001/50000", + "r_superpolynomial": "80001/100000", + "reserved_axes": "249749999261/250000000000", + "scalar_cost": "800009/1000000", + "sigma_below_one": "7/500000000", + "sigma_positive": "499999993/500000000", + "tau_below_one": "37/12500000000", + "tau_positive": "12499999963/12500000000" + }, + "guard": { + "B": 338201706233372774319109678801287590064, + "C0": 321727027889740762489223803495350305328695729120143793284991524019954162292886152000000, + "C1": "49961/10000", + "E": 338201706233372774319082463160146840064, + "beta": "1/1000", + "m": 15625, + "s": 27215641140750000, + "zeta": "1/10000" + }, + "limiting_margins": [ + "g3" + ], + "margins": { + "g1": "60021999/100000000", + "g2": "739223037/1250000000000000000", + "g3": "14779261/25000000000000000", + "g4": "2960037/1250000000000000", + "g5": "23/2000000", + "g6": "800009/1000000", + "g7": "19999/100000" + }, + "minimum_margin": "14779261/25000000000000000", + "parameters": { + "C1": "49961/10000", + "beta": "1/1000", + "c": "999/1000", + "delta": "1/1000000", + "epsilon": "19999/100000", + "kappa": "59/100000000000", + "lam": "499999998521/500000000000", + "lamp": "249999999261/250000000000", + "sigma": "499999993/500000000", + "tau": "12499999963/12500000000" + }, + "recurrence": { + "internal": "12499999963/12500000000", + "layer": "12499999963/12500000000", + "leaf": "499999993007/500000000000", + "preprocessing": "1/1000" + } + } +} diff --git a/research/gf2-full-network/reference/certificates/selected-result.json b/research/gf2-full-network/reference/certificates/selected-result.json new file mode 100644 index 0000000000..581f8d8700 --- /dev/null +++ b/research/gf2-full-network/reference/certificates/selected-result.json @@ -0,0 +1,112 @@ +{ + "status": "Selected maintainer-reviewed conditional P104 helper-subspace construction with exact Linux primary and independent caller replays", + "kappa": "62009/20000000", + "decimal": "0.00310045", + "source_prs": [ + 5599, + 5565, + 5580, + 5569, + 5561, + 5551, + 5545, + 5544, + 5550, + 5567, + 2305, + 2152, + 2219, + 5398, + 5400, + 4610, + 5241, + 4470, + 4447, + 4441, + 4440, + 4416, + 4433, + 4359, + 4268, + 3945, + 4085, + 2979, + 4076, + 4088, + 1673, + 1758, + 1786, + 23, + 555, + 589 + ], + "source_manifest": "certificates/frontier5599-source.json", + "certificate": "certificates/frontier5599/CLAIM.json", + "certificate_sha256": "66fbb5b21f32f1c4ba544c20d5a44ebcdfd11bce2bfa2d609c656ae520d3b21e", + "proof": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "proof_supplements": { + "notes/batched-bit-rows.tex": "ef72c0ead19373cbc19c8a3aacb44dd0f75353ee5f4d055f775a986a4878022c", + "notes/batched-complex-rows.tex": "64c70926a8705874f1c9b42a2f703e42cad4e90f927f544458cfdf729540236c", + "notes/compact-control-movement.tex": "b963c3d2f4e1b7059aa289bb4b4ac89b688920bcf42f5b20d7698cdef0132cc6", + "notes/general-clifford-frames.tex": "c9bb9655b594583c6b4bab8cb485233f1d1e588f83858cf1e4c3530cee8fed54", + "notes/stopped-product-complex.tex": "4738089103a4b263b3b0ef458f5ef35519c696f1ea871ae79e508d3720f5870a", + "notes/three-stage-cover-bit.tex": "47123a756f823c83a0d48cca2bf5add6472cd88410b13aed345e70c8834fb511", + "notes/three-stage-cover-rows.tex": "6ad97a5cd7d6aecf978a81226e1c2763d37840caca130c61f3bf5c4ac111c5c8", + "references/semantic-bulk/pr23/semantic-bulk-17-note.tex": "652242b05174bb776ffc6165af170df9c8cf220dbd0fc26c24d778f320dbabc8", + "research/e8-bit-carrier-skeleton/code/bit/export_records.py": "8a5999601f917dbb492bb9ae9a344611f18cc7cedc53dc3c76496a369e530eb3", + "research/e8-bit-carrier-skeleton/code/nine/geometry.py": "36eeda3184bd009e89462b65c8725d10860c444f8da8f1f87e5f6e50120011ca", + "research/e8-bit-p111-tuned/code/gen_p3.py": "438b83f10d70ceca7cf78049420204b7de2dc61682f913c50a62596106ad84cd", + "research/e8-bit-p111-tuned/code/xcheck_p.py": "af3decc877e27c00001cf56f50c6c09566e8e101297ab34c7860aed96a06d80e", + "research/e8-bit-p111-tuned/tune/EXPECTED.json": "b9f0e5ca038abe837b0007c8fe006f366a6f02009244ac57705a8a200e2301f4", + "research/e8-bit-p111-tuned/tune/apply.py": "806ae4cb2648e4f05dcf56bd089891fd3ba33a6ee5fe76d3329e322c6770c1a1", + "research/e8-bit-p111-tuned/tune/wlib.py": "a37fdf3cdf5f62945c2a90193401c0e9edc9dd3cda8d8cb36a3b9c329ebe4dbc", + "research/t74-native-fast/vendor/native/new/code/borrow/vendor/clifford/clifford_exact.py": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962", + "docs/research/pr-intake-evidence/pr4359/PROOF-REVIEW.md": "7d67bb814285f7634029fbd378c6457156545f0b38858cc1c6ec34b68cd9d162", + "docs/research/pr-intake-evidence/pr4470/PROOF-REVIEW.md": "5c111dd56beb53dc44ab727d96e1af03aaf50f3023d4342e2b0a89ede6cf585b", + "docs/research/pr-intake-evidence/pr4416/PROOF-REVIEW.md": "2c2bbe6fe1bab44778192118f27e59a0d23dbe02c47aa8a42845093f1ce46f49", + "docs/research/pr-intake-evidence/pr4610/PROOF-REVIEW.md": "b84f833e3072cbab372fbda2ece98fbc031c15e590cf73003ddea35a5222e148", + "research/final4610-independent-admission/PROOF.md": "e573cbbe6fa5481c0533e773de404e10f4dc7907b5ebfe404bdcd02dcf9844d8", + "research/final4610-independent-admission/SPECIALIZATION.md": "70430114f744108223bc1d44b98bc25b696c4b408b7b044c2a8bbdfdb434ac5c", + "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md": "7688e5d8bf40fcdfb5bea43ba47e1f8d60a77a91ede6c307bb8163a9a7e16b3f", + "research/p104-helper-subspace-splits/PROOF.md": "f4c68acf9373e34d88e14e1a7791b4b739c8b5297a1ae4c0121f579a02fde04e", + "research/p104-productive-controller/PROOF.md": "f4c4e400092954562252df6c4dd157a9b4c1642252168ce72738cdbecfc5ad41", + "research/p104-caller-independent-audit/PROOF.md": "d73ff9587a85db8063391919ffc4a17521ccd5759cdaf6338ba036703239d839", + "research/p104-free-endpoint-contract-audit/PROOF.md": "43aeae1c090b5657f326fd7c56a5e5fbe062db29591b660a903305ca58ce9598" + }, + "review": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "validation": "docs/research/pr-intake-evidence/pr5599-completion/VALIDATION.json", + "integration": "docs/research/pr-intake-evidence/pr5599-completion/INTEGRATION.json", + "reproduce": "make frontier5599-verify", + "scope": "Conditional P104 helper-subspace splitting and all-forward productive caller. The five inherited framework assumptions remain; no materialized uniform word or complete rounded multiplier.", + "previous_kappa": "605457647/200000000000", + "previous_record": "certificates/checkpoints/frontier5413.json", + "audited_source_head": "09dd0965711ca7eeb169057a420abab1c9052137", + "source_certificate": "research/p104-helper-subspace-splits/RESULT.json", + "source_certificate_sha256": "1d92e587915052110dfb3aca8890df5afdaf496164efa5a4a52e69ceeb3c70f3", + "replay_mode": "Fresh serial Linux normal and optimized primary replays, exact original caller positive control, and independent caller inventory adaptation. All under sampled 1 GiB descendant RSS guards. Prior selected framework/BIT foundation is explicitly reused.", + "contributors": "docs/research/community-p1045599-contributors.md", + "assumptions": [ + { + "id": "native_all_columns", + "statement": "Retained native operators, phase conventions, spectators and whole-job adapters work at every positive column multiplicity." + }, + { + "id": "owned_erasure", + "statement": "Owned streams and suspended centers obey the retained allocation, erasure and ownership contracts." + }, + { + "id": "compiler", + "statement": "The finite mixed-target compiler and chronological product, completion and splitting satisfy the retained uniform closure contract." + }, + { + "id": "precision_tape", + "statement": "Retained fixed-tape movement and precision/storage prescriptions apply to the new fixed finite template." + }, + { + "id": "analytic_recovery", + "statement": "Analytic decomposition, fine-prime avoidance and exact integer recovery follow the retained upstream/outer framework." + } + ], + "audit_pr": 5550, + "audit_head": "6125c07ae8ba4b8550e2a0a28a2c6be503153059" +} diff --git a/research/gf2-full-network/replay.py b/research/gf2-full-network/replay.py new file mode 100644 index 0000000000..5269c08908 --- /dev/null +++ b/research/gf2-full-network/replay.py @@ -0,0 +1,51 @@ +"""One serial complete replay; no automatic retries or performance selection.""" +from hashlib import sha256 +import json +from pathlib import Path +import sys +import types +ROOT=Path(__file__).resolve().parent +pins=json.loads((ROOT/'CODE-SOURCES.json').read_text())['files'] +for name in ('replay.py','archive_support.py'): + if sha256((ROOT/name).read_bytes()).hexdigest()!=pins[name]:raise ValueError('replay source pin: '+name) +S=types.ModuleType('_gf2_full_support');S.__file__=str(ROOT/'archive_support.py') +exec(compile((ROOT/'archive_support.py').read_bytes(),S.__file__,'exec'),S.__dict__) + + +def run(arm,evidence,timeout=180): + import fcntl + import os + import tempfile + S.need(arm in ('B','C') and type(timeout) is int and 1<=timeout<=180,'bounded single B/C replay') + S.need(sys.platform=='linux' and sys.version_info[:2]==(3,12) and sys.flags.optimize==0,'Linux CPython3.12 with full assertions') + manifest=S.authenticate();evidence=S.external(evidence) + guard=S.source_module('_gf2_full_guard',ROOT/'guard.py') + lock_path=Path(tempfile.gettempdir())/('croc-gf2-full-'+sha256(str(ROOT).encode()).hexdigest()[:20]+'.lock') + with lock_path.open('a') as lock: + fcntl.flock(lock,fcntl.LOCK_EX|fcntl.LOCK_NB) + evidence.mkdir(parents=True) + guard.HERE=evidence;guard.SOURCE=ROOT + guard.CLOSURE=tuple(sorted(set(manifest['files'])|{'CODE-SOURCES.json'})) + guard.TIMEOUT=timeout;guard.RSS_CAP=1024**3;guard.AGGREGATE=timeout + prior=os.environ.get('CROC_GF2_FULL_OUTPUT') + os.environ['CROC_GF2_FULL_OUTPUT']=str(evidence/'scientific') + try: + receipt=guard.run('complete-'+arm,'full_'+arm+'.py',False) + finally: + if prior is None:os.environ.pop('CROC_GF2_FULL_OUTPUT',None) + else:os.environ['CROC_GF2_FULL_OUTPUT']=prior + S.authenticate() + scientific=json.loads((evidence/'scientific/receipt.json').read_text()) + anchor=json.loads((ROOT/'anchor.json').read_text()) + S.need(receipt['status']=='PASS' and scientific['status']=='FULL_NETWORK_COMPLETE_PASS' and scientific['science']==anchor['science'],'complete frozen caller and retained exact science') + S.need(scientific['mode']==('baseline' if arm=='B' else 'candidate'),'requested complete arm') + return dict(guard=receipt,scientific=scientific,evidence=str(evidence),automatic_retries=0) + + +def main(): + S.need(len(sys.argv)==3 and sys.argv[1] in ('B','C'),'replay.py B|C NEW_EXTERNAL_EVIDENCE_DIRECTORY') + result=run(sys.argv[1],Path(sys.argv[2])) + print(json.dumps(dict(status='PASS_FRESH_FULL_REPLAY',evidence=result['evidence'],new_timings_replace_fixed_samples=False))) + + +if __name__=='__main__':main() diff --git a/research/gf2-full-network/verify.py b/research/gf2-full-network/verify.py new file mode 100644 index 0000000000..c4e2f80853 --- /dev/null +++ b/research/gf2-full-network/verify.py @@ -0,0 +1,45 @@ +"""Fresh unchanged finite controls in normal or optimized interpreter mode.""" +from hashlib import sha256 +import json +from pathlib import Path +import sys +import types +ROOT=Path(__file__).resolve().parent +pins=json.loads((ROOT/'CODE-SOURCES.json').read_text())['files'] +for name in ('verify.py','archive_support.py'): + if sha256((ROOT/name).read_bytes()).hexdigest()!=pins[name]:raise ValueError('finite wrapper source pin: '+name) +S=types.ModuleType('_gf2_finite_support');S.__file__=str(ROOT/'archive_support.py') +exec(compile((ROOT/'archive_support.py').read_bytes(),S.__file__,'exec'),S.__dict__) + + +def main(): + import os + import runpy + import shutil + import tempfile + S.need(len(sys.argv)==1,'no alternate finite workload') + S.authenticate();temporary=Path(tempfile.mkdtemp(prefix='gf2-full-finite-')) + old_argv=sys.argv[:];old_path=sys.path[:];old_cache=sys.pycache_prefix;old_dont=sys.dont_write_bytecode + prior_tmp=os.environ.get('TMPDIR') + try: + sys.pycache_prefix=str(temporary/'bytecode');sys.dont_write_bytecode=True + os.environ['TMPDIR']=str(temporary) + sys.path.insert(0,str(ROOT/'engine')) + driver=ROOT/'engine/compare_side_verifier.py' + sys.argv=[str(driver),'--mode','finite','--output',str(temporary/'evidence')] + runpy.run_path(str(driver),run_name='__main__') + receipt=json.loads((temporary/'evidence/receipt.json').read_text()) + S.need(receipt['status']=='FINITE_PASS' and receipt['mode']=='finite' and receipt['environment']['optimization']==sys.flags.optimize,'complete unchanged finite suite in requested interpreter mode') + S.authenticate() + except BaseException as error: + error.add_note('Failed finite build/control evidence retained at '+str(temporary)) + raise + else:shutil.rmtree(temporary) + finally: + sys.argv=old_argv;sys.path[:]=old_path;sys.pycache_prefix=old_cache;sys.dont_write_bytecode=old_dont + if prior_tmp is None:os.environ.pop('TMPDIR',None) + else:os.environ['TMPDIR']=prior_tmp + print(json.dumps(dict(status='PASS_GF2_FULL_FINITE_CONTROLS',optimization=sys.flags.optimize,complete_cli_not_run=True))) + + +if __name__=='__main__':main() diff --git a/research/gf2-full-network/verify_full.py b/research/gf2-full-network/verify_full.py new file mode 100644 index 0000000000..79fa04f262 --- /dev/null +++ b/research/gf2-full-network/verify_full.py @@ -0,0 +1,36 @@ +"""One complete C correctness replay; never a hosted performance-factor claim.""" +from hashlib import sha256 +import json +from pathlib import Path +import sys +import types +ROOT=Path(__file__).resolve().parent +pins=json.loads((ROOT/'CODE-SOURCES.json').read_text())['files'] +for name in ('verify_full.py','archive_support.py','replay.py'): + if sha256((ROOT/name).read_bytes()).hexdigest()!=pins[name]:raise ValueError('full correctness wrapper pin: '+name) +S=types.ModuleType('_gf2_verify_full_support');S.__file__=str(ROOT/'archive_support.py') +exec(compile((ROOT/'archive_support.py').read_bytes(),S.__file__,'exec'),S.__dict__) + + +def main(): + import shutil + import tempfile + S.need(len(sys.argv)==1 and sys.flags.optimize==0,'one full correctness run with original assertions') + S.authenticate();temporary=Path(tempfile.mkdtemp(prefix='gf2-full-correctness-')) + replay=S.source_module('_gf2_verify_full_replay',ROOT/'replay.py') + try: + result=replay.run('C',temporary/'run',timeout=150) + S.need(result['scientific']['science']==json.loads((ROOT/'anchor.json').read_text())['science'],'full exact anchor equality') + S.authenticate() + # Only fresh private clone directories become writable, after all checks. + # Read-only input/package paths are never changed. + for directory in temporary.rglob('*'): + if directory.is_dir() and not directory.is_symlink():directory.chmod(0o755) + shutil.rmtree(temporary) + except BaseException as error: + error.add_note('Full correctness evidence retained at '+str(temporary)) + raise + print(json.dumps(dict(status='PASS_GF2_FULL_C_CORRECTNESS',hosted_performance_factor_claim=False,fixed_benchmark_sample=False,inner_timeout_seconds=150))) + + +if __name__=='__main__':main()