diff --git a/research/banked-native-minimum-grid/.gitattributes b/research/banked-native-minimum-grid/.gitattributes new file mode 100644 index 0000000000..89d24e34ba --- /dev/null +++ b/research/banked-native-minimum-grid/.gitattributes @@ -0,0 +1,2 @@ +predecessor/** -text +predecessor/source/7669-CREDITS.md whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol diff --git a/research/banked-native-minimum-grid/LICENSE b/research/banked-native-minimum-grid/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/banked-native-minimum-grid/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/banked-native-minimum-grid/PREDECESSOR.json b/research/banked-native-minimum-grid/PREDECESSOR.json new file mode 100644 index 0000000000..a1eafe9153 --- /dev/null +++ b/research/banked-native-minimum-grid/PREDECESSOR.json @@ -0,0 +1,112 @@ +{ + "repository": "aliromman/integer-mult-bounds", + "scientific_commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "pr_head": "28b2af322a1fab01b3734365988930920f9dda48", + "files": [ + { + "path": "SOURCE-PINS.json", + "git_blob": "489f8a60e98dcade0082b29c66448c8af5963f33", + "sha256": "8fe48d96e2cc39ae92b0ea9d37f809005b5debc7cf4cadaef33e1674f979aeb8", + "bytes": 2483, + "source": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/SOURCE-PINS.json" + }, + { + "path": "network.py", + "git_blob": "0ebc1925c40cc6c11af59e405221ea51801a6e92", + "sha256": "a9169fd6ad0a13c69cf39bd32649d53256f6d6fa2ed2ceda854f848b64f4c546", + "bytes": 8209, + "source": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/network.py" + }, + { + "path": "native.py", + "git_blob": "3e09f65fe33e162e1a5e2e0433b7ea4483759b3a", + "sha256": "788465324eb8693a698c75cb3dfdf1b82297324d5583910107ecad4600645e43", + "bytes": 4786, + "source": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/native.py" + }, + { + "path": "PIVOTS.json", + "git_blob": "feede77664be2de84437dc1ef144ab6974b1e44c", + "sha256": "fb22afc8aaf543e62709fa682f222577e6bdf4e1f1994d307784468314c3da85", + "bytes": 8477, + "source": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/PIVOTS.json" + }, + { + "path": "PROOF.md", + "git_blob": "7d6403f24da86a51fac1635bc394cf12595b8c54", + "sha256": "f81db83baecd23f2c89ee8e62d0199d15079791ac1bd533859e5232b293c25ef", + "bytes": 18571, + "source": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/PROOF.md" + }, + { + "path": "RESULT.json", + "git_blob": "11e0617c58d7d7e91f0fbb986690f78f6f76c224", + "sha256": "00340c699fd7e2895d31a41d1eb60aebf91d7ba2c1c193dc002f69315298cd38", + "bytes": 13018, + "source": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/RESULT.json" + }, + { + "path": "NOTICE", + "git_blob": "951f081717e0769f3bcc0f442f133965c064d2ce", + "sha256": "382537634a3d9fa0a8089d6121a506a399382f9310088b1f29586dcc93eec92d", + "bytes": 1697, + "source": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/NOTICE" + }, + { + "path": "source/K372-2-WORD.json.gz", + "git_blob": "1273c83178693e1627a2324680907f9b0e95e995", + "sha256": "631babeca90e78c5caac713484fe618328b9beee8294baef6ac45ffc9a75dd3b", + "bytes": 585407, + "source": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/source/K372-2-WORD.json.gz" + }, + { + "path": "source/source-edits.json", + "git_blob": "23368c8750e6d981ee10664187c6a2c3859be542", + "sha256": "05b84f9578fddc7adc7805f20afdfe5ea679d298b2232d7f718193185f471656", + "bytes": 13849, + "source": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/source/source-edits.json" + }, + { + "path": "source/caller.json.gz", + "git_blob": "26a75a1ae32cb4944a65281cfb08775967cb39a0", + "sha256": "d889996a337f648087208ab51c98eaf052705d4fca88b5d01b6e9257a829897a", + "bytes": 11854, + "source": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/source/caller.json.gz" + }, + { + "path": "source/parent-invoice.json", + "git_blob": "4cfe4f0fe98a820153cac58747dd80fb2a2402e6", + "sha256": "c79d8c51ad34c7c14134c41d3ae132ab91101e8e24674b52a2abfa191de3fd00", + "bytes": 574, + "source": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/source/parent-invoice.json" + }, + { + "path": "source/7669-CREDITS.md", + "git_blob": "bbee2437f012c3268eb5cd920adfa37394c1de72", + "sha256": "706c6c852e87e371ddf1828244b2f0c2b00279728818023aa911c8947d69ab83", + "bytes": 7588, + "source": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/source/7669-CREDITS.md" + }, + { + "path": "source/interval_gate.py", + "git_blob": "e24dc46079b4c25152f5afc096dda2ce8ee58ff5", + "sha256": "60a743d13f668ef86db4b8215b4d5d04430a671ba6f1fe06d9c1c4c3dfe86da5", + "bytes": 6886, + "source": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/source/interval_gate.py" + }, + { + "path": "source/gate-NOTICE", + "git_blob": "1bc9b4da2b8398954cd7a49356eb9d397785d0a6", + "sha256": "cadbc642ca84311d2c7a6cf704c7828cb4cf77e3c784b66e4c6e8a5c28002fb8", + "bytes": 1238, + "source": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/source/gate-NOTICE" + }, + { + "path": "source/7663-NOTICE", + "git_blob": "6ce1bc49a3612c9e906df02de81bcba84be8e803", + "sha256": "5fd4367578d2339fbdcd7dc116b6c12cb4fa72e92d2e3d67be537a36c8bd9d40", + "bytes": 1326, + "source": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/source/7663-NOTICE" + } + ] +} diff --git a/research/banked-native-minimum-grid/PROOF.md b/research/banked-native-minimum-grid/PROOF.md new file mode 100644 index 0000000000..6d4fdcbe51 --- /dev/null +++ b/research/banked-native-minimum-grid/PROOF.md @@ -0,0 +1,168 @@ +# Minimum scalar grids for the final banked native graph + +This is a finite, source-bound arithmetic result for the final forward +DAG of PR #7674 at scientific commit +`26b6c469aa6c4aa04322ce25a22150f90e5fb14e`. Its 15 pivots act on the +parent word with SHA-256 +`ee251f6005d2a92b887c5b804bd7aac05989d278b2c9ccb3c3091b50d533b08d`. +The current PR head `28b2af322a1fab01b3734365988930920f9dda48` adds +only the separate shared CI repair. The source graph is unchanged here. + +The source's recursive denominator rule gives the sufficient integer +grid `2025 * 2^18 = 530841600`. Exact cancellation in the actual +independent-input coefficient rows gives the following sharp values. + +| Required states | Minimum integer grid G | Minimum odd entrance factor M | Binary coefficient guard h | +| --- | ---: | ---: | ---: | +| Every literal scalar product, addition and stored row | 921600 | 225 | 12 | +| Stored snapshots only | 23040 | 45 | 9 | + +Here `G=M*2^h`, with M a positive odd integer and h nonnegative. +Inputs are arbitrary independent normalized integer scalars. Scaling +all inputs by M and using binary fractional grid `2^-h` is equivalent +to representing every exact scalar coefficient in integer units G. +For inputs on `2^-p Z`, add p to the fractional width. The integer +part is unbounded in this audit; magnitude and overflow are separate. + +The first line reduces the source's sufficient odd factor by nine and +its scalar coefficient guard by six bits. The sufficient integer grid +is 576 times the exact minimum. This is not a runtime, memory or kappa +claim. The second line cannot be used as a working grid for the source's +literal products. It is 40 times coarser than the required product grid. + +## Exact execution being certified + +Each independent entrance role r starts as a basis scalar z_r. A +snapshot is a rational linear form in these 1501 variables. At a node, +the graph computes the listed rational coefficient times each donor +snapshot, in sorted donor order, and adds the products into a fresh +zero accumulator. The returned or terminal snapshot is the completed +row. The source schedule fixes legal dependencies and chart locations. +A normalized paid transfer leaves these scalar variables unchanged. +The graph has 6142 paid nodes and 1501 terminal nodes, hence 7643 rows. + +The audit covers those rational products, additions and snapshot +values. It does not evaluate physical Clifford matrix entries, native +internal butterflies, the signed caller, recursive descendants, root +depth or final unscalings as additional scalar steps. The source's +common-root proof must still supply those other precision contributions. +Its 16-stage caller has a separate bound; no replacement for that bound +is supplied here. + +## Minimum-grid criterion + +For each literal product q times a donor row, list the reduced rational +coefficients of the product in the independent entrance variables. +Let A be the least common multiple of all their denominators. Let B +be the least common multiple of the denominators of all completed rows. +The initial rows have integer coefficients. Then: + +- Every product and addition is exact on integer grid G for every + integer input if and only if A divides G. +- Every completed snapshot is representable on grid G for every + integer input if and only if B divides G. + +For sufficiency, each product coefficient times G is an integer. Every +partial sum is then integral as well. Induction over the schedule proves +exactness. For snapshot representability, apply the same argument to +completed rows without claiming that their products are representable. + +For necessity, a reduced coefficient a/b evaluated on its named basis +input gives a/b. It is representable in integer units G only if b divides +G. Taking the least common multiple proves the claims. This is the +prefix-coefficient precision method used in Gareth Davidson's PR #866, +applied here to rational term products and completed snapshots of a +new pinned graph. The general method is prior work. + +The computation starts from the source's sufficient grid Q. If its +integer coefficient values are v_i, the least common multiple of their +reduced denominators is + +```text +Q / gcd(Q, v_1, v_2, ...). +``` + +Prime valuations prove the identity: the largest denominator valuation +is the valuation of Q minus the smallest valuation shared with all v_i. +The executable computes this quantity separately for products and rows. +It then executes the whole graph again at the smaller product grid, +checks every division and compares every row under exact rescaling. + +## Sharp product witnesses + +The following exact coefficients occur before addition. Set the named +input to one and all other inputs to zero. Negative donor labels are +the source's bitwise-complement labels for entrance roles. + +| Required prime power | Node | Donor | Input | Scalar factor | Product coefficient | +| --- | ---: | ---: | ---: | --- | --- | +| 3 squared | 87424 | -1344 | 1343 | -4/9 | -4/9 | +| 5 squared | 96681 | 90728 | 1226 | -4/5 | -4/25 | +| 2 to power 12 | 103161 | 88788 | 265 | 1/8 | 3/4096 | + +Their denominators have least common multiple 921600. The complete +integer replay supplies the matching upper bound. Thus neither an +odd factor below divisibility by 225 nor a guard below 12 can work +for every normalized basis input under this literal execution. +This is a divisibility statement: some larger integers also fail if +they lack a required prime power. + +A separate integer execution at each grid `921600/p`, for p=2,3,5, +stops at a real nonexact division. The first failures are: + +| Grid | Input | First node | Numerator | Divisor | Remainder | +| --- | ---: | ---: | ---: | ---: | ---: | +| 460800 | 265 | 103161 | 2700 | 8 | 4 | +| 307200 | 1343 | 87424 | -1228800 | 9 | 6 | +| 184320 | 1226 | 96681 | -147456 | 5 | 4 | + +No rounded endpoint error is claimed. These executions stop at the +first failed exact division instead of choosing a rounding convention. + +## Snapshot witnesses and the temporary-product gap + +The completed-row coefficients -4/9 at node 87424/input 1343, +7/1536 at node 95529/input 265, and 1/10 at node 87792/input 1319 +have denominator least common multiple 23040. The full row scan gives +the same upper bound. These prove the snapshot-only minimum and all +three of its required prime valuations. + +Nevertheless, at snapshot grid 23040 the basis input 265 first fails +at node 100778, donor 97562: numerator 180 divided by 24 leaves +remainder 12. Input 1226 first fails at node 96681: numerator -18432 +divided by 5 leaves remainder 3. Thus a claim that every stored row fits +does not make the literal term-by-term implementation exact. A different +arithmetic lowering could change this requirement and is outside scope. + +## Verification and source boundary + +The package retains 15 exact predecessor files, their original notices +and an Apache-2.0 license. PREDECESSOR.json records their published +commit URLs, Git blobs, SHA-256 hashes and sizes. The verifier checks +those bytes before loading the retained source graph constructor. +The constructor authenticates the frozen word and its 12 parent edits, +applies the 15 published pivots and checks the final schedule. Reuse of +that constructor is explicit; this is not an independent graph compiler. + +The new arithmetic evaluator checks all 8533666 scalar coefficient +products at the source grid and again at the minimum grid. Every row +agrees under rescaling; all 1501 public endpoint rows agree with the +specified normalized native map at both grids. A separate Fraction +interpreter evaluates the four named basis inputs without an integer +scale and confirms all six product/snapshot witnesses. Eight negative +controls check missing prime factors and misuse of the snapshot grid. + +This finite theorem does not lower the selected root format or replace +the source's complete physical proof. Clifford factors, recursive debt, +integer magnitude, overflow, caller precision, physical service constants, +layout, restoration and the complete invoice remain separate obligations. +All five selected assumptions remain. No new kappa or supplier admission +is claimed. No predecessor scientific suite, selected cold replay, Lean +or Docker run is included. Independent human and formal-kernel review +are unclaimed. + +Prepared by Ali Romman with substantial OpenAI Codex assistance. +Credit the banked graph and common-root source in PR #7674, SYLforge's +parent PR #7669 and its preserved lineage, and Gareth Davidson's PR #866 +for the precision criterion and basis-witness method. The retained source +files keep their exact notices. New work is Apache-2.0. diff --git a/research/banked-native-minimum-grid/README.md b/research/banked-native-minimum-grid/README.md new file mode 100644 index 0000000000..602f55a02b --- /dev/null +++ b/research/banked-native-minimum-grid/README.md @@ -0,0 +1,83 @@ +# Exact minimum grids for the current banked native graph + +The final forward scalar DAG of +[PR #7674](https://github.com/CrocSwap/integer-mult-bounds/pull/7674) +needs odd entrance factor **225** and **12 binary coefficient bits** +for every literal product and addition. The source's sufficient values +are 2025 and 18. This is an exact finite precision result for the pinned +graph; it does not replace the full common-root proof or change kappa. + +Stored snapshots alone need factor 45 and nine bits. That coarser grid +fails during products, even though every completed row fits. Read +[PROOF.md](PROOF.md), [RESULT.json](RESULT.json) and [verify.py](verify.py) +for the exact scope, all prime-factor witnesses and literal failures. + +## Reproduce + +Use CPython 3.12 and its standard library from the repository root. + +```sh +python3.12 -I -W error -B research/banked-native-minimum-grid/verify.py +python3.12 -I -W error -B -O research/banked-native-minimum-grid/verify.py +python3.12 -B scripts/research_package.py --package research/banked-native-minimum-grid +python3.12 -B scripts/check_research_commit.py --package research/banked-native-minimum-grid --check-source-history --check-modes +``` + +Expected markers are PASS_BANKED_NATIVE_MINIMUM_GRID, +PASS_REGISTERED_RESEARCH_PACKAGE and PASS_RESEARCH_COMMIT_BYTES. +The new evaluator checks 8533666 exact products at each of the two +grids, all 7643 snapshots and all 1501 public endpoint rows. A separate +Fraction interpreter checks six sharpness witnesses on four basis +inputs. Eight negative controls reject missing prime factors or a +snapshot grid used for product work. There is no external run-time input. +The exact retained source bytes are bound in [PREDECESSOR.json](PREDECESSOR.json). +The graph constructor is reused from the source; the coefficient audit +is new. It is not an independent graph compiler or human review. + +## Task and scope + +Base is canonical main `e54523517d0f03e58352e647c403a5af3e525a57`, +priority revision 8, with selected PR #7000 unchanged. The +[advance claim](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19703488) takes the arithmetic-grid portion of the +candidate's review request. Card `supplier-boundary-audit` is narrowed +to one quantified finite precision obligation. The exact source graph, +its paid/target counts and the original PR are unchanged. + +The broad overlap search found the historical precision method in +PR #866 and the current candidate's review request. The old method and +source construction are credited; neither is claimed as new. Sparse +local notes and unpublished work remain coverage limits. + +No predecessor scientific suite, selected cold replay, Lean or Docker +was run. Native Clifford entries, recursive debt, the signed caller, +magnitude and physical costs remain outside this arithmetic replay. +All selected assumptions remain. Independent human and formal-kernel +review are unclaimed. + +## Open next questions + +Can the smaller native scalar factor and guard be substituted into the +source's complete common-root proof without changing its caller and +boundary contracts? First keep the caller's separate scale, quantify +the Clifford and unfinished-depth contributions, and check each final +unscaling. The scalar minimum alone does not prove that substitution. +A different product lowering could also change the temporary grid. + +## Credit and exact sources + +Prepared by Ali Romman with substantial OpenAI Codex assistance. +The banked circuit and sufficient common-root bound are from +[PR #7674](https://github.com/CrocSwap/integer-mult-bounds/pull/7674), +[exact source proof](https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/PROOF.md) +and [source arithmetic evaluator](https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/native.py). +The scientific commit is `26b6c469aa6c4aa04322ce25a22150f90e5fb14e`; +head `28b2af322a1fab01b3734365988930920f9dda48` adds the shared CI repair. +SYLforge supplied [PR #7669](https://github.com/CrocSwap/integer-mult-bounds/pull/7669); +its [original credit](predecessor/source/7669-CREDITS.md) and the +[source notices](predecessor/NOTICE) are retained unchanged. +Gareth Davidson / bitplane's +[PR #866](https://github.com/CrocSwap/integer-mult-bounds/pull/866), +[exact precision proof](https://github.com/bitplane/integer-mult-bounds/blob/5ae580bf68516f1cbe3b2dd3cb646be55170288f/research/dyadic-fractional-grid/README.md), +supplied the prefix-coefficient grid criterion and basis-input witnesses. +The new result binds that method to this graph and distinguishes product +precision from snapshot representability. New work is Apache-2.0. diff --git a/research/banked-native-minimum-grid/RESULT.json b/research/banked-native-minimum-grid/RESULT.json new file mode 100644 index 0000000000..24c89e6604 --- /dev/null +++ b/research/banked-native-minimum-grid/RESULT.json @@ -0,0 +1,116 @@ +{ + "fraction_basis_inputs": [ + 265, + 1226, + 1319, + 1343 + ], + "minimum_grid_exact_replay_products": 8533666, + "minimum_product_grid": 921600, + "minimum_snapshot_grid": 23040, + "product_witnesses": { + "2": { + "coefficient": "3/4096", + "denominator": 4096, + "donor": 88788, + "factor": "1/8", + "input": 265, + "node": 103161 + }, + "3": { + "coefficient": "-4/9", + "denominator": 9, + "donor": -1344, + "factor": "-4/9", + "input": 1343, + "node": 87424 + }, + "5": { + "coefficient": "-4/25", + "denominator": 25, + "donor": 90728, + "factor": "-4/5", + "input": 1226, + "node": 96681 + } + }, + "products": 8533666, + "public_rows_checked": 1501, + "scope": "Normalized rational scalar DAG; physical Clifford and recursive-root precision remain separate.", + "sharpness": { + "negative_controls": 8, + "prime_factor_product_failures": [ + { + "divisor": 8, + "donor": 88788, + "grid": 460800, + "input": 265, + "node": 103161, + "numerator": 2700, + "remainder": 4 + }, + { + "divisor": 9, + "donor": -1344, + "grid": 307200, + "input": 1343, + "node": 87424, + "numerator": -1228800, + "remainder": 6 + }, + { + "divisor": 5, + "donor": 90728, + "grid": 184320, + "input": 1226, + "node": 96681, + "numerator": -147456, + "remainder": 4 + } + ], + "snapshot_grid_product_failures": [ + { + "divisor": 24, + "donor": 97562, + "grid": 23040, + "input": 265, + "node": 100778, + "numerator": 180, + "remainder": 12 + }, + { + "divisor": 5, + "donor": 90728, + "grid": 23040, + "input": 1226, + "node": 96681, + "numerator": -18432, + "remainder": 3 + } + ], + "snapshot_prime_factor_controls": 3 + }, + "snapshot_rows": 7643, + "snapshot_witnesses": { + "2": { + "coefficient": "7/1536", + "denominator": 1536, + "input": 265, + "node": 95529 + }, + "3": { + "coefficient": "-4/9", + "denominator": 9, + "input": 1343, + "node": 87424 + }, + "5": { + "coefficient": "1/10", + "denominator": 10, + "input": 1319, + "node": 87792 + } + }, + "source_sufficient_grid": 530841600, + "status": "PASS_BANKED_NATIVE_MINIMUM_GRID" +} diff --git a/research/banked-native-minimum-grid/SOURCES.json b/research/banked-native-minimum-grid/SOURCES.json new file mode 100644 index 0000000000..5335fa97d9 --- /dev/null +++ b/research/banked-native-minimum-grid/SOURCES.json @@ -0,0 +1,18 @@ +{ + "schema_version": 1, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": [ + { + "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" + } + ] +} diff --git a/research/banked-native-minimum-grid/TASK.json b/research/banked-native-minimum-grid/TASK.json new file mode 100644 index 0000000000..2cbfa698eb --- /dev/null +++ b/research/banked-native-minimum-grid/TASK.json @@ -0,0 +1,91 @@ +{ + "schema_version": 1, + "task_id": "supplier-boundary-audit", + "priority_revision": 8, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "original_card": { + "id": "supplier-boundary-audit", + "question": "Does one changed supplier have complete source-bound native, caller, ordinary and outer admission coverage?", + "starting_points": [ + "docs/research/current-priorities.md", + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md" + ], + "methods": [ + "Construct and independently check one source-bound instance of the stated first experiment.", + "Seek an exact counterexample or target-specific complete-budget obstruction to that same proposed change." + ], + "acceptance_gate": "Pin the current sources and one obligation; the historical owner audit is an example, not evidence of a current bug.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read revision 8, the selected review and live exact-source handoffs. Then follow this card's bounded first_experiment.", + "scope": "Source-bound orientation only, not a supplier replay or theorem proof." + }, + "first_experiment": "Choose one latest uncovered candidate and build a delta coverage map against the selected review. For P104, #5717 changes owned-lifetime assumptions and #5719 covers exact #5713 causal premises; neither automatically transfers to #5718. For BIT, #5679/#5708 need component admission and compatible outer use. Check controls and exact source identity before reuse; stop with one resolved gap or explicit remaining obligation. A heavy full replay requires a separate serial resource budget.", + "bottleneck_link": "Judge the actual current supplier contract and complete signed target/paid bill; frozen-profile ceilings require an applicability proof.", + "allowed_variations": [ + "One exact source head, helper/cut region or quantified proposition and changed hypothesis; check live handoffs first. Different seeds are not different scopes." + ], + "scope_change_triggers": [ + "Changing source head, helper/cut domain, operation alphabet or caller boundary without recording the new scope.", + "Treating an archived proposal or local numerical pass as complete supplier admission." + ], + "overlap_terms": [ + "supplier admission", + "5717", + "5719", + "5708", + "owned lifetime" + ], + "existing_checks": [ + { + "scope": "PR #4088: author-checked local words, native receipts, owner/phase fill and exact moment.", + "evidence": "research/staged544-mixed-fourth-entry/README.md", + "remaining": "Rebind and validate ordinary/outer admission with all four providers; full mixed release not established.", + "status": "author-checked", + "source_commit": "72d7efc181edb21806a878f174847c96dd410ab0", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #3801: successor scatter-boundary decision package.", + "evidence": "research/scatter-boundary-decision/README.md", + "remaining": "Consult its exact acceptance scope before any new exporter audit; not proof of a selected failure.", + "status": "author-checked", + "source_commit": "911f8800ba7a4b03603ef62c5ffc6240e53cb5fd", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "Selected PR5599: complete helper-subspace construction and independent caller replay; five framework assumptions remain.", + "evidence": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "remaining": "The next experiment must identify uncovered source-specific work. Successor archive intake does not transfer this admission.", + "status": "reviewed", + "source_commit": "09dd0965711ca7eeb169057a420abab1c9052137", + "selected_record_sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5" + } + ] + }, + "scope_status": "refined", + "actual_scope": "Certify the exact minimum normalized scalar product and snapshot grids of the pinned PR7674 final native DAG, with prime-factor basis witnesses.", + "scope_change_reason": "The current candidate requests arithmetic/root-precision review. This package resolves only the finite scalar coefficient grid, not complete supplier admission.", + "bottleneck_link": "It replaces a conservative native scalar denominator bound with a sharp source-bound value and detects the gap between stored-row representability and temporary product precision.", + "budget_minutes": 60, + "stop_rule": "Stop at the exact grids, source binding and sharpness checks. Do not infer a smaller full root format or a changed bound without a separate caller/Clifford/depth argument.", + "outcome": "completed", + "evidence": "PROOF.md; RESULT.json; complete exact product and row traces at two grids; all 1501 public endpoints; independent Fraction basis witnesses; eight negative controls.", + "author": "Ali Romman", + "ai_assistance": "Substantial OpenAI Codex assistance. The predecessor graph constructor is reused; the arithmetic audit is new. No independent human or formal-kernel review is claimed.", + "open_questions": [ + { + "question": "Can the smaller native scalar factor and guard be used in the complete common-root implementation?", + "why_it_matters": "The finite scalar minimum does not include caller scaling, physical Clifford denominators or unfinished recursive debt.", + "first_step": "Keep the caller scale separate and check the physical Clifford, depth and final-unscaling terms in source sections 3\u20134.", + "blocked_by": "The full physical precision substitution, magnitude budget and complete invoice have not been audited here." + } + ] +} diff --git a/research/banked-native-minimum-grid/VERIFY.json b/research/banked-native-minimum-grid/VERIFY.json new file mode 100644 index 0000000000..09641de9a8 --- /dev/null +++ b/research/banked-native-minimum-grid/VERIFY.json @@ -0,0 +1,34 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Authenticated final graph, all exact product/row coefficients at two grids, all public endpoints, separate rational sharpness witnesses and eight under-grid controls." + }, + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "-O", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Authenticated final graph, all exact product/row coefficients at two grids, all public endpoints, separate rational sharpness witnesses and eight under-grid controls." + } + ] +} diff --git a/research/banked-native-minimum-grid/predecessor/NOTICE b/research/banked-native-minimum-grid/predecessor/NOTICE new file mode 100644 index 0000000000..951f081717 --- /dev/null +++ b/research/banked-native-minimum-grid/predecessor/NOTICE @@ -0,0 +1,7 @@ +Apache License 2.0. Research prepared for Ali Romman with substantial OpenAI Codex assistance. + +New work includes the fifteen certified sender/receiver pivots, the forward and transposed communication construction, the complete native row checker, and the finite stock and precision application for this 16-call program. + +SYLforge supplied the composition, native word reconstruction, published invoice and exact 16-stage caller bytes from PR #7669. Their original PROVENANCE.md is preserved in source/7669-CREDITS.md. It credits the H5B work of SYLforge, DreamingOfClouds' joint native reconstructions, Clear1nsight's coefficient splitting, role-379 and helper work, Rohan Arun's signed caller lineage, and prior contributions from CubeJerry, Douglas Colkitt and others. The source/ directory holds the exact file bytes identified in SOURCE-PINS.json. + +The group-ring caller checker, independent operator checks, bit service, finite-cost method and field guide adapt the corresponding code and arguments of Ali Romman's PR #7663. That package in turn builds on the contributors named in its preserved source/7663-NOTICE. The unchanged directed log/exp gate retains its listed sources in source/gate-NOTICE. Earlier paid-transfer and bank-support constructions include PRs #7434 and #7576. Jerry Chen (CubeJerry) supplied the selected PRs #7000 and #7001 and the typed initializer in PR #7586. The per-call odd-grid induction and the selected application review provide the complete-root realization and finite-cost substitution. Douglas Colkitt and the credited repository authors supplied the pinned operator engines, price evaluator and research workflow. The license accompanies this package. diff --git a/research/banked-native-minimum-grid/predecessor/PIVOTS.json b/research/banked-native-minimum-grid/predecessor/PIVOTS.json new file mode 100644 index 0000000000..feede77664 --- /dev/null +++ b/research/banked-native-minimum-grid/predecessor/PIVOTS.json @@ -0,0 +1,17 @@ +[ + {"direction": "forward","remove": 99123,"pivot": 103275,"source_chart": 1031,"combination": [[103275,"10"],[103472,"-3"]],"sender": [[-1499,"1"]],"receiver": [[102595,"2"],[102596,"-11/2"],[102600,"-11/2"],[102604,"3/4"],[102624,"-5/2"],[102625,"-5/2"],[102744,"3/4"],[102745,"9/2"],[102885,"2"],[102891,"-1"],[102892,"-3/4"],[102952,"-1"],[102953,"-2"],[102954,"-1"],[102955,"2"],[103036,"1"],[103037,"2"],[103085,"-4"],[103086,"1"],[103270,"5/2"],[103432,"-3/4"],[103433,"9/2"]]}, + {"direction": "forward","remove": 97031,"pivot": 102748,"source_chart": 549,"combination": [[102748,"1"]],"sender": [[94976,"-1/2"],[96385,"-1/2"],[97049,"1"]],"receiver": [[103160,"1/2"]]}, + {"direction": "transpose","remove": 89622,"pivot": 88983,"source_chart": 318,"combination": [[88983,"1"]],"sender": [[97185,"2"],[97393,"1"]],"receiver": [[88940,"-1"],[88954,"1"],[88987,"-1"],[88989,"-1"],[89118,"1"],[96568,"-1"]]}, + {"direction": "transpose","remove": 89629,"pivot": 87777,"source_chart": 336,"combination": [[87777,"1/2"]],"sender": [[97386,"1"],[97405,"1/2"]],"receiver": [[87457,"1/2"],[87459,"-1/2"],[87747,"-1/2"],[87784,"-1/2"],[87820,"-1/2"],[90056,"1/2"]]}, + {"direction": "transpose","remove": 93636,"pivot": 87508,"source_chart": 412,"combination": [[87508,"1/2"]],"sender": [[96713,"1/2"],[97697,"1"]],"receiver": [[87510,"-1/2"],[87678,"1/2"],[87686,"-1/2"],[87704,"-1/2"],[87722,"-1/2"],[96707,"1/2"]]}, + {"direction": "transpose","remove": 99190,"pivot": 99169,"source_chart": 603,"combination": [[99169,"-1/4"]],"sender": [[99597,"1"]],"receiver": [[95743,"1/2"]]}, + {"direction": "forward","remove": 87508,"pivot": 96713,"source_chart": 3,"combination": [[96713,"1"]],"sender": [[-1117,"1"],[-1095,"1"],[-969,"1/2"],[-964,"-1/2"],[-935,"1/2"],[-908,"-1/2"]],"receiver": [[97628,"1/2"]]}, + {"direction": "forward","remove": 87777,"pivot": 97405,"source_chart": 3,"combination": [[97405,"2"]],"sender": [[-1474,"1"],[-1472,"4"],[-1471,"3/2"],[-1470,"2"],[-1450,"2"],[-1344,"2/3"],[-1341,"-1"],[-1329,"2"],[-1319,"-1"],[-1312,"1"],[-1308,"-1/2"],[-1288,"1/4"],[-1285,"-1/2"],[-1280,"-1/2"],[-1266,"-1/8"],[-1256,"-1/2"],[-1251,"1/2"],[-1250,"-1/4"],[-1249,"-1/2"],[-1246,"1/2"],[-1243,"-1/2"],[-1241,"1/4"],[-1239,"-1/2"],[-1237,"1"],[-1236,"1/2"],[-1235,"-1/2"],[-1234,"-1/2"],[-1230,"-1/2"],[-1229,"-1/2"],[-1228,"1/2"],[-1223,"-1/2"],[-1216,"-1"],[-1215,"-1"],[-1209,"-2"],[-1203,"-1"],[-1202,"-1"],[-1191,"1/4"],[-1189,"1/4"],[-1188,"1"],[-1185,"-1/2"],[-1177,"-1/2"],[-1176,"-1/2"],[-1173,"1"],[-1172,"-8"],[-1171,"2"],[-1114,"1/2"],[-1107,"1/2"],[-1106,"1/2"],[-1096,"-1/4"],[-1082,"2"],[-1080,"-1/4"],[-1075,"1/4"],[-1074,"1/4"],[-1071,"-1"],[-1069,"-1"],[-1066,"1"],[-1047,"-1"],[-1044,"2"],[-1043,"1/2"],[-1040,"1"],[-1038,"-1"],[-1036,"2"],[-1035,"1/2"],[-1033,"2"],[-1028,"-1"],[-1020,"-2"],[-1014,"-2"],[-1010,"2"],[-964,"-1"],[-958,"-1"],[-914,"-1/2"],[-908,"-1"],[-890,"-1"],[-813,"-1/4"],[-811,"4"],[-790,"-1"],[-757,"-2"],[-753,"1/2"],[-734,"-8"],[-733,"-4"],[-705,"5/2"],[-698,"1/4"],[-660,"-1/2"],[-656,"-1/4"],[-644,"-1/4"],[-642,"-1/4"],[-641,"1/8"],[-636,"-1/4"],[-625,"1/4"],[-620,"1/4"],[-618,"-1/4"],[-612,"-1/2"],[-610,"1/8"],[-609,"1/8"],[-600,"1/2"],[-591,"-1/4"],[-590,"-2"],[-588,"-1/4"],[-584,"-1/4"],[-583,"-1/4"],[-569,"1/2"],[-565,"1/2"],[-564,"1/2"],[-545,"7/2"],[-544,"4"],[-539,"1/2"],[-538,"-2"],[-537,"4"],[-532,"-2"],[-531,"1"],[-529,"7/4"],[-528,"2"],[-523,"-1"],[-518,"2"],[-513,"2"],[-512,"2"],[-498,"1/4"],[-497,"-1"],[-492,"2"],[-480,"1"],[-471,"1"],[-470,"1"],[-449,"2"],[-443,"-1/2"],[-442,"2"],[-441,"-2"],[-440,"-5/4"],[-435,"1/2"],[-430,"-8"],[-418,"-2"],[-415,"2"],[-400,"2"],[-384,"1"],[-364,"-1"],[-361,"2"],[-349,"1/2"],[-337,"3/2"],[-321,"-1/2"],[-320,"-1"],[-317,"3/4"],[-314,"2"],[-312,"1"],[-307,"1/2"],[-284,"3"],[-282,"-1"],[-281,"2"],[-277,"1/4"],[-273,"5/2"],[-269,"4"],[-265,"2"],[-258,"-1"],[-256,"-1/4"],[-237,"-3/2"],[-231,"2"],[-174,"1"],[-151,"1/2"],[-130,"1/2"],[-22,"-1"]],"receiver": [[97385,"-2"]]}, + {"direction": "forward","remove": 88983,"pivot": 97185,"source_chart": 3,"combination": [[97185,"1"]],"sender": [[-1046,"1"],[-1000,"1"],[-972,"1"],[-943,"-1"]],"receiver": [[97188,"-1"]]}, + {"direction": "transpose","remove": 89623,"pivot": 88940,"source_chart": 318,"combination": [[88940,"1"]],"sender": [[90092,"1"],[95202,"-1"]],"receiver": [[88954,"-1"],[89118,"-1"],[89639,"-1"],[90058,"1/2"],[96568,"1/2"]]}, + {"direction": "transpose","remove": 89630,"pivot": 87457,"source_chart": 336,"combination": [[87457,"-2"]],"sender": [[95049,"2"],[95162,"1"]],"receiver": [[87459,"2"],[87747,"2"],[90056,"-1"],[95094,"-1"]]}, + {"direction": "transpose","remove": 93637,"pivot": 87678,"source_chart": 412,"combination": [[87678,"-2"]],"sender": [[94756,"2"],[94777,"1"]],"receiver": [[87686,"2"],[87704,"2"],[94749,"-1"],[96707,"-1"]]}, + {"direction": "forward","remove": 87457,"pivot": 95049,"source_chart": 3,"combination": [[95049,"1"]],"sender": [[-1062,"1"],[-1019,"1"],[-974,"-1"],[-941,"1"]],"receiver": [[95052,"-1"]]}, + {"direction": "forward","remove": 87678,"pivot": 94756,"source_chart": 3,"combination": [[94756,"1/2"]],"sender": [[-1474,"1"],[-1473,"1/16"],[-1467,"1/4"],[-1344,"2/3"],[-1320,"-1/8"],[-1319,"-1/2"],[-1312,"-1/4"],[-1310,"-1/8"],[-1285,"-1/8"],[-1280,"-1/4"],[-1273,"1/2"],[-1266,"1/16"],[-1265,"-1/2"],[-1261,"-1/4"],[-1260,"1/2"],[-1257,"1/2"],[-1256,"-1/4"],[-1254,"1/4"],[-1250,"-1/4"],[-1249,"-1/2"],[-1248,"1/2"],[-1246,"1/2"],[-1245,"3/4"],[-1237,"-1/4"],[-1236,"1/4"],[-1235,"-1/2"],[-1234,"-1/2"],[-1231,"-1/8"],[-1230,"-1/4"],[-1229,"1/4"],[-1211,"-1/2"],[-1209,"1/2"],[-1204,"-1/2"],[-1200,"-1/4"],[-1199,"1/2"],[-1197,"-1/4"],[-1195,"-1/2"],[-1194,"-1/8"],[-1192,"1/4"],[-1189,"1/8"],[-1188,"1"],[-1187,"1/4"],[-1183,"-1/8"],[-1182,"-1/4"],[-1181,"-1/4"],[-1179,"-1/2"],[-1178,"-1/4"],[-1177,"-1/2"],[-1176,"-1/2"],[-1175,"1/4"],[-1174,"1/2"],[-1173,"-1"],[-1170,"-1/4"],[-1167,"-1/4"],[-1165,"1/2"],[-1162,"1"],[-1161,"1/2"],[-1145,"-1/2"],[-1143,"-1/2"],[-1140,"-1/2"],[-1129,"-1/8"],[-1127,"1/2"],[-1125,"1/2"],[-1123,"1/2"],[-1111,"-1/8"],[-1106,"-1/4"],[-1105,"-1/4"],[-1096,"-1/4"],[-1095,"-1/2"],[-1085,"1/8"],[-1078,"-1/2"],[-1073,"1/8"],[-1069,"-1/2"],[-1066,"1/4"],[-1063,"-1/2"],[-1059,"1/2"],[-1056,"1/2"],[-1049,"1/2"],[-1043,"-1/2"],[-1040,"1"],[-1034,"-1/4"],[-1033,"1/2"],[-1028,"-1"],[-1027,"-1/2"],[-1023,"-1/2"],[-1018,"1/2"],[-1012,"1/2"],[-1004,"1/8"],[-1000,"-1/4"],[-992,"-1/2"],[-988,"1/2"],[-985,"1/2"],[-984,"1/2"],[-983,"1/2"],[-982,"1/2"],[-981,"1/2"],[-976,"-1/2"],[-975,"-1/2"],[-974,"1/2"],[-973,"1/2"],[-972,"1/2"],[-969,"-1/2"],[-965,"-1/2"],[-964,"-1/2"],[-962,"-1/2"],[-958,"1/2"],[-957,"-1/2"],[-955,"-1/2"],[-946,"-1/2"],[-945,"-1/2"],[-944,"-1/2"],[-943,"1/2"],[-942,"1/2"],[-941,"1/2"],[-935,"1/2"],[-931,"-1/2"],[-929,"-1/2"],[-928,"-1"],[-927,"-1/2"],[-926,"-1/2"],[-923,"1/2"],[-922,"1/2"],[-921,"1/2"],[-920,"1/2"],[-919,"1/2"],[-917,"-1/2"],[-915,"1/2"],[-914,"-1/4"],[-913,"-1/2"],[-912,"-1/2"],[-908,"1/2"],[-907,"1/2"],[-905,"1/2"],[-904,"1/2"],[-903,"1"],[-901,"-1/2"],[-899,"1/2"],[-898,"-1/2"],[-897,"1/2"],[-896,"-1/2"],[-891,"1/2"],[-890,"-1/2"],[-888,"-1/2"],[-887,"-1/2"],[-883,"-1/2"],[-831,"1/2"],[-813,"1/4"],[-794,"-1/2"],[-761,"1/4"],[-733,"-4"],[-680,"-1/8"],[-665,"-1/2"],[-660,"-3/4"],[-656,"-1/4"],[-644,"-1/4"],[-642,"1/8"],[-641,"1/16"],[-636,"-1/4"],[-618,"1/8"],[-612,"1/4"],[-610,"-1/16"],[-593,"-1/8"],[-591,"1/8"],[-568,"1/4"],[-566,"1/8"],[-563,"-1/4"],[-562,"1/8"],[-561,"-1/2"],[-559,"1/2"],[-553,"-1/4"],[-552,"1/8"],[-551,"1/64"],[-548,"-1"],[-546,"1"],[-544,"-1/2"],[-540,"-1/2"],[-537,"1"],[-526,"-1/4"],[-524,"-1/4"],[-523,"1/2"],[-520,"-1/2"],[-519,"1/2"],[-514,"1/2"],[-509,"-1/2"],[-503,"1/4"],[-495,"1/2"],[-491,"-1/2"],[-485,"-1/16"],[-480,"-1"],[-471,"1"],[-470,"-1"],[-465,"-1/8"],[-462,"-1/4"],[-440,"-1/8"],[-429,"1/4"],[-419,"1/4"],[-408,"1/4"],[-405,"1/4"],[-365,"-1/4"],[-364,"-1"],[-361,"1/4"],[-357,"1/8"],[-355,"-1/16"],[-353,"1/8"],[-349,"1/2"],[-343,"-1/4"],[-335,"-1/16"],[-314,"1/2"],[-303,"1/16"],[-285,"-3/4"],[-284,"1"],[-282,"-1"],[-277,"1/4"],[-273,"1/4"],[-270,"1/8"],[-269,"4"],[-266,"1/128"],[-253,"1/64"],[-248,"-1/4"],[-244,"1/4"],[-243,"-1/4"],[-206,"-1/8"],[-174,"-1"],[-165,"1/4"],[-160,"-1/4"],[-4,"1/32"]],"receiver": []}, + {"direction": "transpose","remove": 90064,"pivot": 89639,"source_chart": 533,"combination": [[89639,"1"]],"sender": [[90844,"-1/2"],[98420,"1"],[98422,"1/2"]],"receiver": [[88940,"1"],[90095,"-1"]]} +] diff --git a/research/banked-native-minimum-grid/predecessor/PROOF.md b/research/banked-native-minimum-grid/predecessor/PROOF.md new file mode 100644 index 0000000000..7d6403f24d --- /dev/null +++ b/research/banked-native-minimum-grid/predecessor/PROOF.md @@ -0,0 +1,69 @@ +# A banked transfer circuit for the signed 16-stage caller + +Assume the native all-column, owned-storage, compiler, fixed-tape and analytic-recovery hypotheses of the selected record. The circuit below gives **κ ≥ 0.0037260455556** in that framework. The raw crossing is strictly between 0.00372604555571 and 0.00372604555572. The open parent gives a raw crossing below 0.0037218793484. The new contribution includes the changed complete invoice and a physical realization with new finite constants. [Selected application, sections 2–7](https://github.com/CrocSwap/integer-mult-bounds/blob/e54523517d0f03e58352e647c403a5af3e525a57/docs/research/pr-intake-evidence/pr7000-application/PROOF-REVIEW.md) · [Open parent](https://github.com/CrocSwap/integer-mult-bounds/pull/7669) + +## 1. Replace one incoming transfer + +Start with the exact 150,522-event word with SHA-256 `ee251f6005d2a92b887c5b804bd7aac05989d278b2c9ccb3c3091b50d533b08d`. It has 6,157 paid MOVEs. The source loader checks twelve replacement blocks, their preimages, and the hashes of the supplied predecessor and reconstructed word. [Source file pins](SOURCE-PINS.json) · [Source edits](source/source-edits.json) + +At chart A write the physical field as T_A z, with T_A the canonical Clifford of its ordered basis. At native multiplicity f use the f-fold tensor power and the identity on spectators. A local rational sum in one chart computes the same sum of the normalized signals z. A paid A→B edge applies T_B T_A⁻¹ and so leaves z invariant. For actual independent input x at chart E, z = T_E⁻¹ x is a coordinate in the proof. The machine receives x directly. + +Give each entrance field its own bank with token `~r` for input role r. Fold the original scalar operations at each chart into rational linear forms on these banks and the returned paid fields. At each original MOVE record its source form and its destination chart. Use its source event index as the token for its return. Retain the form at each public exit. INIT supplies a zero row and CLEAR retires the old local row. This gives a directed acyclic circuit from independent inputs to all terminal forms. The implementation below stores snapshots in fresh private fields. It can use an earlier result at its chart until its last consumer has returned. [Construction and scheduler](network.py) + +Take a paid token t received at B. Suppose the full set S of rows which read t consists of transfers from B to the same C. Let h_m be the normalized row sent by slot m in S. Write α_m for the coefficient of t in that local form. Choose coefficients γ_m, with unspecified entries zero, such that s = Σ γ_m α_m is nonzero. Choose j in S with γ_j nonzero and set Y = Σ γ_m h_m. The witness gives a local form W at another chart F and a local form D at C such that **W = Y + D** on all independent inputs. + +Delete t. Change slot j to send W from F to C. For every other m in S, send h′_m = h_m − (α_m/s)Y from B to C. The coefficient of t in h′_m is zero. At C recover Y = W − D. Every old value has a local expression there: + +```text +h_m = h′_m + (α_m/s)Y for m ≠ j +h_j = (α_j/s)Y − Σ_{m ≠ j} (γ_m/γ_j)h′_m +``` + +The second equality follows from Σγ_m(h_m − α_mY/s) = 0. Substitute these expressions in every subsequent read. Local availability matters on both sides of the replacement. The scheduler checks every donor’s destination chart against the consumer’s actual source chart, includes the terminal edges and constructs a topological order. A cycle rejects a candidate even when its unrestricted linear equations hold. Each successful replacement removes exactly one paid edge. + +For example, the first entry deletes slot 99123. It uses Y = 10h₁₀₃₂₇₅ − 3h₁₀₃₄₇₂. The sender at chart 1031 has the entrance value for independent role 1498. The 22 terms in the receiver list give exactly that value minus Y. Thus slot 103275 can send that one entrance field. The checker recomputes this identity over every input coefficient. Changing the sender sign fails that check. [All fifteen witnesses](PIVOTS.json) · [Exact rational checker](native.py) + +Seven steps use the forward circuit. Eight use its transpose. Transpose exchanges inputs and terminals, reverses the paid edges and reverses each scalar incidence with the same rational weight. Each input-to-output path has the same weight on its reversed path. Hence the new normalized map is the ordinary matrix transpose. Check the rational substitution in this direction and transpose back. The implementation executes only the final forward circuit. The schedule and the physical recipe for every forward pair are checked after construction. A search over possible senders and receiver spans nominated the witnesses. The finite checks use only the published witnesses and exact arithmetic. + +## 2. Check the native and complete signed operators + +The endpoint check evaluates the whole final circuit on 1,501 independent formal input fields. For each of 96 A ports its first pair returns (x,y+x) and its second pair returns (u−v,v) in normalized coordinates. At each of eight B ports the returned pair is (x−y,(x+y)/2). The 1,101 helper outputs each return their own normalized entrance value. Consequently a helper with actual endpoints E and G implements T_G T_E⁻¹ on its own arbitrary physical input. All helper endpoints, including the parent’s special starts and exits, have their actual positive job rank in the target census. + +For each paid or helper pair, construct the recipe for T_B T_A⁻¹. Direct binary span tests check containment and rank. A second engine checks signed Pauli action and absolute Gaussian phase. Equality of the Pauli action fixes a Clifford up to a scalar, and equality on the image of the zero-basis vector fixes that scalar. All 3,024 distinct pairs pass. For the ten distinct pairs at surviving slots with a new physical route, compare all 512 forward columns and all 512 adjoint columns directly. At all 104 main ports, check both rank-zero adapters and their phases. In the 96 second planes the two charts match the corresponding first-plane charts at both ends. This establishes the finite physical maps on nine axes. The retained native assumption supplies their uniform realization at multiplicity f. [Operator verifier](catalogue.py) + +Use the exact 4,192-event caller from the parent. Each of the 16 stages uses eight disjoint body axes and nine common axes, for actual ambient rank 137. Expand each of 68 formal roles over the Gaussian group ring with one head power modulo four and one formal power for each stage. The head and stage maps commute on the admitted layout. Replay every signed operation, including queries, idle operations, the LAMBDA mix and simultaneous butterfly reads. Each exit equals the declared positive body monomial on its original input owner. Replication on the real ports gives 3,536 root owners. Each stage has 400 distinct main owners and 1,101 independent fresh helpers. The latter supply 17,616 more targets. [Signed caller verifier](caller.py) · [Owner and invoice checks](verify.py) + +| Complete paid change | Rank 1 | Rank 2 | Rank 3 | Rank 4 | Total | +| --- | ---: | ---: | ---: | ---: | ---: | +| Per native invocation | −23 | +2 | +5 | +1 | −15 | +| Across all 16 invocations | −368 | +32 | +80 | +16 | −240 | + +All other paid counts agree with the parent. Every target count agrees. The weighted change at exponent one is zero. The complete positive rank-mass surplus is 1,328. At the desired exponent the distinct costs of ranks 1 through 4 give a strict saving. The verifier first reproduces both full parent histograms from its source and caller, then measures the changed graph. [Complete histograms and exact margins](RESULT.json) + +Let M(k) = Σᵣ(Tᵣ−Pᵣ)r^(1−k). The 256-bit power evaluator and the independent 80-decimal-place log/exp intervals put M above zero at 0.00372604555571 and below zero at 0.00372604555572. Its derivative is strictly negative on the required interval. At the application probe 0.00372604555567 the lower margin exceeds 1.66 × 10⁻⁸. The 1,920-fold product uses paid cutoff 11, target floor 12 and shift 1/7. The paid ratio is below 1−10⁻²⁷. The two tail ratios are below 31/32. The program checks separated compiler funding and the input lift, with written logarithm power 2,287, seven gaps of 10⁻¹⁴ and H = 14,558,800,000,000,000,000. It checks 54 strict and four functional outer predicates. The least margin is 10⁻¹⁵. The selected BIT saving of 0.00385248 supplies the weaker 0.00376669 required here. The proof uses claim 0.0037260455556 in the outer conclusion. [Interval gate](source/interval_gate.py) · [Selected BIT review](https://github.com/CrocSwap/integer-mult-bounds/blob/e54523517d0f03e58352e647c403a5af3e525a57/docs/research/pr-intake-evidence/pr7000-application/PROOF-REVIEW.md) + +## 3. Retain the complete root grid + +Scale the actual input arrays at each caller and each native entrance by 2,025. Divide their completed exits by 2,025 at the same boundary. This uses 2(3,536 + 16 × 1,501) = 55,104 full-array conversions. The native and caller entrance factors have separate physical charges. The native helper entrances can contain arbitrary values in the admitted root format. [Common-grid induction](https://github.com/CrocSwap/integer-mult-bounds/blob/e54523517d0f03e58352e647c403a5af3e525a57/research/odd-native-common-grid/PROOF.md) + +For each native row v, recursively bound its coefficient denominator by the least common multiple of b times its donor’s bound over incoming coefficients a/b in lowest terms. The least common multiple over all rows is 2,025 × 2¹⁸. On this grid the checker verifies 8,533,666 elementary coefficient products and their exact divisions before addition. A row contains the T_A T_E⁻¹ factor for input chart E on every contribution from that same input. These factors telescope around every normalized path. Partial sums in the specified row order have scaled coefficient mass at most 55,817,215,425/32. This bound uses the sum of absolute term masses before cancellation. The largest numerator or denominator needs 13 bits. + +The caller replay uses grid 2,025 × 2⁹. It checks 153,295 nontrivial pre-product divisions and every output on all signed monomials. Its scaled prefix mass is at most 495,734,175/2. Replicating a port duplicates a whole row on a distinct physical owner. In one unfinished context, a native row nested inside a caller row therefore has exterior denominator height at most 27 and mass at most 27,670,501,239,509,649,375/64 < 2⁵⁹. This also bounds an independent helper. Completed children contribute a whole Clifford factor and retain any exterior debt at their entrance. Banked earlier rows retain the bounds from their own prefixes. An interrupted ordinary SWAP has the temporary factor two of the selected proof and contains no recursive call. + +Take c = 2 max(27,59) = 118 and K* = 1,920 × 153¹⁹²⁰ × (H+1)². The bit length of cK* is 14,080, strictly less than H. The selected unfinished-depth estimate therefore gives ct < D at each recursive root of active dimension D and unfinished depth t. Its complete-factor Clifford row bound gives fractional width at most p + ceil(D/2) + 27t and magnitude bits below h+D+2. Use F = p+D fractional bits and signed width W = p+h+2D+3, with W+26 for fixed-coefficient products and the complete LAMBDA numerators. All 13-bit numerators fit in this reserve. Induction on the finite ideal instruction tree gives exact physical results in that same root format, including odd divisions, shifts and final unscalings. Process the selected initial and final phase layers, reserved row factors and final normalization at their original boundaries. Apply the single final truncation in the selected argument. This proof does not assume exact returns from a separately rounded descendant. [Root-width and boundary proof, sections 4–7](https://github.com/CrocSwap/integer-mult-bounds/blob/e54523517d0f03e58352e647c403a5af3e525a57/docs/research/pr-intake-evidence/pr7000-application/PROOF-REVIEW.md) + +## 4. Pay for the private snapshots and restoration + +Let n = 1,501 be the public width and k = 6,142 the number of positive transfers. Copy each entrance into one private snapshot. Reserve a separate source accumulator for each of k paid rows and n terminal rows. Reserve one returned snapshot for each paid row and four scratch fields for serial scalar operations. These 2n+2k+4 = 15,290 private homes are in addition to the actual public fields and adapter workspace. Give every home its stage and occurrence tag. Form a row in a fresh zero accumulator by exact scalar reads from prior snapshots at its chart. Keep each donor intact. A paid row gets its own complete child and both adapters. Move or copy the completed field to its return bank. Wait for the child and its adapters before the next dependent step. Keep all terminal accumulators separate until every output is available, install them on the public boundary, and erase the private homes in full. Scheme-wide native reservation is 244,640 full-field homes per raw signed caller. None earns productive credit. + +The selected shape and movement primitives provide one complete field view at a time. Use a typed guide with a left and a right marker on a separate track. For R rows, active dimension D and W signed component bits, its payload has L = (2W+3)R2ᴰ positions. At each position it carries the appropriate scientific zero symbol, including delimiters and represented blanks. Prepare the guide from R, D and W. A fixed-width component template can be duplicated once per address with a rewound source head. The total borrow travel of an ordinary binary address counter over m successive decrements is O(m). Thus guide production, alignment, return and retirement take O(L+1) plus descriptor setup. A separate immutable guide can serve equal views with the same format. The guide and bank origins have separate guards. + +On initialization the outward pass writes the guide’s designated symbol to each payload cell. On erasure it writes raw blank to every payload cell. It returns both heads without writes. After j outward steps the first j payload cells have their prescribed symbols, while the suffix and exterior guards retain their contents. Including departure, reversal and halt, the pass takes exactly 2L+3 transitions for arbitrary dirty data, including old internal blanks. Allocate the field with this extent before using it and retire its full backing. A small finite program can place K homes consecutively on fixed tapes. A selection, scan, return or installation within that occurrence then costs O(K(L+1)) on equal views. On a changed view charge its selected layout construction and the actual packed extent. K is fixed once the raw or compiled occurrence is fixed. Park the enclosing tuple before every recursive descent and retain the backing until its owner returns. This uses the selected view and compiler assumptions. The bound on local guide work covers the scan and return in addition to the choice of home. [Bit and reset service checks](physical.py) · [Earlier private-field construction](https://github.com/CrocSwap/integer-mult-bounds/blob/b81f40997de646de30749d367484d89e59fc3013/research/p104-joint-chart-banks/PROOF.md) + +For a fixed a/b, low-to-high multiplication on sign/magnitude has carry at most |a|. High-to-low division keeps a remainder less than b. The positional invariants of these two scans give the signed product and exact quotient for every admitted width. Check the remainder before installation. A ripple addition preserves the donor. Complete scalar movement includes sign handling, work fields, head returns and retirement. The selected bounded-scan implementation fits the allowance of 2²¹ transitions per padded component bit for these 13-bit constants. The replay also exercises 4,038 signed coefficient cases, including values over 64 bits, rejects an odd last tick, and checks guards and internal blanks in both reset modes. + +There are 169,343 local terms in the returned and terminal forms. Charge 32 scalar services per term, plus explicit per-row preparation and return, public copying and installation, field retirement, caller macros and conversions. The resulting bound per raw caller is 117,280,256 scalar services. The reset allowance of 11,816,384 covers two services per reserved native home and four more per term or row. Charge the actual extent at each use. The 276,944 monomial slots include both adapters per paid and productive occurrence, both main adapters, and the signed caller’s actual local routing. At most 4 × 154² elementary records per slot gives 26,272,015,616 total. Charge each record at the selected complete-volume rate, with actual setup and return. The constants and their formulas are in the replay. [Cost calculation](physical.py) · [Receipt](RESULT.json) + +Construct the finite chronological product, completion, splitting and integer compiler with the invoice in section 2. Let J count native occurrences and U count raw caller occurrences in this finite compiled template. Reserve at least 15,290J native homes, U caller query/normalizer tuples, guides, guards, suspended fields, and all compiler and primitive backing. Charge their initialization, selection, head returns and cleanup in G, including compiler wrappers and the source-specific BIT stock from the selected proof. Use the actual productive width Wp and this owned reserve O in the selected substitution Z=Wp+O, E0=64(Z+N+P+G+1)³, B0=P+E0, C0=32NB0². Include Wp in the row-divisibility stock and the simultaneous BIT and complex capacities in the packed layout. These finite substitutions increase the constant and the input threshold. All strict outer gaps have already been checked, so the selected asymptotic absorption argument applies after the constants are fixed. The numerical exponent concerns that asymptotic construction. The package gives no practical speed or memory improvement for ordinary integer multiplication. + +Independent review of this application remains open. Native all-column realization, owned allocation and erasure, compiler uniformity, fixed-tape precision and movement, and analytic recovery remain assumptions. The parent’s fixed-tariff, separately rounded program has different numerical and storage obligations. The exact finite checks and the proof above apply to the charged common-root implementation specified here. diff --git a/research/banked-native-minimum-grid/predecessor/RESULT.json b/research/banked-native-minimum-grid/predecessor/RESULT.json new file mode 100644 index 0000000000..11e0617c58 --- /dev/null +++ b/research/banked-native-minimum-grid/predecessor/RESULT.json @@ -0,0 +1,471 @@ +{ + "native": { + "grid": "530841600", + "odd": 2025, + "dyadic_height": 18, + "peak_scaled_mass": "55817215425/32", + "checked_products": 8533666, + "terms": 169343, + "slots": 6142, + "coefficient_bits": 13, + "public": 1501, + "mains": 400 + }, + "pivot_checks": 15, + "application": { + "claim": "0.0037260455556", + "parent_upper": "0.0037218793484", + "invoice": { + "contract": { + "ambient_rank": 137, + "boundary": "actual signed caller research candidate with 16 native calls", + "model": "mixed-target-unnormalized-power-v1", + "rank_semantics": "H_r costs r^(1-C); debit surrendered productive fields" + }, + "paid": { + "1": 63408, + "2": 14096, + "3": 9712, + "4": 3904, + "5": 5792, + "6": 1392, + "7": 176, + "8": 752, + "9": 96, + "16": 416, + "24": 416, + "32": 416, + "40": 416, + "48": 416, + "56": 416 + }, + "schema": "integer-mult-recursive-invoice/v1", + "targets": { + "1": 288, + "2": 336, + "3": 752, + "4": 3632, + "5": 1248, + "6": 704, + "7": 304, + "8": 512, + "9": 10256, + "17": 416, + "25": 416, + "33": 416, + "41": 416, + "49": 416, + "57": 416, + "65": 416, + "129": 208 + } + }, + "paid_change": { + "1": -368, + "2": 32, + "3": 80, + "4": 16 + }, + "parent_paid": 102064, + "paid": 101824, + "targets": 21152, + "signed_surplus": 1328, + "caller": { + "paid": { + "8": 640, + "9": 32, + "56": 416, + "48": 416, + "40": 416, + "32": 416, + "24": 416, + "16": 416, + "1": 384 + }, + "targets": { + "129": 208, + "65": 416, + "57": 416, + "49": 416, + "41": 416, + "33": 416, + "25": 416, + "17": 416, + "9": 416 + }, + "uses": { + "ADD": 92400, + "SCALE": 11728, + "IDLE_ONE": 3136, + "LAMBDA": 10672, + "IDLE_ODD": 32, + "SWAP": 240, + "QUERY": 384 + }, + "calls": 16, + "dyadic_height": 9, + "odd_scale": 2025, + "peak_scaled_mass": "495734175/2", + "exact_preproduct_divisions": 153295, + "root_owners": 3536, + "fresh_helpers": 17616 + }, + "stage_owners": [ + 400, + 400, + 400, + 400, + 400, + 400, + 400, + 400, + 400, + 400, + 400, + 400, + 400, + 400, + 400, + 400 + ], + "pivots": [ + [ + "forward", + 99123, + 103275, + 6156 + ], + [ + "forward", + 97031, + 102748, + 6155 + ], + [ + "transpose", + 89622, + 88983, + 6154 + ], + [ + "transpose", + 89629, + 87777, + 6153 + ], + [ + "transpose", + 93636, + 87508, + 6152 + ], + [ + "transpose", + 99190, + 99169, + 6151 + ], + [ + "forward", + 87508, + 96713, + 6150 + ], + [ + "forward", + 87777, + 97405, + 6149 + ], + [ + "forward", + 88983, + 97185, + 6148 + ], + [ + "transpose", + 89623, + 88940, + 6147 + ], + [ + "transpose", + 89630, + 87457, + 6146 + ], + [ + "transpose", + 93637, + 87678, + 6145 + ], + [ + "forward", + 87457, + 95049, + 6144 + ], + [ + "forward", + 87678, + 94756, + 6143 + ], + [ + "transpose", + 90064, + 89639, + 6142 + ] + ], + "powers": [ + [ + "0.0037218793483", + "lower", + { + "lower": "-115581413614341996474187058928191596648794056289072610410151828119639/3618502788666131106986593281521497120414687020801267626233049500247285301248", + "upper": "-231162827228683992948374117856383193297588112578145220820303649100105/7237005577332262213973186563042994240829374041602535252466099000494570602496" + } + ], + [ + "0.0037218793484", + "higher", + { + "lower": "25099189947401472581608269319475629675469453296780090483218745223129/7237005577332262213973186563042994240829374041602535252466099000494570602496", + "upper": "25099189947401472581608269319475629675469453296780090483218752144353/7237005577332262213973186563042994240829374041602535252466099000494570602496" + } + ], + [ + "0.0037260455556", + "higher", + { + "lower": "10676315656068772786401876040842803440271897926827976004135600820172706002715/7237005577332262213973186563042994240829374041602535252466099000494570602496", + "upper": "5338157828034386393200938020421401720135948963413988002067800410086356706747/3618502788666131106986593281521497120414687020801267626233049500247285301248" + } + ], + [ + "0.0037260455556", + "lower", + { + "lower": "-149975923487221802665958718531258228814033709673447697709475154677989/3618502788666131106986593281521497120414687020801267626233049500247285301248", + "upper": "-299951846974443605331917437062516457628067419346895395418950301937773/7237005577332262213973186563042994240829374041602535252466099000494570602496" + } + ], + [ + "0.00372604555567", + "lower", + { + "lower": "-60385823677098567459210685988678444302588290538654637231066475166033/3618502788666131106986593281521497120414687020801267626233049500247285301248", + "upper": "-60385823677098567459210685988678444302588290538654637231066471487679/3618502788666131106986593281521497120414687020801267626233049500247285301248" + } + ], + [ + "0.00372604555571", + "lower", + { + "lower": "-35904222376829088228416467236735442153112745723993098955519433949/14134776518227074636666380005943348126619871175004951664972849610340958208", + "upper": "-18382961856936493172949231225208546382393725810684466665225943092327/7237005577332262213973186563042994240829374041602535252466099000494570602496" + } + ], + [ + "0.00372604555572", + "higher", + { + "lower": "3607104758688023652523693795164294881085488895839601403897038418149/3618502788666131106986593281521497120414687020801267626233049500247285301248", + "upper": "7214209517376047305047387590328589762170977791679202807794084359101/7237005577332262213973186563042994240829374041602535252466099000494570602496" + } + ] + ], + "compiler": { + "claim": "9315113889/2500000000000", + "tested": "372604555567/100000000000000", + "raw_bracket": [ + "372604555571/100000000000000", + "93151138893/25000000000000" + ], + "moment_margins": { + "372604555571/100000000000000": [ + "15875835713837552291826628962232052841124379848542910598102864403499321/6250000000000000000000000000000000000000000000000000000000000000000000000000000", + "15875835713837552291826628962232052841124379848542910598102864405740439/6250000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "93151138893/25000000000000": [ + "-3115156469191304458068498827493552879195403033025021963016738010322167/3125000000000000000000000000000000000000000000000000000000000000000000000000000", + "-6230312938382608916136997654987105758390806066050043926033476018413129/6250000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "372604555567/100000000000000": [ + "52150215161363623842261144221150972839456016083329301170749375087135109/3125000000000000000000000000000000000000000000000000000000000000000000000000000", + "52150215161363623842261144221150972839456016083329301170749375088240387/3125000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "moment_margin_float": { + "372604555571/100000000000000": [ + 2.5401337142140085e-09, + 2.5401337142140085e-09 + ], + "93151138893/25000000000000": [ + -9.968500701412173e-10, + -9.968500701412173e-10 + ], + "372604555567/100000000000000": [ + 1.668806885163636e-08, + 1.668806885163636e-08 + ] + }, + "derivative_upper": -348613.3290464958, + "alpha": [ + 0.9999999999999382, + 0.9999999999999382 + ], + "gamma": [ + 0.9334323771155476, + 0.9334323771155476 + ], + "delta": [ + 0.9322377190117992, + 0.9322377190117992 + ], + "minimum_log_power": 2286, + "written_log_power": 2287, + "compiler_gap": "1/100000000000000", + "H": "14558800000000000000", + "BIT_pin": "376669/100000000", + "BIT_margin": "4064444433/100000000000000", + "outer": { + "strict_count": 54, + "functional_count": 4, + "minimum_margin": "1/1000000000000000", + "BIT_just_below_effective_rejected": true + }, + "input_lift": { + "margins": { + "9315113889/2500000000000": [ + "12700427118191787467959187764741998320358523764062379104098810847051285503909/10000000000000000000000000000000000000000000000000000000000000000000000000000000", + "127004271181917874679591877647419983203585237640623791040988108470512855041029/100000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "372604555567/100000000000000": [ + "25400854236839944168811969910073971827943612210810061720852213229284472466403/20000000000000000000000000000000000000000000000000000000000000000000000000000000", + "63502135592099860422029924775184929569859030527025154302130533073211181166981/50000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "interval_kappa_cap": "376669/100000000", + "derivative_upper_on_required_interval": "-2299831290525933154178526076272396899996972093654613095735772838275432653960006518819/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "source_BIT_wide_crude_bound_would_be": "-2299831290525933154178526076272396899996972093654613095735772838275432653960006518819/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + } + }, + "physical": { + "odd_conversions": 55104, + "coefficient_bits": 13, + "scalar_test_cases": 4038, + "raw_private_homes": 244640, + "homes_per_native": 15290, + "reset_services_upper": 11816384, + "scalar_services_upper": 117280256, + "scalar_steps_per_bit_upper": 2097152, + "monomial_slots_upper": 276944, + "elementary_records_upper": 26272015616, + "dyadic_height": 27, + "context_mass_upper": "27670501239509649375/64", + "context_mass_bits": 59, + "context_c": 118, + "depth_guard_bits": 14080, + "H": 14558800000000000000 + } + }, + "catalogue": [ + { + "slice": 0, + "total": 3024, + "checked": 504, + "columns": [ + [ + 3, + 318 + ], + [ + 3, + 533 + ], + [ + 3, + 571 + ], + [ + 3, + 720 + ], + [ + 3, + 744 + ], + [ + 549, + 127 + ] + ], + "ports": 104, + "recipes_sha256": "85397b3c3c825fdcdc1c0f9645de09b68d94de993162b88f5f8e9df86353f76e" + }, + { + "slice": 1, + "total": 3024, + "checked": 504, + "columns": [ + [ + 3, + 603 + ] + ], + "ports": 0, + "recipes_sha256": "a0ddba81d51e13c08ed992bc41745162fcfc5e7a783ecd2cfb53629aaa6a0844" + }, + { + "slice": 2, + "total": 3024, + "checked": 504, + "columns": [ + [ + 1031, + 127 + ] + ], + "ports": 0, + "recipes_sha256": "3add2c15ba2c35e006eaba30aef64b1123ed321f8ff0cf896e7f41e3c86751b9" + }, + { + "slice": 3, + "total": 3024, + "checked": 504, + "columns": [ + [ + 3, + 521 + ] + ], + "ports": 0, + "recipes_sha256": "62117424de94d6fd37bbd00f2a086ed91d98b25c209e95caa0a2c80fc8e6dbd7" + }, + { + "slice": 4, + "total": 3024, + "checked": 504, + "columns": [ + [ + 3, + 717 + ] + ], + "ports": 0, + "recipes_sha256": "f2a265277d90114f5a3b905a118644b3cc29f31dd5ed7392ed8c8f444745de37" + }, + { + "slice": 5, + "total": 3024, + "checked": 504, + "columns": [], + "ports": 0, + "recipes_sha256": "342b912d277c857cd2be7ad744c550c3981a59518570895c6079ce8eac0e2a6a" + } + ] +} diff --git a/research/banked-native-minimum-grid/predecessor/SOURCE-PINS.json b/research/banked-native-minimum-grid/predecessor/SOURCE-PINS.json new file mode 100644 index 0000000000..489f8a60e9 --- /dev/null +++ b/research/banked-native-minimum-grid/predecessor/SOURCE-PINS.json @@ -0,0 +1,58 @@ +[ + { + "file": "source/K372-2-WORD.json.gz", + "commit": "eaef5d1580e5761feaed09262b964871f3e5f553", + "path": "research/ee251f60-composition/data/K372-2-WORD.json.gz", + "sha256": "631babeca90e78c5caac713484fe618328b9beee8294baef6ac45ffc9a75dd3b", + "git_blob": "1273c83178693e1627a2324680907f9b0e95e995" + }, + { + "file": "source/source-edits.json", + "commit": "eaef5d1580e5761feaed09262b964871f3e5f553", + "path": "research/ee251f60-composition/EDIT.json", + "sha256": "05b84f9578fddc7adc7805f20afdfe5ea679d298b2232d7f718193185f471656", + "git_blob": "23368c8750e6d981ee10664187c6a2c3859be542" + }, + { + "file": "source/caller.json.gz", + "commit": "eaef5d1580e5761feaed09262b964871f3e5f553", + "path": "research/ee251f60-composition/data/CALLER.json.gz", + "sha256": "d889996a337f648087208ab51c98eaf052705d4fca88b5d01b6e9257a829897a", + "git_blob": "26a75a1ae32cb4944a65281cfb08775967cb39a0" + }, + { + "file": "source/parent-invoice.json", + "commit": "eaef5d1580e5761feaed09262b964871f3e5f553", + "path": "research/ee251f60-composition/data/INVOICE.json", + "sha256": "c79d8c51ad34c7c14134c41d3ae132ab91101e8e24674b52a2abfa191de3fd00", + "git_blob": "4cfe4f0fe98a820153cac58747dd80fb2a2402e6" + }, + { + "file": "source/7669-CREDITS.md", + "commit": "eaef5d1580e5761feaed09262b964871f3e5f553", + "path": "research/ee251f60-composition/PROVENANCE.md", + "sha256": "706c6c852e87e371ddf1828244b2f0c2b00279728818023aa911c8947d69ab83", + "git_blob": "bbee2437f012c3268eb5cd920adfa37394c1de72" + }, + { + "file": "source/interval_gate.py", + "commit": "b81f40997de646de30749d367484d89e59fc3013", + "path": "research/p104-joint-chart-banks/source/interval_gate.py", + "sha256": "60a743d13f668ef86db4b8215b4d5d04430a671ba6f1fe06d9c1c4c3dfe86da5", + "git_blob": "e24dc46079b4c25152f5afc096dda2ce8ee58ff5" + }, + { + "file": "source/gate-NOTICE", + "commit": "b81f40997de646de30749d367484d89e59fc3013", + "path": "research/p104-joint-chart-banks/source/independent-NOTICE", + "sha256": "cadbc642ca84311d2c7a6cf704c7828cb4cf77e3c784b66e4c6e8a5c28002fb8", + "git_blob": "1bc9b4da2b8398954cd7a49356eb9d397785d0a6" + }, + { + "file": "source/7663-NOTICE", + "commit": "b81f40997de646de30749d367484d89e59fc3013", + "path": "research/p104-joint-chart-banks/NOTICE", + "sha256": "5fd4367578d2339fbdcd7dc116b6c12cb4fa72e92d2e3d67be537a36c8bd9d40", + "git_blob": "6ce1bc49a3612c9e906df02de81bcba84be8e803" + } +] diff --git a/research/banked-native-minimum-grid/predecessor/native.py b/research/banked-native-minimum-grid/predecessor/native.py new file mode 100644 index 0000000000..3e09f65fe3 --- /dev/null +++ b/research/banked-native-minimum-grid/predecessor/native.py @@ -0,0 +1,132 @@ +"""Check exact rational signals, all endpoints, and the common integer grid.""" +from fractions import Fraction +from math import lcm +from pathlib import Path +import sys + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +from network import add_scaled, coefficients, fold, main_roles, need, pivot, read, source_word + + +def grid(net, order): + denominators = {~r: 1 for r in range(len(net.initial))} + common = 1 + for node in order: + bound = 1 + for donor, factor in net.forms[node].items(): + bound = lcm(bound, denominators[donor] * factor.denominator) + denominators[node] = bound + common = lcm(common, bound) + return common + + +def evaluate(net, requested=None): + order = net.schedule() + if requested is not None: + active = set(requested) + for k in reversed(order): + if k in active: + active.update(net.forms[k]) + order = [k for k in order if k in active] + unit = grid(net, order) + values = {~r: {r: unit} for r in range(len(net.initial))} + mass = {~r: unit for r in range(len(net.initial))} + peak = unit + work = 0 + for k in order: + row = {} + bound = 0 + for donor, factor in sorted(net.forms[k].items()): + a, b = factor.numerator, factor.denominator + bound += abs(a) * mass[donor] // b + for i, value in values[donor].items(): + quotient, remainder = divmod(a * value, b) + need(remainder == 0, "native term left the grid") + new = row.get(i, 0) + quotient + if new: + row[i] = new + else: + row.pop(i, None) + work += len(values[donor]) + peak = max(peak, bound) + values[k] = row + mass[k] = sum(map(abs, row.values())) + return unit, values, peak, work + + +def expected(word, unit): + n = word["public"] + out = [{r: unit} for r in range(n)] + hosted = word["hosted"] + a_ports = set(hosted["Dports"]) + for j, x in enumerate(word["live"]): + y = x + 112 + if j in a_ports: + out[y][x] = unit + else: + need(unit % 2 == 0, "butterfly half") + out[x][y] = -unit + out[y] = {x: unit // 2, y: unit // 2} + for x, y in zip(hosted["X2"], hosted["Y2"], strict=True): + out[x][y] = -unit + return out + + +def check_endpoints(net, word): + unit, rows, peak, terms = evaluate(net) + targets = expected(word, unit) + need([rows[net.first_output + r] for r in range(len(targets))] == targets, "native output matrix") + power = (unit & -unit).bit_length() - 1 + numerator_bits = max(abs(c.numerator).bit_length() for row in net.forms.values() for c in row.values()) + denominator_bits = max(c.denominator.bit_length() for row in net.forms.values() for c in row.values()) + return dict(grid=str(unit), odd=unit >> power, dyadic_height=power, peak_scaled_mass=str(Fraction(peak, 1 << power)), + checked_products=terms, terms=sum(map(len, net.forms.values())), slots=len(net.moves), + coefficient_bits=max(numerator_bits, denominator_bits), public=len(targets), mains=len(main_roles(word))) + + +def verify_pivot(net, edit): + combo = coefficients(edit["combination"]) + source = coefficients(edit["sender"]) + side = coefficients(edit["receiver"]) + _, values, _, _ = evaluate(net, combo.keys() | source.keys() | side.keys()) + target = {} + for m, a in combo.items(): + add_scaled(target, values[m], a) + for m, a in side.items(): + add_scaled(target, values[m], a) + got = {} + for m, a in source.items(): + add_scaled(got, values[m], a) + need(target == got, "saved signal identity") + + +def check_pivots(): + word = source_word() + net = fold(word) + edits = read(HERE / "PIVOTS.json") + checked = 0 + for i, edit in enumerate(edits): + if edit["direction"] == "transpose": + net = net.transpose() + verify_pivot(net, edit) + if i == 0: + donor, weight = edit["sender"][0] + corrupted = dict(edit, sender=[[donor, str(-Fraction(weight))], *edit["sender"][1:]]) + try: + verify_pivot(net, corrupted) + except ValueError as exc: + need(str(exc) == "saved signal identity", "sender sign control reason") + else: + raise ValueError("incorrect sender sign accepted") + checked += 1 + net = pivot(net, edit) + if edit["direction"] == "transpose": + net = net.transpose() + return checked + + +if __name__ == "__main__": + checked = check_pivots() + need(checked == read(HERE / "RESULT.json")["pivot_checks"], "pivot coverage") + print("PASS_EXACT_PIVOTS", checked) diff --git a/research/banked-native-minimum-grid/predecessor/network.py b/research/banked-native-minimum-grid/predecessor/network.py new file mode 100644 index 0000000000..0ebc1925c4 --- /dev/null +++ b/research/banked-native-minimum-grid/predecessor/network.py @@ -0,0 +1,217 @@ +"""Construct the communication circuit and apply the rational pivots.""" +from dataclasses import dataclass +from fractions import Fraction +from functools import cache +from graphlib import TopologicalSorter +from hashlib import sha1, sha256 +from pathlib import Path +import gzip +import json + +HERE = Path(__file__).resolve().parent +PARENT = "ee251f6005d2a92b887c5b804bd7aac05989d278b2c9ccb3c3091b50d533b08d" + + +def need(condition, message): + if not condition: + 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 path.suffix == ".gz" else raw) + + +def source_word(): + for pin in read(HERE / "SOURCE-PINS.json"): + raw = (HERE / pin["file"]).read_bytes() + need(sha256(raw).hexdigest() == pin["sha256"], "source SHA-256") + need(sha1(f"blob {len(raw)}\0".encode() + raw).hexdigest() == pin["git_blob"], "source Git blob") + base = read(HERE / "source/K372-2-WORD.json.gz") + patch = read(HERE / "source/source-edits.json") + need(sha256(encoded(base)).hexdigest() == patch["source"], "source edit origin") + result = [] + cursor = 0 + for edit in patch["edits"]: + start, stop = edit["start"], edit["stop"] + need(cursor <= start <= stop <= len(base["program"]), "source edit range") + need(base["program"][start:stop] == edit["before"], "source edit preimage") + result.extend(base["program"][cursor:start]) + result.extend(edit["after"]) + cursor = stop + result.extend(base["program"][cursor:]) + word = dict(base, program=result) + need(sha256(encoded(word)).hexdigest() == patch["candidate"] == PARENT, "parent word") + return word + + +def main_roles(word): + h = word["hosted"] + return set(word["live"]) | {i + 112 for i in word["live"]} | set(h["X2"]) | set(h["Y2"]) + + +@cache +def rational(literal): + return Fraction(literal) + + +def add_scaled(row, donor, factor): + for index, value in donor.items(): + new = row.get(index, 0) + factor * value + if new: + row[index] = new + else: + row.pop(index, None) + + +@dataclass +class Network: + first_output: int + initial: list + final: list + moves: dict + forms: dict + + def schedule(self): + for node, form in self.forms.items(): + chart = self.moves[node][0] if node < self.first_output else self.final[node - self.first_output] + for donor in form: + if donor < 0: + need(0 <= ~donor < len(self.initial), "input owner") + donor_chart = self.initial[~donor] + else: + need(donor in self.moves, "missing donor") + donor_chart = self.moves[donor][1] + need(donor_chart == chart, "nonlocal scalar") + need(set(self.forms) == self.moves.keys() | set(range(self.first_output, self.first_output + len(self.final))), + "output inventory") + dependencies = {node: sorted(i for i in self.forms[node] if i >= 0) for node in sorted(self.forms)} + return list(TopologicalSorter(dependencies).static_order()) + + def transpose(self): + def reverse(node): + if node < 0: + return self.first_output + ~node + if node >= self.first_output: + return ~(node - self.first_output) + return node + + edges = {k: {} for k in self.moves} + edges.update({self.first_output + r: {} for r in range(len(self.initial))}) + for node, form in self.forms.items(): + for donor, coefficient in form.items(): + edges[reverse(donor)][reverse(node)] = coefficient + moves = {k: (b, a) for k, (a, b) in self.moves.items()} + return Network(self.first_output, self.final, self.initial, moves, edges) + + +def fold(word): + n = word["public"] + rows = [{~r: 1} for r in range(n)] + [None] * word["owned_fields"] + charts = word["initial"][:] + [None] * word["owned_fields"] + forms, moves = {}, {} + for clock, event in enumerate(word["program"]): + op, r = event[:2] + if op == "INIT": + need(r >= n and rows[r] is None, "private birth") + rows[r], charts[r] = {}, event[2] + continue + need(rows[r] is not None, "inactive register") + if op == "MOVE": + _, _, a, b, owned = event + need(charts[r] == a and owned == (r >= n), "original transfer") + moves[clock], forms[clock] = (a, b), rows[r] + rows[r], charts[r] = {clock: 1}, b + else: + need(charts[r] == event[-1], "original scalar chart") + if op == "CLEAR": + need(r >= n, "public retirement") + rows[r], charts[r] = None, None + elif op == "SCALE": + rows[r] = {k: v * rational(event[2]) for k, v in rows[r].items()} + else: + need(op == "ADD" and event[2] != r and charts[event[2]] == charts[r], "original donor") + add_scaled(rows[r], rows[event[2]], rational(event[3])) + need(charts[:n] == word["final"] and all(f is None for f in charts[n:]), "original exit") + first = len(word["program"]) + forms.update({first + r: rows[r] for r in range(n)}) + return Network(first, word["initial"], word["final"], moves, forms) + + +def coefficients(entries): + result = {k: rational(v) for k, v in entries} + need(len(entries) == len(result) and all(result.values()), "sparse coefficient list") + return result + + +def pivot(net, edit): + drop, lead = edit["remove"], edit["pivot"] + combination = coefficients(edit["combination"]) + sender = coefficients(edit["sender"]) + side = coefficients(edit["receiver"]) + need(lead in combination and drop in net.moves and lead in net.moves, "pivot slots") + _, middle = net.moves[drop] + old, destination = net.moves[lead] + uses = {m: row[drop] for m, row in net.forms.items() if drop in row} + need(old == middle and combination.keys() <= uses.keys(), "pivot combination") + need(all(net.moves.get(m) == (middle, destination) for m in uses), "shared destination") + aggregate = {} + for m, weight in combination.items(): + add_scaled(aggregate, net.forms[m], weight) + response = aggregate.get(drop, 0) + need(response, "zero pivot response") + + forms = net.forms.copy() + del forms[drop] + forms[lead] = sender + for m, weight in uses.items(): + if m != lead: + residual = net.forms[m].copy() + add_scaled(residual, aggregate, -Fraction(weight, response)) + need(drop not in residual, "uncancelled transfer") + forms[m] = residual + + combined = {lead: 1} + add_scaled(combined, side, -1) + recovered = {} + for m, weight in uses.items(): + if m == lead: + row = {k: -v / combination[lead] for k, v in combination.items() if k != lead} + else: + row = {m: 1} + add_scaled(row, combined, Fraction(weight, response)) + recovered[m] = row + for k, row in list(forms.items()): + affected = row.keys() & recovered.keys() + if affected: + new = {i: v for i, v in row.items() if i not in affected} + for i in affected: + add_scaled(new, recovered[i], row[i]) + forms[k] = new + moves = net.moves.copy() + del moves[drop] + moves[lead] = (edit["source_chart"], destination) + return Network(net.first_output, net.initial, net.final, moves, forms) + + +def networks(word): + parent = fold(word) + net = parent + receipts = [] + for edit in read(HERE / "PIVOTS.json"): + direction = edit["direction"] + need(direction in ("forward", "transpose"), "pivot direction") + if direction == "transpose": + net = net.transpose() + before = len(net.moves) + net = pivot(net, edit) + if direction == "transpose": + net = net.transpose() + net.schedule() + need(len(net.moves) == before - 1, "paid slot count") + receipts.append([direction, edit["remove"], edit["pivot"], len(net.moves)]) + return parent, net, receipts diff --git a/research/banked-native-minimum-grid/predecessor/source/7663-NOTICE b/research/banked-native-minimum-grid/predecessor/source/7663-NOTICE new file mode 100644 index 0000000000..6ce1bc49a3 --- /dev/null +++ b/research/banked-native-minimum-grid/predecessor/source/7663-NOTICE @@ -0,0 +1,7 @@ +Apache-2.0. Ali Romman with substantial OpenAI Codex assistance. + +The new material is the joint chart assignment, its source-bound operator and caller checks, and the fresh-cost complete-root scalar and private-bank specialization. The parent data are from Clear1nsight's PR #7660 on DreamingOfClouds' PRs #7658 and #7641 and SYLforge's PR #7637. The contributors credited in those sources retain their credit. Original notices are in source/parent-NOTICE, source/physical-NOTICE and source/word-NOTICE. + +Rohan Arun supplied the 17-stage signed caller in PR #7113. The unmodified interval gate and the exact caller data come from its pinned source. See source/caller-NOTICE and source/independent-NOTICE, and the source file inventory for all consumed bytes. The two operator engines and integer power evaluator come from the declared current-main inputs. + +Jerry Chen (CubeJerry) supplied selected PRs #7000 and #7001. The selected application and its phase, common-root, finite-cost and compiler arguments, the odd-native common-grid package, the prior typed six-Gamma reset of PR #7586 and the contributors credited in those records provided the foundations used here. PR #7661 independently derives the fixed caller residuals. PR #7662 supplies a rounded parent-clock alternative. This package uses neither implementation. diff --git a/research/banked-native-minimum-grid/predecessor/source/7669-CREDITS.md b/research/banked-native-minimum-grid/predecessor/source/7669-CREDITS.md new file mode 100644 index 0000000000..bbee2437f0 --- /dev/null +++ b/research/banked-native-minimum-grid/predecessor/source/7669-CREDITS.md @@ -0,0 +1,43 @@ +# Provenance, credit and scope + +This is a cumulative contribution. Thank you to everyone who has made their constructions, exact inputs, failure cases and careful reviews available. Those contributions made this composition possible; the small increment here should not obscure the much larger body of work it rests on. We aim to leave equally inspectable material for the next researcher. + +## Direct lineage and reused methods + +- **SYLforge, #7637:** the H5B frame-restored233-CLEAR construction is the published ancestor of this research. The present K372-2 source retains its descendants rather than starting a new independent construction. [PR7637](https://github.com/CrocSwap/integer-mult-bounds/pull/7637). +- **DreamingOfClouds, #7641 and #7658:** #7641 combines20 edits over #7637. #7658 supplies the large-neighbourhood construction and its exact joint hub reconstruction: helper360/537 SWAP-NULL relabel, main176 bypass, helper236 contact re-chart, helper370 last-stay removal and helper461 first-stay removal. The source explicitly credits its #7630/#7636 relabel lineage and #7634 swap law. Our source descends from this word; those gains are not claimed as new work here. [PR7641](https://github.com/CrocSwap/integer-mult-bounds/pull/7641), [PR7658](https://github.com/CrocSwap/integer-mult-bounds/pull/7658). +- **Clear1nsight:** the contact re-chart type from #7612 and the24-bit coefficient-splitting report are part of the construction's lineage. #7626 contributed source isolation/portable materialization, and #7631/#7633 are credited by the parent lineage. #7660 separately published the role379 shortcut already present in our source; we do not count its rediscovery as another improvement. [PR7612](https://github.com/CrocSwap/integer-mult-bounds/pull/7612), [coefficient report](https://github.com/CrocSwap/integer-mult-bounds/discussions/7111#discussioncomment-19691406), [PR7660](https://github.com/CrocSwap/integer-mult-bounds/pull/7660). +- **ToikY, #7643:** the contact re-chart work is explicitly credited by #7658 alongside Clear1nsight's #7612. Its74-erasure contract and κ are not added to this candidate. No shared CI repair is copied by this PR. [PR7643](https://github.com/CrocSwap/integer-mult-bounds/pull/7643). +- **Rohan Arun, #7113:** the signed caller/accounting lineage underlies the actual16-call composition. Its original source commit is07a76c5e2738882c0cb322278e56f6cae3c9885d. We recount the literal16-call input here; we do not substitute historical17-call constants. [PR7113](https://github.com/CrocSwap/integer-mult-bounds/pull/7113). +- **Ali Romman and upstream contributors:** #7605 supplies an earlier exact protected/application checkpoint cited by the #7637 lineage. The two unmodified directed invoice comparison files are copied from canonical upstream base e54523517d0f03e58352e647c403a5af3e525a57, retaining their attribution and Apache-2.0 headers. Their arithmetic is not a full scientific acceptance gate. [PR7605](https://github.com/CrocSwap/integer-mult-bounds/pull/7605). +- **CubeJerry, Douglas Colkitt and the earlier source contributors:** the retained framework, primitive/service work and repository infrastructure form part of the inherited basis. This package does not claim that their open supplier obligations are resolved by a successful finite replay. + +## What this contribution adds + +The predecessor K372-2 supplies five EARLY edits (1188,1013,940,1141,1195, with940/1141 sharing one ADD). This construction recomputes the1517/770 bypass on that actual source and combined it with a three-field triangle repair. The new contribution is their compatible composition, exact12-block edit, final235 CLEAR witnesses and a small reproducible publication package. Substantial OpenAI Codex assistance was used for research and packaging. New work is Apache-2.0. + +Exact source canonical:3dd1199d95291ee96e6c0aeb6f55f86244a569b1d4975840bf0207e2dcf9c025. Exact candidate canonical:ee251f6005d2a92b887c5b804bd7aac05989d278b2c9ccb3c3091b50d533b08d. Byte hashes are in MANIFEST.json. The12 edit blocks specify every changed event and leave all other fields unchanged. The parent research generators are not silently imported; this publication uses the transparent exact edit as its deterministic reconstruction recipe. + +## Related work, not automatically incorporated + +Ali Romman's #7662 studies one half-ADD rounding-error propagation with CubeJerry's service contract. Nick Petalas's #7654 provides a scoped minimal-rank interpolation result used as background when assessing structural repairs. Neither is a substitute for this candidate's entire rounded caller or physical supply proof. Their actual domains and assumptions must be checked before application. [PR7662](https://github.com/CrocSwap/integer-mult-bounds/pull/7662), [PR7654](https://github.com/CrocSwap/integer-mult-bounds/pull/7654). + +At the publication checkpoint, upstream main remained e54523517d0f03e58352e647c403a5af3e525a57. Ali Romman's #7663 uses a separate17-call full-private-bank model and changed helper endpoints; Clear1nsight's #7664 concerns180erasures/17calls; #7666 charges bank selection and return without claiming a new κ. K372-4 is later, separate research with changed helper-boundary conditions. None is silently folded into ee251f60 or used to assert identical physical assumptions. This is not a claim to the greatest bound across all models. + +## Fresh versus reused evidence + +Publication replay freshly reconstructs the whole word, runs exact rows/CLEAR, recounts native/caller histograms and checks the four directed price points. Normal, optimized Python and a Git-free committed-byte export were tested. The recorded ordinary/precision/native-phase/owner evidence retains its narrower scope and original source identifiers; it is not advertised as freshly rerun. No selected record, frozen predecessor package or common verifier is changed. + +## Editorial normalization of publication labels + +The follow-up editorial commit replaces workstation labels with construction terminology. It changes no candidate, edit, certificate, invoice, numeric result, executable code or contributor attribution. The original recorded bytes remain retrievable at commit `95d476623f1468822057554475dc8badb19bfa44`. Evidence JSON field labels and descriptive scopes are normalized, not recomputed scientific results. In NATIVE-EVIDENCE-REUSE.json, `predecessor-receipt:K372-2/NATIVE-NEW.json` is a historical receipt identifier, not a packaged file path. In PRICE-SUMMARY.json, recorded command invoice arguments now use the equivalent packaged `data/INVOICE.json` path; this is a portability transcription, not the verbatim original command. The fresh replay constructs and runs its own package-relative command. MANIFEST.json authenticates the edited publication bytes. + +Evidence byte-custody mapping (original -> editorially normalized SHA-256): + +- `evidence/BUILD.json`: `4744201691120223ded62a3e0d55ea1029203f3ea996305163e7db8d9e3679a4` -> `a0bafbb3f44920ed6ac1ed3d83385f025f5bbbcf5e9c8013ab1ca55ccf23c32d`. + +- `evidence/NATIVE-EVIDENCE-REUSE.json`: `6615b8a051ac9e4d8c73b5decf8a70d2a33d14da0c4c369574dec946984aa351` -> `84bab14d5c584aa8853b8e1025b562541ac6657e458d120ec803f2bc149c3eb8`. + +- `evidence/ROLE770-BUILD.json`: `c4ee72317678791d4b801479df0af052f3a50662c11ce3f3393b2151368fc92d` -> `1c400f16efbc427c40c811a57dc656fe97c2c84f94c71529e2c5c0598b146369`. + +- `evidence/PRICE-SUMMARY.json`: `c2777382c677634f7017b68c55dbd831a40945b77057f26b738f857c17ee8759` -> `d13741fe3217a01edd0b79b40dad037e644e441fbbc300838df99c0b050a5f42`. diff --git a/research/banked-native-minimum-grid/predecessor/source/K372-2-WORD.json.gz b/research/banked-native-minimum-grid/predecessor/source/K372-2-WORD.json.gz new file mode 100644 index 0000000000..1273c83178 Binary files /dev/null and b/research/banked-native-minimum-grid/predecessor/source/K372-2-WORD.json.gz differ diff --git a/research/banked-native-minimum-grid/predecessor/source/caller.json.gz b/research/banked-native-minimum-grid/predecessor/source/caller.json.gz new file mode 100644 index 0000000000..26a75a1ae3 Binary files /dev/null and b/research/banked-native-minimum-grid/predecessor/source/caller.json.gz differ diff --git a/research/banked-native-minimum-grid/predecessor/source/gate-NOTICE b/research/banked-native-minimum-grid/predecessor/source/gate-NOTICE new file mode 100644 index 0000000000..1bc9b4da2b --- /dev/null +++ b/research/banked-native-minimum-grid/predecessor/source/gate-NOTICE @@ -0,0 +1,13 @@ +# Attribution and source reuse + +New independent operator/invoice verification and fixed-grid interval implementation: OpenAI Codex-assisted research session, 2026-11-10. Apache-2.0. + +DreamingOfClouds supplied the #6936 native predecessor and #6937 shared-wire backup/E-free root. CubeJerry supplied #6912 caller blocks, #6980's QUERY-only caller and #6970/#6985 precision methods. Preserve Ali Romman's #5599 helper-split attribution, icekylinx's #104 odd-grid attribution and unpaidmoon's #6930 width-phase attribution in the parent construction. + +Three unchanged source files are authenticated by exact SHA256 and source commit/path in `INDEPENDENT-SOURCES.json`: + +- #6970 `independent_bounds.py`: fixed integer-grid and positive caller-transfer engine. +- #6985 `envelopes.py`: positive forward envelopes and backward covector witnesses. +- #6985 `source_binding.py`: retained helper functions for the envelope engine. + +The adapter applies only two literal helper-census substitutions in memory and records them. It does not call that adaptation an independent mathematical implementation. The new reverse native operator, formal caller ring and elementary interval engine do not import the source authors' operator or invoice checkers. diff --git a/research/banked-native-minimum-grid/predecessor/source/interval_gate.py b/research/banked-native-minimum-grid/predecessor/source/interval_gate.py new file mode 100644 index 0000000000..e24dc46079 --- /dev/null +++ b/research/banked-native-minimum-grid/predecessor/source/interval_gate.py @@ -0,0 +1,128 @@ +#!/usr/bin/env python3 +"""Independent certified fixed-grid intervals (80 decimal places). +ln via 2 atanh after binary range reduction; exp(-x) via alternating +Taylor brackets. Uses only integer floor/ceiling, not Decimal transcendents. +""" +from fractions import Fraction as F +from functools import lru_cache +from pathlib import Path +import json,argparse +if not __debug__: raise RuntimeError('Run without -O; assertions are proof checks.') +B=10**80 + +def ceildiv(a,b):return -((-a)//b) +def exact(q): + q=F(q);return q.numerator*B//q.denominator,ceildiv(q.numerator*B,q.denominator) +def add(a,b):return a[0]+b[0],a[1]+b[1] +def sub(a,b):return a[0]-b[1],a[1]-b[0] +def mul(a,b): + p=[a[i]*b[j] for i in (0,1) for j in (0,1)];return min(p)//B,ceildiv(max(p),B) +def div(a,b): + assert b[0]>0 + p=[F(a[i]*B,b[j]) for i in (0,1) for j in (0,1)] + return min(p).__floor__(),max(p).__ceil__() +def smul(a,q):return mul(a,exact(q)) +def atanh_log(y): + yi=exact(y);yy=mul(yi,yi);p=yi;s=(0,0) + for j in range(100):s=add(s,smul(p,F(2,2*j+1)));p=mul(p,yy) + # 0 <= tail <= 2 y^201/[201(1-y^2)] < 3*(1/3)^201. + return s[0],s[1]+ceildiv(3*B,3**201) +@lru_cache(None) +def log(r): + assert r>=1 + k=r.bit_length()-1;y=F(r-2**k,r+2**k) + a=atanh_log(y);b=atanh_log(F(1,3));return add(a,smul(b,k)) +def expminus(x): + assert 0<=x[0]<=x[1]0 and margins[str(hi)][1]<0 and margins[str(tested)][0]>0 + target=moment(T,tested);paid=moment(P,tested) + alpha=div(paid,target) + # Tail exponent = 1-tested+1/7; argument exp may not be negative. + # r^(1-tested+1/7)=r^(1-tested)* exp(log(r)/7). + def exppos(x): + assert 0<=x[0]<=x[1]0 and gap.numerator==1;step=gap.denominator + wins=lambda j:(step*j+1)**written<2**j + l,h=1,2 + while not wins(h):l,h=h,2*h + while h-l>1: + m=(l+h)//2 + if wins(m):h=m + else:l=m + assert wins(h) and not wins(h-1) + # Monotonicity: upper derivative bound on [0, cap]. + derivative=(0,0) + for rr in T.keys()|P.keys(): + c=T.get(rr,0)-P.get(rr,0);r=int(rr) + term=mul(power(r,cap if c>=0 else 0),log(r));derivative=add(derivative,smul(term,-c)) + assert derivative[1]<0 + result=dict(claim=str(claim),tested=str(tested),raw_bracket=[str(lo),str(hi)],moment_margins={k:show(v) for k,v in margins.items()},moment_margin_float={k:value(v) for k,v in margins.items()},derivative_upper=float(F(derivative[1],B)),alpha=value(alpha),gamma=value(gamma),delta=value(delta),minimum_log_power=lp,written_log_power=written,compiler_gap=str(gap),H=str(step*h),BIT_pin=str(cap),BIT_margin=str(cap-tested)) + # Outer formulas evaluated independently after algebraically substituting + # b=k+5g,a=k+4g,q=k+3g,epsilon=1-g,beta=1-3g. + k=claim;g=gap;b=k+5*g;a=k+4*g;q=k+3*g;ep=1-g;be=1-3*g;r0=g/10;stop=layout=g + sig=1-b;tau=1-a;internal=tau+(1-stop)*max(sig-tau,0);leaf=sig+stop*(1-sig);lam=1-(q+a)/2;xi=ep*(1+q)-F(3,32)+layout;key=be+1-ep + M=[ep*q,a,1-ep+q*be,1-ep+a*be,1-ep+be,F(3,32)+xi-ep,xi+F(1,2)-ep,ep,1-(ep+be+48-128+2)] + checks=[cap-a,b-a,q,b-q,a-q,stop,1-stop,(1-stop)*b-a,1-internal-q,1-leaf-q,lam-tau,lam-sig,lam-internal,1-q-lam,1-q-leaf,ep,1-ep,xi-F(1,2),ep-xi,be,ep-be,1-be,1-(2*xi-2)-r0-be,1-(2*xi-2)-be,1-ep-r0,1-ep,r0,1-key,1-be-2*(1-ep),128-48-be,layout,ep-a,F(1,32)-b,F(2**45-7**16),F(2),2-xi,F(5),1-be,1-be,1-ep,M[2]-M[0],g,k-F('.001730970419199163702738'),1-ep,F(11,2)]+[x-k for x in M] + functional=[1-be,be*(1-F(3,1000)),128-48-ep-be-1,be*(1-F(1,250))] + assert len(checks)==54 and len(functional)==4 and min(checks+functional)>0 + result['outer']=dict(strict_count=54,functional_count=4,minimum_margin=str(min(checks+functional)),BIT_just_below_effective_rejected=(a-F(1,10**12))-a<0) + # Input-lift is only needed on [1-tested_complex,1]. A stronger BIT + # pin is irrelevant to this interval; the source's crude BIT-wide bound + # is not imported beyond its valid range. + pos={7:1,3:1,5:1};neg={9:1,4:1,1:2};d1=(0,0);curvature=(0,0) + for hist,sign in ((pos,1),(neg,-1)): + for r,c in hist.items(): + d1=add(d1,smul(log(r),sign*c*r)) + curvature=add(curvature,smul(mul(log(r),log(r)),c*r)) + lift_cap=cap if cap<=F('.00376669') else tested + assert tested<=lift_cap and F(d1[1],B)+lift_cap*F(curvature[1],B)<0 + lifts={} + for price in (claim,tested): + lift=sub(moment(pos,price),moment(neg,price));assert lift[0]>0 + assert price*(-F(d1[1],B))-price*price*F(curvature[1],B)/2>0 + lifts[str(price)]=show(lift) + result['input_lift']=dict(margins=lifts,interval_kappa_cap=str(lift_cap),derivative_upper_on_required_interval=str(F(d1[1],B)+lift_cap*F(curvature[1],B)),source_BIT_wide_crude_bound_would_be=str(F(d1[1],B)+cap*F(curvature[1],B))) + return result +if __name__=='__main__': + p=argparse.ArgumentParser();p.add_argument('audit');p.add_argument('--claim',default='.00362852408');p.add_argument('--tested',default='.00362852408007');p.add_argument('--lower',default='.00362852408398727978896072723289');p.add_argument('--upper',default='.00362852408398727978896072723290');p.add_argument('--out',required=True);p.add_argument('--bit-pin',default='.00376669');a=p.parse_args() + r=gate(json.loads(Path(a.audit).read_text())['invoice'],a.claim,a.tested,a.lower,a.upper,a.bit_pin);Path(a.out).write_text(json.dumps(r,indent=2)+'\n');print(json.dumps(r,indent=2)) diff --git a/research/banked-native-minimum-grid/predecessor/source/parent-invoice.json b/research/banked-native-minimum-grid/predecessor/source/parent-invoice.json new file mode 100644 index 0000000000..4cfe4f0fe9 --- /dev/null +++ b/research/banked-native-minimum-grid/predecessor/source/parent-invoice.json @@ -0,0 +1 @@ +{"contract":{"ambient_rank":137,"boundary":"actual signed caller research candidate with 16 native calls","model":"mixed-target-unnormalized-power-v1","rank_semantics":"H_r costs r^(1-C); debit surrendered productive fields"},"paid":{"1":63776,"16":416,"2":14064,"24":416,"3":9632,"32":416,"4":3888,"40":416,"48":416,"5":5792,"56":416,"6":1392,"7":176,"8":752,"9":96},"schema":"integer-mult-recursive-invoice/v1","targets":{"1":288,"129":208,"17":416,"2":336,"25":416,"3":752,"33":416,"4":3632,"41":416,"49":416,"5":1248,"57":416,"6":704,"65":416,"7":304,"8":512,"9":10256}} \ No newline at end of file diff --git a/research/banked-native-minimum-grid/predecessor/source/source-edits.json b/research/banked-native-minimum-grid/predecessor/source/source-edits.json new file mode 100644 index 0000000000..23368c8750 --- /dev/null +++ b/research/banked-native-minimum-grid/predecessor/source/source-edits.json @@ -0,0 +1,979 @@ +{ + "schema": "source-bound-exact-event-edit/v1", + "source": "3dd1199d95291ee96e6c0aeb6f55f86244a569b1d4975840bf0207e2dcf9c025", + "candidate": "ee251f6005d2a92b887c5b804bd7aac05989d278b2c9ccb3c3091b50d533b08d", + "unchanged_headers": true, + "edits": [ + { + "start": 0, + "stop": 0, + "before": [], + "after": [ + [ + "ADD", + 112, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 113, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 114, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 116, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 117, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 118, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 119, + 607, + "1/2", + 3 + ], + [ + "ADD", + 120, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 122, + 607, + "1/2", + 3 + ], + [ + "ADD", + 123, + 607, + "1/2", + 3 + ], + [ + "ADD", + 137, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 138, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 139, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 140, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 141, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 142, + 607, + "-1", + 3 + ], + [ + "ADD", + 169, + 607, + "1/2", + 3 + ], + [ + "ADD", + 170, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 171, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 172, + 607, + "-1", + 3 + ], + [ + "ADD", + 173, + 607, + "1/4", + 3 + ], + [ + "ADD", + 174, + 607, + "1/2", + 3 + ], + [ + "ADD", + 175, + 607, + "1/2", + 3 + ], + [ + "ADD", + 176, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 177, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 178, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 179, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 180, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 181, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 182, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 183, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 184, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 185, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 186, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 187, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 191, + 607, + "1/2", + 3 + ], + [ + "ADD", + 192, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 193, + 607, + "1/2", + 3 + ], + [ + "ADD", + 194, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 195, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 196, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 198, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 199, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 200, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 201, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 202, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 203, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 204, + 607, + "1/2", + 3 + ], + [ + "ADD", + 206, + 607, + "1/2", + 3 + ], + [ + "ADD", + 207, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 208, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 209, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 228, + 607, + "1/4", + 3 + ], + [ + "ADD", + 236, + 607, + "1/4", + 3 + ], + [ + "ADD", + 255, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 272, + 607, + "1/4", + 3 + ], + [ + "ADD", + 279, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 306, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 311, + 607, + "-1", + 3 + ], + [ + "ADD", + 313, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 316, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 336, + 607, + "1/4", + 3 + ], + [ + "ADD", + 347, + 607, + "1/4", + 3 + ], + [ + "ADD", + 351, + 607, + "1/4", + 3 + ], + [ + "ADD", + 436, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 437, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 438, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 439, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 522, + 607, + "1", + 3 + ], + [ + "ADD", + 530, + 607, + "1", + 3 + ], + [ + "ADD", + 536, + 607, + "1/4", + 3 + ], + [ + "ADD", + 599, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 600, + 607, + "1/4", + 3 + ], + [ + "ADD", + 609, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 611, + 607, + "1/4", + 3 + ], + [ + "ADD", + 617, + 607, + "1/4", + 3 + ], + [ + "ADD", + 625, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 627, + 607, + "1/4", + 3 + ], + [ + "ADD", + 635, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 640, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 655, + 607, + "1/4", + 3 + ], + [ + "ADD", + 697, + 607, + "-1/4", + 3 + ], + [ + "ADD", + 752, + 607, + "17/8", + 3 + ], + [ + "ADD", + 812, + 607, + "1/2", + 3 + ], + [ + "ADD", + 1079, + 607, + "1/2", + 3 + ], + [ + "ADD", + 1122, + 607, + "-1", + 3 + ], + [ + "ADD", + 1176, + 607, + "-1/4", + 3 + ], + [ + "ADD", + 1228, + 607, + "1/8", + 3 + ], + [ + "ADD", + 1233, + 607, + "1/8", + 3 + ], + [ + "ADD", + 1234, + 607, + "1/4", + 3 + ], + [ + "ADD", + 1255, + 607, + "1/4", + 3 + ], + [ + "ADD", + 1265, + 607, + "-1/2", + 3 + ], + [ + "ADD", + 1279, + 607, + "1/8", + 3 + ], + [ + "ADD", + 1331, + 607, + "-1/2", + 3 + ] + ] + }, + { + "start": 87321, + "stop": 87321, + "before": [], + "after": [ + [ + "INIT", + 1551, + 115 + ], + [ + "ADD", + 1551, + 770, + "1", + 115 + ] + ] + }, + { + "start": 96905, + "stop": 96905, + "before": [], + "after": [ + [ + "ADD", + 1279, + 1551, + "-1", + 115 + ] + ] + }, + { + "start": 96959, + "stop": 96961, + "before": [ + [ + "MOVE", + 1517, + 549, + 115, + true + ], + [ + "ADD", + 1517, + 1518, + "1/4", + 115 + ] + ], + "after": [ + [ + "MOVE", + 1517, + 549, + 593, + true + ] + ] + }, + { + "start": 96963, + "stop": 96964, + "before": [ + [ + "MOVE", + 1517, + 115, + 593, + true + ] + ], + "after": [] + }, + { + "start": 97747, + "stop": 97749, + "before": [ + [ + "MOVE", + 236, + 265, + 751, + false + ], + [ + "ADD", + 544, + 236, + "-2", + 751 + ] + ], + "after": [ + [ + "ADD", + 236, + 1000, + "1/4", + 265 + ], + [ + "ADD", + 1000, + 236, + "-2", + 265 + ], + [ + "MOVE", + 236, + 265, + 927, + false + ] + ] + }, + { + "start": 97750, + "stop": 97750, + "before": [], + "after": [ + [ + "ADD", + 544, + 1000, + "1/2", + 751 + ] + ] + }, + { + "start": 97751, + "stop": 97752, + "before": [ + [ + "ADD", + 236, + 1000, + "1/4", + 751 + ] + ], + "after": [] + }, + { + "start": 97753, + "stop": 97753, + "before": [], + "after": [ + [ + "ADD", + 544, + 236, + "-1", + 927 + ], + [ + "ADD", + 236, + 544, + "1/2", + 927 + ] + ] + }, + { + "start": 99687, + "stop": 99687, + "before": [], + "after": [ + [ + "ADD", + 614, + 1551, + "1", + 115 + ] + ] + }, + { + "start": 100116, + "stop": 100117, + "before": [ + [ + "MOVE", + 236, + 751, + 127, + false + ] + ], + "after": [ + [ + "MOVE", + 236, + 927, + 127, + false + ] + ] + }, + { + "start": 150409, + "stop": 150409, + "before": [], + "after": [ + [ + "ADD", + 278, + 770, + "1/2", + 127 + ], + [ + "ADD", + 566, + 770, + "1", + 127 + ], + [ + "ADD", + 567, + 770, + "1/2", + 127 + ], + [ + "ADD", + 612, + 770, + "1", + 127 + ], + [ + "ADD", + 613, + 770, + "1", + 127 + ], + [ + "ADD", + 614, + 770, + "1", + 127 + ], + [ + "ADD", + 1078, + 770, + "1/2", + 127 + ], + [ + "ADD", + 1204, + 770, + "-1/4", + 127 + ], + [ + "ADD", + 1259, + 770, + "-1/4", + 127 + ], + [ + "ADD", + 1280, + 770, + "1", + 127 + ], + [ + "ADD", + 1368, + 770, + "1", + 127 + ], + [ + "ADD", + 1374, + 770, + "2", + 127 + ], + [ + "SCALE", + 770, + "-1", + 127 + ], + [ + "CLEAR", + 1551, + 115 + ] + ] + } + ] +} diff --git a/research/banked-native-minimum-grid/verify.py b/research/banked-native-minimum-grid/verify.py new file mode 100644 index 0000000000..fe92761f79 --- /dev/null +++ b/research/banked-native-minimum-grid/verify.py @@ -0,0 +1,204 @@ +#!/usr/bin/env python3 +"""Certify minimum scalar grids of the pinned banked native DAG. + +Ali Romman, with substantial OpenAI Codex assistance. Apache-2.0. +""" +from fractions import Fraction +from hashlib import sha1, sha256 +from math import gcd, lcm +from pathlib import Path +import json +import sys + +ROOT = Path(__file__).resolve().parent +PRIMES = (2, 3, 5) + + +def require(ok, message): + if not ok: + raise ValueError(message) + + +def sources(): + record = json.loads((ROOT/'PREDECESSOR.json').read_text()) + for pin in record['files']: + raw = (ROOT/'predecessor'/pin['path']).read_bytes() + require(len(raw) == pin['bytes'] and sha256(raw).hexdigest() == pin['sha256'], 'predecessor bytes') + require(sha1(f'blob {len(raw)}\0'.encode()+raw).hexdigest() == pin['git_blob'], 'predecessor Git blob') + sys.path.insert(0, str(ROOT/'predecessor')) + import network + word = network.source_word() + parent, net, edits = network.networks(word) + require(len(edits) == 15 and len(parent.moves) == 6157 and len(net.moves) == 6142, 'source graph') + return word, net + + +def vprime(value, prime): + exponent = 0 + while value % prime == 0: + value //= prime + exponent += 1 + return exponent + + +def recursive_bound(net, order): + bounds = {~r: 1 for r in range(len(net.initial))} + grid = 1 + for node in order: + bounds[node] = lcm(*(bounds[donor]*q.denominator for donor, q in net.forms[node].items())) + grid = lcm(grid, bounds[node]) + return grid + + +def lower_witnesses(old, new, coefficient, info, grid, witnesses): + if old == new: + return + for prime in PRIMES: + if vprime(new, prime) < vprime(old, prime): + q = Fraction(coefficient, grid) + witnesses[str(prime)] = {**info, 'coefficient': str(q), 'denominator': q.denominator} + + +def integer_trace(net, order, grid, collect): + values = {~r: {r: grid} for r in range(len(net.initial))} + product_gcd = snapshot_gcd = grid + product_witnesses, snapshot_witnesses = {}, {} + products = 0 + for node in order: + row = {} + for donor, factor in sorted(net.forms[node].items()): + for owner, value in values[donor].items(): + term, remainder = divmod(factor.numerator*value, factor.denominator) + require(remainder == 0, 'nonintegral literal scalar product') + if collect: + new = gcd(product_gcd, term) + lower_witnesses(product_gcd, new, term, + {'node': node, 'donor': donor, 'input': owner, 'factor': str(factor)}, + grid, product_witnesses) + product_gcd = new + total = row.get(owner, 0)+term + if total: + row[owner] = total + else: + row.pop(owner, None) + products += 1 + if collect: + for owner, value in row.items(): + new = gcd(snapshot_gcd, value) + lower_witnesses(snapshot_gcd, new, value, {'node': node, 'input': owner}, + grid, snapshot_witnesses) + snapshot_gcd = new + values[node] = row + return values, {'products': products, 'snapshot_rows': len(order), + 'minimum_product_grid': grid//product_gcd, + 'minimum_snapshot_grid': grid//snapshot_gcd, + 'product_witnesses': product_witnesses, + 'snapshot_witnesses': snapshot_witnesses} + + +def endpoints(word, net, rows, grid): + expected = [{r: grid} for r in range(word['public'])] + for port, x in enumerate(word['live']): + y = x+112 + if port in word['hosted']['Dports']: + expected[y] = {x: grid, y: grid} + else: + expected[x] = {x: grid, y: -grid} + expected[y] = {x: grid//2, y: grid//2} + for x, y in zip(word['hosted']['X2'], word['hosted']['Y2'], strict=True): + expected[x] = {x: grid, y: -grid} + require([rows[net.first_output+r] for r in range(word['public'])] == expected, 'public endpoint rows') + + +def fraction_columns(net, order, data): + # This pass evaluates only the four named basis inputs, without integer scaling. + witnesses = [('product', v) for v in data['product_witnesses'].values()] + witnesses += [('snapshot', v) for v in data['snapshot_witnesses'].values()] + owners = sorted({v['input'] for _, v in witnesses}) + observed = {} + for owner in owners: + values = {~r: Fraction(int(r == owner)) for r in range(len(net.initial))} + for node in order: + total = Fraction(0) + for donor, factor in sorted(net.forms[node].items()): + term = factor*values[donor] + for kind, w in witnesses: + if kind == 'product' and w['input'] == owner and w['node'] == node and w['donor'] == donor: + require(str(term) == w['coefficient'] and str(factor) == w['factor'], 'rational product witness') + observed[(kind, w['node'], owner)] = term + total += term + values[node] = total + for kind, w in witnesses: + if kind == 'snapshot' and w['input'] == owner and w['node'] == node: + require(str(total) == w['coefficient'], 'rational snapshot witness') + observed[(kind, node, owner)] = total + require(len(observed) == 6, 'rational witness coverage') + return owners + + +def first_failure(net, order, owner, grid): + values = {~r: grid*int(r == owner) for r in range(len(net.initial))} + for node in order: + total = 0 + for donor, factor in sorted(net.forms[node].items()): + numerator = factor.numerator*values[donor] + term, remainder = divmod(numerator, factor.denominator) + if remainder: + return {'node': node, 'donor': donor, 'input': owner, 'grid': grid, + 'numerator': numerator, 'divisor': factor.denominator, 'remainder': remainder} + total += term + values[node] = total + raise ValueError('understated grid unexpectedly completed') + + +def sharpness(net, order, data): + product_grid = data['minimum_product_grid'] + snapshot_grid = data['minimum_snapshot_grid'] + failures = [] + for prime in PRIMES: + w = data['product_witnesses'][str(prime)] + require((Fraction(w['coefficient'])*(product_grid//prime)).denominator > 1, + 'product prime-factor sharpness') + failures.append(first_failure(net, order, w['input'], product_grid//prime)) + w = data['snapshot_witnesses'][str(prime)] + require((Fraction(w['coefficient'])*(snapshot_grid//prime)).denominator > 1, + 'snapshot prime-factor sharpness') + for prime in (2, 5): + w = data['product_witnesses'][str(prime)] + require((Fraction(w['coefficient'])*snapshot_grid).denominator > 1, + 'snapshot grid cannot hold a product') + failures.append(first_failure(net, order, w['input'], snapshot_grid)) + return {'prime_factor_product_failures': failures[:3], + 'snapshot_grid_product_failures': failures[3:], + 'snapshot_prime_factor_controls': 3, 'negative_controls': 8} + + +def verify(): + word, net = sources() + order = net.schedule() + upper = recursive_bound(net, order) + retained = json.loads((ROOT/'predecessor/RESULT.json').read_text())['native'] + require(upper == int(retained['grid']) == 530841600, 'source sufficient grid') + rows, data = integer_trace(net, order, upper, True) + endpoints(word, net, rows, upper) + require(data['products'] == retained['checked_products'] == 8533666, 'complete product coverage') + require(data['minimum_product_grid'] == 225*2**12 and data['minimum_snapshot_grid'] == 45*2**9, + 'minimum grids') + smaller, replay = integer_trace(net, order, data['minimum_product_grid'], False) + require(replay['products'] == data['products'], 'minimum-grid replay coverage') + scale = upper//data['minimum_product_grid'] + require(all(row == {i: value*scale for i, value in smaller[node].items()} + for node, row in rows.items()), 'every row agrees under rescaling') + endpoints(word, net, smaller, data['minimum_product_grid']) + owners = fraction_columns(net, order, data) + result = {'status': 'PASS_BANKED_NATIVE_MINIMUM_GRID', 'source_sufficient_grid': upper, + **data, 'minimum_grid_exact_replay_products': replay['products'], + 'public_rows_checked': len(net.initial), 'fraction_basis_inputs': owners, + 'sharpness': sharpness(net, order, data), + 'scope': 'Normalized rational scalar DAG; physical Clifford and recursive-root precision remain separate.'} + require(json.loads((ROOT/'RESULT.json').read_text()) == result, 'retained audit receipt') + return result + + +if __name__ == '__main__': + print(json.dumps(verify(), indent=2, sort_keys=True))