diff --git a/research/seed48-p120-orthogonal-shared-total/CLAIM.json b/research/seed48-p120-orthogonal-shared-total/CLAIM.json new file mode 100644 index 0000000000..92ee99bb17 --- /dev/null +++ b/research/seed48-p120-orthogonal-shared-total/CLAIM.json @@ -0,0 +1,44 @@ +{ + "assignment_seed": 48, + "track": "structural decoder research", + "base_commit": "bce54fb3f895cbe5cd4c0eb477c3afeed100190f", + "coordination": "No pinned sprint coordination issue was found; claim recorded locally. Refreshed overlap at 2026-10-13T23:43:55Z covered 847 open PRs and 94 discussions, complete pagination, no warnings. PR #1366 is the predecessor for one odd-pair pencil (e=L51,d0=L1). No claim for the seed-selected orthogonal pair e=L48,d0=L91 was found.", + "scope": "For the full P120 E8 root set and labels, set e=L_48 and choose d0=L_91 as the seed-selected 49th entry (zero-based index 48) of the sorted 63 orthogonal roots. Enumerate every target/nonzero F2^9 sink row in the calibrated one-row family, then every distinct-target pair with one shared d0 correction total.", + "changed_restriction": "Change the fixed relative geometry from PR #1366's odd pair =2 to an orthogonal pair =0, and use a separately implemented exact enumerator.", + "method": "Reconstruct the pinned root/label certificate independently; enumerate rows with exact Fraction arithmetic and bitset label supports; filter consistent rational calibrators and nonzero diagonals; test total availability, cross-target diagonal effects, and all row equations for every distinct-target pair.", + "optimistic_cost": "One rank-one shared total plus eight rank-eight coordinate totals costs 65 COPY-rank units in the complete local unit. This is seven below the P120 all-pairs floor 72, before claiming any full supplier or recursive improvement.", + "expected_deliverable": "A source-pinned research package with the independent exact P120 orthogonal-pencil census, proof of the pair obstruction or a fully checked exact witness, the P112 C.6 positive control, and mutation controls.", + "stop_rule": "Exhaust all 120 targets x 511 nonzero labels and all distinct-target pairs in the stated filtered family; stop after the exact census, control replays, and one final package check. Do not search other e,d0 geometries.", + "expected_finish_utc": "2026-10-14T00:15:00Z", + "preliminary_replay": "Using the predecessor's verifier functions as triage only for e=48,d0=91 found 65 nodes, 2,048 distinct-target pairs, 1,056 shared-total-available pairs, and zero exact pairs. Independent replay remains outstanding.", + "candidate_tasks": [ + { + "task": "Orthogonal P120 pencil e=L48,d0=L91 with one shared total", + "decision": "chosen", + "reason": "This changes the root-pair geometry from the completed PR #1366 odd-pair case and has a fully priced local upside: 65 versus the 72-copy all-pairs P120 floor. The finite row/pair domain is small enough to exhaust exactly." + }, + { + "task": "Global rank-eight masked rigidity on the P104 class of size 28", + "decision": "rejected", + "reason": "PR #1292 establishes only local rigidity and leaves this global question open, but classifying distant components is broader than the bounded session and the complete copy bill for a candidate component is not yet favorable." + }, + { + "task": "Rank-nine single odd-entry completion on P104", + "decision": "rejected", + "reason": "The active claim #1360 studies arbitrary rank-nine factorizations of the corresponding P112 one-entry completion; PR #1320 and PR #1331 cover nearby P112 co-star and free-rectangle cases. This is too close to the active one-entry overcomplete line for this seed." + } + ], + "predecessors": [ + "PR #1366 / discussion result: calibrated two-target diagonal obstruction for P120 e=L51,d0=L1, plus P112 C.6 positive control.", + "PR #968: P120 all-pairs copy-rank floor 72 and P104 frame-pair geometry.", + "PR #1292: local masked P104 rank-eight rigidity; global off-orbit cases remain open." + ], + "result": { + "status": "completed negative result", + "completed_utc": "2026-10-13T23:54:12Z", + "pull_request": "https://github.com/CrocSwap/integer-mult-bounds/pull/1386", + "package_commit": "41f06d17bd5693bcd7529eed18f96cae06f3e647", + "finding": "For the seed-selected orthogonal P120 pencil e=L48,d0=L91, every one of 1,056 shared-total-available calibrated row pairs cancels at least one target diagonal; the exact pair count is zero.", + "verification": "Independent exact replay passed, including PR1366 odd-pair regression, full P112 C.6 positive unit, total-source deletion control, label mutation control, source pins, and package metadata." + } +} diff --git a/research/seed48-p120-orthogonal-shared-total/LICENSE b/research/seed48-p120-orthogonal-shared-total/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/seed48-p120-orthogonal-shared-total/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/seed48-p120-orthogonal-shared-total/NOTICE.md b/research/seed48-p120-orthogonal-shared-total/NOTICE.md new file mode 100644 index 0000000000..cd22d6b3c2 --- /dev/null +++ b/research/seed48-p120-orthogonal-shared-total/NOTICE.md @@ -0,0 +1,9 @@ +`vendor/seed51/certificate.tsv` is copied from +`CrocSwap/integer-mult-bounds` commit +`21046cb8fa0d4f0e9b2f826ba71e01baaf9be02c`, the P120 root/label table used in +PR #1366. Its Git blob and SHA-256 are recorded in `SOURCES.json`. The source +contributor is Cinna Davis. The repository license and retained attribution +apply; this new package is under Apache-2.0. + +Contributor: 1337isnot1337. Prepared with substantial OpenAI Codex assistance; +no independent human review is claimed. diff --git a/research/seed48-p120-orthogonal-shared-total/PROOF.md b/research/seed48-p120-orthogonal-shared-total/PROOF.md new file mode 100644 index 0000000000..f8191af861 --- /dev/null +++ b/research/seed48-p120-orthogonal-shared-total/PROOF.md @@ -0,0 +1,101 @@ +# Exact obstruction for the seed-selected orthogonal pencil + +## Fixed certificate and pencil + +The input is the source-pinned 120-row root/label table from PR #1366. The +checker verifies 120 distinct integer roots of squared norm four, integral +half-Gram entries in `{-1,0,1,2}`, diagonal Gram value two, and all 14,400 +label-pair identities + +\[ + u_s\cdot u_t = 1 + G_{st}\pmod 2,\qquad G_{st}=\langle L_s,L_t\rangle/2. +\] + +Set `e=L_48`. There are 63 indices `j` with `j != 48` and +`=0`. Sorting those source indices and taking index `48 mod 63` +selects `d0=L_91`. The computed inner product is zero. + +For each port `s`, define the exact integers + +\[ + p_e(s)=\langle L_s,e\rangle,\qquad + p_d(s)=\langle L_s,d0\rangle. +\] + +## Row and total conditions + +For target `t` and nonzero sink word `w` in `F_2^9`, let + +\[ + Z(t,w)=\{s:u_s\cdot w=1\pmod2\}. +\] + +Keep rows with `t in Z(t,w)` and `w != u_t`. A calibrated row has one nonempty +set of rational ratios + +\[ + \left\{-p_d(s)/p_e(s): s\in Z(t,w),\ s\ne t,\ p_e(s)\ne0\right\}. +\] + +Call its unique value `mu_t`, and require the uncorrected target diagonal +`p_d(t)+mu_t p_e(t)` to be nonzero. The off-target coefficients that the +`d0`-direction total must cancel are + +\[ + E(t,w)=\{s\in Z(t,w):s\ne t,\ p_e(s)=0,\ p_d(s)\ne0\}. +\] + +For two rows `a=(t_a,w_a)` and `b=(t_b,w_b)`, the single total has source set +`Q=E_a union E_b`. It can be read at both sinks exactly when +`E_a subset Z_b` and `E_b subset Z_a`. The modified row coefficient is + +\[ + N_t(s)=p_d(s)+\mu_t p_e(s)-p_d(s)\,\mathbf 1_{s\in Q}. +\] + +If `t_a in E_b`, then by definition `p_e(t_a)=0` and `p_d(t_a) != 0`; also +`t_a in Q`. Hence + +\[ + N_{t_a}(t_a)=p_d(t_a)+\mu_a\cdot0-p_d(t_a)=0, +\] + +which violates the nonzero target-diagonal requirement. The same implication +holds with `a` and `b` exchanged. Thus every available shared-total pair must +avoid both cross-target memberships to be exact. + +## Complete finite census + +The checker tests all `120 * 511 = 61,320` target/word pairs and uses exact +`Fraction` ratios. It finds: + +| Stage | Count | +|---|---:| +| Rows with target in sink support and nonbaseline sink word | 30,600 | +| Rows with one nonempty rational calibrator | 190 | +| Rows whose pre-total target diagonal is nonzero | 65 | +| Distinct-target pairs among those rows | 2,048 | +| Pairs for which the union total is available at both sinks | 1,056 | +| Available pairs with both targets contaminated | 1,024 | +| Available pairs with exactly one target contaminated | 32 | +| Available pairs with no target contaminated | 0 | +| Exact pairs | 0 | + +The script checks the source/target equations for every available pair in +addition to the diagonal obstruction. Therefore the negative result is exact +for this finite calibrated one-total family; it is not inferred from sampling. + +## Controls and boundaries + +The same implementation replays PR #1366's `e=L_51`, `d0=L_1` control: 27 +rows, 351 available pairs, all 351 with both target diagonals contaminated. +It also finds the published P112 C.6 positive control (`e=L_0`, `d0=L_76`): +targets 75 and 76, sink words 329 and 438, and a 24-source shared total. The +checker verifies the full 112-by-112 unit and confirms that deleting one +required total source breaks it. A mutated label is rejected by the pairing +identity check. + +The result does not cover uncalibrated rows, other total vectors or scalars, +more than one total, another orthogonal pair, rank-nine factorizations, other +punctures, or the full complex supplier. The selected conditional κ remains +unchanged. diff --git a/research/seed48-p120-orthogonal-shared-total/README.md b/research/seed48-p120-orthogonal-shared-total/README.md new file mode 100644 index 0000000000..c388e87979 --- /dev/null +++ b/research/seed48-p120-orthogonal-shared-total/README.md @@ -0,0 +1,77 @@ +# Orthogonal P120 pencil: one shared total still loses a target diagonal + +**Status: scoped negative result. No exact decoder, supplier, or new κ is +claimed.** This seed changes the relative root geometry in the calibrated +two-target shared-total experiment of [PR #1366](https://github.com/CrocSwap/integer-mult-bounds/pull/1366). + +## Finding + +Using the pinned P120 root/label certificate, seed 48 selects `e = L_48` and +`d0 = L_91`: `d0` is item 49 (zero-based index 48) in the sorted list of 63 +roots orthogonal to `e`. Thus ` = 0`, while PR #1366's fixed pencil has +` = 2`. + +The exact census finds 65 calibrated, nonzero-diagonal row candidates and +2,048 distinct-target pairs. Of those, 1,056 can read the union correction +total at both sinks. Every available pair includes at least one target in the +other row's correction set: 1,024 contaminate both target diagonals and 32 +contaminate one. That diagonal is then exactly zero. No pair in this finite +family is an exact decoder. + +The geometry change matters because a successful pair would use one rank-one +shared total plus eight rank-eight coordinate totals, an optimistic local bill +of 65 COPY-rank units against the P120 all-pairs floor of 72. The census finds +no such unit. This does not bound other orthogonal pencils, uncalibrated rows, +different total directions, or multiple totals, and it does not change the +selected κ. + +## Reproduce + +From the repository root, using Python 3.12+ and the standard library: + +```sh +python3 -I -B research/seed48-p120-orthogonal-shared-total/verify.py +``` + +Expected final marker: + +```text +PASS_P120_ORTHOGONAL_SHARED_TOTAL: no exact pair in the complete calibrated one-total family; no new kappa +``` + +The checker validates the pinned root, Gram, and label data; derives the +seed-selected orthogonal pencil; exhausts all 120 targets and 511 nonzero +sink labels; and checks every eligible pair exactly. It also replays PR #1366's +odd-pair obstruction, the P112 C.6 exact positive control, and two negative +controls. See [PROOF.md](PROOF.md) for the diagonal argument and scope. + +## Scope + +- **This pencil only.** The result is for `e=L_48`, `d0=L_91`, the 120-port + certificate, rows with one consistent nonempty rational calibrator, and a + single shared correction total equal to the `d0` direction. +- **No complete supplier claim.** The 65-unit figure is only the favorable + local COPY bill that this family would have if an exact pair existed. No + pair exists here, and no recursive profile or κ is derived. + +## Open next questions + +- **Next question:** does any other orthogonal P120 pencil avoid the + cross-target diagonal obstruction? A first step is to orbit-classify ordered + orthogonal pairs under the E8 stabilizer, then replay one representative per + class. The blocker is a certified orbit reduction and a complete cost + argument for any surviving pair. +- **Next question:** can two distinct correction totals preserve both target + diagonals? A first step is to specify their coefficients and source sets and + derive the exact cost before searching. The blocker is a bound on the number + and copy rank of those totals. + +## Attribution + +The P120 root/label table and calibrated row model come from Cinna Davis's +PR #1366 (seed 51). That result covered `e=L_51`, `d0=L_1` with odd inner +product; this note changes to a seed-selected orthogonal pair and uses an +independently written enumerator. Credit PR #968 for the E8 frame-pair geometry +and copy-rank floor, and the `format-limits` C.6 review for the 65-unit +two-target cost convention. This package was prepared with substantial +OpenAI Codex assistance; no independent human review is claimed. diff --git a/research/seed48-p120-orthogonal-shared-total/RESULT.json b/research/seed48-p120-orthogonal-shared-total/RESULT.json new file mode 100644 index 0000000000..abf69e4c0f --- /dev/null +++ b/research/seed48-p120-orthogonal-shared-total/RESULT.json @@ -0,0 +1,41 @@ +{ + "status": "scoped negative result", + "seed": 48, + "track": "structural decoder research", + "base_commit": "bce54fb3f895cbe5cd4c0eb477c3afeed100190f", + "predecessor_commit": "21046cb8fa0d4f0e9b2f826ba71e01baaf9be02c", + "pull_request": "https://github.com/CrocSwap/integer-mult-bounds/pull/1386", + "object": { + "ports": 120, + "e_index": 48, + "d0_index": 91, + "inner_product": 0, + "orthogonal_candidates": 63, + "selection_rule": "sorted orthogonal root indices, index seed mod 63" + }, + "domain": { + "targets": 120, + "nonzero_sink_words_per_target": 511, + "target_word_pairs_tested": 61320, + "distinct_target_pairs_after_row_filter": 2048, + "shared_total_available_pairs": 1056 + }, + "finding": { + "calibrated_nonzero_diagonal_rows": 65, + "pairs_with_both_target_diagonals_cancelled": 1024, + "pairs_with_one_target_diagonal_cancelled": 32, + "pairs_with_no_target_diagonal_cancelled": 0, + "exact_pairs": 0 + }, + "positive_control": "P112 C.6 full 112x112 unit: targets 75,76; sink words 329,438; shared total size 24.", + "negative_controls": [ + "PR1366 odd-pair P120 regression reproduces 27 rows, 351 available pairs and 351 both-diagonal obstructions.", + "Removing one required source from the P112 shared total breaks exactness.", + "A mutated label fails the Gram-pairing identity." + ], + "limitations": [ + "Only e=L48,d0=L91 and the calibrated one-total family are covered.", + "No exact decoder, complete supplier, recursive profile, or new kappa is claimed.", + "Other orthogonal pairs, uncalibrated rows, alternate totals and rank-nine factorizations remain open." + ] +} diff --git a/research/seed48-p120-orthogonal-shared-total/SOURCES.json b/research/seed48-p120-orthogonal-shared-total/SOURCES.json new file mode 100644 index 0000000000..5baf72f736 --- /dev/null +++ b/research/seed48-p120-orthogonal-shared-total/SOURCES.json @@ -0,0 +1,86 @@ +{ + "schema_version": 1, + "base_commit": "bce54fb3f895cbe5cd4c0eb477c3afeed100190f", + "files": [ + { + "path": "CONTRIBUTING.md", + "usage": "provenance", + "git_blob": "e51435543687f1bd88ab22248082dc689ce8b853", + "sha256": "df5b5646602f42cb5da5844f04ac925182ddcd0f627b9de1c96a5095bb7a277a" + }, + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32" + }, + { + "path": "docs/research/current-status.md", + "usage": "provenance", + "git_blob": "aa3cf49715cd367ad8c4e63ab28856fc0d19794f", + "sha256": "1f59d648763c77d574d18dc59ea8bf62d2ee74aaed3c202c9c8cfa4f901badbd" + }, + { + "path": "docs/research/pr-ledger.md", + "usage": "provenance", + "git_blob": "4331ba3175b3418f70fb5cf7ee9689b3505c0678", + "sha256": "8030b58f708e40aee4e40f950a20a0b0ccef3f92b08e6e089fe35db82ec027e6" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "c05fafaa25ba95b2d5af86b1800427198e3d20eb", + "sha256": "89b5928bc92c81e2647b6d702a7ad85a6795b8f44e2eb267b2ff3145d8f2b2ce" + }, + { + "path": "docs/research/community-batch1099-review.md", + "usage": "provenance", + "git_blob": "6cb6ec061a071a06a2d18cd4dc3e9a2b05d28099", + "sha256": "7e76d2c38e5fce30587835b7251df1430488ae4dd372611ef69a3f03f476b6cb" + }, + { + "path": "research/community-frontier1094-audit/SELECTED-SOURCE.json", + "usage": "provenance", + "git_blob": "6a75493790b4eff9c4a98051ef8b01d6aad0d5a8", + "sha256": "79b3de5db3dbcb9829789ba58e9e45758926031e2a7d80667a08429d369be53b" + }, + { + "path": "research/community-frontier1094-audit/ASSEMBLY.json", + "usage": "provenance", + "git_blob": "5fd676df060f3b450782fdf5ff5f6beb63a5eeb0", + "sha256": "1122cb3a575f8c788345fc1bf4c108ac7c3250fb81a5988671f5eb04b3ab3045" + }, + { + "path": "research/format-limits/README.md", + "usage": "provenance", + "git_blob": "2f7aaf5b8225717394fe6adda6b313026eaf8090", + "sha256": "0fa0d6b2df96ddc06b876c41c5fa8d2335b97f36bc8f17d1371296d23199c263" + }, + { + "path": "research/complex-frame-pair-decoders/README.md", + "usage": "provenance", + "git_blob": "be5bbbee8e30a4ee39fa513896e8fc7e0bb3721e", + "sha256": "edd848b0177dc73a6e2646d4fd82f0b2ceae37e642bf19d6af602579a041a57e" + }, + { + "path": "research/complex-frame-pair-decoders/PROOF.md", + "usage": "provenance", + "git_blob": "889f3a653ed1bdbb7df61ebe3af4f2103602a1f4", + "sha256": "ba53c1d8a9bc2d935d546bde46ca7341bd65f8515013e07b073296b4db2a9a74" + } + ], + "external_sources": [ + { + "repository": "CrocSwap/integer-mult-bounds", + "commit": "21046cb8fa0d4f0e9b2f826ba71e01baaf9be02c", + "files": [ + { + "source_path": "research/p120-calibrated-two-target-seed51/certificate.tsv", + "vendored_path": "research/seed48-p120-orthogonal-shared-total/vendor/seed51/certificate.tsv", + "git_blob": "38629ccf4b6e9bfa45e09488d66cc89aab577ad7", + "sha256": "61f903f72551d3aa8f70bc5774ee28d163fd72ca09a430e7403008ba269f2494" + } + ] + } + ] +} diff --git a/research/seed48-p120-orthogonal-shared-total/TASK.json b/research/seed48-p120-orthogonal-shared-total/TASK.json new file mode 100644 index 0000000000..f425881203 --- /dev/null +++ b/research/seed48-p120-orthogonal-shared-total/TASK.json @@ -0,0 +1,67 @@ +{ + "schema_version": 1, + "task_id": "complex-masked-decoder", + "priority_revision": 2, + "base_commit": "bce54fb3f895cbe5cd4c0eb477c3afeed100190f", + "original_card": { + "id": "complex-masked-decoder", + "question": "Can one specified masked or overcomplete decoder improve the complete moment budget?", + "starting_points": [ + "research/complex-decoder-field-extension-seed44/README.md", + "research/complex-frame-pair-decoders/README.md" + ], + "methods": [ + "Synthesize a decoder with exact coefficients and fully priced helper endpoints.", + "Bound the best possible budget for a fixed support alphabet before synthesis." + ], + "acceptance_gate": "Change an assumption of the eight-term all-pairs bound and count all copied information, frames and restoration.", + "first_step": { + "command": [ + "python3", + "-B", + "research/complex-decoder-field-extension-seed44/verify.py" + ], + "expected": "PASS_COMPLEX_DECODER_FIELD_EXTENSION_S44", + "inspect": "Locate the excluded classes: masked identities, at least nine terms, and deeper punctures.", + "scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay." + }, + "first_experiment": "Choose one finite support alphabet and test exact decoding constraints before building a whole network.", + "bottleneck_link": "A cheaper fully realized decoder could increase deficit or lower recursive cost on the binding complex side.", + "allowed_variations": [ + "Select a specific masked or overcomplete family with exact labels and supports." + ], + "scope_change_triggers": [ + "Repeating the exact eight-term all-pairs search inside its proved scope." + ], + "overlap_terms": [ + "masked decoder", + "overcomplete", + "eight-term" + ] + }, + "scope_status": "refined", + "actual_scope": "For the full P120 root/label certificate, enumerate the calibrated one-row family and all distinct-target pairs for one shared d0-direction total at the seed-selected orthogonal pencil e=L48, d0=L91.", + "scope_change_reason": "The original complex-masked-decoder card asks for a specified masked family; this refinement changes the relative root geometry from PR1366\u2019s odd pair to one seed-selected orthogonal pair and fully exhausts that finite subfamily.", + "bottleneck_link": "An exact unit would have local COPY cost 65, seven below the P120 all-pairs floor 72. The exact negative result rules out that potential saving for this orthogonal pencil and total rule only.", + "budget_minutes": 60, + "stop_rule": "Exhaust all 120 targets and 511 nonzero sink words, then all distinct-target pairs in the calibrated one-total family; verify the PR1366 regression, P112 C.6 positive control and controls. Do not search other pencils or total rules.", + "outcome": "negative-result", + "evidence": "Independent exact enumeration finds 65 nonzero-diagonal calibrated rows and 2,048 distinct-target pairs. Of 1,056 pairs where the union total is available at both sinks, all have at least one cross-target diagonal cancellation (1,024 both, 32 one); exact pair count is zero. The P112 C.6 full-unit positive control and mutation controls pass.", + "author": "1337isnot1337", + "ai_assistance": "Substantial OpenAI Codex assistance in task scoping, exact enumeration, proof analysis and package preparation; no independent human review claimed.", + "open_questions": [ + { + "question": "Does any other orthogonal P120 root-pair orbit admit an exact shared-total pair?", + "why_it_matters": "A surviving orbit could realize the 65-versus-72 local COPY opportunity not available in this seed-selected case.", + "first_step": "Classify ordered orthogonal root pairs under the E8 stabilizer and replay one representative per orbit.", + "blocked_by": "A checked orbit reduction and complete cost model for any surviving pair." + }, + { + "question": "Can distinct correction totals preserve both target diagonals when one shared d0 total cannot?", + "why_it_matters": "Changing the number or direction of totals changes the current pairwise cross-target obstruction.", + "first_step": "Specify the totals, coefficients and sink source sets, then derive their exact copy-rank cost before enumerating.", + "blocked_by": "A favorable cost budget for the extra totals." + } + ], + "no_open_questions_reason": "" +} diff --git a/research/seed48-p120-orthogonal-shared-total/VALIDATION.json b/research/seed48-p120-orthogonal-shared-total/VALIDATION.json new file mode 100644 index 0000000000..53f90052aa --- /dev/null +++ b/research/seed48-p120-orthogonal-shared-total/VALIDATION.json @@ -0,0 +1,31 @@ +{ + "status": "passed locally; PR #1386 open; CI pending after the final claim update", + "base_commit": "bce54fb3f895cbe5cd4c0eb477c3afeed100190f", + "predecessor_commit": "21046cb8fa0d4f0e9b2f826ba71e01baaf9be02c", + "local_python": "3.14.7", + "manifest_python": "3.12", + "local_python_note": "Python 3.12 is not installed here. The standard-library verifier passed on Python 3.14.7; VERIFY.json registers the repository's Python 3.12 replay.", + "commands": [ + "python3 -I -B research/seed48-p120-orthogonal-shared-total/verify.py", + "python3 scripts/research_package.py --package research/seed48-p120-orthogonal-shared-total --check-only" + ], + "expected_final_marker": "PASS_P120_ORTHOGONAL_SHARED_TOTAL: no exact pair in the complete calibrated one-total family; no new kappa", + "pull_request": "https://github.com/CrocSwap/integer-mult-bounds/pull/1386", + "results": [ + "PASS_SOURCE_AND_E8_CERTIFICATE: roots=120 labels=F2^9 pairings=14400", + "PASS_P120_ORTHOGONAL_SHARED_TOTAL: 65 calibrated rows; 1,056 available pairs; 1,024 both-target and 32 one-target diagonal obstructions; zero exact pairs", + "PASS_PR1366_REGRESSION: odd-pair 27 rows, 351 available pairs, 351 both-diagonal obstructions", + "PASS_P112_C6_CONTROL: exact full 112x112 unit, targets 75/76, sink words 329/438, total size 24", + "PASS_NEGATIVE_CONTROLS: required-total-source removal and label mutation detected", + "PASS_PACKAGE_METADATA_AND_PINS (not a mathematical acceptance check)", + "PASS_ALL_PACKAGE_JSON" + ], + "overlap_refresh": { + "checked_at_utc": "2026-10-13T23:53:35Z", + "open_prs": 853, + "discussions": 100, + "pagination_complete": true, + "warnings": [], + "direct_overlap": "PR #1366 is the only direct shared-total result match; it covers the odd-pair predecessor e=L51,d0=L1. The other remote match was a routine start-here coordination comment. No orthogonal e=L48,d0=L91 claim was found. The active P112 rank-nine single-entry claim #1360 and PR #1320/#1323 remain adjacent but distinct scopes." + } +} diff --git a/research/seed48-p120-orthogonal-shared-total/VERIFY.json b/research/seed48-p120-orthogonal-shared-total/VERIFY.json new file mode 100644 index 0000000000..47a77ed316 --- /dev/null +++ b/research/seed48-p120-orthogonal-shared-total/VERIFY.json @@ -0,0 +1,21 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/seed48-p120-orthogonal-shared-total/vendor/seed51/certificate.tsv" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 300, + "checks": "Base and predecessor source hashes; all root/Gram/label data; the seed-selected orthogonal P120 census over 120x511 rows and all distinct-target pairs; PR1366 regression; P112 C.6 full-unit positive control; total-source and label-mutation negative controls." + } + ] +} diff --git a/research/seed48-p120-orthogonal-shared-total/vendor/seed51/certificate.tsv b/research/seed48-p120-orthogonal-shared-total/vendor/seed51/certificate.tsv new file mode 100644 index 0000000000..38629ccf4b --- /dev/null +++ b/research/seed48-p120-orthogonal-shared-total/vendor/seed51/certificate.tsv @@ -0,0 +1,123 @@ +# schema=1 +#! seed=51 track=structural-decoder ports=P120 e_index=51 d0_index=1 +#! columns=index root8_csv label9_bits +0 2,0,0,0,0,0,0,0 100000000 +1 0,2,0,0,0,0,0,0 111000000 +2 0,0,2,0,0,0,0,0 111110000 +3 0,0,0,2,0,0,0,0 100110000 +4 0,0,0,0,2,0,0,0 111111100 +5 0,0,0,0,0,2,0,0 100111100 +6 0,0,0,0,0,0,2,0 100001100 +7 0,0,0,0,0,0,0,2 111001100 +8 0,0,0,0,1,1,1,1 100110110 +9 0,0,0,0,1,1,1,-1 100000101 +10 0,0,0,0,1,1,-1,1 111000101 +11 0,0,0,0,1,1,-1,-1 111110110 +12 0,0,0,0,1,-1,1,1 111110101 +13 0,0,0,0,1,-1,1,-1 111000110 +14 0,0,0,0,1,-1,-1,1 100000110 +15 0,0,0,0,1,-1,-1,-1 100110101 +16 0,0,1,1,0,0,1,1 100101000 +17 0,0,1,1,0,0,1,-1 100011011 +18 0,0,1,1,0,0,-1,1 111011011 +19 0,0,1,1,0,0,-1,-1 111101000 +20 0,0,1,-1,0,0,1,1 111100111 +21 0,0,1,-1,0,0,1,-1 111010100 +22 0,0,1,-1,0,0,-1,1 100010100 +23 0,0,1,-1,0,0,-1,-1 100100111 +24 0,0,1,1,1,1,0,0 100100001 +25 0,0,1,1,1,-1,0,0 111100010 +26 0,0,1,1,-1,1,0,0 100100010 +27 0,0,1,1,-1,-1,0,0 111100001 +28 0,0,1,-1,1,1,0,0 111101110 +29 0,0,1,-1,1,-1,0,0 100101101 +30 0,0,1,-1,-1,1,0,0 111101101 +31 0,0,1,-1,-1,-1,0,0 100101110 +32 0,1,0,1,0,1,0,1 101100000 +33 0,1,0,1,0,1,0,-1 101010011 +34 0,1,0,1,0,-1,0,1 110100011 +35 0,1,0,1,0,-1,0,-1 110010000 +36 0,1,0,-1,0,1,0,1 110101111 +37 0,1,0,-1,0,1,0,-1 110011100 +38 0,1,0,-1,0,-1,0,1 101101100 +39 0,1,0,-1,0,-1,0,-1 101011111 +40 0,1,0,1,1,0,1,0 101011001 +41 0,1,0,1,1,0,-1,0 110101010 +42 0,1,0,1,-1,0,1,0 101011010 +43 0,1,0,1,-1,0,-1,0 110101001 +44 0,1,0,-1,1,0,1,0 110010110 +45 0,1,0,-1,1,0,-1,0 101100101 +46 0,1,0,-1,-1,0,1,0 110010101 +47 0,1,0,-1,-1,0,-1,0 101100110 +48 0,1,1,0,0,1,1,0 101001011 +49 0,1,1,0,0,1,-1,0 110111000 +50 0,1,1,0,0,-1,1,0 110001000 +51 0,1,1,0,0,-1,-1,0 101111011 +52 0,1,-1,0,0,1,1,0 101000100 +53 0,1,-1,0,0,1,-1,0 110110111 +54 0,1,-1,0,0,-1,1,0 110000111 +55 0,1,-1,0,0,-1,-1,0 101110100 +56 0,1,1,0,1,0,0,1 110110010 +57 0,1,1,0,1,0,0,-1 110000001 +58 0,1,1,0,-1,0,0,1 110110001 +59 0,1,1,0,-1,0,0,-1 110000010 +60 0,1,-1,0,1,0,0,1 110111101 +61 0,1,-1,0,1,0,0,-1 110001110 +62 0,1,-1,0,-1,0,0,1 110111110 +63 0,1,-1,0,-1,0,0,-1 110001101 +64 1,0,0,1,0,1,1,0 010000000 +65 1,0,0,1,0,1,-1,0 001110011 +66 1,0,0,1,0,-1,1,0 001000011 +67 1,0,0,1,0,-1,-1,0 010110000 +68 1,0,0,-1,0,1,1,0 001001111 +69 1,0,0,-1,0,1,-1,0 010111100 +70 1,0,0,-1,0,-1,1,0 010001100 +71 1,0,0,-1,0,-1,-1,0 001111111 +72 1,0,0,1,1,0,0,1 001111001 +73 1,0,0,1,1,0,0,-1 001001010 +74 1,0,0,1,-1,0,0,1 001111010 +75 1,0,0,1,-1,0,0,-1 001001001 +76 1,0,0,-1,1,0,0,1 010110110 +77 1,0,0,-1,1,0,0,-1 010000101 +78 1,0,0,-1,-1,0,0,1 010110101 +79 1,0,0,-1,-1,0,0,-1 010000110 +80 1,0,1,0,0,1,0,1 001101011 +81 1,0,1,0,0,1,0,-1 001011000 +82 1,0,1,0,0,-1,0,1 010101000 +83 1,0,1,0,0,-1,0,-1 010011011 +84 1,0,-1,0,0,1,0,1 001100100 +85 1,0,-1,0,0,1,0,-1 001010111 +86 1,0,-1,0,0,-1,0,1 010100111 +87 1,0,-1,0,0,-1,0,-1 010010100 +88 1,0,1,0,1,0,1,0 001010010 +89 1,0,1,0,1,0,-1,0 010100001 +90 1,0,1,0,-1,0,1,0 001010001 +91 1,0,1,0,-1,0,-1,0 010100010 +92 1,0,-1,0,1,0,1,0 001011101 +93 1,0,-1,0,1,0,-1,0 010101110 +94 1,0,-1,0,-1,0,1,0 001011110 +95 1,0,-1,0,-1,0,-1,0 010101101 +96 1,1,0,0,0,0,1,1 000010011 +97 1,1,0,0,0,0,1,-1 000100000 +98 1,1,0,0,0,0,-1,1 011100000 +99 1,1,0,0,0,0,-1,-1 011010011 +100 1,-1,0,0,0,0,1,1 000101100 +101 1,-1,0,0,0,0,1,-1 000011111 +102 1,-1,0,0,0,0,-1,1 011011111 +103 1,-1,0,0,0,0,-1,-1 011101100 +104 1,1,0,0,1,1,0,0 000011010 +105 1,1,0,0,1,-1,0,0 011011001 +106 1,1,0,0,-1,1,0,0 000011001 +107 1,1,0,0,-1,-1,0,0 011011010 +108 1,-1,0,0,1,1,0,0 000100101 +109 1,-1,0,0,1,-1,0,0 011100110 +110 1,-1,0,0,-1,1,0,0 000100110 +111 1,-1,0,0,-1,-1,0,0 011100101 +112 1,1,1,1,0,0,0,0 000000100 +113 1,1,1,-1,0,0,0,0 011001011 +114 1,1,-1,1,0,0,0,0 000001011 +115 1,1,-1,-1,0,0,0,0 011000100 +116 1,-1,1,1,0,0,0,0 000111011 +117 1,-1,1,-1,0,0,0,0 011110100 +118 1,-1,-1,1,0,0,0,0 000110100 +119 1,-1,-1,-1,0,0,0,0 011111011 diff --git a/research/seed48-p120-orthogonal-shared-total/verify.py b/research/seed48-p120-orthogonal-shared-total/verify.py new file mode 100644 index 0000000000..38cbfde51a --- /dev/null +++ b/research/seed48-p120-orthogonal-shared-total/verify.py @@ -0,0 +1,272 @@ +#!/usr/bin/env python3 +"""Exact P120 census for one orthogonal root-pencil shared-total decoder family.""" +from fractions import Fraction +from hashlib import sha1, sha256 +import json +from pathlib import Path +import subprocess + + +ROOT = Path(__file__).resolve().parents[2] +PACKAGE = "research/seed48-p120-orthogonal-shared-total" +MANIFEST = ROOT / PACKAGE / "SOURCES.json" +CERT = ROOT / PACKAGE / "vendor/seed51/certificate.tsv" +SEED = 48 +PORTS = tuple(range(120)) + + +def require(ok, message): + if not ok: + raise SystemExit("FAIL " + message) + + +def blob_id(data): + return sha1(b"blob " + str(len(data)).encode("ascii") + b"\0" + data).hexdigest() + + +def verify_source_pins(manifest): + for row in manifest["files"]: + proc = subprocess.run(["git", "show", manifest["base_commit"] + ":" + row["path"]], + cwd=ROOT, check=True, capture_output=True) + data = proc.stdout + require(sha256(data).hexdigest() == row["sha256"], "base SHA-256 mismatch: " + row["path"]) + require(blob_id(data) == row["git_blob"], "base Git blob mismatch: " + row["path"]) + source = manifest["external_sources"][0]["files"][0] + data = CERT.read_bytes() + require(sha256(data).hexdigest() == source["sha256"], "vendored certificate SHA-256 mismatch") + require(blob_id(data) == source["git_blob"], "vendored certificate Git blob mismatch") + + +def read_certificate(path): + lines = path.read_text().splitlines() + require(lines[:3] == [ + "# schema=1", + "#! seed=51 track=structural-decoder ports=P120 e_index=51 d0_index=1", + "#! columns=index root8_csv label9_bits", + ], "predecessor certificate header changed") + roots, labels = [], [] + for expected, line in enumerate(lines[3:]): + index, root, label = line.split("\t") + require(int(index) == expected and len(label) == 9 and set(label) <= {"0", "1"}, + "malformed root or label certificate row") + roots.append(tuple(int(x) for x in root.split(","))) + labels.append(int(label, 2)) + require(len(roots) == len(labels) == 120 and all(len(row) == 8 for row in roots), + "wrong root/label dimensions") + return roots, labels + + +def dot(a, b): + return sum(x * y for x, y in zip(a, b)) + + +def parity_dot(a, b): + return (a & b).bit_count() & 1 + + +def validate_certificate(roots, labels): + gram = [[dot(a, b) // 2 for b in roots] for a in roots] + require(len(set(roots)) == 120, "duplicate root representatives") + require(all(dot(a, a) == 4 for a in roots), "root norm is not four") + require(all(dot(a, b) % 2 == 0 for a in roots for b in roots), "half-Gram is nonintegral") + require(all(gram[i][i] == 2 for i in PORTS), "wrong Gram diagonal") + require(all(gram[i][j] in (-1, 0, 1) for i in PORTS for j in PORTS if i != j), + "unexpected off-diagonal Gram value") + require(all(parity_dot(labels[i], labels[j]) == ((1 + gram[i][j]) & 1) + for i in PORTS for j in PORTS), "root labels fail a Gram parity") + require(all(0 <= x < 512 for x in labels), "label outside F2^9") + return gram + + +def supports_by_word(labels): + out = [0] * 512 + for word in range(1, 512): + mask = 0 + for source, label in enumerate(labels): + if parity_dot(word, label): + mask |= 1 << source + out[word] = mask + return out + + +def enumerate_rows(ports, roots, labels, support, e_index, d_index): + e, d0 = roots[e_index], roots[d_index] + pe = {s: dot(roots[s], e) for s in ports} + pd = {s: dot(roots[s], d0) for s in ports} + nodes = [] + counts = {"label_eligible": 0, "unique_calibrator": 0, "calibrated": 0, + "nonzero_diagonal": 0} + port_mask = sum(1 << s for s in ports) + for target in ports: + for word in range(1, 512): + z = support[word] & port_mask + if not (z >> target & 1) or word == labels[target]: + continue + counts["label_eligible"] += 1 + ratios = { + Fraction(-pd[s], pe[s]) + for s in ports if s != target and (z >> s & 1) and pe[s] != 0 + } + if len(ratios) > 1: + continue + counts["unique_calibrator"] += 1 + if not ratios: + continue + counts["calibrated"] += 1 + mu = next(iter(ratios)) + if pd[target] + mu * pe[target] == 0: + continue + counts["nonzero_diagonal"] += 1 + correction = 0 + for s in ports: + if s != target and (z >> s & 1) and pe[s] == 0 and pd[s] != 0: + correction |= 1 << s + nodes.append({"target": target, "word": word, "mu": mu, "Z": z, "E": correction}) + return nodes, counts, pe, pd + + +def row_exact(target, mu, total, z, ports, pe, pd): + for s in ports: + coefficient = Fraction(pd[s]) + mu * pe[s] - (pd[s] if total >> s & 1 else 0) + if s == target: + if not (z >> s & 1) or coefficient == 0: + return False + elif (z >> s & 1) and coefficient != 0: + return False + return True + + +def pair_census(nodes, ports, pe, pd): + raw = available = cross_a = cross_b = both = exact_pairs = 0 + no_cross = 0 + for i, a in enumerate(nodes): + for b in nodes[i + 1:]: + if a["target"] == b["target"]: + continue + raw += 1 + if a["E"] & ~b["Z"] or b["E"] & ~a["Z"]: + continue + available += 1 + a_hit = bool(b["E"] >> a["target"] & 1) + b_hit = bool(a["E"] >> b["target"] & 1) + cross_a += a_hit + cross_b += b_hit + both += a_hit and b_hit + no_cross += not a_hit and not b_hit + if a_hit: + require(pe[a["target"]] == 0 and pd[a["target"]] != 0, + "first target is not a forced total cancellation") + require(Fraction(pd[a["target"]]) + a["mu"] * pe[a["target"]] + - pd[a["target"]] == 0, "first contaminated diagonal did not vanish") + if b_hit: + require(pe[b["target"]] == 0 and pd[b["target"]] != 0, + "second target is not a forced total cancellation") + require(Fraction(pd[b["target"]]) + b["mu"] * pe[b["target"]] + - pd[b["target"]] == 0, "second contaminated diagonal did not vanish") + total = a["E"] | b["E"] + exact_a = row_exact(a["target"], a["mu"], total, a["Z"], ports, pe, pd) + exact_b = row_exact(b["target"], b["mu"], total, b["Z"], ports, pe, pd) + exact_pairs += exact_a and exact_b + return {"distinct_target_pairs": raw, "available_pairs": available, + "first_target_contaminated": cross_a, "second_target_contaminated": cross_b, + "both_targets_contaminated": both, "no_target_contaminated": no_cross, + "exact_pairs": exact_pairs} + + +def full_unit_exact(ports, roots, labels, gram, a, b, total, pe, pd): + for target in ports: + word = a["word"] if target == a["target"] else b["word"] if target == b["target"] else labels[target] + for source in ports: + if target == a["target"]: + coefficient = Fraction(pd[source]) + a["mu"] * pe[source] \ + - (pd[source] if total >> source & 1 else 0) + elif target == b["target"]: + coefficient = Fraction(pd[source]) + b["mu"] * pe[source] \ + - (pd[source] if total >> source & 1 else 0) + else: + coefficient = Fraction(gram[target][source], 2) + paired = parity_dot(word, labels[source]) + if target == source: + if not paired or coefficient == 0: + return False + elif paired and coefficient != 0: + return False + return True + + +def first_exact_pair(ports, roots, labels, support, e_index, d_index): + nodes, _, pe, pd = enumerate_rows(ports, roots, labels, support, e_index, d_index) + for i, a in enumerate(nodes): + for b in nodes[i + 1:]: + if a["target"] == b["target"] or a["E"] & ~b["Z"] or b["E"] & ~a["Z"]: + continue + total = a["E"] | b["E"] + if row_exact(a["target"], a["mu"], total, a["Z"], ports, pe, pd) \ + and row_exact(b["target"], b["mu"], total, b["Z"], ports, pe, pd): + return a, b, total, pe, pd + return None, None, None, pe, pd + + +def main(): + manifest = json.loads(MANIFEST.read_text()) + verify_source_pins(manifest) + roots, labels = read_certificate(CERT) + gram = validate_certificate(roots, labels) + support = supports_by_word(labels) + print("PASS_SOURCE_AND_E8_CERTIFICATE: roots=120 labels=F2^9 pairings=14400") + + e_index = SEED + orthogonal = [j for j in PORTS if j != e_index and dot(roots[e_index], roots[j]) == 0] + d_index = orthogonal[SEED % len(orthogonal)] + require(len(orthogonal) == 63 and d_index == 91 and dot(roots[e_index], roots[d_index]) == 0, + "seed-selected orthogonal pencil changed") + nodes, row_counts, pe, pd = enumerate_rows(PORTS, roots, labels, support, e_index, d_index) + require(row_counts == {"label_eligible": 30600, "unique_calibrator": 190, + "calibrated": 190, "nonzero_diagonal": 65} and len(nodes) == 65, + "orthogonal P120 row census changed: " + repr(row_counts)) + census = pair_census(nodes, PORTS, pe, pd) + require(census == {"distinct_target_pairs": 2048, "available_pairs": 1056, + "first_target_contaminated": 1049, "second_target_contaminated": 1031, + "both_targets_contaminated": 1024, "no_target_contaminated": 0, + "exact_pairs": 0}, + "orthogonal P120 pair census changed: " + repr(census)) + print("P120_ORTHOGONAL: e=L48 d0=L91 =0 rows=" + repr(row_counts)) + print("P120_ORTHOGONAL_PAIRS: " + repr(census)) + + # Regression control: independently reproduce the fixed odd-pair case from PR #1366. + odd_nodes, odd_counts, odd_pe, odd_pd = enumerate_rows(PORTS, roots, labels, support, 51, 1) + odd_census = pair_census(odd_nodes, PORTS, odd_pe, odd_pd) + require(odd_counts == {"label_eligible": 30600, "unique_calibrator": 63, + "calibrated": 63, "nonzero_diagonal": 27} and len(odd_nodes) == 27, + "PR #1366 regression row census changed") + require(odd_census["distinct_target_pairs"] == 351 and odd_census["available_pairs"] == 351 + and odd_census["both_targets_contaminated"] == 351 + and odd_census["exact_pairs"] == 0, + "PR #1366 regression pair result changed") + + # Positive control: published P112 C.6 exact two-target unit. + p112 = tuple(range(8, 120)) + a, b, total, pe112, pd112 = first_exact_pair(p112, roots, labels, support, 0, 76) + require(a is not None and b is not None, "P112 C.6 positive control not found") + require((a["target"], a["word"], b["target"], b["word"], total.bit_count()) + == (75, 329, 76, 438, 24), "P112 C.6 witness changed") + require(full_unit_exact(p112, roots, labels, gram, a, b, total, pe112, pd112), + "P112 C.6 full 112-by-112 positive control failed") + altered_total = total & ~(total & -total) + require(not full_unit_exact(p112, roots, labels, gram, a, b, altered_total, pe112, pd112), + "removing one required shared-total source escaped the negative control") + + # Certificate mutation control. + bad_labels = labels[:] + bad_labels[0] ^= 1 + require(any(parity_dot(bad_labels[0], labels[j]) != ((1 + gram[0][j]) & 1) + for j in PORTS), "label mutation control failed") + + print("PASS_PR1366_REGRESSION: odd-pair nodes=27 available=351 both-diagonal obstruction=351") + print("PASS_P112_C6_CONTROL: targets=75,76 sinks=329,438 total_sources=24 full_unit=112x112") + print("PASS_NEGATIVE_CONTROLS: required-total-source removal and label mutation detected") + print("PASS_P120_ORTHOGONAL_SHARED_TOTAL: no exact pair in the complete calibrated one-total family; no new kappa") + + +if __name__ == "__main__": + main()