diff --git a/research/helper-minimality/LICENSE b/research/helper-minimality/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/helper-minimality/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/helper-minimality/MANIFEST.sha256 b/research/helper-minimality/MANIFEST.sha256 new file mode 100644 index 0000000000..75c5bb333f --- /dev/null +++ b/research/helper-minimality/MANIFEST.sha256 @@ -0,0 +1,69 @@ +c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSE +b9aee8d523d7cf7c25d4548a044657bd01964107e7bed053d92e303b16653f07 NOTICE.md +cbcf1bc5d35c247a42439669e449a592fb52e5094869a232213bf588d7ff00b4 README.md +22ccac9703500587fa05b6284c57559fbe9659b9e941a088b6fda79316769482 SOURCES.json +7bd22be98f336f6e58c0bc1f38b948f102d3eba7dff3caf29b3fd3a2eb0469b0 cards/B128/coord.py +e750f48b8a152c838165d18dd8eca47e0fda8194ef5326471a7724e6817f8687 cards/B128/retest.py +56029079e362b109f83132f248eca3ce484c7a5af24493c18fab4a9fa647a1c8 cards/B147/oracle799.py +f552309f82e970a38e94aef9a981cd7d5beeb76529da4be5b35575ee2892c89d cards/B155/ex.py +93289645ae06578e38ae521d8728dfce95689cef9bcb762dfba721707a1a66c4 cards/B159/ilp.py +2dedc34977390e08333a9e053e10236ae5cbeac5b9027173cf573fa4772b90e6 cards/B159/mdl.py +0142c631c1a5c3c665e0f301ef107ac5b77b6968a8620ea061c7425a6953c35a cards/B159/pairsio.py +d3da4b285f9a5c3ef130bf1804f2fd28ce21ab3ea25f5910efeaa9d03855bd39 cards/B167/blockscan.py +c3a95a569b6f73dcf3b558c7413419cd5f43f7cbff8bca7f795664c88359fed3 cards/B167/extract.py +86b8cb622061125eb1c274132a7f8123e01f5116688b9100c98881684819f70e cards/B167/level.py +33ac32a805f64fce7bbcc11fe6b2db8f5efceb7f9dc8593021be2d10181ee20e cards/B171/lawler799.py +09a6a0d97c706739ee1835b97a8b235f3ac2bee9860cea38cf69d6a63c701076 cards/B171/pair799.py +541f2d45c128603c9646ba6037c5df8651aec10d93c16076ec4893de98d0ee89 cards/B171/scan01.py +7df7f1e42648692b158b2796c03649e66e6ec328b4e6f10fa10abd32d3c37704 cards/B171/scan01b.py +c39e5900db3b3a351dbd8fcf127fe3819a6134596ba3b7b2587ff54f0b3dadd8 cards/B174/check.py +b7ab02a5700c7ac12ae8380d54b1ca003037c4b3d965e3485275dfcd62d7deb7 cards/B174/clique.py +d5763ffa07b5ca7ff3cf54f887c8ccd43a91b83461b4e97a3cb6d315de804f17 cards/B176/common.py +3a6e5403e192e71b76d58eafe021bdefc25f7670058ae43f32e13e2ba6f84333 cards/B176/val.py +9055546f03c392be6e0b7a5d7f5eb8858492d1b2782a6c68b511a62096367331 cards/B179/gate.py +1f375bfafcb1ae7105d1b3424325760b19523a8627d02c73ce764073495d066b cards/B179/gate2.py +528b59311b0fe289c8cef3bd3d05f444fc3efa2ea8650ca61556f098d4fbb281 cards/B182/b182.py +462d6078257354db5f15cbed75892b1b6f7b7916a81053c3eadfeb6371ecfedc cards/B98b/dyad.py +e6b1416b1b7052a2954b328dc5c618d5d6b097ebedbd0ac6d4ad24eea8ebe051 cards/B98b/iface.py +796ed379bc8edb6f7d836714b8765f873fbdb9478904de3f81ef855181745c1c cards/B98b/synth.py +6b7248e9f282174fe6f0fdabd7d9eeba059500e8364eff5b1420cf12efd626f7 cards/B98c/work/gate.py +22e11f58aac15380322a4e1e589187ecb3f041e995fbf5becee0b52af02c0ce2 cards/B99/work/fr.py +819053900ff1d49528f8d78a662ab9ef54832acf7d2f9899e49f5381e9ff62a3 cards/B99/work/lib.py +9647ede25d85eb4ed3c05512d3a9d3baf62537e9b5ef0685c590bfe3d71e1d75 cards/B99/work/rep.py +a8a0436efeedc5c7c6e9fd4715fc00fdae03de5fa8f2b18ad792d24be1fa39e5 cards/SYN-18/planes.py +0252eb13c800d840fc20bd472a8c3a125b95ec656c4a85b097820360e8091e15 checks/anchors.py +7d926468671ec30a3ab2fa2f39eb706de683774e4ea37b3f068ac7383dabbff4 checks/b128_table.py +fb18332a3adb4842c3662346aa7f6b5115debc04f1a392b6e9cbb423b7b83c8d checks/expect.py +ca65d570e63db75a9cd1838247f93bfdd8340dcc9f5d6ebe964ec138e64244cb checks/lawler_check.py +71e9de3515535adb1060e4149b590e6f3ad3a72b31eb06db5ce8f27336fa4b1f checks/make_toy.py +039de8726d9019e2d70fe1f70e98f194fa90151bd5476362684e3a2c32e11e35 checks/pairs_sample.py +5921df2221a76bbafa733835c9a68ff5be984cf4ed99cc420ad742fceb391755 evidence/B128-NOTES.md +bdde724b3d8113f5b024e211566479073abfb5f3d4a96fdca169fa1eab17860b evidence/B128-all.txt +7dbd405b2dcc8eb370feef32b867d6b12b7dce7b5cd9ad524c4f37bcf1cdc028 evidence/B155-NOTES.md +729d07bb52352eaf441228be28352c5d0efdab8927440298b6308313eec66dc0 evidence/B159-NOTES.md +9e371abf5132377e95a8a79e2a046bdc8263d71ccc03905c91e5e48d0ccd2a37 evidence/B167-NOTES.md +b45756d3f9097c182986329b62346d0d136aabe020d549641642b998a538516d evidence/B171-NOTES.md +023a4b5ff6610351e101731ce99be6bada712fe2a5fad4eb1a8005c2e9c229ca evidence/B172-NOTES.md +9968a78b131d89e0d262745f07c67104613fbdc366307ac6310d79c4947ae43d evidence/B174-NOTES.md +e2ae6da673123f9a86ad72203c55a4f2a52c61b3e6c23b0b324d7e155389d5e1 evidence/B175-NOTES.md +8c37caeb2b3188c12708bb897ee7cefa7febe1f89ff71cba5600514fbcdebee5 evidence/B176-NOTES.md +6d18ed47c6036ae81db423b4c7dc91610505a4ccc0c5851a784af5951818eb27 evidence/B178-VERIFIER-GAP.md +1ecb165c212c3acd476eb68b83189292e0f763407f30cff0eb45c4c7fabdf259 evidence/B179-NOTES.md +2e1eccb47d6631103e18eed03c29d1d8d9c935fa4eecd7cd758e99fd5d06ff03 evidence/B182-NOTES.md +4fa578a6aafba5b429a864505caec1688a54e274223b4bf0a989bbfaff37f8db evidence/B185-NOTES.md +9cbf48e3c0932ce286826b3a5807432a193275a5f4a6830a52401cbdacde0d54 evidence/B82-NOTES.md +cc5716bea4a523255b96add72427910c6606c7f3654c8a63652aa7df674ac339 inputs/derived/pairs.json.gz +71469db91a3c5672312dde85a9e463d5a6c4527b7cb6f2e2a03594eb59add409 inputs/ledger_helpers.csv +ed76761194988a01af77ead0ea6469cb5dcd29690ab985a0b5a4006b0f2b69bb inputs/main/03-motifs.tex +7e4a6fbc38c8228157b6311457d1496bf460291393043932d2c365f004f77805 inputs/pr635/hpe_emit_local.py +a87d7f4844ca963516637d249b14a0654f67f8047b6b265ae25b0cf30963e503 inputs/pr799/code/audit_allcold.py +17c110c7c8d219e79e7dce36b19c4781e7effa800086cec03384387ad9acc7aa inputs/pr799/code/emit_allcold.py +d8d295566ef2399af2da0707a4adc83e07aa26d2344c01a66bd0ca7684cf9217 inputs/pr799/construction/construct_gauge_xcentre.py +03afcfc9da428b3f6edac81c1fee7f277ab81b64998efae78380b63498dec6cd inputs/pr799/independent/audit_local.py +72a4952751383e2a5e84b967f1e76fdfda003fe5592df357a599232e586817e3 inputs/words/656-CANONICAL-WORD.json.gz +e2434318d38e5ab7d04d236e67f0da5b77a0fe57dfed9d817a83081921756c64 inputs/words/656-layers-FULL-WORD.json.gz +f1c2ede9276d4447c5857d0e9d32adb52f987b8adb643b45bde2c172d88c6ee9 inputs/words/799-X4-CANONICAL-WORD.json.gz +fc96c6dfb3e03efc144c2d0d1abd605a1b1bc081d39a5de27f21675864ecc766 inputs/words/799-X4-FULL-WORD.json.gz +d9a1f72b43ce1a97d5e39e2a910f1e365fdc960bee98dbfc5c47b05cb0a9a953 requirements.txt +78362221d7cba70b6e751338971feed720f7deba5965eeafa55fc24bd45cd4ed scripts/provenance.py +931d551308db32c582ec86de9e52576f97d1f8ea5a9eaeefbcd18785e5b811b0 verify.sh diff --git a/research/helper-minimality/NOTICE.md b/research/helper-minimality/NOTICE.md new file mode 100644 index 0000000000..9f9f46ec73 --- /dev/null +++ b/research/helper-minimality/NOTICE.md @@ -0,0 +1,37 @@ +# Notice + +Prepared by DreamingOfClouds with Claude Opus 5.5 (Anthropic), via Claude Code; Apache-2.0 (`LICENSE`, copied from the repository root). + +## New in this package + +`README.md`, `verify.sh`, `scripts/provenance.py` (adapted from #717), `SOURCES.json`, `requirements.txt`, `MANIFEST.sha256`, everything under `checks/` and +`cards/` (the swarm's card scripts, path edits only as listed in the README), `evidence/` (card notes, local paths removed) and the stored +pre-read pair table `inputs/derived/pairs.json.gz`. + +## Vendored, unchanged (git blob ids in `SOURCES.json`, checked by `scripts/provenance.py`) + +- **#799** (jeremykothe2), commit in `SOURCES.json`: `independent/audit_local.py` (the verifier AL), `code/audit_allcold.py`, `code/emit_allcold.py`, `construction/construct_gauge_xcentre.py` (line anchors of the cut hypothesis). +- **#635** (jeremykothe2): `hpe_emit_local.py` of the cold14 st2 code, taken from the copy on main (`research/complex-sw4-frame8/local/`); its sha256 equals the pin in #799 `construction/INPUTS.json`. +- Main at the base commit: `upstream/build/sections/03-motifs.tex` (spec schedule lines 78-83). + +## Rebuilt words and derived inputs (not files of any PR) + +The #656 canonical and layered words and the #799 X4 canonical and full words are rebuilt locally from the PRs' construction code and pinned by +the hashes the PRs publish (`SOURCES.json`, `derived`). `inputs/ledger_helpers.csv` is the #656 helper ledger (byte-identical modulo CRLF to +`research/format-limits-2` #717, `s3-4-census-gauges/evidence/C1/ledger_helpers.csv`). + +## Results and constructions this package builds on (credit) + +- **#717** (DreamingOfClouds, open) and **#595** (DreamingOfClouds, merged): the census of the helper sites (S1, S3, S4), the invoice and the format lemmas; rows F3-F5 of #717 record the value-side facts that the frame bounds here complement. +- **#656, #659, #664, #799** (jeremykothe2): the gauge44 layered and no-triangle lineage, entrance promotions and the X4 joint exchange whose words are analysed; **#645** (icekylinx): Gauge44; **#622, #623** (jeremykothe2): the K-triangle skeleton and the ck/jp8 providers; **#635** (jeremykothe2): the emitter and cold14 pipeline. +- **#741, #685** (chafreaky): the eight B-frame coalescences and the entrance promotions in #799's lineage. +- **#869, #870** (jeremykothe2): the eight block-0 hybrid deliveries (B2 cites card B169, not #869, for "legal only for 450..457") and the U8 owner-controller word (not analysed here). +- Lawler, Management Science 19(5):544-546 (1973), for the backward rule; Boyar and Find 2013 for the cancellation-free contrast. + +## Overlap check with recent swarm PRs + +- **#698** (thakrarsagar): the selected CK supplier's B-phase frames are optimal at fixed boundaries. Related to the frame lattice used here, but a different object: fixed gate order with exact end-of-B frames (CK B frames), against the order-free L2/L3 bounds here on helper copies. +- **#719**: rank-two obstruction for the 78 CK cleanup pairs. Related to the pair conflicts (L4) and to the multiset-changing merges of open problem 2; a different object (CK cleanup pairs, not helper copies), no row duplicated. +- **#705** (littleBro): determinant obstruction for rank-homogeneous register paths. Related to the cut/centre count (K1) only loosely: a different model (Clifford words) and a different argument. +- **#687** (cbethin) and **#683** (Mister-Meeseeks): a K-triangle relocation neighbourhood and a four-carrier bound for partial K/M face bypass. Different objects, no row duplicated. +- **#716** (thakrarsagar): R420 target pairs save XORs; not the same objects (the register ids 716..727 in row B1 are bridge registers, not PR numbers). diff --git a/research/helper-minimality/README.md b/research/helper-minimality/README.md new file mode 100644 index 0000000000..fdc19e2ac8 --- /dev/null +++ b/research/helper-minimality/README.md @@ -0,0 +1,145 @@ +# Helper minimality (no κ claim): the shipped helper layers of the #656 / #799 words are minimal for their op multiset + +This package states and checks lower bounds on the helper layers of the shipped frontier words: the 11 eight-line S1 blocks, +the S3/S4 packet copies, the 12 bridges and the entering/holder copies, the 8 cut centres, and the pre-read targets. It continues +`research/format-limits-2` (#717) and the merged #595 (rows F3-F5 of #717 record the same facts as value and exact-replay statements; the +rows here are the frame-side bounds with their scope). **It makes no κ claim and ships no word.** Each result comes with its scope and +hypotheses. Each is marked: + +- **CHECKED**: `verify.sh` recomputes it from the files listed below (exact arithmetic; solver results are solver statuses, no certificate file is shipped); +- **ARGUED**: a proof or file:line argument in this README; the quoted lines and every quantity the argument uses are themselves checked where stated; +- **RECORDED**: the result of an earlier run that `verify.sh` does not repeat. The card note is shipped under `evidence/`; the row says what is not reproduced. + +A row marked CHECKED for only part of its statement says which part. + +```sh +python3 -m pip install -r research/helper-minimality/requirements.txt +bash research/helper-minimality/verify.sh /fresh/output/dir # from a checkout or `git archive` of the whole repository +HM_FULL=1 bash research/helper-minimality/verify.sh /fresh/output/dir # also regenerates the 36,501-pair pre-read table (about 5 min) +``` + +Python ≥ 3.11; `requirements.txt` pins numpy and ortools (CP-SAT); set `PYTHON` to choose the interpreter. Step 0 checks the package +against `MANIFEST.sha256` (every file) and every vendored input against its pin in `SOURCES.json` (git blob ids of PR files, sha256 and +content hashes published by the PRs for the rebuilt words), and stops with exit 1 on any mismatch. Then four check groups run at once and +print one `PASS`/`FAIL` line per assertion. Nothing outside the package directory is read; scratch files go to the output directory. +Default: see "Tested" below. + +## Words and verifier + +- **#656 word**: the gauge44 layered word (`inputs/words/656-CANONICAL-WORD.json.gz`, `656-layers-FULL-WORD.json.gz`), 492 helpers, pinned by the hashes #656 publishes. +- **#799 word**: the X4 word (`799-X4-CANONICAL-WORD.json.gz`, `799-X4-FULL-WORD.json.gz`), 504 helpers, 5687 add ops, pinned by the hashes #799 publishes + (the PR ships the construction, not the X4 word; the words are rebuilt from it and compared with its pins). +- **AL** = `inputs/pr799/independent/audit_local.py` (git blob in #799), the verifier whose frame rules the rows use. + +## Model and hypotheses (shared by all rows) + +- Registers carry a GF(2)-subspace frame. Every A/B/tail op declares its own frame `e[-1]` (AL:31, :138); `climb(q, e[-1])` requires `contained(cur[q], U)` for **both** operands (AL:122, "frame not monotone"), so frames only grow and an op frame is a common frame (join) of both operands. Nothing about values is checked at an ADD. +- `cur[]` is assigned only at AL:117, :120 (start) and :125 (climb); the centre loop (:130-136) changes only the local billing set. End caps: `climb(q, end[q])` (AL:115, :142); target registers end in `perp(port)`, the rest at the full space. The ports are 112 odd-weight vectors of F₂⁹. +- The minimal legal declaration of an op is the join (span-sum); declaring more only adds climbs. All bounds below are bounds on this **frame** lattice. +- **FOM (fixed op multiset)**: the set of ADD/scale ops is unchanged; only order and register assignment may change. Unless a row says otherwise, theorems are for FOM. +- **Interface**: S1 rows are stated **given the shipped end-of-A frames as bounds** (the 24 own registers of each block: their shipped bounds and end-of-A rows) and the value targets (value-forced). The case where the later readers' true caps replace the shipped frames is **open** (as in #717); see open problem 3. +- **Lawler frames `g` (L2, L3, B1, N1)**: `g` is the partner's frame in the **shipped order**: the target-side replay over every add, value-zero frame-courier adds included. It is a lower bound for an arbitrary reordering only where the frame is value-forced (distinct-source independence, the B172 caveat). Shipped check: recomputing `g` while skipping the value-zero adds (1921 on #656, 2317 on #799; source row empty) still gives 268/268 FAIL on both words (`cards/B171/lawler799.py`, `S2.skipzero-*`). The hypothesis is still a hypothesis; the rerun shows the result does not depend on the courier adds. +- **H-CUT** (cut row only): every cut op is `add target<-q` with `q` a centre, and no centre is a target. AL does not enforce it (AL:132 reads only dest/src of cut ops; AL:88 covers A and B). It is enforced by the generator (`construct_gauge_xcentre.py:344, :360`), by `len(centers)==8` (`audit_allcold.py:75`, `emit_allcold.py:41`), and by the emitter, which keeps only centre-sourced cut terms (`hpe_emit_local.py:94`); the spec schedule fixes the scatter and gather as gates on targets/sources and the centre (`03-motifs.tex:78-83`). Row K3. +- **Cancellation**: the S1 and Lawler counts are support/frame bounds, not cancellation-free-delivery statements (contrast Boyar–Find 2013). A frame is the running join of everything a register ever received; cancellation changes values, not frames, and a correcting ADD is one more visit whose frame also joins. So, for the S1 bound (given the shipped end-of-A frames) and the Lawler bounds (under the `g` hypothesis above), cancelling programs with the same op multiset are covered. This is not claimed for the other rows. Adding undo/redo ADDs changes the multiset and is outside (open problem 2). Row N1, `evidence/B185-NOTES.md`. + +## Results at a glance + +22 rows by primary status: 13 CHECKED, 4 ARGUED, 5 RECORDED (rows partly CHECKED say so). + +| id | result | status | +|---|---|---| +| H1 | **S1 Hall lemma.** In each of the 11 S1 blocks with 8 lines, 15 registers (16 shipped) are infeasible: the number of whole-bound registers (8) is at least the number of plane stoppers (8, distinct planes), a perfect matching is forced, so every whole-bound register is indispensable, the "never read" ones included. Given the shipped end-of-A frames as bounds (true-cap case open). | counts CHECKED (candidate partners = wide registers, asserted in all 11 blocks); lemma ARGUED | +| H2 | Independent solver check on block (4,5,6,7): dropping register 433 makes the level model (F₃ relaxation of values, no lemma, any horizon) INFEASIBLE (sound for dyadic coefficients and the 4-level lemma, see H2-H4). | CHECKED (CP-SAT status) | +| H3 | The 38 "twin couriers" are whole-bound registers of H1 (38/38; drawn from base+1, +3, +5, +10 in the 11 blocks, a set that holds 44). They are long-lived A working registers (19-25 source reads each), not copies: 0 of 38 equals its partner P (value-forced, B176). This closes the twin-fusion route only, not the true-cap case of H1. | CHECKED | +| H4 | Borrowed-target plane jump: of the 88 stoppers, 0 have a holder of the l₂ piece and 0 have a point-holder escape. | CHECKED | +| H5 | Re-balancing the 12 demand planes of block (4,5,6,7): c_B = 2.0 per plane both ways, full move net 0, partial move −2 per plane (count level, not an op-count price). | RECORDED | +| H6 | **Blocks (0,1,2,3), (0,1,4,5), (0,1,6,7): the Hall bound is slack** (21 stoppers on 21 distinct planes match 21/21 using line registers alone; scratch alone matches 15/21). So scratch minimality there is **unproven, not refuted**. | CHECKED (negative scope) | +| L1 | The order-free Lawler oracle (`lawler`) agrees with exhaustive search over all orders on 3000 seeded random instances (80 feasible), returns a feasible order when it returns one, and separates a mergeable from a conflicting synthetic pair. | CHECKED | +| L2 | **S3/S4 on #656:** no copy pair can be merged by any reordering: 268/268 FAIL (S3 156, S4 112), each chain alone passes (caps not over-tight). | CHECKED; reading ARGUED | +| L3 | **S3/S4 on #799:** the same on the X4 word: 268/268 FAIL (5687 add ops, 156 + 112). | CHECKED; reading ARGUED | +| L4 | Every copy already has a two-visit conflict (one visit from each chain): 156 + 112 pair conflicts on each word. | CHECKED | +| L5 | Value classification of the 156 S3 copies on #656: 124 value-feasible with one packet, 32 both-mutated; all 112 S4 both-mutated, so 144 need extra undo/redo ADDs. | RECORDED (B82/B172) | +| B1 | **Bridges and holders on #799:** the 12 bridge registers 716..727: 12/12 FAIL (each chain alone passes); S3 holder/entering copies in 450..457 and 484..569: 94/94 FAIL; none removable at FOM; the 12 bridges have pairwise distinct 8-supports. | CHECKED | +| B2 | Merging a bridge into any other register is value-impossible without undo/redo ADDs (non-proportional 8-supports, overlapping lifetimes B1178..B1916); holder reuse is legal only for the 8 slots 450..457 (card B169; #869 is the eight block-0 hybrid deliveries). | RECORDED | +| K1 | **Cut ≥ 8 centres.** If W passes AL on the 112-port geometry and satisfies H-CUT, the number of centre registers read by the cut is ≥ μ ≥ ω = 8 (μ = minimum rank of a real 112×112 X with X[t,u] = δ_tu on the odd pairs, ω = the largest set of ports with pairwise odd inner product). | ARGUED (every quantity CHECKED, row K2) | +| K2 | On both shipped words: H-CUT holds, F = I, the cut-deleted map F₀ vanishes on odd positions (nnz(F₀) = 5824), rank(F−F₀) = 8 = |K| = ω, the clique {0,3,45,46,69,70,104,107} gives F−F₀ = I₈; AL accepts both words. | CHECKED | +| K3 | H-CUT is not enforced by AL, and this is not an issue for the executed program: a centre-free net-zero cut pair is accepted by AL (CHECKED) and flagged by the H-CUT check (CHECKED); the generator, `len(centers)==8` asserts, emitter line and spec lines quoted above are present at the quoted lines (CHECKED); that the emitter silently drops such terms and the full local chain accepts the toy with an identical emitted event count (24,411) is RECORDED. | ARGUED; anchors, toy CHECKED | +| R1 | **Pre-read layer:** the minimum number of touched pre-read targets on #799 within the move family is 66 (CP-SAT OPTIMAL, bound 66) against the threshold 62; no target can be cleared. | CHECKED on the stored pair table | +| R2 | The move family has 271 moves (84 h2r, 92 r2h, 95 deferrals); 0 of 271 singles and 0 of 36,501 pairs are legal (every |V| ≥ 2); all 271 singles and 150 seeded pairs are recomputed with the exact oracle; with `HM_FULL=1` the whole table is regenerated and compared; 38 of the 46 whole-copy-pair bundles are legal (their net ≤ 0 is RECORDED, B155). | CHECKED | +| R3 | Repair-pair triples (76 pairs × every third move, 20,368): 0 legal, min |V| = 2; target-sharing k ≤ 3 moves and k ≤ 4 pairs: 0 (B155). Ignoring legality the ILP ceiling of the family is 21 touched; the exact build of that move set touches 38 targets and has 104 violations. | RECORDED | +| M1 | **Verifier-model agreement:** the oracle frames equal the AL frames on all 5726 A/B ops of the #656 chain word (register bijection and GF(2) coordinate map), and AL accepts the word. | CHECKED | +| M2 | 272 twin-substitution edits (68 pure helpers × 4 policies) run through AL: all rejected; the number of "frame not monotone" failures equals the oracle `fin_raise` count in 272/272, 0 edits with 0 violations. The shipped table is checked structurally; the equality with the oracle count needs the card oracle, which is not shipped. | RECORDED (table CHECKED) | +| N1 | The S1 and Lawler counts are frame bounds, so they hold for cancelling programs of the same op multiset (see Cancellation above). | ARGUED | + +Relation to #717 (rows F3-F5): there, the S1 scratch, the twin reads and the meet-frame reads are recorded as exact value and replay statements for +the shipped order. Rows H1-H4, L2-L4 and B1 are the order-free frame counterparts with the hypotheses stated. They do not replace F3-F5. + +## 1. S1 blocks + +### H1. Hall/matching lemma (ARGUED; counts CHECKED) +**Statement.** In each of the 11 S1 blocks with 8 lines, k = 15 registers (16 shipped) is infeasible. #whole-bound registers ≥ #plane stoppers = 8; a perfect matching is forced, so every whole-bound register is indispensable. +**Scope.** #656, 11 of the 14 S1 blocks (blocks (0,2,4,6) … (4,5,6,7)), 8 lines, **given the shipped end-of-A frames as bounds** (own 24 registers: shipped bounds + end-of-A rows), any horizon, FOM. The true-cap case (later readers' true caps replace the shipped frames) is open, as in #717. +**Proof sketch.** The 8 line vectors are the points of AG(3,2); every frame is a flat of size 1, 2, 4 or 8. A plane-bound register z whose target row has support all 4 points of its plane Π must, at the meeting where its frame jumps from at most 2 points to Π, meet a partner whose bound contains Π (the join is ≤ both bounds); only whole-bound registers qualify. After serving Π₁ the partner's frame is ≥ Π₁, so it cannot serve Π₂ ≠ Π₁ (the join would be the whole space, above bound(z₂)). The 8 stoppers have distinct planes, so #whole ≥ 8. +**Check.** `cards/B167/blockscan.py` prints, per block, 8 scratch-16, 8 wide, 8 plane stoppers, distinct planes, matching 8, and `cand-eq-wide True`: the candidate partners of every stopper equal the wide registers (11 lines asserted for each). +### H2-H4 +H2: soundness conditions. The F₃ relaxation of the value layer is sound for **dyadic** coefficients; non-dyadic coefficients are outside the stated soundness; "any horizon" rests on the **4-level WLOG lemma** of B167, which is ARGUED in the card only and not re-proved here. `cards/B167/extract.py` builds the block (4,5,6,7) instance from the word and `level.py --drop 433` runs the level model (stable reordering by hull size, F₃ relaxation of the value layer, so UNSAT means infeasible for any horizon); the status INFEASIBLE is asserted (about 50 s). No blind discovery of the 16-register program was achieved by the solver (UNKNOWN in 100 s), so the run is a refutation check, not a replay of the shipped program. +H3: `cards/B176/val.py`; the 38 are whole-bound registers of H1 (38/38; not the same set as the never-read registers), so H3 shows none equals its partner P (the twin-fusion route is closed) but does not close the true-cap case. #717 F3's "16 equal twins" is word-wide (8 pairs in 8 blocks, card B92b), a different set from these 38; there is no contradiction. H4: `cards/B179/gate.py` (A-replay equals the end rows) and `gate2.py`. Scope as H1; H4 needs a second Π-frame l₂ holder to escape and finds none. +### H5-H6 +H5 RECORDED (`evidence/B175-NOTES.md`; its script overwrites a card pickle and is not shipped). H6: `cards/B171/scan01b.py` (stoppers, 21 distinct planes, matching 21 with line registers, 15 of 21 with scratch only, 5 of 7 per block). +**Stated limits.** An interface change (fewer plane-stopper rows, other hyperplanes, a plane register with support ≤ 2) is **not** excluded, and neither is the true-cap case (later readers' true caps instead of the shipped end-of-A frames). B177 (the (0,1,*) blocks) has no verdict at the time of writing. + +## 2. S3/S4 copies: order-free minimality + +**Statement (L2, L3).** No S3 or S4 copy pair can be merged into one register by any reordering: 268/268 FAIL on each word. +**Scope.** FOM; frames `g` in the **shipped order** (see the Lawler hypothesis above: a lower bound for arbitrary reorderings only where value-forced; the skip-zero rerun is also 268/268 FAIL): the partner's frame before an op (target-side replay from the start frames over every add, centre joins ignored: weaker, so sound for FAIL); caps = perp of the ports of the targets reached from the partner, with the two copies a, b treated as sinks; the precedence-free relaxation (no value precedence is imposed). Copies are identified without tags as the first op filling an empty helper row from a non-empty one, restricted to the ledger S3/S4 ids. #870 is not local and was not run. Non-S3/S4 helper pairs: only the B1 classes. +**Proof sketch.** Lawler 1973 (Management Science 19(5):544-546, 1|prec|f_max, least cost last; citation per the card, not re-fetched). A merged register's frame after a prefix is the join of the frames of the visits so far (a nondecreasing set function); an order is feasible iff the join of every prefix lies in the cap of its last visit. Lawler's backward rule decides this order-free: take any visit whose cap holds the join of all remaining visits as the last one; if none exists, no order exists. L1 checks the rule against exhaustive search. +**Checks.** `cards/B171/lawler799.py` (any word; `passing copies 0`), `pair799.py` (156 + 112 two-visit conflicts), `checks/lawler_check.py`. The same script reruns with value-zero adds skipped in the `g` replay (1921 / 2317 skipped): 268/268 FAIL on both words. +**Reuse.** `lawler(visits, base, prec)` is an order-free legality oracle for any "one register serves X and Y" claim. + +## 3. Bridges and holders on #799 (B1, B2) +**Statement.** The 12 bridge registers 716..727 (register ids): 12/12 FAIL; S3 holder/entering copies in 450..457 and 484..569: 94/94 FAIL; removable: 0. **Scope.** #799, FOM, value-forced lower-bound frames, caps = reached-target ports. The frames are the shipped-order frames of the Lawler hypothesis above. The phase-1 frame-courier role of the bridges is ignored (it only adds conflicts, so FAIL stays sound). `cards/B182/b182.py`. + +## 4. The cut needs at least 8 centres (K1-K3) +**Statement (K1).** Let W pass AL on the 112-port geometry and satisfy H-CUT; K = the centre registers read by the cut. Then |K| ≥ μ ≥ ω = 8. The shipped words have |K| = 8 = rank(F−F₀), so `len(centers)==8` is forced for this cut. **Scope.** #656 and #799 (identical numbers); AL has a single cut section at one instant (AL:82, :126-137). Without H-CUT the argument gives rank(F−F₀) ≤ the number of frame-free ops. +**Lemmas.** L0 endpoint identity (AL:106-112). L1 frames are monotone everywhere. L2 path lemma: a time-respecting path u → … → v+t gives cur_end(v+t) ∋ p_u, and the end cap perp(p_t) forces (t,u) even. L3 F₀ (cut deleted) is 0 on the odd positions. L4 the cut block is I+N, N = Σ_{q∈K} n_q e_qᵀ, N² = 0, so rank(F−F₀) ≤ |K|. L5 F−F₀ = F = I on the odd positions, so |K| ≥ rank ≥ μ ≥ ω. Side lemma: a centre frame contains p_u for u in the support of its A-row. +**Checks.** `cards/B174/check.py` on each word prints H-CUT, F = I, F₀ odd nnz 0, rank(F−F₀) = 8 ≤ |K| = 8, ω = 8, the clique submatrix I, the centre-frame lemma; `clique.py`; AL on both words. **Caveats.** μ ≥ ω only; μ = 8 uses the shipped words. The card's premise "the odd part of M has rank 8" is false as stated (rank(M∘Odd) = 112); the right object is the minimum-rank completion. Decoder terms (B14/B27) and all pricing are separate; this is a count. +**K3.** See the hypothesis H-CUT above; `checks/make_toy.py` builds the toy, `checks/anchors.py` checks the quoted lines. Full text: `evidence/B178-VERIFIER-GAP.md`. + +## 5. Pre-read layer (R1-R3) +**Move family.** 271 moves: 84 h2r (read r not h, delete the matching pre-read), 92 r2h (read h, insert a pre-read), 95 pre-read deferrals, plus 46 whole-copy-pair bundles (38 legal, all net ≤ 0). Exact-oracle legality, retained frames (`cards/B147/oracle799.py`, whose no-op evaluation is legal with κ = 0.001661634653669567, the κ #799 publishes). +**Proof status.** The minimum 66 is exact for the model "legal singles and legal bundles, each leaked final cap needs a pairwise repairer in the chosen set" and is proven only at the pairwise level (singles, all pairs) plus the recorded triple probes, **not** for arbitrary k-sets. Not tested: joint copy-gate retiming, re-gauge, the end-frame convention. + +## 6. Model fidelity (M1, M2) +**Scope.** The #656 chain word (the same AL file as #645/#656). `cards/B128/retest.py base` prints `frame map bad 0 5726` and the AL verdict; `checks/b128_table.py` checks the shipped 272-row table. + +## Open problems and gaps (stated plainly) + +1. **S1 blocks (0,1,2,3), (0,1,4,5), (0,1,6,7):** the Hall bound is slack (H6); 48 scratch registers, including the centres 224, 240, 256, have no minimality proof. B177 is running; no verdict yet. +2. **Multiset-changing merges** (undo/redo ADDs, B169-style holder merges) are outside every Lawler result; the S3/S4 and bridge theorems are FOM only. +3. **S1 true-cap case and interface change.** S1 minimality is proved given the shipped end-of-A frames as bounds. The case where later readers' true caps replace those frames is open (as in #717), and so are fewer plane-stopper rows and other hyperplanes. + - *Update (post-submission, unverified here; card B188):* on the 11 eight-line blocks of #656, all 7 pair directions for the S1 stage basis cost exactly 2 registers per demanded plane (2 × 12 = 24 per block, the shipped cost). Directions with fewer stoppers need more pair registers, because a pair register serves only one plane. So a change of stage basis alone cannot lower the S1 count. What remains open is fewer demanded planes (an op-multiset change) or a frame descent. +4. The cut ops and centre frames are not examined beyond K1-K3; non-S3/S4 helper pairs have no generic sweep; #870 is not local. +5. **H-CUT** is not enforced by AL; several-epoch cuts in another verifier are outside the theorem. +6. **Decoder n ≥ 9** (mixed β ≤ 7 terms, #717 D1) is a separate question; the decoder terms are not covered. +7. **Pre-read** is proven only up to singles, all pairs and the recorded triple probes, not for arbitrary k-sets. +8. The Lawler layers and the S1 lemma have no independent second-reader audit; the Lawler citation was not re-fetched. + +## Tested + +Fresh `git archive` of the commit, every assertion PASS, exit 0: **53 PASS lines (2 in step 0), about 52 s wall** on 12 cores (the S1 solver run, about 50 s, is the longest single step; the four groups run at once). With `HM_FULL=1` there is one more PASS line (the regenerated pre-read table equals the stored one; about 13 min at background priority on a loaded machine, one run by the authors: that run's regeneration line and the other 50 lines passed, but its S1 solver step hit the then 150 s limit under load, so the limit is now 900 s; the default run above, from the final commit, passes all 53). The solver step takes about 50 s on an idle machine; `UNKNOWN` (limit reached) fails the assertion. + +| Python | numpy | ortools | how installed | +|---|---|---|---| +| 3.14.7 | 2.5.4 | 9.15.6755 | development venv (the pins of `requirements.txt`) | + +## Files + +- `verify.sh`, `scripts/provenance.py` (step 0; `--write-manifest` regenerates the manifest), `SOURCES.json`, `MANIFEST.sha256`, `requirements.txt`, `LICENSE`, `NOTICE.md`. +- `inputs/`: vendored files by PR (`pr799/`, `pr635/`, `main/`), rebuilt words (`words/`), the helper ledger and the pre-read pair table (`derived/`). +- `cards/`: the swarm's card scripts under their card ids (B167 S1 lemma and solver; B171 Lawler on any word; B176, B179 extensions; B182 bridges; B174 cut; B159 pre-read; B128 fidelity; B98b/B98c/B99/SYN-18 shared loaders; B147/B155 pre-read oracle). The only edits against the originals are the local path prefixes (replaced by `HM_ROOT`), `pair799.py` taking an optional word argument, `extract.py` writing its instance into its own card directory and the pre-read table read as JSON instead of a pickle. +- `checks/`: `expect.py` (assertion helper), `lawler_check.py`, `make_toy.py`, `anchors.py`, `pairs_sample.py`, `b128_table.py`. +- `evidence/`: card notes (local paths removed) and the 272-row table. + +## Credits + +Prepared by DreamingOfClouds with Claude Opus 5.5 (Anthropic), via Claude Code; Apache-2.0. See `NOTICE.md` for the PRs whose words, code and results are used and for the overlap check. diff --git a/research/helper-minimality/SOURCES.json b/research/helper-minimality/SOURCES.json new file mode 100644 index 0000000000..4f35bc4ed1 --- /dev/null +++ b/research/helper-minimality/SOURCES.json @@ -0,0 +1,193 @@ +{ + "description": "Pins for research/helper-minimality. files = byte copies of files of merged/open PRs of CrocSwap/integer-mult-bounds (or of main at base_commit): blob = git blob id of the source file at the cited commit, sha256 = of the file as stored here. derived = words rebuilt locally from the PRs' construction code (not files of any PR), pinned by hashes the PRs publish (gz_sha256 / content_sha256 of the decompressed JSON), and local card outputs (pinned by sha256). evidence = card notes and run records shipped (scrubbed of local paths), sha256 only. scripts/provenance.py checks every entry.", + "base_commit": "f567884aeb8851b6e794af1184119a3bfbe1e631", + "files": [ + { + "file": "inputs/pr799/independent/audit_local.py", + "pr": 799, + "commit": "80e6463157cfc80b85af09e7e2f14748fe2dac60", + "source_path": "research/gauge44-frames-x/independent/audit_local.py", + "blob": "4744d8783c25bf7bf5076886169077ca3808309a", + "sha256": "03afcfc9da428b3f6edac81c1fee7f277ab81b64998efae78380b63498dec6cd", + "stored": "verbatim", + "used_for": "the verifier AL (rows C, M, anchors)" + }, + { + "file": "inputs/pr799/code/audit_allcold.py", + "pr": 799, + "commit": "80e6463157cfc80b85af09e7e2f14748fe2dac60", + "source_path": "research/gauge44-frames-x/code/audit_allcold.py", + "blob": "c86f7b0235f738b4325c04c51abaf1aa5f015aaa", + "sha256": "a87d7f4844ca963516637d249b14a0654f67f8047b6b265ae25b0cf30963e503", + "stored": "verbatim", + "used_for": "anchor: 8 centres asserted" + }, + { + "file": "inputs/pr799/code/emit_allcold.py", + "pr": 799, + "commit": "80e6463157cfc80b85af09e7e2f14748fe2dac60", + "source_path": "research/gauge44-frames-x/code/emit_allcold.py", + "blob": "8e147f80a67a6095d33764117d761eeb1b799460", + "sha256": "17c110c7c8d219e79e7dce36b19c4781e7effa800086cec03384387ad9acc7aa", + "stored": "verbatim", + "used_for": "anchor: 8 centres asserted" + }, + { + "file": "inputs/pr799/construction/construct_gauge_xcentre.py", + "pr": 799, + "commit": "80e6463157cfc80b85af09e7e2f14748fe2dac60", + "source_path": "research/gauge44-frames-x/construction/construct_gauge_xcentre.py", + "blob": "1010d86746ed9d0ca2059d7fc81fb3282ec743b3", + "sha256": "d8d295566ef2399af2da0707a4adc83e07aa26d2344c01a66bd0ca7684cf9217", + "stored": "verbatim", + "used_for": "anchor: cut = add target<-centre, assert on cut ops" + }, + { + "file": "inputs/main/03-motifs.tex", + "pr": null, + "commit": "f567884aeb8851b6e794af1184119a3bfbe1e631", + "source_path": "upstream/build/sections/03-motifs.tex", + "blob": "cdb0ba527aa8df5d57c151183fd3893c1a7e21ab", + "sha256": "ed76761194988a01af77ead0ea6469cb5dcd29690ab985a0b5a4006b0f2b69bb", + "stored": "verbatim", + "used_for": "anchor: spec schedule lines 78-83" + }, + { + "file": "inputs/pr635/hpe_emit_local.py", + "pr": 635, + "commit": "f567884aeb8851b6e794af1184119a3bfbe1e631", + "source_path": "research/complex-sw4-frame8/local/hpe_emit_local.py", + "blob": "534fdc71f7641c704575efc038363d7eb206b2df", + "sha256": "7e4a6fbc38c8228157b6311457d1496bf460291393043932d2c365f004f77805", + "stored": "verbatim", + "used_for": "anchor: emitter keeps centre-sourced cut ops (its sha256 equals the pin of research/complex-571-cold14-st2/code/hpe_emit_local.py in PR #799 construction/INPUTS.json)" + } + ], + "derived": [ + { + "file": "inputs/words/656-CANONICAL-WORD.json.gz", + "sha256": "72a4952751383e2a5e84b967f1e76fdfda003fe5592df357a599232e586817e3", + "bytes_sha256": "94fc985d6ab90967bfe995de41581690bcdb6dbade69e594b0130ef3da0c6314", + "content_sha256": "94fc985d6ab90967bfe995de41581690bcdb6dbade69e594b0130ef3da0c6314", + "pinned_in": "PR 656 @0805e78f research/gauge44-layered-b/data/PLAN.json (artifact_sha256 = this file's sha256; artifact_semantic_sha256 = sha256 of json.dumps(sort_keys, compact separators))", + "rebuilt_by": "PR 656 construction/reproduce.py --until word, then construction/layers/reproduce_layers.py (same file as format-limits-2 g44-CANONICAL-WORD)", + "used_for": "S1, S3/S4 on #656, M" + }, + { + "file": "inputs/words/656-layers-FULL-WORD.json.gz", + "sha256": "e2434318d38e5ab7d04d236e67f0da5b77a0fe57dfed9d817a83081921756c64", + "bytes_sha256": "0be48b1d8a6105059addf3f0d5e420c27ae3398b3a1186b6b11e9c4aa9e3f3d4", + "content_sha256": "0be48b1d8a6105059addf3f0d5e420c27ae3398b3a1186b6b11e9c4aa9e3f3d4", + "pinned_in": "PR 656 @0805e78f research/gauge44-layered-b/evidence/layers/LOCAL-AUDIT-LAYERED.json (content 0be48b1d8a61...)", + "rebuilt_by": "PR 656 construction/layers/reproduce_layers.py", + "used_for": "cut row (B174), AL, B128" + }, + { + "file": "inputs/words/799-X4-CANONICAL-WORD.json.gz", + "sha256": "f1c2ede9276d4447c5857d0e9d32adb52f987b8adb643b45bde2c172d88c6ee9", + "bytes_sha256": "1c0e9da767d4418f70016af599e4a447a3f7777acabe930318459c0fbbd260aa", + "content_sha256": "1c0e9da767d4418f70016af599e4a447a3f7777acabe930318459c0fbbd260aa", + "pinned_in": "PR 799 @80e64631 data/PLAN.json (gz sha256 f1c2ede9...) and data/SPEC.json, construction/jx/LOCAL-PINS-jx-X4.json (content 1c0e9da7...)", + "rebuilt_by": "PR 799 construction/reproduce chain np -> p6n -> promo -> sw4 -> jx (X4 locals)", + "used_for": "S3/S4 on #799, bridges, pre-read oracle" + }, + { + "file": "inputs/words/799-X4-FULL-WORD.json.gz", + "sha256": "fc96c6dfb3e03efc144c2d0d1abd605a1b1bc081d39a5de27f21675864ecc766", + "bytes_sha256": "1e1d99ba7aab877d6b573c41f7030ee73de9a52fee51d0a822ddaae71251999f", + "content_sha256": "1e1d99ba7aab877d6b573c41f7030ee73de9a52fee51d0a822ddaae71251999f", + "pinned_in": "PR 799 @80e64631 evidence/layers/LOCAL-AUDIT-LAYERED.json and construction/jx/RECIPE-X4.json (content 1e1d99ba7aab...)", + "rebuilt_by": "PR 799 construction/jx/reproduce_jx.py", + "used_for": "cut row, AL, verifier-gap toy" + }, + { + "file": "inputs/ledger_helpers.csv", + "sha256": "71469db91a3c5672312dde85a9e463d5a6c4527b7cb6f2e2a03594eb59add409", + "origin": "ledger of the 492 helpers of #656 (site S1/S3/S4, block|slot); byte-identical (modulo CRLF) to format-limits-2 (#717) s3-4-census-gauges/evidence/C1/ledger_helpers.csv, sha256 71469db9...", + "used_for": "S3/S4 copy identification (site tags)" + }, + { + "file": "inputs/derived/pairs.json.gz", + "sha256": "cc5716bea4a523255b96add72427910c6606c7f3654c8a63652aa7df674ac339", + "origin": "pre-read pair table of the 271-move universe on #799 (stored as deterministic gzip JSON of the card pickle pairs.pkl, round trip checked equal); regenerated by cards/B159/mdl.py (HM_FULL=1)", + "used_for": "P rows" + } + ], + "evidence": [ + { + "file": "evidence/B128-NOTES.md", + "sha256": "5921df2221a76bbafa733835c9a68ff5be984cf4ed99cc420ad742fceb391755", + "what": "card note / record (local paths removed)" + }, + { + "file": "evidence/B128-all.txt", + "sha256": "bdde724b3d8113f5b024e211566479073abfb5f3d4a96fdca169fa1eab17860b", + "what": "card note / record (local paths removed)" + }, + { + "file": "evidence/B155-NOTES.md", + "sha256": "7dbd405b2dcc8eb370feef32b867d6b12b7dce7b5cd9ad524c4f37bcf1cdc028", + "what": "card note / record (local paths removed)" + }, + { + "file": "evidence/B159-NOTES.md", + "sha256": "729d07bb52352eaf441228be28352c5d0efdab8927440298b6308313eec66dc0", + "what": "card note / record (local paths removed)" + }, + { + "file": "evidence/B167-NOTES.md", + "sha256": "9e371abf5132377e95a8a79e2a046bdc8263d71ccc03905c91e5e48d0ccd2a37", + "what": "card note / record (local paths removed)" + }, + { + "file": "evidence/B171-NOTES.md", + "sha256": "b45756d3f9097c182986329b62346d0d136aabe020d549641642b998a538516d", + "what": "card note / record (local paths removed)" + }, + { + "file": "evidence/B172-NOTES.md", + "sha256": "023a4b5ff6610351e101731ce99be6bada712fe2a5fad4eb1a8005c2e9c229ca", + "what": "card note / record (local paths removed)" + }, + { + "file": "evidence/B174-NOTES.md", + "sha256": "9968a78b131d89e0d262745f07c67104613fbdc366307ac6310d79c4947ae43d", + "what": "card note / record (local paths removed)" + }, + { + "file": "evidence/B175-NOTES.md", + "sha256": "e2ae6da673123f9a86ad72203c55a4f2a52c61b3e6c23b0b324d7e155389d5e1", + "what": "card note / record (local paths removed)" + }, + { + "file": "evidence/B176-NOTES.md", + "sha256": "8c37caeb2b3188c12708bb897ee7cefa7febe1f89ff71cba5600514fbcdebee5", + "what": "card note / record (local paths removed)" + }, + { + "file": "evidence/B178-VERIFIER-GAP.md", + "sha256": "6d18ed47c6036ae81db423b4c7dc91610505a4ccc0c5851a784af5951818eb27", + "what": "card note / record (local paths removed)" + }, + { + "file": "evidence/B179-NOTES.md", + "sha256": "1ecb165c212c3acd476eb68b83189292e0f763407f30cff0eb45c4c7fabdf259", + "what": "card note / record (local paths removed)" + }, + { + "file": "evidence/B182-NOTES.md", + "sha256": "2e1eccb47d6631103e18eed03c29d1d8d9c935fa4eecd7cd758e99fd5d06ff03", + "what": "card note / record (local paths removed)" + }, + { + "file": "evidence/B185-NOTES.md", + "sha256": "4fa578a6aafba5b429a864505caec1688a54e274223b4bf0a989bbfaff37f8db", + "what": "card note / record (local paths removed)" + }, + { + "file": "evidence/B82-NOTES.md", + "sha256": "9cbf48e3c0932ce286826b3a5807432a193275a5f4a6830a52401cbdacde0d54", + "what": "card note / record (local paths removed)" + } + ] +} \ No newline at end of file diff --git a/research/helper-minimality/cards/B128/coord.py b/research/helper-minimality/cards/B128/coord.py new file mode 100644 index 0000000000..19098156bf --- /dev/null +++ b/research/helper-minimality/cards/B128/coord.py @@ -0,0 +1,61 @@ +import sys,gzip,json +sys.path.insert(0,(__import__('os').environ['HM_ROOT']+'/cards/B99/work')) +import lib +d=lib.load() +w=json.load(gzip.open((__import__('os').environ['HM_ROOT']+'/inputs/words/656-layers-FULL-WORD.json.gz'))) +def basis(vs): + piv={} + for a in vs: + while a: + bit=a.bit_length()-1 + if bit in piv:a^=piv[bit] + else:piv[bit]=a;break + for k in sorted(piv): + for j in piv: + if j>k and piv[j]>>k&1:piv[j]^=piv[k] + return tuple(piv[k] for k in sorted(piv,reverse=True)) +pi={} +for p in 'AB': + for a,b in zip(d[p],w[p]): + rs=[1,2] if a[0]=='add' else [1] + for j in rs: pi[b[j]]=a[j] +# solve T: columns. gaussian: find T with T(x_i)=y_i for pairs (full port -> canon port) +pairs=[(w['ports'][r],d['ports'][pi[r]]) for r in range(112)] +def solve(pairs): + # find 9x9 matrix M (as list of images of basis e_k) s.t. M(x)=y for all pairs; linear system over GF(2) + # unknown images of e_0..e_8; use elimination on (x,y) pairs + piv={} + for x,y in pairs: + for b,(px,py) in list(piv.items()): + pass + # reduce: maintain basis of x with tracked y + rows=[] + for x,y in pairs: + for (px,py) in rows: + if x&(px&-px) and False:pass + rows.append((x,y)) + B={} + for x,y in pairs: + while x: + bit=x.bit_length()-1 + if bit in B: x^=B[bit][0]; y^=B[bit][1] + else: B[bit]=(x,y);break + else: + if y: return None + return B +B=solve(pairs) +print('consistent' if B else 'inconsistent', len(B) if B else '') +def apply(B,x): + y=0 + while x: + bit=x.bit_length()-1 + if bit not in B:return None + x^=B[bit][0];y^=B[bit][1] + return y +if B and len(B)==9: + bad=0;tot=0 + for p in 'AB': + for a,b in zip(d[p],w[p]): + tot+=1 + if basis([apply(B,x) for x in b[-1]])!=basis(d['frames'][a[-1]]): bad+=1 + print('frame map bad',bad,tot) diff --git a/research/helper-minimality/cards/B128/retest.py b/research/helper-minimality/cards/B128/retest.py new file mode 100644 index 0000000000..2a2076722b --- /dev/null +++ b/research/helper-minimality/cards/B128/retest.py @@ -0,0 +1,53 @@ +import sys,gzip,json,time +sys.path.insert(0,(__import__('os').environ['HM_ROOT']+'/cards/B128')) +from pathlib import Path +import importlib.util +import coord # d (canonical), w (full), pi, solve/apply +t114=None +AUD=(__import__('os').environ['HM_ROOT']+'/inputs/pr799/independent/audit_local.py') +sp=importlib.util.spec_from_file_location('al',AUD);al=importlib.util.module_from_spec(sp);sp.loader.exec_module(al) +FW=(__import__('os').environ['HM_ROOT']+'/inputs/words/656-layers-FULL-WORD.json.gz') +OUT=(__import__('os').environ['HM_ROOT']+'/cards/B128/') +inv={c:f for f,c in coord.pi.items()} +Binv=coord.solve([(c,f) for f,c in coord.pairs[:0]] or [(y,x) for x,y in coord.pairs]) +def tofull(N,O): + cur=list(O.start);F=O.join;out={} + def run(part): + o=[] + for e in N[part]: + rs=[e[1]]+([e[2]] if e[0]=='add' else []) + f=e[-1] + for q in rs:f=F(f,cur[q]) + for q in rs:cur[q]=f + e2=list(e[:-1]) + for j in range(1,3 if e[0]=='add' else 2): e2[j]=inv[e[j]] + e2.append(sorted(coord.apply(Binv,x) for x in O.bas[f])) + o.append(e2) + return o + out['A']=run('A') + for k,c in enumerate(O.d['centers']): cur[c]=F(cur[c],O.d['center_frames'][k]) + out['B']=run('B') + return out +def verify(wd,label): + p=Path(OUT+label+'.json.gz');p.write_bytes(gzip.compress(json.dumps(wd).encode(),mtime=0)) + t=time.time() + try: + al.run(p,Path(OUT+'out_'+label+'.json'));print(label,'REAL VERIFIER: ACCEPT') + except Exception as ex: + print(label,'REAL VERIFIER: REJECT',repr(ex)[:300]) + print('secs',time.time()-t,flush=True) +if __name__=='__main__': + mode=sys.argv[1] + if mode=='base': + verify(json.load(gzip.open(FW)),'base') + else: + import t114 + O=t114.O;S0=t114.S0 + h=int(sys.argv[2]);pol=sys.argv[3] + reads=t114.scan(S0);N=t114.build(S0,h,reads,pol,False) + assert [e[:-1] for e in N['tail']]==[e[:-1] for e in S0['tail']],'tail edited' + r=O.evaluate(N);rows=O.replay_rows(N) + print('oracle',r['legal'],r['fin_raise'],r['kappa'],'values equal',all(rows[i]==t114.rows0[i] for i in range(716))) + out=tofull(N,O) + wd=json.load(gzip.open(FW));wd['A']=out['A'];wd['B']=out['B'] + verify(wd,'edit%d_%s'%(h,pol)) diff --git a/research/helper-minimality/cards/B147/oracle799.py b/research/helper-minimality/cards/B147/oracle799.py new file mode 100644 index 0000000000..0828c84961 --- /dev/null +++ b/research/helper-minimality/cards/B147/oracle799.py @@ -0,0 +1,114 @@ +"""B126: B102 oracle ported to #664 (promoted canonical word out664/promo/local; pricing 72*local+EXTRA, m=73, W=7168). +API (see NOTES.md): + O=Oracle() load word, frame lattice, tags, pricing + O.seq0() -> {'A':[..],'B':[..],'tail':[..]} op lists (op=[kind,t,s,num,den,frame_id]) + O.evaluate(seq) -> dict(cen_viol, fin_raise, profile, mass, b, kappa, legal) forward min-frame join cascade + (legal = no centre frame exceeded, no final cap raised; no-op pass = 0 violations) + O.price(profile) -> (b,kappa) exact root from 72*local profile + B76 extras (reproduces shipped 1.654108529511355e-3) + O.replay_rows(seq) -> exact Fraction row state (value check); O.same_values(seq) + O.region(block) -> set of register ids (S3/S4 packets + their tags) for a block key string + O.conflict(o1,o2): ops that do not commute (value order matters) +""" +import sys,gzip,json +sys.path.insert(0,(__import__('os').environ['HM_ROOT']+'/cards/B99/work')) +from collections import Counter +from fractions import Fraction as Q +import lib # only lib.climbs is used +from decimal import Decimal as D, localcontext +EXTRA={1:1,3:1,44:1,48:2396} # PLAN.json(#799) minus 72*local +CW664=(__import__('os').environ['HM_ROOT']+'/inputs/words/799-X4-CANONICAL-WORD.json.gz') +M=73;W=7168 +def root(H): + with localcontext() as c: + c.prec=40 + terms=[(D(r)*D(n)/D(M*W),(D(M)/D(r)).ln()) for r,n in H.items() if n] + lo=D(0);hi=D('0.01') + for _ in range(200): + a=(lo+hi)/2 + if sum(p*(a*l).exp() for p,l in terms)<1:lo=a + else:hi=a + return (lo+hi)/2 +def regs(e): return [e[1]]+([e[2]] if e[0]=='add' else []) +class Oracle: + def __init__(s): + d=json.load(gzip.open(CW664));s.d=d + s.fr=[tuple(f) for f in d['frames']] + s.bas=[lib_basis(f) for f in d['frames']] + s.id={b:i for i,b in enumerate(s.bas)} + s.jm={} + s.tag={} # no TAGS for #664 + s.start=list(d['start']);s.final=list(d['final']) + def dim(s,f): return len(s.bas[f]) + def join(s,a,b): + if a==b: return a + k=(a,b) if a>p&1:x^=b[p] + if x: + p=x.bit_length()-1 + for q in b: + if b[q]>>p&1:b[q]^=x + b[p]=x + return tuple(b[p] for p in sorted(b,reverse=True)) +if __name__=='__main__': + import time;t=time.time();O=Oracle();s=O.seq0();r=O.evaluate(s) + print({k:(v if k!='profile' else sorted(v.items())) for k,v in r.items()},time.time()-t) diff --git a/research/helper-minimality/cards/B155/ex.py b/research/helper-minimality/cards/B155/ex.py new file mode 100644 index 0000000000..f88beacc32 --- /dev/null +++ b/research/helper-minimality/cards/B155/ex.py @@ -0,0 +1,83 @@ +import sys,time,pickle,itertools +sys.path.insert(0,(__import__('os').environ['HM_ROOT']+'/cards/B147')) +from oracle799 import * +from collections import defaultdict,Counter +O=Oracle();s=O.seq0();B=s['B'];d=O.d +base=O.evaluate(s);K0=base['kappa'];R0=O.replay_rows(s) +EMPTY=O.id.get(()) +tgt=lambda q:112<=q<224 +PRE=lambda i,e:i<120 and e[0]=='add' and tgt(e[1]) and e[2]>=224 +firstw={} +for i,e in enumerate(B): + if e[1] not in firstw:firstw[e[1]]=i +pairs=[] +for h,ci in firstw.items(): + e=B[ci] + if h<224 or e[0]!='add' or (e[3],e[4])!=(1,1) or tgt(e[2]) or e[2]==h: continue + r=e[2] + pre=[i for i in range(ci) if B[i][0]=='add' and B[i][2]==h] + if any(not tgt(B[i][1]) for i in pre): continue + end=len(B) + for j in range(ci+1,len(B)): + if B[j][1] in (h,r): end=j;break + reads=[j for j in range(ci+1,end) if B[j][0]=='add' and tgt(B[j][1]) and B[j][2] in (h,r) and B[j][1]!=B[j][2]] + pairs.append(dict(h=h,r=r,ci=ci,pre=pre,end=end,reads=reads)) +def moves(p): + ms=[];used=set() + for j in p['reads']: + g=B[j];t=g[1];a,b=g[3],g[4] + if g[2]==p['h']: + pi=[i for i in p['pre'] if i not in used and B[i][1]==t and (B[i][3],B[i][4])==(-a,b)] + if not pi: continue + used.add(pi[0]);ms.append(('h2r',j,pi[0],t)) + else: + ms.append(('r2h',j,max(p['pre'])+1 if p['pre'] else p['ci'],t,p['h'])) + return ms +def build(mvs): + Bn=[list(e) for e in B];dele=set();ins=defaultdict(list) + for m in mvs: + if m[0]=='h2r': + Bn[m[1]][2]=B[m[1]][2] and [p for p in pairs if m[1] in p['reads']][0]['r'];dele.add(m[2]) + else: + Bn[m[1]][2]=[p for p in pairs if m[1] in p['reads']][0]['r'] if False else None + return Bn +# simpler explicit build +pr_of={} +for p in pairs: + for j in p['reads']: pr_of[j]=p +def build(mvs): + Bn=[list(e) for e in B];dele=set();ins=defaultdict(list) + for m in mvs: + p=pr_of[m[1]] + if m[0]=='h2r': Bn[m[1]][2]=p['r'];dele.add(m[2]) + else: + Bn[m[1]][2]=p['h'];g=B[m[1]] + ins[m[2]].append(['add',m[3],p['h'],-g[3],g[4],EMPTY]) + out=[] + for i,e in enumerate(Bn): + for x in ins.get(i,[]):out.append(x) + if i in dele:continue + out.append(e) + s2=dict(s);s2['B']=out;return s2 +def pre_targets(Bx): return {e[1] for i,e in enumerate(Bx[:130]) if e[0]=='add' and tgt(e[1]) and e[2]>=224} +T0=pre_targets(B) +def ev(mvs): + s2=build(mvs) + if O.replay_rows(s2)!=R0: return None + r=O.evaluate(s2) + T=pre_targets(s2['B']) + return dict(legal=r['legal'],dk=float(r['kappa']-K0),net=len(T0-T)-len(T-T0),nfin=len(r['fin_raise']),ncen=len(r['cen_viol'])) +if __name__=='__main__': + print(len(pairs),'pairs',sum(len(p['reads']) for p in pairs),'reads',sum(len(moves(p)) for p in pairs),'moves') + t0=time.time();res={} + for pi,p in enumerate(pairs): + ms=moves(p) + if not ms: continue + res[('pair',pi)]=ev(ms) + for m in ms: res[('single',pi,m)]=ev([m]) + print(time.time()-t0) + leg=[(k,v) for k,v in res.items() if v and v['legal']] + print('evaluated',len(res),'inexact',sum(1 for v in res.values() if v is None),'legal',len(leg)) + for k,v in leg[:20]:print(k,v) + print(Counter((k[0],v['legal'],v['net']) for k,v in res.items() if v)) + pickle.dump(res,open('ex1.pkl','wb')) diff --git a/research/helper-minimality/cards/B159/ilp.py b/research/helper-minimality/cards/B159/ilp.py new file mode 100644 index 0000000000..a74113f652 --- /dev/null +++ b/research/helper-minimality/cards/B159/ilp.py @@ -0,0 +1,69 @@ +import sys,pickle +sys.path.insert(0,'.') +from mdl import * +from ortools.sat.python import cp_model +from pairsio import load_pairs +M2,sg,pv=load_pairs(__import__('os').environ['HM_ROOT']+'/inputs/derived/pairs.json.gz');assert M2==M +n=len(M) +# bundles: full pair move sets (h2r+r2h) with exact V +bund=[] +for pi,p in enumerate(pairs): + ms=[m for m in moves(p)] + if len(ms)>=2 and valid(ms): + v,_=V(ms) + bund.append((ms,v)) +print('bundles',len(bund),'legal',sum(1 for _,v in bund if not v)) +npre=Counter(e[1] for e in B[:120] if e[0]=='add' and tgt(e[1]) and e[2]>=224) +print('touched targets',len(npre),'preads',sum(npre.values())) +def solve(mode,cuts=()): + m=cp_model.CpModel() + x=[m.NewBoolVar(f'x{i}') for i in range(n)] + bx=[m.NewBoolVar(f'b{i}') for i in range(len(bund))] + bad=lambda a,b:(a,b) not in pv + legalx=lambda i:True + for a in range(n): + for b in range(a+1,n): + if (a,b) not in pv: m.Add(x[a]+x[b]<=1) + if mode=='full': + for i in range(n): + for c in sg[i]: + R=[b for b in range(n) if b!=i and (min(i,b),max(i,b)) in pv and c not in pv[(min(i,b),max(i,b))]] + m.Add(x[i]<=sum(x[b] for b in R)) + elif mode=='single': # only violation-free moves + for i in range(n): + if sg[i]: m.Add(x[i]==0) + # bundles exclusive with members; only legal bundles allowed in 'full'/'single' + for k,(ms,v) in enumerate(bund): + if v: m.Add(bx[k]==0) + for mm in ms: + for i in range(n): + if M[i]==mm: m.Add(x[i]+bx[k]<=1) + # touched targets + ts=set(npre)|{mm[3] for mm in M} + z={} + def cnt(t,mv_x): # linear expr of preread count change + e=npre.get(t,0) + terms=[] + for i,mm in enumerate(M): + if mm[3]!=t:continue + if mm[0]=='h2r': terms.append(-x[i]) + elif mm[0]=='r2h': terms.append(x[i]) + for k,(ms,v) in enumerate(bund): + for mm in ms: + if mm[3]==t: terms.append((-1 if mm[0]=='h2r' else 1)*bx[k]) + return e+sum(terms) + for t in ts: + z[t]=m.NewBoolVar(f'z{t}');m.Add(cnt(t,0)<=200*z[t]) + for S in cuts: m.Add(sum(x[i] for i in S)<=len(S)-1) + m.Minimize(sum(z.values())) + sv=cp_model.CpSolver();sv.parameters.num_workers=2;sv.parameters.max_time_in_seconds=120 + st=sv.Solve(m) + S=[i for i in range(n) if sv.Value(x[i])];BS=[k for k in range(len(bund)) if sv.Value(bx[k])] + return sv.StatusName(st),int(sv.ObjectiveValue()),sv.BestObjectiveBound(),S,BS +if __name__=='__main__': + print('noop',len(npre)) + for mode in ('free','single','full'): + st,obj,bd,S,BS=solve(mode);print(mode,st,'min touched',obj,'bound',bd,'moves',len(S),'bundles',len(BS),flush=True) + mv=[M[i] for i in S]+[mm for k in BS for mm in bund[k][0]] + if mv and valid(mv): + v,r=V(mv);print(' exact: legal',r['legal'],'viol',len(v),'dk',float(r['kappa']-K0),'touched',len(pre_targets(build_all(mv)['B'])),'replay exact',O.replay_rows(build_all(mv))==R0,flush=True) diff --git a/research/helper-minimality/cards/B159/mdl.py b/research/helper-minimality/cards/B159/mdl.py new file mode 100644 index 0000000000..9bac064a1c --- /dev/null +++ b/research/helper-minimality/cards/B159/mdl.py @@ -0,0 +1,70 @@ +import os +import sys,time,pickle,itertools +sys.path.insert(0,(__import__('os').environ['HM_ROOT']+'/cards/B155')) +from ex import * # O,s,B,d,pairs,pr_of,moves,tgt,EMPTY,R0,K0,T0,pre_targets +from collections import defaultdict,Counter +# ---- move universe +M=[] +for p in pairs: + for m in moves(p): M.append(m) # ('h2r',j,pre_i,t) / ('r2h',j,ins_pos,t,h) +# deferral moves: pre-read i of target t moved to just after t's later climb j (frame contains h's) +cur=list(d['start']);F=O.join +for e in s['A']: + rs=regs(e);f=e[-1] + for q in rs:f=F(f,cur[q]) + for q in rs:cur[q]=f +for k,c in enumerate(d['centers']):cur[c]=F(cur[c],d['center_frames'][k]) +hist=defaultdict(list) +for i,e in enumerate(B): + rs=regs(e);f=e[-1] + for q in rs:f=F(f,cur[q]) + for q in rs: + if cur[q]!=f: hist[q].append((i,f)) + cur[q]=f +for i,e in enumerate(B[:120]): + if not(e[0]=='add' and tgt(e[1]) and e[2]>=224):continue + t,h=e[1],e[2] + cg=next(j for j in range(i+1,len(B)) if B[j][1]==h) + hfr=[f for (j,f) in hist[h] if j<=i][-1] if any(j<=i for j,_ in hist[h]) else d['start'][h] + nx=[(j,f) for j,f in hist[t] if j>i] + for j,f in nx: + if O.sub(hfr,f) and j= Pi1, so Pi1 <= Pi2). +# => #whole-bound registers >= #plane-stoppers. This is Hall/matching on (stopper -> candidate partners). +exec(open((__import__('os').environ['HM_ROOT']+'/cards/B98c/work/gate.py')).read().split("good=[")[0]) +import itertools +A=[list(e) for e in d['A']] +st=d['start'] +cur=list(d['start']) +for e in A: + f=e[-1] + for q in regs(e):f=F.join(f,cur[q]) + for q in regs(e):cur[q]=f +def spanset(basis): + s={0} + for b in basis: s|={x^b for x in s} + return s +rep=[] +for bn,rr in blocks.items(): + scr=list(rr); cols=sorted({j for r in scr for j in rows0[r]}) + if len(cols)!=8: rep.append((bn,'cols',len(cols))); continue + vec={l:F.fr[st[l]][0] for l in cols} + def hull(pts): + sp=spanset([vec[p] for p in pts]); return frozenset(l for l in cols if vec[l] in sp) + regsb=cols+scr + B={r:frozenset(l for l in cols if vec[l] in spanset(F.fr[cur[r]])) for r in regsb} + S={r:frozenset(rows0[r].keys()) for r in regsb} + H={r:hull(S[r]) if S[r] else frozenset() for r in regsb} + planes=[r for r in regsb if len(H[r])==4 and B[r]==H[r]] + wide=[r for r in regsb if len(B[r])==8] + pairs=[r for r in regsb if len(B[r])==2] + # partner candidates for stopper z: registers != z with bound >= H[z] + cand={z:[u for u in regsb if u!=z and H[z]<=B[u]] for z in planes} + # max bipartite matching + match={} + def aug(z,seen): + for u in cand[z]: + if u in seen: continue + seen.add(u) + if u not in match or aug(match[u],seen): match[u]=z; return True + return False + msize=sum(aug(z,set()) for z in planes) + distinct=len({H[z] for z in planes})==len(planes) + rep.append((bn,len(cols),'scratch',len(scr),'wide',len(wide),'plane-stoppers',len(planes),'distinct',distinct,'matching',msize,'wide-scratch',len([r for r in wide if r in scr]),'cand-eq-wide',all(set(cand[z])==set(wide) for z in planes))) +for r in rep: print(r) diff --git a/research/helper-minimality/cards/B167/extract.py b/research/helper-minimality/cards/B167/extract.py new file mode 100644 index 0000000000..00a9fc2fab --- /dev/null +++ b/research/helper-minimality/cards/B167/extract.py @@ -0,0 +1,41 @@ +# Extract block-4567 instance: registers, bounds (subspaces of the 4-dim label space W), targets, shipped macro program +exec(open((__import__('os').environ['HM_ROOT']+'/cards/B98c/work/gate.py')).read().split("good=[")[0]) +import json +A=[list(e) for e in d['A']] +cols=[20,21,36,37,46,47,110,111]; S=list(range(432,448)); st=d['start'] +vec={l:F.fr[st[l]][0] for l in cols} +B=[161,289,51,30] +def coords(v): + for m in range(16): + s=0 + for i in range(4): + if m>>i&1:s^=B[i] + if s==v:return m + return None +def span_set(basis): + s={0} + for b in basis: s|={x^b for x in s} + return s +# end-of-A frames (full A) = shipped bound +cur=list(d['start']) +for e in A: + f=e[-1] + for q in regs(e):f=F.join(f,cur[q]) + for q in regs(e):cur[q]=f +Wv={coords(vec[l]) for l in cols} +inst={'cols':cols,'lines_vec':{l:coords(vec[l]) for l in cols},'regs':[]} +for r in cols+S: + E=span_set(F.fr[cur[r]]) + bound=sorted({coords(x) for x in E if x and coords(x) is not None}) if True else None + # vectors of E that lie in W (coords not None) + inst['regs'].append({'id':r,'bound':bound,'row':{str(j):str(x) for j,x in rows0[r].items()}}) +# shipped program ops (stage1: 3608..3671, stage2 3672..3759) +ops=[] +for i in range(3608,3760): + e=A[i] + ops.append([i]+[ (str(x) if not isinstance(x,(int,)) else x) for x in e[:5]] if e[0]=='add' else [i,'scl',e[1],e[2],e[3]]) +inst['ops']=[ [o[0],o[1],o[2],o[3],o[4]] + ([o[5]] if len(o)>5 else []) for o in ops] +json.dump(inst,open(__import__('os').environ['HM_ROOT']+'/cards/B167/inst4567.json','w')) +print(len(inst['regs'])) +for r in inst['regs']: print(r['id'],len(r['bound']),sorted(r['row'].keys())) +print(inst['lines_vec']) diff --git a/research/helper-minimality/cards/B167/level.py b/research/helper-minimality/cards/B167/level.py new file mode 100644 index 0000000000..6a399fc6bc --- /dev/null +++ b/research/helper-minimality/cards/B167/level.py @@ -0,0 +1,150 @@ +# B167 LEVEL MODEL (exact frame schedule, F_3 value relaxation). +# Theorem used (WLOG): any legal program can be stably reordered so that meetings are sorted by hull size (1,2,4,8 points of the +# AG(3,2) label cube). Level l = meetings whose join is a flat of size 2^(l-1). At level l a register either does not move, or joins +# ONE flat class Psi (|Psi|=2^(l-1)); legal iff prev frame <= Psi <= bound(register). Within a class, any unimodular remix of the members' +# rows is realisable (Euclid; every op's join stays <= Psi). Value layer: out = U*in, U in GL_n <=> in,out generate the same module; +# relaxed to F_3 (spans equal): UNSAT => provably infeasible for ANY horizon (not only K steps). +import json,sys,itertools,argparse,time +from fractions import Fraction as Q +from ortools.sat.python import cp_model +D=(__import__('os').environ['HM_ROOT']+'/cards/B167/') +inst=json.load(open(D+'inst4567.json')) +cols=inst['cols']; LV={int(k):v for k,v in inst['lines_vec'].items()} +REG={r['id']:r for r in inst['regs']} +FREE=[433,435] +def span(vs): + s={0} + for v in vs: s|={x^v for x in s} + return s +def hull(pts): + sp=span([LV[p] for p in pts]); return frozenset(l for l in cols if LV[l] in sp) +def flats(): + fl={frozenset()} + cur={frozenset([p]) for p in cols}; fl|=cur + ch=True + while ch: + ch=False + for a in list(fl): + for b in list(fl): + h=hull(a|b) + if h not in fl: fl.add(h); ch=True + return sorted(fl,key=lambda f:(len(f),sorted(f))) +FL=flats(); FID={f:i for i,f in enumerate(FL)} +LEVEL={1:1,2:2,4:3,8:4} +def mod3(fr): + p,q=fr.numerator,fr.denominator; return (p*pow(q,-1,3))%3 +DEC=0 +LEMMA=0 +def build(drop=(),free=None,levels=4,tgt=None): + regs=[r for r in inst['regs'] if r['id'] not in drop]; R=len(regs); ids=[r['id'] for r in regs] + free=set(FREE)-set(drop) if free is None else set(free) + bset=[frozenset(l for l in cols if LV[l] in set(r['bound'])) for r in regs] + m=cp_model.CpModel() + nf=len(FL) + same_={} + # class var per reg per level (0 none, else flat id of size 2^(l-1)) + c=[[None]*(levels+1) for _ in range(R)]; phi=[[None]*(levels+1) for _ in range(R)] + for i,r in enumerate(regs): + init=FID[frozenset([r['id']])] if r['id'] in cols else 0 + phi[i][0]=m.NewConstant(init) + for l in range(1,levels+1): + ok=[0]+[FID[f] for f in FL if len(f) and LEVEL[len(f)]==l and f<=bset[i]] + c[i][l]=m.NewIntVarFromDomain(cp_model.Domain.FromValues(ok),f'c{i}_{l}') + phi[i][l]=m.NewIntVar(0,nf-1,f'phi{i}_{l}') + tab=[] + for pid in range(nf): + tab.append((pid,0,pid)) + for cid in ok[1:]: + if FL[pid]<=FL[cid]: tab.append((pid,cid,cid)) + m.AddAllowedAssignments([phi[i][l-1],c[i][l],phi[i][l]],tab) + # values over F3 + x=[[[None]*len(cols) for _ in range(R)] for _ in range(levels+1)] + for l in range(levels+1): + for i,r in enumerate(regs): + for jj,j in enumerate(cols): + if l==0: x[l][i][jj]=m.NewConstant(1 if r['id']==j else 0) + else: x[l][i][jj]=m.NewIntVar(0,2,f'x{l}_{i}_{jj}') + for l in range(1,levels+1): + inc=[m.NewBoolVar(f'in{l}_{i}') for i in range(R)] + for i in range(R): + m.Add(c[i][l]!=0).OnlyEnforceIf(inc[i]); m.Add(c[i][l]==0).OnlyEnforceIf(inc[i].Not()) + same={} + same_[l]=same + for i in range(R): + for k in range(i+1,R): + b=m.NewBoolVar(f's{l}_{i}_{k}') + m.Add(c[i][l]==c[k][l]).OnlyEnforceIf([b]); + # b <=> c_i==c_k and nonzero + e=m.NewBoolVar('') + m.Add(c[i][l]==c[k][l]).OnlyEnforceIf(e); m.Add(c[i][l]!=c[k][l]).OnlyEnforceIf(e.Not()) + m.AddBoolAnd([e,inc[i]]).OnlyEnforceIf(b); m.AddBoolOr([e.Not(),inc[i].Not()]).OnlyEnforceIf(b.Not()) + same[i,k]=b; same[k,i]=b + for name,(src,dst) in (('A',(x[l-1],x[l])),('B',(x[l],x[l-1]))): + M=[[None]*R for _ in range(R)] + for i in range(R): + for k in range(R): + if i==k: + M[i][k]=m.NewIntVar(0,2,'') + m.Add(M[i][k]==1).OnlyEnforceIf(inc[i].Not()) + else: + M[i][k]=m.NewIntVar(0,2,'') + m.Add(M[i][k]==0).OnlyEnforceIf(same[i,k].Not()) + for i in range(R): + for jj in range(len(cols)): + terms=[] + for k in range(R): + pr=m.NewIntVar(0,4,''); m.AddMultiplicationEquality(pr,[M[i][k],src[k][jj]]); terms.append(pr) + q=m.NewIntVar(0,2*R,''); m.Add(sum(terms)==3*q+dst[i][jj]) + # final frame must contain the hull of the target support (and sit inside the bound) + for i,r in enumerate(regs): + if r['id'] in free: continue + S=[int(j) for j in r['row'].keys()] + lo=hull(S); ok=[FID[f] for f in FL if lo<=f<=bset[i]] + m.AddAllowedAssignments([phi[i][levels]],[(v,) for v in ok]) + # final + for i,r in enumerate(regs): + if r['id'] in free: continue + sg=m.NewIntVar(1,2,'') + for jj,j in enumerate(cols): + t=mod3(Q(r['row'].get(str(j),'0'))) + # x == sg*t mod 3 + q=m.NewIntVar(0,4,''); m.Add(sg*t==3*q+x[levels][i][jj]) if False else None + pr=m.NewIntVar(0,4,''); m.AddMultiplicationEquality(pr,[sg,m.NewConstant(t)]) + qq=m.NewIntVar(0,2,''); m.Add(pr==3*qq+x[levels][i][jj]) + if LEMMA: + # implied by the frame argument: a tight register whose target support hull == its (non-whole) bound must join exactly that flat at + # that level, and a plane stopper needs a whole-bound partner in its plane class. + for i,r in enumerate(regs): + if r['id'] in free: continue + S=[int(j) for j in r['row'].keys()]; hu=hull(S) + if hu==bset[i] and len(hu) in (2,4): + l=LEVEL[len(hu)]; m.Add(c[i][l]==FID[hu]) + for l2 in range(l+1,levels+1): m.Add(c[i][l2]==0) + if len(hu)==4: + wl=[k for k in range(R) if len(bset[k])==8] + m.Add(sum(same_[l][i,k] for k in wl)>=1) + if DEC: + order=[c[i][l] for l in range(1,levels+1) for i in range(R)] + m.AddDecisionStrategy(order,cp_model.CHOOSE_FIRST,cp_model.SELECT_RANDOM_HALF if DEC==2 else cp_model.SELECT_MIN_VALUE) + return m,dict(c=c,phi=phi,x=x,ids=ids,regs=regs,R=R,levels=levels) +def show(s,h): + ids=h['ids'] + for l in range(1,h['levels']+1): + cls={} + for i in range(h['R']): + v=s.Value(h['c'][i][l]) + if v: cls.setdefault(v,[]).append(ids[i]) + print('LEVEL',l,{tuple(sorted(FL[v])):mem for v,mem in cls.items()}) + for i in range(h['R']): + print(ids[i],[s.Value(h['phi'][i][l]) and sorted(FL[s.Value(h['phi'][i][l])]) for l in range(0,h['levels']+1)]) +if __name__=='__main__': + ap=argparse.ArgumentParser();ap.add_argument('--drop',default='');ap.add_argument('--time',type=float,default=300) + ap.add_argument('--workers',type=int,default=1);ap.add_argument('--free',default=None);ap.add_argument('--seed',type=int,default=1);ap.add_argument('--dec',type=int,default=0);ap.add_argument('--lemma',type=int,default=0) + a=ap.parse_args() + drop=tuple(int(s) for s in a.drop.split(',') if s) + free=None if a.free is None else [int(s) for s in a.free.split(',') if s] + DEC=a.dec; LEMMA=a.lemma + m,h=build(drop,free) + s=cp_model.CpSolver(); s.parameters.num_workers=min(2,a.workers); s.parameters.max_time_in_seconds=a.time; s.parameters.random_seed=a.seed + t0=time.time(); st=s.Solve(m); print('STATUS',s.StatusName(st),'time %.1f'%(time.time()-t0),'drop',drop,'free',free) + if st in (cp_model.OPTIMAL,cp_model.FEASIBLE): show(s,h) diff --git a/research/helper-minimality/cards/B171/lawler799.py b/research/helper-minimality/cards/B171/lawler799.py new file mode 100644 index 0000000000..13cccfa98c --- /dev/null +++ b/research/helper-minimality/cards/B171/lawler799.py @@ -0,0 +1,93 @@ +# B171: B172 Lawler certificate generalised to an arbitrary word (#799 canonical). Single process. +import gzip,json,csv,collections,sys +from fractions import Fraction as Q +def basis(vs): + b={} + for x in vs: + for p in sorted(b,reverse=True): + if x>>p&1:x^=b[p] + if x: + p=x.bit_length()-1 + for q in b: + if b[q]>>p&1:b[q]^=x + b[p]=x + return tuple(b[p] for p in sorted(b,reverse=True)) +def ok(F,ports):return all(((f&p).bit_count()%2==0) for f in F for p in ports) +def load(path): + d=json.load(gzip.open(path));v=d['v'] + ops=[(e[1],e[2] if e[0]=='add' else None,e) for p in ('A','B','tail') for e in d[p]] + return d,v,ops +def run(path,withcenter=False,skipzero=False): + d,v,ops=load(path);n=len(d['start']);P=d['ports'] + fr=[basis(d['frames'][f]) for f in d['start']] + # exact rows to find copies + rows=[{i:Q(1)} if i1 else (__import__('os').environ['HM_ROOT']+'/inputs/words/799-X4-CANONICAL-WORD.json.gz') + d,v,SEQ,Lpre,copies,P=run(path) + print('ops',len(SEQ),'copies',collections.Counter(c[0] for c in copies)) + out,bad=certify(d,v,SEQ,Lpre,copies,P) + for k,c in sorted(out.items()):print(k,c) + print('passing copies',len(bad));print(bad[:10]) + # robustness to the g hypothesis: recompute the partner frames g skipping the value-zero adds (source row empty), re-run Lawler + d,v,SEQ,Lpre,copies,P=run(path,skipzero=True) + out,bad=certify(d,v,SEQ,Lpre,copies,P) + print('value-zero adds skipped',run.nzero) + print('skip-zero',dict(sorted(out.items()))) + print('skip-zero passing copies',len(bad)) diff --git a/research/helper-minimality/cards/B171/pair799.py b/research/helper-minimality/cards/B171/pair799.py new file mode 100644 index 0000000000..a0bddeb842 --- /dev/null +++ b/research/helper-minimality/cards/B171/pair799.py @@ -0,0 +1,17 @@ +from lawler799 import * +import sys +P0=sys.argv[1] if len(sys.argv)>1 else (__import__('os').environ['HM_ROOT']+'/inputs/words/799-X4-CANONICAL-WORD.json.gz') +d,v,SEQ,Lpre,copies,P=run(P0) +cnt=collections.Counter();sizes=[] +for kind,a,b,k in copies: + base=Lpre[k][1];sink={a,b};V=[];chain=[] + for x in (a,b): + for kk in range(k+1,len(SEQ)): + t,s=SEQ[kk] + if x not in (t,s):continue + qq=s if t==x else t + g=Lpre[kk][1] if t==x else Lpre[kk][0] + V.append((g,[P[w] for w in taint_from(SEQ,v,P,qq,kk,sink)]));chain.append(x) + conf=[(i,j) for i in range(len(V)) for j in range(i+1,len(V)) if chain[i]!=chain[j] and lawler([V[i],V[j]],base)[0] is None] + cnt[(kind,'pair-conflict' if conf else 'no-pair-conflict')]+=1 +print(cnt) diff --git a/research/helper-minimality/cards/B171/scan01.py b/research/helper-minimality/cards/B171/scan01.py new file mode 100644 index 0000000000..e8f1515bf2 --- /dev/null +++ b/research/helper-minimality/cards/B171/scan01.py @@ -0,0 +1,40 @@ +exec(open((__import__('os').environ['HM_ROOT']+'/cards/B98c/work/gate.py')).read().split("good=[")[0]) +import collections +A=[list(e) for e in d['A']]; st=d['start']; cur=list(d['start']) +for e in A: + f=e[-1] + for q in regs(e):f=F.join(f,cur[q]) + for q in regs(e):cur[q]=f +print(list(blocks)) +for bn in ['(0, 1, 2, 3)','(0, 1, 4, 5)','(0, 1, 6, 7)']: + scr=list(blocks[bn]); cols=sorted({j for r in scr for j in rows0[r]}) + print(bn,'nscr',len(scr),'ncols',len(cols),scr[:5],scr[-3:],cols[:6],cols[-3:]) + sup=collections.Counter(len(rows0[r]) for r in scr); print(' supp sizes',sorted(sup.items())) + bd=collections.Counter(len(F.fr[cur[r]]) for r in scr); print(' bound dim',sorted(bd.items())) + print(' row0 sample',{r:list(rows0[r].items())[:3] for r in scr[:2]}) +print('frame vec of cols sample', [F.fr[st[l]] for l in cols[:3]]) +print('=====') +def spanset(basis): + s={0} + for b in basis: s|={x^b for x in s} + return s +for bn in ['(0, 1, 2, 3)','(0, 2, 4, 6)']: + scr=list(blocks[bn]); cols=sorted({j for r in scr for j in rows0[r]}) + vec={l:F.fr[st[l]][0] for l in cols} + print(bn,len(cols),'distinct vec',len({vec[l] for l in cols})) + # rank of vecs + import itertools + def rank(vs): + b=[] + for x in vs: + for y in b: x=min(x,x^y) + if x:b.append(x) + return len(b) + print(' rank vecs',rank(list(vec.values()))) + for r in scr: + sp=spanset(F.fr[cur[r]]) if len(F.fr[cur[r]])<=12 else None + S=rows0[r] + hs=spanset([vec[p] for p in S]) if len(S)<=12 else None + B=[l for l in cols if sp and vec[l] in sp] + H=[l for l in cols if hs and vec[l] in hs] + print(' ',r,'|S|',len(S),'dimB',len(F.fr[cur[r]]),'|B|',len(B),'|H|',len(H),'rank S',rank([vec[p] for p in S])) diff --git a/research/helper-minimality/cards/B171/scan01b.py b/research/helper-minimality/cards/B171/scan01b.py new file mode 100644 index 0000000000..97ac72e6e4 --- /dev/null +++ b/research/helper-minimality/cards/B171/scan01b.py @@ -0,0 +1,59 @@ +exec(open((__import__('os').environ['HM_ROOT']+'/cards/B98c/work/gate.py')).read().split("good=[")[0]) +import collections +A=[list(e) for e in d['A']]; st=d['start']; cur=list(d['start']) +for e in A: + f=e[-1] + for q in regs(e):f=F.join(f,cur[q]) + for q in regs(e):cur[q]=f +def spanset(basis): + s={0} + for b in basis: s|={x^b for x in s} + return s +blk=['(0, 1, 2, 3)','(0, 1, 4, 5)','(0, 1, 6, 7)'] +allcols=sorted({j for bn in blk for r in blocks[bn] for j in rows0[r]}) +print('union cols',len(allcols)) +vec={l:F.fr[st[l]][0] for l in allcols} +spc={} +def B_of(r): + if r not in spc: + s=spanset(F.fr[cur[r]]); spc[r]=frozenset(l for l in allcols if vec[l] in s) + return spc[r] +def H_of(S): + s=spanset([vec[p] for p in S]); return frozenset(l for l in allcols if vec[l] in s) +# col registers: bounds and start frames +cb=collections.Counter(len(B_of(l)) for l in allcols); print('col reg |B| dist',sorted(cb.items())) +cs=collections.Counter(len(F.fr[st[l]]) for l in allcols); print('col start dim',cs) +print('cols appear in blocks:',collections.Counter(sum(1 for bn in blk if l in {j for r in blocks[bn] for j in rows0[r]}) for l in allcols)) +stoppers=[];regsall=[] +for bn in blk: + for r in blocks[bn]: + S=rows0[r]; regsall.append(r) + if not S: continue + H=H_of(S);B=B_of(r) + if len(S)>=3 and len(H)==4 and B==H and len(S)==4: stoppers.append((bn,r,H)) +print('stoppers',len(stoppers),'distinct planes',len({h for _,_,h in stoppers})) +# candidates: any register (scratch of any block or col) other than z with B>=H +pool=regsall+allcols +cand={} +for bn,z,H in stoppers: cand[z]=[u for u in pool if u!=z and H<=B_of(u)] +for z in cand: print(z,len(cand[z]),cand[z][:12]) +match={} +def aug(z,seen): + for u in cand[z]: + if u in seen: continue + seen.add(u) + if u not in match or aug(match[u],seen): match[u]=z; return True + return False +print('matching',sum(aug(z,set()) for z in cand)) +scr_set=set(regsall) +for name,filt in (('scratch-only partners',lambda u:u in scr_set),('col-only partners',lambda u:u not in scr_set)): + match={} + c2={z:[u for u in cand[z] if filt(u)] for z in cand} + cand_bak=cand;cand=c2 + print(name,'matching',sum(aug(z,set()) for z in cand),'of',len(cand)) + cand=cand_bak +# per block scratch-only +for bn in blk: + zs=[z for b,z,H in stoppers if b==bn] + match={};c2={z:[u for u in cand[z] if u in set(blocks[bn])] for z in zs};cand_bak=cand;cand=c2 + print(bn,'stoppers',len(zs),'scratch-only matching',sum(aug(z,set()) for z in zs));cand=cand_bak diff --git a/research/helper-minimality/cards/B174/check.py b/research/helper-minimality/cards/B174/check.py new file mode 100644 index 0000000000..a896e06d1c --- /dev/null +++ b/research/helper-minimality/cards/B174/check.py @@ -0,0 +1,61 @@ +"""B174 checks. usage: check.py FULL-WORD.json.gz +Verifies hypotheses H-CUT/H-PRE, the identity F=I, F0 (cut deleted) has zero odd entries, +Diff=F-F0 has rank |K|=8 and Diff o Odd = I o Odd; omega(odd graph)=8; centre-frame lemma.""" +import sys,gzip,json +sys.path.insert(0,(__import__('os').environ['HM_ROOT']+'/inputs/pr799/independent')) +from audit_local import apply,basis,contained,registers +from fractions import Fraction as F +import numpy as np +from clique import odd_graph,max_clique +w=json.load(gzip.open(sys.argv[1]));v,h,R=w['report']['v'],w['report']['h'],w['report']['R'];n=2*v+R +ports=w['ports'];cen=w['centers'];cut=w['cut'] +par=lambda a,b:bin(a&b).count('1')&1 +odd=np.array([[par(ports[t],ports[u]) for u in range(v)] for t in range(v)]) +# H-CUT +K=sorted({e[2] for e in cut}) +print('H-CUT: all cut ops add target<-centre:',all(e[0]=='add' and v<=e[1]<2*v and e[2] in cen for e in cut), + '| centres disjoint from targets:',not any(v<=c<2*v for c in cen),'| #centres',len(cen),'distinct',len(set(cen)),'| |K| read',len(K)) +# H-PRE +print('H-PRE: precondition touches only target registers:',all(all(v<=r<2*v for r in registers(e)) for e in w['precondition'])) +# build program as audit_local does (lines 81-105) +ident=lambda:[{k:F(1)} for k in range(n)] +main=w['A']+w['cut']+w['B'] +raw=ident() +for e in main:apply(e,raw) +dirt=[{} for _ in range(n)] +for y in range(v,2*v):dirt[y]={k:a for k,a in raw[y].items() if k>=2*v} +for e in w['precondition']:apply(e,dirt) +comp=[['add',y,k,-a.numerator,a.denominator,[]] for y in range(v,2*v) for k,a in sorted(dirt[y].items())] +print('H-PRE: compensation reads only helpers into targets:',all(v<=e[1]<2*v and e[2]>=2*v for e in comp)) +early=w.get('early_cleanup',[]);ids={i for i,U in early} +tail=[w['cleanup'][i][:-1]+[U] for i,U in early];cleanup=[e for i,e in enumerate(w['cleanup']) if i not in ids] +print('cleanup never touches a target:',all(not(v<=r<2*v) for e in cleanup for r in registers(e))) +def Fmat(skip_cut): + prog=w['precondition']+comp+w['A']+([] if skip_cut else w['cut'])+w['B']+tail+cleanup + rows=ident() + for e in prog:apply(e,rows) + M=np.zeros((v,v)) + for t in range(v): + for k,x in rows[v+t].items(): + if klen(best):best=R[:] + return + if len(R)+len(P)<=len(best):return + for x in sorted(P,key=lambda z:-len(nb[z]&P)): + expand(R+[x],P&nb[x]);P=P-{x} + if len(R)+len(P)<=len(best):return + expand([],set(range(v)));return best +if __name__=='__main__': + for p in sys.argv[1:]: + w=json.load(gzip.open(p));ports=w['ports'] + a=odd_graph(ports) + assert all(a[i][i]==1 for i in range(len(ports))) + c=max_clique(a) + print(p.split('cards/')[-1][:50],'v',len(ports),'distinct',len(set(ports)),'odd density',np.mean(a),'omega',len(c),sorted(c)) diff --git a/research/helper-minimality/cards/B176/common.py b/research/helper-minimality/cards/B176/common.py new file mode 100644 index 0000000000..9683a86b99 --- /dev/null +++ b/research/helper-minimality/cards/B176/common.py @@ -0,0 +1,17 @@ +import sys,os +sys.dont_write_bytecode=True +SY=(__import__('os').environ['HM_ROOT']+'/cards/SYN-18') +os.chdir(SY) +src=open('planes.py').read().split("from collections import Counter")[0] +exec(src) +from collections import Counter +def kn(dd): + if not dd: return None + it=sorted(dd.items()); s=it[0][1]; return tuple((a,b/s) for a,b in it) +phases=['A','cut','B','tail','compensation','cleanup'] +TW=[] +for bn,(cols,vec,planes,H,B,S,wide,pairs,scr) in INFO.items(): + for u in wide: + if u not in scr: continue + ku=kn(rows0[u]); tw=[r for r in cols+scr if r!=u and kn(rows0[r])==ku] + if len(tw)==1 and len(S[u])==2: TW.append((bn,u,tw[0],planes,H,B,cols,scr)) diff --git a/research/helper-minimality/cards/B176/val.py b/research/helper-minimality/cards/B176/val.py new file mode 100644 index 0000000000..53a51495fa --- /dev/null +++ b/research/helper-minimality/cards/B176/val.py @@ -0,0 +1,40 @@ +exec(open((__import__('os').environ['HM_ROOT']+'/cards/B176/common.py')).read()) +from fractions import Fraction as Q +import collections +rows=[dict(r) for r in rows0] if False else None +# fresh replay from initial rows +NREG=716 +R=[{i:Q(1)} if i<112 else {} for i in range(NREG)] +word=[] +for ph in phases: + for e in d[ph]: word.append((ph,e)) +need={} +for t in TW: need[t[1]]=t[2] +pairs=set(need.items()) +# record at each op: for reads of u (src), rows equality with P +rd=collections.defaultdict(list) +wr=collections.Counter() +for n,(ph,e) in enumerate(word): + if e[0]=='add': + _,t,s,a,b,*_=e + if s in need: rd[s].append((n,ph,R[s]==R[need[s]])) + if t in need: wr[t]+=1 + q=Q(a,b) + for j,x in list(R[s].items()): + z=R[t].get(j,Q(0))+q*x + if z:R[t][j]=z + else:R[t].pop(j,None) + else: + _,t,a,b,*_=e + if t in need: wr[t]+=1 + q=Q(a,b);R[t]={j:q*x for j,x in R[t].items()} +good=0 +res=[] +for bn,u,P,*_ in TW: + allr=rd[u]; bad=[x for x in allr if not x[2]] + badA=[x for x in bad if x[1]=='A'] + ok=not bad + good+=ok + res.append((bn,u,P,len(allr),len(bad),len(badA),wr[u])) + print(bn,u,P,'reads',len(allr),'unequal reads',len(bad),'(in A',len(badA),') writes to u',wr[u]) +print('value-exact twins',good,'of',len(TW)) diff --git a/research/helper-minimality/cards/B179/gate.py b/research/helper-minimality/cards/B179/gate.py new file mode 100644 index 0000000000..2bb8b3341c --- /dev/null +++ b/research/helper-minimality/cards/B179/gate.py @@ -0,0 +1,25 @@ +# B179 gate: replay A exactly; per S1 stopper find plane-jump op, courier u, other registers holding the l2 piece. +exec(open((__import__('os').environ['HM_ROOT']+'/cards/B98c/work/gate.py')).read().split("good=[")[0]) +import pickle +NR=716 +R=[({i:Q(1)} if i<112 else {}) for i in range(NR)] +C=list(d['start']) +ops=d['A'] +log=[] # (i, t, s, q, framebefore_t, frame_after_t) +rowsnap={} # op index -> row of source (copy) for add +for i,e in enumerate(ops): + if e[0]=='scale': + t=e[1];q=Q(e[2],e[3]);R[t]={j:q*x for j,x in R[t].items()} + log.append((i,t,None,q,C[t],e[4]));C[t]=e[4] + else: + t,s=e[1],e[2];q=Q(e[3],e[4]);f=e[5] + rowsnap[i]=dict(R[s]) + row=R[t] + for j,x in R[s].items(): + z=row.get(j,Q(0))+q*x + if z:row[j]=z + else:row.pop(j,None) + log.append((i,t,s,q,C[t],f,C[s]));C[t]=f;C[s]=f +bad=[r for r in range(NR) if R[r]!=rows0[r]] +print('end rows mismatch vs rows0:',len(bad),bad[:10]) +pickle.dump((log,rowsnap,C),open('replayA.pkl','wb')) diff --git a/research/helper-minimality/cards/B179/gate2.py b/research/helper-minimality/cards/B179/gate2.py new file mode 100644 index 0000000000..58259e461d --- /dev/null +++ b/research/helper-minimality/cards/B179/gate2.py @@ -0,0 +1,78 @@ +exec(open((__import__('os').environ['HM_ROOT']+'/cards/B179/gate.py')).read().split("bad=[")[0]) +def spanset(basis): + s={0} + for b in basis: s|={x^b for x in s} + return s +# need start-of-run state to find jumps: replay again with checks per op +R2=[({i:Q(1)} if i<112 else {}) for i in range(NR)] +C2=list(d['start']) +st=d['start'] +# stoppers per block via blockscan logic, using end-of-A cur +cur=C # end-of-A frames +info={} +for bn,rr in blocks.items(): + scr=list(rr); cols=sorted({j for r in scr for j in rows0[r]}) + if len(cols)!=8: continue + vec={l:F.fr[st[l]][0] for l in cols} + def hull(pts): + sp=spanset([vec[p] for p in pts]); return frozenset(l for l in cols if vec[l] in sp) + regsb=cols+scr + Bd={r:frozenset(l for l in cols if vec[l] in spanset(F.fr[cur[r]])) for r in regsb} + H={r:hull(rows0[r].keys()) if rows0[r] else frozenset() for r in regsb} + planes=[r for r in regsb if len(H[r])==4 and Bd[r]==H[r]] + info[bn]=(cols,scr,planes,vec,H,Bd) +stop={z:bn for bn,(c,s,p,vec,H,Bd) in info.items() for z in p} +seen={} +jumps={} # z -> (opidx, partner, frame_before_z, frame_after, rowpartner, role) +def pts(fid,cols,vec): + sp=spanset(F.fr[fid]);return frozenset(l for l in cols if vec[l] in sp) +snapshots={} +for i,e in enumerate(ops): + if e[0]=='scale': + t=e[1];q=Q(e[2],e[3]);R2[t]={j:q*x for j,x in R2[t].items()};C2[t]=e[4];continue + t,s,q,f=e[1],e[2],Q(e[3],e[4]),e[5] + for z,oth in ((t,s),(s,t)): + if z in stop and z not in jumps: + bn=stop[z];cols,scr,pl,vec,H,Bd=info[bn] + pa=pts(f,cols,vec) + if pa>=H[z] and len(pts(C2[z],cols,vec))<=2 and pts(C2[z],cols,vec)<=H[z] or (pa>=H[z] and len(pts(C2[z],cols,vec))<4 and z not in jumps and False): + jumps[z]=(i,oth,C2[z],f,dict(R2[oth]),'z=target' if z==t else 'z=source') + snapshots[z]=([dict(r) for r in R2],list(C2)) + row=R2[t] + for j,x in R2[s].items(): + zz=row.get(j,Q(0))+q*x + if zz:row[j]=zz + else:row.pop(j,None) + C2[t]=f;C2[s]=f +print('stoppers',len(stop),'with jump found',len(jumps)) +def prop(a,b): + if not a or not b or set(a)!=set(b):return False + k=next(iter(a));r=a[k]/b[k] + return all(a[j]==r*b[j] for j in a) +res=[] +from itertools import combinations +for z,(i,u,fz,fa,ru,role) in sorted(jumps.items()): + bn=stop[z];cols,scr,pl,vec,H,Bd=info[bn] + Rs,Cs=snapshots[z] + # holders of l2 piece (proportional to partner row, before op), other than z,u + holders=[r for r in range(NR) if r not in(z,u) and prop(Rs[r],ru)] + ok=[r for r in holders if F.sub(fz,Cs[r]) and F.sub(Cs[r],fa)] # frame within [frame z before, plane] + low=[r for r in holders if F.sub(Cs[r],fa)] + # does u hold a nonzero row? + res.append((bn,z,i,u,role,len(pts(fz,cols,vec)),len(ru),len(holders),len(low),len(ok),[(r,len(pts(Cs[r],cols,vec))) for r in holders][:6])) +for r in res: print(r) +print('count ok>0:',sum(1 for r in res if r[9]>0),'holders>0:',sum(1 for r in res if r[7]>0),'low>0:',sum(1 for r in res if r[8]>0),'of',len(res)) +print('--- escape 2: point holders') +n_any=n_all=0;n_noclimb=0 +for z,(i,u,fz,fa,ru,role) in sorted(jumps.items()): + Rs,Cs=snapshots[z] + per=[] + for j in ru: + h=[r for r in range(NR) if r not in(z,u) and set(Rs[r])=={j}] + per.append(h) + anyh=all(per) + lowh=all([r for r in h if F.sub(Cs[r],fa)] for h in per) + nocl=all([r for r in h if F.sub(Cs[r],fa) and F.sub(fz,Cs[r])] for h in per) + n_any+=anyh;n_all+=lowh;n_noclimb+=nocl + if anyh and z in list(jumps)[:6]: print(z,per) +print('all columns have a pure point holder:',n_any,'inside plane:',n_all,'no-climb (frame>=z frame):',n_noclimb,'of',len(jumps)) diff --git a/research/helper-minimality/cards/B182/b182.py b/research/helper-minimality/cards/B182/b182.py new file mode 100644 index 0000000000..4fc4c6698d --- /dev/null +++ b/research/helper-minimality/cards/B182/b182.py @@ -0,0 +1,55 @@ +import sys,collections +sys.path.insert(0,(__import__('os').environ['HM_ROOT']+'/cards/B171')) +import lawler799 as L +path=(__import__('os').environ['HM_ROOT']+'/inputs/words/799-X4-CANONICAL-WORD.json.gz') +# monkeypatch site classification: treat bridges as 'BR', all S3/S4 as before +import csv +orig=csv.DictReader +def run2(): + d,v,ops=L.load(path);n=len(d['start']);P=d['ports'] + from fractions import Fraction as Q + fr=[L.basis(d['frames'][f]) for f in d['start']] + rows=[{i:Q(1)} if i=716 else '?') + copies.append((c,s,t,len(SEQ))) + rt=rows[t] + for j,x in list(rows[s].items()): + z=rt.get(j,0)+q*x + if z: rt[j]=z + else: rt.pop(j,None) + SEQ.append((t,s));Lpre.append((fr[t],fr[s]));fr[t]=L.basis(list(fr[t])+list(fr[s])) + else: + q=Q(e[2],e[3]);rows[t]={j:q*x for j,x in rows[t].items()} + return d,v,SEQ,Lpre,copies,P +d,v,SEQ,Lpre,copies,P=run2() +print(collections.Counter(c[0] for c in copies)) +sel=[c for c in copies if c[0]=='BR' or c[0]=='S3' and (450<=c[2]<=457 or 484<=c[2]<=569)] +print(len(sel),[c for c in sel if c[0]=='BR']) +out,bad=L.certify(d,v,SEQ,Lpre,sel,P) +for k,c in sorted(out.items()):print(k,c) +print('passing',[(b[0],b[1],b[2]) for b in bad]) +# value check: bridge rows at fill time pairwise non-proportional +from fractions import Fraction as Q +d2,v2,ops=L.load(path);rows=[{i:Q(1)} if i=716 and t not in snap and not rows[t] and rows[s]: + q=Q(e[3],e[4]);snap[t]={j:q*x for j,x in rows[s].items()} + q=Q(e[3],e[4]) + for j,x in list(rows[s].items()): + z=rows[t].get(j,0)+q*x + if z: rows[t][j]=z + else: rows[t].pop(j,None) + else: + q=Q(e[2],e[3]);rows[t]={j:q*x for j,x in rows[t].items()} +def norm(r): + k=min(r);return tuple(sorted((j,x/r[k]) for j,x in r.items())) +print('distinct',len({norm(r) for r in snap.values()}),'of',len(snap),[len(r) for r in snap.values()]) diff --git a/research/helper-minimality/cards/B98b/dyad.py b/research/helper-minimality/cards/B98b/dyad.py new file mode 100644 index 0000000000..8464f29a0c --- /dev/null +++ b/research/helper-minimality/cards/B98b/dyad.py @@ -0,0 +1,84 @@ +"""Dyadic (Z[1/2]) exact synthesis of the end-of-A block state with fewer scratch registers.""" +import sys,random +exec(open('synth.py').read().split("tot_save=0")[0]) +def split(x): # Fraction dyadic -> (odd int signed, exp) + assert x.denominator&(x.denominator-1)==0,x + n,dn=x.numerator,x.denominator;e=-(dn.bit_length()-1) + while n and n%2==0:n//=2;e+=1 + return n,e +def synth_dy(rowsv,k,seed=0,maxops=100000): + rnd=random.Random(seed);n=len(rowsv);cols=sorted({j for r in rowsv for j in r}) + M=[[r.get(j,Q(0)) for j in cols] for r in rowsv];ops=[] + def addop(t,s,q): + ops.append(('add',t,s,q));M[t]=[a+q*b for a,b in zip(M[t],M[s])] + done=[] + for step in range(k): + rem=[c for c in range(k) if c not in done] + if seed: rnd.shuffle(rem) + best=None + for c in rem: + ent=[M[i][c] for i in range(n) if i not in done] + # row-Euclid on active rows (those whose index not a finished pivot) - lines finished are rows=done cols + pass + c=rem[0] if seed else None + order=rem + for c in order: + act=[i for i in range(n) if i not in done and M[i][c]!=0] + # gcd odd part check without mutating: integer gcd of odd parts + from math import gcd + g=0 + for i in act:g=gcd(g,abs(split(M[i][c])[0])) + if g==1:break + else: return None + while True: + act=[i for i in range(n) if i not in done and M[i][c]!=0] + if len(act)==1:break + p=min(act,key=lambda i:(abs(split(M[i][c])[0]),i)) + op,ep=split(M[p][c]) + for i in act: + if i==p:continue + oi,ei=split(M[i][c]);m=round(Q(oi,op)); + if m==0:m=1 if (oi>0)==(op>0) else -1 + addop(i,p,-Q(m)*Q(2)**(ei-ep)) + p=act[0] + if split(M[p][c])[0] not in(1,-1):return None + # bring into row c (line row c) + if p!=c: + if M[c][c]!=0 or c in done:raise Exception('line row not clear') + addop(c,p,Q(1));p=c + q=M[c][c] + if q!=1: + ops.append(('scale',c,1/q));M[c]=[x/q for x in M[c]] + for i in range(n): + if i!=c and M[i][c]!=0:addop(i,c,-M[i][c]) + done.append(c) + # after pivots, remaining nonpivot rows must be zero and line rows identity (up to cross terms removed) + for i in range(n): + for j in range(k):assert M[i][j]==(1 if i==j else 0),(i,j,M[i][j]) + fw=[('add',o[1],o[2],-o[3]) if o[0]=='add' else ('scale',o[1],1/o[2]) for o in reversed(ops)] + return fw,cols +def verify2(fw,cols,rowsv): + k=len(cols);n=len(rowsv);R=[[Q(1) if i==j else Q(0) for j in range(k)] if i=v or (e[0]=='add' and e[2] in S_ and e[1] list of (part,idx,tgt,frame dim,form) +seq=[('A',i,e) for i,e in enumerate(d['A'])]+[('B',i,e) for i,e in enumerate(d['B'])]+[('tail',i,e) for i,e in enumerate(d['tail'])] +allregs={r for b in blocks.values() for r in b} +for p,i,e in seq: + if e[0]=='add' and e[2] in allregs and p!='A': + reads[e[2]].append((p,i,e[1],L(e[-1]),norm(rows[e[2]]))) + ap(e) +import pickle;pickle.dump((dict(blocks),dict(reads)),open('iface.pkl','wb')) +b0=blocks['(0, 1, 2, 3)'] +for r in b0: + rs=reads[r] + print(r,[(p,i,fd) for p,i,t,fd,f in rs][:12], 'nforms',len({f for *_,f in rs})) diff --git a/research/helper-minimality/cards/B98b/synth.py b/research/helper-minimality/cards/B98b/synth.py new file mode 100644 index 0000000000..777d9fd71c --- /dev/null +++ b/research/helper-minimality/cards/B98b/synth.py @@ -0,0 +1,62 @@ +"""Re-synthesise a block's A program with fewer scratch registers. Exact Fractions. +Registers: lines (8, rows = cols identity) + kept scratch. Target = shipped end-of-A rows (rows of canonical replay). +Backward elimination from target to [I;0], invert.""" +import gzip,json,pickle,csv,math,sys +from fractions import Fraction as Q +exec(open('iface.py').read().split("reads=defaultdict")[0]) +for e in d['A']: ap(e) +blocks,_=pickle.load(open('iface.pkl','rb')) +def src(k,S_): return {e[2] for e in d[k] if e[0]=='add' and e[2] in S_} +H=list(csv.DictReader(open((__import__('os').environ['HM_ROOT']+'/inputs/ledger_helpers.csv')))) +psi={int(h['reg']):float(h['psi']) for h in H} +def synth(names,rowsv): + n=len(rowsv);cols=sorted({j for r in rowsv for j in r});M=[[r.get(j,Q(0)) for j in cols] for r in rowsv] + ops=[] # backward ops transforming M -> [I;0] + k=len(cols) + for c in range(k): + # pivot row among rows >=c ... target pivot row is line index c (rows 0..k-1 are lines) + cand=[i for i in range(n) if M[i][c]!=0 and (i>=c or iadd(t,s,-q), scale(c,s)->scale(c,1/s) + fw=[] + for o in reversed(ops): + fw.append(('add',o[1],o[2],-o[3]) if o[0]=='add' else ('scale',o[1],1/o[2])) + return fw,cols +def verify(fw,cols,rowsv): + n=len(rowsv);k=len(cols);R=[[Q(1) if i==j else Q(0) for j in range(k)] if i identity start index i<->col + names=lines+sorted(keep) + rv=[rows[r] for r in names] + out=synth(names,rv) + if out is None: res.append((bn,'rank-deficient',len(keep)));continue + fw,cc=out + ok=verify(fw,cc,rv) + dens=sorted({o[3].denominator if o[0]=='add' else o[2].denominator for o in fw}|{1}) + drop=sorted(S_-keep);sv=sum(psi[r] for r in drop) + res.append((bn,'ok' if ok else 'FAIL',len(keep),'ops',len(fw),'dens',dens[:8],'drop',len(drop),'psi_saved',round(sv,1))) + tot_save+=sv if ok else 0 +for r in res:print(r) +print('total psi of dropped regs (verified blocks)',round(tot_save,1)) diff --git a/research/helper-minimality/cards/B98c/work/gate.py b/research/helper-minimality/cards/B98c/work/gate.py new file mode 100644 index 0000000000..408885513e --- /dev/null +++ b/research/helper-minimality/cards/B98c/work/gate.py @@ -0,0 +1,32 @@ +import sys,os,pickle,csv,math,gzip,json +from collections import Counter,defaultdict +from fractions import Fraction as Q +sys.dont_write_bytecode=True +sys.path.insert(0,(__import__('os').environ['HM_ROOT']+'/cards/B99/work')) +os.chdir((__import__('os').environ['HM_ROOT']+'/cards/B98b')) +sys.path.insert(0,'.') +import lib +from fr import FL +src_dy=open('dyad.py').read() +ns={} +exec(src_dy.split("if __name__=='__main__':")[0],ns) +d=ns['d'];blocks=ns['blocks'];rows0=ns['rows'];src=ns['src'];psi=ns['psi'];v=ns['v'] +F=FL(d) +regs=lambda e:[e[1]]+([e[2]] if e[0]=='add' else []) +good=['(0, 2, 4, 6)','(0, 2, 5, 7)','(1, 2, 4, 7)','(1, 2, 5, 6)','(1, 3, 4, 6)','(1, 3, 5, 7)','(2, 3, 4, 5)','(2, 3, 6, 7)','(4, 5, 6, 7)'] +A=[list(e) for e in d['A']] +plans={} +for bn in good: + regsb=blocks[bn];S_=set(regsb) + keep=src('B',S_)|src('tail',S_)|src('cut',S_)|src('compensation',S_)|src('cleanup',S_)|{e[2] for e in d['A'] if e[0]=='add' and e[2] in S_ and e[1] not in S_ and e[1]>=v or (e[0]=='add' and e[2] in S_ and e[1]>p&1:x^=b[p] + if x: + p=x.bit_length()-1 + for q in b: + if b[q]>>p&1:b[q]^=x + b[p]=x + return tuple(b[p] for p in sorted(b,reverse=True)) +class FL: + def __init__(s,d): + s.fr=[basis(f) for f in d['frames']] + s.id={f:i for i,f in enumerate(s.fr)} + s.ss=[None]*len(s.fr) + def add(s,f): + f=basis(f) + if f not in s.id: s.id[f]=len(s.fr);s.fr.append(f) + return s.id[f] + def join(s,a,b): + if a==b: return a + return s.add(s.fr[a]+s.fr[b]) + def sub(s,a,b): # frame a subset of b + return basis(s.fr[a]+s.fr[b])==s.fr[b] + def dim(s,a): return len(s.fr[a]) diff --git a/research/helper-minimality/cards/B99/work/lib.py b/research/helper-minimality/cards/B99/work/lib.py new file mode 100644 index 0000000000..24c062daaa --- /dev/null +++ b/research/helper-minimality/cards/B99/work/lib.py @@ -0,0 +1,27 @@ +import gzip,json +from collections import Counter,defaultdict +from fractions import Fraction as Q +CW=(__import__('os').environ['HM_ROOT']+'/inputs/words/656-CANONICAL-WORD.json.gz') +def load(): return json.load(gzip.open(CW)) +def climbs(d,A=None,B=None,tail=None,start=None,final=None): + A=d['A'] if A is None else A; B=d['B'] if B is None else B; tail=d['tail'] if tail is None else tail + start=d['start'] if start is None else start; final=d['final'] if final is None else final + fr=d['frames'];cur=list(start);out=[] + L=lambda f:len(fr[f]) + def climb(r,f,tag): + if cur[r]==f:return + out.append((r,L(f)-L(cur[r]),tag));cur[r]=f + for part in ('A','centers','B','tail','final'): + if part in('A','B','tail'): + ops={'A':A,'B':B,'tail':tail}[part] + for i,e in enumerate(ops): + for r in [e[1]]+([e[2]] if e[0]=='add' else []):climb(r,e[-1],part) + elif part=='centers': + for k,r in enumerate(d['centers']): + cf=d['center_frames'][k] + terms=[e for e in d['cut'] if e[2]==r] + path=[cf]+sorted({0 for e in terms}-{cf},key=lambda x:-L(x)) + for a in range(1,len(path)):out.append((r,L(path[a-1])-L(path[a]),'cen')) + else: + for r,f in enumerate(final):climb(r,f,'final') + return out diff --git a/research/helper-minimality/cards/B99/work/rep.py b/research/helper-minimality/cards/B99/work/rep.py new file mode 100644 index 0000000000..74711205e7 --- /dev/null +++ b/research/helper-minimality/cards/B99/work/rep.py @@ -0,0 +1,11 @@ +from lib import * +def apply(rows,e): + if e[0]=='add': + _,t,s,a,b,*_=e;q=Q(a,b);rt=rows[t] + for j,x in list(rows[s].items()): + z=rt.get(j,0)+q*x + if z:rt[j]=z + else:rt.pop(j,None) + else: + _,t,a,b,*_=e;q=Q(a,b);rows[t]={j:q*x for j,x in rows[t].items()} +def init(): return [{i:Q(1)} if i<112 else {} for i in range(716)] diff --git a/research/helper-minimality/cards/SYN-18/planes.py b/research/helper-minimality/cards/SYN-18/planes.py new file mode 100644 index 0000000000..0b986ba69e --- /dev/null +++ b/research/helper-minimality/cards/SYN-18/planes.py @@ -0,0 +1,14 @@ +# SYN-18 probe: plane-stopper planes per S1 block: parallel classes, rows, pairing on a common plane. +exec(open((__import__('os').environ['HM_ROOT']+'/cards/B167/blockscan.py')).read().split("for r in rep: print(r)")[0].replace("rep.append((bn,len(cols)","INFO[bn]=(cols,vec,planes,H,B,S,wide,pairs,scr);rep.append((bn,len(cols)") .replace("rep=[]","rep=[];INFO={}")) +from collections import Counter +for bn,(cols,vec,planes,H,B,S,wide,pairs,scr) in INFO.items(): + # plane -> its direction (functional): plane through 4 points; parallel class = linear part + def lin(P): + ps=sorted(P); v0=vec[ps[0]]; return frozenset(vec[p]^v0 for p in ps) + cls=Counter(lin(H[z]) for z in planes) + hz=Counter(H[z] for z in planes) + print(bn,'stoppers',len(planes),'distinct planes',len(hz),'parallel classes used',len(cls),'class sizes',sorted(cls.values()), + '| B-bound sizes', Counter(len(B[r]) for r in cols+scr)) + if bn==list(INFO)[3]: + for z in planes: print(' z',z,'H',sorted(H[z]),'row',{k:str(v) for k,v in rows0[z].items()}) + for u in wide: print(' courier',u,'row',{k:str(v) for k,v in rows0[u].items()}) diff --git a/research/helper-minimality/checks/anchors.py b/research/helper-minimality/checks/anchors.py new file mode 100644 index 0000000000..dd1cfb0d57 --- /dev/null +++ b/research/helper-minimality/checks/anchors.py @@ -0,0 +1,31 @@ +"""File:line anchors quoted in the README: each quoted line must contain the quoted text in the vendored file.""" +import os, sys +HM = os.environ['HM_ROOT']; bad = 0 +def rd(p): return open(os.path.join(HM, p), encoding='utf-8').read().split('\n') +A = [ + ('inputs/pr799/independent/audit_local.py', 31, "def registers(e):return e[1:3] if e[0]=='add' else e[1:2]", 'AL:31 registers() of an op'), + ('inputs/pr799/independent/audit_local.py', 82, "main=w['A']+w['cut']+w['B']", 'AL:82 one cut section'), + ('inputs/pr799/independent/audit_local.py', 88, "non-target reads target", 'AL:88 covers A,B only'), + ('inputs/pr799/independent/audit_local.py', 115, "end=[full]*v+[basis([x for x in range(1,1< 0 and len(r[3]) == r[4] for r in rows)) +print('%s B128.table %d rows, %d helpers x %d policies, all rejected, every row has >= 1 frame violation' % ('PASS' if ok else 'FAIL', len(rows), len({r[0] for r in rows}), len(c))) +sys.exit(0 if ok else 1) diff --git a/research/helper-minimality/checks/expect.py b/research/helper-minimality/checks/expect.py new file mode 100644 index 0000000000..5b0b3118c7 --- /dev/null +++ b/research/helper-minimality/checks/expect.py @@ -0,0 +1,31 @@ +"""Assertion helper of verify.sh. usage: expect.py LABEL LOG [--has REGEX]... [--count REGEX N]... [--absent REGEX]... +Prints one 'PASS LABEL detail' or 'FAIL LABEL reason' line. Also FAILS if LOG.rc exists and is not 0 (the run itself failed).""" +import re, sys, os +label, log = sys.argv[1], sys.argv[2] +args = sys.argv[3:] +txt = open(log, encoding='utf-8', errors='replace').read() if os.path.isfile(log) else None +bad = [] +if txt is None: + bad.append('missing log ' + os.path.basename(log)) +else: + rc = log[:-4] + '.rc' if log.endswith('.log') else None + if rc and os.path.isfile(rc) and open(rc).read().strip() != '0': + bad.append('run exited %s' % open(rc).read().strip()) + i = 0 + while i < len(args): + a = args[i] + if a == '--has': + if not re.search(args[i + 1], txt, re.M): bad.append('missing: ' + args[i + 1]) + i += 2 + elif a == '--absent': + if re.search(args[i + 1], txt, re.M): bad.append('unexpected: ' + args[i + 1]) + i += 2 + elif a == '--count': + n = len(re.findall(args[i + 1], txt, re.M)) + if n != int(args[i + 2]): bad.append('count of %r is %d, want %s' % (args[i + 1], n, args[i + 2])) + i += 3 + else: + bad.append('bad option ' + a); i += 1 +if bad: + print('FAIL %s %s' % (label, '; '.join(bad))); sys.exit(1) +print('PASS %s' % label) diff --git a/research/helper-minimality/checks/lawler_check.py b/research/helper-minimality/checks/lawler_check.py new file mode 100644 index 0000000000..bf0a290a1b --- /dev/null +++ b/research/helper-minimality/checks/lawler_check.py @@ -0,0 +1,27 @@ +"""Soundness checks of the order-free Lawler oracle used by S3/S4/bridge rows (cards/B171/lawler799.py:lawler): + (a) synthetic mergeable / conflicting pairs; (b) 3000 seeded random small instances: lawler finds an order iff brute force over all + permutations does, and a returned order is feasible.""" +import os, sys, random, itertools +HM = os.environ['HM_ROOT']; sys.path.insert(0, HM + '/cards/B171') +import lawler799 as L +def feasible(order, visits, base): + J = list(base) + for k in order: + J = list(L.basis(J + list(visits[k][0]))) + if not L.ok(J, visits[k][1]): return False + return True +o, rem = L.lawler([((0b1000,), [0b110]), ((0b1,), [0b1100])], (), ()) +print('PASS lawler.mergeable' if o is not None else 'FAIL lawler.mergeable') +o2, rem2 = L.lawler([((0b10,), [0b10]), ((0b1,), [0b1])], (), ()) +print('PASS lawler.conflict' if o2 is None else 'FAIL lawler.conflict') +rnd = random.Random(20261013); agree = feas = 0; bad = 0 +for t in range(3000): + n = rnd.randint(1, 6); m = rnd.randint(2, 6) + vis = [(tuple(rnd.randrange(1, 1 << m) for _ in range(rnd.randint(1, 2))), [rnd.randrange(1, 1 << m) for _ in range(rnd.randint(1, 2))]) for _ in range(n)] + base = tuple(rnd.randrange(1, 1 << m) for _ in range(rnd.randint(0, 1))) + bf = any(feasible(p, vis, base) for p in itertools.permutations(range(n))) + order, _ = L.lawler(vis, base, ()) + if (order is not None) != bf or (order is not None and not feasible(order, vis, base)): bad += 1 + feas += bf; agree += 1 +print('%s lawler.bruteforce %d instances, %d feasible, %d disagreements' % ('PASS' if not bad and 0 < feas < agree else 'FAIL', agree, feas, bad)) +sys.exit(1 if bad else 0) diff --git a/research/helper-minimality/checks/make_toy.py b/research/helper-minimality/checks/make_toy.py new file mode 100644 index 0000000000..83038b8eaf --- /dev/null +++ b/research/helper-minimality/checks/make_toy.py @@ -0,0 +1,6 @@ +"""Build the verifier-gap toy: the #799 X4 FULL-WORD plus a centre-free net-zero cut pair add 112<-5 (+1) first, add 112<-5 (-1) last.""" +import gzip, json, sys +w = json.load(gzip.open(sys.argv[1])) +w['cut'] = [['add', 112, 5, 1, 1, None]] + w['cut'] + [['add', 112, 5, -1, 1, None]] +with gzip.GzipFile(sys.argv[2], 'wb', mtime=0) as f: f.write(json.dumps(w).encode()) +print('toy cut length', len(w['cut'])) diff --git a/research/helper-minimality/checks/pairs_sample.py b/research/helper-minimality/checks/pairs_sample.py new file mode 100644 index 0000000000..616f6c2ab5 --- /dev/null +++ b/research/helper-minimality/checks/pairs_sample.py @@ -0,0 +1,27 @@ +"""Pre-read table (inputs/derived/pairs.json.gz): statistics of the stored table, a recompute of all 271 singles and 150 seeded pairs +with the exact oracle, and the no-op legality / kappa of the oracle on the #799 X4 word.""" +import os, sys, random +HM = os.environ['HM_ROOT']; os.chdir(HM + '/cards/B159'); sys.path.insert(0, '.') +from pairsio import load_pairs +import mdl +from collections import Counter +M, sg, pv = load_pairs(HM + '/inputs/derived/pairs.json.gz') +assert M == mdl.M +kinds = Counter(m[0] for m in M) +st = (len(M), kinds['h2r'], kinds['r2h'], kinds['def'], sum(1 for v in sg if not v), min(len(v) for v in sg), len(pv), sum(1 for v in pv.values() if not v), min(len(v) for v in pv.values())) +print('stored table: moves %d (h2r %d, r2h %d, deferrals %d); singles legal %d, min |V| %d; pairs %d, legal %d, min |V| %d' % st) +print('%s preread.stats' % ('PASS' if st == (271, 84, 92, 95, 0, 2, 36501, 0, 2) else 'FAIL')) +bad = 0 +for i, m in enumerate(M): + if mdl.V([m])[0] != sg[i]: bad += 1 +print('%s preread.singles recomputed 271 singles, %d differ' % ('PASS' if not bad else 'FAIL', bad)) +rnd = random.Random(717); keys = sorted(pv); samp = rnd.sample(keys, 150); bad2 = 0 +for ab in samp: + if mdl._p(ab) != pv[ab]: bad2 += 1 +print('%s preread.pairs-sample recomputed 150 seeded pairs, %d differ' % ('PASS' if not bad2 else 'FAIL', bad2)) +from decimal import Decimal +r = mdl.O.evaluate(mdl.s) +k = str(r['kappa']) +print('no-op legal %s kappa %s' % (r['legal'], k[:24])) +print('%s oracle.noop legal and kappa starts 0.001661634653669567 (the kappa published by #799)' % ('PASS' if r['legal'] and k.startswith('0.001661634653669567') else 'FAIL')) +sys.exit(1 if (st != (271, 84, 92, 95, 0, 2, 36501, 0, 2) or bad or bad2 or not r['legal']) else 0) diff --git a/research/helper-minimality/evidence/B128-NOTES.md b/research/helper-minimality/evidence/B128-NOTES.md new file mode 100644 index 0000000000..29db6d8ca3 --- /dev/null +++ b/research/helper-minimality/evidence/B128-NOTES.md @@ -0,0 +1,11 @@ +# B128: real verifier frame rule vs our model. VERDICT: KILL (model fidelity confirmed; no slack). ship=false +Verifier: gauge44-notri-layered/independent/audit_local.py in cards/B99b/work/pr659/research (same file as #645/#656 chain; the shipped layered word passes it in 0.85 s). +(1) Declared PER OP: every add/scale carries its own frame e[-1] (literal GF(2) basis). Not derived. Registers have no separate frame; cur[q] is just the last declared frame touching q. (:121-141) +(2) At an op: climb(q,e[-1]) for each register of the op (:138,:141) requires contained(cur[q],U) ("frame not monotone", :122) for BOTH operands, so the op frame must contain the current frames of both = common frame, join-monotone. NOTHING about the register's value/support/cancellation is checked at an ADD (pure annotation lattice). Content enters only via: end caps climb(q,end[q]) (:115,:142; targets = even-parity-with-port subspace, others full), centre frames == (:131), start frames (ports) (:117), helper cone checks on nonzero rows/columns for low-end helpers (:152-153), and the all-column endpoint identity. +=> Frames are NOT support-based in the verifier; our model's support-style join (oracle.py:57-64 `join` = span-sum of declared-minimal frames, :69-77 cascade) is the minimal legal declaration, and the same lattice. The "support" effect in our model is exactly induced by monotone climbing toward the end caps (an ADD reads target t: t's frame joins a's frame, so a ends above/below caps) - that is a verifier rule, not a model artifact. +(3) Invoice prices DECLARED per-op transitions: paid[d] += 1 per register climb of d dims (:121-125,:142), pinned to report.local_profile (:144), and recounted in code/invoice_allcold.py:48-49,64-71. Declaring more than the join only adds climbs (no benefit); min join is optimal. +## Fidelity test +Unedited word: oracle frames (via register bijection + GF(2) coordinate map port_full->port_canon, coord.py) match the audited FULL-WORD frames on 5726/5726 A/B ops; shipped word ACCEPTED by real audit_local (retest.py base). +B114 twin substitutions run through real audit_local (soft mode, all checks recorded): 272 edits (68 pure helpers x 4 policies; 5 helpers skipped, tail edited): number of real "frame not monotone" failures == oracle fin_raise count in 272/272 (typically 6), 0 edits with 0 frame violations. => our cascade == real verifier on frames. (Other failures - entrance response/endpoint - are extra and from not rebuilding the compensation; irrelevant, frames already reject.) B113 uses the same oracle path (fin_raise 4), not re-run. +Real-verifier ACCEPT of any killed edit: 0. No exact kappa. Compute: no heavy job needed (heavy.sh was BUSY 3/3; all runs <=2 min single process, ~1 s each). +Files: retest.py, soft.py, coord.py, all.txt (272 result rows). diff --git a/research/helper-minimality/evidence/B128-all.txt b/research/helper-minimality/evidence/B128-all.txt new file mode 100644 index 0000000000..3917a940f1 --- /dev/null +++ b/research/helper-minimality/evidence/B128-all.txt @@ -0,0 +1,272 @@ +(451, 'first', False, [134, 135, 136, 219, 220, 221], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(451, 'last', False, [134, 135, 136, 219, 220, 221], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(451, 'common', False, [134, 135, 136, 219, 220, 221], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(451, 'commonlast', False, [134, 135, 136, 219, 220, 221], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(452, 'first', False, [144, 145, 146, 160, 161, 162], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(452, 'last', False, [144, 145, 146, 160, 161, 162], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(452, 'common', False, [144, 145, 146, 160, 161, 162], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(452, 'commonlast', False, [144, 145, 146, 160, 161, 162], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(453, 'first', False, [140, 141, 142, 170, 171, 172], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(453, 'last', False, [140, 141, 142, 170, 171, 172], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(453, 'common', False, [140, 141, 142, 170, 171, 172], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(453, 'commonlast', False, [140, 141, 142, 170, 171, 172], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(454, 'first', False, [185, 186, 187, 194, 195, 196], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(454, 'last', False, [185, 186, 187, 194, 195, 196], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(454, 'common', False, [185, 186, 187, 194, 195, 196], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(454, 'commonlast', False, [185, 186, 187, 194, 195, 196], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(455, 'first', False, [176, 177, 178, 207, 208, 209], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(455, 'last', False, [176, 177, 178, 207, 208, 209], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(455, 'common', False, [176, 177, 178, 207, 208, 209], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(455, 'commonlast', False, [176, 177, 178, 207, 208, 209], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(456, 'first', False, [115, 116, 117, 179, 180, 181], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(456, 'last', False, [115, 116, 117, 179, 180, 181], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(456, 'common', False, [115, 116, 117, 179, 180, 181], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(456, 'commonlast', False, [115, 116, 117, 179, 180, 181], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(457, 'first', False, [125, 126, 163, 164, 190, 211], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(457, 'last', False, [125, 126, 163, 164, 190, 211], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(457, 'common', False, [125, 126, 163, 164, 190, 211], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(457, 'commonlast', False, [125, 126, 163, 164, 190, 211], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(458, 'first', False, [114, 137, 184, 188, 199, 201], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(458, 'last', False, [114, 137, 184, 188, 199, 201], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(458, 'common', False, [114, 137, 184, 188, 199, 201], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(458, 'commonlast', False, [114, 137, 184, 188, 199, 201], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(467, 'first', False, [133, 148, 153, 159, 218, 223], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(467, 'last', False, [133, 148, 153, 159, 218, 223], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(467, 'common', False, [133, 148, 153, 159, 218, 223], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(467, 'commonlast', False, [133, 148, 153, 159, 218, 223], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(468, 'first', False, [112, 139, 182, 183, 202, 203], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(468, 'last', False, [112, 139, 182, 183, 202, 203], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(468, 'common', False, [112, 139, 182, 183, 202, 203], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(468, 'commonlast', False, [112, 139, 182, 183, 202, 203], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(477, 'first', False, [148, 149, 155, 216, 222, 223], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(477, 'last', False, [148, 149, 155, 216, 222, 223], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(477, 'common', False, [148, 149, 155, 216, 222, 223], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(477, 'commonlast', False, [148, 149, 155, 216, 222, 223], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(490, 'first', False, [189, 215], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(490, 'last', False, [189, 215], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(490, 'common', False, [189, 215], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(490, 'commonlast', False, [189, 215], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(491, 'first', False, [124, 143], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(491, 'last', False, [124, 143], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(491, 'common', False, [124, 143], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(491, 'commonlast', False, [124, 143], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(514, 'first', False, [147, 157], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(514, 'last', False, [147, 157], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(514, 'common', False, [147, 157], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(514, 'commonlast', False, [147, 157], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(515, 'first', False, [197, 210], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(515, 'last', False, [197, 210], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(515, 'common', False, [197, 210], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(515, 'commonlast', False, [197, 210], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(516, 'first', False, [131, 151, 167, 214], 4, ['all-column endpoint failure (False, [250', 'all-column endpoint failure (True, [516]', 'dirt-column cone 516', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(516, 'last', False, [131, 151, 167, 214], 4, ['all-column endpoint failure (False, [250', 'all-column endpoint failure (True, [516]', 'dirt-column cone 516', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(516, 'common', False, [131, 151, 167, 214], 4, ['all-column endpoint failure (False, [250', 'all-column endpoint failure (True, [516]', 'dirt-column cone 516', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(516, 'commonlast', False, [131, 151, 167, 214], 4, ['all-column endpoint failure (False, [250', 'all-column endpoint failure (True, [516]', 'dirt-column cone 516', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(518, 'first', False, [129, 143, 189, 212], 4, ['all-column endpoint failure (False, [263', 'all-column endpoint failure (True, [518]', 'dirt-column cone 518', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(518, 'last', False, [129, 143, 189, 212], 4, ['all-column endpoint failure (False, [263', 'all-column endpoint failure (True, [518]', 'dirt-column cone 518', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(518, 'common', False, [129, 143, 189, 212], 4, ['all-column endpoint failure (False, [263', 'all-column endpoint failure (True, [518]', 'dirt-column cone 518', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(518, 'commonlast', False, [129, 143, 189, 212], 4, ['all-column endpoint failure (False, [263', 'all-column endpoint failure (True, [518]', 'dirt-column cone 518', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(519, 'first', False, [124, 150, 168, 215], 4, ['all-column endpoint failure (False, [258', 'all-column endpoint failure (True, [519]', 'paid profile mismatch']) +(519, 'last', False, [124, 150, 168, 215], 4, ['all-column endpoint failure (False, [258', 'all-column endpoint failure (True, [519]', 'paid profile mismatch']) +(519, 'common', False, [124, 150, 168, 215], 4, ['all-column endpoint failure (False, [258', 'all-column endpoint failure (True, [519]', 'paid profile mismatch']) +(519, 'commonlast', False, [124, 150, 168, 215], 4, ['all-column endpoint failure (False, [258', 'all-column endpoint failure (True, [519]', 'paid profile mismatch']) +(536, 'first', False, [136, 219], 2, ['all-column endpoint failure (False, [512', 'all-column endpoint failure (True, [512,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(536, 'last', False, [136, 219], 2, ['all-column endpoint failure (False, [512', 'all-column endpoint failure (True, [512,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(536, 'common', False, [136, 219], 2, ['all-column endpoint failure (False, [512', 'all-column endpoint failure (True, [512,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(536, 'commonlast', False, [136, 219], 2, ['all-column endpoint failure (False, [512', 'all-column endpoint failure (True, [512,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(537, 'first', False, [147, 157], 2, ['all-column endpoint failure (False, [513', 'all-column endpoint failure (True, [537]', 'dirt-column cone 537', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(537, 'last', False, [147, 157], 2, ['all-column endpoint failure (False, [513', 'all-column endpoint failure (True, [537]', 'dirt-column cone 537', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(537, 'common', False, [147, 157], 2, ['all-column endpoint failure (False, [513', 'all-column endpoint failure (True, [537]', 'dirt-column cone 537', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(537, 'commonlast', False, [147, 157], 2, ['all-column endpoint failure (False, [513', 'all-column endpoint failure (True, [537]', 'dirt-column cone 537', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(538, 'first', False, [198, 205], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(538, 'last', False, [198, 205], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(538, 'common', False, [198, 205], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(538, 'commonlast', False, [198, 205], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(539, 'first', False, [113, 118], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(539, 'last', False, [113, 118], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(539, 'common', False, [113, 118], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(539, 'commonlast', False, [113, 118], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(548, 'first', False, [134, 221], 2, ['all-column endpoint failure (False, [524', 'all-column endpoint failure (True, [524,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(548, 'last', False, [134, 221], 2, ['all-column endpoint failure (False, [524', 'all-column endpoint failure (True, [524,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(548, 'common', False, [134, 221], 2, ['all-column endpoint failure (False, [524', 'all-column endpoint failure (True, [524,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(548, 'commonlast', False, [134, 221], 2, ['all-column endpoint failure (False, [524', 'all-column endpoint failure (True, [524,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(549, 'first', False, [135, 220], 2, ['all-column endpoint failure (False, [525', 'all-column endpoint failure (True, [549]', 'dirt-column cone 549', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(549, 'last', False, [135, 220], 2, ['all-column endpoint failure (False, [525', 'all-column endpoint failure (True, [549]', 'dirt-column cone 549', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(549, 'common', False, [135, 220], 2, ['all-column endpoint failure (False, [525', 'all-column endpoint failure (True, [549]', 'dirt-column cone 549', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(549, 'commonlast', False, [135, 220], 2, ['all-column endpoint failure (False, [525', 'all-column endpoint failure (True, [549]', 'dirt-column cone 549', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(552, 'first', False, [113, 140, 187, 198], 4, ['all-column endpoint failure (False, [245', 'all-column endpoint failure (True, [552,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(552, 'last', False, [113, 140, 187, 198], 4, ['all-column endpoint failure (False, [245', 'all-column endpoint failure (True, [552,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(552, 'common', False, [113, 140, 187, 198], 4, ['all-column endpoint failure (False, [245', 'all-column endpoint failure (True, [552,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(552, 'commonlast', False, [113, 140, 187, 198], 4, ['all-column endpoint failure (False, [245', 'all-column endpoint failure (True, [552,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(553, 'first', False, [118, 170, 194, 205], 4, ['all-column endpoint failure (False, [240', 'all-column endpoint failure (True, [553,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(553, 'last', False, [118, 170, 194, 205], 4, ['all-column endpoint failure (False, [240', 'all-column endpoint failure (True, [553,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(553, 'common', False, [118, 170, 194, 205], 4, ['all-column endpoint failure (False, [240', 'all-column endpoint failure (True, [553,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(553, 'commonlast', False, [118, 170, 194, 205], 4, ['all-column endpoint failure (False, [240', 'all-column endpoint failure (True, [553,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(554, 'first', False, [141, 142, 185, 186], 4, ['all-column endpoint failure (False, [261', 'all-column endpoint failure (True, [554,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(554, 'last', False, [141, 142, 185, 186], 4, ['all-column endpoint failure (False, [261', 'all-column endpoint failure (True, [554,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(554, 'common', False, [141, 142, 185, 186], 4, ['all-column endpoint failure (False, [261', 'all-column endpoint failure (True, [554,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(554, 'commonlast', False, [141, 142, 185, 186], 4, ['all-column endpoint failure (False, [261', 'all-column endpoint failure (True, [554,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(555, 'first', False, [171, 172, 195, 196], 4, ['all-column endpoint failure (False, [256', 'all-column endpoint failure (True, [555,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(555, 'last', False, [171, 172, 195, 196], 4, ['all-column endpoint failure (False, [256', 'all-column endpoint failure (True, [555,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(555, 'common', False, [171, 172, 195, 196], 4, ['all-column endpoint failure (False, [256', 'all-column endpoint failure (True, [555,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(555, 'commonlast', False, [171, 172, 195, 196], 4, ['all-column endpoint failure (False, [256', 'all-column endpoint failure (True, [555,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(560, 'first', False, [129, 150], 2, ['all-column endpoint failure (False, [488', 'all-column endpoint failure (True, [560]', 'dirt-column cone 560', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(560, 'last', False, [129, 150], 2, ['all-column endpoint failure (False, [488', 'all-column endpoint failure (True, [560]', 'dirt-column cone 560', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(560, 'common', False, [129, 150], 2, ['all-column endpoint failure (False, [488', 'all-column endpoint failure (True, [560]', 'dirt-column cone 560', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(560, 'commonlast', False, [129, 150], 2, ['all-column endpoint failure (False, [488', 'all-column endpoint failure (True, [560]', 'dirt-column cone 560', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(561, 'first', False, [189, 215], 2, ['all-column endpoint failure (False, [489', 'all-column endpoint failure (True, [561]', 'dirt-column cone 561', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(561, 'last', False, [189, 215], 2, ['all-column endpoint failure (False, [489', 'all-column endpoint failure (True, [561]', 'dirt-column cone 561', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(561, 'common', False, [189, 215], 2, ['all-column endpoint failure (False, [489', 'all-column endpoint failure (True, [561]', 'dirt-column cone 561', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(561, 'commonlast', False, [189, 215], 2, ['all-column endpoint failure (False, [489', 'all-column endpoint failure (True, [561]', 'dirt-column cone 561', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(562, 'first', False, [120, 138], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(562, 'last', False, [120, 138], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(562, 'common', False, [120, 138], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(562, 'commonlast', False, [120, 138], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(563, 'first', False, [192, 200], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(563, 'last', False, [192, 200], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(563, 'common', False, [192, 200], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(563, 'commonlast', False, [192, 200], 2, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(564, 'first', False, [141, 172, 186, 196], 4, ['all-column endpoint failure (False, [247', 'all-column endpoint failure (True, [564,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(564, 'last', False, [141, 172, 186, 196], 4, ['all-column endpoint failure (False, [247', 'all-column endpoint failure (True, [564,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(564, 'common', False, [141, 172, 186, 196], 4, ['all-column endpoint failure (False, [247', 'all-column endpoint failure (True, [564,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(564, 'commonlast', False, [141, 172, 186, 196], 4, ['all-column endpoint failure (False, [247', 'all-column endpoint failure (True, [564,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(565, 'first', False, [142, 171, 185, 195], 4, ['all-column endpoint failure (False, [246', 'all-column endpoint failure (True, [565]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(565, 'last', False, [142, 171, 185, 195], 4, ['all-column endpoint failure (False, [246', 'all-column endpoint failure (True, [565]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(565, 'common', False, [142, 171, 185, 195], 4, ['all-column endpoint failure (False, [246', 'all-column endpoint failure (True, [565]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(565, 'commonlast', False, [142, 171, 185, 195], 4, ['all-column endpoint failure (False, [246', 'all-column endpoint failure (True, [565]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(566, 'first', False, [113, 170, 194, 198], 4, ['all-column endpoint failure (False, [263', 'all-column endpoint failure (True, [566,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(566, 'last', False, [113, 170, 194, 198], 4, ['all-column endpoint failure (False, [263', 'all-column endpoint failure (True, [566,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(566, 'common', False, [113, 170, 194, 198], 4, ['all-column endpoint failure (False, [263', 'all-column endpoint failure (True, [566,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(566, 'commonlast', False, [113, 170, 194, 198], 4, ['all-column endpoint failure (False, [263', 'all-column endpoint failure (True, [566,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(567, 'first', False, [118, 140, 187, 205], 4, ['all-column endpoint failure (False, [262', 'all-column endpoint failure (True, [567]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(567, 'last', False, [118, 140, 187, 205], 4, ['all-column endpoint failure (False, [262', 'all-column endpoint failure (True, [567]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(567, 'common', False, [118, 140, 187, 205], 4, ['all-column endpoint failure (False, [262', 'all-column endpoint failure (True, [567]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(567, 'commonlast', False, [118, 140, 187, 205], 4, ['all-column endpoint failure (False, [262', 'all-column endpoint failure (True, [567]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(572, 'first', False, [131, 152], 2, ['all-column endpoint failure (False, [500', 'all-column endpoint failure (True, [572]', 'dirt-column cone 572', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(572, 'last', False, [131, 152], 2, ['all-column endpoint failure (False, [500', 'all-column endpoint failure (True, [572]', 'dirt-column cone 572', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(572, 'common', False, [131, 152], 2, ['all-column endpoint failure (False, [500', 'all-column endpoint failure (True, [572]', 'dirt-column cone 572', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(572, 'commonlast', False, [131, 152], 2, ['all-column endpoint failure (False, [500', 'all-column endpoint failure (True, [572]', 'dirt-column cone 572', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(573, 'first', False, [130, 151], 2, ['all-column endpoint failure (False, [501', 'all-column endpoint failure (True, [573]', 'dirt-column cone 573', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(573, 'last', False, [130, 151], 2, ['all-column endpoint failure (False, [501', 'all-column endpoint failure (True, [573]', 'dirt-column cone 573', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(573, 'common', False, [130, 151], 2, ['all-column endpoint failure (False, [501', 'all-column endpoint failure (True, [573]', 'dirt-column cone 573', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(573, 'commonlast', False, [130, 151], 2, ['all-column endpoint failure (False, [501', 'all-column endpoint failure (True, [573]', 'dirt-column cone 573', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(574, 'first', False, [125, 163, 190, 193, 204, 211], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(574, 'last', False, [125, 163, 190, 193, 204, 211], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(574, 'common', False, [125, 163, 190, 193, 204, 211], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(574, 'commonlast', False, [125, 163, 190, 193, 204, 211], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(575, 'first', False, [113, 170, 187, 205], 4, ['all-column endpoint failure (False, [274', 'all-column endpoint failure (True, [575,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(575, 'last', False, [113, 170, 187, 205], 4, ['all-column endpoint failure (False, [274', 'all-column endpoint failure (True, [575,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(575, 'common', False, [113, 170, 187, 205], 4, ['all-column endpoint failure (False, [274', 'all-column endpoint failure (True, [575,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(575, 'commonlast', False, [113, 170, 187, 205], 4, ['all-column endpoint failure (False, [274', 'all-column endpoint failure (True, [575,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(576, 'first', False, [118, 140, 194, 198], 4, ['all-column endpoint failure (False, [285', 'all-column endpoint failure (True, [576]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(576, 'last', False, [118, 140, 194, 198], 4, ['all-column endpoint failure (False, [285', 'all-column endpoint failure (True, [576]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(576, 'common', False, [118, 140, 194, 198], 4, ['all-column endpoint failure (False, [285', 'all-column endpoint failure (True, [576]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(576, 'commonlast', False, [118, 140, 194, 198], 4, ['all-column endpoint failure (False, [285', 'all-column endpoint failure (True, [576]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(577, 'first', False, [142, 171, 186, 196], 4, ['all-column endpoint failure (False, [290', 'all-column endpoint failure (True, [577,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(577, 'last', False, [142, 171, 186, 196], 4, ['all-column endpoint failure (False, [290', 'all-column endpoint failure (True, [577,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(577, 'common', False, [142, 171, 186, 196], 4, ['all-column endpoint failure (False, [290', 'all-column endpoint failure (True, [577,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(577, 'commonlast', False, [142, 171, 186, 196], 4, ['all-column endpoint failure (False, [290', 'all-column endpoint failure (True, [577,', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(578, 'first', False, [141, 172, 185, 195], 4, ['all-column endpoint failure (False, [301', 'all-column endpoint failure (True, [578]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(578, 'last', False, [141, 172, 185, 195], 4, ['all-column endpoint failure (False, [301', 'all-column endpoint failure (True, [578]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(578, 'common', False, [141, 172, 185, 195], 4, ['all-column endpoint failure (False, [301', 'all-column endpoint failure (True, [578]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(578, 'commonlast', False, [141, 172, 185, 195], 4, ['all-column endpoint failure (False, [301', 'all-column endpoint failure (True, [578]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(579, 'first', False, [115, 120, 200, 207], 4, ['all-column endpoint failure (False, [306', 'all-column endpoint failure (True, [579]', 'dirt-column cone 579', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(579, 'last', False, [115, 120, 200, 207], 4, ['all-column endpoint failure (False, [306', 'all-column endpoint failure (True, [579]', 'dirt-column cone 579', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(579, 'common', False, [115, 120, 200, 207], 4, ['all-column endpoint failure (False, [306', 'all-column endpoint failure (True, [579]', 'dirt-column cone 579', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(579, 'commonlast', False, [115, 120, 200, 207], 4, ['all-column endpoint failure (False, [306', 'all-column endpoint failure (True, [579]', 'dirt-column cone 579', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(580, 'first', False, [138, 178, 179, 192], 4, ['all-column endpoint failure (False, [317', 'all-column endpoint failure (True, [580]', 'paid profile mismatch']) +(580, 'last', False, [138, 178, 179, 192], 4, ['all-column endpoint failure (False, [317', 'all-column endpoint failure (True, [580]', 'paid profile mismatch']) +(580, 'common', False, [138, 178, 179, 192], 4, ['all-column endpoint failure (False, [317', 'all-column endpoint failure (True, [580]', 'paid profile mismatch']) +(580, 'commonlast', False, [138, 178, 179, 192], 4, ['all-column endpoint failure (False, [317', 'all-column endpoint failure (True, [580]', 'paid profile mismatch']) +(581, 'first', False, [116, 176, 181, 208], 4, ['all-column endpoint failure (False, [322', 'all-column endpoint failure (True, [581]', 'paid profile mismatch']) +(581, 'last', False, [116, 176, 181, 208], 4, ['all-column endpoint failure (False, [322', 'all-column endpoint failure (True, [581]', 'paid profile mismatch']) +(581, 'common', False, [116, 176, 181, 208], 4, ['all-column endpoint failure (False, [322', 'all-column endpoint failure (True, [581]', 'paid profile mismatch']) +(581, 'commonlast', False, [116, 176, 181, 208], 4, ['all-column endpoint failure (False, [322', 'all-column endpoint failure (True, [581]', 'paid profile mismatch']) +(582, 'first', False, [117, 177, 180, 209], 4, ['all-column endpoint failure (False, [333', 'all-column endpoint failure (True, [582]', 'paid profile mismatch']) +(582, 'last', False, [117, 177, 180, 209], 4, ['all-column endpoint failure (False, [333', 'all-column endpoint failure (True, [582]', 'paid profile mismatch']) +(582, 'common', False, [117, 177, 180, 209], 4, ['all-column endpoint failure (False, [333', 'all-column endpoint failure (True, [582]', 'paid profile mismatch']) +(582, 'commonlast', False, [117, 177, 180, 209], 4, ['all-column endpoint failure (False, [333', 'all-column endpoint failure (True, [582]', 'paid profile mismatch']) +(583, 'first', False, [123, 133, 148, 159, 175, 223], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(583, 'last', False, [123, 133, 148, 159, 175, 223], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(583, 'common', False, [123, 133, 148, 159, 175, 223], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(583, 'commonlast', False, [123, 133, 148, 159, 175, 223], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(584, 'first', False, [112, 126, 127, 139, 164, 165], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(584, 'last', False, [112, 126, 127, 139, 164, 165], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(584, 'common', False, [112, 126, 127, 139, 164, 165], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(584, 'commonlast', False, [112, 126, 127, 139, 164, 165], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(585, 'first', False, [171, 172, 185, 186], 4, ['all-column endpoint failure (False, [278', 'all-column endpoint failure (True, [585]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(585, 'last', False, [171, 172, 185, 186], 4, ['all-column endpoint failure (False, [278', 'all-column endpoint failure (True, [585]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(585, 'common', False, [171, 172, 185, 186], 4, ['all-column endpoint failure (False, [278', 'all-column endpoint failure (True, [585]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(585, 'commonlast', False, [171, 172, 185, 186], 4, ['all-column endpoint failure (False, [278', 'all-column endpoint failure (True, [585]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(586, 'first', False, [141, 142, 195, 196], 4, ['all-column endpoint failure (False, [276', 'all-column endpoint failure (True, [586]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(586, 'last', False, [141, 142, 195, 196], 4, ['all-column endpoint failure (False, [276', 'all-column endpoint failure (True, [586]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(586, 'common', False, [141, 142, 195, 196], 4, ['all-column endpoint failure (False, [276', 'all-column endpoint failure (True, [586]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(586, 'commonlast', False, [141, 142, 195, 196], 4, ['all-column endpoint failure (False, [276', 'all-column endpoint failure (True, [586]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(587, 'first', False, [113, 140, 194, 205], 4, ['all-column endpoint failure (False, [294', 'all-column endpoint failure (True, [587]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(587, 'last', False, [113, 140, 194, 205], 4, ['all-column endpoint failure (False, [294', 'all-column endpoint failure (True, [587]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(587, 'common', False, [113, 140, 194, 205], 4, ['all-column endpoint failure (False, [294', 'all-column endpoint failure (True, [587]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(587, 'commonlast', False, [113, 140, 194, 205], 4, ['all-column endpoint failure (False, [294', 'all-column endpoint failure (True, [587]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(588, 'first', False, [118, 170, 187, 198], 4, ['all-column endpoint failure (False, [292', 'all-column endpoint failure (True, [588]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(588, 'last', False, [118, 170, 187, 198], 4, ['all-column endpoint failure (False, [292', 'all-column endpoint failure (True, [588]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(588, 'common', False, [118, 170, 187, 198], 4, ['all-column endpoint failure (False, [292', 'all-column endpoint failure (True, [588]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(588, 'commonlast', False, [118, 170, 187, 198], 4, ['all-column endpoint failure (False, [292', 'all-column endpoint failure (True, [588]', 'nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(589, 'first', False, [120, 178, 179, 200], 4, ['all-column endpoint failure (False, [326', 'all-column endpoint failure (True, [589]', 'dirt-column cone 589', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(589, 'last', False, [120, 178, 179, 200], 4, ['all-column endpoint failure (False, [326', 'all-column endpoint failure (True, [589]', 'dirt-column cone 589', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(589, 'common', False, [120, 178, 179, 200], 4, ['all-column endpoint failure (False, [326', 'all-column endpoint failure (True, [589]', 'dirt-column cone 589', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(589, 'commonlast', False, [120, 178, 179, 200], 4, ['all-column endpoint failure (False, [326', 'all-column endpoint failure (True, [589]', 'dirt-column cone 589', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(590, 'first', False, [115, 138, 192, 207], 4, ['all-column endpoint failure (False, [324', 'all-column endpoint failure (True, [590]', 'paid profile mismatch']) +(590, 'last', False, [115, 138, 192, 207], 4, ['all-column endpoint failure (False, [324', 'all-column endpoint failure (True, [590]', 'paid profile mismatch']) +(590, 'common', False, [115, 138, 192, 207], 4, ['all-column endpoint failure (False, [324', 'all-column endpoint failure (True, [590]', 'paid profile mismatch']) +(590, 'commonlast', False, [115, 138, 192, 207], 4, ['all-column endpoint failure (False, [324', 'all-column endpoint failure (True, [590]', 'paid profile mismatch']) +(591, 'first', False, [116, 117, 208, 209], 4, ['all-column endpoint failure (False, [316', 'all-column endpoint failure (True, [591]', 'paid profile mismatch']) +(591, 'last', False, [116, 117, 208, 209], 4, ['all-column endpoint failure (False, [316', 'all-column endpoint failure (True, [591]', 'paid profile mismatch']) +(591, 'common', False, [116, 117, 208, 209], 4, ['all-column endpoint failure (False, [316', 'all-column endpoint failure (True, [591]', 'paid profile mismatch']) +(591, 'commonlast', False, [116, 117, 208, 209], 4, ['all-column endpoint failure (False, [316', 'all-column endpoint failure (True, [591]', 'paid profile mismatch']) +(592, 'first', False, [176, 177, 180, 181], 4, ['all-column endpoint failure (False, [308', 'all-column endpoint failure (True, [592]', 'dirt-column cone 592', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(592, 'last', False, [176, 177, 180, 181], 4, ['all-column endpoint failure (False, [308', 'all-column endpoint failure (True, [592]', 'dirt-column cone 592', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(592, 'common', False, [176, 177, 180, 181], 4, ['all-column endpoint failure (False, [308', 'all-column endpoint failure (True, [592]', 'dirt-column cone 592', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(592, 'commonlast', False, [176, 177, 180, 181], 4, ['all-column endpoint failure (False, [308', 'all-column endpoint failure (True, [592]', 'dirt-column cone 592', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(593, 'first', False, [121, 148, 149, 173, 222, 223], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(593, 'last', False, [121, 148, 149, 173, 222, 223], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(593, 'common', False, [121, 148, 149, 173, 222, 223], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(593, 'commonlast', False, [121, 148, 149, 173, 222, 223], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(594, 'first', False, [127, 153, 165, 182, 203, 218], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(594, 'last', False, [127, 153, 165, 182, 203, 218], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(594, 'common', False, [127, 153, 165, 182, 203, 218], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(594, 'commonlast', False, [127, 153, 165, 182, 203, 218], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(595, 'first', False, [115, 168, 178, 179, 207, 212], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(595, 'last', False, [115, 168, 178, 179, 207, 212], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(595, 'common', False, [115, 168, 178, 179, 207, 212], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(595, 'commonlast', False, [115, 168, 178, 179, 207, 212], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(596, 'first', False, [120, 124, 138, 143, 192, 200], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(596, 'last', False, [120, 124, 138, 143, 192, 200], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(596, 'common', False, [120, 124, 138, 143, 192, 200], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(596, 'commonlast', False, [120, 124, 138, 143, 192, 200], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(597, 'first', False, [140, 144, 160, 170, 187, 194], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(597, 'last', False, [140, 144, 160, 170, 187, 194], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(597, 'common', False, [140, 144, 160, 170, 187, 194], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(597, 'commonlast', False, [140, 144, 160, 170, 187, 194], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(598, 'first', False, [113, 118, 197, 198, 205, 210], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(598, 'last', False, [113, 118, 197, 198, 205, 210], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(598, 'common', False, [113, 118, 197, 198, 205, 210], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(598, 'commonlast', False, [113, 118, 197, 198, 205, 210], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(599, 'first', False, [142, 146, 162, 172, 185, 196], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(599, 'last', False, [142, 146, 162, 172, 185, 196], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(599, 'common', False, [142, 146, 162, 172, 185, 196], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(599, 'commonlast', False, [142, 146, 162, 172, 185, 196], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(600, 'first', False, [141, 145, 161, 171, 186, 195], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(600, 'last', False, [141, 145, 161, 171, 186, 195], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(600, 'common', False, [141, 145, 161, 171, 186, 195], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(600, 'commonlast', False, [141, 145, 161, 171, 186, 195], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(601, 'first', False, [117, 166, 176, 181, 209, 214], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(601, 'last', False, [117, 166, 176, 181, 209, 214], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(601, 'common', False, [117, 166, 176, 181, 209, 214], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(601, 'commonlast', False, [117, 166, 176, 181, 209, 214], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(602, 'first', False, [116, 167, 177, 180, 208, 213], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(602, 'last', False, [116, 167, 177, 180, 208, 213], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(602, 'common', False, [116, 167, 177, 180, 208, 213], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(602, 'commonlast', False, [116, 167, 177, 180, 208, 213], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(603, 'first', False, [125, 155, 163, 184, 201, 216], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(603, 'last', False, [125, 155, 163, 184, 201, 216], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(603, 'common', False, [125, 155, 163, 184, 201, 216], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) +(603, 'commonlast', False, [125, 155, 163, 184, 201, 216], 6, ['nonzero entrance response', 'paid profile mismatch', 'pre-wrapper touch of residual helper']) diff --git a/research/helper-minimality/evidence/B155-NOTES.md b/research/helper-minimality/evidence/B155-NOTES.md new file mode 100644 index 0000000000..075f79158d --- /dev/null +++ b/research/helper-minimality/evidence/B155-NOTES.md @@ -0,0 +1,10 @@ +# B155 NOTES: pre-read concentration on #799. KILL PROVEN (scoped). ship=false +Tools: gate0.py, ex.py (oracle799 + retained frames; inserted pre-reads get empty frame, moved reads keep stored frame), k.py. +Gate 0 (re-gauge): 118 pre-reads; value-equal register v (row = E_h, or h-r post-copy) existing inside t's window pre-read..next climb: count 0 / 118. Escape (1) of SYN-15 closed at fixed op order (needs a new construction, not an exchange). +Setup: 191 copy pairs on #799 (unit gate, pre-reads only on targets), 54 with movable reads, 176 single-read moves (h2r with matching pre-read delete, r2h with pre-read insert). All 230 exchanges value-exact (replay). +Results (exact oracle legality, net emptied = emptied - newly touched targets): +- singles: 0/176 legal. Full-pair exchanges: 38 legal, all net <= 0 (24 net 0 / dk<=0, rest net -1/-2, dk -1.1e-7..-2.2e-7); 8 net>0 are illegal. +- target-sharing full-pair sets k=2,3,4: 40/56/56 candidates (components cap at 2 pairs): 0 net>0 legal, 0 positive dk. +- move-level target-sharing sets: k=2 716 cands, k=3 2772 cands: 0 legal. (k=3 run inline ~100 s, queue was saturated.) +Verdict: KILL PROVEN for copy-pair joint exchanges on #799, retained frames, k<=3 move-level / k<=4 pair-level. Best exact kappa: none above #799 (1.661634653669567e-3 base; GO 1.66662e-3 not approached). Consistent with B151 (violations union-additive, no repair arcs). +Remaining escapes: op reordering of h's copy gate; end-frame convention change; new factory gauge delivering E_h inside a climb. Not tested here. diff --git a/research/helper-minimality/evidence/B159-NOTES.md b/research/helper-minimality/evidence/B159-NOTES.md new file mode 100644 index 0000000000..6d764abe6a --- /dev/null +++ b/research/helper-minimality/evidence/B159-NOTES.md @@ -0,0 +1,12 @@ +# B159 NOTES: minimum pre-read targets on #799 (exact-oracle conflict model + CP-SAT). CLOSED within the move family. ship=false +Files: mdl.py (271-move universe, exact oracle evaluate, pair table), ilp.py (CP-SAT, workers 2), tri.py (triple probe), pairs.pkl, tri.pkl. +Model (full #799 word, no 2-block shortcut needed: 14 ms/eval): moves = 84 h2r (read r not h, delete matching pre-read), 92 r2h (read h, insert pre-read), 95 pre-read deferrals +(to just after a later t climb whose frame holds h's), + 46 whole-copy-pair bundles. Leak set V(m) = exact set of raised final caps / centre violations from the forward join cascade. +Data: singles legal 0/271 (every |V| >= 2). Pairs 36,501: legal 0; creating NEW violations 0; 76 non-additive pairs (h2r+r2h, same pair) only SWAP violations (|V| 4->4). Min |V| over pairs = 2. +Triples: all 76 repair pairs x every 3rd move (20,368): legal 0, min |V| = 2. Bundles: 38/46 legal (exact), all net <= 0 (B155). +ILP: minimise touched targets, repair constraint "each leaked cap needs a pairwise repairer in the set", insert/delete pre-read counts per target. +- Ignore legality (ceiling of the move family): min touched 21 (45 cleared; exact check of that set: 104 violations). +- Legal moves only (singles V=0 + legal bundles) and the pairwise-repair model: min touched = 66, OPTIMAL, bound 66. Best legal set (9 bundles): touched 66, dk -3.2e-7. +Answer: minimum = 66 (full word) vs threshold 62: no target can be cleared. Pre-read lever CLOSED for this skeleton under exchange/deferral/h2r/r2h/copy-pair moves, retained frames. +Proof status: exact legality for every evaluated set; the bound is PROVEN only at the pairwise/triple-probe level (singles, all pairs, repair-pair triples), not for arbitrary k-sets (B155 adds target-sharing k<=3 move level, k<=4 pair level: 0). Not tested: copy-gate retiming jointly (B158 singles only), re-gauge, end-frame convention. +LEAD/SHIP: none. diff --git a/research/helper-minimality/evidence/B167-NOTES.md b/research/helper-minimality/evidence/B167-NOTES.md new file mode 100644 index 0000000000..7f19886fcc --- /dev/null +++ b/research/helper-minimality/evidence/B167-NOTES.md @@ -0,0 +1,14 @@ +# B167: frame-constrained S1 block re-synthesis. VERDICT: KILL PROVEN(scope: each of the 11 S1 blocks with 8 lines, interface = shipped bounds + end-of-A rows, own 24 registers, any horizon). ship=false, no splice/oracle (nothing feasible to splice). +Tools (all single-process, seconds): extract.py (block 4567 instance -> inst4567.json), level.py (LEVEL MODEL, CP-SAT), blockscan.py (counting certificate, all blocks), model.py (time-expanded macro-meeting CP-SAT, fallback), shipped.py/shipcls.py (shipped program as macro meetings / level classes), fixtest*.py. +## Structure found (new, exact) +- The 8 line vectors are the points of AG(3,2); every frame is a FLAT of size 1/2/4/8 (52 of the 67 subspaces occur). 4567: 8 pair-bound regs (Haar pairs along one direction), 8 PLANE-bound regs (line 46 + scratch 434,436,438,439,440,444,446; each target row has all 4 points of its plane), 8 whole-bound regs (20,37,110,432,433,435,437,442). +- WLOG theorem: sort meetings by join size => program = 4 levels; at level l a register joins one flat class Psi (prev frame <= Psi <= bound); any unimodular remix of a class is realisable (Euclid, joins stay <= Psi). So "frame schedule" = 4 class labels per register; values = module/linear algebra per class (level.py: out=U*in encoded as span equality over F_3, a sound relaxation). +## Sanity (shipped found?) +- Shipped program re-expressed in the model: 36 macro meetings (macro model, stage 1) and 4-level classes (level model): both OPTIMAL/feasible with the shipped structure fixed (0.6 s); fixing only level 1 (copy-outs) the solver completes levels 2-4 itself in 17 s, only level 2: 4 s. FREE discovery of the 16-register program (nothing fixed) not achieved in 100 s (UNKNOWN); a 1-h 2-worker job B167_free16 is queued (log_free16.txt). So: shipped verified + found with one level fixed; not found blind. +## Result: k=15 for block 4567 is INFEASIBLE (and k<=15 in all 11 blocks), proof by counting + solver +- LEMMA. A plane-bound register z whose target row has support = all 4 points of its plane Pi must, at the meeting where its frame jumps from <=2 points to Pi, meet a partner whose bound contains Pi (join must be <= BOTH bounds): only whole-bound registers qualify (all 8 plane stoppers have distinct planes). After serving Pi1 a whole-bound partner has frame >= Pi1, so it can never serve Pi2 != Pi1 (join would be whole > bound(z2)). => #whole-bound registers >= #plane stoppers. +- blockscan.py: all 11 blocks with 8 lines have 8 plane stoppers (distinct planes) and exactly 8 whole-bound registers (3 lines + scratch base+{0,1,3,5,10}); perfect matching forced => EVERY whole-bound register is indispensable, including all B98b "never-read" ones (433/435; base+1,+3,+5,+10), B115's 433/435 and B166's 437/442 (they are the plane couriers; their END rows are dead but their WORK is not). +- Independent solver confirmation (level.py, no lemma): drop 433 => INFEASIBLE in 49 s (F_3 relaxation, no horizon). With the lemma as implied constraints: drop 437, drop 435, drop {433,435} => INFEASIBLE in 3-5 s. +## Consequences / what would be needed to save a register +- No 14/15-register S1 program exists for these interfaces; the +2.0% b estimate of B98b (and B162's -3 w1 dup trick) is void. The only escape is an INTERFACE change: fewer plane-stopper rows (each plane row removed also frees its courier => saves 2 regs) or a plane register whose row supports <=2 points. Needs B/tail to stop reading that row; not a block-local synthesis. +- Reusable: level.py takes any block instance (rewrite extract.py) and --drop/--free; blockscan.py gives the Hall bound for all 14 blocks in 1 s. Blocks (0,1,*) (56 cols, shared lines) not scanned. diff --git a/research/helper-minimality/evidence/B171-NOTES.md b/research/helper-minimality/evidence/B171-NOTES.md new file mode 100644 index 0000000000..347b969d97 --- /dev/null +++ b/research/helper-minimality/evidence/B171-NOTES.md @@ -0,0 +1,17 @@ +# B171 (reduced): S1 lemma on blocks (0,1,*), Lawler on #799. VERDICT: Lawler PROVEN on #799 (268/268); S1 lemma does NOT extend to (0,1,*) (not tight). ship=false, no kappa claim. No heavy jobs used (all runs <2 min, single process). +Tools: scan01.py/scan01b.py (B167 plane-partner scan on blocks (0,1,*), reuse B98c gate.py loader), lawler799.py (B172 certificate on any word; copies found by first row-fill of S3/S4 ledger ids), pair799.py (two-visit conflicts). +## 1. B167 lemma on blocks (0,1,2,3),(0,1,4,5),(0,1,6,7) (16 scratch each; 104 distinct columns, 56 per block, rank-8 vectors, all 104 cols are start-dim-1 line registers) +- Same block anatomy as the 11 S1 blocks: per block 1 register with |support|=56 (whole bound), 7 PLANE stoppers (|S|=4, hull=bound=4 cols; 21 stoppers, 21 DISTINCT planes), 4 scratch with |B|=8, 4 pair-bound. +- BUT the lemma gives no register lower bound: line registers (cols) have end-of-A bounds |B| 48 (21 cols) / 56 (18 cols), so they can serve as plane couriers. Max matching stopper->partner = 21/21 with cols alone; scratch-only partners 15/21 (5 wide scratch per block vs 7 stoppers). Hall bound is slack, not tight => NO certificate that the 48 scratch registers are needed. (PROVEN: the counting bound is not binding here; the 16-scratch minimality for (0,1,*) is UNPROVEN, not refuted. Whether line registers can really courier (their own row/bound duties, the 3-block sharing) is not modelled.) +## 2. Lawler (B172) on #799 canonical word (cards/B147/.../x4/local/CANONICAL-WORD.json.gz; 5687 add ops) +- Copies identified WITHOUT tags: first op that fills an empty helper row from a nonempty one, restricted to ledger S3/S4 ids: 156 S3 + 112 S4 = 268 (all coefficient 1, all in B part). +- Visits = all later adds touching a or b; g = partner pre-frame lower bound (target-side replay from start frames, centre joins ignored = weaker, sound), cap = perp(ports of targets reached, a,b sinks), base = a's frame at copy. NO precedence (relaxation). +- RESULT: 268/268 FAIL (S3 156/156, S4 112/112); each chain alone passes 268/268 (caps not over-tight); every copy already has a TWO-visit conflict (pair799.py). So no copy can be merged by any reorder. PROVEN [scope: #799 op multiset fixed, value-forced monotone lower-bound frames, caps = reached-target ports]. Identical outcome to #656 (B172). +- Not done: #870 (not local), precedence-aware variant (unneeded), multiset-changing merges. +## 3. Helper classes NOT covered by either proof (the unproven slack) +- S1 scratch of blocks (0,1,*): 48 regs (incl. 3 centres 224,240,256). B167 lemma slack (above). +- S3/S4 (268) vs multiset-CHANGING merges (undo/redo ADD, B169-style holder merges: 16 holders 484..569, 8 entering slots 450..457): outside the Lawler scope. +- 12 non-helper bridge registers 716..727 (start frames 423-427, 8-support fill in B): no proof either way. +- cut ops (224 cut entries) and 8 centre copies/centre frames: not examined. +- The 11 S1 blocks (176 scratch) are covered only for fixed interface (shipped bounds + end-of-A rows), not under interface change. +- S1 B167 lemma, Lawler S3/S4 and the frame-lower-bound g are not independently audited by a second reader. diff --git a/research/helper-minimality/evidence/B172-NOTES.md b/research/helper-minimality/evidence/B172-NOTES.md new file mode 100644 index 0000000000..cbb0f65d94 --- /dev/null +++ b/research/helper-minimality/evidence/B172-NOTES.md @@ -0,0 +1,10 @@ +# B172 (LIT): Lawler backward rule as order-free merge test. VERDICT: KILL PROVEN [scope: #656 S3/S4 copy pairs, op multiset fixed, value-forced min-frame lower bounds; #799 and non-S3/S4 helper pairs NOT run]. ship=false +Paper: Lawler, Mgmt Sci 19(5):544-546 (1973), 1|prec|f_max, least-cost-last (citation per card; not re-fetched). Fit is exact: merged-register frame after a prefix = join of g_j (nondecreasing set fn); feasible iff join(prefix_k) in cap_k for all k (earlier caps are implied since prefixes grow), i.e. f_max=0. +Tools: lawler.py (lawler() ~15 lines + build/precs; single process, <5 s), sanity.py. Input B82 rec.pkl (268 copies = 156 S3 + 112 S4). +Model per copy (a,b): visits = every post-copy op touching a or b. g_k = partner's frame before the op, LOWER bound = target-side replay (fr[t]=join(fr[t],fr[s]) only; value-forced). Base = a's pre-copy min frame. cap_k = perp(ports of targets reached from partner after the op; a,b treated as sinks since their onward flow is later visits). Precedence: same-chain pairs with a mutation, plus unmutated chain before the other's first mutation. +Results: all 268/268 merged visit sets FAIL, even WITHOUT precedence (relaxation) -> order-free, precedence-free certificate. 0 passing, 0 removable copies. Certified: S3 156/156 (124 value-feasible + 32 both-mutated), S4 112/112. +Sanity: each chain alone passes (312/312 S3, 224/224 S4) so caps are not over-tight; synthetic mergeable pair returns an order, synthetic conflict returns None. Stronger: every one of the 268 already has a TWO-visit conflict (one visit from each chain) -> the certificate is a pair, easy to audit. +Note vs SYN-17 of.py (neither-order-blocked only 32 of 268 certified there, start-frame bound): the value-forced replay bound + per-visit caps closes the gap, so the 236 'unproven' copies are certified. Caveat: g uses only target-side value-forced frame growth; sound lower bound, assumes distinct-source independence (fixed op multiset); extra undo/redo ADDs that change the multiset are outside scope (B82 escape 2). +Not done: #799 (oracle799 uses a different word format, no copy-record pickle), B169 holder pairs, generic helper-pair sweep (needs lifetime/value-equivalence filter first). Given S3/S4 all fail with pair conflicts, expect same on #799 (same construction) but unmeasured. +Escapes: (1) multiset-changing merges (undo-ADD of partner); (2) re-timing that changes partner frames (our g is a bound so already covered); (3) new skeleton with shared port hyperplanes. +TRANSFER: lawler(visits,base,prec) in cards/B172/lawler.py is the order-free legality oracle for any "one register serves X and Y" claim: build visits (g=partner min frame, cap=perp of reached target ports), fail => certificate, pass => explicit order. diff --git a/research/helper-minimality/evidence/B174-NOTES.md b/research/helper-minimality/evidence/B174-NOTES.md new file mode 100644 index 0000000000..57df24e693 --- /dev/null +++ b/research/helper-minimality/evidence/B174-NOTES.md @@ -0,0 +1,21 @@ +# B174: the "8 centres" cut as a COUNT theorem. VERDICT: PROVEN in the audit_local model (+H-CUT); ship=false (knowledge, KPR3) +Files: check.py (all numerics, ~10 s/word), clique.py, audit_*.json (real audit_local receipts for #656, #799). Ran: single process, no heavy job. +Paths: AL = cards/B99b/work/pr659/research/gauge44-notri-layered/independent/audit_local.py. Words: #656 = cards/B76/work/out_local/cold44, #799 = cards/B147/work/out799/promo/local, #623 = r40/base/work/k492b/ck-step7-cold_end (FULL-WORD.json.gz). +## Theorem (cut count) +Let W pass AL (run(), no --main) on the 112-port geometry (odd weight ports p_t in F2^9, h=9), and assume H-CUT: every op of W['cut'] is `add target<-q` with q in W['centers'], and no centre is a target register. Let K = the centre registers read in the cut. Then |K| >= mu, the minimum rank of a real 112x112 X with X[t,u]=delta_tu on Odd={(t,u): p_t.p_u odd}. mu >= omega = max set of ports with pairwise ODD inner product. For the 112 ports omega = 8 (exhaustive, clique.py), so |K| >= 8: at least 8 registers sit at their locked centre frames at one instant (start of B, AL:131). Tight: shipped words have |K|=8, rank(F-F0)=8. Corollary: the assert len(centers)==8 (code/audit_allcold.py:75, emit_allcold.py:41) is forced, not a choice. +## Proof (lemmas) +L0 (what AL requires): rows v+t of the whole program on source columns = I (endpoint identity :106-112, forward). Cleanup ops cannot touch targets (:143: end[target]=perp(p_t), dim 8 != full). Precondition ops act on targets only; compensation is helper->target (:92-94): neither carries source content (checked). +L1 (monotone everywhere): cur[] is assigned only at :117,:120 (start) and :125 (climb, which needs contained(cur,U), :122). The centre loop :130-136 changes only the local U (billing); cur[q] stays the centre frame. So frames never fall, even at centres (this corrects "descent" wording of B134/B164: it is a pricing step, not a frame fall). +L2 (path lemma): every A/B/tail op climbs BOTH registers to its e[-1] (:31,:138,:141). So a time-respecting directed path u=r0->...->v+t through framed ops gives cur_end(v+t) contains (start :117). End cap :115,:142 forces cur_end(v+t) inside perp(p_t). Hence in perp(p_t), i.e. (t,u) even. +L3 (F0 odd-free): let F0 = rows v+t, source cols of the program with W['cut'] deleted. F0[t,u] != 0 needs such a framed path (matrix-product expansion). So F0 = 0 on Odd. +L4 (rank): cut ops only add centre values into targets, never read targets, so the cut block is I+N, N = sum_{q in K} n_q e_q^T (N^2=0). Then F - F0 = X_post N X_pre = sum_q (X_post n_q)(e_q^T X_pre): rank <= |K|. +L5 (count): X := F-F0 equals F=I on Odd (L0, L3), so |K| >= rank X >= mu. A set I of pairwise-odd ports gives X[I,I] = Id, so rank X >= |I|; omega = 8. +Side lemma (checked): frame of centre q contains p_u for every u in the support of q's A-row (L2), so a centre's frame >= span of its sources' ports. +## Numerical checks (check.py; #656, #799, #623 all identical) +H-CUT true (224 cut ops, 8 distinct centres, none a target); precondition on targets only; F==I exact (Fractions); F0 odd nnz = 0 (F0 has 5824 nnz); rank(F-F0)=8; (F-F0) o Odd == I o Odd; clique {0,3,45,46,69,70,104,107}: F-F0 on it = I_8; centre frames dim 8 all; rank of the 8 A-rows = 8, rowspace(Diff) = rowspace(Lambda). AL itself PASSes #656 and #799 (forward+dual, audit_*.json). +## Scope, caveats, corrections +1. H-CUT is NOT enforced by AL: cut ops get no frame check (AL:82 concatenates them, :132 only reads dest/src for `served`). A cut op `add target<-nonCentre` is frame-free. H-CUT comes from the emitters (B101: c82 assert) and the 8-centre asserts above. Any verifier that let a cut read other registers would still need >= 8 frame-free read sources: the proof gives rank(F-F0) <= #frame-free ops in general (telescoping, one rank-1 term per op). +2. One cut section/one time: AL has a single 'cut' (:82,:126-137); "every time cut" of the card reduces to that instant. A different verifier with several descent epochs is outside the theorem (bound becomes #free ops >= 8, grouped by register version only in a slab). +3. The card's premise is imprecise: rank(M o Odd) = 112 (M = B3R/M.npy, rank 112; M != I-RR^T/2 exactly), so "odd part of M has rank 8" is false as stated; also M is the A,B,cut-order replay (B3 replay.py), while in AL order A,cut,B the target-source map is I. The right rank object is the minimum-rank COMPLETION of the odd-position constraints (clique bound), not a Hadamard-masked rank. Also G_ut odd <-> port pair EVEN (diag G=2, diag ports odd). +4. mu >= omega only; mu = 8 follows from omega=8 plus the shipped words (|K|=8). Valid for these ports (all three words have the same port set up to the same labels). +5. Does not price anything: B106 (cst per functional) and R40-C/B134/B164 pricing stay as is; this gives the count, which they used as ARGUED. B14/B27 (decoder terms) are separate (decoder n>=9 via B109). diff --git a/research/helper-minimality/evidence/B175-NOTES.md b/research/helper-minimality/evidence/B175-NOTES.md new file mode 100644 index 0000000000..7815bd79b3 --- /dev/null +++ b/research/helper-minimality/evidence/B175-NOTES.md @@ -0,0 +1,13 @@ +# B175: re-balance 12 demand planes S1 stoppers vs B delivery. VERDICT: KILL PROVEN (scope: #656 skeleton, block 4567, shipped frames/values; register-count c_B). ship=false, no oracle/cpuq. +Tools (single process, seconds): gate.py/gate2.py/gate3.py (replay A,cut,B,tail,comp with exact rows; reads of any source whose row support lies inside a non-stopper plane). Block cols here are 20,21,36,37,46,47,110,111 (= card's 22,23,...; relabelled). +## Measured (4567) +- Non-stopper planes (2 classes, 4 planes): P1{20,21,46,47} P2{36,37,110,111} P3{20,37,46,110} P4{21,36,47,111}; stoppers = other 8 demand planes (8/8 confirmed). +- B delivers them through exactly the 8 PAIR-bound registers (lines 21,36,47,111 + scratch 441,443,445,447): 4 pair forms (20,46),(21,47),(36,111),(37,110), each held by 2 registers (original + twin), each pair used by exactly 2 of the 4 planes and by NO stopper plane (checked: no stopper contains both points of any pair). Plus couriers 437/442 (already whole-bound, counted in S1's 8). +- Readers (comp-phase targets 113.. ) get them as 1-4 reads of 441/443/445/447 (+437/442): extra ops, but NO extra registers; 447 additionally accumulates plane P2 in B for free (B170/173 accumulators 594/603 hold P4/P2 once). +## c_B (registers attributable to B-delivering one non-stopper plane) +- All 4 planes moved to S1 (k 8->12): S1 +2 regs/plane = +8; frees all 8 pair-bound regs (pairs no longer read) => c_B = 8/4 = 2.0 per plane => net (c_B-2) = 0.0. Total regs 12 stoppers+12 whole = 24 = same budget (B167 matching tight). +- Moving ONE class (2 planes) or one plane: pairs still needed by the remaining planes (each pair serves 2 planes, in both classes) => frees 0 => c_B = 0, net -2 per plane (worse). +- Opposite direction (k 8->6, deliver a stoppered class via B): needs new pair forms in another direction (4 pairs per class, twins forced by 2 crossing reader blocks B110) => c_B_added 4-8 regs vs 4 freed: net <= 0. +=> c_B = 2 within +-0.5 in both directions (partial moves strictly worse). Shipped trade is balanced; KILL PROVEN. Net helpers per moved plane: 0 (full) / -2 (partial). Word-wide gain 0 (<5 needed). +## Not covered +Op/read count (not registers) differs (stopper = 1 read vs 2-4); no register price. Blocks (0,1,*) not scanned (escape 2 for B171). Interface rewrite (lines holding plane rows) untested but is register-neutral by count. diff --git a/research/helper-minimality/evidence/B176-NOTES.md b/research/helper-minimality/evidence/B176-NOTES.md new file mode 100644 index 0000000000..63a2e2281b --- /dev/null +++ b/research/helper-minimality/evidence/B176-NOTES.md @@ -0,0 +1,12 @@ +# B176: in-place line couriers (delete 38 twin couriers). VERDICT: KILL PROVEN [scope: shipped #656, all 38 twin couriers (11 blocks), exact Fraction replay of the whole word]. ship=false, no oracle/kappa. +Tools (single process, seconds): common.py (twin list from SYN-18 planes.py/fuse.py logic), val.py (value check through ALL of A+post-A), val2.py (stopper reads only), law.py (Lawler attempt; not instantiable, see below). +## Premise is false +- The 38 "twins" are NOT copies built by one op. Each u is a long-lived A working register: 20-27 writes and 19-25 source reads in A (stage/Walsh/Haar forms). Its end-of-A row equals P's only by coincidence (the B92b situation, all 38 not 16). Post-A, u is touched once or twice, only in the tail: `u -= P` (it is zeroed there), never read by a stopper z. The stopper z's courier read of u happens INSIDE A (plane-build), at u's stage value. +## Value check (through all of A) +- Replay every op of A/cut/B/tail/comp/cleanup; at each op that reads u compare row(u) with row(P): 0 of 38 twins value-exact. Unequal reads per twin: 11-25, all in A (post-A reads are equal, they are the zeroing ops). Restricting to the stopper-z reads of u: the only equal reads are 0==0 (both still empty); every nonzero courier read has row(u) != row(P) (P holds a single line/pair form, u a 2-4 term stage form). So rewiring z's ADD to read P changes VALUES; B176's "same value" assumption fails. +- Deleting u's writes would also delete its A-time role (it feeds 22 other ops), not just a copy. +## Lawler gate +- Not instantiable on the card's model: there is no single courier visit with value P to test. The value check precedes it (CHECK ORDER values -> frames) and eliminates all 38, so the Lawler result is moot: 0 pass / 38 (reason: value-forced, not frame-forced). law.py as written finds no post-A stopper read of u (its 'no stopper read' output = confirms premise failure). +## Price / escapes +- Prize 0: 0 deletable helpers. No splice, no kappa. +- Escapes (not run): (1) re-timed A in which P is built to the plane-courier role (a different S1 program, = B167 interface change); (2) B175 fewer planes; (3) non-twin couriers out of scope. diff --git a/research/helper-minimality/evidence/B178-VERIFIER-GAP.md b/research/helper-minimality/evidence/B178-VERIFIER-GAP.md new file mode 100644 index 0000000000..69a7447d75 --- /dev/null +++ b/research/helper-minimality/evidence/B178-VERIFIER-GAP.md @@ -0,0 +1,16 @@ +# B178 / B174: do any checks frame-check or restrict the CUT ops? (quiet; local only, nothing pushed/posted) +Checkouts: PR=B147/work/pr (gauge44-frames-x), P35=B76/work/pr635 (upstream hpe_* scripts used by reproduce.py:170-180 / promo:84-87). +## Evidence (file:line) +- audit_local (PR/research/gauge44-frames-x/independent/audit_local.py): :82 main=A+cut+B only used for the matrix; frame loop :126-138 climbs only A/B (:137-138); cut touched only at :132 (reads e[1],e[2] to build `served`, no check on e[2] being a centre); :88 "non-target reads target" covers A,B only, not cut. +- Transport (P35/research/complex-571-cold14-st2/code/hpe_audit_and_transport.py): :114 same A+cut+B matrix; :243 same `served` set; no frame/centre check on cut sources. +- Emitter hpe_emit_local.py:94 `terms=[e for e in c['cut'] if e[2]==r]` for r in c['centers']: cut ops whose source is NOT a centre are SILENTLY DROPPED from the emitted local program (never executed, never frame-checked). +- hpe_audit_local.py (replays only the emitted events): every scalar needs cur[r]==f (:~75) and ends with identity check on rows (:~104+); sees no cut op outside the centre loop. Rest of global chain (gauge44-frames-x/code/audit_allcold.py, assemble.py, invoice_allcold.py, verify_global.py) works on provider receipts/canonical fields (centers, center_frames, frames) and never reads word['cut'] (grep: no 'cut' hit; only assemble.py:210 unrelated "cutoff"). +- Only enforcement of H-CUT: generator side, construction/construct_gauge_xcentre.py:344 (cut built as centre->target adds) and :360 (assert on dropped ops); plus len(centers)==8 (audit_allcold.py:75, audit_local.py:68 with --main). +## Spec +03-motifs.tex:78-83 (schedule): "subtract scatter / scatter = one gate on targets and center"; "gather = one gate on sources and center". 03-motifs.tex:415: centre 3->4 is the only dimension-decreasing edge. The cut is the scatter from the copied centre register C_k (hpe_emit_local.py:97 copy L_r->C_k at frame cf, :100-102 add L_t<-C_k): sources are always the private centre copy, at a legal common frame. Nothing in 03/04 allows a scatter to read an arbitrary register. +## Toy (cards/B178/work: toy-FULL-WORD.json.gz = out799 promo word + `add 112<-5 (+1)` first and `add 112<-5 (-1)` last in cut; reg 5 is a non-centre source, no frame given) +- (a) audit_local: ACCEPTS (same PASS receipt as unedited, 0.74 s). +- (b) full local chain (transport -> emit -> hpe_audit_local, jobs/B178chain.log): ACCEPTS, "PASS_INDEPENDENT_LOCAL_SCALAR_FRAME_AND_WRAPPER_REPLAY 25 controls rejected"; emitted event count 24411 identical to the unedited word, because the emitter dropped the two ops (hpe_emit_local.py:94). Global assembly never sees the cut. +- Not run: a net-nonzero non-centre cut read. Inference: emitter drops it, so the emitted program no longer matches the identity map and hpe_audit_local rejects (by the matrix check, not by a frame/centre message). Untested. +## Conclusion +No later check frame-checks cut ops or restricts their sources; H-CUT is enforced only by the generator and, indirectly, by the emitter dropping non-centre terms. The soundness-relevant object (the EMITTED program, whose centre phase is frame-audited) is always centre-sourced, so a non-centre cut read cannot be priced as a real operation: net-zero ones are inert (accepted but dropped), needed ones should fail the emitted identity check. Verdict: NON-ISSUE for soundness/pricing of the executed program; cosmetic gap = audit_local alone (and its receipt) would accept a word whose `cut` has non-centre reads. Do not build on non-centre cut reads. The authors may mention at most that audit_local's scope is word-level while the emitter defines the executed cut. diff --git a/research/helper-minimality/evidence/B179-NOTES.md b/research/helper-minimality/evidence/B179-NOTES.md new file mode 100644 index 0000000000..f7944dc4ad --- /dev/null +++ b/research/helper-minimality/evidence/B179-NOTES.md @@ -0,0 +1,9 @@ +# B179 borrowed-target plane jump. VERDICT: KILL PROVEN [scope: shipped #656, all 88 plane stoppers (11 S1 blocks), early-A/B jump, 5-op gadget and its point-holder variant]. ship=false, no oracle/kappa. +Tools (single process, seconds): gate.py (exact Fraction replay of A, validated: end rows == rows0, 0 mismatches), gate2.py (jump op of each stopper, holder search). +## Gate (main risk checked first) - risk is real, total +- All 88 stoppers: jump op found (z is target; z frame before = 2 points, partner row = 2 columns). The partner u is the courier (lines 20/37/110.. or scratch). +- Holders of the l2 piece (row proportional to u's row, any register != z,u, any frame, at the jump moment): 0 of 88. Escape 2 (each l2 column held by a pure point register): 0 of 88 (inside plane 0, no-climb 0). (i)&(ii) = 0 in every block. +## Second, independent frame objection (SPEC, audit_local 'scalar': both operands at common frame f) +- Card step (2) t += a*y happens with t already at z's frame P1 (step 1). y holds l2 (support in Pi\P1), so f(y) does not contain P1: y climbs to join = Pi. So "y is only read, frame stays l2" is false; y would need bound >= Pi = be a courier. Reordering (t += a*y first, t at ()) keeps y low but then z += k*t puts pollution a*l2 into t at Pi; removing it needs an l2 holder at frame >= Pi (again a courier). Lemma B167 extends to borrowed partners: every route needs a second Pi-frame l2 holder besides z,t. +## Price / escapes +- Prize 0 (no fusable stoppers); no splice. Remaining escape only: interface change (B175 fewer planes / B180 other hyperplanes). diff --git a/research/helper-minimality/evidence/B182-NOTES.md b/research/helper-minimality/evidence/B182-NOTES.md new file mode 100644 index 0000000000..f3e9483ec5 --- /dev/null +++ b/research/helper-minimality/evidence/B182-NOTES.md @@ -0,0 +1,13 @@ +# B182: Lawler certificates on the "uncovered" helper classes of #799. VERDICT: 0 removable, all certified (scope below). ship=false, no kappa claim, no oracle run needed. No heavy jobs (single process, <1 min). +Tool: b182.py (reuses B171 lawler799 + B172 lawler; generalises copy detection: first op filling an empty row t>=v from a nonempty source; bridges = class 'BR'). +## Bridge registers 716..727 (12) +- Role: 4 groups (716-719 around 712-715; 720-727 around 133/149/159/222). Start frames 423-427. Phase 1 (B 311-378) is VALUE-ZERO: empty rows used purely as frame couriers (e.g. 190,211,155,216 += +-1/2*716; 716 += 717/718/719). Phase 2 (B ~1178-1189) each becomes an 8-support copy of one S3 helper (716<-528, 717<-529, 718<-516, 719<-517, 720<-494, 721<-495, 722<-518, 723<-519, 724<-530, 725<-531, 726<-506, 727<-507). Phase 3 (B 1878-1916): swap with 714/715-type registers (X+=bridge, bridge+=-1/2 X) then flushed into 155/216/159/... with coeff -2/+1. +- Lawler (post-copy visits of source+bridge, no precedence, as B171): 12/12 FAIL (each chain alone passes) => no bridge merges into its source helper under any reorder. +- Merge into any OTHER register: the 12 fill rows are pairwise non-proportional 8-supports with overlapping lifetimes (B1178..B1916) => value-impossible without extra undo/redo ADDs. +- Phase-1 frame-courier role is ignored in the test (pre-copy visits only add conflicts), sound for a FAIL certificate. +## Entering helpers 450..457 and 6-frame/24-30-frame holders 484..569 +- These are S3 packet copies; the 94 copies in these ranges (ledger S3) all FAIL Lawler too (94/94, chains-alone ok); consistent with B171 268/268. B169 already showed holder reuse is legal only for 450..457 (8 slots, #869) and illegal elsewhere (final caps). +## Proven minimal (KPR3 material), scope: #799 op multiset fixed, value-forced lower-bound frames, caps = reached-target ports +- bridge 12/12, S3 holders/entering 94/94. Removable: 0. +## Not covered (unchanged) +- Multiset-changing merges (undo-ADD of a source then reuse); precedence-aware variants unneeded; no independent second-reader audit of g/caps; S1 (0,1,*) blocks (B177). diff --git a/research/helper-minimality/evidence/B185-NOTES.md b/research/helper-minimality/evidence/B185-NOTES.md new file mode 100644 index 0000000000..6437191405 --- /dev/null +++ b/research/helper-minimality/evidence/B185-NOTES.md @@ -0,0 +1,5 @@ +# B185 NOTES: KILL (scope: reading/argument only, no compute; #656 S3/S4 B172, S1 B167, KPR3 THEOREM). Counts are NOT cancellation-free-dependent in the Boyar-Find sense; they are multiset-fixed (FOM). ship=false +- B172 (NOTES "Caveat", "Escapes (1)") and KPR3/THEOREM.md:38,84 state the scope explicitly: op multiset fixed; undo/redo ADDs are outside "every Lawler result". So a cancelling delivery IS outside the stated theorem (as the card suspected), but the scope was already known, not new. +- Mechanism (lawler.py:16-21, 31-40): the unit is the FRAME = running join (basis of span union) of everything a register ever received (fr[t]=basis(fr[t]+fr[s])); frames are monotone and never shrink. Cancellation changes VALUES, not frames (SYN-7 Lemma 1: an ADD equalises frames). Boyar-Find's gap lives in the value/support semiring (a term added then removed is still "seen"); here the cost is already measured in the history-join semiring, which is cancellation-blind. A shared over-covering intermediate carries the partner's frame g into both readers' caps; the later correcting ADD is one more visit (its g also joins) and cannot lower J. Lawler fail certificate (join of visits not in cap_k) is value-independent => the 2-visit pair conflicts persist for any cancelling variant of a given pair. B167 allows unimodular remix (cancellation) within a class; its Hall lemma is a frame bound (join <= both bounds), so also covered. +- Not run: step 3 (smallest cancelling face on #799) and the reality gate: the frame argument says the cancelling face cannot save the copy (still >= the visits), so nothing to count. No count/price numbers. +- Transferable ingredient (lit rule): the paper's separating examples (Sierpinski-type, depth tradeoff) exploit cancellation of VALUES; only a mechanism that cancels in FRAMES (e.g. a descent / frame-dropping op, SYN-7 (c)) could transfer. Gauge44 re-threading at equal values is the closest analogue; nothing new here. diff --git a/research/helper-minimality/evidence/B82-NOTES.md b/research/helper-minimality/evidence/B82-NOTES.md new file mode 100644 index 0000000000..f229f6ac26 --- /dev/null +++ b/research/helper-minimality/evidence/B82-NOTES.md @@ -0,0 +1,17 @@ +# B82: why a SECOND copy per block output face (S3 156) and per M slot (S4 112)? VERDICT: KILL, PROVEN [scope: shipped #656 word, fixed op ORDER, min-frame (monotone, ADD common frame = sum) replay]; order-free = B80's loose bound. ship=false +Tools (single process, <1 s): work/c82.py = B76 construct_tagged.py + op/copy recorder (output FULL-WORD.json.gz byte-IDENTICAL to B76 out_raw); work/an.py = taint + min-frame replay + tests. Raw: work/out/rec.pkl. Gate 10 min: passed on the classification, overran slightly on the replay. +## What the code does (construct_gauge_xcentre.py:244-295) +S3: b = alloc; b += a (copy of block c's output face; consumers = the 2 other blocks containing the pair, one gets a, one b). Each packet is consumed once: either READ-ONLY into a selected target (v+t += r at frame inside hyper(P[t])), or MUTATED in place by the M merge (a += (beta/alpha) b). S4: M is read by two pair consumers that each apply a 2x2 in place to (slot_a, slot_b), then read the slots into targets at F = hyper(P[t]) (dim 8). The 2nd consumer gets a copy. +## Classification (156 S3 + 112 S4 = 268) +- h2 (dirt return / restore): 0. The cleanup phase is the mirror inverse of A+B, so no copy exists for restoration. (S3+S4 = 268 = B22's dirt-only count only because copies are born as dirt-borrowing carriers; this is not a reason for them.) +- Value use after the copy (writes to a, b after the copy op): S3 76 both read-only; 48 exactly one side mutated; 32 both mutated; S4 112 both mutated. So 124 S3 are VALUE-feasible with one packet (serve the read-only/non-mutated side first); 32 S3 + 112 S4 = 144 need extra undo/redo ADDs (value-forced, not a convenience). +- h1 (reader-frame incompatibility): the copy-time frame is fine (S3 dim 3, S4 dim 5 each lie in perp of the union of both chains' downstream target ports: 268/268), but at the shipped order NO read is compatible: for each pair, the minimal-frame (lower bound for any frame choice) state of a register at the end of chain 1 is never inside perp(ports of chain 2's targets): 268/268 fail both orders; for the 124 value-feasible S3, 0 of all read ops pass (first read included). The reads occur after the target has accumulated its frame (target frame ~ perp(port), dim 5-8), so one packet that has served target t1 sits in hyper(P[t1]) and cannot serve t2 (hyper(P[t1]) is not inside hyper(P[t2])). S4 reads are at F = hyper(P[t]) outright. +- h3 (pure convenience): 0 at fixed order. +Counts: h1 (frame-forced at fixed order, value-feasible) 124; value-forced (mutation, also frame-blocked) 144; h2 0; h3 0. By the gate text (>= 20 h1 copies) this is nominally a LEAD, but every h1 copy is blocked by the TARGET-READ ORDER, which is exactly B80's question. +## Link to B80 / SYN-4 +B80: at the fixed order, targets sit at the transitive ceiling (87% exact), net -5.6 psi; the only open route is reordering target reads (loose order-free bound 614 psi/call, ~10% odds). B82 confirms the same mechanism as the reason for the copies: fan-out is forced by when targets are read, not by value or restoration. A single-packet variant would require (i) reading the packet into BOTH targets while their frames are still inside hyper(P[t1]) ∩ hyper(P[t2]) (dim <= 7; a block with k readers: <= 8 - ceil(log2 k)), (ii) for the 144 mutated cases, undo/redo ADDs whose common frame also grows partners. Not built: step 2 not run (fixed-order necessary condition fails; one block's variant needs a DAG-level reorder, > 2 h and B80's order-free bound unproven). No kappa claim. +## Escapes (>= 3) +1. Order-free necessary test per pair: min frame of the packet when each target is read FIRST (empty target frame) vs perp of the other chain; if it passes for the 124, price one block via B66 (needs B80's DAG bound >= 400 psi first). +2. Mutated 144: replace copy by undo-ADD of the merge partner (extra ops are free, only frames cost); price frame growth of the partner with B11 upper(). +3. Choose reader pairs (t1,t2) of a packet to share ports hyperplanes (cap geometry: SYN-4) in a new skeleton (B81), not the shipped one. +Rescue check: replaced "end of chain" by FIRST read op with min frame: still 0/124 pass. Fixed-order verdict holds. diff --git a/research/helper-minimality/inputs/derived/pairs.json.gz b/research/helper-minimality/inputs/derived/pairs.json.gz new file mode 100644 index 0000000000..fe4b78a0d2 Binary files /dev/null and b/research/helper-minimality/inputs/derived/pairs.json.gz differ diff --git a/research/helper-minimality/inputs/ledger_helpers.csv b/research/helper-minimality/inputs/ledger_helpers.csv new file mode 100644 index 0000000000..fca828d2b8 --- /dev/null +++ b/research/helper-minimality/inputs/ledger_helpers.csv @@ -0,0 +1,493 @@ +reg,site,detail,centre,nclimb,climb_mass,psi,resid_width,widths +224,S1_block_scratch,"(0, 1, 2, 3)|8",1,7,17,50.7571007216044,9,8 4 1 1 1 1 1 +225,S1_block_scratch,"(0, 1, 2, 3)|9",0,4,4,17.161837764593564,4,1 1 1 1 +226,S1_block_scratch,"(0, 1, 2, 3)|10",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +227,S1_block_scratch,"(0, 1, 2, 3)|11",0,4,4,17.161837764593564,4,1 1 1 1 +228,S1_block_scratch,"(0, 1, 2, 3)|12",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +229,S1_block_scratch,"(0, 1, 2, 3)|13",0,5,9,30.56694540816502,9,5 1 1 1 1 +230,S1_block_scratch,"(0, 1, 2, 3)|14",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +231,S1_block_scratch,"(0, 1, 2, 3)|15",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +232,S1_block_scratch,"(0, 1, 2, 3)|16",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +233,S1_block_scratch,"(0, 1, 2, 3)|17",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +234,S1_block_scratch,"(0, 1, 2, 3)|18",0,5,9,30.56694540816502,9,5 1 1 1 1 +235,S1_block_scratch,"(0, 1, 2, 3)|19",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +236,S1_block_scratch,"(0, 1, 2, 3)|20",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +237,S1_block_scratch,"(0, 1, 2, 3)|21",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +238,S1_block_scratch,"(0, 1, 2, 3)|22",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +239,S1_block_scratch,"(0, 1, 2, 3)|23",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +240,S1_block_scratch,"(0, 1, 4, 5)|8",1,7,17,50.7571007216044,9,8 4 1 1 1 1 1 +241,S1_block_scratch,"(0, 1, 4, 5)|9",0,4,4,17.161837764593564,4,1 1 1 1 +242,S1_block_scratch,"(0, 1, 4, 5)|10",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +243,S1_block_scratch,"(0, 1, 4, 5)|11",0,4,4,17.161837764593564,4,1 1 1 1 +244,S1_block_scratch,"(0, 1, 4, 5)|12",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +245,S1_block_scratch,"(0, 1, 4, 5)|13",0,5,9,30.56694540816502,9,5 1 1 1 1 +246,S1_block_scratch,"(0, 1, 4, 5)|14",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +247,S1_block_scratch,"(0, 1, 4, 5)|15",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +248,S1_block_scratch,"(0, 1, 4, 5)|16",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +249,S1_block_scratch,"(0, 1, 4, 5)|17",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +250,S1_block_scratch,"(0, 1, 4, 5)|18",0,5,9,30.56694540816502,9,5 1 1 1 1 +251,S1_block_scratch,"(0, 1, 4, 5)|19",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +252,S1_block_scratch,"(0, 1, 4, 5)|20",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +253,S1_block_scratch,"(0, 1, 4, 5)|21",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +254,S1_block_scratch,"(0, 1, 4, 5)|22",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +255,S1_block_scratch,"(0, 1, 4, 5)|23",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +256,S1_block_scratch,"(0, 1, 6, 7)|8",1,7,17,50.7571007216044,9,8 4 1 1 1 1 1 +257,S1_block_scratch,"(0, 1, 6, 7)|9",0,4,4,17.161837764593564,4,1 1 1 1 +258,S1_block_scratch,"(0, 1, 6, 7)|10",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +259,S1_block_scratch,"(0, 1, 6, 7)|11",0,4,4,17.161837764593564,4,1 1 1 1 +260,S1_block_scratch,"(0, 1, 6, 7)|12",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +261,S1_block_scratch,"(0, 1, 6, 7)|13",0,5,9,30.56694540816502,9,5 1 1 1 1 +262,S1_block_scratch,"(0, 1, 6, 7)|14",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +263,S1_block_scratch,"(0, 1, 6, 7)|15",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +264,S1_block_scratch,"(0, 1, 6, 7)|16",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +265,S1_block_scratch,"(0, 1, 6, 7)|17",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +266,S1_block_scratch,"(0, 1, 6, 7)|18",0,5,9,30.56694540816502,9,5 1 1 1 1 +267,S1_block_scratch,"(0, 1, 6, 7)|19",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +268,S1_block_scratch,"(0, 1, 6, 7)|20",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +269,S1_block_scratch,"(0, 1, 6, 7)|21",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +270,S1_block_scratch,"(0, 1, 6, 7)|22",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +271,S1_block_scratch,"(0, 1, 6, 7)|23",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +272,S1_block_scratch,"(0, 2, 4, 6)|8",0,6,9,33.06895752585596,9,4 1 1 1 1 1 +273,S1_block_scratch,"(0, 2, 4, 6)|9",0,4,4,17.161837764593564,4,1 1 1 1 +274,S1_block_scratch,"(0, 2, 4, 6)|10",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +275,S1_block_scratch,"(0, 2, 4, 6)|11",0,4,4,17.161837764593564,4,1 1 1 1 +276,S1_block_scratch,"(0, 2, 4, 6)|12",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +277,S1_block_scratch,"(0, 2, 4, 6)|13",0,4,4,17.161837764593564,4,1 1 1 1 +278,S1_block_scratch,"(0, 2, 4, 6)|14",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +279,S1_block_scratch,"(0, 2, 4, 6)|15",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +280,S1_block_scratch,"(0, 2, 4, 6)|16",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +281,S1_block_scratch,"(0, 2, 4, 6)|17",0,5,9,30.56694540816502,9,5 1 1 1 1 +282,S1_block_scratch,"(0, 2, 4, 6)|18",0,4,4,17.161837764593564,4,1 1 1 1 +283,S1_block_scratch,"(0, 2, 4, 6)|19",0,8,9,37.227840609215626,9,2 1 1 1 1 1 1 1 +284,S1_block_scratch,"(0, 2, 4, 6)|20",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +285,S1_block_scratch,"(0, 2, 4, 6)|21",0,5,9,30.56694540816502,9,5 1 1 1 1 +286,S1_block_scratch,"(0, 2, 4, 6)|22",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +287,S1_block_scratch,"(0, 2, 4, 6)|23",0,5,9,31.682663164736066,9,4 2 1 1 1 +288,S1_block_scratch,"(0, 2, 5, 7)|8",0,6,9,33.06895752585596,9,4 1 1 1 1 1 +289,S1_block_scratch,"(0, 2, 5, 7)|9",0,4,4,17.161837764593564,4,1 1 1 1 +290,S1_block_scratch,"(0, 2, 5, 7)|10",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +291,S1_block_scratch,"(0, 2, 5, 7)|11",0,4,4,17.161837764593564,4,1 1 1 1 +292,S1_block_scratch,"(0, 2, 5, 7)|12",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +293,S1_block_scratch,"(0, 2, 5, 7)|13",0,4,4,17.161837764593564,4,1 1 1 1 +294,S1_block_scratch,"(0, 2, 5, 7)|14",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +295,S1_block_scratch,"(0, 2, 5, 7)|15",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +296,S1_block_scratch,"(0, 2, 5, 7)|16",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +297,S1_block_scratch,"(0, 2, 5, 7)|17",0,5,9,30.56694540816502,9,5 1 1 1 1 +298,S1_block_scratch,"(0, 2, 5, 7)|18",0,4,4,17.161837764593564,4,1 1 1 1 +299,S1_block_scratch,"(0, 2, 5, 7)|19",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +300,S1_block_scratch,"(0, 2, 5, 7)|20",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +301,S1_block_scratch,"(0, 2, 5, 7)|21",0,5,9,30.56694540816502,9,5 1 1 1 1 +302,S1_block_scratch,"(0, 2, 5, 7)|22",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +303,S1_block_scratch,"(0, 2, 5, 7)|23",0,5,9,31.682663164736066,9,4 2 1 1 1 +304,S1_block_scratch,"(0, 3, 4, 7)|8",0,6,9,33.06895752585596,9,4 1 1 1 1 1 +305,S1_block_scratch,"(0, 3, 4, 7)|9",0,4,4,17.161837764593564,4,1 1 1 1 +306,S1_block_scratch,"(0, 3, 4, 7)|10",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +307,S1_block_scratch,"(0, 3, 4, 7)|11",0,4,4,17.161837764593564,4,1 1 1 1 +308,S1_block_scratch,"(0, 3, 4, 7)|12",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +309,S1_block_scratch,"(0, 3, 4, 7)|13",0,4,4,17.161837764593564,4,1 1 1 1 +310,S1_block_scratch,"(0, 3, 4, 7)|14",0,5,8,29.641544302062908,8,3 2 1 1 1 +311,S1_block_scratch,"(0, 3, 4, 7)|15",0,5,8,29.641544302062908,8,3 2 1 1 1 +312,S1_block_scratch,"(0, 3, 4, 7)|16",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +313,S1_block_scratch,"(0, 3, 4, 7)|17",0,5,9,30.56694540816502,9,5 1 1 1 1 +314,S1_block_scratch,"(0, 3, 4, 7)|18",0,4,4,17.161837764593564,4,1 1 1 1 +315,S1_block_scratch,"(0, 3, 4, 7)|19",0,8,9,37.227840609215626,9,2 1 1 1 1 1 1 1 +316,S1_block_scratch,"(0, 3, 4, 7)|20",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +317,S1_block_scratch,"(0, 3, 4, 7)|21",0,5,9,30.56694540816502,9,5 1 1 1 1 +318,S1_block_scratch,"(0, 3, 4, 7)|22",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +319,S1_block_scratch,"(0, 3, 4, 7)|23",0,5,9,31.682663164736066,9,4 2 1 1 1 +320,S1_block_scratch,"(0, 3, 5, 6)|8",0,6,9,33.06895752585596,9,4 1 1 1 1 1 +321,S1_block_scratch,"(0, 3, 5, 6)|9",0,4,4,17.161837764593564,4,1 1 1 1 +322,S1_block_scratch,"(0, 3, 5, 6)|10",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +323,S1_block_scratch,"(0, 3, 5, 6)|11",0,4,4,17.161837764593564,4,1 1 1 1 +324,S1_block_scratch,"(0, 3, 5, 6)|12",0,5,9,32.02246123832686,9,3 3 1 1 1 +325,S1_block_scratch,"(0, 3, 5, 6)|13",0,4,4,17.161837764593564,4,1 1 1 1 +326,S1_block_scratch,"(0, 3, 5, 6)|14",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +327,S1_block_scratch,"(0, 3, 5, 6)|15",0,5,8,29.641544302062908,8,3 2 1 1 1 +328,S1_block_scratch,"(0, 3, 5, 6)|16",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +329,S1_block_scratch,"(0, 3, 5, 6)|17",0,5,9,30.56694540816502,9,5 1 1 1 1 +330,S1_block_scratch,"(0, 3, 5, 6)|18",0,4,4,17.161837764593564,4,1 1 1 1 +331,S1_block_scratch,"(0, 3, 5, 6)|19",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +332,S1_block_scratch,"(0, 3, 5, 6)|20",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +333,S1_block_scratch,"(0, 3, 5, 6)|21",0,5,9,30.56694540816502,9,5 1 1 1 1 +334,S1_block_scratch,"(0, 3, 5, 6)|22",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +335,S1_block_scratch,"(0, 3, 5, 6)|23",0,5,9,31.682663164736066,9,4 2 1 1 1 +336,S1_block_scratch,"(1, 2, 4, 7)|8",0,6,9,33.06895752585596,9,4 1 1 1 1 1 +337,S1_block_scratch,"(1, 2, 4, 7)|9",0,4,4,17.161837764593564,4,1 1 1 1 +338,S1_block_scratch,"(1, 2, 4, 7)|10",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +339,S1_block_scratch,"(1, 2, 4, 7)|11",0,4,4,17.161837764593564,4,1 1 1 1 +340,S1_block_scratch,"(1, 2, 4, 7)|12",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +341,S1_block_scratch,"(1, 2, 4, 7)|13",0,4,4,17.161837764593564,4,1 1 1 1 +342,S1_block_scratch,"(1, 2, 4, 7)|14",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +343,S1_block_scratch,"(1, 2, 4, 7)|15",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +344,S1_block_scratch,"(1, 2, 4, 7)|16",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +345,S1_block_scratch,"(1, 2, 4, 7)|17",0,5,9,30.56694540816502,9,5 1 1 1 1 +346,S1_block_scratch,"(1, 2, 4, 7)|18",0,4,4,17.161837764593564,4,1 1 1 1 +347,S1_block_scratch,"(1, 2, 4, 7)|19",0,8,9,37.227840609215626,9,2 1 1 1 1 1 1 1 +348,S1_block_scratch,"(1, 2, 4, 7)|20",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +349,S1_block_scratch,"(1, 2, 4, 7)|21",0,5,9,30.56694540816502,9,5 1 1 1 1 +350,S1_block_scratch,"(1, 2, 4, 7)|22",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +351,S1_block_scratch,"(1, 2, 4, 7)|23",0,6,9,33.06895752585596,9,4 1 1 1 1 1 +352,S1_block_scratch,"(1, 2, 5, 6)|8",0,6,9,33.06895752585596,9,4 1 1 1 1 1 +353,S1_block_scratch,"(1, 2, 5, 6)|9",0,4,4,17.161837764593564,4,1 1 1 1 +354,S1_block_scratch,"(1, 2, 5, 6)|10",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +355,S1_block_scratch,"(1, 2, 5, 6)|11",0,4,4,17.161837764593564,4,1 1 1 1 +356,S1_block_scratch,"(1, 2, 5, 6)|12",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +357,S1_block_scratch,"(1, 2, 5, 6)|13",0,4,4,17.161837764593564,4,1 1 1 1 +358,S1_block_scratch,"(1, 2, 5, 6)|14",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +359,S1_block_scratch,"(1, 2, 5, 6)|15",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +360,S1_block_scratch,"(1, 2, 5, 6)|16",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +361,S1_block_scratch,"(1, 2, 5, 6)|17",0,5,9,30.56694540816502,9,5 1 1 1 1 +362,S1_block_scratch,"(1, 2, 5, 6)|18",0,4,4,17.161837764593564,4,1 1 1 1 +363,S1_block_scratch,"(1, 2, 5, 6)|19",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +364,S1_block_scratch,"(1, 2, 5, 6)|20",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +365,S1_block_scratch,"(1, 2, 5, 6)|21",0,5,9,30.56694540816502,9,5 1 1 1 1 +366,S1_block_scratch,"(1, 2, 5, 6)|22",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +367,S1_block_scratch,"(1, 2, 5, 6)|23",0,6,9,33.06895752585596,9,4 1 1 1 1 1 +368,S1_block_scratch,"(1, 3, 4, 6)|8",0,6,9,33.06895752585596,9,4 1 1 1 1 1 +369,S1_block_scratch,"(1, 3, 4, 6)|9",0,4,4,17.161837764593564,4,1 1 1 1 +370,S1_block_scratch,"(1, 3, 4, 6)|10",0,5,9,32.02246123832686,9,3 3 1 1 1 +371,S1_block_scratch,"(1, 3, 4, 6)|11",0,4,4,17.161837764593564,4,1 1 1 1 +372,S1_block_scratch,"(1, 3, 4, 6)|12",0,5,9,32.02246123832686,9,3 3 1 1 1 +373,S1_block_scratch,"(1, 3, 4, 6)|13",0,4,4,17.161837764593564,4,1 1 1 1 +374,S1_block_scratch,"(1, 3, 4, 6)|14",0,5,9,32.02246123832686,9,3 3 1 1 1 +375,S1_block_scratch,"(1, 3, 4, 6)|15",0,5,9,32.02246123832686,9,3 3 1 1 1 +376,S1_block_scratch,"(1, 3, 4, 6)|16",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +377,S1_block_scratch,"(1, 3, 4, 6)|17",0,5,9,30.56694540816502,9,5 1 1 1 1 +378,S1_block_scratch,"(1, 3, 4, 6)|18",0,4,4,17.161837764593564,4,1 1 1 1 +379,S1_block_scratch,"(1, 3, 4, 6)|19",0,8,9,37.227840609215626,9,2 1 1 1 1 1 1 1 +380,S1_block_scratch,"(1, 3, 4, 6)|20",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +381,S1_block_scratch,"(1, 3, 4, 6)|21",0,5,9,30.56694540816502,9,5 1 1 1 1 +382,S1_block_scratch,"(1, 3, 4, 6)|22",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +383,S1_block_scratch,"(1, 3, 4, 6)|23",0,6,9,33.06895752585596,9,4 1 1 1 1 1 +384,S1_block_scratch,"(1, 3, 5, 7)|8",0,6,9,33.06895752585596,9,4 1 1 1 1 1 +385,S1_block_scratch,"(1, 3, 5, 7)|9",0,4,4,17.161837764593564,4,1 1 1 1 +386,S1_block_scratch,"(1, 3, 5, 7)|10",0,5,9,32.02246123832686,9,3 3 1 1 1 +387,S1_block_scratch,"(1, 3, 5, 7)|11",0,4,4,17.161837764593564,4,1 1 1 1 +388,S1_block_scratch,"(1, 3, 5, 7)|12",0,5,9,32.02246123832686,9,3 3 1 1 1 +389,S1_block_scratch,"(1, 3, 5, 7)|13",0,4,4,17.161837764593564,4,1 1 1 1 +390,S1_block_scratch,"(1, 3, 5, 7)|14",0,5,9,32.02246123832686,9,3 3 1 1 1 +391,S1_block_scratch,"(1, 3, 5, 7)|15",0,5,9,32.02246123832686,9,3 3 1 1 1 +392,S1_block_scratch,"(1, 3, 5, 7)|16",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +393,S1_block_scratch,"(1, 3, 5, 7)|17",0,5,9,30.56694540816502,9,5 1 1 1 1 +394,S1_block_scratch,"(1, 3, 5, 7)|18",0,4,4,17.161837764593564,4,1 1 1 1 +395,S1_block_scratch,"(1, 3, 5, 7)|19",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +396,S1_block_scratch,"(1, 3, 5, 7)|20",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +397,S1_block_scratch,"(1, 3, 5, 7)|21",0,5,9,30.56694540816502,9,5 1 1 1 1 +398,S1_block_scratch,"(1, 3, 5, 7)|22",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +399,S1_block_scratch,"(1, 3, 5, 7)|23",0,6,9,33.06895752585596,9,4 1 1 1 1 1 +400,S1_block_scratch,"(2, 3, 4, 5)|8",0,6,9,33.06895752585596,9,4 1 1 1 1 1 +401,S1_block_scratch,"(2, 3, 4, 5)|9",0,4,4,17.161837764593564,4,1 1 1 1 +402,S1_block_scratch,"(2, 3, 4, 5)|10",0,5,9,32.02246123832686,9,3 3 1 1 1 +403,S1_block_scratch,"(2, 3, 4, 5)|11",0,4,4,17.161837764593564,4,1 1 1 1 +404,S1_block_scratch,"(2, 3, 4, 5)|12",0,5,9,32.02246123832686,9,3 3 1 1 1 +405,S1_block_scratch,"(2, 3, 4, 5)|13",0,5,9,30.56694540816502,9,5 1 1 1 1 +406,S1_block_scratch,"(2, 3, 4, 5)|14",0,5,9,32.02246123832686,9,3 3 1 1 1 +407,S1_block_scratch,"(2, 3, 4, 5)|15",0,5,9,32.02246123832686,9,3 3 1 1 1 +408,S1_block_scratch,"(2, 3, 4, 5)|16",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +409,S1_block_scratch,"(2, 3, 4, 5)|17",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +410,S1_block_scratch,"(2, 3, 4, 5)|18",0,5,9,30.56694540816502,9,5 1 1 1 1 +411,S1_block_scratch,"(2, 3, 4, 5)|19",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +412,S1_block_scratch,"(2, 3, 4, 5)|20",0,5,9,32.02246123832686,9,3 3 1 1 1 +413,S1_block_scratch,"(2, 3, 4, 5)|21",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +414,S1_block_scratch,"(2, 3, 4, 5)|22",0,5,9,32.02246123832686,9,3 3 1 1 1 +415,S1_block_scratch,"(2, 3, 4, 5)|23",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +416,S1_block_scratch,"(2, 3, 6, 7)|8",0,6,9,33.06895752585596,9,4 1 1 1 1 1 +417,S1_block_scratch,"(2, 3, 6, 7)|9",0,4,4,17.161837764593564,4,1 1 1 1 +418,S1_block_scratch,"(2, 3, 6, 7)|10",0,5,9,32.02246123832686,9,3 3 1 1 1 +419,S1_block_scratch,"(2, 3, 6, 7)|11",0,4,4,17.161837764593564,4,1 1 1 1 +420,S1_block_scratch,"(2, 3, 6, 7)|12",0,5,9,32.02246123832686,9,3 3 1 1 1 +421,S1_block_scratch,"(2, 3, 6, 7)|13",0,5,9,30.56694540816502,9,5 1 1 1 1 +422,S1_block_scratch,"(2, 3, 6, 7)|14",0,5,9,32.02246123832686,9,3 3 1 1 1 +423,S1_block_scratch,"(2, 3, 6, 7)|15",0,5,9,32.02246123832686,9,3 3 1 1 1 +424,S1_block_scratch,"(2, 3, 6, 7)|16",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +425,S1_block_scratch,"(2, 3, 6, 7)|17",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +426,S1_block_scratch,"(2, 3, 6, 7)|18",0,5,9,30.56694540816502,9,5 1 1 1 1 +427,S1_block_scratch,"(2, 3, 6, 7)|19",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +428,S1_block_scratch,"(2, 3, 6, 7)|20",0,5,9,32.02246123832686,9,3 3 1 1 1 +429,S1_block_scratch,"(2, 3, 6, 7)|21",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +430,S1_block_scratch,"(2, 3, 6, 7)|22",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +431,S1_block_scratch,"(2, 3, 6, 7)|23",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +432,S1_block_scratch,"(4, 5, 6, 7)|8",0,6,9,33.06895752585596,9,4 1 1 1 1 1 +433,S1_block_scratch,"(4, 5, 6, 7)|9",0,4,4,17.161837764593564,4,1 1 1 1 +434,S1_block_scratch,"(4, 5, 6, 7)|10",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +435,S1_block_scratch,"(4, 5, 6, 7)|11",0,4,4,17.161837764593564,4,1 1 1 1 +436,S1_block_scratch,"(4, 5, 6, 7)|12",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +437,S1_block_scratch,"(4, 5, 6, 7)|13",0,5,9,30.56694540816502,9,5 1 1 1 1 +438,S1_block_scratch,"(4, 5, 6, 7)|14",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +439,S1_block_scratch,"(4, 5, 6, 7)|15",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +440,S1_block_scratch,"(4, 5, 6, 7)|16",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +441,S1_block_scratch,"(4, 5, 6, 7)|17",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +442,S1_block_scratch,"(4, 5, 6, 7)|18",0,5,9,30.56694540816502,9,5 1 1 1 1 +443,S1_block_scratch,"(4, 5, 6, 7)|19",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +444,S1_block_scratch,"(4, 5, 6, 7)|20",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +445,S1_block_scratch,"(4, 5, 6, 7)|21",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +446,S1_block_scratch,"(4, 5, 6, 7)|22",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +447,S1_block_scratch,"(4, 5, 6, 7)|23",0,7,9,35.31829810433119,9,3 1 1 1 1 1 1 +448,S3_packet_copy,"(0, 1, 2, 3)|((0, 1), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +449,S3_packet_copy,"(0, 1, 2, 3)|((0, 2), -1)",0,4,7,25.35108486091452,7,3 2 1 1 +450,S3_packet_copy,"(0, 1, 2, 3)|((0, 2), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +451,S3_packet_copy,"(0, 1, 2, 3)|((0, 3), -1)",0,4,7,25.35108486091452,7,3 2 1 1 +452,S3_packet_copy,"(0, 1, 2, 3)|((0, 3), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +453,S3_packet_copy,"(0, 1, 2, 3)|((1, 2), -1)",0,4,7,25.35108486091452,7,3 2 1 1 +454,S3_packet_copy,"(0, 1, 2, 3)|((1, 2), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +455,S3_packet_copy,"(0, 1, 2, 3)|((1, 3), -1)",0,4,7,25.35108486091452,7,3 2 1 1 +456,S3_packet_copy,"(0, 1, 2, 3)|((1, 3), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +457,S3_packet_copy,"(0, 1, 2, 3)|((2, 3), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +458,S3_packet_copy,"(0, 1, 4, 5)|((0, 1), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +459,S3_packet_copy,"(0, 1, 4, 5)|((0, 4), -1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +460,S3_packet_copy,"(0, 1, 4, 5)|((0, 4), 1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +461,S3_packet_copy,"(0, 1, 4, 5)|((0, 5), -1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +462,S3_packet_copy,"(0, 1, 4, 5)|((0, 5), 1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +463,S3_packet_copy,"(0, 1, 4, 5)|((1, 4), -1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +464,S3_packet_copy,"(0, 1, 4, 5)|((1, 4), 1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +465,S3_packet_copy,"(0, 1, 4, 5)|((1, 5), -1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +466,S3_packet_copy,"(0, 1, 4, 5)|((1, 5), 1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +467,S3_packet_copy,"(0, 1, 4, 5)|((4, 5), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +468,S3_packet_copy,"(0, 1, 6, 7)|((0, 1), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +469,S3_packet_copy,"(0, 1, 6, 7)|((0, 6), -1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +470,S3_packet_copy,"(0, 1, 6, 7)|((0, 6), 1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +471,S3_packet_copy,"(0, 1, 6, 7)|((0, 7), -1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +472,S3_packet_copy,"(0, 1, 6, 7)|((0, 7), 1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +473,S3_packet_copy,"(0, 1, 6, 7)|((1, 6), -1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +474,S3_packet_copy,"(0, 1, 6, 7)|((1, 6), 1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +475,S3_packet_copy,"(0, 1, 6, 7)|((1, 7), -1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +476,S3_packet_copy,"(0, 1, 6, 7)|((1, 7), 1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +477,S3_packet_copy,"(0, 1, 6, 7)|((6, 7), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +478,S3_packet_copy,"(0, 2, 4, 6)|((0, 2), -1)",0,3,8,26.005909362467786,8,4 2 2 +479,S3_packet_copy,"(0, 2, 4, 6)|((0, 2), 1)",0,3,8,26.005909362467786,8,4 2 2 +480,S3_packet_copy,"(0, 2, 4, 6)|((0, 4), -1)",0,3,8,26.34570743605858,8,3 3 2 +481,S3_packet_copy,"(0, 2, 4, 6)|((0, 4), 1)",0,3,8,26.34570743605858,8,3 3 2 +482,S3_packet_copy,"(0, 2, 4, 6)|((0, 6), -1)",0,3,8,26.34570743605858,8,3 3 2 +483,S3_packet_copy,"(0, 2, 4, 6)|((0, 6), 1)",0,3,8,26.34570743605858,8,3 3 2 +484,S3_packet_copy,"(0, 2, 4, 6)|((2, 4), -1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +485,S3_packet_copy,"(0, 2, 4, 6)|((2, 4), 1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +486,S3_packet_copy,"(0, 2, 4, 6)|((2, 6), -1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +487,S3_packet_copy,"(0, 2, 4, 6)|((2, 6), 1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +488,S3_packet_copy,"(0, 2, 4, 6)|((4, 6), -1)",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +489,S3_packet_copy,"(0, 2, 4, 6)|((4, 6), 1)",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +490,S3_packet_copy,"(0, 2, 5, 7)|((0, 2), -1)",0,3,7,23.101744282439284,7,4 2 1 +491,S3_packet_copy,"(0, 2, 5, 7)|((0, 2), 1)",0,3,7,23.101744282439284,7,4 2 1 +492,S3_packet_copy,"(0, 2, 5, 7)|((0, 5), -1)",0,3,8,26.34570743605858,8,3 3 2 +493,S3_packet_copy,"(0, 2, 5, 7)|((0, 5), 1)",0,3,8,26.34570743605858,8,3 3 2 +494,S3_packet_copy,"(0, 2, 5, 7)|((0, 7), -1)",0,3,8,26.34570743605858,8,3 3 2 +495,S3_packet_copy,"(0, 2, 5, 7)|((0, 7), 1)",0,3,8,26.34570743605858,8,3 3 2 +496,S3_packet_copy,"(0, 2, 5, 7)|((2, 5), -1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +497,S3_packet_copy,"(0, 2, 5, 7)|((2, 5), 1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +498,S3_packet_copy,"(0, 2, 5, 7)|((2, 7), -1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +499,S3_packet_copy,"(0, 2, 5, 7)|((2, 7), 1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +500,S3_packet_copy,"(0, 2, 5, 7)|((5, 7), -1)",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +501,S3_packet_copy,"(0, 2, 5, 7)|((5, 7), 1)",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +502,S3_packet_copy,"(0, 3, 4, 7)|((0, 3), -1)",0,3,8,26.005909362467786,8,4 2 2 +503,S3_packet_copy,"(0, 3, 4, 7)|((0, 3), 1)",0,3,8,26.005909362467786,8,4 2 2 +504,S3_packet_copy,"(0, 3, 4, 7)|((0, 4), -1)",0,3,8,26.34570743605858,8,3 3 2 +505,S3_packet_copy,"(0, 3, 4, 7)|((0, 4), 1)",0,4,9,30.63616687720697,9,3 3 2 1 +506,S3_packet_copy,"(0, 3, 4, 7)|((0, 7), -1)",0,3,8,26.34570743605858,8,3 3 2 +507,S3_packet_copy,"(0, 3, 4, 7)|((0, 7), 1)",0,4,9,30.63616687720697,9,3 3 2 1 +508,S3_packet_copy,"(0, 3, 4, 7)|((3, 4), -1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +509,S3_packet_copy,"(0, 3, 4, 7)|((3, 4), 1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +510,S3_packet_copy,"(0, 3, 4, 7)|((3, 7), -1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +511,S3_packet_copy,"(0, 3, 4, 7)|((3, 7), 1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +512,S3_packet_copy,"(0, 3, 4, 7)|((4, 7), -1)",0,6,8,31.551086806947346,8,2 2 1 1 1 1 +513,S3_packet_copy,"(0, 3, 4, 7)|((4, 7), 1)",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +514,S3_packet_copy,"(0, 3, 5, 6)|((0, 3), -1)",0,3,7,23.101744282439284,7,4 2 1 +515,S3_packet_copy,"(0, 3, 5, 6)|((0, 3), 1)",0,3,7,23.101744282439284,7,4 2 1 +516,S3_packet_copy,"(0, 3, 5, 6)|((0, 5), -1)",0,3,8,26.34570743605858,8,3 3 2 +517,S3_packet_copy,"(0, 3, 5, 6)|((0, 5), 1)",0,4,9,30.63616687720697,9,3 3 2 1 +518,S3_packet_copy,"(0, 3, 5, 6)|((0, 6), -1)",0,3,8,26.34570743605858,8,3 3 2 +519,S3_packet_copy,"(0, 3, 5, 6)|((0, 6), 1)",0,3,9,28.726624372322533,9,3 3 3 +520,S3_packet_copy,"(0, 3, 5, 6)|((3, 5), -1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +521,S3_packet_copy,"(0, 3, 5, 6)|((3, 5), 1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +522,S3_packet_copy,"(0, 3, 5, 6)|((3, 6), -1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +523,S3_packet_copy,"(0, 3, 5, 6)|((3, 6), 1)",0,6,9,33.9320037432113,9,3 2 1 1 1 1 +524,S3_packet_copy,"(0, 3, 5, 6)|((5, 6), -1)",0,6,8,31.551086806947346,8,2 2 1 1 1 1 +525,S3_packet_copy,"(0, 3, 5, 6)|((5, 6), 1)",0,7,9,35.84154624809574,9,2 2 1 1 1 1 1 +526,S3_packet_copy,"(1, 2, 4, 7)|((1, 2), -1)",0,3,8,26.005909362467786,8,4 2 2 +527,S3_packet_copy,"(1, 2, 4, 7)|((1, 2), 1)",0,3,8,26.005909362467786,8,4 2 2 +528,S3_packet_copy,"(1, 2, 4, 7)|((1, 4), -1)",0,3,8,26.34570743605858,8,3 3 2 +529,S3_packet_copy,"(1, 2, 4, 7)|((1, 4), 1)",0,3,8,26.34570743605858,8,3 3 2 +530,S3_packet_copy,"(1, 2, 4, 7)|((1, 7), -1)",0,3,8,26.34570743605858,8,3 3 2 +531,S3_packet_copy,"(1, 2, 4, 7)|((1, 7), 1)",0,3,8,26.34570743605858,8,3 3 2 +532,S3_packet_copy,"(1, 2, 4, 7)|((2, 4), -1)",0,3,8,26.34570743605858,8,3 3 2 +533,S3_packet_copy,"(1, 2, 4, 7)|((2, 4), 1)",0,3,8,26.34570743605858,8,3 3 2 +534,S3_packet_copy,"(1, 2, 4, 7)|((2, 7), -1)",0,3,8,26.34570743605858,8,3 3 2 +535,S3_packet_copy,"(1, 2, 4, 7)|((2, 7), 1)",0,3,8,26.34570743605858,8,3 3 2 +536,S3_packet_copy,"(1, 2, 4, 7)|((4, 7), -1)",0,5,9,31.682663164736066,9,4 2 1 1 1 +537,S3_packet_copy,"(1, 2, 4, 7)|((4, 7), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +538,S3_packet_copy,"(1, 2, 5, 6)|((1, 2), -1)",0,3,7,23.101744282439284,7,4 2 1 +539,S3_packet_copy,"(1, 2, 5, 6)|((1, 2), 1)",0,3,7,23.101744282439284,7,4 2 1 +540,S3_packet_copy,"(1, 2, 5, 6)|((1, 5), -1)",0,3,8,26.34570743605858,8,3 3 2 +541,S3_packet_copy,"(1, 2, 5, 6)|((1, 5), 1)",0,3,8,26.34570743605858,8,3 3 2 +542,S3_packet_copy,"(1, 2, 5, 6)|((1, 6), -1)",0,3,8,26.34570743605858,8,3 3 2 +543,S3_packet_copy,"(1, 2, 5, 6)|((1, 6), 1)",0,3,8,26.34570743605858,8,3 3 2 +544,S3_packet_copy,"(1, 2, 5, 6)|((2, 5), -1)",0,3,8,26.34570743605858,8,3 3 2 +545,S3_packet_copy,"(1, 2, 5, 6)|((2, 5), 1)",0,3,8,26.34570743605858,8,3 3 2 +546,S3_packet_copy,"(1, 2, 5, 6)|((2, 6), -1)",0,3,8,26.34570743605858,8,3 3 2 +547,S3_packet_copy,"(1, 2, 5, 6)|((2, 6), 1)",0,3,8,26.34570743605858,8,3 3 2 +548,S3_packet_copy,"(1, 2, 5, 6)|((5, 6), -1)",0,5,9,31.682663164736066,9,4 2 1 1 1 +549,S3_packet_copy,"(1, 2, 5, 6)|((5, 6), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +550,S3_packet_copy,"(1, 3, 4, 6)|((1, 3), -1)",0,3,8,26.005909362467786,8,4 2 2 +551,S3_packet_copy,"(1, 3, 4, 6)|((1, 3), 1)",0,3,8,26.005909362467786,8,4 2 2 +552,S3_packet_copy,"(1, 3, 4, 6)|((1, 4), -1)",0,4,9,30.63616687720697,9,3 3 2 1 +553,S3_packet_copy,"(1, 3, 4, 6)|((1, 4), 1)",0,4,9,30.63616687720697,9,3 3 2 1 +554,S3_packet_copy,"(1, 3, 4, 6)|((1, 6), -1)",0,4,9,30.63616687720697,9,3 3 2 1 +555,S3_packet_copy,"(1, 3, 4, 6)|((1, 6), 1)",0,4,9,30.63616687720697,9,3 3 2 1 +556,S3_packet_copy,"(1, 3, 4, 6)|((3, 4), -1)",0,3,8,26.34570743605858,8,3 3 2 +557,S3_packet_copy,"(1, 3, 4, 6)|((3, 4), 1)",0,3,8,26.34570743605858,8,3 3 2 +558,S3_packet_copy,"(1, 3, 4, 6)|((3, 6), -1)",0,3,8,26.34570743605858,8,3 3 2 +559,S3_packet_copy,"(1, 3, 4, 6)|((3, 6), 1)",0,3,8,26.34570743605858,8,3 3 2 +560,S3_packet_copy,"(1, 3, 4, 6)|((4, 6), -1)",0,4,7,25.35108486091452,7,3 2 1 1 +561,S3_packet_copy,"(1, 3, 4, 6)|((4, 6), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +562,S3_packet_copy,"(1, 3, 5, 7)|((1, 3), -1)",0,3,7,23.101744282439284,7,4 2 1 +563,S3_packet_copy,"(1, 3, 5, 7)|((1, 3), 1)",0,3,7,23.101744282439284,7,4 2 1 +564,S3_packet_copy,"(1, 3, 5, 7)|((1, 5), -1)",0,4,9,30.63616687720697,9,3 3 2 1 +565,S3_packet_copy,"(1, 3, 5, 7)|((1, 5), 1)",0,3,8,26.34570743605858,8,3 3 2 +566,S3_packet_copy,"(1, 3, 5, 7)|((1, 7), -1)",0,4,9,30.63616687720697,9,3 3 2 1 +567,S3_packet_copy,"(1, 3, 5, 7)|((1, 7), 1)",0,3,8,26.34570743605858,8,3 3 2 +568,S3_packet_copy,"(1, 3, 5, 7)|((3, 5), -1)",0,3,8,26.34570743605858,8,3 3 2 +569,S3_packet_copy,"(1, 3, 5, 7)|((3, 5), 1)",0,3,8,26.34570743605858,8,3 3 2 +570,S3_packet_copy,"(1, 3, 5, 7)|((3, 7), -1)",0,3,8,26.34570743605858,8,3 3 2 +571,S3_packet_copy,"(1, 3, 5, 7)|((3, 7), 1)",0,3,8,26.34570743605858,8,3 3 2 +572,S3_packet_copy,"(1, 3, 5, 7)|((5, 7), -1)",0,4,7,25.35108486091452,7,3 2 1 1 +573,S3_packet_copy,"(1, 3, 5, 7)|((5, 7), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +574,S3_packet_copy,"(2, 3, 4, 5)|((2, 3), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +575,S3_packet_copy,"(2, 3, 4, 5)|((2, 4), -1)",0,4,9,30.63616687720697,9,3 3 2 1 +576,S3_packet_copy,"(2, 3, 4, 5)|((2, 4), 1)",0,3,8,26.34570743605858,8,3 3 2 +577,S3_packet_copy,"(2, 3, 4, 5)|((2, 5), -1)",0,4,9,30.63616687720697,9,3 3 2 1 +578,S3_packet_copy,"(2, 3, 4, 5)|((2, 5), 1)",0,3,8,26.34570743605858,8,3 3 2 +579,S3_packet_copy,"(2, 3, 4, 5)|((3, 4), -1)",0,3,8,26.34570743605858,8,3 3 2 +580,S3_packet_copy,"(2, 3, 4, 5)|((3, 4), 1)",0,3,9,28.726624372322533,9,3 3 3 +581,S3_packet_copy,"(2, 3, 4, 5)|((3, 5), -1)",0,3,9,28.726624372322533,9,3 3 3 +582,S3_packet_copy,"(2, 3, 4, 5)|((3, 5), 1)",0,3,9,28.726624372322533,9,3 3 3 +583,S3_packet_copy,"(2, 3, 4, 5)|((4, 5), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +584,S3_packet_copy,"(2, 3, 6, 7)|((2, 3), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +585,S3_packet_copy,"(2, 3, 6, 7)|((2, 6), -1)",0,3,8,26.34570743605858,8,3 3 2 +586,S3_packet_copy,"(2, 3, 6, 7)|((2, 6), 1)",0,3,8,26.34570743605858,8,3 3 2 +587,S3_packet_copy,"(2, 3, 6, 7)|((2, 7), -1)",0,3,8,26.34570743605858,8,3 3 2 +588,S3_packet_copy,"(2, 3, 6, 7)|((2, 7), 1)",0,3,8,26.34570743605858,8,3 3 2 +589,S3_packet_copy,"(2, 3, 6, 7)|((3, 6), -1)",0,3,8,26.34570743605858,8,3 3 2 +590,S3_packet_copy,"(2, 3, 6, 7)|((3, 6), 1)",0,3,9,28.726624372322533,9,3 3 3 +591,S3_packet_copy,"(2, 3, 6, 7)|((3, 7), -1)",0,3,9,28.726624372322533,9,3 3 3 +592,S3_packet_copy,"(2, 3, 6, 7)|((3, 7), 1)",0,3,8,26.34570743605858,8,3 3 2 +593,S3_packet_copy,"(2, 3, 6, 7)|((6, 7), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +594,S3_packet_copy,"(4, 5, 6, 7)|((4, 5), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +595,S3_packet_copy,"(4, 5, 6, 7)|((4, 6), -1)",0,4,7,25.35108486091452,7,3 2 1 1 +596,S3_packet_copy,"(4, 5, 6, 7)|((4, 6), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +597,S3_packet_copy,"(4, 5, 6, 7)|((4, 7), -1)",0,4,7,25.35108486091452,7,3 2 1 1 +598,S3_packet_copy,"(4, 5, 6, 7)|((4, 7), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +599,S3_packet_copy,"(4, 5, 6, 7)|((5, 6), -1)",0,4,7,25.35108486091452,7,3 2 1 1 +600,S3_packet_copy,"(4, 5, 6, 7)|((5, 6), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +601,S3_packet_copy,"(4, 5, 6, 7)|((5, 7), -1)",0,4,7,25.35108486091452,7,3 2 1 1 +602,S3_packet_copy,"(4, 5, 6, 7)|((5, 7), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +603,S3_packet_copy,"(4, 5, 6, 7)|((6, 7), 1)",0,4,7,25.35108486091452,7,3 2 1 1 +604,S4_slot_copy,"((0, 1, 2, 3), (0, 2), -1)|8",0,5,8,29.641544302062908,8,3 2 1 1 1 +605,S4_slot_copy,"((0, 1, 2, 3), (0, 2), 1)|9",0,5,8,29.641544302062908,8,3 2 1 1 1 +606,S4_slot_copy,"((0, 1, 2, 3), (0, 3), -1)|10",0,5,8,29.641544302062908,8,3 2 1 1 1 +607,S4_slot_copy,"((0, 1, 2, 3), (0, 3), 1)|11",0,4,5,20.066002844622066,5,2 1 1 1 +608,S4_slot_copy,"((0, 1, 2, 3), (1, 2), -1)|11",0,5,8,29.641544302062908,8,3 2 1 1 1 +609,S4_slot_copy,"((0, 1, 2, 3), (1, 2), 1)|10",0,4,5,20.066002844622066,5,2 1 1 1 +610,S4_slot_copy,"((0, 1, 2, 3), (1, 3), -1)|9",0,4,5,20.066002844622066,5,2 1 1 1 +611,S4_slot_copy,"((0, 1, 2, 3), (1, 3), 1)|8",0,4,5,20.066002844622066,5,2 1 1 1 +612,S4_slot_copy,"((0, 1, 4, 5), (0, 4), -1)|20",0,5,8,29.641544302062908,8,3 2 1 1 1 +613,S4_slot_copy,"((0, 1, 4, 5), (0, 4), 1)|21",0,5,8,29.641544302062908,8,3 2 1 1 1 +614,S4_slot_copy,"((0, 1, 4, 5), (0, 5), -1)|22",0,5,8,29.641544302062908,8,3 2 1 1 1 +615,S4_slot_copy,"((0, 1, 4, 5), (0, 5), 1)|23",0,4,5,20.066002844622066,5,2 1 1 1 +616,S4_slot_copy,"((0, 1, 4, 5), (1, 4), -1)|23",0,5,8,29.641544302062908,8,3 2 1 1 1 +617,S4_slot_copy,"((0, 1, 4, 5), (1, 4), 1)|22",0,4,5,20.066002844622066,5,2 1 1 1 +618,S4_slot_copy,"((0, 1, 4, 5), (1, 5), -1)|21",0,4,5,20.066002844622066,5,2 1 1 1 +619,S4_slot_copy,"((0, 1, 4, 5), (1, 5), 1)|20",0,4,5,20.066002844622066,5,2 1 1 1 +620,S4_slot_copy,"((0, 1, 6, 7), (0, 6), -1)|32",0,5,8,29.641544302062908,8,3 2 1 1 1 +621,S4_slot_copy,"((0, 1, 6, 7), (0, 6), 1)|33",0,5,8,29.641544302062908,8,3 2 1 1 1 +622,S4_slot_copy,"((0, 1, 6, 7), (0, 7), -1)|34",0,5,8,29.641544302062908,8,3 2 1 1 1 +623,S4_slot_copy,"((0, 1, 6, 7), (0, 7), 1)|35",0,4,5,20.066002844622066,5,2 1 1 1 +624,S4_slot_copy,"((0, 1, 6, 7), (1, 6), -1)|35",0,5,8,29.641544302062908,8,3 2 1 1 1 +625,S4_slot_copy,"((0, 1, 6, 7), (1, 6), 1)|34",0,4,5,20.066002844622066,5,2 1 1 1 +626,S4_slot_copy,"((0, 1, 6, 7), (1, 7), -1)|33",0,4,5,20.066002844622066,5,2 1 1 1 +627,S4_slot_copy,"((0, 1, 6, 7), (1, 7), 1)|32",0,4,5,20.066002844622066,5,2 1 1 1 +628,S4_slot_copy,"((0, 2, 4, 6), (0, 4), -1)|44",0,5,8,28.778498084707564,8,4 1 1 1 1 +629,S4_slot_copy,"((0, 2, 4, 6), (0, 4), 1)|45",0,5,8,28.778498084707564,8,4 1 1 1 1 +630,S4_slot_copy,"((0, 2, 4, 6), (0, 6), -1)|46",0,5,8,28.778498084707564,8,4 1 1 1 1 +631,S4_slot_copy,"((0, 2, 4, 6), (0, 6), 1)|47",0,4,4,17.161837764593564,4,1 1 1 1 +632,S4_slot_copy,"((0, 2, 4, 6), (2, 4), -1)|47",0,5,8,28.778498084707564,8,4 1 1 1 1 +633,S4_slot_copy,"((0, 2, 4, 6), (2, 4), 1)|46",0,4,4,17.161837764593564,4,1 1 1 1 +634,S4_slot_copy,"((0, 2, 4, 6), (2, 6), -1)|45",0,4,4,17.161837764593564,4,1 1 1 1 +635,S4_slot_copy,"((0, 2, 4, 6), (2, 6), 1)|44",0,4,4,17.161837764593564,4,1 1 1 1 +636,S4_slot_copy,"((0, 2, 5, 7), (0, 5), -1)|56",0,5,8,29.641544302062908,8,3 2 1 1 1 +637,S4_slot_copy,"((0, 2, 5, 7), (0, 5), 1)|57",0,5,8,29.641544302062908,8,3 2 1 1 1 +638,S4_slot_copy,"((0, 2, 5, 7), (0, 7), -1)|58",0,5,8,29.641544302062908,8,3 2 1 1 1 +639,S4_slot_copy,"((0, 2, 5, 7), (0, 7), 1)|59",0,4,5,20.066002844622066,5,2 1 1 1 +640,S4_slot_copy,"((0, 2, 5, 7), (2, 5), -1)|59",0,5,8,29.641544302062908,8,3 2 1 1 1 +641,S4_slot_copy,"((0, 2, 5, 7), (2, 5), 1)|58",0,4,5,20.066002844622066,5,2 1 1 1 +642,S4_slot_copy,"((0, 2, 5, 7), (2, 7), -1)|57",0,4,5,20.066002844622066,5,2 1 1 1 +643,S4_slot_copy,"((0, 2, 5, 7), (2, 7), 1)|56",0,4,5,20.066002844622066,5,2 1 1 1 +644,S4_slot_copy,"((0, 3, 4, 7), (0, 4), -1)|68",0,5,8,29.641544302062908,8,3 2 1 1 1 +645,S4_slot_copy,"((0, 3, 4, 7), (0, 4), 1)|69",0,5,8,29.641544302062908,8,3 2 1 1 1 +646,S4_slot_copy,"((0, 3, 4, 7), (0, 7), -1)|70",0,5,8,29.641544302062908,8,3 2 1 1 1 +647,S4_slot_copy,"((0, 3, 4, 7), (0, 7), 1)|71",0,4,5,20.066002844622066,5,2 1 1 1 +648,S4_slot_copy,"((0, 3, 4, 7), (3, 4), -1)|71",0,5,8,29.641544302062908,8,3 2 1 1 1 +649,S4_slot_copy,"((0, 3, 4, 7), (3, 4), 1)|70",0,4,5,20.066002844622066,5,2 1 1 1 +650,S4_slot_copy,"((0, 3, 4, 7), (3, 7), -1)|69",0,4,5,20.066002844622066,5,2 1 1 1 +651,S4_slot_copy,"((0, 3, 4, 7), (3, 7), 1)|68",0,4,5,20.066002844622066,5,2 1 1 1 +652,S4_slot_copy,"((0, 3, 5, 6), (0, 5), -1)|80",0,5,8,29.641544302062908,8,3 2 1 1 1 +653,S4_slot_copy,"((0, 3, 5, 6), (0, 5), 1)|81",0,5,8,29.641544302062908,8,3 2 1 1 1 +654,S4_slot_copy,"((0, 3, 5, 6), (0, 6), -1)|82",0,5,8,29.641544302062908,8,3 2 1 1 1 +655,S4_slot_copy,"((0, 3, 5, 6), (0, 6), 1)|83",0,4,5,20.066002844622066,5,2 1 1 1 +656,S4_slot_copy,"((0, 3, 5, 6), (3, 5), -1)|83",0,5,8,29.641544302062908,8,3 2 1 1 1 +657,S4_slot_copy,"((0, 3, 5, 6), (3, 5), 1)|82",0,4,5,20.066002844622066,5,2 1 1 1 +658,S4_slot_copy,"((0, 3, 5, 6), (3, 6), -1)|81",0,4,5,20.066002844622066,5,2 1 1 1 +659,S4_slot_copy,"((0, 3, 5, 6), (3, 6), 1)|80",0,4,5,20.066002844622066,5,2 1 1 1 +660,S4_slot_copy,"((1, 2, 4, 7), (1, 4), -1)|92",0,5,8,28.778498084707564,8,4 1 1 1 1 +661,S4_slot_copy,"((1, 2, 4, 7), (1, 4), 1)|93",0,5,8,28.778498084707564,8,4 1 1 1 1 +662,S4_slot_copy,"((1, 2, 4, 7), (1, 7), -1)|94",0,5,8,28.778498084707564,8,4 1 1 1 1 +663,S4_slot_copy,"((1, 2, 4, 7), (1, 7), 1)|95",0,4,4,17.161837764593564,4,1 1 1 1 +664,S4_slot_copy,"((1, 2, 4, 7), (2, 4), -1)|95",0,5,8,28.778498084707564,8,4 1 1 1 1 +665,S4_slot_copy,"((1, 2, 4, 7), (2, 4), 1)|94",0,4,4,17.161837764593564,4,1 1 1 1 +666,S4_slot_copy,"((1, 2, 4, 7), (2, 7), -1)|93",0,4,4,17.161837764593564,4,1 1 1 1 +667,S4_slot_copy,"((1, 2, 4, 7), (2, 7), 1)|92",0,4,4,17.161837764593564,4,1 1 1 1 +668,S4_slot_copy,"((1, 2, 5, 6), (1, 5), -1)|104",0,5,8,29.641544302062908,8,3 2 1 1 1 +669,S4_slot_copy,"((1, 2, 5, 6), (1, 5), 1)|105",0,5,8,29.641544302062908,8,3 2 1 1 1 +670,S4_slot_copy,"((1, 2, 5, 6), (1, 6), -1)|106",0,5,8,29.641544302062908,8,3 2 1 1 1 +671,S4_slot_copy,"((1, 2, 5, 6), (1, 6), 1)|107",0,4,5,20.066002844622066,5,2 1 1 1 +672,S4_slot_copy,"((1, 2, 5, 6), (2, 5), -1)|107",0,5,8,29.641544302062908,8,3 2 1 1 1 +673,S4_slot_copy,"((1, 2, 5, 6), (2, 5), 1)|106",0,4,5,20.066002844622066,5,2 1 1 1 +674,S4_slot_copy,"((1, 2, 5, 6), (2, 6), -1)|105",0,4,5,20.066002844622066,5,2 1 1 1 +675,S4_slot_copy,"((1, 2, 5, 6), (2, 6), 1)|104",0,4,5,20.066002844622066,5,2 1 1 1 +676,S4_slot_copy,"((1, 3, 4, 6), (1, 4), -1)|116",0,5,8,29.641544302062908,8,3 2 1 1 1 +677,S4_slot_copy,"((1, 3, 4, 6), (1, 4), 1)|117",0,5,8,29.641544302062908,8,3 2 1 1 1 +678,S4_slot_copy,"((1, 3, 4, 6), (1, 6), -1)|118",0,5,8,29.641544302062908,8,3 2 1 1 1 +679,S4_slot_copy,"((1, 3, 4, 6), (1, 6), 1)|119",0,4,5,20.066002844622066,5,2 1 1 1 +680,S4_slot_copy,"((1, 3, 4, 6), (3, 4), -1)|119",0,5,8,29.641544302062908,8,3 2 1 1 1 +681,S4_slot_copy,"((1, 3, 4, 6), (3, 4), 1)|118",0,4,5,20.066002844622066,5,2 1 1 1 +682,S4_slot_copy,"((1, 3, 4, 6), (3, 6), -1)|117",0,4,5,20.066002844622066,5,2 1 1 1 +683,S4_slot_copy,"((1, 3, 4, 6), (3, 6), 1)|116",0,4,5,20.066002844622066,5,2 1 1 1 +684,S4_slot_copy,"((1, 3, 5, 7), (1, 5), -1)|128",0,5,8,29.641544302062908,8,3 2 1 1 1 +685,S4_slot_copy,"((1, 3, 5, 7), (1, 5), 1)|129",0,5,8,29.641544302062908,8,3 2 1 1 1 +686,S4_slot_copy,"((1, 3, 5, 7), (1, 7), -1)|130",0,5,8,29.641544302062908,8,3 2 1 1 1 +687,S4_slot_copy,"((1, 3, 5, 7), (1, 7), 1)|131",0,4,5,20.066002844622066,5,2 1 1 1 +688,S4_slot_copy,"((1, 3, 5, 7), (3, 5), -1)|131",0,5,8,29.641544302062908,8,3 2 1 1 1 +689,S4_slot_copy,"((1, 3, 5, 7), (3, 5), 1)|130",0,4,5,20.066002844622066,5,2 1 1 1 +690,S4_slot_copy,"((1, 3, 5, 7), (3, 7), -1)|129",0,4,5,20.066002844622066,5,2 1 1 1 +691,S4_slot_copy,"((1, 3, 5, 7), (3, 7), 1)|128",0,4,5,20.066002844622066,5,2 1 1 1 +692,S4_slot_copy,"((2, 3, 4, 5), (2, 4), -1)|140",0,5,8,29.641544302062908,8,3 2 1 1 1 +693,S4_slot_copy,"((2, 3, 4, 5), (2, 4), 1)|141",0,5,8,29.641544302062908,8,3 2 1 1 1 +694,S4_slot_copy,"((2, 3, 4, 5), (2, 5), -1)|142",0,5,8,29.641544302062908,8,3 2 1 1 1 +695,S4_slot_copy,"((2, 3, 4, 5), (2, 5), 1)|143",0,4,5,20.066002844622066,5,2 1 1 1 +696,S4_slot_copy,"((2, 3, 4, 5), (3, 4), -1)|143",0,5,8,29.641544302062908,8,3 2 1 1 1 +697,S4_slot_copy,"((2, 3, 4, 5), (3, 4), 1)|142",0,4,5,20.066002844622066,5,2 1 1 1 +698,S4_slot_copy,"((2, 3, 4, 5), (3, 5), -1)|141",0,4,5,20.066002844622066,5,2 1 1 1 +699,S4_slot_copy,"((2, 3, 4, 5), (3, 5), 1)|140",0,4,5,20.066002844622066,5,2 1 1 1 +700,S4_slot_copy,"((2, 3, 6, 7), (2, 6), -1)|152",0,5,8,29.641544302062908,8,3 2 1 1 1 +701,S4_slot_copy,"((2, 3, 6, 7), (2, 6), 1)|153",0,5,8,29.641544302062908,8,3 2 1 1 1 +702,S4_slot_copy,"((2, 3, 6, 7), (2, 7), -1)|154",0,5,8,29.641544302062908,8,3 2 1 1 1 +703,S4_slot_copy,"((2, 3, 6, 7), (2, 7), 1)|155",0,4,5,20.066002844622066,5,2 1 1 1 +704,S4_slot_copy,"((2, 3, 6, 7), (3, 6), -1)|155",0,5,8,29.641544302062908,8,3 2 1 1 1 +705,S4_slot_copy,"((2, 3, 6, 7), (3, 6), 1)|154",0,4,5,20.066002844622066,5,2 1 1 1 +706,S4_slot_copy,"((2, 3, 6, 7), (3, 7), -1)|153",0,4,5,20.066002844622066,5,2 1 1 1 +707,S4_slot_copy,"((2, 3, 6, 7), (3, 7), 1)|152",0,4,5,20.066002844622066,5,2 1 1 1 +708,S4_slot_copy,"((4, 5, 6, 7), (4, 6), -1)|164",0,5,8,29.641544302062908,8,3 2 1 1 1 +709,S4_slot_copy,"((4, 5, 6, 7), (4, 6), 1)|165",0,5,8,29.641544302062908,8,3 2 1 1 1 +710,S4_slot_copy,"((4, 5, 6, 7), (4, 7), -1)|166",0,5,8,29.641544302062908,8,3 2 1 1 1 +711,S4_slot_copy,"((4, 5, 6, 7), (4, 7), 1)|167",0,4,5,20.066002844622066,5,2 1 1 1 +712,S4_slot_copy,"((4, 5, 6, 7), (5, 6), -1)|167",0,5,8,29.641544302062908,8,3 2 1 1 1 +713,S4_slot_copy,"((4, 5, 6, 7), (5, 6), 1)|166",0,4,5,20.066002844622066,5,2 1 1 1 +714,S4_slot_copy,"((4, 5, 6, 7), (5, 7), -1)|165",0,4,5,20.066002844622066,5,2 1 1 1 +715,S4_slot_copy,"((4, 5, 6, 7), (5, 7), 1)|164",0,4,5,20.066002844622066,5,2 1 1 1 diff --git a/research/helper-minimality/inputs/main/03-motifs.tex b/research/helper-minimality/inputs/main/03-motifs.tex new file mode 100644 index 0000000000..cdb0ba527a --- /dev/null +++ b/research/helper-minimality/inputs/main/03-motifs.tex @@ -0,0 +1,700 @@ +\section{Two finite networks with a rank saving} +\label{sec:finite-networks} + +We construct two fixed linear networks that exchange two banks of values +while restoring every auxiliary value. When the values are replaced by +arrays, a common representation on all wires at a gate lets that gate act +pointwise without disturbing the representation. We explain this invariant +before constructing the subspace labels that make changes of representation +cheap. The first network uses bit values and rational subspaces; the second +uses Gaussian dyadic values and binary subspaces. The scalar domain specifies +the values combined at a gate, while the subspace labels are used to construct operators +on each wire's address-indexed array. + +Put +\[ + h=100,\qquad v=\binom h3=161700,\qquad + N=v^3=4227952113000000,\qquad m=h^3=1000000. +\] +Let $\mathcal T$ be the set of three-element subsets of $[h]$. +There are two data banks $X_a,Y_a$, indexed by +$a=(a_1,a_2,a_3)\in\mathcal T^3$. +A wire carries one scalar. A gate is a fixed linear map on a specified +set of wires; untouched wires retain their values. The vertices on a +wire are its source, the gates that touch it in time order, and its sink; +its edges join consecutive vertices. We call the name of a wire its +\emph{role}, so that we can distinguish a fixed place in the network +from the value currently carried there. + +\subsection{Scalar operations and restored auxiliary values} + +There are three stages. At stage $j$, fix the other two coordinates and +operate on the $v$ values in each bank obtained by varying coordinate $j$. Thus +there are $v^2$ separate invocations at each stage. +Each such invocation has its own auxiliary wires, distinct from all +other invocations, including those in other stages. There are +\[ + I=3v^2=78440670000 +\] +invocations. In a forward invocation, write $x_T$ for the data used as +controls and $y_S$ for the data to be updated; $S,T\in\mathcal T$ are +their varying $j$th coordinates. These are the logical source and +target banks of the invocation. For each ordered pair $(S,T)$ that is +neighboring under the rule below, there is an auxiliary wire $A_{ST}$. +There are also central wires $C_i$, $i\in[h]$, and in the second +construction a wire $C_\ast$. We call all these auxiliary wires +\emph{scratch wires}; their initial values may be arbitrary. + +The following maps specify the construction. +\begin{itemize} +\item In the bit construction, scalars lie in $\mathbb F_2$, and +$S,T$ are neighbors when $|S\cap T|=1$. +The copy map adds $x_T$ to $A_{ST}$ for each neighbor pair. +The side injection adds $\sum_{T:\,|S\cap T|=1}A_{ST}$ to $y_S$. +The gather adds $\sum_{T\ni i}x_T$ to $C_i$, and the scatter adds +$\sum_{i\in S}C_i$ to $y_S$. +\item In the complex construction, scalars lie in +$\mathbb Z[i,1/2]$, and neighbors are distinct triples with even +intersection. Copy is unchanged. Side injection adds +\[ + -\sum_{T\text{ neighboring }S}\frac{|S\cap T|-1}{2}A_{ST} +\] +to $y_S$. Gather adds $\sum_{T\ni i}x_T$ to $C_i$ and +$\sum_Tx_T$ to $C_\ast$. Scatter adds +$(\sum_{i\in S}C_i-C_\ast)/2$ to $y_S$. +\end{itemize} +Each update leaves its control wires unchanged. The first two rows of +the following schedule remove the effect of the old scratch values; +the next four introduce the source values and add their effect to the +target; the last two restore the scratch values. +This cancellation of arbitrary initial scratch values is a linear +instance of the restoration construction for transparent computation in +Buhrman, Cleve, Kouck\'y, Loff and Speelman~\cite[Section~3]{BuhrmanCleveKouckyLoffSpeelman2014}. +The forward schedule is +\begin{equation} +\begin{array}{c|l|l} +\text{row}&\text{operation}&\text{gate grouping}\\ \hline +0&\text{subtract side injection}&\text{one gate per target}\\ +1&\text{subtract scatter}&\text{one gate on targets and center}\\ +2&\text{copy}&\text{one gate per source}\\ +3&\text{gather}&\text{one gate on sources and center}\\ +4&\text{scatter}&\text{one gate on targets and center}\\ +5&\text{side injection}&\text{one gate per target}\\ +6&\text{undo gather}&\text{one gate on sources and center}\\ +7&\text{undo copy}&\text{one gate per source}. +\end{array} +\label{eq:motif-schedule} +\end{equation} + +\begin{lemma}\label{lem:scalar-motifs} +For arbitrary initial values of its auxiliary wires, a forward +invocation changes $y_S$ to $y_S+x_S$ and leaves every other value +unchanged. Performing a forward invocation from $X$ to $Y$ at stage 1, +the inverse forward schedule from $Y$ to $X$ at stage 2, and a forward +invocation from $X$ to $Y$ at stage 3 sends +\[ + (X_a,Y_a)\longmapsto(-Y_a,X_a) +\] +and restores every auxiliary value. In the bit construction this is the +permutation exchanging $X_a$ and $Y_a$. +\end{lemma} + +\begin{proof} +Write $\mathcal V$ for copy, $\mathcal G$ for gather, +$\mathcal J$ for side injection and $\mathcal R$ for scatter. +If the initial side and central vectors are $a,c$, the first two rows +subtract $\mathcal J a+\mathcal R c$ from $y$. Rows 2 and 3 change +them to $a+\mathcal Vx,c+\mathcal Gx$. Rows 4 and 5 therefore add +$\mathcal R(c+\mathcal Gx)+\mathcal J(a+\mathcal Vx)$. +Rows 6 and 7 restore $c,a$. The net target change is +$(\mathcal J\mathcal V+\mathcal R\mathcal G)x$, independently of +$a,c$. + +In the bit case, the central coefficient from $x_T$ to $y_S$ is +$|S\cap T|\bmod2$. The side contribution cancels exactly the +intersection-one cases; distinct triples with intersection zero or two +already have coefficient zero, and the self coefficient is one. +In the complex case, the central coefficient is $(|S\cap T|-1)/2$. +The side cancels it for distinct triples with intersection zero or two; +intersection one contributes zero, and the self coefficient is one. +Thus both net maps are $y\gets y+x$. + +The inverse schedule with logical source $Y$ and target $X$ effects +$X\gets X-Y$. Starting from $(x,y)$, the three stages give +$(x,y+x)$, then $(-y,y+x)$, then $(-y,x)$. +Each invocation restores its own auxiliary wires. +\end{proof} + +A fixed triple has +\[ + z_{\rm b}=3\binom{97}{2}=13968,\qquad + z_{\rm c}=\binom{97}{3}+3\cdot97=147731 +\] +neighbors in the two constructions, respectively. The second count +separates intersection zero and intersection two. Ordered pairs must +be counted: there are $vz$ side wires in each invocation, not $vz/2$. +With $c_{\rm b}=100$ and $c_{\rm c}=101$ central wires per invocation, +the total wire counts are +\begin{align} + W_{\rm b}&=2N+I(vz_{\rm b}+c_{\rm b}) + =177176569091445000000,\label{eq:bit-wire-count}\\ + W_{\rm c}&=2N+I(vz_{\rm c}+c_{\rm c}) + =1873807244643542670000.\label{eq:complex-wire-count} +\end{align} +All these numbers are fixed, independently of any eventual input length. + +\subsection{From scalar values to arrays} + +We record the representation principle before choosing the labels. Let +$R$ be the scalar ring of either network and let $\Omega$ be a finite address +set common to all wires. Replace each scalar by an array in $R^\Omega$, and +apply each scalar gate pointwise at every address. Write $\mathsf S_\Omega$ +for the resulting network on the vector of wire arrays. + +At each source, gate and sink $v$, assign an invertible $R$-linear operator +$D_v$ on $R^\Omega$, called its \emph{frame}. A frame acts on the values +indexed by addresses within one wire's array and may mix them; a gate instead +combines wire values at each fixed address. All incoming and outgoing +incidences of one gate use the same $D_v$. On an edge from $u$ to $v$, apply +$D_vD_u^{-1}$ to that wire's array. Define the operators on all input and +output roles by +\[ + D_{\rm in}=\bigoplus_w D_{\mathrm{source}(w)},\qquad + D_{\rm out}=\bigoplus_w D_{\mathrm{sink}(w)}. +\] +For a supplied physical input $f$, define its logical interpretation to be +$g=D_{\rm in}^{-1}f$; this definition requires no physical preprocessing. +At a vertex $v$, the invariant is that the stored array equals $D_v$ applied +to the logical array there. It holds at the sources by definition. On an +edge whose logical array is $\varphi$, the edge operator changes $D_u\varphi$ +to $D_v\varphi$. At a gate with logical input arrays $\varphi_j$, +$R$-linearity gives +$\sum_j c_jD_v\varphi_j=D_v(\sum_j c_j\varphi_j)$ for each output combination, with +$c_j\in R$. Thus the common frame commutes with the pointwise gate, and +the invariant continues to the sinks. The implemented operator is therefore +\begin{equation} + D_{\rm out}\,\mathsf S_\Omega\,D_{\rm in}^{-1}. + \label{eq:common-frame-identity} +\end{equation} +In particular, if the scalar network is a signed role permutation that +sends input role $w$ to output role $\rho(w)$ with scalar sign +$\varepsilon_w$, that route applies +$\varepsilon_wD_{\mathrm{sink}(\rho(w))} +D_{\mathrm{source}(w)}^{-1}$ to its input array. All roles, including +the auxiliary roles, enter this identity. Once the scalar routing is fixed, +the endpoint frames determine the array operator on each route; the +intermediate frames can then be chosen to make each edge change inexpensive. + +Figure~\ref{fig:frame-compatibility} summarizes this invariant. +\begin{figure}[ht] +\centering +\input{figures/proof-map.tex} +\caption{An edge changes the representation of one role's logical array +$g_w$. At the next gate $G$, all $t$ input arrays have the common frame +$D_v$, so the pointwise linear gate commutes with that frame. The same +$D_v$ acts on each output component.} +\label{fig:frame-compatibility} +\end{figure} + +\subsection{Subspaces attached to the gates} + +The scalar network already has the required signed exchange. We now +choose its intermediate labels to make the changes of frame inexpensive. +A label is a nondegenerate subspace of a fixed bilinear space. On every +edge one label will contain the other. For such an edge, the +\emph{orthogonal residual} is the orthogonal complement of the smaller label inside +the larger one; its dimension is the absolute change in label dimension. +The saving will come from keeping the total dimension lost on decreasing +edges small relative to $N$. + +For the bit network, let $F=\mathbb Q^h$ with bilinear form +\[ + \langle x,y\rangle=x^{\mathsf T}(I-J/9)y, +\] +where $J$ is the all-one matrix. This form has eigenvalues $1$ and +$1-h/9=-91/9$, so it is nondegenerate. For a triple $T$ let $t_T$ be +its indicator vector. Then +\[ + \langle t_S,t_T\rangle=|S\cap T|-1, + \qquad \langle t_T,t_T\rangle=2. +\] +For the complex network, take instead $F=\mathbb F_2^h$ with the +ordinary dot product; here $t_T\cdot t_T=1$. +Thus every triple line is nondegenerate, and neighboring triple lines +are orthogonal, in the label field belonging to either construction. +The scalar domain need not equal the label field. +These degree-one intersection formulas specialize the construction +described by Alon~\cite[Section~3, remark after Theorem~1.1]{Alon1998} +to the prime $2$, with the ground-set size changed to $h=100$. + +The ambient label space is $\mathcal F=F^{\otimes3}$ with its tensor +bilinear form. It has dimension $m$ and is nondegenerate. Write +\[ + u_a=t_{a_1}\otimes t_{a_2}\otimes t_{a_3},\qquad U_a=\langle u_a\rangle. +\] +The prescribed terminal labels are +\[ +\begin{array}{c|cc} +\text{role}&\text{source label}&\text{sink label}\\ \hline +X_a&U_a&\mathcal F\\ +Y_a&0&U_a^\perp\\ +\text{each scratch role}&0&\mathcal F. +\end{array} +\] +Write $W$ for the wire count in the construction under consideration. +The source dimensions sum to $N$ and the sink dimensions to $Wm-N$. +Thus the signed dimension changes will sum to $Wm-2N$, because the +contributions at gates cancel. If decreasing edges lose a total +dimension $L$, the sum of absolute changes is $Wm-2N+2L$. +We will obtain $L1$. +The same argument gives a unit vector in $Q^\perp$ when it is nonzero. +A triple complement, and the complement of two neighboring triple +lines, contain coordinate units outside supports of sizes at most +three and six, respectively. Full tensor spaces contain coordinate +units as well. In each nonzero tensor summand, tensoring these chosen +norm-one vectors gives a norm-one vector; placing it in that orthogonal +summand gives one in the whole residual. Each residual is nondegenerate +by the decompositions above. Thus every nonzero residual is nonalternating. + +For completeness, every nondegenerate nonalternating binary symmetric +space has an orthonormal basis. Split off unit lines until the +remaining space is alternating. A nonzero nondegenerate alternating +space splits into planes with bases $a,b$ satisfying +$a\cdot a=b\cdot b=0$, $a\cdot b=1$; this follows by choosing a +nonzero $a$, choosing $b$ with $a\cdot b=1$, and taking the orthogonal +complement of their nondegenerate plane. Retain one unit vector $w$ +from the lines already split off. A plane orthogonal to $w$ can be +absorbed into that line: the three vectors +\[ + w+a,\qquad w+b,\qquad w+a+b +\] +are independent, pairwise orthogonal, and have norm one. +Use one of these new unit vectors in place of $w$ for the next plane; +the remaining planes are still orthogonal to it. Repeating this +operation absorbs every alternating plane. +\end{proof} + +The loss ratios have the exact values +\[ + \frac{L_{\rm b}}{N}=\frac{100}{539},\qquad + \frac{L_{\rm c}}{N}=\frac{101}{539}. +\] +In particular, both are smaller than $1/2$. We now turn the dimension +count into the two interfaces needed later. + +\subsection{The rational matrix interface} + +For a nondegenerate rational subspace $U\subset\mathcal F$, write +$P_U$ for the projection onto $U$ along $U^\perp$. Assign $P_U$ to +each gate or sink with label $U$. Assign the source matrix $-P_{U_a}$ +to $X_a$ and zero to every other source. +These are fixed rational $m\times m$ matrices; write $M_v$ for the matrix +at vertex $v$. Define +$\rho(X_a)=Y_a$, $\rho(Y_a)=X_a$, and let $\rho$ fix every auxiliary +wire. + +In the tape application, two address chunks are written as vectors $H,D$ +of $m$ fields. For a matrix $M$, the frame $\Phi_M$ moves the array entry +at $(H,D)$ to $(H+MD,D)$, leaving the other address fields unchanged. +The fields use a radix coprime to the fixed denominators, and addition is +modulo their common range. Hence $\Phi_M$ is an invertible +$\mathbb F_2$-linear permutation of array entries, and +$\Phi_{M'}\Phi_M=\Phi_{M'+M}$. Using $D_v=\Phi_{M_v}$ +in \eqref{eq:common-frame-identity}, the endpoint matrix difference on each +routed role is exactly the shear applied to that role. The following identity +makes it the same shear $H\gets H+D$ on every role; +Section~\ref{sec:tape-interchange} turns that shear into a field interchange +and implements an edge change with one smaller interchange per unit of its +rational rank. + +\begin{proposition}\label{prop:bit-motif-interface} +The bit network has $W_{\rm b}$ wires, uses only pointwise XOR gates, +and sends its input vector to the permutation $\rho$ of that vector. +Its rational matrices are common to all incidences of a gate and obey +\[ + M_{\mathrm{sink}(\rho(w))}-M_{\mathrm{source}(w)}=I_m + \quad\text{for every input role }w. +\] +The sum of the rational ranks of all edge differences is +\begin{align} + s_{\rm b} + &=\sum_{e}\operatorname{rank}_{\mathbb Q} + (M_{\mathrm{head}(e)}-M_{\mathrm{tail}(e)})\\ + &=W_{\rm b}m-N+2L_{\rm b} + =1771765690887858612870000000$. + +For an input $X_a$ the endpoint difference is +$P_{U_a^\perp}-(-P_{U_a})=I_m$. Every other role has zero source +matrix and identity sink matrix. This proves the interface. +\end{proof} + +\subsection{The binary phase interface} + +Use the complex scalar network and binary labels. For a binary vector +$x$, let $\operatorname{wt}(x)$ denote its integer Hamming weight, and +write $[b]\in\{0,1\}$ for the integer representative of $b\in\mathbb F_2$. +For a label $U$, let +\[ + q_U(x)=\operatorname{wt}(P_Ux)\pmod4. +\] +The projection here is over $\mathbb F_2$. +Let +\[ + H=\frac1{\sqrt2}\begin{pmatrix}1&1\\1&-1\end{pmatrix},\quad + C=H\begin{pmatrix}1&0\\0&i\end{pmatrix}H + =aI+bX,\qquad a=\frac{1+i}{2},\quad b=\frac{1-i}{2}, +\] +where $X$ interchanges the two coordinates. On functions of +$x\in\mathbb F_2^m$ define +\[ + \mathcal C_U=H^{\otimes m}\operatorname{diag}_x(i^{q_U(x)})H^{\otimes m}. +\] +The use of $H$ in this definition is an identity of matrices. Each entry +of $\mathcal C_U$ and its inverse is a Gaussian integer divided by $2^m$, +so both preserve arrays over $\mathbb Z[i,1/2]$. The kernels implemented +below have Gaussian dyadic coefficients. + +To apply the scalar network to these functions, replace the scalar on +each wire $w$ by an array +$f_w:\mathbb F_2^m\to\mathbb Z[i,1/2]$. At each address, a gate +applies its scalar linear map to the values on the wires it touches. +The frame in \eqref{eq:common-frame-identity} is $D_v=\mathcal C_U$ at a +vertex with label $U$. On an edge from label $U$ to label $V$, apply +$\mathcal C_V\mathcal C_U^{-1}$ to that wire's array. +All frames are diagonalized by the same matrix $H^{\otimes m}$. +For an integer $k\ge1$, an address for $k$ columns is +$(x^{(1)},\ldots,x^{(k)})\in(\mathbb F_2^m)^k$; every frame and edge +operator is then the tensor product of its one-column version over +these $k$ coordinates. Each scalar gate is still applied once at each +joint address, to the vector of values on the roles it touches. + +\begin{proposition}\label{prop:complex-motif-interface} +For each edge of the complex network, write $U,V$ for its tail and +head labels. Its phase-frame difference +$\mathcal C_V\mathcal C_U^{-1}$ is a product of one translation +kernel $aI+bX_v$, or its inverse, per vector in an orthonormal basis +of the edge residual. Here $(X_vf)(x)=f(x+v)$. +The sum of these basis lengths is +\[ + s_{\rm c}=W_{\rm c}m-2N+2L_{\rm c} + =18738072446366712673080000000$. + +For an edge $e$, write $\mathcal B_e$ for its residual basis and +$K_{e,v}$ for the forward or inverse translation kernel associated +with $v\in\mathcal B_e$. Taking tensor products preserves their +product, so on $k$ columns +\[ + \bigl(\mathcal C_V\mathcal C_U^{-1}\bigr)^{\otimes k} + =\prod_{v\in\mathcal B_e}K_{e,v}^{\otimes k}. +\] +Thus each residual vector contributes one factor acting on all $k$ +columns, and there are $s_{\rm c}$ such factors over the network. + +Let $\rho$ denote the underlying permutation of the complex roles: it +exchanges $X_a,Y_a$ and fixes each scratch role. +By Lemma~\ref{lem:scalar-motifs}, the pointwise scalar network sends an input array at +$X_a$ to $Y_a$ with sign $+1$, an input at $Y_a$ to $X_a$ with sign +$-1$, and each scratch input to its own output with sign $+1$. +Applying \eqref{eq:common-frame-identity} with $D_v=\mathcal C_{U_v}$, +where $U_v$ is the label at vertex $v$, shows that an input role $w$ reaches +output role $\rho(w)$ with that sign and with operator +$\mathcal C_{U_{\mathrm{sink}(\rho(w))}} + \mathcal C_{U_{\mathrm{source}(w)}}^{-1}$. +For $k$ columns, use $D_v=\mathcal C_{U_v}^{\otimes k}$ on the joint +address set in the same identity. The route operator is then the $k$th +tensor power of the displayed address operator, multiplied by its scalar +route sign once. +The zero label has frame $I$, while the full label has frame +$C^{\otimes m}$ because $q_{\mathcal F}(x)=\operatorname{wt}(x)$. +Every pair except $X_a\to Y_a$ has these zero and full labels. +For the remaining pair, write $u=u_a$. Its binary norm is one and +its weight is $3^3=27$. Orthogonal weight additivity yields +\begin{align*} + q_{U_a^\perp}(x)-q_{U_a}(x) + &=\operatorname{wt}(x)-2\operatorname{wt}(u)[u\cdot x]\\ + &=\operatorname{wt}(x)+2[u\cdot x]\pmod4. +\end{align*} +Since $2[u\cdot x]\equiv2\sum_{j\in\operatorname{supp}(u)}x_j +\pmod4$, the operator on $X_a\to Y_a$ is the tensor of $C^{-1}$ on the +27 coordinates of $\operatorname{supp}(u)$ and $C$ elsewhere. +Put $Z=\operatorname{diag}(1,-1)$. Direct multiplication gives +\[ + C=iZC^{-1}Z,\qquad C^{-1}=-iZCZ. +\] +For $k$ columns, let $Z_{a,k}$ be the tensor product of $Z$ on +those 27 coordinates in every column and the identity elsewhere. +Apply $Z_{a,k}$ before the network at $X_a$, and apply +$i^{27k}Z_{a,k}$ after the network at $Y_a$; the latter scalar is +applied once to the whole role. There are $27k$ inverse factors, so +the identity $C=iZC^{-1}Z$ turns each of them into $C$. The operator +on this pair is therefore $C^{\otimes mk}$ as well. +Only the physical $X$ outputs still carry the minus sign of the +scalar exchange. Negate those outputs and send output role $\rho(w)$ +back to role $w$. Every role, including every scratch role, now has +the required forward tensor product. +\end{proof} + +\subsection{Explicit rational bounds for the two recurrences} + +The relative rank deficits are +\[ + \eta_{\rm b}=\frac{W_{\rm b}m-s_{\rm b}}{W_{\rm b}m} + =\frac{339}{22587335000000},\qquad + \eta_{\rm c}=\frac{W_{\rm c}m-s_{\rm c}}{W_{\rm c}m} + =\frac{73}{19906842167500}. +\] +For both recurrences we may use the fixed rational exponent +\begin{equation} + \tau=\sigma=1-2^{-50}. + \label{eq:explicit-motif-exponents} +\end{equation} +Both exact deficits displayed above are greater than $20\cdot2^{-50}$. +Since $m<2^{20}$ and $\log 2<1$, we have $\log m<20$, whence +\[ + m^{1-2^{-50}} + =m\exp(-2^{-50}\log m) + >m(1-20\cdot2^{-50})>m(1-\eta) +\] +for either $\eta=\eta_{\rm b}$ or $\eta=\eta_{\rm c}$. +Consequently +\[ + \frac{s_{\rm b}}{W_{\rm b}}>p&1:x^=b[p] + if x: + p=x.bit_length()-1 + for q in b: + if b[q]>>p&1:b[q]^=x + b[p]=x + return tuple(b[p] for p in sorted(b,reverse=True)) +def dual(e): + e=list(e) + if e[0]=='add':e[1],e[2]=e[2],e[1];e[3]*=-1 + else:e[2],e[3]=e[3],e[2] + return e +def scalar(e,back): + e=dual(e) if back else list(e) + if e[0]=='add':return ['add',['L',e[1]],['L',e[2]],e[3],e[4]] + return ['scale',['L',e[1]],e[2],e[3]] +def primitive_bound(e): + if e[0] in ('clear','copy'):return 1 + q=Q(e[3],e[4]) if e[0]=='add' else Q(e[2],e[3]) + a,b=abs(q.numerator),q.denominator + assert b&(b-1)==0 + if e[0]=='scale': + assert a&(a-1)==0 + return abs(a.bit_length()-b.bit_length())+int(q<0) + # Exact binary Horner multiplication on a cleared private stream, repeated + # halving, signed accumulation into the target, then clear the private stream. + return 3+(a.bit_length()-1)+a.bit_count()+(b.bit_length()-1) + +def emit(back): + out=[];cur=c['start'].copy() + def event(e):out.append(e) + def scal(e,f):event(['scalar',e,f]) + event(['phase','zero_frame_precondition']) + for e in c['precondition']+c['compensation']: + regs=[e[1]]+([e[2]] if e[0]=='add' else []) + assert all(c['start'][r]==0 for r in regs) + scal(scalar(e,back),0) + event(['phase','entry_adapters']) + # GK: a helper that starts at a nonzero entrance frame has NO entry adapter; its paid wrapper R_E^-1 (Lemma A) precedes every gate + # that touches it and L_E^-1 follows the full-frame cleanup. Words without entrances emit PR #433's events. + entering=[r for r,f in enumerate(c['start']) if r>=2*v and f!=0] + hpe={r for r in range(2*v,n) if c['final'][r]!=1} # HPE: hyperplane-ended helpers (terminal frame != FULL) + # COLD-HPE: a cold helper (start frame 0) ending at U also carries the paid wrappers R_{0,U}^-1 / L_{0,U}^-1 (the + # E = bottom instance of #593); without cold ends wrapped == entering and the event stream is the inherited one. + wrapped=sorted(set(entering)|hpe) + for r,f in enumerate(c['start']): + if r in wrapped:event(['residual_adapter','pre',r,f]+([c['final'][r]] if c['final'][r]!=1 else [])) # HPE: R_{E,U}^-1 names U + else:event(['adapter','old_to_new',r,f]) + def climb(r,f,part): + old=cur[r] + if old==f:return + assert basis(frames[old]+frames[f])==tuple(frames[f]) + rank=len(frames[f])-len(frames[old]);assert rank>0 + event(['climb',part,r,old,f,rank]);cur[r]=f + # HPE: 'cleanup_tail' = early cleanup gates at their own frames; emitted only when the word has them, so a word + # without hyperplane-ended helpers yields exactly the inherited event stream. + for part in ('A','centers','B')+(('cleanup_tail',) if c.get('tail') else ())+('final',): + event(['phase',part]) + if part in ('A','B','cleanup_tail'): + for e in (c['tail'] if part=='cleanup_tail' else c[part]): + regs=[e[1]]+([e[2]] if e[0]=='add' else []) + for r in regs:climb(r,e[-1],part) + scal(scalar(e,back),e[-1]) + elif part=='centers': + # GK: targets sit at their nonzero-frame-compensation level (0 at the defaults); a centre copy descends + # cf -> served levels (descending chain) -> lowest served level and scatters into each target at its level + lv=lambda r:c.get('target_levels',{}).get(str(r-v),0) + assert all(cur[r]==lv(r) for r in range(v,2*v)) + for k,r in enumerate(c['centers']): + cf=c['center_frames'][k];assert cur[r]==cf + terms=[e for e in c['cut'] if e[2]==r] + path=[cf]+sorted({lv(e[1]) for e in terms}-{cf},key=lambda x:-len(frames[x])) + C=['C',k] + if not back: + scal(['clear',C],cf);scal(['copy',C,['L',r]],cf) + for a in range(len(path)): + if a>0:event(['center',k,path[a-1],path[a],len(frames[path[a-1]])-len(frames[path[a]])]) + for e in terms: + if lv(e[1])==path[a]:scal(['add',['L',e[1]],C,e[3],e[4]],path[a]) + scal(['clear',C],path[-1]) + else: + scal(['clear',C],path[-1]) + for a in range(len(path)-1,-1,-1): + for e in terms: + if lv(e[1])==path[a]:scal(['add',C,['L',e[1]],e[3],e[4]],path[a]) + if a>0:event(['center',k,path[a],path[a-1],len(frames[path[a-1]])-len(frames[path[a]])]) + scal(['add',['L',r],C,-1,1],cf);scal(['clear',C],cf) + else: + for r,f in enumerate(c['final']):climb(r,f,part) + event(['phase','exit_adapters']) + for r,f in enumerate(c['final']): + if r not in hpe:event(['adapter','new_to_old',r,f]) # HPE: no old-convention exit for a helper that ends at U; its post wrapper is L_{E,U}^-1 + event(['phase','full_frame_cleanup']) + for e in c['cleanup']: + regs=[e[1]]+([e[2]] if e[0]=='add' else []) + assert all(c['final'][r]==1 for r in regs) + scal(scalar(e,back),1) + for r in wrapped:event(['residual_adapter','post',r,c['start'][r]]+([c['final'][r]] if r in hpe else [])) # HPE: 5th field = terminal frame U # GK: L_E^-1 after the full-frame cleanup + event(['phase','done']) + return out + +def check_local(events,back): + # Literal scalar replay of the emitted stream, including center lifetimes. + state={('L',r):{r:Q(1)} for r in range(n)};live=[];paid=Counter();prims=0;macros=0 + for e in events: + if e[0]=='climb':assert not live;paid[e[5]]+=1 + elif e[0]=='center':assert live==[e[1]];paid[e[4]]+=1 + elif e[0]=='scalar': + op=e[1];tag=op[0];t=tuple(op[1]);macros+=1;prims+=2*primitive_bound(op) + if tag=='clear': + state[t]={} + if t[0]=='C' and t[1] in live:live.remove(t[1]) + elif tag=='copy':state[t]=dict(state.get(tuple(op[2]),{}));live.append(t[1]) + elif tag=='scale':state[t]={j:Q(op[2],op[3])*x for j,x in state[t].items()} + else: + s=tuple(op[2]);q=Q(op[3],op[4]);row=state.setdefault(t,{}) + if t[0]=='C' and t[1] not in live:live.append(t[1]) + for j,x in list(state.get(s,{}).items()): + z=row.get(j,Q(0))+q*x + if z:row[j]=z + else:row.pop(j,None) + assert not live and all(not row for r,row in state.items() if r[0]=='C') + for r in range(n): + expected={r:Q(1)} + if back and r>i)&1==0);a=q^(1<>i&1 else 0)for i in order]+[1<2*max(paid)**2 + return dict(profile=dict(sorted(paid.items())),mass=mass,hosted=HOSTED,entering=entering,cross_replica=cross,sigma_digest=digest.hexdigest(),sigmas=sigmas,idle_remainders=len(wanted),busy_family_checks=len(roles),invocations=72) + +r=audit(ct);raw=gzip.decompress((OUT/'GLOBAL-TEMPLATE.json.gz').read_bytes());assert hashlib.sha256(raw).hexdigest()==summary['template_sha256'];assert r['profile']=={int(k):v for k,v in summary['global_profile'].items()};assert r['sigmas']==read(OUT/'ACTUAL-SIGMAS.json.gz');assert r['sigma_digest']==summary['sigma_stream_sha256'] +assert all(hashlib.sha256((BASE/name).read_bytes()).hexdigest()==value for name,value in summary['source_artifacts'].items()) +controls=[] +def reject(name,mut): + if '--mutation-controls' not in sys.argv[4:]:return + q=copy.deepcopy(ct);mut(q) + try:audit(q) + except(AssertionError,KeyError,IndexError,ValueError,TypeError):controls.append(name) + else:raise AssertionError('ACCEPTED '+name) +enter=lambda q:next(o for c in q['calls']for o in c['owners'][(2*V):]if o[1][0]==4) +reject('alias two whole owners',lambda q:q['calls'][0]['owners'].__setitem__((2*V+1),q['calls'][0]['owners'][(2*V)])) +reject('helper on active data family',lambda q:q['calls'][0]['owners'][(2*V)].__setitem__(0,q['calls'][0]['owners'][0][0])) +reject('owner in private namespace',lambda q:q['calls'][0]['owners'][(2*V)].__setitem__(0,DATA)) +reject('wrong residual width',lambda q:enter(q)[1].__setitem__(3,enter(q)[1][3]-1)) +reject('wrong spectator coordinate',lambda q:enter(q)[1][4].__setitem__(0,72)) +reject('omit idle remainder',lambda q:q['idle_children'].pop()) +reject('understate physical reserve',lambda q:q.__setitem__('physical',PHYSICAL-1)) +# Single-provider dispatch still has all source/program/width binding controls. +if len(provider_ids)==1: + P=provider_ids[0] + at_p=lambda q:next(c for c in q['calls']if c['provider_id']==P) + narrow=next(h for h in range(R)if providers[P]['widths'][h]<9) + reject(P+': wrong provider at its invocation',lambda q:at_p(q).__setitem__('provider_id','__unregistered__')) + reject(P+': stale per-call local program hash',lambda q:at_p(q).__setitem__('local_program_sha256','0'*64)) + reject(P+': stale serialized provider program',lambda q:q['local_providers'][P]['local_programs']['forward'].pop()) + reject(P+': unbound residual adapter hash',lambda q:q['local_providers'][P].__setitem__('residual_adapter_sha256','0'*64)) + reject(P+': wrong provider width registry',lambda q:q['local_providers'][P]['widths'].__setitem__(narrow,providers[P]['widths'][narrow]-1)) + reject(P+': wrong per-call residual width',lambda q:at_p(q)['owners'][2*V+narrow][1].__setitem__(3,at_p(q)['owners'][2*V+narrow][1][3]-1)) + reject(P+': wrong sweep provider',lambda q:next(e for e in q['execution_schedule']if e['kind']=='local_cover_sweep').__setitem__('provider_id','__unregistered__')) + reject(P+': entering helper width silently restored to nine',lambda q:q['local_providers'][P]['widths'].__setitem__(narrow,9)) +else: + # Per-provider substitution controls: every provider is swapped against a partner provider. + for P in provider_ids: + Qp=partner(P) + at_p=lambda q,P=P:next(c for c in q['calls']if c['provider_id']==P) + diff=[h for h in range(R)if providers[P]['widths'][h]!=providers[Qp]['widths'][h]] + narrow=next(h for h in range(R)if providers[P]['widths'][h]<9) + reject(P+': wrong provider at its invocation',lambda q,P=P,Qp=Qp,at_p=at_p:at_p(q).__setitem__('provider_id',Qp)) + reject(P+': stale per-call local program hash',lambda q,Qp=Qp,at_p=at_p:at_p(q).__setitem__('local_program_sha256',registry[Qp]['local_program_checks'][at_p(q)['orientation']]['sha256'])) + reject(P+': stale serialized provider program',lambda q,P=P,Qp=Qp:q['local_providers'][P].__setitem__('local_programs',registry[Qp]['local_programs'])) + reject(P+': unbound residual adapter hash',lambda q,P=P:q['local_providers'][P].__setitem__('residual_adapter_sha256','0'*64)) + if diff:reject(P+': partner width in provider width registry',lambda q,P=P,Qp=Qp,h=diff[0]:q['local_providers'][P]['widths'].__setitem__(h,providers[Qp]['widths'][h])) + reject(P+': wrong per-call residual width',lambda q,at_p=at_p,h=narrow:at_p(q)['owners'][2*V+h][1].__setitem__(3,at_p(q)['owners'][2*V+h][1][3]-1)) + reject(P+': wrong sweep provider',lambda q,P=P,Qp=Qp:next(e for e in q['execution_schedule']if e['kind']=='local_cover_sweep'and DISPATCH[e['stage'],e['replica']]==P).__setitem__('provider_id',Qp)) + reject(P+': entering helper width silently restored to nine',lambda q,P=P,h=narrow:q['local_providers'][P]['widths'].__setitem__(h,9)) + +report=dict(status='PASS_INDEPENDENT_ASYNC_WHOLE_OWNER_CONTROLLER_PHASES_AND_SPECTATORS',template_sha256=summary['template_sha256'],complex_template_sha256=summary['template_sha256'],complex_live=DATA,complex_profile=r['profile'],complex_hosted_residuals=HOSTED,physical=PHYSICAL,rank_mass=r['mass'],deficit=2560,entering_helper_roles=r['entering'],cross_replica_helper_roles=r['cross_replica'],one_owner_per_complete_invocation=True,helper_busy_family_window_checks=r['busy_family_checks'],complete_invocations=r['invocations'],actual_orthogonal_73column_maps=len(r['sigmas']),actual_sigma_stream_sha256=r['sigma_digest'],all_actual_residual_and_spectator_charts=True,idle_remainders=r['idle_remainders'],mutations_rejected=controls,mutation_controls_run='--mutation-controls' in sys.argv[4:],provider_phase_semantic_sha256=phase_semantic_hashes,provider_artifact_semantic_sha256=artifact_semantic_hashes,widths_by_provider={pid:dict(sorted(Counter(providers[pid]['widths']).items()))for pid in provider_ids},provider_counts=dict(Counter(c['provider_id']for c in ct['calls'])),all_provider_program_phase_and_wrapper_bindings=True,scope='Independent exact asynchronous chronology, per-replica phase projection, owner/chart/paid-profile audit. Uses per-invocation local providers bound by exact scalar, phase and residual-wrapper receipts; all-size compilation and complete coefficient invoice are separate inherited obligations.') +REPORT.parent.mkdir(parents=True,exist_ok=True) +REPORT.write_text(json.dumps(report,indent=2)+'\n');print(json.dumps(report,indent=2)) + +owners=dict(status='PASS_INDEPENDENT_ASYNC_OWNERS_AND_PROFILE',template_sha256=summary['template_sha256'],paid_profile=r['profile'],live=DATA,physical=PHYSICAL,rank_mass=r['mass'],deficit=2560,hosted_residuals=HOSTED,banked_residuals=0,all_live_owners_per_call_distinct=True,owners_per_call=N,actual_helper_owner_charts=HOSTED,actual_73column_sigmas=len(r['sigmas']),cross_replica_helper_roles=r['cross_replica'],explicit_idle_remainder_children=r['idle_remainders'],source_idle_children_charged=sum(x['replicas']for x in parent['idle_children']),source_artifacts=summary['source_artifacts'],provider_phase_semantic_sha256=phase_semantic_hashes,provider_artifact_semantic_sha256=artifact_semantic_hashes,controller_audit_sha256=hashlib.sha256(REPORT.read_bytes()).hexdigest()) +(REPORT.parent/'OWNERS-AND-PROFILE.json').write_text(json.dumps(owners,indent=2)+'\n') + +# Literal residual frames are a compact export of the already checked offsets, +# not another global replay. Every row names its actual inherited axes. +frames=[] +for z in ct['idle_children']: + axes=list(map(int,ph['recipes'][z['port']]['idle_children'][z['child']]['orthogonal_axes'])) + tail=axes[z['pending_offset']:] + assert len(tail)==z['rank'] + frames.append(dict(z,orthogonal_axes=tail)) +frame_raw=json.dumps(frames,sort_keys=True,separators=(',',':')).encode() +portable=bytearray(gzip.compress(frame_raw,mtime=0));portable[9]=255 +(OUT/'IDLE-REMAINDER-FRAMES.json.gz').write_bytes(bytes(portable)) +frame_receipt=dict(status='PASS_LITERAL_IDLE_REMAINDER_FRAMES',template_sha256=summary['template_sha256'], + uncompressed_frames_sha256=hashlib.sha256(frame_raw).hexdigest(),children=len(frames), + rank_profile=dict(sorted(Counter(z['rank']for z in frames).items())), + source_data_phase_sha256=hashlib.sha256((BASE/'work/complex-nine-native/DATA-PHASES.json').read_bytes()).hexdigest(), + scope='Actual orthogonal axes after the independently checked whole-owner prefix in each inherited pending child.') +(REPORT.parent/'IDLE-REMAINDER-FRAMES.json').write_text(json.dumps(frame_receipt,indent=2)+'\n') diff --git a/research/helper-minimality/inputs/pr799/code/emit_allcold.py b/research/helper-minimality/inputs/pr799/code/emit_allcold.py new file mode 100644 index 0000000000..8e147f80a6 --- /dev/null +++ b/research/helper-minimality/inputs/pr799/code/emit_allcold.py @@ -0,0 +1,150 @@ +"""Two-provider width-seven whole-owner derivative, adapted with OpenAI Codex assistance. +Based on PR514 and its credited PR484/507 lineage. +CLI: --base VERIFIED_VARIANT --owners ASYNC-OWNERS.json.gz --plan ASYNC-PLAN.json --out OUT +No optimizer or unpublished word builder runs. The frozen map explicitly names +one whole helper per family per complete invocation, plus borrowed spectators. +""" +import sys,json,gzip,hashlib,copy,argparse +from pathlib import Path +from collections import Counter,defaultdict +import sys as _s,pathlib as _p;_s.path.insert(0,str(_p.Path(__file__).resolve().parent)) +from witness import * +parser=argparse.ArgumentParser(description=__doc__) +parser.add_argument('--base',type=Path,required=True);parser.add_argument('--owners',type=Path,required=True);parser.add_argument('--plan',type=Path,required=True);parser.add_argument('--out',type=Path,required=True) +a=parser.parse_args();BASE,MAP,PLAN,OUT=(p.resolve()for p in(a.base,a.owners,a.plan,a.out));assert not OUT.exists();OUT.mkdir(parents=True) +class OH: + @staticmethod + def idle_basis(q): + z=next(i for i in range(9)if not(q>>i)&1);u=q^(1<>i&1 else 0)for i in order]+[1<0 and all(x['R']==R for x in registry.values()),'providers disagree on helper count R' + assert replay['status']=='PASS_INDEPENDENT_LOCAL_SCALAR_FRAME_AND_WRAPPER_REPLAY' + assert replay['canonical_word_sha256']==sha(directory/'CANONICAL-WORD.json.gz')and replay['local_programs_sha256']==sha(directory/'LOCAL-PROGRAMS.json.gz') + widths=[len(pc['frames'][pc['final'][2*V+h]])-len(pc['frames'][pc['start'][2*V+h]])for h in range(R)] # HPE: residual width |final|-|start| + assert widths==plan['provider_registry'][provider_id]['widths'] + for name in provider_files: + value=sha(directory/name);assert value==plan['provider_registry'][provider_id]['artifact_sha256'][name] + source_artifacts[f'providers/{provider_id}/{name}']=value + registry[provider_id]=dict(local_programs=programs,canonical_word_sha256=sha(directory/'CANONICAL-WORD.json.gz'),local_programs_sha256=sha(directory/'LOCAL-PROGRAMS.json.gz'),local_program_checks=checks,exact_local_clifford_recipe_sha256=sha(directory/'CLIFFORD-RECIPES.json'),residual_adapter_sha256=sha(directory/'RESIDUAL-ADAPTERS.json'),v=V,h=9,R=R,ports=pc['ports'],centers=pc['centers'],widths=widths) +assert len(roles)==72*R # one whole-owner role per (call, provider helper) +selected={(c['stage'],c['replica']):c for c in plan['provider_calls']} +assert len(selected)==72 and set(selected)==set(call_order) +assert Counter(c['provider']for c in selected.values())==COUNTS +per_call_widths={(c['stage'],c['replica']):c['widths']for c in plan['per_call_widths']} +for key,c in selected.items(): + assert c['time']==at[key] and c['provider']in registry + assert per_call_widths[key]==registry[c['provider']]['widths'] +for key in('local_programs','exact_local_clifford_recipe_sha256','residual_adapter_sha256'):t.pop(key) +t['local_providers']=registry +rank={z['child']:z['rank']for z in parent['idle_children']};side={};pairs={} +for e in parent['execution_schedule']: + if e['kind']=='idle_cover_sweep': + for sd,ch in enumerate(e['child_indices']):side[ch]=sd;pairs[ch]=e['pair'] +bycall=defaultdict(dict);used=defaultdict(set);sigmas={};digest=hashlib.sha256();entering=0 +for z in roles: + s,rep,h=z['stage'],z['replica'],z['helper'];i,cp,off,w,f=z['child'],z['copy'],z['offset'],z['width'],z['family'];orp,port=divmod(cp,V) + assert 0<=s<9 and 0<=rep=0 and off+w<=rank[i] + assert z['time']==at[s,rep] and z['time'] in plan['windows'][f'{orp},{i}'][1] + B=OH.idle_basis(canon['ports'][port]);pending=list(map(int,ph['recipes'][port]['idle_children'][i]['orthogonal_axes']));assert len(pending)==rank[i] + occ=[B.index(v)for v in pending[off:off+w]];sp=OH.spectators(canon['ports'][port],pending,off,w)if w<9 else[] + order=occ+sp+[j for j in range(M)if j not in occ and j not in sp];assert len(order)==len(set(order))==M + sigma=[B[j]for j in order];sigmahash=hashlib.sha256(json.dumps(sigma,separators=(',',':')).encode()).hexdigest();sigmas[sigmahash]=sigma + route=[4,i,off,w,sp]if w<9 else[3,i,off];bycall[s,rep][h]=[f,route];entering+=w<9 + cells=set(range(off,off+w));assert not used[i,orp,port]&cells;used[i,orp,port]|=cells + digest.update(json.dumps([s,rep,h,f,sigmahash],separators=(',',':')).encode()+b'\n') +for c in t['calls']: + k=(c['stage'],c['replica']);assert set(bycall[k])==set(range(R)) + c['owners']=c['owners'][:(2*V)]+[bycall[k][h]for h in range(R)];assert len({f for f,r in c['owners']})==2*V+R and all(f2*max(paid)**2 + +assert all(c['local_program_sha256']==registry[c['provider_id']]['local_program_checks'][c['orientation']]['sha256']for c in t['calls']) +t['provider_dispatch']='For each indivisible local_cover_sweep, execute local_providers[call.provider_id].local_programs[call.orientation] with that provider residual adapters and Clifford recipes. The sweep provider_id must equal its call provider_id.' +raw=json.dumps(t,sort_keys=True,separators=(',',':')).encode();(OUT/'GLOBAL-TEMPLATE.json.gz').write_bytes(gzip.compress(raw,mtime=0)) +res=dict(status='EMITTED_MIXED_PROVIDER_ASYNCHRONOUS_WHOLE_OWNER_COMPLEX_TEMPLATE', + template_sha256=hashlib.sha256(raw).hexdigest(), + parent_template_sha256=hashlib.sha256(gzip.decompress((BASE/'split-centres/GLOBAL-TEMPLATE.json.gz').read_bytes())).hexdigest(), + live=DATA,physical=physical,global_profile=dict(sorted(paid.items())), + rank_mass=sum(r*n for r,n in paid.items()),deficit=2560,maxchild=max(paid), + hosted_residuals=len(roles),banks_per_stage=[0]*9,entering_helper_roles=entering, + unique_actual_73column_sigmas=len(sigmas),sigma_stream_sha256=digest.hexdigest(), + cross_replica_helper_roles=sum(z['replica']!=z['owner_replica']for z in roles), + asynchronous_order_sha256=hashlib.sha256(json.dumps(call_order,separators=(',',':')).encode()).hexdigest(), + source_artifacts=source_artifacts,provider_counts=dict(Counter(c['provider_id']for c in t['calls'])), + scope='Two actual verified plain/width-seven providers dispatched per complete invocation; independent controller/spectator/normalization and complete finite invoice admission required.') +(OUT/'HOSTED.json').write_text(json.dumps(res,indent=2)+'\n');(OUT/'ACTUAL-SIGMAS.json.gz').write_bytes(gzip.compress(json.dumps(sigmas,separators=(',',':')).encode(),mtime=0));print(json.dumps(res,indent=2)) diff --git a/research/helper-minimality/inputs/pr799/construction/construct_gauge_xcentre.py b/research/helper-minimality/inputs/pr799/construction/construct_gauge_xcentre.py new file mode 100644 index 0000000000..1010d86746 --- /dev/null +++ b/research/helper-minimality/inputs/pr799/construction/construct_gauge_xcentre.py @@ -0,0 +1,381 @@ +# Round20 early-coordinate-center / own-Y variant, prepared for icekylinx +# with OpenAI Codex assistance. Apache-2.0. Scalar elementary-operation +# helpers below are retained from the attributed PR514 construct_partial.py. +# Adapted by OpenAI Codex for isolated structural research. +# Modified from PR425 by icekylinx with Codex assistance. +"""Full discovery word for Hamming packets with borrowed X and Y registers. + +This changes the scalar architecture. It is not accepted by the old restricted +gx interface: source bases may change until full-frame cleanup, and targets use +an explicitly inverted output basis. No supplier admission is asserted. +""" +import copy,gzip,json,math,time +import itertools as it +from collections import Counter,defaultdict +from fractions import Fraction as Q +from pathlib import Path + +import sys +INPUT=Path(sys.argv[1]);OUT=Path(sys.argv[2]);OUT.mkdir(parents=True,exist_ok=False);D=json.loads((INPUT/'PROTOTYPE.json').read_text()) +P=D['binary_ports'];R=D['root_lines'];v=120;h=9 +modules=json.load(gzip.open(INPUT/'PACKET-PROGRAMS.json.gz')) +# AtomScout: leaver-read K-triangles (schedule from atom1.py / rog.py CP-SAT) +TRI=json.loads(Path(sys.argv[3]).read_text()) +FULLT={(tuple(tr['p']),tr['e']) for tr in TRI['triangles']} +TRI_COORDS={t+8 for tr in TRI['triangles'] for t,_,_ in tr['reads']} +COPYL=[] +NH=504-3*len(FULLT)+len(COPYL) + +def basis(vectors): + b={} + for x in vectors: + for p in sorted(b,reverse=True): + if x>>p&1:x^=b[p] + if x: + p=x.bit_length()-1 + for q in b: + if b[q]>>p&1:b[q]^=x + b[p]=x + return tuple(b[p] for p in sorted(b,reverse=True)) +def inside(a,b):return basis(a+b)==b +def hyper(p):return basis([x for x in range(1,512) if (x&p).bit_count()%2==0]) +FULL=basis([1<=v,r)) + for col,s in enumerate(ids): + k=next(i for i in range(col,len(regs)) if rows[regs[i]].get(s,Q(0))) + swap(regs[k],regs[col],F) + scale(regs[col],1/rows[regs[col]][s],F) + for i in range(len(regs)): + if i!=col and rows[regs[i]].get(s,Q(0)):add(regs[i],regs[col],-rows[regs[i]][s],F) + assert all(rows[regs[i]]=={s:Q(1)} for i,s in enumerate(ids)) + M=[[Q(R[s][i]) for s in ids] for i in c] + def qr_rank(rs): + bs={} + for r in rs: + r=r.copy() + for i,b in sorted(bs.items()): + if r[i]:q=r[i];r=[x-q*y for x,y in zip(r,b)] + i=next((i for i,x in enumerate(r) if x),None) + if i is not None:q=r[i];bs[i]=[x/q for x in r] + return len(bs) + assert qr_rank(M)==4 + for rr0 in PRIORITY[",".join(map(str,c))]["rows"]: + rr=list(map(Q,rr0)) + if qr_rank(M+[rr])>len(M):M.append(rr) + if len(M)==8:break + for i in range(8): + if len(M)==8:break + rr=[Q(i==j) for j in range(8)] + if qr_rank(M+[rr])>len(M):M.append(rr) + if len(M)==8:break + assert len(M)==8 + linear(regs,M,F) + for i,r in zip(c,regs): + assert rows[r]=={s:Q(R[s][i]) for s in ids} + block_totals[c,i]=r + +# All centers are complete while Y is still at zero. This is the crucial +# difference from an illegal early-own-Y prefix using the old center order. +centers=[] +for i in range(8): + regs=[block_totals[c,i] for c in sorted(blocks) if i in c] + F=hyper(P[frame[i]]);a=regs[0] + for b in regs[1:]:add(a,b,1,F) + centers.append(a) +centers += [frame[i] for i in range(8)] +center_frames=[cur[r] for r in centers] +assert list(map(len,center_frames))==[8]*8+[1]*8 +assert all(cur[v+t]==() for t in range(v)) + +phase=B +for t,(r,coef,F) in sorted(own_rows.items()): + if t in TRI_COORDS:continue + assert cur[r]==F + add(v+t,r,coef,F) +# requests are needed for TRI coefficients +requests=defaultdict(list) +for pid,pair in enumerate(pairs): + if not pair['selected']:continue + (t,u),(key1,key2),mat=pair['targets'],pair['keys'],pair['matrix'] + requests[key1].append((t,-Q(mat[0][0],2))) + requests[key2].append((u,-Q(mat[0][1],2))) +reqcoef={t:(key,coef) for key,reqs in requests.items() for t,coef in reqs} +def face_info(c,p,eps): + z=blocks[c];keys=[(pp,ee) for pp in it.combinations(c,2) for ee in (-1,1)] + r_local,alpha=z['outputs'][keys.index((p,eps))] + j=[j for j in range(40,len(z['events'])) if z['events'][j][0]==r_local];assert len(j)==1 + return j[0],Q(alpha) +tri_join_counts=Counter() +lcopy={} +for s8 in COPYL: + r=s8+8;c=alloc();add(c,r,1,cur[r]);lcopy[r]=c +for tr in TRI['triangles']: + p,eps=tuple(tr['p']),tr['e'] + for t8,blk,loc in tr['reads']: + t=t8+8;blk=tuple(blk);r=maps[blk][loc];r0=r;r=lcopy.get(r,r) + key,coef=reqcoef[t];assert key[1]==p and key[2]==eps,(key,p,eps) + if blk==key[0]: + rr,c0,F0=own_rows[t];assert rr==r0;q=c0 + else: + j,alpha=face_info(blk,p,eps);ev=blocks[blk]['events'][j];assert loc in ev[:2] + q=coef*alpha + F=basis(cur[v+t]+cur[r]);assert inside(F,hyper(P[t])),('TRI frame',t) + tri_join_counts[len(F)]+=1;add(v+t,r,q,F) + +packets={} +for c,z in sorted(blocks.items()): + mp=maps[c] + keys=[(p,eps) for p in it.combinations(c,2) for eps in (-1,1)] + skipev={face_info(c,p,eps)[0] for p,eps in keys if (p,eps) in FULLT} + for j,(e,F) in enumerate(list(zip(z['events'],z['event_frames']))[40:]): + if j not in early[c] and 40+j not in skipev: + t,s,a,b=e;add(mp[t],mp[s],Q(a,b),tuple(F)) + for key,(r,alpha) in zip(keys,z['outputs']): + if tuple(key) in FULLT:skip();continue + a=mp[r];b=alloc();add(b,a,1,cur[a]) + consumers=sorted(d for d in blocks if d!=c and set(key[0])<=set(d)) + assert len(consumers)==2 + for target,r in zip(consumers,(a,b)):packets[c,key[0],key[1],target]=(r,Q(alpha)) + +# Both tetrahedra use the same partition. A selected key has exactly two +# selected Y loads and no ordinary M consumer. Supply its two raw halves in +# opposite orders and never form that M. Other keys retain the old M path. +second=[];first_join_counts=Counter() +for key,reqs in sorted(requests.items()): + assert len(reqs)==2 + c,p,eps=key + if (p,eps) in FULLT:continue + ds=sorted(d for d in blocks if d!=c and set(p)<=set(d));a,b=ds + for j,(target,coef) in enumerate(sorted(reqs)): + first_source,second_source=(a,b) if j==0 else (b,a) + r,alpha=packets[first_source,p,eps,second_source] + F=basis(cur[v+target]+cur[r]);assert inside(F,hyper(P[target])) + first_join_counts[len(F)]+=1;add(v+target,r,coef*alpha,F) + r,alpha=packets[second_source,p,eps,c] + second.append((target,r,coef*alpha)) + +Ms={} +for c in sorted(blocks): + for p in it.combinations(c,2): + ds=sorted(d for d in blocks if d!=c and set(p)<=set(d)) + for eps in (-1,1): + if (c,p,eps) in requests:continue + (a,alpha),(b,beta)=[packets[d,p,eps,c] for d in ds] + F=basis(cur[a]+cur[b]);add(a,b,beta/alpha,F) + Ms[c,p,eps]=(a,alpha) + +consumers=defaultdict(list) +for pid,pair in enumerate(pairs): + for key in pair['keys']:consumers[key].append(pid) +slots={} +for key,uses in sorted(consumers.items()): + assert len(uses)==2 + if key in requests: + assert all(pairs[i]['selected'] for i in uses) + continue + assert all(not pairs[i]['selected'] for i in uses) + a,alpha=Ms[key] + for j,pid in enumerate(uses): + if j==0:r=a + else:r=alloc();add(r,a,1,cur[a]) + slots[pid,key]=(r,alpha) +assert len(cur)-240==NH,len(cur)-240 + +selected_join_counts=Counter() +for target,r,coef in second: + F=basis(cur[v+target]+cur[r]);assert inside(F,hyper(P[target])) + selected_join_counts[len(F)]+=1;add(v+target,r,coef,F) +output_basis=[] +for pair in pairs: + if not pair['selected']:continue + (t,u),mat=pair['targets'],pair['matrix'] + F=basis(cur[v+t]+cur[v+u]);assert inside(F,hyper(P[t])) and inside(F,hyper(P[u])) + add(v+t,v+u,1,F);add(v+u,v+t,-Q(1,2),F) + z=-Q(2*mat[1][0],mat[0][0]);scale(v+u,z,F);output_basis.append((t,u,z)) + +for pid,pair in enumerate(pairs): + if pair['selected']:continue + (t,u),(key1,key2),mat=pair['targets'],pair['keys'],pair['matrix'] + (a,alpha),(b,beta)=slots[pid,key1],slots[pid,key2] + F=basis(cur[a]+cur[b]);aa,ab=Q(mat[0][0])*alpha,Q(mat[0][1])*beta + ba,bb=Q(mat[1][0])*alpha,Q(mat[1][1])*beta + add(a,b,ab/aa,F);q=ba/(bb-ba*ab/aa);add(b,a,q,F) + add(v+t,a,-aa/2,hyper(P[t]));add(v+u,b,-(bb-ba*ab/aa)/2,hyper(P[u])) + +for t in range(v): + expected={s:-Q(G[t][s],2) for s in range(v) if s!=t and G[t][s] and s not in frame.values()} if t not in frame.values() else {} + assert rows[v+t]==expected,('side identity',t) + +scatter=[[Q(r[i],4) if t not in frame.values() else Q(0) for i in range(8)]+[Q(t==frame[i]) for i in range(8)] for t,r in enumerate(R)] +precondition=[] +for t,u,z in output_basis: + a,b=scatter[t].copy(),scatter[u].copy() + scatter[t]=[x/2-y/z for x,y in zip(a,b)] + scatter[u]=[x/2+y/z for x,y in zip(a,b)] + precondition.extend([['scale',v+u,(1/z).numerator,(1/z).denominator,[]], + ['add',v+u,v+t,1,2,[]],['add',v+t,v+u,-1,1,[]]]) +for r in range(len(cur)):climb(r,hyper(P[r-v]) if v<=r<2*v else FULL) +H[8]+=8;H[1]+=8 +assert sum(r*z for r,z in H.items())==9*NH+240*8+72,sum(r*z for r,z in H.items()) + +def apply(e,matrix): + if e[0]=='add': + _,t,s,a,b,*_=e;q=Q(a,b) + for j,x in list(matrix[s].items()): + z=matrix[t].get(j,Q(0))+q*x + if z:matrix[t][j]=z + else:matrix[t].pop(j,None) + else: + _,t,a,b,*_=e;q=Q(a,b);matrix[t]={j:q*x for j,x in matrix[t].items()} +def inverse(e): + e=copy.deepcopy(e) + if e[0]=='add':e[3]*=-1 + else:e[2],e[3]=e[3],e[2] + e[-1]=list(FULL);return e +cut=[['add',v+t,centers[i],q.numerator,q.denominator,None] for t,row in enumerate(scatter) for i,q in enumerate(row) if q] +cleanup=[inverse(e) for e in reversed(A+B) if not v<=e[1]<2*v] +matrix=[{r:Q(1)} if rk and piv[j]>>k&1:piv[j]^=piv[k] + return tuple(piv[k] for k in sorted(piv,reverse=True)) + +def contained(a,b):return basis(a+b)==b + +def registers(e):return e[1:3] if e[0]=='add' else e[1:2] + +def apply(e,rows,dual=False): + if e[0]=='add': + t,s=e[1:3];q=F(e[3],e[4]);require(t!=s,'self add') + if dual:t,s,q=s,t,-q + dst=rows[t] + for k,x in list(rows[s].items()): + a=dst.get(k,F(0))+q*x + if a:dst[k]=a + else:dst.pop(k,None) + elif e[0]=='scale': + t=e[1];q=F(e[2],e[3]);require(q!=0,'zero scale') + if dual:q=1/q + rows[t]={k:q*x for k,x in rows[t].items()} + else:raise RuntimeError('unknown scalar primitive') + +def invert(e): + r=list(e) + if r[0]=='add':r[3]=-r[3] + else:r[2],r[3]=r[3],r[2] + return r + +def check_parent_interface(word,main): + # Read only the retained boundary data. No builder or local checker is imported. + relative="research/community-k492-audit/pr622/replay/baseline558/complex-global/base/split-centres/CANONICAL-WORD.json.gz" + path=main/relative;raw=path.read_bytes() + require(hashlib.sha256(raw).hexdigest()=="66d3c3c70983224650643a0a05a21ac6c6959f84d0f4528650601016f5a76844",'parent canonical input pin') + parent=json.loads(gzip.decompress(raw)) + tau=lambda x:x^(43 if (x&43).bit_count()%2 else 0) + ports=parent['ports'];v=word['report']['v'] + require(len(ports)==len(set(ports))==v,'parent port count') + require(set(map(tau,word['ports']))==set(ports),'transported source/target ports') + moved={i:ports.index(tau(p)) for i,p in enumerate(word['ports'])} + centers=[moved.get(r,r) for r in word['centers']] + actual=[list(basis([tau(x) for x in frame])) for frame in word['center_frames']] + expected=[parent['frames'][f] for f in parent['center_frames']] + require(len(centers)==len(set(centers))==len(actual)==8,'eight distinct centre carriers') + require(actual==expected and all(len(f)==8 for f in actual),'ordered centre frame interface') + return dict(parent_path=relative,parent_file_sha256=hashlib.sha256(raw).hexdigest(), + transport_tau=43,ordered_frame_bases_match=True,all_ports_match=True, + transported_centers=centers,source_centers=[r for r in centers if r=2*v} + for e in w['precondition']:apply(e,dirt) + compensation=[['add',y,k,-a.numerator,a.denominator,[]] for y in range(v,2*v) for k,a in sorted(dirt[y].items())] + entering=set(map(int,w.get('start_extra',{})));lowends=set(map(int,w.get('helper_final',{}))) + coldends=lowends-entering + require(not any(e[2] in entering for e in compensation),'nonzero entrance response') + require(not any(r in entering|coldends for e in w['precondition']+compensation for r in registers(e)), 'pre-wrapper touch of residual helper') + require(all(e[-1]==[] for e in w['precondition']+compensation),'nonzero frame precondition') + early=w.get('early_cleanup',[]);earlyids={i for i,U in early} + require(len(earlyids)==len(early),'duplicate early cleanup gate') + tail=[w['cleanup'][i][:-1]+[U] for i,U in early] + cleanup=[e for i,e in enumerate(w['cleanup']) if i not in earlyids] + prefix=w['precondition']+compensation+main + program=prefix+tail+cleanup + for dual in (False,True): + actual=ident() + for e in program:apply(e,actual,dual) + expected=ident() + for t in range(v):expected[t if dual else v+t][v+t if dual else t]=F(-1 if dual else 1) + bad=[i for i in range(n) if actual[i]!=expected[i]] + require(not bad,'all-column endpoint failure '+str((dual,bad[:8]))) + print('endpoint', 'dual' if dual else 'forward','PASS',flush=True) + full=basis([1<= 3.11 with numpy and ortools (requirements.txt); set PYTHON to choose the interpreter. +# HM_FULL=1 also regenerates the 36,501-pair pre-read table (about 5 min on 2 cores) and compares it with the stored one. +# About 52 s wall on 12 cores (the S1 solver run takes about 50 s). +set -uo pipefail +HERE=$(cd "$(dirname "$0")" && pwd) +OUT=${1:-$(mktemp -d "${TMPDIR:-/tmp}/helper-minimality.XXXXXX")} +mkdir -p "$OUT"; OUT=$(cd "$OUT" && pwd) +case "$OUT/" in "$HERE"/*) echo "output dir must be outside the package"; exit 2;; esac +PY="${PYTHON:-python3}"; export PYTHONDONTWRITEBYTECODE=1 +T0=$SECONDS +echo "== 0. manifest and provenance" +if ! "$PY" -B "$HERE/scripts/provenance.py" | tee "$OUT/provenance.log" | sed 's/^/ /' || grep -q '^FAIL' "$OUT/provenance.log" \ + || [ "$(grep -c '^PASS' "$OUT/provenance.log")" != 2 ]; then + echo "step 0 FAILED"; exit 1 +fi +# work tree: scripts write their scratch files (iface.pkl, inst4567.json, ...) here, never into the package +export HM_ROOT="$OUT/tree"; mkdir -p "$HM_ROOT" "$OUT/logs" +cp -R "$HERE/cards" "$HERE/inputs" "$HERE/checks" "$HERE/evidence" "$HM_ROOT/" +E_="$PY -B $HM_ROOT/checks/expect.py" +# run NAME CARDDIR cmd... (stdout+stderr -> logs/NAME.log, exit code -> logs/NAME.rc) +run() { local n=$1 d=$2; shift 2; ( cd "$HM_ROOT/cards/$d" && "$@" > "$OUT/logs/$n.log" 2>&1; echo $? > "$OUT/logs/$n.rc" ); } +chk() { local l=$1 n=$2; shift 2; $E_ "$l" "$OUT/logs/$n.log" "$@"; } +W656=$HM_ROOT/inputs/words/656-layers-FULL-WORD.json.gz +W799=$HM_ROOT/inputs/words/799-X4-FULL-WORD.json.gz +AL=$HM_ROOT/inputs/pr799/independent/audit_local.py + +g1() { # S1 Hall lemma and extensions (#656 canonical word) + run iface B98b $PY -B iface.py + run blockscan B167 $PY -B blockscan.py + run scan01b B171 $PY -B scan01b.py + run extract B167 $PY -B extract.py + run level B167 $PY -B level.py --drop 433 --time 900 + run val B176 $PY -B val.py + run gate B179 $PY -B gate.py + run gate2 B179 $PY -B gate2.py + chk S1.hall blockscan --count "'scratch', 16, 'wide', 8, 'plane-stoppers', 8, 'distinct', True, 'matching', 8" 11 --count "'cols', 56\)" 3 --count "'cand-eq-wide', True\)" 11 + chk S1.solver-drop433 level --has "^STATUS INFEASIBLE" --has "drop \(433,\)" + chk S1.slack-01x scan01b --has "^matching 21$" --has "scratch-only partners matching 15 of 21" --has "col-only partners matching 21 of 21" --count "stoppers 7 scratch-only matching 5" 3 + chk S1.twins val --has "value-exact twins 0 of 38" + chk S1.replayA gate --has "end rows mismatch vs rows0: 0 \[\]" + chk S1.stoppers88 gate2 --has "stoppers 88 with jump found 88" --has "count ok>0: 0 holders>0: 0 low>0: 0 of 88" --has "all columns have a pure point holder: 0 inside plane: 0 no-climb \(frame>=z frame\): 0 of 88" +} +g2() { # Lawler S3/S4, bridges and holders + run law656 B171 $PY -B lawler799.py $HM_ROOT/inputs/words/656-CANONICAL-WORD.json.gz + run law799 B171 $PY -B lawler799.py + run pair656 B171 $PY -B pair799.py $HM_ROOT/inputs/words/656-CANONICAL-WORD.json.gz + run pair799 B171 $PY -B pair799.py + run lawcheck B171 $PY -B $HM_ROOT/checks/lawler_check.py + run b182 B182 $PY -B b182.py + chk S2.lawler-656 law656 --has "^ops 5287 copies Counter\(\{'S3': 156, 'S4': 112\}\)" --has "\('S3', 'FAIL', 'chains-alone-ok'\) 156" --has "\('S4', 'FAIL', 'chains-alone-ok'\) 112" --has "^passing copies 0$" + chk S2.lawler-799 law799 --has "^ops 5687 copies Counter\(\{'S3': 156, 'S4': 112\}\)" --has "\('S3', 'FAIL', 'chains-alone-ok'\) 156" --has "\('S4', 'FAIL', 'chains-alone-ok'\) 112" --has "^passing copies 0$" + chk S2.skipzero-656 law656 --has "^value-zero adds skipped 1921$" --has "^skip-zero \{\('S3', 'FAIL', 'chains-alone-ok'\): 156, \('S4', 'FAIL', 'chains-alone-ok'\): 112\}$" --has "^skip-zero passing copies 0$" + chk S2.skipzero-799 law799 --has "^value-zero adds skipped 2317$" --has "^skip-zero \{\('S3', 'FAIL', 'chains-alone-ok'\): 156, \('S4', 'FAIL', 'chains-alone-ok'\): 112\}$" --has "^skip-zero passing copies 0$" + chk S2.pair-656 pair656 --has "Counter\(\{\('S3', 'pair-conflict'\): 156, \('S4', 'pair-conflict'\): 112\}\)" + chk S2.pair-799 pair799 --has "Counter\(\{\('S3', 'pair-conflict'\): 156, \('S4', 'pair-conflict'\): 112\}\)" + sed 's/^\(PASS\|FAIL\) /\1 S2.oracle-/' "$OUT/logs/lawcheck.log" + [ "$(cat "$OUT/logs/lawcheck.rc")" = 0 ] || echo "FAIL S2.oracle run exited nonzero" + chk S3.bridges-holders b182 --has "\('BR', 'FAIL', 'chains-alone-ok'\) 12" --has "\('S3', 'FAIL', 'chains-alone-ok'\) 94" --has "^passing \[\]" --has "distinct 12 of 12 \[8(, 8){11}\]" +} +g3() { # cut >= 8 centres, verifier model + run cut656 B174 $PY -B check.py $W656 + run cut799 B174 $PY -B check.py $W799 + run clique B174 $PY -B clique.py $W656 $W799 + run al656 B174 $PY -B $AL --word $W656 --output $OUT/logs/al656.json + run al799 B174 $PY -B $AL --word $W799 --output $OUT/logs/al799.json + run toymake B174 $PY -B $HM_ROOT/checks/make_toy.py $W799 $OUT/logs/toy-FULL-WORD.json.gz + run altoy B174 $PY -B $AL --word $OUT/logs/toy-FULL-WORD.json.gz --output $OUT/logs/altoy.json + run cuttoy B174 $PY -B check.py $OUT/logs/toy-FULL-WORD.json.gz + run anchors B174 $PY -B $HM_ROOT/checks/anchors.py + for w in 656 799; do + chk C.cut-$w cut$w --has "H-CUT: all cut ops add target<-centre: True \| centres disjoint from targets: True \| #centres 8 distinct 8 \| \|K\| read 8" \ + --has "^F == I: True" --has "odd nnz in F0 0" --has "rank\(F-F0\) = 8 <= \|K\| = 8" --has "omega\(odd graph\) = 8" --has "principal submatrix of F-F0 on clique is I: True" \ + --has "centre-frame lemma .*: True" --absent ": False" + chk C.audit-$w al$w --has '"status": "PASS_INDEPENDENT_EXACT_FORWARD_AND_DUAL_ENDPOINT_FRAMES_ENTRANCES_CONES"' --has '"R": '$([ $w = 656 ] && echo 492 || echo 504) + done + chk C.clique clique --count "omega 8 \[0, 3, 45, 46, 69, 70, 104, 107\]" 2 --count "distinct 112" 2 + chk C.gap-AL-accepts-toy altoy --has '"status": "PASS_INDEPENDENT_EXACT_FORWARD' + chk C.gap-H-CUT-detected cuttoy --has "H-CUT: all cut ops add target<-centre: False" + cat "$OUT/logs/anchors.log"; [ "$(cat "$OUT/logs/anchors.rc")" = 0 ] || echo "FAIL C.anchors run exited nonzero" +} +g4() { # pre-read layer, model fidelity + run ilp B159 $PY -B ilp.py + run pairs B159 $PY -B $HM_ROOT/checks/pairs_sample.py + run b128 B128 $PY -B retest.py base + run b128tab B128 $PY -B $HM_ROOT/checks/b128_table.py + chk P.min66 ilp --has "^bundles 46 legal 38" --has "^touched targets 66 preads 118" --absent "Traceback" + ( cd "$HM_ROOT/cards/B159" && $PY -B -c " +import ilp +r=ilp.solve('full'); print('RESULT',r[0],r[1],r[2])" > "$OUT/logs/ilp2.log" 2>&1; echo $? > "$OUT/logs/ilp2.rc" ) + chk P.cpsat-optimal ilp2 --has "RESULT OPTIMAL 66 66.0" + sed 's/^\(PASS\|FAIL\) /\1 /' "$OUT/logs/pairs.log" | grep -E '^(PASS|FAIL)' + [ "$(cat "$OUT/logs/pairs.rc")" = 0 ] || echo "FAIL P.pairs run exited nonzero" + chk M.fidelity b128 --has "^frame map bad 0 5726$" --has "^endpoint forward PASS" --has "^endpoint dual PASS" --has '"status": "PASS_INDEPENDENT_EXACT_FORWARD' --has "REAL VERIFIER: ACCEPT" + cat "$OUT/logs/b128tab.log"; [ "$(cat "$OUT/logs/b128tab.rc")" = 0 ] || echo "FAIL M.table run exited nonzero" + if [ "${HM_FULL:-0}" = 1 ]; then + run regen B159 env PAIRS_OUT=$OUT/logs/pairs-regen.json.gz $PY -B mdl.py + ( cd "$HM_ROOT/cards/B159" && $PY -B -c " +import os +from pairsio import load_pairs +a=load_pairs(os.environ['HM_ROOT']+'/inputs/derived/pairs.json.gz'); b=load_pairs('$OUT/logs/pairs-regen.json.gz') +print('REGEN-EQUAL', a==b)" > "$OUT/logs/regen2.log" 2>&1; echo $? > "$OUT/logs/regen2.rc" ) + chk P.table-regenerated regen2 --has "REGEN-EQUAL True" + fi +} +for g in g1 g2 g3 g4; do ( $g > "$OUT/$g.out" 2>&1; echo $? > "$OUT/$g.rc" ) & done +wait +status=0; npass=0; nfail=0 +for g in g1 g2 g3 g4; do + echo "== $g"; sed 's/^/ /' "$OUT/$g.out" + p=$(grep -c '^PASS' "$OUT/$g.out"); f=$(grep -c '^FAIL' "$OUT/$g.out") + npass=$((npass + p)); nfail=$((nfail + f)) + if [ "$(cat "$OUT/$g.rc")" != 0 ] || [ "$f" != 0 ] || [ "$p" = 0 ]; then echo " FAILED: $g (exit $(cat "$OUT/$g.rc"), $f FAIL lines)"; status=1; fi +done +echo "== done in $((SECONDS - T0))s: $((npass + 2)) PASS (2 in step 0), $nfail FAIL; logs in $OUT" +exit $status