diff --git a/research/banked-native-order-lower-bound/.gitattributes b/research/banked-native-order-lower-bound/.gitattributes new file mode 100644 index 0000000000..130a3ecaa2 --- /dev/null +++ b/research/banked-native-order-lower-bound/.gitattributes @@ -0,0 +1 @@ +retained/** -text whitespace=cr-at-eol diff --git a/research/banked-native-order-lower-bound/CERTIFICATE.json b/research/banked-native-order-lower-bound/CERTIFICATE.json new file mode 100644 index 0000000000..8cc9152001 --- /dev/null +++ b/research/banked-native-order-lower-bound/CERTIFICATE.json @@ -0,0 +1,466 @@ +{ + "anchor": 88772, + "owners": [ + -738, + -1366, + -1374, + -1381, + -1386, + -1393, + -1398, + -1425, + -1431, + -1449, + 88495, + 88492, + 88499, + 88543, + 88503, + 88501, + 88505, + 88553, + 88547, + 88549, + 88467, + 88465, + 88761, + 88765 + ], + "basis": [ + -738, + -1366, + -1374, + -1381, + -1386, + -1393, + -1398, + -1425, + -1431, + -1449, + 88495, + 88492, + 88499, + 88543, + 88547, + 88549, + 88467, + 88465, + 88761 + ], + "relations": [ + { + "dependent": 88503, + "coefficients": [ + [ + 88495, + "-1" + ], + [ + 88503, + "1" + ] + ] + }, + { + "dependent": 88501, + "coefficients": [ + [ + 88492, + "-1" + ], + [ + 88501, + "1" + ] + ] + }, + { + "dependent": 88505, + "coefficients": [ + [ + 88499, + "-1" + ], + [ + 88505, + "1" + ] + ] + }, + { + "dependent": 88553, + "coefficients": [ + [ + 88543, + "-1" + ], + [ + 88553, + "1" + ] + ] + }, + { + "dependent": 88765, + "coefficients": [ + [ + 88465, + "-2" + ], + [ + 88467, + "-1" + ], + [ + 88492, + "1" + ], + [ + 88495, + "-2" + ], + [ + 88499, + "2" + ], + [ + 88543, + "1" + ], + [ + 88547, + "2" + ], + [ + 88549, + "-1" + ], + [ + 88761, + "-1" + ], + [ + 88765, + "1" + ] + ] + } + ], + "paths": [ + { + "owner": -738, + "birth_path": [], + "use": 102985, + "future_path": [ + 88772, + 95566, + 102985 + ] + }, + { + "owner": -1366, + "birth_path": [], + "use": 103116, + "future_path": [ + 88772, + 88781, + 88802, + 103116 + ] + }, + { + "owner": -1374, + "birth_path": [], + "use": 102640, + "future_path": [ + 88772, + 88781, + 88802, + 102640 + ] + }, + { + "owner": -1381, + "birth_path": [], + "use": 103029, + "future_path": [ + 88772, + 88781, + 88802, + 103029 + ] + }, + { + "owner": -1386, + "birth_path": [], + "use": 103116, + "future_path": [ + 88772, + 88781, + 88802, + 103116 + ] + }, + { + "owner": -1393, + "birth_path": [], + "use": 102640, + "future_path": [ + 88772, + 88781, + 88802, + 102640 + ] + }, + { + "owner": -1398, + "birth_path": [], + "use": 98041, + "future_path": [ + 88772, + 88781, + 88802, + 98041 + ] + }, + { + "owner": -1425, + "birth_path": [], + "use": 102611, + "future_path": [ + 88772, + 88781, + 90990, + 102611 + ] + }, + { + "owner": -1431, + "birth_path": [], + "use": 102607, + "future_path": [ + 88772, + 88794, + 98391, + 102607 + ] + }, + { + "owner": -1449, + "birth_path": [], + "use": 98041, + "future_path": [ + 88772, + 88781, + 88802, + 98041 + ] + }, + { + "owner": 88495, + "birth_path": [ + 88495, + 88503, + 88765, + 88772 + ], + "use": 90990, + "future_path": [ + 88772, + 88781, + 90990 + ] + }, + { + "owner": 88492, + "birth_path": [ + 88492, + 88501, + 88765, + 88772 + ], + "use": 98391, + "future_path": [ + 88772, + 88794, + 98391 + ] + }, + { + "owner": 88499, + "birth_path": [ + 88499, + 88505, + 88765, + 88772 + ], + "use": 99589, + "future_path": [ + 88772, + 88796, + 99589 + ] + }, + { + "owner": 88543, + "birth_path": [ + 88543, + 88553, + 88765, + 88772 + ], + "use": 88788, + "future_path": [ + 88772, + 88784, + 88788 + ] + }, + { + "owner": 88503, + "birth_path": [ + 88503, + 88765, + 88772 + ], + "use": 151250, + "future_path": [ + 88772, + 88781, + 88802, + 151250 + ] + }, + { + "owner": 88501, + "birth_path": [ + 88501, + 88765, + 88772 + ], + "use": 151250, + "future_path": [ + 88772, + 88781, + 88802, + 151250 + ] + }, + { + "owner": 88505, + "birth_path": [ + 88505, + 88765, + 88772 + ], + "use": 151250, + "future_path": [ + 88772, + 88781, + 88802, + 151250 + ] + }, + { + "owner": 88553, + "birth_path": [ + 88553, + 88765, + 88772 + ], + "use": 98041, + "future_path": [ + 88772, + 88781, + 88802, + 98041 + ] + }, + { + "owner": 88547, + "birth_path": [ + 88547, + 88765, + 88772 + ], + "use": 102640, + "future_path": [ + 88772, + 88781, + 88802, + 102640 + ] + }, + { + "owner": 88549, + "birth_path": [ + 88549, + 88765, + 88772 + ], + "use": 102640, + "future_path": [ + 88772, + 88781, + 88802, + 102640 + ] + }, + { + "owner": 88467, + "birth_path": [ + 88467, + 88765, + 88772 + ], + "use": 98041, + "future_path": [ + 88772, + 88781, + 88802, + 98041 + ] + }, + { + "owner": 88465, + "birth_path": [ + 88465, + 88765, + 88772 + ], + "use": 102640, + "future_path": [ + 88772, + 88781, + 88802, + 102640 + ] + }, + { + "owner": 88761, + "birth_path": [ + 88761, + 88765, + 88772 + ], + "use": 102640, + "future_path": [ + 88772, + 88781, + 88802, + 102640 + ] + }, + { + "owner": 88765, + "birth_path": [ + 88765, + 88772 + ], + "use": 88772, + "future_path": [ + 88772 + ] + } + ] +} diff --git a/research/banked-native-order-lower-bound/CREDITS.md b/research/banked-native-order-lower-bound/CREDITS.md new file mode 100644 index 0000000000..5032c9f1a0 --- /dev/null +++ b/research/banked-native-order-lower-bound/CREDITS.md @@ -0,0 +1,42 @@ +# Credit and source pins + +Ali Romman prepared the universal lower bound, maximal forced-set +characterization, 24-owner certificate and exact single-anchor rank +ceiling with substantial OpenAI Codex assistance in research, code, +verification and writing. New material is Apache-2.0. Reachability, +finite-field rank certificates and information dimension are standard +methods. No new general principle is claimed for them. + +Nick Petalas supplied the 2106-bank order, allocation/replay code, graph +export and open all-order question in +[PR #7724](https://github.com/CrocSwap/integer-mult-bounds/pull/7724), +head `ef52676eb20c252f5786f42a70ef0dd814400a03`. Its +[proof and credit](https://github.com/petalas/integer-mult-bounds/blob/ef52676eb20c252f5786f42a70ef0dd814400a03/research/banked-native-row-order/README.md) +and [verifier](https://github.com/petalas/integer-mult-bounds/blob/ef52676eb20c252f5786f42a70ef0dd814400a03/research/banked-native-row-order/verify.py) +are retained unchanged. The graph reader and upper-bound construction/replay +are called directly. The upper bound is prior work, not independently +reimplemented here. All 13 source package files and notices are retained. + +Ali Romman's [PR #7674](https://github.com/CrocSwap/integer-mult-bounds/pull/7674), +scientific commit `26b6c469aa6c4aa04322ce25a22150f90e5fb14e`, supplied the +fifteen-pivot graph, banked row semantics and physical model. Its +[proof](https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/PROOF.md) +and [PR #7681's storage contract](https://github.com/aliromman/integer-mult-bounds/blob/1753a3ff56be34b09a217b12b590f51eba15defb/research/banked-native-snapshot-reuse/PROOF.md) +supply the model used here. The latter proof is retained. The integer +coefficient pass follows their exact-grid method. SYLforge supplied the +native word and caller in +[PR #7669](https://github.com/CrocSwap/integer-mult-bounds/pull/7669). + +Clear1nsight supplied the comparator encoding and graph digest in +[PR #7682](https://github.com/CrocSwap/integer-mult-bounds/pull/7682). +The [published digest](https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/evidence/WIRE-RESULT.json) +identifies the peer graph, distinct from that package's changed role-230 +candidate. The retained notices preserve DreamingOfClouds, Clear1nsight, +Rohan Arun, Jerry Chen / CubeJerry, Douglas Colkitt, icekylinx, unpaidmoon, +and all other predecessor credit and assistance disclosures. + +SOURCE-PINS.json binds 15 retained files by source commit, path, Git blob +and SHA-256. SOURCES.json binds the canonical-main catalogue and selected +record as provenance. No pending source ancestry is asserted. The source +verifier and graph are not patched. This is source-aware author checking, +not independent human or formal-kernel acceptance. diff --git a/research/banked-native-order-lower-bound/LICENSE b/research/banked-native-order-lower-bound/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/banked-native-order-lower-bound/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-order-lower-bound/PROOF.md b/research/banked-native-order-lower-bound/PROOF.md new file mode 100644 index 0000000000..161d6c4c6a --- /dev/null +++ b/research/banked-native-order-lower-bound/PROOF.md @@ -0,0 +1,175 @@ +# A universal bank bound and the single-anchor rank limit + +Every legal topological row order of the fixed fifteen-pivot graph needs +at least **1507 private snapshot banks** under the retained storage contract. +The known order from [PR #7724](https://github.com/CrocSwap/integer-mult-bounds/pull/7724) +uses 2106. Thus the global minimum lies in `[1507,2106]`. +The gap of 599 banks remains open. No new schedule or kappa is supplied. + +The second result identifies a limit of one lower-bound method. For every +one of the 7643 row anchors, compute the maximal set of old tokens that +must be live there in every legal order. Combine that set's exact rank +with the full output information rank and the separate result bank. +The strongest bound in this precisely defined family is **exactly 1507**. +To prove a larger bound, a certificate must use more than these facts at +one fixed row. This is not a ceiling on other lower-bound methods or on +the global storage minimum. + +## Fixed contract and normalized fields + +Use graph hash +`d81ec9f47740852a4bf7bd83100feff5cb66b70e1973466e1609bbac8af75098` +from [PR #7674](https://github.com/CrocSwap/integer-mult-bounds/pull/7674). +There are 1501 independent entrances, 6142 paid rows and 1501 terminal rows. +The [PR #7681 contract](https://github.com/aliromman/integer-mult-bounds/blob/1753a3ff56be34b09a217b12b590f51eba15defb/research/banked-native-snapshot-reuse/PROOF.md) +permits reuse after a token's last complete read. The order may now change, +as in PR7724; all other contract terms stay fixed: + +- Copy all entrances into distinct private banks before the first row. +- Give each live token its own immutable snapshot. Do not merge equal forms. +- Reserve and initialize the new result before the first donor read. + Retain every donor through the complete row, child and adapters. +- Keep each literal donor list and coefficient. Do not recompute tokens, + use public fields as workspace or read extra donors outside the graph. +- Keep all terminal snapshots until common public installation. + +The graph's normalized snapshot values are rational linear forms in the +1501 entrance fields. The exact chart contract identifies each physical +field with its normalized field by an invertible map. Different charts +do not create independent information. This argument does not identify +different-chart snapshots as the same physical bank. + +## The maximal universally live set + +Write `u < v` when the dependency DAG has a nonempty path from u to v. +Fix a row x. For an old token v, define membership in S_x by both conditions: + +1. v is an entrance or `v < x`. +2. v has a direct consumer w with `w=x` or `x < w`. + +Every member must be born before x and must retain a value for a read at +or after x. It is therefore live when x's new result is reserved. +All direct donors of x belong to S_x. The new result x is separate. + +The converse is also exact for this DAG and contract. If a nonentrance +v is not an ancestor of x, a linear extension can put x before v. If +condition 2 fails, x is not an ancestor of any consumer of v. Put the +downward closure of all those consumers before x, then retire v after +its last read. An unused entrance can retire after the entrance phase. +Terminal tokens have no row consumers and can be placed after x; none +is a forced old token at a different anchor. These choices show that a +token outside S_x need not be live there. Late optional retirement cannot +create a universal requirement that is absent under earliest retirement. + +Thus S_x is the intersection of the old live-token sets at x over all +permitted row orders and retirement choices. The checker computes it by +forward and reverse reachability recurrences over the entire fixed DAG. +There are 7063 distinct sets, 188816 total owner incidences and at most +443 fixed forced owners at one anchor. Cardinality alone gives no useful +improvement over the entrance reservation. The rank argument below does. + +## Information rank gives an additional bank requirement + +Let n=1501, let k be the size of S_x, and let r be the rational rank of +its normalized forms. The complete endpoint matrix has rank n. The checker +proves this by exact elimination modulo the verified prime 1000003. +Its nonzero full-size minor remains nonzero over the rationals. + +Before x starts, all future terminal values are functions of the live +private token snapshots. Already completed terminals are also live. +Future rows read only their listed token donors; retired values, public +originals and old temporary contents are not extra data channels. +Induction through the remaining linear graph therefore factors the +endpoint map through the current live forms. Those forms have rank at +least n. For full fields with N coordinates, both ranks multiply by N; +one bank still contributes at most one normalized field of information. + +The k forced banks contribute only r independent forms. At least n-r +other live banks are needed. The initialized result bank is a separate +bank and contains no entrance information before the first read. Hence + +```text +snapshot banks >= k + (n-r) + 1 = n + (k-r) + 1. +``` + +This argument charges information jointly. It does not add several +per-owner lower bounds or assume that all nonforced owners coexist. + +## Explicit witness at row 88772 + +At row 88772, S_x has 24 owners and exact rank 19. The +[certificate](CERTIFICATE.json) lists all owners, a 19-token basis, five +relations and literal birth/use paths for every owner. Its paths contain +95 dependency edges; no path has more than four vertices. + +Four of the relations are equality of normalized forms: + +| Dependent token | Basis token with the same normalized form | +| --- | --- | +| 88503 | 88495 | +| 88501 | 88492 | +| 88505 | 88499 | +| 88553 | 88543 | + +The fifth relation is + +```text +v_88765 = 2*v_88465 + v_88467 - v_88492 + 2*v_88495 + - 2*v_88499 - v_88543 - 2*v_88547 + v_88549 + v_88761. +``` + +Every relation has coefficient one on its own dependent token and uses +only basis tokens elsewhere. The five relations are independent and +express all 24 forms in the span of 19 basis forms. Exact rational +substitution checks 970 coefficient products and zero residuals. +Modular elimination proves that those 19 basis forms are independent. +Thus r=19 over the rationals, not just modulo the prime. + +The information bound gives `24+(1501-19)+1=1507`. The particular owners +of the additional 1482 live banks can depend on the row order. That is +why counting only fixed universally live owners misses the bound. + +## Exact ceiling for this certificate family + +For every row anchor, the checker computes the rank of S_x modulo the +same prime. Rational rank is at least modular rank. Every resulting +defect upper bound `size(S_x)-modular_rank(S_x)` is at most five. The +24-owner certificate attains rational defect five. Consequently + +```text +max_x (1501 + size(S_x) - rank_Q(S_x) + 1) = 1507. +``` + +This certifies the entire single-anchor family. It does not require all +other modular ranks to equal rational ranks. The receipt labels its +modular-defect histogram as an upper-bound histogram. No exact rational +classification of its other deficient cases is claimed. + +The family uses only the forced forms and total information rank. In +that relaxation, complete a basis of the forced span to n independent +forms and retain the k forced tokens plus n-r complementary forms. +Reserve the extra result bank. This attains the formula in the relaxation. +Those complementary forms need not be legal graph snapshots, so this +argument supplies no 1507-bank schedule. A stronger storage proof can +use several row boundaries, order-dependent choices, actual available +complementary forms or other constraints not present in this relaxation. + +## Verification and limits + +The exact coefficient pass checks all 8533666 products on the source +grid 530841600. Prime testing, full endpoint rank and all 7643 forced-set +rank bounds run with integer arithmetic. The source graph reader and +2106-bank order/allocator/replay are retained unchanged. The upper-bound +replay checks all 169343 reads and the peak at event 3022. It is prior +work, not a new construction. Changed relation and dependency-path +certificates are rejected at their respective checks. + +Only the snapshot component is bounded. Public fields, the source +accumulator, scratch, guides, guards, child and adapter backing, and +suspended parent storage retain their separate costs. No new physical +layout, runtime gain, full budget improvement or kappa follows. The five +native/owned/compiler/precision/analytic interfaces remain inherited. +Full physical and caller replays, historical suites, selected cold replay, +Lean and Docker were not run. This is source-aware author checking, not +independent human or formal-kernel acceptance. [CREDITS.md](CREDITS.md) +identifies the source authors and methods. diff --git a/research/banked-native-order-lower-bound/README.md b/research/banked-native-order-lower-bound/README.md new file mode 100644 index 0000000000..e737714570 --- /dev/null +++ b/research/banked-native-order-lower-bound/README.md @@ -0,0 +1,49 @@ +# Universal snapshot bound and the single-row rank limit + +Every permitted row order of the fixed fifteen-pivot graph needs at least +1507 snapshot banks. The existing order in +[PR #7724](https://github.com/CrocSwap/integer-mult-bounds/pull/7724) +uses 2106. The global minimum remains in `[1507,2106]`. + +The package also proves a method limit: 1507 is the strongest bound from +the maximal universally live set, its rank, full endpoint information +and a separate result bank at any one row anchor. All 7643 anchors are +covered. Improving this bound needs additional facts or coupled boundaries. +This is not a global scheduling optimum or a new kappa. + +Read [PROOF.md](PROOF.md), the [24-owner certificate](CERTIFICATE.json), +[RESULT.json](RESULT.json), [verify.py](verify.py) and [CREDITS.md](CREDITS.md). +At row 88772, 24 forced owners carry only 19 independent forms. Five +explicit rational relations and literal birth/use paths prove the defect. +Full output rank forces the remaining information to stay in other banks. + +Python 3.12 and its standard library are sufficient: + +```sh +python3.12 -B scripts/research_package.py --package research/banked-native-order-lower-bound +``` + +Both normal and optimized commands print: + +```text +PASS_BANKED_NATIVE_ORDER_LOWER_BOUND 1507 <= optimum <= 2106 +``` + +All input copies, immutable token identities, whole-row donor retention, +separate result reservation and common output installation remain required. +The proof does not cover recomputation, in-place writes, merged equal +forms, early output installation or public fields used as working storage. +Source graph and upper-bound engines are shared. All five framework +interfaces remain inherited; no independent human acceptance is claimed. + +## Open next questions + +See [TASK.json](TASK.json) for structured next steps. + +- Use several row boundaries or actual available complementary forms to + improve the lower bound; a further search in this single-row rank family + cannot exceed 1507. +- Construct a legal order below 2106, with every donor and terminal lifetime + checked, to reduce the remaining 599-bank interval from the other side. + +Prepared by Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. diff --git a/research/banked-native-order-lower-bound/RESULT.json b/research/banked-native-order-lower-bound/RESULT.json new file mode 100644 index 0000000000..aaf2a54fff --- /dev/null +++ b/research/banked-native-order-lower-bound/RESULT.json @@ -0,0 +1,44 @@ +{ + "status": "PASS_BANKED_NATIVE_ORDER_LOWER_BOUND", + "graph_sha256": "d81ec9f47740852a4bf7bd83100feff5cb66b70e1973466e1609bbac8af75098", + "source_pins": 15, + "coefficient_products": 8533666, + "grid": 530841600, + "prime": 1000003, + "endpoint_rank": 1501, + "row_anchors": 7643, + "distinct_forced_sets": 7063, + "forced_owner_incidences": 188816, + "maximum_fixed_forced_owners": 443, + "modular_defect_upper_histogram": { + "0": 7600, + "1": 10, + "2": 22, + "3": 3, + "4": 6, + "5": 2 + }, + "complete_rank_trace_sha256": "af29836a617c631ad0344083a1852946012493e80bf1e26692661dc4fb65f0c2", + "witness": { + "anchor": 88772, + "forced_owners": 24, + "exact_rank": 19, + "exact_defect": 5, + "independent_relations": 5, + "rational_relation_products": 970, + "literal_path_edges": 95 + }, + "universal_snapshot_lower_bound": 1507, + "single_anchor_rank_family_ceiling": 1507, + "source_order_upper_bound": 2106, + "remaining_bank_gap": 599, + "upper_bound_replay": { + "first_peak_event": 3022, + "donor_reads": 169343 + }, + "rejected_certificate_controls": [ + "nonzero rational relation residual", + "literal dependency path" + ], + "scope": "All legal row orders under the retained distinct-snapshot contract; the 1507 ceiling applies only to the stated single-anchor rank bound, not to the global optimum." +} diff --git a/research/banked-native-order-lower-bound/SOURCE-PINS.json b/research/banked-native-order-lower-bound/SOURCE-PINS.json new file mode 100644 index 0000000000..ed26827fe4 --- /dev/null +++ b/research/banked-native-order-lower-bound/SOURCE-PINS.json @@ -0,0 +1,107 @@ +[ + { + "path": "retained/pr7724/.gitattributes", + "source_path": "research/banked-native-row-order/.gitattributes", + "source_commit": "ef52676eb20c252f5786f42a70ef0dd814400a03", + "git_blob": "60806b35aabbdcd28419b719dd6ce767fa232d51", + "sha256": "f05fe4a94e2c00a547225b55f3058209f748b5ed892fc1873ae09b0d357ff3ee" + }, + { + "path": "retained/pr7724/PEER-GRAPH.json.gz", + "source_path": "research/banked-native-row-order/PEER-GRAPH.json.gz", + "source_commit": "ef52676eb20c252f5786f42a70ef0dd814400a03", + "git_blob": "f0cd507df63acdec4ef99a25518ba5ca11766861", + "sha256": "8eabf68d3dd74892ce0e1644bffe8b766f437343fa3d36a3a786eff6340b37ff" + }, + { + "path": "retained/pr7724/README.md", + "source_path": "research/banked-native-row-order/README.md", + "source_commit": "ef52676eb20c252f5786f42a70ef0dd814400a03", + "git_blob": "f11146f208e7d2a5f2c7c36839c084ca6eb3188d", + "sha256": "72a29bbc6e83a9fdf12b666148f92bf2db72bd98a74a5b36f94a6ad5255e483d" + }, + { + "path": "retained/pr7724/RESULT.json", + "source_path": "research/banked-native-row-order/RESULT.json", + "source_commit": "ef52676eb20c252f5786f42a70ef0dd814400a03", + "git_blob": "4ce89ecc7421c72a630e1df4c6199afe6910ecca", + "sha256": "4795da9d276dd1c4c1ca10dc33c41c3d3463c229c4826508be7006d574cc219d" + }, + { + "path": "retained/pr7724/SOURCES.json", + "source_path": "research/banked-native-row-order/SOURCES.json", + "source_commit": "ef52676eb20c252f5786f42a70ef0dd814400a03", + "git_blob": "5335fa97d97f6df5a917eea1ee2fcd01c082d261", + "sha256": "0761fd793723c2df1e2ca51733251cfd597ff3e120f7e2ee8ebb8e10e8e98c08" + }, + { + "path": "retained/pr7724/TASK.json", + "source_path": "research/banked-native-row-order/TASK.json", + "source_commit": "ef52676eb20c252f5786f42a70ef0dd814400a03", + "git_blob": "beade8bedcc39a8c448db79704bf47de47b53dd7", + "sha256": "8f92cb89ad9d0a7e952a7e607c75e1058c7f565cfe3c0c7b707676da7517a161" + }, + { + "path": "retained/pr7724/VERIFY.json", + "source_path": "research/banked-native-row-order/VERIFY.json", + "source_commit": "ef52676eb20c252f5786f42a70ef0dd814400a03", + "git_blob": "6806609b165dd0d60a2c172e8a4aa07d2f6e3df4", + "sha256": "9072f65e6e71653a8af9f6684fd2646727ebe56ddd256a05de356a39f057791d" + }, + { + "path": "retained/pr7724/notices/7663-NOTICE", + "source_path": "research/banked-native-row-order/notices/7663-NOTICE", + "source_commit": "ef52676eb20c252f5786f42a70ef0dd814400a03", + "git_blob": "6ce1bc49a3612c9e906df02de81bcba84be8e803", + "sha256": "5fd4367578d2339fbdcd7dc116b6c12cb4fa72e92d2e3d67be537a36c8bd9d40" + }, + { + "path": "retained/pr7724/notices/7669-CREDITS.md", + "source_path": "research/banked-native-row-order/notices/7669-CREDITS.md", + "source_commit": "ef52676eb20c252f5786f42a70ef0dd814400a03", + "git_blob": "bbee2437f012c3268eb5cd920adfa37394c1de72", + "sha256": "706c6c852e87e371ddf1828244b2f0c2b00279728818023aa911c8947d69ab83" + }, + { + "path": "retained/pr7724/notices/7674-NOTICE", + "source_path": "research/banked-native-row-order/notices/7674-NOTICE", + "source_commit": "ef52676eb20c252f5786f42a70ef0dd814400a03", + "git_blob": "951f081717e0769f3bcc0f442f133965c064d2ce", + "sha256": "382537634a3d9fa0a8089d6121a506a399382f9310088b1f29586dcc93eec92d" + }, + { + "path": "retained/pr7724/notices/7682-NOTICE", + "source_path": "research/banked-native-row-order/notices/7682-NOTICE", + "source_commit": "ef52676eb20c252f5786f42a70ef0dd814400a03", + "git_blob": "4654631de087fe5034d30abc17e9d57582e5ed9c", + "sha256": "7590f71de481c424d2315e9ea4884bea1557481676fa5f930f7a0bed637a56a1" + }, + { + "path": "retained/pr7724/notices/gate-NOTICE", + "source_path": "research/banked-native-row-order/notices/gate-NOTICE", + "source_commit": "ef52676eb20c252f5786f42a70ef0dd814400a03", + "git_blob": "1bc9b4da2b8398954cd7a49356eb9d397785d0a6", + "sha256": "cadbc642ca84311d2c7a6cf704c7828cb4cf77e3c784b66e4c6e8a5c28002fb8" + }, + { + "path": "retained/pr7724/verify.py", + "source_path": "research/banked-native-row-order/verify.py", + "source_commit": "ef52676eb20c252f5786f42a70ef0dd814400a03", + "git_blob": "c201fe02d9761891719e71637dbd4c1563d067b0", + "sha256": "3b8cc64631696e7f70dfd596db6e55ddd128d569bec490943c00091abe05ac40" + }, + { + "path": "retained/PR7681-PROOF.md", + "source_path": "research/banked-native-snapshot-reuse/PROOF.md", + "source_commit": "1753a3ff56be34b09a217b12b590f51eba15defb", + "git_blob": "8438827f93251280a9ebe8693ee90a3111645d0d", + "sha256": "7aeef07c7e29e883cec4ceacf5f7b3f1b81a0063070ca3efb8ee2d446265e0de" + }, + { + "path": "LICENSE", + "source_path": "LICENSE", + "source_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "git_blob": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + } +] diff --git a/research/banked-native-order-lower-bound/SOURCES.json b/research/banked-native-order-lower-bound/SOURCES.json new file mode 100644 index 0000000000..5335fa97d9 --- /dev/null +++ b/research/banked-native-order-lower-bound/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-order-lower-bound/TASK.json b/research/banked-native-order-lower-bound/TASK.json new file mode 100644 index 0000000000..cb6a0f288a --- /dev/null +++ b/research/banked-native-order-lower-bound/TASK.json @@ -0,0 +1,120 @@ +{ + "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": "Prove an all-order snapshot lower bound and the exact ceiling for the maximal universally live set plus endpoint-rank argument at a single row anchor.", + "scope_change_reason": "Take the universal storage question left by PR7724. Exact forced sets and information rank yield a bound that applies to every legal order and a proved limit of this local certificate family.", + "bottleneck_link": "Reduces private field backing in one forward native supplier. A new recursive saving would require a change to its complete signed invoice.", + "budget_minutes": 60, + "stop_rule": "Stop at one verified universal bound and the proved scope of its method. Do not claim a global optimum or change the source graph.", + "outcome": "completed", + "evidence": "PROOF.md, CERTIFICATE.json, RESULT.json and verify.py bind all 7643 anchors, the endpoint rank, five rational relations and literal causal paths, with the retained 2106-bank upper bound.", + "author": "Ali Romman", + "ai_assistance": "Substantial OpenAI Codex assistance in research, implementation, verification and writing.", + "open_questions": [ + { + "question": "Can coupled boundaries or available complementary forms improve the 1507 lower bound?", + "why_it_matters": "The proved single-anchor forced-set rank ceiling is 1507, leaving 599 banks below the known order.", + "first_step": "Choose a pair of row boundaries or constrain the actual unforced snapshots that can supply the missing independent forms.", + "blocked_by": "An order-independent argument beyond one maximal forced set and total rank." + }, + { + "question": "Can another legal order use fewer than 2106 banks?", + "why_it_matters": "The current interval is 1507 to 2106; a global optimum is not known.", + "first_step": "Supply a complete checked order and owner allocation with all whole-row reads and common output installation.", + "blocked_by": "A better concrete schedule under the unchanged contract." + } + ], + "claim_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19714933", + "predecessors": [ + { + "pr": 7681, + "head": "1753a3ff56be34b09a217b12b590f51eba15defb", + "role": "First open question, fixed-order minimum and ownership contract." + }, + { + "pr": 7674, + "head": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "role": "Scientific graph, row semantics and physical cost model." + }, + { + "pr": 7682, + "head": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "role": "Canonical comparator encoding and published uncompressed graph digest." + }, + { + "pr": 7669, + "head": "eaef5d1580e5761feaed09262b964871f3e5f553", + "role": "Underlying native word and caller." + } + ] +} diff --git a/research/banked-native-order-lower-bound/VERIFY.json b/research/banked-native-order-lower-bound/VERIFY.json new file mode 100644 index 0000000000..125f33aaed --- /dev/null +++ b/research/banked-native-order-lower-bound/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": "Check exact coefficients, full endpoint rank, every maximal forced snapshot set and rank ceiling, five rational relations and causal paths, negative certificate controls and the retained 2106-bank order." + }, + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "-O", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Check exact coefficients, full endpoint rank, every maximal forced snapshot set and rank ceiling, five rational relations and causal paths, negative certificate controls and the retained 2106-bank order." + } + ] +} diff --git a/research/banked-native-order-lower-bound/retained/PR7681-PROOF.md b/research/banked-native-order-lower-bound/retained/PR7681-PROOF.md new file mode 100644 index 0000000000..8438827f93 --- /dev/null +++ b/research/banked-native-order-lower-bound/retained/PR7681-PROOF.md @@ -0,0 +1,76 @@ +# Reuse private snapshots after their last complete read + +## Result and exact contract + +The final forward graph in [PR #7674](https://github.com/CrocSwap/integer-mult-bounds/pull/7674) has 6142 paid rows and 1501 terminal rows. Its source [proof, section 4](https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/PROOF.md) reserves 15290 private full-field homes per native occurrence. The construction below uses **2430**: a pool of 2425 snapshots, one shared source accumulator, and four scalar scratch fields. Sixteen disjoint occurrences need 38880 such homes instead of 244640. Public fields, child and adapter workspace, guides, guards, and compiler backing remain additional. + +The snapshot pool size 2425 is exact for the following contract. This is not a lower bound on all implementations. + +1. Use the exact final forward row order from the pinned `Network.schedule()`. +2. Copy all 1501 independent entrances into distinct private snapshots before the first row. Each graph token has its own immutable snapshot while live. Equal linear forms are not merged. +3. Reserve the new result bank before the row starts. Keep every donor through the completion of the whole row, its child and both adapters. Do not overwrite a last donor in place. +4. Do not recompute a token or change scalar donor order. Retain all terminal rows until all 1501 outputs can be installed. +5. Reuse a home only after full retirement of its old owner. Initialize its full extent for the new owner. A change of chart also needs the source's view preparation. + +The source graph constructor is reused, not independently reimplemented. The new allocation and replay bind to all fifteen source pivots. They do not transfer to a later changed graph without a new check. The schedule hash is `bbcb021bdff9d4f205e327abba9a77480c487979eeabb27a481ec8919e570b8e` under the canonical JSON encoding in the verifier. [Source inventory](PREDECESSOR.json) · [Allocation](ALLOCATION.json) · [Receipt](RESULT.json) + +## Closed lifetimes and an attaining allocation + +Number the 7643 row events from 1. Event 0 contains all entrance copies. For a token v, let b(v) be 0 for an entrance, or its row event otherwise. Let e(v) be its last consumer row. If there is no consumer, use b(v). For a terminal token set e(v)=7644, the installation boundary. Its lifetime is the closed integer interval `[b(v),e(v)]`. + +At row i, each donor with final use i must coexist with the new result bank. This is why both endpoints are closed. Retire those donors only after the row completes. An unused entrance can retire after the entrance-copy phase. A paid result with no consumer can retire after its return. A terminal output cannot retire at its birth. + +Process tokens by increasing birth event, with increasing token as the tie rule for entrances. Reuse the least-numbered free slot. A slot is free only if its preceding owner's end is strictly less than the new birth. Otherwise create a new slot. `ALLOCATION.json` gives all 9144 token-to-slot pairs. This includes all entrances, all 6142 returned paid fields, and all 1501 terminal accumulators. + +This allocation uses 2425 slots. An independent difference sweep adds one at every birth and subtracts one just after every end. Its maximum is 2425. The first maximum is event **5755**, row token **98194**. The allocation file lists all 2425 tokens live at that cut. They have distinct owners and occupy distinct slots. Any allocation under this contract needs at least that many slots at this cut. The construction attains the lower bound. Equivalently, the usual greedy interval allocation cannot need a new slot unless all prior slots have live owners at that same birth event. This elementary interval method is prior knowledge; the source-bound certificate is the contribution. + +The lower bound does not apply to a changed order, early donor release inside a row, in-place accumulation, recomputation, sharing equal values, or use of public fields as working storage. The total 2430 is an upper bound for the full private reservation; only the 2425 snapshot component is proved minimum. + +## Execute the allocation without losing an owner + +Give each bank a physical occurrence tag and a current token and chart. At entry, initialize each entrance slot and copy the corresponding arbitrary public input. Public entrances stay intact until final installation. + +For a paid row, reserve its pool slot at the return chart. Initialize the one shared source accumulator at the source chart. Read donors from their recorded slots in increasing token order. Perform each exact coefficient product and addition. Every donor keeps its value and chart. Apply the original complete child and both adapters to the accumulator, with the same source and destination charts as before. Store its completed return in the reserved pool slot. Finish all return and view work before retiring the accumulator or any final-use donor. + +For a terminal row, use its reserved pool slot as the source accumulator itself. It needs no paid child. The donors all have that terminal chart. Keep this bank through installation. Thus a terminal row does not cause an extra source accumulator, copy, or lifetime. + +The shared accumulator is never reused while a child is active. All other live snapshots and the parent tuple remain parked during the child. Its internal backing and adapter workspace remain separately charged, as in the source. Each bank gets its new chart only after full retirement and initialization. The proof does not infer a free chart conversion on a live field. + +Induction over the row events proves correctness. Every read finds the intended unmodified token at the required chart. The new accumulator therefore has the same linear form as the source row at each scalar prefix. The unchanged complete native map returns that form at its specified chart. Retirement removes only values with no later consumer. All terminal forms remain available for simultaneous public installation. After installation, retire every terminal bank and all scratch. This proves the field-level allocation for all admitted field sizes under the same physical primitives as the source. + +The replay uses a different lifetime mechanism from the allocation generator: live token owners and remaining consumer counts. It stores each formal scalar row in its assigned slot, checks every local chart, and executes all 8533666 coefficient products on the source sufficient grid 530841600. It verifies every division before addition and all 1501 endpoint rows against a separately built public specification. It finishes with no active private token and no remaining consumer. This is exact symbolic scalar execution, not a materialized physical Clifford or tape replay. + +## Preserve the complete local reset count + +Physical reuse changes the number of simultaneous homes, not the number of logical lifetimes. The count is: + +| Kind | Lifetimes per native occurrence | +| --- | ---: | +| Entrance snapshots | 1501 | +| Returned paid snapshots | 6142 | +| Terminal accumulators | 1501 | +| Uses of the shared paid-row accumulator | 6142 | +| Scalar scratch fields | 4 | +| Total | 15290 | + +Each lifetime has one full-extent initialization and one full-extent retirement. The total is 30580 reset services per native occurrence. It equals the source reservation's initialization/retirement allowance, although several services now touch the same physical home at different times. No reset is omitted because a bank was used before. + +There are still 169343 scalar terms and 7643 rows. Keep the source's additional four reset services per term or row. Across sixteen native occurrences the same conservative reset allowance is: + +```text +16 * (2 * 15290 + 4 * (169343 + 7643)) = 11816384. +``` + +Every paid source/return copy, entrance copy, terminal installation, scalar operation and recursive call has a corresponding source operation. Direct terminal accumulation avoids an additional output copy. The 6142 paid calls and complete productive invoice do not change. Reuse requires the same full view preparation on each new lifetime; it does not supply free setup, zero scratch, or dirty erasure. + +For equal views of extent L, the source selector argument can reserve K=2430 homes and charge each complete selection, scan and return at `O(K*(L+1))`. Charge changed views at their actual packed extent. Keep guides, guards, child/adapter backing and suspended owners separately. In a finite compiled template with J native occurrences, `2430*J` replaces `15290*J` only in this native-home term. All other stock terms remain. The selected compiler and fixed-tape hypotheses still supply the physical primitives and asymptotic absorption. No concrete transition table, runtime reduction, root precision change or kappa improvement is proved here. + +## Verification limits and controls + +The checker independently compares intervals within each assigned slot and sweeps all endpoint counts. A second pass executes the allocated owners and exact scalar values. Six controls reject a live-bank collision at the maximum cut, retirement before a last read, loss of terminal outputs, a pool one bank too small, a missing allocation token, and a sign error in a terminal row. The controls must fail at their named boundary. + +The proof establishes one source-specific allocation under an explicit storage contract. Source input bytes are checked with Git-blob and SHA-256 identities. It does not recertify the source's pivot discovery, native operators, complete signed caller, compiler, precise scalar machine or all-size assumptions. The five selected assumptions and selected frontier are unchanged. Independent human and formal-kernel review are unclaimed. + +## Credit + +Ali Romman prepared this allocation, proof and verifier with substantial OpenAI Codex assistance. The graph, banked construction, physical reservation and sufficient arithmetic grid are prior work in [PR #7674](https://github.com/CrocSwap/integer-mult-bounds/pull/7674), scientific commit `26b6c469aa6c4aa04322ce25a22150f90e5fb14e`. Its parent is SYLforge's [PR #7669](https://github.com/CrocSwap/integer-mult-bounds/pull/7669). Preserve the [source notices](predecessor/NOTICE), [original parent credit](predecessor/source/7669-CREDITS.md), and [prior bank notice](predecessor/source/7663-NOTICE). They retain the DreamingOfClouds, Clear1nsight, Rohan Arun, Jerry Chen and selected-construction lineage. The separate minimum-grid audit in [PR #7680](https://github.com/CrocSwap/integer-mult-bounds/pull/7680) changes no allocation and is not an arithmetic dependency here. New work is Apache-2.0. diff --git a/research/banked-native-order-lower-bound/retained/pr7724/.gitattributes b/research/banked-native-order-lower-bound/retained/pr7724/.gitattributes new file mode 100644 index 0000000000..60806b35aa --- /dev/null +++ b/research/banked-native-order-lower-bound/retained/pr7724/.gitattributes @@ -0,0 +1,4 @@ +# Preserve the original source notices, including the mixed CRLF/LF credit file. +notices/** -text +notices/7669-CREDITS.md whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol +PEER-GRAPH.json.gz binary diff --git a/research/banked-native-order-lower-bound/retained/pr7724/PEER-GRAPH.json.gz b/research/banked-native-order-lower-bound/retained/pr7724/PEER-GRAPH.json.gz new file mode 100644 index 0000000000..f0cd507df6 Binary files /dev/null and b/research/banked-native-order-lower-bound/retained/pr7724/PEER-GRAPH.json.gz differ diff --git a/research/banked-native-order-lower-bound/retained/pr7724/README.md b/research/banked-native-order-lower-bound/retained/pr7724/README.md new file mode 100644 index 0000000000..f11146f208 --- /dev/null +++ b/research/banked-native-order-lower-bound/retained/pr7724/README.md @@ -0,0 +1,59 @@ +# A 2,106-bank order for the #7674 native graph + +The forward graph of #7674 admits a legal serial row order using **2,106 snapshot banks**, 319 fewer than the 2,425 required by the order in #7681. The new order first reaches its peak at event 3,022, row token 94,904. The certificate supplies a bank for every entrance, paid return and terminal output. This answers the first open question in Ali Romman's fixed-order allocation. [#7681 proof and contract](https://github.com/aliromman/integer-mult-bounds/blob/1753a3ff56be34b09a217b12b590f51eba15defb/research/banked-native-snapshot-reuse/PROOF.md) + +| Field-level reservation | #7681 order | New order | +| --- | ---: | ---: | +| Snapshot banks per forward occurrence | 2,425 | 2,106 | +| Private homes including the paid-row accumulator and four scratch fields | 2,430 | 2,111 | +| Private homes for 16 disjoint occurrences | 38,880 | 33,776 | + +## Choose the next row + +Copy all 1,501 public entrances into distinct private banks. A row becomes ready when every paid donor has returned. Among ready rows, choose the one with the most donors whose only remaining use is this row. Break ties by the smaller integer row token. The donor list contains each donor once. Its last use can release its bank after the row and its child return. The rule uses only the fixed graph and can be run before field data are available. + +The generated order covers all 6,142 paid rows and all 1,501 terminal rows. A token's lifetime starts at its birth and ends at its last read, inclusively. An unread nonterminal may retire immediately after its birth. All terminal lifetimes extend through the common installation event. The allocator chooses the lowest free bank, releasing a previous owner only when its end precedes the next birth. The entrances use bank `i` for input role `i`. + +## Why the order preserves the map + +Induct on completed rows. At entry each bank holds its specified input at its original chart. Reserve the row's return bank before its first read. For each donor in the frozen order, the replay checks that its slot holds that exact token at the row's source chart. The coefficient travels with the donor in the frozen graph. The unchanged scalar operations therefore form the same sum, including every prefix, on arbitrary entrances. A paid row runs its original child and adapters between the same two charts. No other row starts until that return finishes. A terminal row accumulates directly into its reserved slot. Each donor stays live throughout the row. + +Once every read of a donor is complete, the bank can undergo its full retirement and initialization before reuse at a new chart. At installation the replay reads every terminal owner in its final chart, then checks that retirement empties the pool. Thus a permutation of complete rows preserves the labelled operator under the source's field and child contracts. The argument needs no numerical samples or assumptions about equal snapshot values. + +The verifier reconstructs lifetimes for allocation. A separate replay has no access to their end times. It counts unread donor occurrences, checks each bank's current owner and records simultaneous occupancy immediately after each new reservation. All 9,144 assignments fit and the replay reaches 2,106 simultaneous owners. This makes 2,106 exact for **this particular order** under distinct-snapshot ownership. Other legal orders may require fewer banks. Two controls check that aliasing a donor with its consumer's return slot and using the supplied assignment with one slot removed both fail. [Generated result](RESULT.json) · [Verifier](verify.py) + +## Field-level costs and limits + +Per forward occurrence there are 9,144 snapshot lifetimes, 6,142 uses of the shared paid-row accumulator and four scalar scratch lifetimes. Each of the resulting 15,290 lifetimes pays for full initialization and retirement. With 169,343 scalar terms and 7,643 rows, the source's conservative reset allowance for 16 occurrences is + +```text +16 × (2 × 15,290 + 4 × (169,343 + 7,643)) = 11,816,384. +``` + +Each donor read, coefficient, paid transfer, entrance copy and public installation belongs to the same labelled row as before. Each bank reuse pays for view setup and full-extent reset. For equal extent `L`, the source's serial selector bound uses `O(2111 (L+1))` per selection, scan and return. Changed views pay their actual packed extent. Public fields, guides, guards, suspended parent storage, recursive child and adapter workspace, and compiler backing carry their separate source charges. [#7674 physical model, section 4](https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/PROOF.md) + +This is a finite storage certificate with a scoped operator-preservation proof. It gives no global scheduling optimum or new κ. Physical operator correctness and the five framework assumptions are inherited. Physical operators, fixed-tape lowering, the complete caller, the selected cold replay and a formal proof were outside the verification scope. + +## Reproduce + +From the repository root with CPython 3.12 and its standard library: + +```sh +python3.12 -B scripts/research_package.py --package research/banked-native-row-order +python3.12 -I -B -W error research/banked-native-row-order/verify.py +python3.12 -I -B research/banked-native-row-order/verify.py --certificate +``` + +The final command emits all assignments in event order. Event zero contains all entrance copies. Each later line identifies the row and its reserved bank. Its TSV SHA-256 is `16de610956122d9f2c68f05d955b5484a0ee31bf201b69546a092495bf97dd86`. The default replay checks the receipt against the graph, verifier and complete allocation hashes. Normal and optimized runs use the same owner checks. + +## Inputs and credit + +This construction and allocation certificate were produced by Nick Petalas. Ali Romman posed the changed-order question, proved the prior fixed-order minimum and supplied the bank contract in #7681. His #7674 supplies the fifteen-pivot graph, the row and child semantics, and the physical cost model. SYLforge supplied the #7669 native word and caller. The retained notices credit the underlying work by DreamingOfClouds, Clear1nsight, Rohan Arun, Jerry Chen, Douglas Colkitt and their predecessors. [#7681](https://github.com/CrocSwap/integer-mult-bounds/pull/7681) · [#7674](https://github.com/CrocSwap/integer-mult-bounds/pull/7674) · [#7669](https://github.com/CrocSwap/integer-mult-bounds/pull/7669) · [Source notices](notices/) + +Clear1nsight supplied the canonical comparator encoding and its published digest in #7682. The bundled `PEER-GRAPH.json.gz` was materialized from the #7674 constructor with fifteen fixed pivots, using #7682's `record(..., "peer")`. The verifier pins the decompressed payload to `graphs.peer.canonical_sha256` in the published receipt. This identifies the graph separately from its gzip encoding and from #7682's role-230 candidate. [Graph constructor](https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/network.py) · [Comparator encoder](https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/engines/graph.py) · [Published graph digest](https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/evidence/WIRE-RESULT.json) + +## Open next questions + +What lower bound holds for *all* legal topological orders under the same distinct-snapshot and common-installation contract? One first step is to find a family of donors and terminal outputs that must coexist across every legal ordering. Such a bound would measure the remaining room below 2,106. + +Can a concrete tape layout realize the 2,111-home reservation with the actual views, guards and suspended owners? A first step is to assign each bank its packed extent and charge its selection, initialization and return on consecutive uses. [Task record](TASK.json) diff --git a/research/banked-native-order-lower-bound/retained/pr7724/RESULT.json b/research/banked-native-order-lower-bound/retained/pr7724/RESULT.json new file mode 100644 index 0000000000..4ce89ecc74 --- /dev/null +++ b/research/banked-native-order-lower-bound/retained/pr7724/RESULT.json @@ -0,0 +1,19 @@ +{ + "graph_sha256": "d81ec9f47740852a4bf7bd83100feff5cb66b70e1973466e1609bbac8af75098", + "verifier_sha256": "3b8cc64631696e7f70dfd596db6e55ddd128d569bec490943c00091abe05ac40", + "certificate_sha256": "16de610956122d9f2c68f05d955b5484a0ee31bf201b69546a092495bf97dd86", + "entrances": 1501, + "paid_rows": 6142, + "terminal_rows": 1501, + "row_events": 7643, + "snapshot_assignments": 9144, + "scalar_terms": 169343, + "snapshot_banks": 2106, + "first_peak_event": 3022, + "first_peak_token": 94904, + "private_homes_per_occurrence": 2111, + "private_homes_for_16": 33776, + "lifetimes_per_occurrence": 15290, + "full_resets_per_occurrence": 30580, + "reset_allowance_for_16": 11816384 +} diff --git a/research/banked-native-order-lower-bound/retained/pr7724/SOURCES.json b/research/banked-native-order-lower-bound/retained/pr7724/SOURCES.json new file mode 100644 index 0000000000..5335fa97d9 --- /dev/null +++ b/research/banked-native-order-lower-bound/retained/pr7724/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-order-lower-bound/retained/pr7724/TASK.json b/research/banked-native-order-lower-bound/retained/pr7724/TASK.json new file mode 100644 index 0000000000..beade8bedc --- /dev/null +++ b/research/banked-native-order-lower-bound/retained/pr7724/TASK.json @@ -0,0 +1,120 @@ +{ + "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": "changed", + "actual_scope": "A new legal storage schedule for the fixed PR 7674 forward banked native graph under PR 7681's distinct-snapshot contract.", + "scope_change_reason": "PR 7681 asks whether changing complete row order can lower the bank reservation. The contribution constructs an order for this source-specific storage question.", + "bottleneck_link": "Reduces private field backing in one forward native supplier. A new recursive saving would require a change to its complete signed invoice.", + "budget_minutes": 60, + "stop_rule": "Stop at the first checked schedule with fewer than 2425 snapshot banks.", + "outcome": "completed", + "evidence": "A graph-bound order and slot assignment for all 9144 tokens. Structural replay checks every one of 169343 donor reads, final installation, bank occupancy and the logical reset allowance.", + "author": "Nick Petalas", + "ai_assistance": "Independent human and formal proof-kernel review are unclaimed.", + "open_questions": [ + { + "question": "What lower bound applies to every legal order under the same storage contract?", + "why_it_matters": "It would bound the remaining improvement below 2106 banks.", + "first_step": "Find donors and final outputs forced to coexist in every topological order.", + "blocked_by": "The peak cut certificate fixes a row order." + }, + { + "question": "Can one concrete tape occurrence realize the 2111-home reservation?", + "why_it_matters": "Field counts alone do not quantify packed cell backing and movement.", + "first_step": "Assign actual extents to the banks at each reuse and charge complete selection, initialization and retirement.", + "blocked_by": "The construction has no complete tape layout or suspended-owner mapping." + } + ], + "claim_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19714933", + "predecessors": [ + { + "pr": 7681, + "head": "1753a3ff56be34b09a217b12b590f51eba15defb", + "role": "First open question, fixed-order minimum and ownership contract." + }, + { + "pr": 7674, + "head": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "role": "Scientific graph, row semantics and physical cost model." + }, + { + "pr": 7682, + "head": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "role": "Canonical comparator encoding and published uncompressed graph digest." + }, + { + "pr": 7669, + "head": "eaef5d1580e5761feaed09262b964871f3e5f553", + "role": "Underlying native word and caller." + } + ] +} diff --git a/research/banked-native-order-lower-bound/retained/pr7724/VERIFY.json b/research/banked-native-order-lower-bound/retained/pr7724/VERIFY.json new file mode 100644 index 0000000000..6806609b16 --- /dev/null +++ b/research/banked-native-order-lower-bound/retained/pr7724/VERIFY.json @@ -0,0 +1,34 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "-W", + "error", + "{package}/verify.py" + ], + "timeout_seconds": 45, + "checks": "Construct the order, replay every donor and bank, reject a live overwrite and an undersized assignment, and check the generated receipt." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "-W", + "error", + "-O", + "{package}/verify.py" + ], + "timeout_seconds": 45, + "checks": "Construct the order, replay every donor and bank, reject a live overwrite and an undersized assignment, and check the generated receipt." + } + ] +} diff --git a/research/banked-native-order-lower-bound/retained/pr7724/notices/7663-NOTICE b/research/banked-native-order-lower-bound/retained/pr7724/notices/7663-NOTICE new file mode 100644 index 0000000000..6ce1bc49a3 --- /dev/null +++ b/research/banked-native-order-lower-bound/retained/pr7724/notices/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-order-lower-bound/retained/pr7724/notices/7669-CREDITS.md b/research/banked-native-order-lower-bound/retained/pr7724/notices/7669-CREDITS.md new file mode 100644 index 0000000000..bbee2437f0 --- /dev/null +++ b/research/banked-native-order-lower-bound/retained/pr7724/notices/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-order-lower-bound/retained/pr7724/notices/7674-NOTICE b/research/banked-native-order-lower-bound/retained/pr7724/notices/7674-NOTICE new file mode 100644 index 0000000000..951f081717 --- /dev/null +++ b/research/banked-native-order-lower-bound/retained/pr7724/notices/7674-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-order-lower-bound/retained/pr7724/notices/7682-NOTICE b/research/banked-native-order-lower-bound/retained/pr7724/notices/7682-NOTICE new file mode 100644 index 0000000000..4654631de0 --- /dev/null +++ b/research/banked-native-order-lower-bound/retained/pr7724/notices/7682-NOTICE @@ -0,0 +1,9 @@ +Apache License 2.0. Research prepared for Clear1nsight with substantial OpenAI Codex assistance. + +Ali Romman supplied the fifteen exact banked pivots and the frozen #7674 baseline, along with the complete signed 16-call graph and application method. The original notices remain at peer/NOTICE, peer/source/7663-NOTICE and peer/source/gate-NOTICE. Read peer/SOURCE-PINS.json for each ancestry binding and ASSETS.json for the exact vendored bytes at scientific commit 26b6c469aa6c4aa04322ce25a22150f90e5fb14e and refreshed head 28b2af322a1fab01b3734365988930920f9dda48. + +SYLforge supplied the #7669 composition, native source pins and literal caller. Its preserved parent provenance is peer/source/7669-CREDITS.md. Retain DreamingOfClouds' #7641/#7658 lineage, Clear1nsight's integer scalar/contact work including #7612, ToikY's #7643 contact-rechart precedent, Rohan Arun's #7113 signed-caller lineage, 5080's helper work, and all other contributors named in the original records. Ali Romman's #7663 exact-grid and extent proof and #7666/#7670 selection and guide work supply relevant implementation precedents. Jerry Chen (CubeJerry) supplied the selected #7000/#7001 applications and #7586 typed initialization. Douglas Colkitt and the authors in the original notices supplied the frozen native compiler, independent checker, price evaluator and package infrastructure. + +The release base reuses ToikY's exact shared CI and historical replay sync 0eabc624a9bc9ed2847719efd63390db4d297df4 above canonical e54523517d0f03e58352e647c403a5af3e525a57. This workflow provenance is separate from the banked construction and its mathematical comparison. + +This package credits the original role-230 splice and its same-contract transfer to the unchanged fifteen-pivot graph, the independent exact wire and price replays, matched complete resource accounting and source-bound native and caller verification. The original works retain their authorships and licenses. diff --git a/research/banked-native-order-lower-bound/retained/pr7724/notices/gate-NOTICE b/research/banked-native-order-lower-bound/retained/pr7724/notices/gate-NOTICE new file mode 100644 index 0000000000..1bc9b4da2b --- /dev/null +++ b/research/banked-native-order-lower-bound/retained/pr7724/notices/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-order-lower-bound/retained/pr7724/verify.py b/research/banked-native-order-lower-bound/retained/pr7724/verify.py new file mode 100644 index 0000000000..c201fe02d9 --- /dev/null +++ b/research/banked-native-order-lower-bound/retained/pr7724/verify.py @@ -0,0 +1,199 @@ +"""Construct and check a field allocation on the frozen forward graph of PR 7674.""" + +import argparse +from collections import Counter, defaultdict +import gzip +from hashlib import sha256 +from heapq import heapify, heappop, heappush +import json +from pathlib import Path +import sys + + +ROOT = Path(__file__).resolve().parent +# Clear1nsight, PR 7682, evidence/WIRE-RESULT.json, graphs.peer.canonical_sha256. +GRAPH_SHA256 = "d81ec9f47740852a4bf7bd83100feff5cb66b70e1973466e1609bbac8af75098" +CAPACITY = 2106 + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def read_graph(): + raw = gzip.decompress((ROOT / "PEER-GRAPH.json.gz").read_bytes()) + require(sha256(raw).hexdigest() == GRAPH_SHA256, "wrong forward graph") + return json.loads(raw) + + +def release_order(rows): + """Choose a ready row with the most last-use donors; break ties by token.""" + users = defaultdict(set) + for node, donors in rows.items(): + for donor in donors: + users[donor].add(node) + + last_uses = Counter() + for readers in users.values(): + if len(readers) == 1: + last_uses[next(iter(readers))] += 1 + + pending = {n: sum(d >= 0 for d in donors) for n, donors in rows.items()} + ready = {n for n in rows if pending[n] == 0} + order = [] + for _ in range(len(rows)): + require(ready, "cycle in row dependencies") + node = min(ready, key=lambda n: (-last_uses[n], n)) + ready.remove(node) + order.append(node) + for donor in rows[node]: + readers = users[donor] + readers.remove(node) + if len(readers) == 1: + last_uses[next(iter(readers))] += 1 + for reader in users[node]: + pending[reader] -= 1 + if pending[reader] == 0: + ready.add(reader) + return order + + +def allocate(order, rows, entrances, outputs): + """Assign disjoint closed lifetimes to slots in order of birth.""" + last = dict.fromkeys(entrances, 0) + for event, node in enumerate(order, 1): + last[node] = event + for donor in rows[node]: + last[donor] = event + last.update(dict.fromkeys(outputs, len(order) + 1)) + slots = {node: slot for slot, node in enumerate(entrances)} + active = [(last[node], slot) for node, slot in slots.items()] + heapify(active) + free = [] + capacity = len(active) + for event, node in enumerate(order, 1): + # A last read at this event still occupies a bank during this birth. + while active and active[0][0] < event: + _, slot = heappop(active) + heappush(free, slot) + if free: + slot = heappop(free) + else: + slot = capacity + capacity += 1 + slots[node] = slot + heappush(active, (last[node], slot)) + return slots, capacity + + +def replay(graph, order, slots, capacity): + """Check the supplied order and slots using live owners and unread edge counts.""" + forms = dict(graph["forms"]) + moves = {node: (src, dst) for node, src, dst in graph["moves"]} + entrances = {~i: chart for i, chart in enumerate(graph["initial"])} + outputs = {graph["first_output"] + i: chart for i, chart in enumerate(graph["final"])} + require(len(order) == len(forms) and set(order) == forms.keys(), "row inventory") + require(slots.keys() == entrances.keys() | forms.keys(), "slot inventory") + require(all(0 <= slot < capacity for slot in slots.values()), "bank capacity") + + owners = {slots[token]: (token, chart) for token, chart in entrances.items()} + require(len(owners) == len(entrances), "entrance bank collision") + reads = Counter(d for row in forms.values() for d, _ in row) + total_reads = reads.total() + peak = len(owners) + peak_event = 0 + for token in entrances: + if reads[token] == 0: + del owners[slots[token]] + for event, node in enumerate(order, 1): + src, dst = moves[node] if node in moves else (outputs[node], outputs[node]) + require(slots[node] not in owners, "overwrite of a live bank") + owners[slots[node]] = (node, dst) + if len(owners) > peak: + peak, peak_event = len(owners), event + + # The frozen row carries its original ordered list of (donor, coefficient). + for donor, _ in forms[node]: + require(owners.get(slots[donor]) == (donor, src), "missing donor or wrong chart") + + # Release only after every donor was read and the child returned. + for donor, _ in forms[node]: + reads[donor] -= 1 + if reads[donor] == 0: + del owners[slots[donor]] + if node in moves and reads[node] == 0: + del owners[slots[node]] + + require(all(count == 0 for count in reads.values()), "unconsumed scalar reads") + require(len(owners) == len(outputs), "unexpected owner at installation") + for token, chart in outputs.items(): + require(owners.pop(slots[token], None) == (token, chart), "missing public output") + require(not owners, "incomplete final retirement") + return peak, peak_event, total_reads + + +def negative_controls(graph, order, slots): + forms = dict(graph["forms"]) + # The first nonempty row's first donor has to coexist with its result. + node = next(n for n in order if forms[n]) + donor = forms[node][0][0] + collided = dict(slots) + collided[node] = slots[donor] + for assignment, capacity, expected in ( + (collided, CAPACITY, "overwrite of a live bank"), + (slots, CAPACITY - 1, "bank capacity"), + ): + try: + replay(graph, order, assignment, capacity) + except ValueError as exc: + require(str(exc) == expected, f"unexpected rejection: {exc}") + else: + raise ValueError(f"accepted negative control: {expected}") + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + mode = parser.add_mutually_exclusive_group() + mode.add_argument("--certificate", action="store_true", help="print the complete allocation as TSV") + mode.add_argument("--receipt", action="store_true", help="print the computed result and hashes") + args = parser.parse_args() + graph = read_graph() + rows = {n: tuple(d for d, _ in terms) for n, terms in graph["forms"]} + entrances = [~i for i in range(len(graph["initial"]))] + outputs = range(graph["first_output"], graph["first_output"] + len(graph["final"])) + order = release_order(rows) + slots, capacity = allocate(order, rows, entrances, outputs) + peak, event, terms = replay(graph, order, slots, capacity) + require(peak == capacity == CAPACITY, "wrong allocation peak") + negative_controls(graph, order, slots) + + certificate = ["event\ttoken\tbank\n"] + certificate.extend(f"0\t{n}\t{slots[n]}\n" for n in entrances) + certificate.extend(f"{i}\t{n}\t{slots[n]}\n" for i, n in enumerate(order, 1)) + data = "".join(certificate).encode("ascii") + paid = len(graph["moves"]) + homes = capacity + 1 + 4 + lifetimes = len(slots) + paid + 4 + receipt = { + "graph_sha256": GRAPH_SHA256, + "verifier_sha256": sha256(Path(__file__).read_bytes()).hexdigest(), + "certificate_sha256": sha256(data).hexdigest(), + "entrances": len(entrances), "paid_rows": paid, "terminal_rows": len(outputs), + "row_events": len(order), "snapshot_assignments": len(slots), "scalar_terms": terms, + "snapshot_banks": capacity, "first_peak_event": event, "first_peak_token": order[event - 1], + "private_homes_per_occurrence": homes, "private_homes_for_16": 16 * homes, + "lifetimes_per_occurrence": lifetimes, "full_resets_per_occurrence": 2 * lifetimes, + "reset_allowance_for_16": 16 * (2 * lifetimes + 4 * (terms + len(order))), + } + if args.receipt: + print(json.dumps(receipt, indent=2)) + elif args.certificate: + sys.stdout.buffer.write(data) + else: + require(receipt == json.loads((ROOT / "RESULT.json").read_bytes()), "receipt mismatch") + print(f"PASS_BANKED_NATIVE_ROW_ORDER {capacity} banks, {homes} private homes, {terms} reads") + + +if __name__ == "__main__": + main() diff --git a/research/banked-native-order-lower-bound/verify.py b/research/banked-native-order-lower-bound/verify.py new file mode 100644 index 0000000000..77ffc0de19 --- /dev/null +++ b/research/banked-native-order-lower-bound/verify.py @@ -0,0 +1,220 @@ +"""Check the all-order bank bound and the exact single-anchor rank ceiling. + +Retained graph and upper-bound allocation: Nick Petalas, PR7724. +The graph, bank contract and integer coefficient method retain PR7674/7681 credit. +Ali Romman, with substantial OpenAI Codex assistance. Apache-2.0. +""" +from collections import Counter, defaultdict +from copy import deepcopy +from fractions import Fraction as F +from hashlib import sha1, sha256 +from math import isqrt +from pathlib import Path +import json +import runpy + +HERE = Path(__file__).resolve().parent +SOURCE = runpy.run_path(str(HERE / "retained/pr7724/verify.py")) +GRID, PRIME = 530841600, 1000003 + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def encoded(value): + return json.dumps(value, sort_keys=True, separators=(",", ":")).encode() + + +def members(mask): + while mask: + bit = mask & -mask + yield bit.bit_length() - 1 + mask ^= bit + + +def provenance(): + pins = json.loads((HERE / "SOURCE-PINS.json").read_text()) + for pin in pins: + raw = (HERE / pin["path"]).read_bytes() + need(sha256(raw).hexdigest() == pin["sha256"] + and sha1(b"blob " + str(len(raw)).encode() + b"\0" + raw).hexdigest() == pin["git_blob"], + "retained bytes: " + pin["path"]) + return len(pins) + + +def mandatory_sets(graph, forms): + initial = [~i for i in range(len(graph["initial"]))] + order = initial + graph["schedule"] + need(len(set(order)) == len(order) and set(graph["schedule"]) == forms.keys(), "complete DAG inventory") + index = {v: i for i, v in enumerate(order)} + bits = {v: 1 << i for v, i in index.items()} + users = defaultdict(list) + for node, row in forms.items(): + need(len({d for d, _ in row}) == len(row), "distinct literal donors") + for donor, _ in row: + need(donor in index and index[donor] < index[node], "topological source order") + users[donor].append(node) + terminals = set(range(graph["first_output"], graph["first_output"] + len(graph["final"]))) + need(all(not users[v] for v in terminals), "terminals have no row consumers") + ancestors = dict.fromkeys(initial, 0) + for node in graph["schedule"]: + mask = 0 + for donor, _ in forms[node]: + mask |= ancestors[donor] | bits[donor] + ancestors[node] = mask + descendants = {} + for node in reversed(order): + mask = 0 + for user in users[node]: + mask |= descendants[user] | bits[user] + descendants[node] = mask + row_mask = sum(bits[v] for v in graph["schedule"]) + result = {v: [] for v in graph["schedule"]} + for owner in order: + before_use = 0 + for user in users[owner]: + before_use |= ancestors[user] | bits[user] + live = before_use & (row_mask if owner < 0 else descendants[owner]) & row_mask + for at in members(live): + result[order[at]].append(owner) + need(all({d for d, _ in forms[v]} <= set(result[v]) and v not in result[v] for v in result), + "all donors and a separate new result") + return result, users + + +def coefficients(graph, forms): + values = {~i: {i: GRID} for i in range(len(graph["initial"]))} + count = 0 + for node in graph["schedule"]: + row = {} + for donor, factor in forms[node]: + for column, value in values[donor].items(): + part, remainder = divmod(factor.numerator*value, factor.denominator) + need(remainder == 0, "exact coefficient product") + total = row.get(column, 0) + part + if total: + row[column] = total + else: + row.pop(column, None) + count += 1 + values[node] = row + return values, count + + +def rank_mod(tokens, values): + basis = {} + for token in tokens: + row = values[token].copy() + while row: + pivot = min(row) + factor = row[pivot] + if pivot not in basis: + inverse = pow(factor, -1, PRIME) + basis[pivot] = {i: value*inverse % PRIME for i, value in row.items()} + break + for i, value in basis[pivot].items(): + total = (row.get(i, 0) - factor*value) % PRIME + if total: + row[i] = total + else: + row.pop(i, None) + return len(basis) + + +def check_certificate(cert, sets, users, values, modular): + anchor = cert["anchor"] + owners, basis = cert["owners"], cert["basis"] + need(owners == sets[anchor] and len(owners) == 24 and len(set(basis)) == len(basis) == 19 + and set(basis) <= set(owners), "complete forced owner set and basis") + need(rank_mod(basis, modular) == 19, "basis independence") + paths = cert["paths"] + need([row["owner"] for row in paths] == owners, "path owner inventory") + for row in paths: + owner, use = row["owner"], row["use"] + birth, future = row["birth_path"], row["future_path"] + need((not birth if owner < 0 else len(birth) >= 2 and birth[0] == owner and birth[-1] == anchor) + and future[0] == anchor and future[-1] == use and use in users[owner], "path endpoints") + need(all(b in users[a] for path in (birth, future) for a, b in zip(path, path[1:])), + "literal dependency path") + dependents = set(owners) - set(basis) + need({row["dependent"] for row in cert["relations"]} == dependents + and len(cert["relations"]) == len(dependents) == 5, "five relation pivots") + products = 0 + for row in cert["relations"]: + terms = {v: F(q) for v, q in row["coefficients"]} + need(len(terms) == len(row["coefficients"]) and terms.get(row["dependent"]) == 1 + and set(terms) <= set(basis) | {row["dependent"]}, "triangular relation support") + residual = defaultdict(F) + for token, factor in terms.items(): + for column, value in values[token].items(): + residual[column] += factor*value + products += 1 + need(not any(residual.values()), "nonzero rational relation residual") + return dict(anchor=anchor, forced_owners=24, exact_rank=19, exact_defect=5, + independent_relations=5, rational_relation_products=products, + literal_path_edges=sum(len(row["birth_path"]) + len(row["future_path"]) + - int(bool(row["birth_path"])) - 1 for row in paths)) + + +def calculate(): + pins = provenance() + need(PRIME > 1 and all(PRIME % d for d in range(2, isqrt(PRIME)+1)) and GRID % PRIME, + "prime field and invertible grid") + graph = SOURCE["read_graph"]() + forms = {v: [(d, F(q)) for d, q in row] for v, row in graph["forms"]} + sets, users = mandatory_sets(graph, forms) + values, products = coefficients(graph, forms) + modular = {v: {i: z % PRIME for i, z in row.items() if z % PRIME} for v, row in values.items()} + outputs = range(graph["first_output"], graph["first_output"] + len(graph["final"])) + endpoint_rank = rank_mod(outputs, modular) + need(endpoint_rank == len(graph["initial"]) == len(graph["final"]) == 1501, "full endpoint information") + cache, defects, trace = {}, Counter(), sha256() + maximum_size = max(map(len, sets.values())) + for anchor in graph["schedule"]: + owners = tuple(sets[anchor]) + if owners not in cache: + cache[owners] = rank_mod(owners, modular) + defect_upper = len(owners) - cache[owners] + need(defect_upper <= 5, "all-anchor rational defect upper bound") + defects[defect_upper] += 1 + trace.update(encoded([anchor, owners, cache[owners]]) + b"\n") + cert = json.loads((HERE / "CERTIFICATE.json").read_text()) + witness = check_certificate(cert, sets, users, values, modular) + bad_relation, bad_path = deepcopy(cert), deepcopy(cert) + bad_relation["relations"][0]["coefficients"][0][1] = "1" + bad_path["paths"][0]["future_path"] = [cert["anchor"], cert["owners"][0], bad_path["paths"][0]["use"]] + rejected = [] + for changed, reason in [(bad_relation, "nonzero rational relation residual"), + (bad_path, "literal dependency path")]: + try: + check_certificate(changed, sets, users, values, modular) + except ValueError as error: + need(str(error) == reason, "certificate control reason") + rejected.append(reason) + else: + raise ValueError("changed certificate accepted") + rows = {v: tuple(d for d, _ in row) for v, row in graph["forms"]} + order = SOURCE["release_order"](rows) + slots, capacity = SOURCE["allocate"](order, rows, [~i for i in range(1501)], outputs) + peak, event, reads = SOURCE["replay"](graph, order, slots, capacity) + need(peak == capacity == 2106 and reads == 169343, "retained attaining upper bound") + lower = endpoint_rank + witness["exact_defect"] + 1 + return dict(status="PASS_BANKED_NATIVE_ORDER_LOWER_BOUND", graph_sha256=SOURCE["GRAPH_SHA256"], + source_pins=pins, coefficient_products=products, grid=GRID, prime=PRIME, + endpoint_rank=endpoint_rank, row_anchors=len(sets), distinct_forced_sets=len(cache), + forced_owner_incidences=sum(map(len, sets.values())), maximum_fixed_forced_owners=maximum_size, + modular_defect_upper_histogram={str(k): v for k, v in sorted(defects.items())}, + complete_rank_trace_sha256=trace.hexdigest(), witness=witness, + universal_snapshot_lower_bound=lower, single_anchor_rank_family_ceiling=lower, + source_order_upper_bound=capacity, remaining_bank_gap=capacity-lower, + upper_bound_replay=dict(first_peak_event=event, donor_reads=reads), + rejected_certificate_controls=rejected, + scope="All legal row orders under the retained distinct-snapshot contract; the 1507 ceiling applies only to the stated single-anchor rank bound, not to the global optimum.") + + +if __name__ == "__main__": + result = calculate() + need(result == json.loads((HERE / "RESULT.json").read_text()), "receipt mismatch") + print(result["status"], result["universal_snapshot_lower_bound"], "<= optimum <=", result["source_order_upper_bound"])