diff --git a/research/r439-frame267-seed01/CERTIFICATE.json b/research/r439-frame267-seed01/CERTIFICATE.json new file mode 100644 index 0000000000..edf77798e2 --- /dev/null +++ b/research/r439-frame267-seed01/CERTIFICATE.json @@ -0,0 +1,475 @@ +{ + "F2_matrix": [ + [ + 1, + 0, + 1, + 1, + 0, + 1 + ], + [ + 0, + 1, + 1, + 1, + 1, + 0 + ], + [ + 1, + 1, + 1, + 0, + 1, + 1 + ], + [ + 1, + 1, + 0, + 1, + 1, + 1 + ], + [ + 1, + 1, + 1, + 1, + 0, + 1 + ], + [ + 0, + 1, + 1, + 1, + 1, + 1 + ] + ], + "boolean_inputs": 64, + "columns": 661, + "controls_rejected": [ + "drop circuit gate", + "reverse circuit operand", + "F2-neutral positive-cost inflation", + "dropped cleanup", + "nonliteral original cleanup", + "illegal lower frame", + "missing dirty compensation", + "dropped exported quad ADD" + ], + "independent_optimality": { + "completed_expansion_depths": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "edges_from_completed_layers": 2271945, + "layers": [ + 1, + 14, + 121, + 738, + 3294, + 11132, + 28779, + 56137, + 82349, + 91299, + 75736, + 44081, + 17206 + ], + "minimum": 12, + "visited_states": 410887 + }, + "kappa_claim": "none; unchanged paid rank profile, no hosted replay", + "labels": { + "frames": 636, + "gram_det": 1, + "labels": 111, + "lattice_rank": 8, + "punctured": 9, + "root_lines": 120 + }, + "native_records": { + "original": { + "adds": 24305, + "copies": 9, + "erasures": 9, + "moves": 2911, + "paid_histogram": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "rank_mass": 5129, + "records": 27234, + "records_sha256": "ea44aa047a2a9cf034de8b56b2166c49cf2dbdf9cd9ed6a20299a4f2b05ef09a" + }, + "replacement": { + "adds": 24287, + "copies": 9, + "erasures": 9, + "moves": 2911, + "paid_histogram": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "rank_mass": 5129, + "records": 27216, + "records_sha256": "6c14ac84a5fed3601e995493fdda2a31da971207327e530bdb3ed262b9b6104a" + } + }, + "new_gates": 12, + "new_phase_gates": { + "A": 2066, + "B": 712, + "C": 2565, + "D": 111 + }, + "old_gates": 21, + "old_phase_gates": { + "A": 2075, + "B": 712, + "C": 2574, + "D": 111 + }, + "overlap_comparison": { + "author": "Gareth Davidson (@bitplane)", + "comparison_only": true, + "extra_saving_with_cleanup": 14, + "git_blob": "2a7413a4c393d5db67a1180736a8613320c99f0e", + "head": "883a0bdf7792693e57c16be660824b57aacfbe05", + "original_adds": 21, + "path": "research/r439-four-wire-prefix/CERTIFICATE.json", + "pr": 904, + "pr904_frame267_adds": 19, + "scope": "Comparison on this frame only; no combined whole-word saving or imported PR904 circuit.", + "selected_frame267_windows": [ + { + "frame": 267, + "new": [ + [ + 1, + 3 + ], + [ + 0, + 1 + ], + [ + 1, + 2 + ] + ], + "old": [ + [ + 0, + 1 + ], + [ + 0, + 3 + ], + [ + 1, + 2 + ], + [ + 1, + 3 + ] + ], + "registers": [ + 222, + 351, + 369, + 379 + ], + "saving": 1, + "section": "A", + "start": 619, + "stop": 623 + }, + { + "frame": 267, + "new": [ + [ + 0, + 3 + ], + [ + 2, + 0 + ], + [ + 2, + 1 + ] + ], + "old": [ + [ + 2, + 3 + ], + [ + 2, + 0 + ], + [ + 2, + 1 + ], + [ + 0, + 3 + ] + ], + "registers": [ + 222, + 351, + 369, + 486 + ], + "saving": 1, + "section": "A", + "start": 632, + "stop": 636 + } + ], + "sha256": "e29dcde966ccfffdc83b25685729a59745e8c3938af8770a38d850e5e8fc7495", + "this_frame267_adds": 12 + }, + "positive_matrices": { + "forward": { + "original": [ + [ + 1, + 2, + 1, + 1, + 2, + 1 + ], + [ + 0, + 1, + 1, + 1, + 1, + 0 + ], + [ + 1, + 3, + 3, + 2, + 3, + 1 + ], + [ + 1, + 3, + 2, + 3, + 3, + 1 + ], + [ + 1, + 3, + 3, + 3, + 4, + 1 + ], + [ + 0, + 1, + 1, + 1, + 1, + 1 + ] + ], + "replacement": [ + [ + 1, + 2, + 1, + 1, + 2, + 1 + ], + [ + 0, + 1, + 1, + 1, + 1, + 0 + ], + [ + 1, + 3, + 3, + 2, + 3, + 1 + ], + [ + 1, + 3, + 2, + 3, + 3, + 1 + ], + [ + 1, + 3, + 3, + 3, + 4, + 1 + ], + [ + 0, + 1, + 1, + 1, + 1, + 1 + ] + ] + }, + "reverse": { + "original": [ + [ + 9, + 9, + 3, + 3, + 2, + 17 + ], + [ + 5, + 6, + 2, + 2, + 1, + 10 + ], + [ + 1, + 1, + 1, + 0, + 0, + 2 + ], + [ + 1, + 1, + 0, + 1, + 0, + 2 + ], + [ + 3, + 3, + 1, + 1, + 1, + 6 + ], + [ + 10, + 11, + 4, + 4, + 2, + 21 + ] + ], + "replacement": [ + [ + 3, + 3, + 1, + 1, + 0, + 1 + ], + [ + 3, + 4, + 2, + 2, + 1, + 0 + ], + [ + 1, + 1, + 1, + 0, + 0, + 0 + ], + [ + 1, + 1, + 0, + 1, + 0, + 0 + ], + [ + 1, + 1, + 1, + 1, + 1, + 0 + ], + [ + 0, + 1, + 0, + 0, + 0, + 1 + ] + ] + } + }, + "quad": 1, + "reconstructed_word_sha256": "345e629e6cf6dc7bc577d29012d662798b855174ab34ad142d39b2c4af1a6d06", + "saved_with_cleanup": 18, + "status": "PASS_R439_FRAME267" +} diff --git a/research/r439-frame267-seed01/CLAIM.json b/research/r439-frame267-seed01/CLAIM.json new file mode 100644 index 0000000000..dab7f8720f --- /dev/null +++ b/research/r439-frame267-seed01/CLAIM.json @@ -0,0 +1,86 @@ +{ + "track": "Bit supplier", + "assignment_seed": 1, + "seed_source": "python3 secrets.randbelow(100), operating-system randomness; first draw was 1", + "base_commit": "91a2094f2e022930069e8cfdc810a3ea1b81cd09", + "started_utc": "2026-10-13T12:41:36Z", + "claimed_utc": "2026-10-13T12:45:59.224438+00:00", + "expected_finish_utc": "2026-10-13T13:21:36Z", + "verification_reserved_from_utc": "2026-10-13T13:11:36Z", + "object": "PR589 selected R439 phase-A frame 267, A[615:636], six registers [222,351,353,369,379,486]; literal C cleanup included", + "hypothesis": "An exact positive-integer factorization of the full six-wire transfer shortens 21 ADDs while its literal reverse stays entrywise dominated.", + "method": "Seed 1 chooses quad 1 among the 60 six-register phase-A frames. Enumerate nonnegative row-subtraction predecessors of the complete integer transfer, capped at 1000000 states; retain shortest witnessed factorization satisfying reverse domination. No unrestricted F2 optimality claim.", + "optimistic_budget": "A saving of s operations saves 2s with literal C. Same registers/frame paths/copies imply unchanged paid recursive profile; complex assembly remains binding, so no new kappa.", + "deliverable": "One exact circuit witness and independently reproducible finite verification, or a scoped bounded negative result.", + "candidates": [ + { + "task": "PR589 fixed-word frame reassignment", + "decision": "not selected: PR886 already proves the frame-only optimum" + }, + { + "task": "R439 D compensation through restored target bases", + "decision": "not selected: PR915 already supplies guarded target compensation; PR848 records the unchanged H2 restriction" + }, + { + "task": "Full six-register frame267 positive-integer synthesis", + "decision": "selected: full 6-wire operator differs from PR904 2-to-4-wire windows and PR728/792 mini-nodes; proof of exact finite positive-factorization minimum is additional coverage beyond local rewriting" + } + ], + "coordination": "GitHub GraphQL pinnedIssues returned no nodes; open issues were #650 and #913. No separate issue opened. Local claim used.", + "overlap_snapshot": { + "open_prs_inspected": 711, + "latest_pr_number": 920, + "relevant": [ + 915, + 914, + 908, + 906, + 904, + 891, + 886, + 884, + 880, + 873, + 857, + 848, + 843, + 823, + 792, + 728, + 691 + ] + }, + "status": "completed; submitted for review", + "contributor": "Ross Richardson (@RossRichardson)", + "ai_assistance": "Substantial OpenAI Codex assistance; one AI agent; no independent human review claimed.", + "initial_experiment": { + "class": "nonnegative predecessors without diagonal pruning", + "stopping_rule": "at 1000001 attempted states", + "completed": false, + "edges_before_stop": 5105138, + "elapsed_seconds": 16.806, + "finding": "state cap; neither a negative result nor an optimum", + "revision": "Apply the necessary invariant A >= I for every positive-addition prefix; same object and class, no actual positive circuit excluded." + }, + "completed_search": { + "class": "fixed six-wire positive integer transfer with repeated writes; diagonal-pruned complete predecessor closure", + "state_cap": 1000000, + "states": 416508, + "edges": 2366680, + "minimum": 12, + "coverage": "complete finite closure; independent BFS completes layers 0 through 11 and reaches I in layer 12", + "new_kappa": false + }, + "verification_started_utc": "2026-10-13T12:55:00Z", + "result": "21->12 ADDs at frame267; 24305->24287 with literal cleanup; exact positive-transfer minimum12; no new kappa", + "overlap_refresh": { + "open_pr_count": 714, + "latest_seen": 924, + "additional_coverage": "PR904 reaches 19 ADDs on this frame; this complete six-wire witness reaches12 and proves a restricted-class minimum. No combined savings.", + "base_still_current": "91a2094f2e022930069e8cfdc810a3ea1b81cd09" + }, + "result_url": "https://github.com/CrocSwap/integer-mult-bounds/pull/925", + "tested_contribution_commit": "8541db4f7aff70fe8ab4ecd5a12277b696a532de", + "completed_utc": "2026-10-13T13:06:02.844396+00:00", + "handoff": "Focused and native checks pass; one 240-second repository-wide run incomplete. No new kappa, no frontier change, no merge." +} diff --git a/research/r439-frame267-seed01/LICENSE b/research/r439-frame267-seed01/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/r439-frame267-seed01/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/r439-frame267-seed01/MAKE-VERIFY.json b/research/r439-frame267-seed01/MAKE-VERIFY.json new file mode 100644 index 0000000000..d8219fab7e --- /dev/null +++ b/research/r439-frame267-seed01/MAKE-VERIFY.json @@ -0,0 +1,12 @@ +{ + "command": "make verify", + "base": "91a2094f2e022930069e8cfdc810a3ea1b81cd09", + "time_limit_seconds": 240, + "timed_out": true, + "returncode": -15, + "elapsed_seconds": 240.042, + "log_sha256": "80a8c7bd1b21e539afff29f9d3aed145513b084f8a48f1790a8accba84cf8c02", + "stopped_target": "verify-producers -> endpoint-gauge-producer, h=40", + "outcome": "INCOMPLETE: bounded timeout, not a failed mathematical check or a passed repository-wide suite", + "source_isolation": "disposable clone of the exact base with this research package; main work checkout unchanged" +} diff --git a/research/r439-frame267-seed01/NATIVE-CERTIFICATE.json b/research/r439-frame267-seed01/NATIVE-CERTIFICATE.json new file mode 100644 index 0000000000..2d8f22910b --- /dev/null +++ b/research/r439-frame267-seed01/NATIVE-CERTIFICATE.json @@ -0,0 +1,1206 @@ +{ + "normalization": "Only seconds and local_scalar_stream removed; all other native fields retained.", + "schema": "r439-frame267-native/1", + "words": { + "original": { + "legality": { + "all_final_frames_pass": true, + "common_frame_ADDs": 24305, + "containment_pairs_checked": 2386, + "copies": 9, + "donor_intersections": 0, + "erasures": 9, + "max_inherited_integer_abs": 2, + "nested_MOVEs": 2911, + "new_frame_ids_collision": false, + "nondegeneracy_checked_by_separate_exact_bank_audit": true, + "old_max_frame_id": 635, + "paid_histogram": [ + [ + 1, + 1323 + ], + [ + 2, + 1342 + ], + [ + 3, + 79 + ], + [ + 4, + 44 + ], + [ + 5, + 102 + ], + [ + 6, + 11 + ], + [ + 7, + 19 + ] + ], + "rank_mass": 5129, + "records": 27234, + "scope": "Independent chronological geometry/copy/source-owner audit. F2 all-column replay is in the separately freshly compiled transform receipt; address transform theorem and bank completion remain separate.", + "selected_helpers": 0, + "selected_pairs": 0, + "source_owner_intersections": 0, + "status": "PASS_INDEPENDENT_COHORT_LEGALITY_SOURCE_OWNERS_AND_LIFECYCLE" + }, + "stages": { + "11": { + "bridge_additions": 2664, + "copied_center_original_source_immutable": true, + "formal_columns_checked": 1549, + "fresh_center_copies": 99, + "global_live_registers": 1549, + "independent_dirty_registers": 439, + "local_odd_scalar_additions": 24305, + "local_raw_H": [ + [ + 1, + 1323 + ], + [ + 2, + 1342 + ], + [ + 3, + 79 + ], + [ + 4, + 44 + ], + [ + 5, + 102 + ], + [ + 6, + 11 + ], + [ + 7, + 19 + ] + ], + "local_registers": 661, + "local_scalar_additions": 24305, + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + }, + { + "omit_bridge": 6, + "rejected": true + }, + { + "omit_bridge": 7, + "rejected": true + }, + { + "omit_bridge": 8, + "rejected": true + }, + { + "omit_bridge": 9, + "rejected": true + }, + { + "omit_bridge": 10, + "rejected": true + }, + { + "omit_bridge": 11, + "rejected": true + }, + { + "omit_bridge": 12, + "rejected": true + }, + { + "omit_bridge": 13, + "rejected": true + }, + { + "omit_bridge": 14, + "rejected": true + }, + { + "omit_bridge": 15, + "rejected": true + }, + { + "omit_bridge": 16, + "rejected": true + }, + { + "omit_bridge": 17, + "rejected": true + }, + { + "omit_bridge": 18, + "rejected": true + }, + { + "omit_bridge": 19, + "rejected": true + }, + { + "omit_bridge": 20, + "rejected": true + }, + { + "omit_bridge": 21, + "rejected": true + }, + { + "omit_bridge": 22, + "rejected": true + }, + { + "omit_bridge": 23, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 93, + "payload_prefix_upper": "9528119495320518471870892800", + "reverse_fresh_center_copies": 45, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "signed_lift_prefix": [ + { + "bits": 16, + "cancellation_free_signed_row_l1_upper": "49347", + "reverse": false + }, + { + "bits": 21, + "cancellation_free_signed_row_l1_upper": "1113070", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stage_additions": 267355, + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 4 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 5 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 6 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 7 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 8 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 9 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 10 + } + ], + "status": "PASS_NEW_COHORT249_ALL_BRIDGED_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + }, + "5": { + "bridge_additions": 666, + "copied_center_original_source_immutable": true, + "five_stage_additions": 121525, + "formal_columns_checked": 883, + "fresh_center_copies": 45, + "global_live_registers": 883, + "independent_dirty_registers": 439, + "local_odd_scalar_additions": 24305, + "local_raw_H": [ + [ + 1, + 1323 + ], + [ + 2, + 1342 + ], + [ + 3, + 79 + ], + [ + 4, + 44 + ], + [ + 5, + 102 + ], + [ + 6, + 11 + ], + [ + 7, + 19 + ] + ], + "local_registers": 661, + "local_scalar_additions": 24305, + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 93, + "payload_prefix_upper": "9528119495320518471870892800", + "reverse_fresh_center_copies": 18, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "signed_lift_prefix": [ + { + "bits": 16, + "cancellation_free_signed_row_l1_upper": "49347", + "reverse": false + }, + { + "bits": 21, + "cancellation_free_signed_row_l1_upper": "1113070", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 4 + } + ], + "status": "PASS_NEW_COHORT249_ALL_FIVE_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + }, + "9": { + "bridge_additions": 1998, + "copied_center_original_source_immutable": true, + "formal_columns_checked": 1327, + "fresh_center_copies": 81, + "global_live_registers": 1327, + "independent_dirty_registers": 439, + "local_odd_scalar_additions": 24305, + "local_raw_H": [ + [ + 1, + 1323 + ], + [ + 2, + 1342 + ], + [ + 3, + 79 + ], + [ + 4, + 44 + ], + [ + 5, + 102 + ], + [ + 6, + 11 + ], + [ + 7, + 19 + ] + ], + "local_registers": 661, + "local_scalar_additions": 24305, + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + }, + { + "omit_bridge": 6, + "rejected": true + }, + { + "omit_bridge": 7, + "rejected": true + }, + { + "omit_bridge": 8, + "rejected": true + }, + { + "omit_bridge": 9, + "rejected": true + }, + { + "omit_bridge": 10, + "rejected": true + }, + { + "omit_bridge": 11, + "rejected": true + }, + { + "omit_bridge": 12, + "rejected": true + }, + { + "omit_bridge": 13, + "rejected": true + }, + { + "omit_bridge": 14, + "rejected": true + }, + { + "omit_bridge": 15, + "rejected": true + }, + { + "omit_bridge": 16, + "rejected": true + }, + { + "omit_bridge": 17, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 93, + "payload_prefix_upper": "9528119495320518471870892800", + "reverse_fresh_center_copies": 36, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "signed_lift_prefix": [ + { + "bits": 16, + "cancellation_free_signed_row_l1_upper": "49347", + "reverse": false + }, + { + "bits": 21, + "cancellation_free_signed_row_l1_upper": "1113070", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stage_additions": 218745, + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 4 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 5 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 6 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": true, + "stage": 7 + }, + { + "fresh_copies": 9, + "scalar_additions": 24305, + "signed_inverse": false, + "stage": 8 + } + ], + "status": "PASS_NEW_COHORT249_ALL_BRIDGED_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + } + } + }, + "replacement": { + "legality": { + "all_final_frames_pass": true, + "common_frame_ADDs": 24287, + "containment_pairs_checked": 2386, + "copies": 9, + "donor_intersections": 0, + "erasures": 9, + "max_inherited_integer_abs": 2, + "nested_MOVEs": 2911, + "new_frame_ids_collision": false, + "nondegeneracy_checked_by_separate_exact_bank_audit": true, + "old_max_frame_id": 635, + "paid_histogram": [ + [ + 1, + 1323 + ], + [ + 2, + 1342 + ], + [ + 3, + 79 + ], + [ + 4, + 44 + ], + [ + 5, + 102 + ], + [ + 6, + 11 + ], + [ + 7, + 19 + ] + ], + "rank_mass": 5129, + "records": 27216, + "scope": "Independent chronological geometry/copy/source-owner audit. F2 all-column replay is in the separately freshly compiled transform receipt; address transform theorem and bank completion remain separate.", + "selected_helpers": 0, + "selected_pairs": 0, + "source_owner_intersections": 0, + "status": "PASS_INDEPENDENT_COHORT_LEGALITY_SOURCE_OWNERS_AND_LIFECYCLE" + }, + "stages": { + "11": { + "bridge_additions": 2664, + "copied_center_original_source_immutable": true, + "formal_columns_checked": 1549, + "fresh_center_copies": 99, + "global_live_registers": 1549, + "independent_dirty_registers": 439, + "local_odd_scalar_additions": 24287, + "local_raw_H": [ + [ + 1, + 1323 + ], + [ + 2, + 1342 + ], + [ + 3, + 79 + ], + [ + 4, + 44 + ], + [ + 5, + 102 + ], + [ + 6, + 11 + ], + [ + 7, + 19 + ] + ], + "local_registers": 661, + "local_scalar_additions": 24287, + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + }, + { + "omit_bridge": 6, + "rejected": true + }, + { + "omit_bridge": 7, + "rejected": true + }, + { + "omit_bridge": 8, + "rejected": true + }, + { + "omit_bridge": 9, + "rejected": true + }, + { + "omit_bridge": 10, + "rejected": true + }, + { + "omit_bridge": 11, + "rejected": true + }, + { + "omit_bridge": 12, + "rejected": true + }, + { + "omit_bridge": 13, + "rejected": true + }, + { + "omit_bridge": 14, + "rejected": true + }, + { + "omit_bridge": 15, + "rejected": true + }, + { + "omit_bridge": 16, + "rejected": true + }, + { + "omit_bridge": 17, + "rejected": true + }, + { + "omit_bridge": 18, + "rejected": true + }, + { + "omit_bridge": 19, + "rejected": true + }, + { + "omit_bridge": 20, + "rejected": true + }, + { + "omit_bridge": 21, + "rejected": true + }, + { + "omit_bridge": 22, + "rejected": true + }, + { + "omit_bridge": 23, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 93, + "payload_prefix_upper": "9431873031029854941390373632", + "reverse_fresh_center_copies": 45, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "signed_lift_prefix": [ + { + "bits": 16, + "cancellation_free_signed_row_l1_upper": "49347", + "reverse": false + }, + { + "bits": 21, + "cancellation_free_signed_row_l1_upper": "1107434", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stage_additions": 267157, + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": false, + "stage": 4 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": true, + "stage": 5 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": false, + "stage": 6 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": true, + "stage": 7 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": false, + "stage": 8 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": true, + "stage": 9 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": false, + "stage": 10 + } + ], + "status": "PASS_NEW_COHORT249_ALL_BRIDGED_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + }, + "5": { + "bridge_additions": 666, + "copied_center_original_source_immutable": true, + "five_stage_additions": 121435, + "formal_columns_checked": 883, + "fresh_center_copies": 45, + "global_live_registers": 883, + "independent_dirty_registers": 439, + "local_odd_scalar_additions": 24287, + "local_raw_H": [ + [ + 1, + 1323 + ], + [ + 2, + 1342 + ], + [ + 3, + 79 + ], + [ + 4, + 44 + ], + [ + 5, + 102 + ], + [ + 6, + 11 + ], + [ + 7, + 19 + ] + ], + "local_registers": 661, + "local_scalar_additions": 24287, + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 93, + "payload_prefix_upper": "9431873031029854941390373632", + "reverse_fresh_center_copies": 18, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "signed_lift_prefix": [ + { + "bits": 16, + "cancellation_free_signed_row_l1_upper": "49347", + "reverse": false + }, + { + "bits": 21, + "cancellation_free_signed_row_l1_upper": "1107434", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": false, + "stage": 4 + } + ], + "status": "PASS_NEW_COHORT249_ALL_FIVE_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + }, + "9": { + "bridge_additions": 1998, + "copied_center_original_source_immutable": true, + "formal_columns_checked": 1327, + "fresh_center_copies": 81, + "global_live_registers": 1327, + "independent_dirty_registers": 439, + "local_odd_scalar_additions": 24287, + "local_raw_H": [ + [ + 1, + 1323 + ], + [ + 2, + 1342 + ], + [ + 3, + 79 + ], + [ + 4, + 44 + ], + [ + 5, + 102 + ], + [ + 6, + 11 + ], + [ + 7, + 19 + ] + ], + "local_registers": 661, + "local_scalar_additions": 24287, + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + }, + { + "omit_bridge": 6, + "rejected": true + }, + { + "omit_bridge": 7, + "rejected": true + }, + { + "omit_bridge": 8, + "rejected": true + }, + { + "omit_bridge": 9, + "rejected": true + }, + { + "omit_bridge": 10, + "rejected": true + }, + { + "omit_bridge": 11, + "rejected": true + }, + { + "omit_bridge": 12, + "rejected": true + }, + { + "omit_bridge": 13, + "rejected": true + }, + { + "omit_bridge": 14, + "rejected": true + }, + { + "omit_bridge": 15, + "rejected": true + }, + { + "omit_bridge": 16, + "rejected": true + }, + { + "omit_bridge": 17, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 93, + "payload_prefix_upper": "9431873031029854941390373632", + "reverse_fresh_center_copies": 36, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "signed_lift_prefix": [ + { + "bits": 16, + "cancellation_free_signed_row_l1_upper": "49347", + "reverse": false + }, + { + "bits": 21, + "cancellation_free_signed_row_l1_upper": "1107434", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stage_additions": 218583, + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": false, + "stage": 4 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": true, + "stage": 5 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": false, + "stage": 6 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": true, + "stage": 7 + }, + { + "fresh_copies": 9, + "scalar_additions": 24287, + "signed_inverse": false, + "stage": 8 + } + ], + "status": "PASS_NEW_COHORT249_ALL_BRIDGED_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + } + } + } + } +} diff --git a/research/r439-frame267-seed01/NOTICE.md b/research/r439-frame267-seed01/NOTICE.md new file mode 100644 index 0000000000..53265089e8 --- /dev/null +++ b/research/r439-frame267-seed01/NOTICE.md @@ -0,0 +1,33 @@ +# Attribution and license + +This contribution is Apache-2.0, under the repository LICENSE copied here. +Prepared by Ross Richardson (@RossRichardson) with substantial OpenAI Codex +assistance. One AI agent; independent *implementations* do not mean independent +human authorship, review, or formal verification of multiplication. + +- The unchanged PR589 selected R439 word is DreamingOfClouds' tuning of eumemic's + PR555 punctured supplier on PR543's R420 skeleton and PR545's punctured unit. + Its proof and notice, and the complete predecessor credit, remain intact in + `research/e8-bit-p111-tuned/`. +- `verify.py` adapts mtpsl PR691's `research/r420-quad13/verify.py`, including its + column-valued local checker, set-valued record interpreter and controls. That + source was prepared with substantial OpenAI Codex assistance under Apache-2.0. + The positive-transfer argument is credited to that contribution. The new + complete predecessor-DAG and breadth-first minimum checkers import none of + its nomination code. +- `native.py` adapts Ali Romman PR688's + `research/r420-two-block-composition/native.py`, prepared with substantial + OpenAI Codex assistance under Apache-2.0. +- Unchanged runtime sources: eumemic's `xcheck_p.py`; Dylan Crow's exporter and + official cohort checkers (with their retained Claude-assistance notices); + the retained native and hosting/assembly lineage by DreamingOfClouds, + DaysSky, Zhihao Chen, Chafik Boukhalfa, Jeremy Kothe, Rohan Arun and others. + Jacob Sussman's E8 unit remains the geometric ancestor. +- Gareth Davidson's PR904 is a concurrent overlapping small-window contribution, + pinned for comparison only. It is neither imported into this candidate nor + combined with our circuit. Hao Yan's PR823 and Sagar Thakrar/Ryan Haines' + PR728/792 are distinct related circuit work. No mechanism-priority claim. + +Source/context Git blobs and SHA256 values are pinned in SOURCES.json. +External comparison bytes are pinned in OVERLAP.json. All predecessor licenses +and notices remain unchanged. No upstream/ file is changed. diff --git a/research/r439-frame267-seed01/OVERLAP.json b/research/r439-frame267-seed01/OVERLAP.json new file mode 100644 index 0000000000..f23e3e3146 --- /dev/null +++ b/research/r439-frame267-seed01/OVERLAP.json @@ -0,0 +1,106 @@ +{ + "comparison_only": true, + "pr": 904, + "author": "Gareth Davidson (@bitplane)", + "head": "883a0bdf7792693e57c16be660824b57aacfbe05", + "path": "research/r439-four-wire-prefix/CERTIFICATE.json", + "git_blob": "2a7413a4c393d5db67a1180736a8613320c99f0e", + "sha256": "e29dcde966ccfffdc83b25685729a59745e8c3938af8770a38d850e5e8fc7495", + "selected_frame267_windows": [ + { + "frame": 267, + "new": [ + [ + 1, + 3 + ], + [ + 0, + 1 + ], + [ + 1, + 2 + ] + ], + "old": [ + [ + 0, + 1 + ], + [ + 0, + 3 + ], + [ + 1, + 2 + ], + [ + 1, + 3 + ] + ], + "registers": [ + 222, + 351, + 369, + 379 + ], + "saving": 1, + "section": "A", + "start": 619, + "stop": 623 + }, + { + "frame": 267, + "new": [ + [ + 0, + 3 + ], + [ + 2, + 0 + ], + [ + 2, + 1 + ] + ], + "old": [ + [ + 2, + 3 + ], + [ + 2, + 0 + ], + [ + 2, + 1 + ], + [ + 0, + 3 + ] + ], + "registers": [ + 222, + 351, + 369, + 486 + ], + "saving": 1, + "section": "A", + "start": 632, + "stop": 636 + } + ], + "original_adds": 21, + "pr904_frame267_adds": 19, + "this_frame267_adds": 12, + "extra_saving_with_cleanup": 14, + "scope": "Comparison on this frame only; no combined whole-word saving or imported PR904 circuit." +} diff --git a/research/r439-frame267-seed01/PROOF.md b/research/r439-frame267-seed01/PROOF.md new file mode 100644 index 0000000000..ef5ece1798 --- /dev/null +++ b/research/r439-frame267-seed01/PROOF.md @@ -0,0 +1,121 @@ +# A 12-ADD factorization and its precise minimum + +This is a finite circuit result. Indices in the circuit are ordered physical +registers `(222,351,353,369,379,486)` of DreamingOfClouds' PR589 word. The +source slice is phase A `[615,636)`, entirely at frame 267 (rank four). +All six registers are dirty helpers; none is assumed zero. A gate `(d,s)` +is `x[d] ^= x[s]`. Its positive lift replaces XOR by integer addition. + +The positive transfer of the original 21 gates is + +``` +M = [1 2 1 1 2 1] + [0 1 1 1 1 0] + [1 3 3 2 3 1] + [1 3 2 3 3 1] + [1 3 3 3 4 1] + [0 1 1 1 1 1]. +``` + +The replacement, in execution order, is + +``` +(1,4), (0,1), (1,3), (1,2), (5,1), (3,1), +(0,5), (3,0), (4,3), (4,2), (2,1), (2,0). +``` + +Independent column evolution checks `P(new)=P(old)=M` over the integers; +reduction modulo two therefore gives the identical ordered F2 map on every +incoming state. All 64 Boolean inputs are also checked. The two literal +reverse positive matrices satisfy `P(reverse(new)) <= P(reverse(old))` +entrywise; both matrices are retained in `CERTIFICATE.json`. + +## What is minimized + +**Proposition (finite positive-transfer class).** Twelve is the minimum +number of operations `row[d] += row[s]`, `d != s`, taking the ordered 6-by-6 +identity to M, with six wires and no additional registers. Repeated writes, +repeated reads, and all 30 ordered pairs are allowed. The certified witness +also obeys the reverse-domination guard. + +To enumerate the class, remove a circuit's last operation: subtract its +source row from its destination row. Every intermediate positive-addition +matrix is entrywise at least I: it starts at I and each nonnegative row +addition only increases entries. Thus a candidate predecessor is retained +exactly when the subtracted row is nonnegative and its diagonal entry is at +least one. This necessary test cannot remove an actual positive circuit. +Conversely every edge retained by this test is reversed by the specified +legal row addition. A path ending at I therefore constructs a valid circuit. +Each subtraction decreases total entry mass strictly (the source has a +positive diagonal), so the predecessor graph is a finite DAG. + +`search.py` enumerates its entire closure from M: **416,508 states and +2,366,680 directed edges**. The recurrence is `d(I)=0` and +`d(A)=1+min d(B)` over all retained predecessors, with infinity for a dead +end. It gives `d(M)=12`; `999` in the saved histogram denotes infinity, +not an actual circuit length. The total entry mass of M is 58, so every retained path has at most +58 - 6 = 52 edges. The sentinel exceeds every possible finite distance. + +`optimality.py` shares no nomination code. It stores flat byte matrices and +performs breadth-first search from M. It fully expands distances 0 through +11, testing **2,271,945 transitions** and discovering **410,887 states** +through layer 12. I first occurs in layer 12. Its layer sizes are + +``` +1, 14, 121, 738, 3294, 11132, 28779, +56137, 82349, 91299, 75736, 44081, 17206. +``` + +The independent traversal checks the lower bound; the explicit circuit checks +the upper bound. These are two implementations of the same justified graph, +not two different mathematical relaxations or independent human reviews. +Neither proves optimality among arbitrary XOR circuits (which may change the +positive integer matrix), extra-wire circuits, or altered frames. No general +multiplication theorem is formalized. + +## Substitution, cleanup, and complete local cost + +The source slice is contiguous, with no external observer between its gates. +Its identical endpoint permits every later A operation, scatter, B and D to +remain unchanged. Rebuild C as the literal full-frame reverse of *all* +z-destination gates of A followed by B. XOR gates are involutions, so this +restores every source and helper, including its arbitrary incoming dirt. +The original H1-H5 predicates and U/J/K/C decomposition all pass unchanged. + +The same six physical registers visit the same common frame, with no other +frame or register introduced. The verifier compares all 661 ordered frame +paths, including final climbs. The unchanged exporter and separate record +interpreter then account for every read, write, move, copy and erase: + +| Local charge | Original | Replacement | +|---|---:|---:| +| D additions | 18,085 | 18,085 | +| A additions | 2,130 | 2,121 | +| Scatter additions | 527 | 527 | +| B additions | 934 | 934 | +| C additions | 2,629 | 2,620 | +| **All ADDs** | **24,305** | **24,287** | +| MOVEs | 2,911 | 2,911 | +| COPY / ERASE pairs | 9 | 9 | +| Persistent registers / dirty helpers | 661 / 439 | 661 / 439 | + +There is one existing temporary COPY register, reused under the inherited +lifecycle; no extra scratch or child is introduced. The local paid histogram +is exactly `{1:1323,2:1342,3:79,4:44,5:102,6:11,7:19}` on both words; its rank +mass is 5,129. Every paid recursive rank count is retained. Hence the paid +moment is identical for every exponent. This is a scalar-cost saving only. + +For every nonnegative input bound vector, the replacement's forward terminal +bound is identical and its reverse terminal bound is no larger. Positive +addition prefixes are bounded by their terminal vector. Substitution within +an otherwise identical monotone stream therefore cannot raise either local +positive prefix bound. Fresh native replay confirms forward bound **49,347** +and reverse bound **1,113,070 -> 1,107,434**. The inherited five-stage payload +formula `64 F^3 B^2` stays at **93 bits**, below its 104-bit cap. Native 9/11 +stage receipts retain their respective complete formulas and controls. + +The full hosted parent invoice is not reconstructed by this package. The +changed finite word must still be integrated and source-bound by a maintainer. +The selected assembly is complex-bound; its selected kappa is unchanged. +All-size/compiler, common-label/mutable-source realization, whole-call hosting, +precision/tape and analytic hypotheses remain inherited. diff --git a/research/r439-frame267-seed01/README.md b/research/r439-frame267-seed01/README.md new file mode 100644 index 0000000000..6f6db13830 --- /dev/null +++ b/research/r439-frame267-seed01/README.md @@ -0,0 +1,108 @@ +# R439 frame 267: 21 ADDs become 12, with an exact class minimum + +**Finite bit-supplier construction; no new kappa.** Replace PR589's complete +six-register phase-A frame-267 circuit and its literal reverse cleanup. +The local word saves **18 ADDs: 24,305 -> 24,287**. The new circuit preserves +its complete positive integer transfer and attains the **12-ADD minimum for +that fixed six-wire integer transfer**, including repeated destination writes. +The reverse positive matrix is entrywise no larger. + +Research base: **`91a2094f2e022930069e8cfdc810a3ea1b81cd09`**. Its selected +certificate is PR799 with PR589 on PR555, conditional +**kappa = 0.001661634653669567**, complex-bound. We followed the selected +record to its actual assembly and maintainer review. Older supplier README +frontiers are historical. This package changes no selected source or pointer. + +## Reproduce + +Python 3.11+ and the standard library suffice: + +```sh +python3 -I -B research/r439-frame267-seed01/verify.py +``` + +Expected final line: + +``` +PASS_R439_FRAME267 gates=21->12 native_adds=24305->24287 columns=661 rank_mass=5129 controls=8 +``` + +This recomputes both minimum certificates, validates every recipe metadata +field, checks the full exact integer matrices and 64 local Boolean inputs, +runs the unchanged owning E8/frame/interface checker on all 661 symbolic +dirty-input columns, exports both words, and independently interprets every +native record. It checks all fields of `CERTIFICATE.json` and rejects eight +mathematical controls. `--output /absolute/new/directory` preserves both words +and their records; an existing output directory is refused. Default replay +uses temporary outputs and changes no repository files. `--write-certificate` +is explicit regeneration of this package's certificate only. + +For the fresh native legality and 5/9/11-stage replay (C++17 and Boost): + +```sh +BOOST_INCLUDE=/path/to/boost python3 -I -B research/r439-frame267-seed01/native.py +python3 -I -B research/r439-frame267-seed01/test_package.py -v +``` + +The native command compiles each unchanged checker once, replays both words, +checks **883 / 1,327 / 1,549 formal columns**, rejects all **96 omitted-bridge +controls**, and compares all proof-relevant receipt fields. Only elapsed time +and the temporary input path are normalized. Both words retain the paid rank +profile, nine copies, 439 helpers, and 93-bit payload under the 104-bit cap. +`NATIVE-CERTIFICATE.json` retains the receipts; `VALIDATION.md` records execution +and the repository-wide check separately. Gzip container bytes are not used +as regenerated mathematical equality: the verifier binds canonical decoded +words and actual exported record bytes. + +## Exact scope and evidence + +See [PROOF.md](PROOF.md) for the graph argument, literal circuit, complete local +cost and inherited assumptions. `search.py` exhausts 416,508 states / 2,366,680 +edges. The separately written flat-matrix breadth-first checker fully expands +depths 0 through 11 and first reaches identity at depth 12. This establishes a +minimum only for this fixed positive integer matrix and six ordered wires. +It does not establish unrestricted XOR optimality, a new exponent, or the +full multiplication theorem. No global hosted invoice or outer assembly is +newly certified. + +Controls drop a circuit gate, reverse an operand, insert an F2-neutral but +positively expensive pair, drop cleanup, keep a scalar-valid but nonliteral +old cleanup, lower the frame illegally, omit dirty compensation, and drop an +exported ADD. Stale cleanup is explicitly scalar-valid and rejected by H4. +The package tests additionally exercise source/certificate corruption, invalid +gates, minimum under/overclaims, preserved existing outputs, and optimized +Python in a minimal offline directory whose path contains spaces. + +## Assignment, prior work and overlap + +The first OS-random draw was **01** (bit supplier). It selects quad 1 among +60 six-register phase-A frames. `CLAIM.json` records three considered tasks, +the narrow scope, timing, first capped experiment and completed coverage. +GitHub returned no pinned coordination issue, so the claim is local. + +**Gareth Davidson's PR904** (head `883a0bdf7792693e57c16be660824b57aacfbe05`) +contains two disjoint four-wire substitutions inside this same frame, saving +two A ADDs (21 -> 19). This full-frame witness saves nine (21 -> 12), **seven +more in A and fourteen more including cleanup on this frame**. The source-bound +comparison is recorded in `OVERLAP.json`; no combined whole-word saving with +PR904 is claimed. Our method exhausts a different full-six-wire positive +factorization class, rather than sampling additional small windows. + +**mtpsl's PR691** supplies the related integer-transfer/reverse-domination +argument for historical R420 quad 13; this package adapts its finite word and +record verifier with credit. **Hao Yan's PR823** treats historical R480 quad 1, +a different matrix. **Sagar Thakrar's PR728 / Ryan Haines' PR792** concern R439 +mini-nodes, not this frame. **PR886** closes fixed-word frame-only improvement; +this result changes the gate sequence while preserving frame paths. **PR848** +records the old H2 barrier for D sharing; D is untouched here. **PR915** changes +D under a semantic boundary; those changes and savings are not composed here. + +Credit remains with eumemic (PR543/555), DreamingOfClouds (PR545/589/510), Dylan +Crow (exporter/native lineage), Zhihao Chen (scalar interface), DaysSky (hosting), +and all retained predecessors. The native wrapper adapts Ali Romman's PR688 +wrapper from current main. Source hashes and Git blobs are in `SOURCES.json`; +see `NOTICE.md` for detailed attribution. + +Prepared by **Ross Richardson (@RossRichardson)** with substantial **OpenAI +Codex assistance** in research, code, proof analysis and verification. One AI +agent performed the work; no independent human review is claimed. Apache-2.0. diff --git a/research/r439-frame267-seed01/SOURCES.json b/research/r439-frame267-seed01/SOURCES.json new file mode 100644 index 0000000000..2223c805a0 --- /dev/null +++ b/research/r439-frame267-seed01/SOURCES.json @@ -0,0 +1,118 @@ +{ + "base_commit": "91a2094f2e022930069e8cfdc810a3ea1b81cd09", + "supplier_pr589_head": "a5afc8c6169ea61ba7c51dfd3cade02cc7b13b46", + "selected_pr799_head": "80e6463157cfc80b85af09e7e2f14748fe2dac60", + "execution_inputs": [ + "research/e8-bit-p111-tuned/tune/bitE8mut-p111-tuned.json.gz", + "research/e8-bit-p111-tuned/code/xcheck_p.py", + "research/e8-bit-carrier-skeleton/code/bit/export_records.py" + ], + "native_inputs": [ + "research/e8-bit-carrier-skeleton/code/bit/regression/stage_cohort.py", + "research/e8-bit-carrier-skeleton/code/bit/checkers/legality_h.cpp", + "research/e8-bit-carrier-skeleton/code/bit/checkers/columns_k.cpp", + "research/e8-bit-carrier-skeleton/code/bit/checkers/json.hpp", + "research/e8-bit-carrier-skeleton/portable-include/bits/stdc++.h" + ], + "context_inputs": [ + "CONTRIBUTING.md", + "certificates/selected-result.json", + "docs/research/current-status.md", + "docs/research/pr-ledger.md", + "docs/research/community-frontier799-review.md", + "research/community-frontier799-audit/ASSEMBLY.json", + "research/community-frontier799-audit/SELECTED-SOURCE.json", + "research/e8-bit-p111-tuned/README.md", + "research/e8-bit-p111-tuned/tune/README.md", + "research/r420-quad13/verify.py", + "research/r420-quad13/PROOF.md", + "research/r420-two-block-composition/native.py" + ], + "files": { + "research/e8-bit-p111-tuned/tune/bitE8mut-p111-tuned.json.gz": { + "sha256": "e3e301e62bc2b41dbf1ceac0acf3d35824ebeab1848c5a2142d4577b109da52f", + "git_blob": "85a4499bf9e4911a705d50567a2c2ef6cf23739a" + }, + "research/e8-bit-p111-tuned/code/xcheck_p.py": { + "sha256": "af3decc877e27c00001cf56f50c6c09566e8e101297ab34c7860aed96a06d80e", + "git_blob": "184f5dcf94a486cc7db91ca4db5865916bf26009" + }, + "research/e8-bit-carrier-skeleton/code/bit/export_records.py": { + "sha256": "8a5999601f917dbb492bb9ae9a344611f18cc7cedc53dc3c76496a369e530eb3", + "git_blob": "3632d370486a02f5456f7643ced03f8c925b2350" + }, + "research/e8-bit-carrier-skeleton/code/bit/regression/stage_cohort.py": { + "sha256": "6c288f6f234b528c1a7c0a4adfb724e91e0fe6b18c8dffad96af3f973de1829a", + "git_blob": "f6d7afe3e623208c4207b6a683a1e3e49249e31c" + }, + "research/e8-bit-carrier-skeleton/code/bit/checkers/legality_h.cpp": { + "sha256": "6c1ef2b24e57781d6951c172a1024fc4300e6fd392c9d6672079a7806ab663b3", + "git_blob": "cb1233c7e96b1aa8bbf4d2e4165d75ab0dca64b9" + }, + "research/e8-bit-carrier-skeleton/code/bit/checkers/columns_k.cpp": { + "sha256": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "git_blob": "42bb232fbec4de703e70cc13dc2f39a3b43a3a01" + }, + "research/e8-bit-carrier-skeleton/code/bit/checkers/json.hpp": { + "sha256": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63", + "git_blob": "82d69f7c5d044c9887c96b90c97f5639083ecd14" + }, + "research/e8-bit-carrier-skeleton/portable-include/bits/stdc++.h": { + "sha256": "420094be2af295eed03a983dd66debbbe9cfb78d8252859f4498a615a0074b99", + "git_blob": "fc5664e929d9a81d9b4926bee049a93330be86ec" + }, + "CONTRIBUTING.md": { + "sha256": "1cae543effcabab91dab7f78423ee9283e60fb504f10848483d153331cd72bc4", + "git_blob": "acda5f534dd9e54eb80479cd15ccc12fafe39792" + }, + "certificates/selected-result.json": { + "sha256": "9873519224e2db72d6a8c926f51e3e75129671e467948c6f6b03744f8bcfc699", + "git_blob": "1f107b55a2f045fa66d9c35d658b3b79549f5ba6" + }, + "docs/research/current-status.md": { + "sha256": "415f85180f698329bea968798f2bc2519f56374cccc3e07c8e9051bd65192730", + "git_blob": "018b9b5aef5debdf7e951f247e7e22686a7c9753" + }, + "docs/research/pr-ledger.md": { + "sha256": "d8169a360cd6e5842b47008362c7cce0ffcdd62733a8e8210ef6a8ff32bb65c9", + "git_blob": "bcdfa8c49100755cc05594295aa9acd3a18d0d78" + }, + "docs/research/community-frontier799-review.md": { + "sha256": "bd91c10c67f2a873fd456b95cbb43f715a43dac0e0a66938737d591c6b754052", + "git_blob": "7a2cd0a64199e0aaf93451377acbed3e8c7ae6b7" + }, + "research/community-frontier799-audit/ASSEMBLY.json": { + "sha256": "65c7648a8edaeaf4e0b8de3e21eeda94fba124d0935010d45ac9f76375b72cec", + "git_blob": "a04bfd932a15196fe8e2418eae912ea745152593" + }, + "research/community-frontier799-audit/SELECTED-SOURCE.json": { + "sha256": "839f686bf192a7654370d947bb8dd5c1343c89d3947fbb8a8be0956b482182ca", + "git_blob": "9921a5d90ef8aa005df3a872adbf1a90e484cad8" + }, + "research/e8-bit-p111-tuned/README.md": { + "sha256": "a054ce8453e2936d45c4edd1c3678993903fcf6705ac241b9f1a4c4f9accda2d", + "git_blob": "40dff2216e65ebba0be490ad962e869876a45286" + }, + "research/e8-bit-p111-tuned/tune/README.md": { + "sha256": "46c7917fb252949f38b7bcd88cf568efc282e3ea065b61d11e457e41673d0b2d", + "git_blob": "5b1554369682c8344d4f0767111d9b2b35eecbec" + }, + "research/r420-quad13/verify.py": { + "sha256": "cf46b382822c1323ac0d96561599b442d13f261c91c2d1c67245bf5c7aac8fe8", + "git_blob": "6721f8b461e68c2c51ca19c0861e6ae4b5b61d45" + }, + "research/r420-quad13/PROOF.md": { + "sha256": "aab81f233c25ba5bc0c4e311c715a1719fff5ceb29bdfd43c02b09c95e875c49", + "git_blob": "3ac4b39adfa21a3f1260be39b6ab7ead8f891663" + }, + "research/r420-two-block-composition/native.py": { + "sha256": "2b7d0c5451c55dea8524a2bad04d347db2eb17fe7a8402f6814bb41206a4e0cb", + "git_blob": "84afab02a9f97e72b531d207241ee57f5c1ae525" + } + }, + "selected_source_binding": { + "research/e8-bit-p111-tuned/tune/bitE8mut-p111-tuned.json.gz": true, + "research/e8-bit-p111-tuned/code/xcheck_p.py": true, + "research/e8-bit-carrier-skeleton/code/bit/export_records.py": true + } +} diff --git a/research/r439-frame267-seed01/VALIDATION.json b/research/r439-frame267-seed01/VALIDATION.json new file mode 100644 index 0000000000..9fce4b175b --- /dev/null +++ b/research/r439-frame267-seed01/VALIDATION.json @@ -0,0 +1,36 @@ +{ + "python": "3.14.6 (main, Jun 10 2026, 10:03:53) [Clang 21.0.0 (clang-2100.0.123.102)]", + "platform": "macOS-26.5.2-arm64-arm-64bit-Mach-O", + "native": { + "python": "3.14.6 (main, Jun 10 2026, 10:03:53) [Clang 21.0.0 (clang-2100.0.123.102)]", + "platform": "macOS-26.5.2-arm64-arm-64bit-Mach-O", + "compiler": "Apple clang version 17.0.0 (clang-1700.6.4.2)\nTarget: arm64-apple-darwin25.5.0\nThread model: posix\nInstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin\n", + "boost_include": "/private/tmp/boost_1_87_0" + }, + "local_verifier": "PASS", + "native_verifier": "PASS", + "package_tests": 7, + "package_tests_result": "PASS; final H4 test also separately rerun after strengthening its assertion", + "optimized_minimal_relocation": "PASS", + "source_and_certificate_corruption": "rejected", + "existing_output_preservation": "PASS", + "selected_record_check": "PASS", + "source_files_equal_base_objects": 20, + "execution_inputs_equal_selected_source_inventory": 3, + "make_verify": { + "command": "make verify", + "base": "91a2094f2e022930069e8cfdc810a3ea1b81cd09", + "time_limit_seconds": 240, + "timed_out": true, + "returncode": -15, + "elapsed_seconds": 240.042, + "log_sha256": "80a8c7bd1b21e539afff29f9d3aed145513b084f8a48f1790a8accba84cf8c02", + "stopped_target": "verify-producers -> endpoint-gauge-producer, h=40", + "outcome": "INCOMPLETE: bounded timeout, not a failed mathematical check or a passed repository-wide suite", + "source_isolation": "disposable clone of the exact base with this research package; main work checkout unchanged" + }, + "hosted_ci": "not run locally; inspect published PR separately", + "full_theorem_formalization": false, + "whole_hosted_invoice_replayed": false, + "selected_frontier_cold_replay": false +} diff --git a/research/r439-frame267-seed01/VALIDATION.md b/research/r439-frame267-seed01/VALIDATION.md new file mode 100644 index 0000000000..9165576b4a --- /dev/null +++ b/research/r439-frame267-seed01/VALIDATION.md @@ -0,0 +1,39 @@ +# Executed validation + +Executed 2026-10-13 UTC (2026-10-14 Melbourne) against base +`91a2094f2e022930069e8cfdc810a3ea1b81cd09`. See `VALIDATION.json` for the precise +Python/platform/compiler environment; Boost 1.87.0 headers were used. + +- `python3 -I -B research/r439-frame267-seed01/verify.py`: PASS. Both complete + search certificates, exact matrices, 64 local inputs, 661 arbitrary dirty + columns, 636 closed frames, unchanged H1-H5, all record bills, the PR904 + overlap comparison, and eight controls pass. +- `BOOST_INCLUDE=/private/tmp/boost_1_87_0 python3 -I -B + research/r439-frame267-seed01/native.py --output /private/tmp/math-seed01-final-native`: + PASS. Fresh unchanged legality and 5/9/11-stage checkers on both words; + 883/1,327/1,549 formal columns and 96 omitted-bridge controls. Every saved + proof-relevant native field agrees. The local candidate is freshly rebuilt. +- `python3 -I -B research/r439-frame267-seed01/test_package.py -v`: all seven + tests pass, including optimized Python from an offline minimal closure in a + path with spaces, source/certificate corruption and output preservation. The + H4 test was then strengthened to call the owning checker on a scalar-valid + stale cleanup and rerun separately; it passes and detects the H4 violation. +- `make selected-record-check`: PASS at the exact base. All 20 pinned source + and context files also match their base Git objects; the three execution + inputs match the actual selected source inventory. No selected source is edited. +- Python syntax checks and Git whitespace checks pass. + +## Repository-wide check: incomplete + +One `make verify` invocation ran in a disposable exact-base checkout containing +this package. It was stopped at the predeclared **240-second** budget during +`verify-producers -> endpoint-gauge-producer` (h=40). The process group was +terminated and the partial regeneration remains outside the contribution. +`MAKE-VERIFY.json` records the bounded outcome and full-log SHA256. The log is +retained locally at `/private/tmp/math-seed01-required-check/make-verify.log`. + +This is **not a full-suite pass**, nor evidence of a mathematical failure. +The broad suite was not repeatedly relaunched. The package's focused local and +native checks above completed. No selected complex cold replay, full changed +hosted-parent invoice, outer assembly, Lean theorem or hosted CI pass is claimed. +The finite contribution is independently reviewable within that stated scope. diff --git a/research/r439-frame267-seed01/WITNESS.json b/research/r439-frame267-seed01/WITNESS.json new file mode 100644 index 0000000000..c552aa789c --- /dev/null +++ b/research/r439-frame267-seed01/WITNESS.json @@ -0,0 +1,175 @@ +{ + "assignment_seed": 1, + "dead_end_distance": 999, + "distance_histogram": { + "0": 1, + "1": 12, + "10": 90832, + "11": 56483, + "12": 19777, + "13": 3015, + "14": 159, + "15": 1, + "2": 92, + "3": 497, + "4": 1988, + "5": 6287, + "6": 16658, + "7": 38015, + "8": 69337, + "9": 94686, + "999": 18668 + }, + "edges": 2366680, + "frame": 267, + "minimum": 12, + "original": [ + [ + 5, + 1 + ], + [ + 5, + 3 + ], + [ + 5, + 4 + ], + [ + 5, + 2 + ], + [ + 0, + 1 + ], + [ + 0, + 4 + ], + [ + 1, + 3 + ], + [ + 1, + 4 + ], + [ + 1, + 2 + ], + [ + 4, + 2 + ], + [ + 2, + 5 + ], + [ + 2, + 0 + ], + [ + 2, + 1 + ], + [ + 4, + 5 + ], + [ + 4, + 0 + ], + [ + 4, + 1 + ], + [ + 4, + 3 + ], + [ + 3, + 5 + ], + [ + 3, + 0 + ], + [ + 3, + 1 + ], + [ + 0, + 5 + ] + ], + "phase": "A", + "quad": 1, + "registers": [ + 222, + 351, + 353, + 369, + 379, + 486 + ], + "replacement": [ + [ + 1, + 4 + ], + [ + 0, + 1 + ], + [ + 1, + 3 + ], + [ + 1, + 2 + ], + [ + 5, + 1 + ], + [ + 3, + 1 + ], + [ + 0, + 5 + ], + [ + 3, + 0 + ], + [ + 4, + 3 + ], + [ + 4, + 2 + ], + [ + 2, + 1 + ], + [ + 2, + 0 + ] + ], + "start": 615, + "states": 416508, + "stop": 636 +} diff --git a/research/r439-frame267-seed01/native.py b/research/r439-frame267-seed01/native.py new file mode 100644 index 0000000000..7a8b5eeacb --- /dev/null +++ b/research/r439-frame267-seed01/native.py @@ -0,0 +1,111 @@ +"""Compare the original and replacement words with the pinned cohort checkers. + +Adapted from Ali Romman PR688 by Ross Richardson, with substantial OpenAI Codex assistance. Apache-2.0. +""" +import json +import os +import shlex +import subprocess +import sys + + +def run(root, out): + package = root / "research/e8-bit-carrier-skeleton" + bit = package / "code/bit" + checkers = bit / "checkers" + python = [sys.executable, "-B"] + compiler = shlex.split(os.environ.get("CXX", "c++")) + include = os.environ.get("BOOST_INCLUDE", "/usr/include") + flags = ["-O2", "-std=c++17", "-DHDIM=8", "-DNCOPY=9", "-DVPORTS=111", "-DRHELP=439", + "-I" + str(package / "portable-include"), "-I" + str(checkers), "-I" + include] + bindir = out / "bin" + bindir.mkdir() + + def call(name, command): + with (out / (name + ".log")).open("w") as log: + subprocess.run(list(map(str, command)), check=True, stdout=log, stderr=subprocess.STDOUT) + + call("compile-legality", compiler + flags + ["-o", bindir / "legality", checkers / "legality_h.cpp"]) + for pairs in (2, 4, 5): + call("compile-columns" + str(pairs), compiler + flags + ["-DKPAIRS=" + str(pairs), "-o", + bindir / ("columns" + str(pairs)), checkers / "columns_k.cpp"]) + results = {} + for name in ("original", "replacement"): + base = out / name + records, cin, cout = (base / item for item in ("records", "cin", "cout")) + call(name + "-export", python + [bit / "export_records.py", out / (name + ".json.gz"), records]) + call(name + "-cohort", python + [bit / "regression/stage_cohort.py", records, records, cin, cout]) + call(name + "-legality", [bindir / "legality", cin, cout, cout / "legality.json"]) + legality = json.loads((cout / "legality.json").read_text()) + if legality["status"] != "PASS_INDEPENDENT_COHORT_LEGALITY_SOURCE_OWNERS_AND_LIFECYCLE": + raise ValueError("Legality did not pass") + results[name] = {"legality": legality, "stages": {}} + for pairs in (2, 4, 5): + receipt = cout / ("columns.json" if pairs == 2 else "columns" + str(pairs) + ".json") + call(name + "-columns" + str(pairs), [bindir / ("columns" + str(pairs)), + cout / "COHORT249-RECORDS.bin", receipt]) + data = json.loads(receipt.read_text()) + expected_status = ("PASS_NEW_COHORT249_ALL_FIVE_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" if pairs == 2 + else "PASS_NEW_COHORT249_ALL_BRIDGED_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL") + if data["status"] != expected_status: + raise ValueError("Formal columns did not pass") + expected = 6 * (pairs - 1) + if (len(data["negative_controls"]) != expected + or not all(c["rejected"] for c in data["negative_controls"])): + raise ValueError("A bridge control failed") + if data["formal_columns_checked"] != 222 * pairs + 439: + raise ValueError("Wrong formal column count") + data.pop("seconds", None) + data.pop("local_scalar_stream", None) + results[name]["stages"][str(2 * pairs + 1)] = data + for stages in ("5", "9", "11"): + old, new = (results[name]["stages"][stages] for name in ("original", "replacement")) + if old["local_raw_H"] != new["local_raw_H"] or old["local_scalar_additions"] - new["local_scalar_additions"] != 18: + raise ValueError("Paid profile or XOR saving differs") + if int(new["payload_prefix_upper"]) > int(old["payload_prefix_upper"]): + raise ValueError("Payload bound increased") + for a, b in zip(old["signed_lift_prefix"], new["signed_lift_prefix"]): + if a["reverse"] != b["reverse"] or int(b["cancellation_free_signed_row_l1_upper"]) > int(a["cancellation_free_signed_row_l1_upper"]): + raise ValueError("Signed bound increased") + return results + + +def main(): + import argparse + import hashlib + import platform + import tempfile + from pathlib import Path + + here = Path(__file__).resolve().parent + root = here.parents[1] + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--write-certificate', action='store_true') + parser.add_argument('--output', type=Path, help='new output directory; preserve all native logs') + args = parser.parse_args() + pins = json.loads((here / 'SOURCES.json').read_text()) + for path in pins['execution_inputs'] + pins['native_inputs']: + if hashlib.sha256((root / path).read_bytes()).hexdigest() != pins['files'][path]['sha256']: + raise ValueError('source hash mismatch: ' + path) + if not (Path(os.environ.get('BOOST_INCLUDE', '/usr/include')) / 'boost/multiprecision/cpp_int.hpp').is_file(): + raise ValueError('Set BOOST_INCLUDE to the directory containing boost/multiprecision/cpp_int.hpp') + with tempfile.TemporaryDirectory(prefix='r439-frame267-native-') as temporary: + work = args.output.resolve() if args.output else Path(temporary) / 'work' + # The verifier refuses an existing path, and emits the two bound inputs. + subprocess.run([sys.executable, '-I', '-B', str(here / 'verify.py'), '--output', str(work)], check=True) + result = run(root, work) + receipt = {'schema': 'r439-frame267-native/1', 'words': result, + 'normalization': 'Only seconds and local_scalar_stream removed; all other native fields retained.'} + path = here / 'NATIVE-CERTIFICATE.json' + if args.write_certificate: + path.write_text(json.dumps(receipt, sort_keys=True, indent=2) + '\n') + elif receipt != json.loads(path.read_text()): + raise ValueError('native certificate mismatch') + (work / 'ENVIRONMENT.json').write_text(json.dumps({'python': sys.version, 'platform': platform.platform(), + 'compiler': subprocess.check_output(shlex.split(os.environ.get('CXX', 'c++')) + ['--version'], text=True), + 'boost_include': os.environ.get('BOOST_INCLUDE', '/usr/include')}, indent=2) + '\n') + print('PASS_R439_FRAME267_NATIVE words=2 columns=883/1327/1549 bridge_controls=96 ADDs=24305->24287') + + +if __name__ == '__main__': + main() diff --git a/research/r439-frame267-seed01/optimality.py b/research/r439-frame267-seed01/optimality.py new file mode 100644 index 0000000000..93067b9df5 --- /dev/null +++ b/research/r439-frame267-seed01/optimality.py @@ -0,0 +1,53 @@ +"""Independent breadth-first proof of the fixed integer-transfer minimum. + +Uses flat integer matrices, breadth-first layers and no search.py imports. +The graph contains every possible last positive ADD, including repeated writes. +Ross Richardson, substantial OpenAI Codex assistance; Apache-2.0. +""" + + +def check_minimum(matrix, claimed): + if type(claimed) is not int or not 0 <= claimed <= 21: + raise ValueError('invalid claimed distance') + if len(matrix) != 6 or any(len(row) != 6 for row in matrix): + raise ValueError('matrix shape') + if any(type(x) is not int or not 0 <= x <= 255 for row in matrix for x in row): + raise ValueError('matrix entries') + target = bytes(x for row in matrix for x in row) + identity = bytes(int(i == j) for i in range(6) for j in range(6)) + frontier, seen, layers = {target}, {target}, [1] + edges = 0 + for depth in range(claimed + 1): + if identity in frontier: + if depth != claimed: + raise ValueError('claimed minimum exceeds independent distance') + return {'minimum': depth, 'layers': layers, 'visited_states': len(seen), + 'edges_from_completed_layers': edges, + 'completed_expansion_depths': list(range(depth))} + if depth == claimed: + raise ValueError('claimed minimum is below independent distance') + following = set() + for state in frontier: + # Candidate last gate d += s; removing it must leave >= I entrywise. + for destination in range(0, 36, 6): + for source in range(0, 36, 6): + if destination == source: + continue + reduced = [] + for col in range(6): + entry = state[destination + col] - state[source + col] + if entry < int(col == destination // 6): + break + reduced.append(entry) + if len(reduced) != 6: + continue + edges += 1 + previous = state[:destination] + bytes(reduced) + state[destination + 6:] + if previous not in seen: + seen.add(previous) + following.add(previous) + frontier = following + layers.append(len(frontier)) + if len(seen) > 1_000_000: + raise ValueError('independent state budget exceeded') + raise ValueError('unreachable') diff --git a/research/r439-frame267-seed01/search.py b/research/r439-frame267-seed01/search.py new file mode 100644 index 0000000000..48db43e1d7 --- /dev/null +++ b/research/r439-frame267-seed01/search.py @@ -0,0 +1,99 @@ +"""Exact nonnegative row-subtraction DAG for one fixed integer transfer. + +Ross Richardson, substantial OpenAI Codex assistance; Apache-2.0. +No search across frames, wires, integer transfers or general F2 circuits. +""" +import argparse +from collections import Counter +from functools import cache +import gzip +import json +from pathlib import Path + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +WORD = ROOT / 'research/e8-bit-p111-tuned/tune/bitE8mut-p111-tuned.json.gz' +REGS = [222, 351, 353, 369, 379, 486] +IDENTITY = tuple(tuple(int(i == j) for j in range(6)) for i in range(6)) + + +def transfer(ops): + rows = list(IDENTITY) + for dst, src in ops: + rows[dst] = tuple(x + y for x, y in zip(rows[dst], rows[src])) + return tuple(rows) + + +def nominate(original): + target = transfer(original) + distances, choices = {}, {} + edges = 0 + states = 0 + infinity = 999 # Strictly above the original 21-step witness. + + @cache + def distance(rows): + nonlocal edges, states + states += 1 + if states > 1_000_000: + raise ValueError('state budget exceeded; no optimum established') + if rows == IDENTITY: + distances[rows] = 0 + return 0 + best = infinity + for dst in range(6): + for src in range(6): + if dst == src or rows[dst][dst] - rows[src][dst] < 1: + continue + difference = tuple(x - y for x, y in zip(rows[dst], rows[src])) + if min(difference) < 0: + continue + previous = list(rows) + previous[dst] = difference + previous = tuple(previous) + edges += 1 + length = 1 + distance(previous) + if length < best: + best = length + choices[rows] = (dst, src, previous) + distances[rows] = best + return best + + minimum = distance(target) + if minimum >= infinity: + raise ValueError('no positive-addition factorization found') + backward, current = [], target + while current != IDENTITY: + dst, src, current = choices[current] + backward.append([dst, src]) + return {'replacement': list(reversed(backward)), 'minimum': minimum, + 'states': len(distances), 'edges': edges, + 'distance_histogram': {str(k): v for k, v in sorted(Counter(distances.values()).items())}, + 'dead_end_distance': infinity} + + +def original_ops(): + word = json.loads(gzip.decompress(WORD.read_bytes())) + segment = word['A'][615:636] + if len(segment) != 21 or any(f != 267 or len(ss) != 1 for f, _, ss in segment): + raise ValueError('source slice changed') + return [[REGS.index(dst), REGS.index(ss[0])] for _, dst, ss in segment] + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--write-witness', action='store_true') + args = parser.parse_args() + old = original_ops() + result = {'phase': 'A', 'start': 615, 'stop': 636, 'frame': 267, 'quad': 1, + 'registers': REGS, 'assignment_seed': 1, 'original': old, **nominate(old)} + path = HERE / 'WITNESS.json' + if args.write_witness: + path.write_text(json.dumps(result, indent=2, sort_keys=True) + '\n') + elif result != json.loads(path.read_text()): + raise ValueError('search witness mismatch') + print(f"PASS_FRAME267_SEARCH states={result['states']} edges={result['edges']} minimum={result['minimum']}") + + +if __name__ == '__main__': + main() diff --git a/research/r439-frame267-seed01/test_package.py b/research/r439-frame267-seed01/test_package.py new file mode 100644 index 0000000000..781057a58c --- /dev/null +++ b/research/r439-frame267-seed01/test_package.py @@ -0,0 +1,112 @@ +"""Defect-sensitive package checks; no theorem claim from unit tests. + +Ross Richardson, substantial OpenAI Codex assistance; Apache-2.0. +""" +import copy +import gzip +import importlib.util +import json +from pathlib import Path +import shutil +import subprocess +import sys +import tempfile +import unittest + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] + + +def load(name): + spec = importlib.util.spec_from_file_location(name, HERE / (name + '.py')) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +class Package(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.verify = load('verify') + cls.optimality = load('optimality') + cls.recipe = json.loads((HERE / 'WITNESS.json').read_text()) + cls.word = json.loads(gzip.decompress((ROOT / cls.verify.WORD).read_bytes())) + + def test_boolean_gate_index_rejected(self): + recipe = copy.deepcopy(self.recipe) + recipe['replacement'][0][0] = True + with self.assertRaisesRegex(self.verify.Reject, 'invalid circuit gate'): + self.verify.build(self.word, recipe) + + def test_self_add_rejected(self): + recipe = copy.deepcopy(self.recipe) + recipe['replacement'][0] = [0, 0] + with self.assertRaisesRegex(self.verify.Reject, 'invalid circuit gate'): + self.verify.build(self.word, recipe) + + def test_wrong_wire_binding_rejected(self): + recipe = copy.deepcopy(self.recipe) + recipe['registers'][0] += 1 + with self.assertRaisesRegex(self.verify.Reject, 'unexpected circuit registers'): + self.verify.build(self.word, recipe) + + def test_missing_literal_cleanup_fails_h4(self): + new = self.verify.build(self.word, self.recipe) + spec = importlib.util.spec_from_file_location('owning_checker', ROOT / self.verify.AUDITOR) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + new['C'] = copy.deepcopy(self.word['C']) + checker = module.Word(new) + checker.full() # Identical scalar map: the stale inverse still restores. + hypotheses, _, _ = checker.interface() + self.assertFalse(hypotheses['H4_C_literal_reverse_at_full']) + + def test_independent_minimum_controls(self): + identity = [[int(i == j) for j in range(6)] for i in range(6)] + one = copy.deepcopy(identity) + one[0][1] = 1 + self.assertEqual(self.optimality.check_minimum(identity, 0)['minimum'], 0) + self.assertEqual(self.optimality.check_minimum(one, 1)['minimum'], 1) + with self.assertRaisesRegex(ValueError, 'below independent distance'): + self.optimality.check_minimum(one, 0) + with self.assertRaisesRegex(ValueError, 'exceeds independent distance'): + self.optimality.check_minimum(one, 2) + + def test_existing_output_is_preserved(self): + with tempfile.TemporaryDirectory() as folder: + mark = Path(folder) / 'marker' + mark.write_text('keep') + run = subprocess.run([sys.executable, '-I', '-B', str(HERE / 'verify.py'), '--output', folder], + text=True, capture_output=True) + self.assertNotEqual(run.returncode, 0) + self.assertEqual(mark.read_text(), 'keep') + + def test_minimal_relocation_and_tampering(self): + with tempfile.TemporaryDirectory(prefix='frame267 path with spaces ') as folder: + root = Path(folder) + package = root / HERE.relative_to(ROOT) + shutil.copytree(HERE, package, ignore=shutil.ignore_patterns('__pycache__')) + pins = json.loads((HERE / 'SOURCES.json').read_text()) + for relative in pins['execution_inputs']: + path = root / relative + path.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(ROOT / relative, path) + command = [sys.executable, '-I', '-O', '-B', str(package / 'verify.py')] + passed = subprocess.run(command, text=True, capture_output=True) + self.assertEqual(passed.returncode, 0, passed.stdout + passed.stderr) + expected = package / 'CERTIFICATE.json' + data = json.loads(expected.read_text()) + data['independent_optimality']['layers'][1] -= 1 + expected.write_text(json.dumps(data)) + failed = subprocess.run(command, text=True, capture_output=True) + self.assertNotEqual(failed.returncode, 0) + self.assertIn('certificate mismatch', failed.stderr) + path = root / pins['execution_inputs'][0] + path.write_bytes(path.read_bytes() + b'corruption') + failed = subprocess.run(command, text=True, capture_output=True) + self.assertNotEqual(failed.returncode, 0) + self.assertIn('source hash mismatch', failed.stderr) + + +if __name__ == '__main__': + unittest.main() diff --git a/research/r439-frame267-seed01/verify.py b/research/r439-frame267-seed01/verify.py new file mode 100644 index 0000000000..cb97be7c6c --- /dev/null +++ b/research/r439-frame267-seed01/verify.py @@ -0,0 +1,323 @@ +"""Exact finite frame-267 replacement, minimum and native-word checks; no new rate claim. + +Adapted from mtpsl PR691 by Ross Richardson with substantial OpenAI Codex assistance. Apache-2.0. +Python 3.10+, standard library only. No assertions are used for acceptance. +""" +import argparse +from collections import Counter +import copy +import gzip +import hashlib +import importlib.util +import json +from pathlib import Path +import struct +import subprocess +import sys +import tempfile + +sys.dont_write_bytecode = True +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +WORD = "research/e8-bit-p111-tuned/tune/bitE8mut-p111-tuned.json.gz" +AUDITOR = "research/e8-bit-p111-tuned/code/xcheck_p.py" +EXPORTER = "research/e8-bit-carrier-skeleton/code/bit/export_records.py" + + +class Reject(Exception): + pass + + +def need(condition, reason): + if not condition: + raise Reject(reason) + + +def canonical(value): + return json.dumps(value, sort_keys=True, separators=(",", ":")).encode() + + +def sha(data): + return hashlib.sha256(data).hexdigest() + + +def matrix(ops, positive=False): + need(isinstance(ops, list) and all(isinstance(g, list) and len(g) == 2 for g in ops), "invalid gate list") + # Each column is evolved separately; search.py evolves whole rows. + cols = [] + for j in range(6): + values = [int(i == j) for i in range(6)] + for d, s in ops: + need(type(d) is int and type(s) is int and 0 <= d < 6 and + 0 <= s < 6 and d != s, "invalid circuit gate") + values[d] = values[d] + values[s] if positive else values[d] ^ values[s] + cols.append(values) + return [list(r) for r in zip(*cols)] + + +def circuit_check(old, new): + need(matrix(old) == matrix(new), "circuit F2 map changed") + positive = {} + for direction, a, b in (("forward", old, new), ("reverse", old[::-1], new[::-1])): + before, after = matrix(a, True), matrix(b, True) + need(all(y <= x for rr, ss in zip(before, after) for x, y in zip(rr, ss)), + direction + " positive matrix increased") + positive[direction] = {"original": before, "replacement": after} + return positive + + +def cleanup(w): + return [[1, d, list(ss)] for _, d, ss in reversed(w["A"] + w["B"]) + if not 111 <= d < 222] + + +def build(base, recipe): + need((recipe["phase"], recipe["start"], recipe["stop"], recipe["frame"], recipe["quad"]) + == ("A", 615, 636, 267, 1), "unexpected circuit location") + regs = recipe["registers"] + need(regs == [222, 351, 353, 369, 379, 486], "unexpected circuit registers") + original = [[267, regs[d], [regs[s]]] for d, s in recipe["original"]] + need(base["A"][615:636] == original, "original gate slice mismatch") + pos = circuit_check(recipe["original"], recipe["replacement"]) + need(pos["forward"]["original"] == pos["forward"]["replacement"], "integer forward map changed") + need(len(recipe["replacement"]) == 12, "wrong replacement length") + out = copy.deepcopy(base) + out["A"][615:636] = [[267, regs[d], [regs[s]]] for d, s in recipe["replacement"]] + out["C"] = cleanup(out) + return out + + +def paths(w): + result = [[f] for f in w["start"]] + for sec in ("D", "A", "B", "C"): + for f, d, ss in w[sec]: + for r in [d] + ss: + if result[r][-1] != f: + result[r].append(f) + for r, f in enumerate(w["final"]): + if result[r][-1] != f: + result[r].append(f) + return result + + +def audit(w, module, geometry): + # Geometry is unchanged; reuse the baseline's already checked exact spaces. + obj = copy.copy(geometry) + obj.w = w + result = obj.full() + h, c, _ = obj.interface() + need(all(h.values()) and all(c.values()), "interface H1-H5 or decomposition failed") + return result + + +def records_check(directory, word): + """Independent set-valued interpreter of the actual exported instructions. + + This checks the scalar projection and literal MOVE/COPY/ERASE lifecycle, + not the multistage formal-column or hosted-recursion contracts. + """ + raw = (directory / "249-records.bin").read_bytes() + need(len(raw) % 24 == 0, "truncated record") + records = list(struct.iter_unpack("<6i", raw)) + dim = {int(k): v["dim"] for k, v in + json.loads((directory / "frames.json").read_text())["frames"].items()} + frames = list(word["start"]) + [None] + values = [{i} for i in range(661)] + [set()] + pths = [[f] for f in frames[:661]] + hist, counts = Counter(), Counter() + for op, a, b, c, d, e in records: + counts[op] += 1 + if op == 0: + need(a < 661 and frames[a] == b and dim[c] - dim[b] == d and d > 0, + "bad MOVE") + need(set(word["frames"][b]) <= set(word["frames"][c]), "MOVE not nested") + frames[a] = c + pths[a].append(c) + hist[d] += 1 + elif op == 1: + need(a != b and c == 1 and frames[a] == frames[b] == d, "bad ADD frame") + values[a] = values[a].symmetric_difference(values[b]) + elif op == 2: + need(b == 661 and not values[b] and frames[b] is None and frames[a] == c, + "COPY lifecycle") + need(d == 0 and e == dim[c], "COPY rank") + values[b] = set(values[a]) + frames[b] = d + hist[e] += 1 + elif op == 3: + need(b == 661 and frames[a] == c and frames[b] == d == 0 + and values[b] == values[a], "ERASE lifecycle") + values[b] = set() + frames[b] = None + else: + raise Reject("unknown record opcode") + expected = [{i} if not 111 <= i < 222 else {i, i - 111} for i in range(661)] + need(values[:661] == expected and not values[661], "record dirty-column endpoint") + need(frames[:661] == word["final"] and frames[661] is None, "record frame endpoint") + need(pths == paths(word), "record frame paths differ") + return {"records": len(records), "adds": counts[1], "moves": counts[0], + "copies": counts[2], "erasures": counts[3], + "paid_histogram": dict(sorted(hist.items())), + "rank_mass": sum(k * v for k, v in hist.items()), + "records_sha256": sha(raw)} + + +def rejected(label, fn, exceptions): + try: + fn() + except exceptions: + return label + raise Reject("negative control accepted: " + label) + + +def run(output, write_certificate): + pins = json.loads((HERE / "SOURCES.json").read_text()) + for path in pins["execution_inputs"]: + pin = pins["files"][path] + need(sha((ROOT / path).read_bytes()) == pin["sha256"], "source hash mismatch: " + path) + base = json.loads(gzip.decompress((ROOT / WORD).read_bytes())) + need(base["v"] == 111 and base["R"] == 439 and len(base["start"]) == 661, "word dimensions") + recipe = json.loads((HERE / "WITNESS.json").read_text()) + spec_search = importlib.util.spec_from_file_location("nomination", HERE / "search.py") + search = importlib.util.module_from_spec(spec_search) + spec_search.loader.exec_module(search) + found = search.nominate(search.original_ops()) + expected_recipe = {"phase": "A", "start": 615, "stop": 636, "frame": 267, "quad": 1, + "registers": search.REGS, "assignment_seed": 1, + "original": search.original_ops(), **found} + need(recipe == expected_recipe, "nomination metadata or witness mismatch") + # BFS checker evolves flat matrices and does not import nomination code. + spec_opt = importlib.util.spec_from_file_location("independent_minimum", HERE / "optimality.py") + opt = importlib.util.module_from_spec(spec_opt) + spec_opt.loader.exec_module(opt) + optimum = opt.check_minimum(matrix(recipe["original"], True), recipe["minimum"]) + need(recipe["minimum"] == len(recipe["replacement"]) == 12, "wrong witness length") + revised = build(base, recipe) + overlap = json.loads((HERE / "OVERLAP.json").read_text()) + window_word = copy.deepcopy(base["A"]) + previous_start = 636 + for item in sorted(overlap["selected_frame267_windows"], key=lambda x: x["start"], reverse=True): + lo, hi, regs = item["start"], item["stop"], item["registers"] + need(item["frame"] == 267 and item["section"] == "A" and 615 <= lo < hi <= previous_start, + "invalid overlap comparison window") + previous_start = lo + old = [[267, regs[d], [regs[t]]] for d, t in item["old"]] + new = [[267, regs[d], [regs[t]]] for d, t in item["new"]] + need(window_word[lo:hi] == old and len(old) - len(new) == item["saving"], "overlap source slice mismatch") + window_word[lo:hi] = new + comparison_length = 21 + len(window_word) - len(base["A"]) + compare_ops = [[recipe["registers"].index(d), recipe["registers"].index(ss[0])] + for _, d, ss in window_word[615:615 + comparison_length]] + need(matrix(compare_ops) == matrix(recipe["original"]), "overlap circuit map mismatch") + need(overlap["original_adds"] == 21 and overlap["pr904_frame267_adds"] == comparison_length == 19 + and overlap["this_frame267_adds"] == 12 and overlap["extra_saving_with_cleanup"] == 14, + "overlap accounting mismatch") + positive = circuit_check(recipe["original"], recipe["replacement"]) + need(positive["forward"]["original"] == positive["forward"]["replacement"], + "integer forward map changed") + need(paths(base) == paths(revised), "physical frame path changed") + + spec = importlib.util.spec_from_file_location("predecessor_xcheck", ROOT / AUDITOR) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + geometry, labels, baseline, h, c, _ = module.check(base) + need(all(h.values()) and all(c.values()), "baseline interface failed") + revised_audit = audit(revised, module, geometry) + + # Independent exhaustive evaluation of the six-register Boolean map. + for bits in range(64): + endings = [] + for gates in (recipe["original"], recipe["replacement"]): + value = bits + for d, s in gates: + value ^= ((value >> s) & 1) << d + endings.append(value) + need(endings[0] == endings[1], "exhaustive six-bit map differs") + + evidence = {} + for name, word in (("original", base), ("replacement", revised)): + path = output / (name + ".json.gz") + path.write_bytes(gzip.compress(canonical(word), mtime=0)) + directory = output / name / "records" + subprocess.run([sys.executable, "-B", str(ROOT / EXPORTER), str(path), str(directory)], + check=True, capture_output=True, text=True) + evidence[name] = records_check(directory, word) + a, b = evidence["original"], evidence["replacement"] + need(a["adds"] == 24305 and b["adds"] == 24287, "unexpected native ADD count") + for key in ("moves", "copies", "erasures", "paid_histogram", "rank_mass"): + need(a[key] == b[key], "native cost changed: " + key) + need(b["rank_mass"] == 5129 and b["copies"] == 9, "incorrect native cost") + + controls = [] + fail = (Reject, module.Reject) + controls.append(rejected("drop circuit gate", lambda: circuit_check( + recipe["original"], recipe["replacement"][1:]), fail)) + wrong = copy.deepcopy(recipe["replacement"]) + wrong[0].reverse() + controls.append(rejected("reverse circuit operand", lambda: circuit_check( + recipe["original"], wrong), fail)) + inflated = recipe["replacement"] + [[0, 1], [0, 1]] + need(matrix(inflated) == matrix(recipe["replacement"]), "inflation control is not F2-neutral") + controls.append(rejected("F2-neutral positive-cost inflation", lambda: circuit_check( + recipe["original"], inflated), fail)) + bad = copy.deepcopy(revised) + bad["C"].pop() + controls.append(rejected("dropped cleanup", lambda: audit(bad, module, geometry), fail)) + bad = copy.deepcopy(revised) + bad["C"] = copy.deepcopy(base["C"]) + # Same endpoint but not the literal reverse required by H4. + obj = copy.copy(geometry) + obj.w = bad + obj.full() + controls.append(rejected("nonliteral original cleanup", lambda: audit(bad, module, geometry), fail)) + bad = copy.deepcopy(revised) + bad["A"][615][0] = 0 + controls.append(rejected("illegal lower frame", lambda: audit(bad, module, geometry), fail)) + bad = copy.deepcopy(revised) + bad["D"][0][2].pop() + controls.append(rejected("missing dirty compensation", lambda: audit(bad, module, geometry), fail)) + + # The record endpoint checker must see literal instruction corruption too. + directory = output / "replacement" / "records" + rawpath = directory / "249-records.bin" + raw = rawpath.read_bytes() + recs = list(struct.iter_unpack("<6i", raw)) + for i, rec in enumerate(recs): + if rec[0] == 1 and rec[5] == 2 and rec[4] == 267: + rawpath.write_bytes(raw[:24*i] + raw[24*(i+1):]) + break + try: + controls.append(rejected("dropped exported quad ADD", lambda: records_check(directory, revised), fail)) + finally: + rawpath.write_bytes(raw) + + cert = {"status": "PASS_R439_FRAME267", "quad": 1, "old_gates": 21, "new_gates": 12, + "saved_with_cleanup": 18, "labels": labels, "columns": revised_audit["columns"], + "old_phase_gates": baseline["gates"], "new_phase_gates": revised_audit["gates"], + "boolean_inputs": 64, "F2_matrix": matrix(recipe["replacement"]), + "positive_matrices": positive, "native_records": evidence, + "reconstructed_word_sha256": sha(canonical(revised)), "controls_rejected": controls, + "independent_optimality": optimum, "overlap_comparison": overlap, "kappa_claim": "none; unchanged paid rank profile, no hosted replay"} + path = HERE / "CERTIFICATE.json" + if write_certificate: + path.write_text(json.dumps(cert, indent=2, sort_keys=True) + "\n") + else: + need(canonical(cert) == canonical(json.loads(path.read_text())), "certificate mismatch") + print("PASS_R439_FRAME267 gates=21->12 native_adds=24305->24287 columns=661 rank_mass=5129 controls=8") + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--output", type=Path, help="new directory for reconstructed word and records") + parser.add_argument("--write-certificate", action="store_true", help="regenerate this package's certificate") + args = parser.parse_args() + if args.output: + args.output.mkdir(parents=True, exist_ok=False) + run(args.output.resolve(), args.write_certificate) + else: + with tempfile.TemporaryDirectory(prefix="r439-frame267-") as temporary: + run(Path(temporary), args.write_certificate) + + +if __name__ == "__main__": + main()