diff --git a/research/bit-eight-sender-audit/CREDITS.md b/research/bit-eight-sender-audit/CREDITS.md new file mode 100644 index 0000000000..0e25a43589 --- /dev/null +++ b/research/bit-eight-sender-audit/CREDITS.md @@ -0,0 +1,29 @@ +# Sources and credit + +Ali Romman (@aliromman) prepared this independent audit with substantial +OpenAI Codex assistance in research, implementation, verification and writing. +New material uses Apache-2.0. + +Ali Romman supplied the eight sender edits and ordinary integration in +[PR #7776](https://github.com/CrocSwap/integer-mult-bounds/pull/7776). The +[binary proof](https://github.com/aliromman/integer-mult-bounds/blob/0b86d0f618b8c64be9410a83a417067049076067/research/p104-dual-supplier-lift/BIT-PROOF.md), +[constructor](https://github.com/aliromman/integer-mult-bounds/blob/0b86d0f618b8c64be9410a83a417067049076067/research/p104-dual-supplier-lift/bit_native.py) +and [receipt](https://github.com/aliromman/integer-mult-bounds/blob/0b86d0f618b8c64be9410a83a417067049076067/research/p104-dual-supplier-lift/BIT-RESULT.json) +are retained unchanged. The new extractor, simultaneous contraction proof, +all-subset replay and correction-parameter audit are separate. The source +constructor is used only for the final equality and emitted-word binding. + +Jerry Chen (@CubeJerry) supplied the selected +[PR #7001](https://github.com/CrocSwap/integer-mult-bounds/pull/7001) application. +Its [native word](https://github.com/CrocSwap/integer-mult-bounds/blob/e54523517d0f03e58352e647c403a5af3e525a57/research/paired-query-only-bit/retained/inputs/BIT-NATIVE-WORD.json.gz) +and [notice](https://github.com/CrocSwap/integer-mult-bounds/blob/e54523517d0f03e58352e647c403a5af3e525a57/research/paired-query-only-bit/NOTICE) +are retained. DreamingOfClouds supplied the paired caller and chain-root +lineage with Claude assistance. zxv and retained authors supplied the native +word and earlier binary admission framework. Ali Romman and Cinna Davis +retain the root and native lineage credit. Original notices are unchanged. + +AlephNaN (@alephnan) supplied the simultaneous fixed-bank restriction theorem +in [PR #7733](https://github.com/CrocSwap/integer-mult-bounds/pull/7733). +Its fixed-delivery hypothesis distinguishes that theorem from these changed +senders. It is related work, not a runtime dependency. No physical theorem +or full ordinary compiler claim is independently accepted by this package. diff --git a/research/bit-eight-sender-audit/LICENSE b/research/bit-eight-sender-audit/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/bit-eight-sender-audit/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/bit-eight-sender-audit/PROOF.md b/research/bit-eight-sender-audit/PROOF.md new file mode 100644 index 0000000000..15d1050d14 --- /dev/null +++ b/research/bit-eight-sender-audit/PROOF.md @@ -0,0 +1,134 @@ +# Eight changed binary senders + +## Result and scope + +Every subset of the eight sender replacements in the pinned PR #7776 binary +word preserves its surviving public operator. The new packet rows have a +causal order and use only same-chart donors. With all eight helpers removed, +the eight stated sender corrections are the unique choice in the binary +include-or-omit family that preserves the output. Their errors cannot cancel. + +This is an independent algebraic audit of an existing construction. It gives +no new kappa and no full physical or ordinary-service admission. The binary +service limits the source's conditional bound. The selected frontier and all +five framework assumptions stay unchanged. + +## Simultaneous contraction rule + +Consider an acyclic linear packet network over F2. A packet row specifies +the XOR of available labels at its sender. A terminal row gives a public +output. Let `v_j` be the output column caused by a unit perturbation in label +`j`. Reverse accumulation computes these columns. Suppose one helper `r` +and three distinct packets `z,a,d` satisfy + +```text +v_z = e_r, v_a + v_d = e_r. +``` + +Suppose `a,d` have the same sender chart. Remove helper input and output +`r`, delete packets `z,a`, add the old row of `a` to the row of `d`, and remove +the labels `r,z,a` from every retained row. Require a causal schedule for +the resulting network. These conditions suffice for the restricted public +operator. + +To prove this, project the old output columns onto all retained output +coordinates. The projected column of `z` is zero; those of `a,d` are equal. +In the reverse equations, deleting row `z` removes a zero contribution. +Deleting row `a` removes its coefficients times its projected column. +Adding the same coefficients to row `d` restores exactly that contribution. +Deleted input coordinates need no reverse equation. Every retained column +therefore solves the new reverse equations. A causal network has a unique +solution to these equations. Its public operator is the required restriction. + +The proof also applies to several disjoint triples and helper coordinates +at once. Project away all surrendered outputs. Each zero-column and equal- +column identity still holds. Add every retired sender row to its named +donor, then remove every retired label. If the new graph is causal, the same +reverse-potential proof applies. This proof does not assume that the old +delivery deadlines survive. + +## Source-specific certificate + +The checker reads all 34,137 instructions of the selected source word. It +tracks sets of labels, current chart tags and owned lifetimes. It handles +ADD, MOVE, INIT, CLEAR and whole-field SWAP separately. It checks every +chart use, the public final charts and the retirement of all owned fields. +This extraction is separate from the submitted integer-bitset extractor. + +The source has 659 public fields and 2,871 paid packets. Packets below are +zero-based MOVE ordinals. The checker confirms both transpose identities, +the common sender and all original clocks for each row. + +| Helper | z | a | d | Main output affected if its sender correction is omitted | +| --- | --- | --- | --- | --- | +| 633 | 2323 | 2657 | 1599 | 114 | +| 638 | 2342 | 2669 | 1617 | 120 | +| 646 | 2381 | 2695 | 1634 | 133 | +| 640 | 2453 | 2743 | 1621 | 157 | +| 649 | 2496 | 2771 | 1646 | 171 | +| 636 | 2497 | 2773 | 1609 | 172 | +| 651 | 2513 | 2783 | 1662 | 177 | +| 635 | 2532 | 2795 | 1608 | 183 | + +For all 256 subsets, the checker constructs the simultaneous edited network +from the original rows. A separate topological sort checks causality. Every +XOR donor has the required sender chart. Forward bit-vector propagation +checks each complete output row. Reverse propagation checks the transpose +and the old projected-column invariant at every retained label. + +The main map is `X_i -> X_i`, `Y_i -> Y_i+X_i` for 111 pairs. Every surviving +helper has its own identity row. The 256 matrices contain 109,830,912 scalar +entries in each orientation. Bit vectors represent their zero entries as +well as their one entries; this count is matrix coverage, not a gate count. +The full edited public map has rank 651. + +All eight omitted-correction controls have rank-one error and affect only +the distinct main output in the last column. The certificate records each +entire error row and a one-input witness. A separate pass checks all 256 +include-or-omit correction patterns after all eight restrictions. Their +residual matrices are exactly the sums of the listed disjoint error rows. +Only the pattern with all eight corrections has zero error. Thus the +eight-dimensional parameter-to-error map is injective in this fixed family. + +The independent final packet graph agrees with the submitted implementation. +The original emitter then binds that graph to the published physical-word +digest. That binding does not replay the physical word or its rational +projector identities. + +## Target debit and complete signed margin + +Each restriction removes one rank-one and one rank-three paid packet and +surrenders one rank-four independent helper. No paid route is added. The +full edited native has paid counts `1378,1253,54,47,9,104,10` at ranks 1 +through 7. It has 651 public fields and 2,855 paid packets. + +The eight lost input coordinates are independent. The retained operator has +rank 651. It cannot give 659 independent public directions from those 651 +inputs. The eight surrendered helpers therefore cannot retain productive +credit merely because an owned zero field could replace their input. + +With the same 36-call caller, the complete target-minus-paid moment gains +`288*(1+3^(1-C)-4^(1-C))`. This is strictly positive for `0= 16^768 of their multiplicities", + "source_paid_calls": 106776, + "source_paid_rank_mass": 291360, + "source_public_fields": 19662, + "source_status": "unadmitted", + "specialized_initial_and_final": 0, + "specialized_owned_fields": "D = 19662^768 - W", + "split_paid_calls_upper": "291360^768", + "strict_normalized_gap": { + "lower": "0.000000043656190092705372998404", + "upper": "0.000000043656190092705372998405" + }, + "target_tail_offset": "1/5", + "targets": { + "127": 222, + "15": 444, + "2": 36, + "22": 444, + "29": 444, + "36": 444, + "4": 612, + "43": 444, + "50": 444, + "57": 444, + "6": 36, + "64": 444, + "8": 15204 + }, + "tensor_power": 768, + "tested_saving": "19294809/5000000000" + }, + "ordinary_admitted": "385896149/100000000000", + "ordinary_bootstrap": [ + { + "admitted": "9647339/2500000000", + "envelope": "602958699/156250000000", + "previous": "12039/3125000", + "slack": "23/312500000000" + }, + { + "admitted": "385896149/100000000000", + "envelope": "482370187/125000000000", + "previous": "9647339/2500000000", + "slack": "3/500000000000" + } + ], + "raw_bracket": [ + "0.00385896184247", + "0.00385896184248" + ], + "raw_trial": "19294809/5000000000", + "trial_margin": [ + "822349083881473545977662752440605534772488146993505040692547082146075196483/50000000000000000000000000000000000000000000000000000000000000000000000000000000", + "51396817742592096623603922027537845923280509187094065043284192634130898379/3125000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "uniform": { + "H": 297130000000000, + "N": "2^297130000000000", + "eta": { + "lower": "0.000000494603539730257278652580", + "upper": "0.000000494603539730257278652581" + }, + "gap": "1/10000000000", + "integer_test_exponent": 29713, + "logarithm_power": 618, + "ordinary_base_bound": { + "lower": "2014019.225869808830790305333250875505", + "upper": "2014019.225869808830790305333250875506" + }, + "preceding_integer_grid_fails": true, + "previous_logarithm_power_fails": true, + "proof": "retained separated finite compiler and logarithmic majorant, with all new owned fields charged", + "theta": "42/43", + "uniform_saving": "38589617/10000000000" + }, + "working_ambient": "134^768" + }, + "native": { + "changed_sender_control_rejected": true, + "checked_prefix_public_dimensions": [ + 659, + 658, + 657, + 656, + 655, + 654, + 653, + 652, + 651 + ], + "final_public_coefficients": 423801, + "instruction_counts": { + "ADD": 32627, + "CLEAR": 3506, + "INIT": 3506, + "MOVE": 2855, + "SWAP": 651 + }, + "largest_sender_xor": 240, + "paid_packets": 2855, + "program_sha256": "07f5fe923b50ecc26983054cf8f462b1a2b4a008a5e2c7a472209363abaaa35c", + "punctures": [ + { + "original_move_ordinals": [ + 2323, + 2657, + 1599 + ], + "original_public_boundary": [ + 506, + 1 + ], + "original_word_clocks": [ + 26954, + 32956, + 24364 + ], + "paid_routes": [ + [ + 528, + 1 + ], + [ + 506, + 528 + ], + [ + 506, + 344 + ] + ], + "role": 633 + }, + { + "original_move_ordinals": [ + 2342, + 2669, + 1617 + ], + "original_public_boundary": [ + 507, + 1 + ], + "original_word_clocks": [ + 26997, + 33010, + 24494 + ], + "paid_routes": [ + [ + 534, + 1 + ], + [ + 507, + 534 + ], + [ + 507, + 329 + ] + ], + "role": 638 + }, + { + "original_move_ordinals": [ + 2381, + 2695, + 1634 + ], + "original_public_boundary": [ + 508, + 1 + ], + "original_word_clocks": [ + 27088, + 33127, + 24612 + ], + "paid_routes": [ + [ + 547, + 1 + ], + [ + 508, + 547 + ], + [ + 508, + 419 + ] + ], + "role": 646 + }, + { + "original_move_ordinals": [ + 2453, + 2743, + 1621 + ], + "original_public_boundary": [ + 507, + 1 + ], + "original_word_clocks": [ + 27256, + 33333, + 24498 + ], + "paid_routes": [ + [ + 571, + 1 + ], + [ + 507, + 571 + ], + [ + 507, + 333 + ] + ], + "role": 640 + }, + { + "original_move_ordinals": [ + 2496, + 2771, + 1646 + ], + "original_public_boundary": [ + 508, + 1 + ], + "original_word_clocks": [ + 27355, + 33459, + 24624 + ], + "paid_routes": [ + [ + 585, + 1 + ], + [ + 508, + 585 + ], + [ + 508, + 433 + ] + ], + "role": 649 + }, + { + "original_move_ordinals": [ + 2497, + 2773, + 1609 + ], + "original_public_boundary": [ + 506, + 1 + ], + "original_word_clocks": [ + 27360, + 33469, + 24374 + ], + "paid_routes": [ + [ + 586, + 1 + ], + [ + 506, + 586 + ], + [ + 506, + 356 + ] + ], + "role": 636 + }, + { + "original_move_ordinals": [ + 2513, + 2783, + 1662 + ], + "original_public_boundary": [ + 509, + 1 + ], + "original_word_clocks": [ + 27396, + 33514, + 24738 + ], + "paid_routes": [ + [ + 591, + 1 + ], + [ + 509, + 591 + ], + [ + 509, + 396 + ] + ], + "role": 651 + }, + { + "original_move_ordinals": [ + 2532, + 2795, + 1608 + ], + "original_public_boundary": [ + 506, + 1 + ], + "original_word_clocks": [ + 27439, + 33566, + 24373 + ], + "paid_routes": [ + [ + 597, + 1 + ], + [ + 506, + 597 + ], + [ + 506, + 355 + ] + ], + "role": 635 + } + ], + "scalar_rows_per_orientation": 651, + "surviving_original_owners": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 174, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 186, + 187, + 188, + 189, + 190, + 191, + 192, + 193, + 194, + 195, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 210, + 211, + 212, + 213, + 214, + 215, + 216, + 217, + 218, + 219, + 220, + 221, + 222, + 223, + 224, + 225, + 226, + 227, + 228, + 229, + 230, + 231, + 232, + 233, + 234, + 235, + 236, + 237, + 238, + 239, + 240, + 241, + 242, + 243, + 244, + 245, + 246, + 247, + 248, + 249, + 250, + 251, + 252, + 253, + 254, + 255, + 256, + 257, + 258, + 259, + 260, + 261, + 262, + 263, + 264, + 265, + 266, + 267, + 268, + 269, + 270, + 271, + 272, + 273, + 274, + 275, + 276, + 277, + 278, + 279, + 280, + 281, + 282, + 283, + 284, + 285, + 286, + 287, + 288, + 289, + 290, + 291, + 292, + 293, + 294, + 295, + 296, + 297, + 298, + 299, + 300, + 301, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 312, + 313, + 314, + 315, + 316, + 317, + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 342, + 343, + 344, + 345, + 346, + 347, + 348, + 349, + 350, + 351, + 352, + 353, + 354, + 355, + 356, + 357, + 358, + 359, + 360, + 361, + 362, + 363, + 364, + 365, + 366, + 367, + 368, + 369, + 370, + 371, + 372, + 373, + 374, + 375, + 376, + 377, + 378, + 379, + 380, + 381, + 382, + 383, + 384, + 385, + 386, + 387, + 388, + 389, + 390, + 391, + 392, + 393, + 394, + 395, + 396, + 397, + 398, + 399, + 400, + 401, + 402, + 403, + 404, + 405, + 406, + 407, + 408, + 409, + 410, + 411, + 412, + 413, + 414, + 415, + 416, + 417, + 418, + 419, + 420, + 421, + 422, + 423, + 424, + 425, + 426, + 427, + 428, + 429, + 430, + 431, + 432, + 433, + 434, + 435, + 436, + 437, + 438, + 439, + 440, + 441, + 442, + 443, + 444, + 445, + 446, + 447, + 448, + 449, + 450, + 451, + 452, + 453, + 454, + 455, + 456, + 457, + 458, + 459, + 460, + 461, + 462, + 463, + 464, + 465, + 466, + 467, + 468, + 469, + 470, + 471, + 472, + 473, + 474, + 475, + 476, + 477, + 478, + 479, + 480, + 481, + 482, + 483, + 484, + 485, + 486, + 487, + 488, + 489, + 490, + 491, + 492, + 493, + 494, + 495, + 496, + 497, + 498, + 499, + 500, + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520, + 521, + 522, + 523, + 524, + 525, + 526, + 527, + 528, + 529, + 530, + 531, + 532, + 533, + 534, + 535, + 536, + 537, + 538, + 539, + 540, + 541, + 542, + 543, + 544, + 545, + 546, + 547, + 548, + 549, + 550, + 551, + 552, + 553, + 554, + 555, + 556, + 557, + 558, + 559, + 560, + 561, + 562, + 563, + 564, + 565, + 566, + 567, + 568, + 569, + 570, + 571, + 572, + 573, + 574, + 575, + 576, + 577, + 578, + 579, + 580, + 581, + 582, + 583, + 584, + 585, + 586, + 587, + 588, + 589, + 590, + 591, + 592, + 593, + 594, + 595, + 596, + 597, + 598, + 599, + 600, + 601, + 602, + 603, + 604, + 605, + 606, + 607, + 608, + 609, + 610, + 611, + 612, + 613, + 614, + 615, + 616, + 617, + 618, + 619, + 620, + 621, + 622, + 623, + 624, + 625, + 626, + 627, + 628, + 629, + 630, + 631, + 632, + 634, + 637, + 639, + 641, + 642, + 643, + 644, + 645, + 647, + 648, + 650, + 652, + 653, + 654, + 655, + 656, + 657, + 658 + ] + }, + "native_paid": { + "1": 1378, + "2": 1253, + "3": 54, + "4": 47, + "5": 9, + "6": 104, + "7": 10 + }, + "native_targets": { + "2": 1, + "4": 17, + "6": 1, + "8": 410 + }, + "nonzero_owned_erasures": 3506, + "ordinary": { + "caller_bank_transits": 3507600, + "native_bank_transits_per_call": 2872421520, + "native_banks_and_scratch": 4161, + "ordinary_records": 922722701520, + "owned_backing": 6996816, + "raw_ordinary_allowance": 1000000000000, + "raw_owned_allowance": 10000000, + "route_groups": 566136, + "route_records": 819312019200 + }, + "owned_labels": 3506, + "owned_lifetimes": 3506, + "paid": { + "1": 50052, + "2": 45108, + "3": 1944, + "4": 1692, + "5": 324, + "6": 3744, + "7": 804, + "14": 444, + "21": 444, + "28": 444, + "35": 444, + "42": 444, + "49": 444, + "56": 444 + }, + "public": 651, + "signed_positions": { + "ambient": 134, + "fresh_helpers": 15444, + "native_calls": 36, + "native_private_banks": 126216, + "paid_calls": 106776, + "paid_position_sha256": "d120d8eb3f1df66a844713499b6019cfd34882941dd33df8c221451157f41779", + "productive_fields": 19662, + "rank_surplus": 1506, + "rational_frame_sha256": "d8e64b466cd0f0d7548a804b5274adcada4adb31fb71f7f0783a59af7443e887", + "rational_frames": 636, + "rational_main_charts": 111, + "raw_prime_exclusions": [ + 1, + 2, + 4, + 16, + 64 + ], + "serial_query_bank": 1 + }, + "targets": { + "2": 36, + "4": 612, + "6": 36, + "8": 15204, + "15": 444, + "22": 444, + "29": 444, + "36": 444, + "43": 444, + "50": 444, + "57": 444, + "64": 444, + "127": 222 + } +} diff --git a/research/bit-eight-sender-audit/retained/source7776/SOURCES.json b/research/bit-eight-sender-audit/retained/source7776/SOURCES.json new file mode 100644 index 0000000000..d89793055c --- /dev/null +++ b/research/bit-eight-sender-audit/retained/source7776/SOURCES.json @@ -0,0 +1,96 @@ +{ + "schema_version": 1, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": [ + { + "path": "certificates/frontier7000/CLAIM.json", + "usage": "input", + "git_blob": "c9b816f8445be9dc19b2259e03e9d8709d18c87a", + "sha256": "3f8add8252adb223b60418ec69351a69b6b5edfe601ec1c6b4b65cd9e2afd9b2" + }, + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "75d77b328ea02ded535e7f23aee5b1e55d0bb1a8", + "sha256": "154c3d30455d778fd3343b6b4851f0fa4665f0f7625b0adb3675e2bafbbf6bf1" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81" + }, + { + "path": "research/paired-query-only-bit/EFREE-CALLER.json.gz", + "usage": "input", + "git_blob": "f022272a8d51ede841778dec76e2bfb24b614d04", + "sha256": "757b3523798f840bdb02028b23708c3416627a99ea09e7a3c4bcdc5cd0c7ce4b" + }, + { + "path": "research/paired-query-only-bit/EFREE-RESULT.json", + "usage": "input", + "git_blob": "575f76487f9999ecc3e7b1b70f9f71bc582ef8a8", + "sha256": "a46b6c6040f75184cab5467656811ad988c216e3bc8e44d595a5015b6e49620b" + }, + { + "path": "research/paired-query-only-bit/check.py", + "usage": "input", + "git_blob": "0f27d6b90c94466756096911dc02786f60cf5039", + "sha256": "460ed9a77d66264b00c31d0a7f8dab1db9aab21ec4cc0eaf0452bd4be4ef585e" + }, + { + "path": "research/paired-query-only-bit/independent/interval_gate.py", + "usage": "input", + "git_blob": "6d5a751dde7554b2bb3ccb9a958a3508d74ea155", + "sha256": "8dc2bc4c64cba3f83c664373984a075f1a14b4d53958084091345c8cab189dec" + }, + { + "path": "research/paired-query-only-bit/retained/audit_binary_mixed.py", + "usage": "input", + "git_blob": "4e685c0906dbd64b97661a3f9693dfb3b673be41", + "sha256": "bb6616dbf536acf10163b8fff65ebfa69d01dfdeda3c0ead388c03377361b298" + }, + { + "path": "research/paired-query-only-bit/retained/inputs/BIT-NATIVE-WORD.json.gz", + "usage": "input", + "git_blob": "b718d6b2848215ad785022106dfa9f871a3d1c0c", + "sha256": "51203e7fc75ba10bd3ac3f8e675759f47e13d262bea66b6600d1e515095cad78" + }, + { + "path": "research/paired-query-only-bit/retained/inputs/credited_trim.py", + "usage": "input", + "git_blob": "33645029117c8f027443d5aa93764cf06c23338a", + "sha256": "fcff17fdd3108be68761fbde0fcbfe218be166cf518c99f7163e60d53ab785d9" + }, + { + "path": "research/paired-query-only-bit/retained/inputs/inputs/exact_arithmetic.py", + "usage": "input", + "git_blob": "4b24a5096154736ce060474eb8c72dc64c303699", + "sha256": "0ce7e7137422d5ffeda22085c81fa88471bbe963100fdad62e659f1e3bf89326" + }, + { + "path": "research/shared-wire-split-composition/frozen/clifford_exact.py", + "usage": "input", + "git_blob": "166841a037f069249f6f7f6dedb89248812f59e2", + "sha256": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962" + }, + { + "path": "research/shared-wire-split-composition/frozen/native_verify.py", + "usage": "input", + "git_blob": "2c209dfa9cfade3bc20ac5fc9d876b433a147f8c", + "sha256": "3049471905b47b385c88378a1a3be7a18b8858aadd035b8a6da2f4a03b470f38" + }, + { + "path": "scripts/compare_recursive_invoices.py", + "usage": "input", + "git_blob": "fda2a852e9937e42fe40df0707694465ca7c1b48", + "sha256": "3930c22c11da7bc6042cfeb6e459ecb06e4478430037bee3469d034353855fc6" + }, + { + "path": "scripts/evaluate_recursive_power.py", + "usage": "input", + "git_blob": "ca50f8021fc3238a58fd420383f4619a8d008ace", + "sha256": "52b20f41fd0bb55fa88dccd6015af2ce358917817b9506720f3e60ce681cc3ad" + } + ] +} diff --git a/research/bit-eight-sender-audit/retained/source7776/bit_native.py b/research/bit-eight-sender-audit/retained/source7776/bit_native.py new file mode 100644 index 0000000000..86d88d7ed2 --- /dev/null +++ b/research/bit-eight-sender-audit/retained/source7776/bit_native.py @@ -0,0 +1,198 @@ +"""Build and verify eight causal punctures in the selected binary native word. Apache-2.0.""" +from collections import Counter, defaultdict +from hashlib import sha256 +from heapq import heapify, heappop, heappush +import gzip +import json + +NATIVE = 'research/paired-query-only-bit/retained/inputs/BIT-NATIVE-WORD.json.gz' +NATIVE_SHA = '51203e7fc75ba10bd3ac3f8e675759f47e13d262bea66b6600d1e515095cad78' +# Each row names the original public owner and three zero-based MOVE ordinals. +# Remove the first two MOVEs. Add the second sender's row into the third sender. +PUNCTURES = ( + (633, 2323, 2657, 1599), (638, 2342, 2669, 1617), + (646, 2381, 2695, 1634), (640, 2453, 2743, 1621), + (649, 2496, 2771, 1646), (636, 2497, 2773, 1609), + (651, 2513, 2783, 1662), (635, 2532, 2795, 1608), +) + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def digest(value): + return sha256(json.dumps(value, sort_keys=True, separators=(',', ':')).encode()).hexdigest() + + +def indices(value): + while value: + first = value & -value + yield first.bit_length() - 1 + value ^= first + + +def combine(row, values): + result = 0 + for source in indices(row): + result ^= values[source] + return result + + +def read_pinned(root, path, expected): + raw = (root / path).read_bytes() + need(sha256(raw).hexdigest() == expected, 'source digest for ' + str(path)) + return json.loads(gzip.decompress(raw)) + + +def extract(source): + public = source['public'] + initial = dict(enumerate(source['start'])) + final = dict(enumerate(source['final'])) + rows, moves, clocks = {}, {}, {} + banks = [1 << i for i in initial] + [0]*source['owned_fields'] + for clock, (op, r, *args) in enumerate(source['program']): + if op == 'ADD': + banks[r] ^= banks[args[0]] + elif op in ('INIT', 'CLEAR'): + banks[r] = 0 + elif op == 'SWAP': + s, = args + banks[r], banks[s] = banks[s], banks[r] + else: + need(op == 'MOVE', 'original binary instruction') + k = public + len(moves) + rows[k], moves[k], clocks[k] = banks[r], tuple(args), clock + banks[r] = 1 << k + rows.update({~r: banks[r] for r in final}) + return initial, final, moves, rows, clocks + + +def schedule(initial, final, moves, rows): + chart = initial.copy() + chart.update({k: arrival for k, (_, arrival) in moves.items()}) + need(rows.keys() == moves.keys() | {~r for r in final}, 'every packet and terminal has one row') + count, uses = {}, defaultdict(list) + for k, row in rows.items(): + here = moves[k][0] if k >= 0 else final[~k] + parents = list(indices(row)) + need(all(chart.get(j) == here for j in parents), 'every XOR donor has the current rational chart') + if k >= 0: + count[k] = sum(j in moves for j in parents) + for j in parents: + if j in moves: + uses[j].append(k) + ready = [k for k in moves if not count[k]] + heapify(ready) + order = [] + while ready: + k = heappop(ready) + order.append(k) + for child in uses[k]: + count[child] -= 1 + if not count[child]: + heappush(ready, child) + need(len(order) == len(moves), 'causal binary packet schedule') + return order + + +def basis(initial, moves, rows, order): + values = {r: 1 << r for r in initial} + for k in order: + values[k] = combine(rows[k], values) + for r in initial: + target = 1 << r + if 111 <= r < 222: + target ^= 1 << (r-111) + need(combine(rows[~r], values) == target, 'complete binary public transfer') + # A pulse in a delivered packet gives this column at all outputs. + columns = {j: 0 for j in initial.keys() | moves.keys()} + for r in initial: + for j in indices(rows[~r]): + columns[j] ^= 1 << r + for k in reversed(order): + for j in indices(rows[k]): + columns[j] ^= columns[k] + for r in initial: + expected = 1 << r + if r < 111: + expected ^= 1 << (r+111) + need(columns[r] == expected, 'complete transposed binary public transfer') + return columns + + +def puncture(initial, final, moves, rows, r, zero, alias, donor, send=True): + initial, final, moves = initial.copy(), final.copy(), moves.copy() + del initial[r], final[r], moves[zero], moves[alias] + erased = (1 << r) | (1 << zero) | (1 << alias) + new_rows = {k: row & ~erased for k, row in rows.items() if k not in (~r, zero, alias)} + if send: + new_rows[donor] ^= rows[alias] & ~erased + return initial, final, moves, new_rows + + +def emit_word(source, initial, final, moves, rows, order): + owners = sorted(initial) + public = len(owners) + location = {r: i for i, r in enumerate(owners)} + program = [] + def accumulate(scratch, chart, row): + program.append(['INIT', scratch, chart]) + program.extend(['ADD', scratch, location[j], chart] for j in indices(row)) + for i, k in enumerate(order): + a, b = moves[k] + scratch = public+i + accumulate(scratch, a, rows[k]) + program.append(['MOVE', scratch, a, b]) + location[k] = scratch + output_base = public + len(moves) + for i, r in enumerate(owners): + accumulate(output_base+i, final[r], rows[~r]) + # Exchange the full contents and chart tags only after all output sums are ready. + for i, r in enumerate(owners): + program.append(['SWAP', i, output_base+i]) + program.append(['CLEAR', output_base+i, initial[r]]) + for k in order: + program.append(['CLEAR', location[k], moves[k][1]]) + return dict(schema='BIT-functional-GL-kernel-native/1', public=public, + owned_fields=len(moves)+public, frames=source['frames'], start=[initial[r] for r in owners], + final=[final[r] for r in owners], program=program) + + +def build(root): + source = read_pinned(root, NATIVE, NATIVE_SHA) + initial, final, moves, rows, clocks = extract(source) + start = source['public'] + need((start, len(moves), len(source['frames'])) == (659, 2871, 636), 'selected native inventory') + order = schedule(initial, final, moves, rows) + columns = basis(initial, moves, rows, order) + trace = [] + for index, (r, *ordinals) in enumerate(PUNCTURES): + zero, alias, donor = [start+i for i in ordinals] + need(columns[zero] == 1 << r and columns[alias] ^ columns[donor] == 1 << r, + 'both exact transpose equations for the surrendered helper') + need(moves[alias][0] == moves[donor][0] and clocks[donor] < clocks[alias], + 'same sender bank and later donor in the old reverse order') + trace.append(dict(role=r, original_move_ordinals=ordinals, original_word_clocks=[clocks[k] for k in (zero,alias,donor)], + paid_routes=[list(moves[k]) for k in (zero,alias,donor)], + original_public_boundary=[initial[r], final[r]])) + if index == 0: + bad = puncture(initial, final, moves, rows, r, zero, alias, donor, send=False) + try: + basis(bad[0], bad[2], bad[3], schedule(*bad)) + except ValueError as error: + need(str(error) == 'complete binary public transfer', 'changed-sender control failure') + else: + raise ValueError('missing sender XOR accepted') + initial, final, moves, rows = puncture(initial, final, moves, rows, r, zero, alias, donor) + order = schedule(initial, final, moves, rows) + columns = basis(initial, moves, rows, order) + word = emit_word(source, initial, final, moves, rows, order) + receipt = dict(punctures=trace, checked_prefix_public_dimensions=list(range(659,650,-1)), + surviving_original_owners=sorted(initial), program_sha256=digest(word), + scalar_rows_per_orientation=len(initial), final_public_coefficients=len(initial)**2, + paid_packets=len(moves), largest_sender_xor=max(v.bit_count() for v in rows.values()), + instruction_counts=dict(Counter(e[0] for e in word['program'])), + changed_sender_control_rejected=True) + return word, receipt diff --git a/research/bit-eight-sender-audit/verify.py b/research/bit-eight-sender-audit/verify.py new file mode 100644 index 0000000000..eae6eacbb2 --- /dev/null +++ b/research/bit-eight-sender-audit/verify.py @@ -0,0 +1,219 @@ +"""Audit eight binary sender changes with exact set and bit-vector arithmetic.""" +from collections import Counter +from graphlib import TopologicalSorter +from hashlib import sha1,sha256 +from pathlib import Path +import argparse +import gzip +import importlib.util +import json +import time + +HERE=Path(__file__).resolve().parent +EDITS=((633,2323,2657,1599),(638,2342,2669,1617),(646,2381,2695,1634),(640,2453,2743,1621),(649,2496,2771,1646),(636,2497,2773,1609),(651,2513,2783,1662),(635,2532,2795,1608)) + + +def need(ok,message): + if not ok: + raise ValueError(message) + + +def encoded(value): + return json.dumps(value,sort_keys=True,separators=(',',':')).encode() + + +def read(path): + raw=path.read_bytes() + return json.loads(gzip.decompress(raw) if raw[:2]==b'\x1f\x8b' else raw) + + +def bits(value): + while value: + bit=value&-value + yield bit.bit_length()-1 + value^=bit + + +def extract(word): + """Track field tags and sets of packet labels through every instruction.""" + public=word['public'] + fields=[{i} for i in range(public)]+[None]*word['owned_fields'] + charts=list(word['start'])+[None]*word['owned_fields'] + rows,routes,clocks={},{},{} + for clock,event in enumerate(word['program']): + kind,r,*args=event + if kind=='INIT': + need(fields[r] is None and r>=public,'fresh owned initialization') + fields[r],charts[r]=set(),args[0] + elif kind=='CLEAR': + need(r>=public and fields[r] is not None and charts[r]==args[0],'owned clear chart') + fields[r],charts[r]=None,None + elif kind=='ADD': + s,c=args + need(fields[r] is not None and fields[s] is not None and charts[r]==charts[s]==c,'source XOR chart') + fields[r]=fields[r]^fields[s] + elif kind=='SWAP': + s,=args + need(fields[r] is not None and fields[s] is not None,'live field swap') + fields[r],fields[s]=fields[s],fields[r] + charts[r],charts[s]=charts[s],charts[r] + else: + need(kind=='MOVE','known source opcode') + a,b=args + need(fields[r] is not None and charts[r]==a,'source MOVE chart') + k=public+len(routes) + rows[k],routes[k],clocks[k]=set(fields[r]),(a,b),clock + fields[r],charts[r]={k},b + need(charts[:public]==word['final'] and all(v is None for v in fields[public:]),'complete source boundary and owned retirement') + rows.update({~i:fields[i] for i in range(public)}) + return dict(enumerate(word['start'])),dict(enumerate(word['final'])),routes,rows,clocks + + +def evaluate(initial,final,routes,rows): + need(set(rows)==set(routes)|{~i for i in final},'complete row inventory') + chart=initial|{k:b for k,(a,b) in routes.items()} + for k,row in rows.items(): + c=routes[k][0] if k>=0 else final[~k] + need(all(j in chart and chart[j]==c for j in row),'available same-chart XOR donor') + order=list(TopologicalSorter({k:row&routes.keys() for k,row in rows.items() if k>=0}).static_order()) + values={i:1<