diff --git a/research/complex-paired26-completion/ATTRIBUTION.md b/research/complex-paired26-completion/ATTRIBUTION.md new file mode 100644 index 0000000000..bcac7c7d87 --- /dev/null +++ b/research/complex-paired26-completion/ATTRIBUTION.md @@ -0,0 +1,43 @@ +# Attribution and scope + +woklerx's [PR1020](https://github.com/CrocSwap/integer-mult-bounds/pull/1020) +supplied the exact puncture, ordered pair (48, 0), cost-six term, support +dimensions (8, 7), and complete rational cost-69 decoder. These are retained +prior work, reproduced with their original normalization. + +Hanson Sun / @bbMisk's [PR1521](https://github.com/CrocSwap/integer-mult-bounds/pull/1521), +with substantial Codex assistance, posed open next question 1. Its results +through 25 punctures motivated this one fixed 26-puncture follow-up. The +annihilator-kernel method and residual duality are credited predecessor +methods. woklerx's PR1077 supplied the complex-support bridge and isotropic +caution; themilkman216's PR968 supplied the real-decoder/F6 context; +DreamingOfClouds's PR717 supplied the pairing/decoder conventions, including +the unit label, ordinary transpose and separate support-rank charges. +Their retained lineage and attribution remain unchanged. + +Prepared for **Andrey Mas**. **GPT-6 Pro**, as identified in the ChatGPT +browser interface, produced the new mathematical investigation, proof, +completion, classification, certificate and both checker implementations. +Codex prepared source briefs, coordinated the scope, audited execution, +authenticated pinned source bytes, replayed the checkers and mechanically +packaged the result. No local mathematical proof repair was performed. + +The new work is the claimed exact minimum 62 and classification for this +fixed object, supported by the 511-functional inventory and exact examples. +The separate audit is algorithmically distinct but was authored in the same +Pro session. Local replay does not constitute a separate mathematical proof +review. A separate GPT-6 Pro written review reports corroboration and its own +finite recomputations, with the exact boundary recorded in REPLAY.json; it +did not audit the supplied programs or prior 69 baseline. The full transferred review was +read; no repair was requested. Its separate programs and logs have not been +retrieved or replayed locally. No human or proof-assistant +review is claimed. + +Original delivered proof/checker/certificate hashes and the archive hash are +recorded in SOURCES.json. Both checker files and the certificate are unchanged; +only the proof's closing runtime/provenance paragraph was updated after +source authentication. Original producer logs remain outside this minimal +package; REPLAY.json records the subsequent observed local executions. + +Coordination: [Discussion 1570](https://github.com/CrocSwap/integer-mult-bounds/discussions/1570). +New material is distributed under Apache License 2.0; see LICENSE. diff --git a/research/complex-paired26-completion/LICENSE b/research/complex-paired26-completion/LICENSE new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/research/complex-paired26-completion/LICENSE @@ -0,0 +1,202 @@ + + 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/complex-paired26-completion/README.md b/research/complex-paired26-completion/README.md new file mode 100644 index 0000000000..6712df1150 --- /dev/null +++ b/research/complex-paired26-completion/README.md @@ -0,0 +1,77 @@ +# Fixed 26-puncture paired-normal completion + +For PR1020's exact 26-line puncture and ordered normal pair (48, 0), this +package supplies a rational eight-term all-pairs decoder with separate COPY +cost **62**, profile **[6,8,8,8,8,8,8,8]**, versus the predecessor's **69**. +The puncture, cost-six first pair and prior 69 decoder are woklerx's work. + +[proof.md](proof.md) gives the claimed matching lower bound for arbitrary +complex coefficients, without the F6 hypothesis, and a classification of +256 optimal classes up to residual paired rescaling and permutation. +Those universal conclusions depend on the written finite-reduction and +compatibility arguments; machine replay verifies their finite premises. +A separate GPT-6 Pro review reports corroboration of the minimum, the 256 +classes and the attained branch bound 67. It independently recomputed the +511 kernels and 1,716 subsets, reconstructed the cost-62 witness and built +its own cost-67 witness. It did not audit the supplied programs or the prior +69 decoder. The full transferred review text was inspected; no repair was requested. +Its separate programs, certificates and logs have not been retrieved or +replayed locally. + +The model fixes all eight terms, the exact first pair including its scaling, +all 8,836 ordered pairs of 94 live roots, the ordinary transpose identity, +and separate binary-rank charges on actual supports. It does not optimize +other punctures or designated pairs. Preparation, frames, restoration, +hosting and physical rank-shape costs are not priced; this is no paid-moment +or kappa improvement. + +## Replay + +Python 3.12, standard library only: + +```sh +python3.12 scripts/research_package.py --package research/complex-paired26-completion +``` + +The registered hook runs both `verify.py` and the separately implemented +`audit.py` under `-I -O -B`, with a 30-second cap each. Direct commands from +this directory are `python3.12 -I -O -B verify.py` and +`python3.12 -I -O -B audit.py`. Success markers are +`PASS_FIXED_PAIRED26_MINIMUM_62` and `PASS_SEPARATE_FRACTION_AUDIT`. + +The primary rebuilds and compares the entire certificate. Both programs +check the 511 functional ranks/kernels, 1,716 candidate seven-subsets, and +all 8,836 entries and actual-support charges for the prior 69, attaining 62, +sharp branch-67 and exact complex cost-63 examples. The 256 count is the +eligible basis-set census, not 256 full entrywise complex replays. +Fourteen primary rejection controls and two complex convention/compatibility +controls remain active under optimization. + +Both programs were written in the same GPT-6 Pro research session; agreement +is not independently authored or human mathematical review. Local Codex +replay on CPython 3.12.14 passed normal and optimized runs, with a fresh +saved-certificate mutation rejected in both modes. [REPLAY.json](REPLAY.json) +records the environment, timings, controls and limits. [SOURCES.json](SOURCES.json) +pins the authenticated source bytes and immutable delivered artifacts. + +## Priority checkpoint + +This is a bounded result from the revision-2 `complex-masked-decoder` +assignment and [Discussion 1570](https://github.com/CrocSwap/integer-mult-bounds/discussions/1570), +changing the predecessor's at-most-25 punctures to one fixed 26-puncture +object. Revision 3 arrived while it was running. The result is retained as a +scoped algebraic checkpoint under that guidance; no favorable fully paid +rank-shape budget has been established. Historical assignment pins remain +historical. TASK.json records both checkpoints and the changed scope. + +## Open next questions + +Does this decoder admit a physical implementation whose fully charged +optimistic moment passes the current priority gate? First specify and price +preparation, frames, restoration and hosting, then test that bound before +network construction. The present COPY-only certificate supplies neither +that interface nor its invoice, so it cannot answer this question. + +Prepared for Andrey Mas with substantial GPT-6 Pro research through ChatGPT +and Codex source coordination, mechanical verification and packaging. +See [ATTRIBUTION.md](ATTRIBUTION.md) for retained predecessor credit. diff --git a/research/complex-paired26-completion/REPLAY.json b/research/complex-paired26-completion/REPLAY.json new file mode 100644 index 0000000000..49785a5d46 --- /dev/null +++ b/research/complex-paired26-completion/REPLAY.json @@ -0,0 +1,214 @@ +{ + "schema_version": 1, + "status": "local mechanical replay passed; complete separate Pro written review inspected and corroborates the stated fixed-object conclusion", + "environment": { + "implementation": "CPython", + "python": "3.12.14", + "platform": "macOS-26.5.1-arm64-arm-64bit-Mach-O", + "requirements": [], + "isolation": "Fresh processes with -I -B, optimized variants with -O; PATH=/usr/bin:/bin and LANG=C.UTF-8; unrelated outer working directory; 120-second per-process caps." + }, + "source_audit": "Both executable scripts fully read before execution: stdlib only, no subprocess, network, dynamic local import, installation or solver; default runs read only. Explicit optional certificate generation was not invoked.", + "source_authentication": { + "exact_git_objects": "Three PR1020 CERTIFICATE/PROOF/verifier files and PR1521 README match all supplied blob/SHA pins.", + "data_bindings": "Eleven PR1020 comparisons match, including puncture, live count, full prior A/B matrices and term costs, 8836 all-pairs checks, exact first-pair scaling/cost6/support dimensions8/7.", + "prior_replay": "The new programs reproduce the prior69 decoder from transcribed data; this replay did not re-execute the predecessor programs." + }, + "runs": [ + { + "case": "verify-normal", + "command": [ + "python3.12", + "-I", + "-B", + "verify.py" + ], + "started_at": "2026-10-14T03:47:21.523403+00:00", + "exit_code": 0, + "seconds": 1.291998, + "timeout": false, + "stdout": "PASS_FIXED_PAIRED26_MINIMUM_62\nprior=69 optimal=62 reduced_A_branch=67; all 8836 entries checked for each\ninventory: 511/511 functionals; rank8=482 rank7=29; 27 complex kernel lines\noptimal classes: 256/1716 seven-subsets; 64 with r30, 192 without\nQ(i) isotropic example: cost63; 8836 complex entries; ordinary transpose only\nnegative controls: 14 rejected, plus 2 complex convention/compatibility controls\n", + "stderr": "" + }, + { + "case": "verify-optimized", + "command": [ + "python3.12", + "-I", + "-O", + "-B", + "verify.py" + ], + "started_at": "2026-10-14T03:47:21.523784+00:00", + "exit_code": 0, + "seconds": 1.366486, + "timeout": false, + "stdout": "PASS_FIXED_PAIRED26_MINIMUM_62\nprior=69 optimal=62 reduced_A_branch=67; all 8836 entries checked for each\ninventory: 511/511 functionals; rank8=482 rank7=29; 27 complex kernel lines\noptimal classes: 256/1716 seven-subsets; 64 with r30, 192 without\nQ(i) isotropic example: cost63; 8836 complex entries; ordinary transpose only\nnegative controls: 14 rejected, plus 2 complex convention/compatibility controls\n", + "stderr": "" + }, + { + "case": "audit-normal", + "command": [ + "python3.12", + "-I", + "-B", + "audit.py" + ], + "started_at": "2026-10-14T03:47:21.523921+00:00", + "exit_code": 0, + "seconds": 1.796696, + "timeout": false, + "stdout": "AUDIT prior_69 costs=[6, 9, 9, 9, 9, 9, 9, 9] 8836 ordered entries PASS\nAUDIT optimal_62 costs=[6, 8, 8, 8, 8, 8, 8, 8] 8836 ordered entries PASS\nAUDIT sharp_reduced_A_branch_67 costs=[6, 7, 9, 9, 9, 9, 9, 9] 8836 ordered entries PASS\nAUDIT complex_isotropic_control costs=[6, 8, 9, 8, 8, 8, 8, 8] 8836 ordered entries PASS\nPASS_SEPARATE_FRACTION_AUDIT: 511 kernels, 1716 subsets, 256 optimal classes; minimum premises verified\n", + "stderr": "" + }, + { + "case": "audit-optimized", + "command": [ + "python3.12", + "-I", + "-O", + "-B", + "audit.py" + ], + "started_at": "2026-10-14T03:47:21.525343+00:00", + "exit_code": 0, + "seconds": 1.84237, + "timeout": false, + "stdout": "AUDIT prior_69 costs=[6, 9, 9, 9, 9, 9, 9, 9] 8836 ordered entries PASS\nAUDIT optimal_62 costs=[6, 8, 8, 8, 8, 8, 8, 8] 8836 ordered entries PASS\nAUDIT sharp_reduced_A_branch_67 costs=[6, 7, 9, 9, 9, 9, 9, 9] 8836 ordered entries PASS\nAUDIT complex_isotropic_control costs=[6, 8, 9, 8, 8, 8, 8, 8] 8836 ordered entries PASS\nPASS_SEPARATE_FRACTION_AUDIT: 511 kernels, 1716 subsets, 256 optimal classes; minimum premises verified\n", + "stderr": "" + }, + { + "case": "tampered-minimum-normal", + "command": [ + "python3.12", + "-I", + "-B", + "verify.py", + "--certificate", + "tampered-minimum.json" + ], + "started_at": "2026-10-14T03:48:27.366176+00:00", + "exit_code": 1, + "seconds": 1.261045, + "timeout": false, + "stdout": "", + "stderr": "FAIL_FIXED_PAIRED26: certificate mismatch at $.minimum\n" + }, + { + "case": "tampered-minimum-optimized", + "command": [ + "python3.12", + "-I", + "-O", + "-B", + "verify.py", + "--certificate", + "tampered-minimum.json" + ], + "started_at": "2026-10-14T03:48:27.366708+00:00", + "exit_code": 1, + "seconds": 1.329603, + "timeout": false, + "stdout": "", + "stderr": "FAIL_FIXED_PAIRED26: certificate mismatch at $.minimum\n" + } + ], + "controls": { + "primary_rejections": 14, + "complex_controls": 2, + "actual_file_mutation": "Changed certificate.minimum from 62 to 61 in a separate temporary copy; primary normal and optimized runs rejected it with certificate mismatch at $.minimum.", + "coverage_note": "Primary validates entire reconstructed certificate; audit independently checks declared mathematical fields." + }, + "agreement": "Normal/optimized stdout is byte-identical per checker and matches the original Linux/Python3.13.5 producer output. All17 received and isolated files remained unchanged after execution.", + "finite_counts": { + "functional_records": 511, + "rank8": 482, + "rank7": 29, + "distinct_kernel_lines": 27, + "seven_subsets": 1716, + "independent_basis_sets": 256, + "with_r30": 64, + "without_r30": 192, + "ordered_entries_per_example": 8836, + "examples": 4 + }, + "limits": [ + "Finite premise/example replay is not independent mathematical proof review.", + "Both implementations are from the same Pro author/session.", + "Universal arbitrary-complex minimum, no-F6 argument and all-optimal-class identification rely on the written proof.", + "Not 256 full complex entrywise replays.", + "Fixed puncture, exact designated pair, exactly eight all-pairs terms and separate COPY costs only.", + "No global p26 minimum, physical supplier/frame/restoration/hosting invoice, complete661-wire replay, paid moment, new kappa, human review or kernel formalization." + ], + "packaging_validation": { + "helper_sha256": "d7e12e93799b3e244d74de5cb979855efd5307a088854e52cdb32ce1d4f7646f", + "environment": "CPython3.12.14, -I -B, scratch-only export of registration helper/package with read-only exact Git provenance", + "runs": [ + { + "mode": "metadata", + "exit_code": 0, + "seconds": 2.266999, + "stdout": "PASS_PACKAGE_METADATA_AND_PINS (not a mathematical acceptance check)\n", + "stderr": "" + }, + { + "mode": "registered", + "exit_code": 0, + "seconds": 3.321228, + "stdout": "CHECK Rebuild and compare the complete fixed26 certificate: prior69 and rational62/67 plus exact Q(i)63 all-pairs examples with actual support ranks; 511 rank/kernel witnesses; 1716 subsets/256 bases; 14 rejection and 2 complex controls. Written universal proof is not kernel checked.\nPASS_FIXED_PAIRED26_MINIMUM_62\nprior=69 optimal=62 reduced_A_branch=67; all 8836 entries checked for each\ninventory: 511/511 functionals; rank8=482 rank7=29; 27 complex kernel lines\noptimal classes: 256/1716 seven-subsets; 64 with r30, 192 without\nQ(i) isotropic example: cost63; 8836 complex entries; ordinary transpose only\nnegative controls: 14 rejected, plus 2 complex convention/compatibility controls\nCHECK Separate Fraction-elimination implementation (same Pro author): recompute 511 functional ranks/kernels, 1716 subsets and actual-support costs/all8836 entries for four examples. Checks declared mathematical fields, not full certificate-schema equality or the universal written proof.\nAUDIT prior_69 costs=[6, 9, 9, 9, 9, 9, 9, 9] 8836 ordered entries PASS\nAUDIT optimal_62 costs=[6, 8, 8, 8, 8, 8, 8, 8] 8836 ordered entries PASS\nAUDIT sharp_reduced_A_branch_67 costs=[6, 7, 9, 9, 9, 9, 9, 9] 8836 ordered entries PASS\nAUDIT complex_isotropic_control costs=[6, 8, 9, 8, 8, 8, 8, 8] 8836 ordered entries PASS\nPASS_SEPARATE_FRACTION_AUDIT: 511 kernels, 1716 subsets, 256 optimal classes; minimum premises verified\nPASS_REGISTERED_RESEARCH_PACKAGE research/complex-paired26-completion outcome=partial\n", + "stderr": "" + } + ], + "post_review_metadata": { + "mode": "post-review-metadata", + "exit_code": 0, + "seconds": 0.351501, + "stdout": "PASS_PACKAGE_METADATA_AND_PINS (not a mathematical acceptance check)\n", + "stderr": "" + }, + "final_editorial_metadata": { + "mode": "final-editorial-metadata", + "exit_code": 0, + "seconds": 0.307415, + "stdout": "PASS_PACKAGE_METADATA_AND_PINS (not a mathematical acceptance check)\n", + "stderr": "" + } + }, + "separate_written_review": { + "review_url": "https://chatgpt.com/c/6acefb65-e16c-83eb-8b0d-43ec339b3cd4", + "reported_by": "Separate GPT-6 Pro review in the linked ChatGPT conversation; complete two-part text read by parent and source coordinator", + "received_at": "2026-10-14T04:08Z", + "corroborated": [ + "Fixed-object arbitrary-complex minimum62", + "256 optimal equivalence classes", + "Attained reduced-A branch minimum67" + ], + "independent_recomputation": [ + "511 functional kernels", + "1716 candidate seven-subsets", + "Supplied cost62 witness", + "Separately constructed cost67 witness", + "All256 normalized optimal bases, each with8836 ordered decoder entries (2262016 entries total)", + "Exact isotropic/conjugation and same-support nondual controls" + ], + "not_audited": [ + "Original supplied checker programs", + "Prior69 baseline decoder" + ], + "limitations": "Separate AI written review with reported remote finite computations, not human or kernel review. Original supplied checker implementations, their fourteen rejection tests and PR1020 prior69 baseline were not audited by this reviewer. Our local execution evidence for those original artifacts remains separate.", + "text_transfer": { + "file": "review-text-transfer.md (retained outside the minimal package)", + "sha256": "960ac367502b567bbf7768aa6048bf24c9570f27c4b9394b13e0ccb0e9b2d580", + "part1_json_sha256": "7124e6cace91400dd643acd8b0970bb361d5eb2479a3ad116ed88bcb03e91138", + "part2_json_sha256": "13603798be810b9c49632d85345937a24ad44f9e4ca35cf75740dcd499232dc7", + "inspection": "Sections1-12 inspected; no proof-level flaw or substantive repair reported.", + "original_zip_retrieved_locally": false + }, + "remote_execution_report": { + "python": "3.13.5", + "main_checker": "Normal generation and optimized certificate comparison, both exit0 with ALL CHECKS PASSED; a separate kernel-certificate consumer also passed normal and optimized.", + "local_status": "Reported by the remote review text. Review scripts/certificates/logs have not been retrieved, byte-authenticated or executed locally.", + "development_note": "Review text reports an initial syntax-only missing-bracket failure repaired before its final runs." + } + } +} diff --git a/research/complex-paired26-completion/SOURCES.json b/research/complex-paired26-completion/SOURCES.json new file mode 100644 index 0000000000..2f9c68a349 --- /dev/null +++ b/research/complex-paired26-completion/SOURCES.json @@ -0,0 +1,85 @@ +{ + "schema_version": 1, + "base_commit": "55a02580ce1b283026e9d3b3510b218f8c93a4de", + "files": [ + { + "path": "research/root-pair-first-drop-seed48/PROOF.md", + "git_blob": "71de1701822918906bbce29d781f3ac8a75a3bf3", + "sha256": "9ba97ca028405eb5e88dc9158df34de9ca1ef409de9ad72f7ae9faa34722e9c3", + "usage": "provenance" + }, + { + "path": "research/root-pair-first-drop-seed48/CERTIFICATE.json", + "git_blob": "73c0e0cac357270d7fb9510d7a0093a7d8e359d2", + "sha256": "a429b191d7f033864e9fcd676dc575f551a2a4093aaed0ba2a90cae1d91935ff", + "usage": "provenance" + }, + { + "path": "research/root-pair-first-drop-seed48/verify.py", + "git_blob": "cef6656fefe40a3b73dc30df153611cfc10cb727", + "sha256": "b48f2aee3424364dcf2abda1dd26ef7a5fdac3b1c9ac78cd1adc287813ba585e", + "usage": "provenance" + }, + { + "path": "certificates/selected-result.json", + "git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32", + "usage": "provenance" + }, + { + "path": "docs/research/agent-task-catalog.json", + "git_blob": "c05fafaa25ba95b2d5af86b1800427198e3d20eb", + "sha256": "89b5928bc92c81e2647b6d702a7ad85a6795b8f44e2eb267b2ff3145d8f2b2ce", + "usage": "provenance" + } + ], + "external_predecessor_note": "Informational exact source/credit pins, not runtime inputs. The PR1521 README and three pinned PR1020 source files were independently authenticated against exact Git objects during local replay.", + "external_predecessors": [ + { + "commit": "900658976e42a1501b3d23d46b2ea3cab228bc4c", + "path": "research/complex-general-normal-boundary/README.md", + "git_blob": "c357e0a94da006cdfab68a0aba44c70f247008df", + "sha256": "b3f00b757edc2fad911b99bb6088cd7ff2d3985d73d3b36051093e11d6987a85", + "url": "https://github.com/CrocSwap/integer-mult-bounds/blob/900658976e42a1501b3d23d46b2ea3cab228bc4c/research/complex-general-normal-boundary/README.md", + "credit": "Hanson Sun (@bbMisk), substantial OpenAI Codex assistance" + }, + { + "commit": "55a02580ce1b283026e9d3b3510b218f8c93a4de", + "path": "research/complex-decoder-field-extension-seed44/PROOF.md", + "git_blob": "4a3063de8fe606a88bd5bdb9b7d2e5dccb70f73f", + "sha256": "a89530576d8a5e1ae8778d601b37140d954212cd46e06b87a3f565294ee251a2", + "url": "https://github.com/CrocSwap/integer-mult-bounds/blob/55a02580ce1b283026e9d3b3510b218f8c93a4de/research/complex-decoder-field-extension-seed44/PROOF.md", + "credit": "woklerx; complex-support bridge" + }, + { + "commit": "55a02580ce1b283026e9d3b3510b218f8c93a4de", + "path": "research/complex-frame-pair-decoders/PROOF.md", + "git_blob": "889f3a653ed1bdbb7df61ebe3af4f2103602a1f4", + "sha256": "ba53c1d8a9bc2d935d546bde46ca7341bd65f8515013e07b073296b4db2a9a74", + "url": "https://github.com/CrocSwap/integer-mult-bounds/blob/55a02580ce1b283026e9d3b3510b218f8c93a4de/research/complex-frame-pair-decoders/PROOF.md", + "credit": "themilkman216; real decoder model/F6" + } + ], + "primary_predecessor": { + "pull_request": "https://github.com/CrocSwap/integer-mult-bounds/pull/1020", + "head": "bf4ee95df4ee6e3101a88f5d015c8aa85b688b6d", + "attribution": "woklerx; retained PR717/PR968 lineage" + }, + "delivered_files": { + "verify.py": "34f20844f5184a66f2217b481c0cc82ed6a9eb85e97d3ec53eec36b641d2b07d", + "audit.py": "5e39772867f69faaf95c4a9b429129485c462f1daedc1ce5b311dd542a5cb535", + "certificate.json": "18103be5548d9558dfc49cc90bc9308aab13e48e7f99d30a45fd90cec7c2776d", + "proof.md": "6a0006709ae4b1c6bdf96530e1062a7df071cc846b50494e94f5d72e951ce78e" + }, + "original_delivery": { + "archive_sha256": "153f3e5d598f1935f3617d974933a5a12a5cac31b89b9f60e0110b47dd460b89", + "packaging_changes": "README and attribution/runtime prose updated; all mathematical proof text, verify.py, audit.py and certificate.json retained. Only the closing proof paragraph changes source-authentication status and metadata filename." + }, + "packaged_proof_sha256": "0305c955d39a0b11b9e3a3b58606882ceb85daac765050583645765c7a35fad3", + "separate_review_text_provenance": { + "url": "https://chatgpt.com/c/6acefb65-e16c-83eb-8b0d-43ec339b3cd4", + "transfer_sha256": "960ac367502b567bbf7768aa6048bf24c9570f27c4b9394b13e0ccb0e9b2d580", + "original_zip_retrieved_locally": false, + "note": "Full two-part chat text inspected; source-review archive and code are not local inputs and have not been byte-authenticated or run locally." + } +} diff --git a/research/complex-paired26-completion/TASK.json b/research/complex-paired26-completion/TASK.json new file mode 100644 index 0000000000..f59409426a --- /dev/null +++ b/research/complex-paired26-completion/TASK.json @@ -0,0 +1,129 @@ +{ + "schema_version": 1, + "task_id": "complex-masked-decoder", + "priority_revision": 2, + "base_commit": "55a02580ce1b283026e9d3b3510b218f8c93a4de", + "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": "changed", + "actual_scope": "For the exact PR1020 26-line puncture and ordered pair (48,0) with its published scaling, determine the least total separate COPY cost over exact eight-term arbitrary-complex all-pairs completions; reproduce the prior 69 decoder and supply finite certificates for the claimed 62 result.", + "scope_change_reason": "This bounded follow-up to PR1521 open question 1 changes the earlier at-most-25-puncture restriction to one fixed 26-puncture object. It is an algebraic prerequisite rather than a masked/overcomplete supplier construction; no physical paid budget is asserted.", + "bottleneck_link": "Identifies the exact remaining separate-COPY obligation after a known cost-six paired term; any supplier use still requires a complete physical interface and paid-moment screen.", + "budget_minutes": 120, + "stop_rule": "Stop at one exact fixed-pair completion result or explicit lower/upper gap. No global 26-puncture enumeration or unbounded physical synthesis.", + "outcome": "completed", + "evidence": "CPython 3.12.14 primary and separate Fraction audit pass normal and optimized runs; all certificate fields reconstructed by the primary, 511 functional records, 1716 subsets, and 8836 entries for four examples checked. Fourteen rejection controls, two complex controls and an actual saved-certificate mutation pass. A separate GPT-6 Pro review reports corroboration of the arbitrary-complex minimum62, 256 classes and attained branch67, with independent finite recomputations; it did not audit the supplied programs or prior69 decoder. The complete transferred review was inspected and recommends acceptance within the exact scope without repair. Its remote programs/logs have not been retrieved or replayed locally.", + "author": "Andrey Mas", + "ai_assistance": "Substantial GPT-6 Pro mathematical research and checker authorship through ChatGPT, as identified in the browser UI. Codex source preparation, coordination, execution audit, mechanical replay and packaging; no local mathematical proof repair.", + "open_questions": [ + { + "question": "Does this fixed decoder admit a physical implementation whose fully charged optimistic moment passes the current priority gate?", + "why_it_matters": "The separate COPY minimum alone does not price physical rank-shape, frame or restoration costs and cannot imply a supplier or kappa improvement.", + "first_step": "Specify all preparation, frame, restoration and hosting obligations; derive and screen the full optimistic paid moment before attempting network construction.", + "blocked_by": "No physical implementation contract or complete paid invoice is supplied by this fixed-object algebraic package." + } + ], + "scope_key": "complex/PR1020/fixed-26-puncture/ordered-pair-48-0/eight-term-all-pairs/separate-COPY", + "publication_status": "ready-for-proposed-submission", + "coordination": { + "claim": "https://github.com/CrocSwap/integer-mult-bounds/discussions/1570", + "opened_at": "2026-10-14T03:06:55Z", + "expires_at": "2026-10-14T05:06:55Z", + "entry_coverage": "716 open PRs and 217 Discussion records, complete pagination, 2026-10-14 02:55-02:56 UTC; direct PR1020 and PR1521 checks before claim. See final_overlap for the completed submission refresh.", + "final_overlap": { + "coverage": { + "open_prs": { + "fetched_at": "2026-10-14T04:08:23.511326+00:00", + "complete_pagination": true, + "records": 732 + }, + "discussions": { + "fetched_at": "2026-10-14T04:09:37.963852+00:00", + "complete_pagination": true, + "records": 253 + } + }, + "warnings": [], + "finding": "No matching concurrent fixed-P26 completion claim/result identified. PR1521 remains the <=25-puncture predecessor with this open question; PR1187 has a different preserved-P104/38-puncture boundary. Discussion1570 has no replies on direct 04:08 UTC inspection.", + "limits": "Remote PR scope is open PRs including drafts. Closed work is searched through local READMEs, TASK metadata and ledger only. No code diffs or arbitrary package files are searched. Recheck relevant heads before submission.", + "other_active_scope_collision": "PR1613 (Hanson Sun/bbMisk), head a34723742801f877c9636ed72f176a7ffa7bf005, explicitly overlaps our separate P112 singleton claim1550 and credits that earlier claim. It is not a fixed26 contribution." + }, + "direct_prepublication": { + "checked_at": "2026-10-14T04:08Z", + "claim1570_comments": 0, + "claim1550_comments": 0, + "PR1020_head": "bf4ee95df4ee6e3101a88f5d015c8aa85b688b6d", + "PR1521_head": "900658976e42a1501b3d23d46b2ea3cab228bc4c" + } + }, + "priority_checkpoint": { + "priority_revision": 3, + "commit": "81e81af67714bdc8d1693b0bf5c29468b92f62ff", + "introduced_by": "adc34159e0d6dc3dd2af2bdba3f5ca7376ef957e", + "decision": "Preserve this bounded in-flight algebraic result under the checkpoint guidance. The current larger-rank/changed-interface priorities do not convert this COPY-only result into a fully paid improvement; no revision-3 screen is claimed.", + "historical_provenance": "Keep the initial revision-2 card and source-base pins; do not relabel them as a revision-3 assignment.", + "files": [ + { + "path": "AGENTS.md", + "git_blob": "860762e04e963e1b163b8fa5267854c0040a9e67", + "sha256": "5f29c7cbf0eb28f4e87f0affa9cffdaef4e39a630a5878c8fed02b544c894d2e" + }, + { + "path": "autoresearch.md", + "git_blob": "8d5403e0f10f68a61d0cb9294fa2e83e872d1d82", + "sha256": "215b3222f6a943edc69422a28ac21ea1f397ddf54770f1d87ac4195385d73699" + }, + { + "path": "docs/research/agent-task-catalog.json", + "git_blob": "06c96f5579bb67ed1b86d334e78fbed7da6945f1", + "sha256": "6686ad58f1fbdbc87134a78901b60fd53a20d3984355e91defbbebc9e9fa8075" + }, + { + "path": "docs/research/research-package-guide.md", + "git_blob": "f8c3b3340b8bcb8d8ca655f5d7ca2fa55f409fd2", + "sha256": "fcd22035031f59fb9892e013f5d71f636aba61f687fe38b0a9725a29caa34b85" + }, + { + "path": "certificates/selected-result.json", + "git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32" + } + ], + "prepublication_main": "0a201997097b8a89b638f3a2afcb35db4184c8b2", + "prepublication_guidance_status": "At 2026-10-14T04:08Z, AGENTS, autoresearch, CONTRIBUTING, package guide, revision-3 catalogue, selected record and replay helper are byte-identical to the recorded 81e81af checkpoint." + } +} diff --git a/research/complex-paired26-completion/VERIFY.json b/research/complex-paired26-completion/VERIFY.json new file mode 100644 index 0000000000..0d27ecc700 --- /dev/null +++ b/research/complex-paired26-completion/VERIFY.json @@ -0,0 +1,31 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 30, + "checks": "Rebuild and compare the complete fixed26 certificate: prior69 and rational62/67 plus exact Q(i)63 all-pairs examples with actual support ranks; 511 rank/kernel witnesses; 1716 subsets/256 bases; 14 rejection and 2 complex controls. Written universal proof is not kernel checked." + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/audit.py" + ], + "timeout_seconds": 30, + "checks": "Separate Fraction-elimination implementation (same Pro author): recompute 511 functional ranks/kernels, 1716 subsets and actual-support costs/all8836 entries for four examples. Checks declared mathematical fields, not full certificate-schema equality or the universal written proof." + } + ] +} diff --git a/research/complex-paired26-completion/audit.py b/research/complex-paired26-completion/audit.py new file mode 100644 index 0000000000..80c5269ed2 --- /dev/null +++ b/research/complex-paired26-completion/audit.py @@ -0,0 +1,206 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""Separate stdlib arithmetic replay; imports no primary-verifier code. + +Written in the same ChatGPT investigation, not an independent-author review. +Uses normalized Fraction elimination on the actual violation matrices, rather +than the primary streaming-integer / Bareiss-minor certificate route. +""" +import json +import sys +from fractions import Fraction as F +from itertools import combinations, product +from math import gcd, lcm +from pathlib import Path + +P = [0,23,24,25,26,34,35,36,37,48,60,61,62,63,66,67, + 72,73,76,77,78,79,82,83,88,89] +A_FIRST = [F(x,2) for x in [1,-1,-1,-1,1,1,-1,1]] +B_FIRST = list(map(F,[0,0,0,0,0,0,-2,2])) +B_CANDIDATES = [23,25,30,34,36,61,63,66,73,77,79,82,89] + + +def check(ok, message): + if not ok: + raise RuntimeError(message) + + +def inner(u,v): + check(len(u)==len(v), 'inner product dimensions') + return sum(x*y for x,y in zip(u,v)) + + +def binary_rank_low(rows): + basis = {} + for x in rows: + while x: + low = x & -x + if low in basis: + x ^= basis[low] + else: + basis[low] = x + break + return len(basis) + + +def fractional_rows(rows, width=8): + basis = {} + for row in rows: + v = list(map(F,row)) + for p in sorted(basis): + if v[p]: + x = v[p] + v = [a-x*b for a,b in zip(v,basis[p])] + p = next((i for i,x in enumerate(v) if x),None) + if p is not None: + x = v[p] + basis[p] = [a/x for a in v] + if len(basis)==width: + break + return basis + + +def normalized(v): + denominator = lcm(*(x.denominator for x in v)) + w = [int(x*denominator) for x in v] + divisor = gcd(*w) + check(divisor!=0, 'zero normalized vector') + if next(x for x in w if x)<0: + divisor=-divisor + return tuple(x//divisor for x in w) + + +def line_kernel(basis): + free = [j for j in range(8) if j not in basis] + check(len(free)==1, 'kernel is not a line') + v = [F(0)]*8 + v[free[0]]=F(1) + for p in sorted(basis,reverse=True): + v[p]=-sum(basis[p][j]*v[j] for j in range(p+1,8)) + return normalized(v) + + +def multiply(x,y): + columns = list(zip(*y)) + return [[inner(r,c) for c in columns] for r in x] + + +def read_matrix(x): + return [list(map(F,r)) for r in x] + + +def roots_and_labels(): + roots = set() + for i in range(8): + for j in range(i+1,8): + for s,t in [(-2,-2),(-2,2),(2,-2),(2,2)]: + x=[0]*8;x[i]=s;x[j]=t + roots.add(max(tuple(x),tuple(-v for v in x))) + for x in product([-1,1],repeat=8): + if x.count(-1)%2==0: + roots.add(max(x,tuple(-v for v in x))) + roots=sorted(roots) + check(len(roots)==120, 'root count') + n=[] + for x in roots: + row=0 + for j,y in enumerate(roots): + z,rem=divmod(inner(x,y),4) + check(rem==0, 'nonintegral pairing') + if (z+1)%2: + row |= 1<len(basis): + basis.append(i) + if len(basis)==9: + break + labels=[sum(((row>>b)&1)<1 else Path(__file__).with_name('certificate.json') + data=json.loads(path.read_text()) + check(data['schema']=='fixed-paired26-completion-v1', 'schema') + check(data['geometry']['punctures']==P, 'fixed puncture') + roots,n,labels=roots_and_labels() + live=[j for j in range(120) if j not in P] + rr=[[F(x,2) for x in roots[j]] for j in live] + check(len(fractional_rows([roots[j] for j in live]))==8, 'R rank') + root_map={normalized(list(map(F,r))):i for i,r in enumerate(roots)} + directions={}; ranks={7:0,8:0} + records=data['inventory']['matrices'] + check([r['lambda'] for r in records]==list(range(1,512)), 'all 511 functionals') + for lam in range(1,512): + rows=[roots[j] for j in live if (labels[j]&lam).bit_count()%2] + echelon=fractional_rows(rows) + rank=len(echelon) + check(rank in ranks and rank==records[lam-1]['rank'], 'inventory rank mismatch') + ranks[rank]+=1 + if rank==7: + kernel=line_kernel(echelon) + check(kernel in root_map, 'nonroot kernel line') + j=root_map[kernel] + check(j==records[lam-1]['kernel_root_index'], 'kernel index mismatch') + directions.setdefault(j,[]).append(lam) + else: + check(records[lam-1]['kernel_root_index'] is None, 'full rank with claimed kernel') + check(ranks=={7:29,8:482}, 'rank totals') + check(sorted(directions)==sorted(P+[30]), 'complete reduced root set') + def supp(v): return [j for j in live if inner(roots[j],v)!=0] + for j in directions: + dim=binary_rank_low(labels[i] for i in supp(roots[j])) + check(dim==(7 if j==0 else 8), 'reduced support dimension') + ea=[j for j in sorted(directions) if inner(roots[j],B_FIRST)==0] + eb=[j for j in sorted(directions) if inner(roots[j],A_FIRST)==0] + check(ea==[30] and eb==B_CANDIDATES, 'residual eligibility') + check(all(inner(roots[30],roots[j]) for j in eb), 'orthogonality exclusion') + sets=[] + for indices in combinations(eb,7): + if len(fractional_rows([roots[i] for i in indices]))==7: + sets.append(list(indices)) + check(len(sets)==256 and sets==data['optimal_classification']['optimal_unordered_B_root_sets'], + 'complete optimal root-basis set') + for name,expected in [('prior_69',[6]+[9]*7),('optimal_62',[6]+[8]*7), + ('sharp_reduced_A_branch_67',[6,7]+[9]*6), + ('complex_isotropic_control',[6,8,9,8,8,8,8,8])]: + report=data[name] + complex_case=name=='complex_isotropic_control' + a=read_matrix(report['A_real_rows' if complex_case else 'A_rows']) + b=read_matrix(report['B_real_rows' if complex_case else 'B_rows']) + ai=read_matrix(report['A_imag_rows']) if complex_case else [[F(0)]*8 for _ in range(8)] + bi=read_matrix(report['B_imag_rows']) if complex_case else [[F(0)]*8 for _ in range(8)] + check(len(a)==len(b)==len(ai)==len(bi)==8 and all(len(r)==8 for m in (a,b,ai,bi) for r in m), + 'matrix shape') + check([r[0] for r in a]==A_FIRST and [r[0] for r in b]==B_FIRST and + all(r[0]==0 for m in (ai,bi) for r in m), 'first pair changed') + d,di,t,ti=[multiply(rr,m) for m in (a,ai,b,bi)] + for i in range(94): + for j in range(94): + check(inner(d[i],t[j])-inner(di[i],ti[j])==2*inner(rr[i],rr[j]) and + inner(d[i],ti[j])+inner(di[i],t[j])==0, name+' all-pairs identity') + costs=[] + for k in range(8): + s=[root for i,root in enumerate(live) if d[i][k] or di[i][k]] + u=[root for i,root in enumerate(live) if t[i][k] or ti[i][k]] + mask=sum(1<= d(x)+d(y)-9. (2.1) + +Indeed the kernel of W(x) -> W(y)* is W(x) intersect W(y)^perp, of dimension +at most 9−d(y). In particular, if d(x)=9, the charge is **exactly d(y)**. +The same statement holds with the two sides interchanged. + +## 3. Normal form for every arbitrary-complex eight-term decoder + +Suppose D,T in C^(94 x 8) satisfy D T^T=2 R R^T on every ordered entry. +Because R is injective as a map C^8 -> C^94 and R^T is surjective, R R^T has +rank eight. Therefore D and T each have rank eight. The column space of +D T^T equals the column space of D and also equals the column space of R. +Transposing the identity gives the corresponding statement for T. + +It follows that there are unique invertible A,B in C^(8 x 8) with + + D=RA, T=RB. + +A left inverse of R and its transposed right inverse give + + A B^T = 2I, + B = 2 A^(-T), + A^T B = 2I. (3.1) + +No inversion of R^T R is used. All transposes are ordinary transposes. +Writing paired columns as a_k,b_k, with k=0,...,7, (3.1) says + + a_j dot b_k = 2 delta_jk. + +Both column lists are bases. With a_0=a and b_0=b fixed, a dot b=2, and + + a_k in b^perp, b_k in a^perp, k=1,...,7. (3.2) + +These are necessary constraints on all admissible arbitrary-complex +completions, not a restriction imposed for the construction. + +## 4. An exact finite reduction for support-dimension drops + +For each of the **511 nonzero** lambda in (F2^9)* form an integer matrix Z_lambda +whose rows are precisely the doubled roots v_i for which + + i in L and lambda(ell_i)=1. + +For every z in C^8, + + lambda annihilates W(z) + iff v_i dot z=0 for all rows of Z_lambda + iff z belongs to ker_C Z_lambda. (4.1) + +Thus a nonzero normal has d(z)<=8 if and only if it belongs to at least one +of these 511 complex kernels. This proves completeness of the finite +reduction; it is not sampling directions in C^8. + +Every Z_lambda is rational. A nonzero integer minor remains nonzero over C. +For a rank-eight record, the certificate gives an 8-by-8 nonzero minor. For a +rank-seven record it gives a 7-by-7 nonzero minor and a nonzero real root +vector annihilating **every** row. These establish exact rank, and in the latter +case establish the entire kernel as one complex line C r_j. No conclusion +about complex normals is drawn from their ordinary squares. + +The primary verifier selects candidate independent rows by fraction-free +elimination and validates their minors using a separate Bareiss determinant +implementation with checked exact divisions. The additional audit.py imports +no primary-verifier code and instead eliminates each actual violation matrix +using normalized rational arithmetic. Both methods agree on all 511 matrices. + +## 5. Complete kernel inventory for this fixed live set + +There are **482 rank-eight matrices** and **29 rank-seven matrices**. The latter +have **27 distinct kernel lines**, exactly the root directions indexed by + + P union {30}. + +Only r_0 has support dimension seven. All the other 26 reduced directions +have support dimension eight. Every nonzero complex normal not on one of +these lines has support dimension nine. + +Here is the complete reduced-direction inventory. Lambda values use the +nine-bit coordinates of Section 2; the full 511 records and their exact minor +witnesses are in certificate.json. + +| Root index | Label dimension | Live support size | Nonzero annihilator functionals | +|---:|---:|---:|:---| +| 0 | 7 | 31 | 1, 140, 141 | +| 23 | 8 | 43 | 121 | +| 24 | 8 | 42 | 117 | +| 25 | 8 | 43 | 118 | +| 26 | 8 | 42 | 122 | +| 30 | 8 | 33 | 12 | +| 34 | 8 | 43 | 244 | +| 35 | 8 | 42 | 248 | +| 36 | 8 | 43 | 251 | +| 37 | 8 | 42 | 247 | +| 48 | 8 | 43 | 286 | +| 60 | 8 | 42 | 382 | +| 61 | 8 | 43 | 370 | +| 62 | 8 | 42 | 355 | +| 63 | 8 | 43 | 367 | +| 66 | 8 | 43 | 334 | +| 67 | 8 | 42 | 322 | +| 72 | 8 | 42 | 336 | +| 73 | 8 | 43 | 348 | +| 76 | 8 | 42 | 499 | +| 77 | 8 | 43 | 511 | +| 78 | 8 | 42 | 494 | +| 79 | 8 | 43 | 482 | +| 82 | 8 | 43 | 451 | +| 83 | 8 | 42 | 463 | +| 88 | 8 | 42 | 477 | +| 89 | 8 | 43 | 465 | + +The three functionals 1,140,141 are the three nonzero vectors of the +2-dimensional annihilator of W(r_0). Each remaining reduced direction has +one nonzero annihilator. In particular, this table accounts for all 29 +rank-seven matrices, and not merely for 27 sampled roots. + +## 6. What the fixed pair permits on the seven residual terms + +Intersecting the complete reduced-direction list with the two exact +perpendicular spaces in (3.2) gives + + {reduced A directions in b^perp} = {r_30}, + + {reduced B directions in a^perp} + = {r_23,r_25,r_30,r_34,r_36,r_61,r_63, + r_66,r_73,r_77,r_79,r_82,r_89}. (6.1) + +All 13 directions on the second line have support dimension eight. The unique +seven-dimensional-support direction r_0 does not belong to a^perp, so it +cannot occur in a residual B column. It cannot occur in a residual A column +either. These exclusions hold for all nonzero complex scalings of the lines. + +Set + + c = r_30 = (0,1,-1,0,0,0,0,0). + +In the displayed order of the 13 B candidates, the true-root dot products +c dot r_j are + + (-1,-1,2,1,1,-1,-1,-1,-1,1,1,1,1). + +**None is zero.** This is the small compatibility fact that rules out the +optimistic but unattainable extra one-unit saving on the A side. + +Since A is a basis, at most one of its seven residual columns can be a +multiple of c. All other residual A columns have label dimension nine. +For reference the directly checked pairing costs q(c,r_j) on the 13 +candidates are seven for j=30 and eight for every other j. + +## 7. Universal lower bound and the sharp exceptional branch + +There are two cases, exhausting all arbitrary-complex completions. + +**Case I: no residual A column is reduced.** All seven have label dimension +nine. Every residual B column has dimension at least eight by (6.1), so +its paired charge is at least eight by (2.1), or directly by the exact +full-space statement following it. Including the fixed cost-six term, + + total >= 6+7*8 = 62. (7.1) + +**Case II: one residual A column is reduced.** Suppose a_j is a nonzero +multiple of c. For the six other residual indices k, duality forces +b_k perpendicular to c as well as to a. None of the 13 reduced B lines +in (6.1) is perpendicular to c. Hence every such b_k has label dimension +nine. The corresponding a_k also has dimension nine, since A is a basis +and c is its only possible reduced residual direction. These six terms +therefore each cost nine. + +The remaining pair has d(a_j)=8 and d(b_j)>=8, hence costs at least seven. +Consequently + + total >= 6+6*9+7 = 67. (7.2) + +Combining (7.1) and (7.2) proves the universal lower bound 62. In particular, +counting reduced normals independently on the two sides would only give +an optimistic 61; the additional reduction on the A side actually forces +six residual B sides to become full-dimensional. + +The branch bound 67 is sharp: the supplied branch witness has first pair a,b, +second pair c,c, and charges (6,7,9,9,9,9,9,9). Its complete matrices, all +actual supports, and all-pairs checks are in certificate.json. This is an +additional checked boundary example, not an assumption in the lower bound. + +## 8. Explicit attaining 62-cost decoder + +Choose B columns + + (b, r_23, r_25, r_30, r_61, r_63, r_66, r_73) + +and put A=2 B^(-T). Below are the matrices as **rows**, with paired normals +as **columns**. + +A: + +``` +[1/2, 0, 0, 2, 1, 1, 1, 1] +[-1/2, 1, 1, 2, 0, 0, 0, 0] +[-1/2, 1, 1, 0, 0, 0, 0, 0] +[-1/2, 0, 0, 0, -1, -1, 1, 1] +[1/2, 0, 0, 0, -1, 1, -1, 1] +[1/2, 0, 0, 0, 1, -1, -1, 1] +[-1/2, -1, 1, 0, 0, 0, 0, 0] +[1/2, -1, 1, 0, 0, 0, 0, 0] +``` + +B: + +``` +[0, 0, 0, 0, 1/2, 1/2, 1/2, 1/2] +[0, 0, 0, 1, -1/2, -1/2, -1/2, -1/2] +[0, 1, 1, -1, 1/2, 1/2, 1/2, 1/2] +[0, 0, 0, 0, -1/2, -1/2, 1/2, 1/2] +[0, 0, 0, 0, -1/2, 1/2, -1/2, 1/2] +[0, 0, 0, 0, 1/2, -1/2, -1/2, 1/2] +[-2, -1, 0, 0, 1/2, 1/2, -1/2, 1/2] +[2, 0, 1, 0, -1/2, -1/2, 1/2, -1/2] +``` + +The first columns are exactly a and b, not just proportional copies. +The verifier checks both A B^T=2I and A^T B=2I. With D=RA and T=RB it +independently checks all **8,836** ordered identity entries, including all +**4,572 zero-right-hand-side entries**; no identity is tested only on +required or unmasked pairs. + +The term accounting is: + +| Term | D support size | T support size | D label dim. | T label dim. | COPY | +|---:|---:|---:|---:|---:|---:| +| 0 | 43 | 31 | 8 | 7 | 6 | +| 1 | 73 | 43 | 9 | 8 | 8 | +| 2 | 73 | 43 | 9 | 8 | 8 | +| 3 | 45 | 33 | 9 | 8 | 8 | +| 4 | 73 | 43 | 9 | 8 | 8 | +| 5 | 73 | 43 | 9 | 8 | 8 | +| 6 | 73 | 43 | 9 | 8 | 8 | +| 7 | 73 | 43 | 9 | 8 | 8 | + +Each charge is computed directly from the actual N submatrix, with both +bitset and literal dense F2 elimination in the primary verifier. The complete +sum is 62, with COPY/port ratio 62/94=31/47 in this copy-only contract. +No transfer to another cost model is asserted. + +Before computing this result the verifier reproduces the supplied PR1020 +69-cost matrices unchanged, including both normal identities, all 8,836 +ordered entries, actual supports, and charges (6,9,9,9,9,9,9,9). The separate +audit also replays that predecessor example. This is a new replay of the +transcribed input, not a claim to have executed the predecessor program. + +## 9. All equality cases: 256 gauge classes + +A 62-cost decoder cannot be in Case II. In Case I every residual charge is +exactly the dimension of its B support. Therefore equality holds if and only +if all seven residual B columns are independent complex multiples of seven +directions from the 13-element set in (6.1). + +Conversely, choose any seven independent directions from that set. They +span a^perp. Since a dot b=2, adjoining b makes an invertible B. Setting +A=2 B^(-T) gives first A column exactly a. If a residual A column were a +multiple of c, six other chosen B directions would have to be perpendicular +to c, contradicting Section 6. Thus all residual A supports are +nine-dimensional and all seven remaining charges are exactly eight. + +This is also the legitimate complex-to-rational reduction for **optimal +completions**. Write b_k=mu_k r_j, mu_k in C nonzero. The paired gauge change + + a_k -> mu_k a_k, b_k -> mu_k^(-1) b_k + +sets b_k=r_j while preserving the full identity and its paired term. It +leaves the designated first pair unchanged. After this change A is the +rational dual of the chosen rational B. This uses simultaneous duality, +not separate real representatives with matching supports. + +There is a short exact count of the possible unordered B direction sets. +The 13 directions consist of c and six pairs (x_j,x_j+c), with pairs of +root indices + + (23,34), (25,36), (61,77), + (63,79), (66,82), (73,89). + +Every addition is literal in the specified oriented root representatives. +The vectors c,x_1,...,x_6 are independent in a^perp. For example, the +integer column matrix + + [2b, v_30, v_23, v_25, v_61, v_63, v_66, v_73] + +has determinant **1024**, so the corresponding matrix of true normals has +determinant 4. Modulo Cc, the six images of the x_j form a basis. + +An independent set of seven directions either contains c and chooses one +vector from each of the six pairs, or omits c and chooses both vectors +from one pair and one vector from each of the other five pairs. These +patterns are sufficient: in the second pattern the doubled pair recovers +c by subtraction. They are necessary because omitting both members of +any pair loses its independent quotient coordinate. Hence the number is + + 2^6 + 6*2^5 = 64+192 = 256. + +As a second exact finite check, the primary verifier evaluates all +binomial(13,7)=1,716 integer determinants. There are 1,460 zero determinants, +124 equal to −1024, and 132 equal to +1024 in the fixed sorted-column +convention. The 256 nonzero cases agree as a set with the structural formula. +The separate audit instead checks rational ranks of all 1,716 seven-subsets. +The certificate lists all 256 unordered root sets. + +No omitted generic complex family can produce another optimum: Sections 4–7 +force every optimal B normal onto this finite list before the basis count +is applied. This is a justified finite reduction of the optimum, not an +exhaustive search over numerical complex coefficients. + +## 10. Complex and failure-mode controls + +The controls are part of the default replay and also execute under Python -O; +there are no assert statements used as verification gates. + +**A valid isotropic decoder.** Starting with the 62-cost matrices, make the +residual shear, using pre-shear columns, + + A[:,1] -> A[:,1] + i A[:,2], + B[:,2] -> B[:,2] - i B[:,1]. + +This is a paired inverse-transpose change and leaves the designated pair +unchanged. The old A columns 1 and 2 are orthogonal, each of ordinary square +four. Their displayed complex combination is nonzero and has ordinary +square zero. The verifier represents all entries as rational real/imaginary +parts, checks all 8,836 complex ordered entries exactly, and obtains charges +(6,8,9,8,8,8,8,8), total 63. Thus isotropic normals are explicitly admitted. +This is a control, not a second minimum claim. + +**Conjugate transpose is wrong.** On this valid complex example, using a +conjugate transpose gives 4−4i rather than 4 at live positions (0,0), namely +root indices (1,1). The mismatch is checked exactly. + +**Preserving separate supports does not preserve duality.** Independently +replace the two changed complex columns by the real columns + + A[:,1] + 2 A[:,2], + B[:,2] - 3 B[:,1]. + +All sixteen actual column supports agree with those of the complex example, +as checked over Q. Nevertheless the resulting A B^T is + + 2I - A[:,2] B[:,1]^T, + +with the columns on the right taken from the original 62-cost decoder. +It is not 2I. The normal-form verifier rejects it. This directly tests the +real-representative compatibility pitfall identified in the assignment. + +There are additionally fourteen rejection controls: wrong dual scaling, +wrong transpose in the inverse, singular basis, an untracked gauge change +of the fixed pair, a 61-unit undercharge, deletion of an actual support +entry, an altered all-pairs decoder, a ninth zero term, omission of the unit +label, omission of functional 286, a false rank claim, a wrong kernel line, +a forged determinant, and alteration of the puncture. Removing the unit +label changes the ambient binary rank to eight and is explicitly rejected. + +## 11. Reproducibility and exact boundaries of the evidence + +Run the commands in README.md. The primary checker rebuilds the geometry, +reproduces the baseline first, recomputes all rank witnesses and supports, +checks the new examples and controls, and compares the entire regenerated +certificate to the delivered one. --write-certificate is the explicit +regeneration mode; normal replay does not rewrite the certificate. + +The included separate audit uses a different rational-elimination route and +does not import the primary verifier. Both implementations were written in +the same ChatGPT investigation; their agreement is **not** an independent +human or separately authored mathematical review. This is a written proof +with exact machine-checked finite premises, not a Lean or other kernel proof. + +Entrywise decoder checks cover the three rational examples and one exact +Gaussian-rational example, 8,836 entries each. They do not separately expand +all 256 optimal examples entry by entry; validity of that entire family +follows from the proven normal-form and support arguments. All 1,716 candidate +root subsets are independently rank/determinant checked. + +There is no unresolved lower/upper gap within the stated fixed-pair problem. +Outside it, this package does not classify other punctures, optimize over +other designated pairs, price physical implementation, or assert any +multiplication exponent. No external posting or claim renewal was performed. + +The exact upstream heads, Git blobs and SHA-256 pins are retained in +SOURCES.json. After the original research session, Codex authenticated these +bytes against the pinned Git objects and checked the transcribed PR1020 data. +REPLAY.json records that later local verification separately from the original +research-session executions. The mathematics and both checkers are +self-contained and do not require an upstream checkout. diff --git a/research/complex-paired26-completion/verify.py b/research/complex-paired26-completion/verify.py new file mode 100644 index 0000000000..f59630a326 --- /dev/null +++ b/research/complex-paired26-completion/verify.py @@ -0,0 +1,671 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# New fixed-puncture investigation: ChatGPT for Andrey Mas, 2026-10-14. +# Root/pairing conventions and the 69-cost baseline are credited in ATTRIBUTION.md. +"""Exact stdlib replay of the fixed 26-puncture completion minimum 62. + +No network, third-party packages, floating point, symbolic algebra package, +positivity assumption, or assertions. See proof.md for the universal proof. +All arrays representing normal matrices are ROWS; paired normals are COLUMNS. +""" +from __future__ import annotations + +import argparse +import copy +import hashlib +import json +import sys +from collections import Counter +from fractions import Fraction as Q +from itertools import combinations, product +from math import gcd +from pathlib import Path + +P = [0, 23, 24, 25, 26, 34, 35, 36, 37, 48, 60, 61, 62, 63, 66, 67, + 72, 73, 76, 77, 78, 79, 82, 83, 88, 89] +FIXED_A = [Q(x, 2) for x in (1, -1, -1, -1, 1, 1, -1, 1)] +FIXED_B = list(map(Q, (0, 0, 0, 0, 0, 0, -2, 2))) +ELIGIBLE_B = [23, 25, 30, 34, 36, 61, 63, 66, 73, 77, 79, 82, 89] +SIX_PAIRS = [(23, 34), (25, 36), (61, 77), (63, 79), (66, 82), (73, 89)] +OPTIMAL_ROOTS = [23, 25, 30, 61, 63, 66, 73] +SCHEMA = 'fixed-paired26-completion-v1' + +PRIOR_A = [ + ['1/2', 1, 0, 0, 0, 0, 0, 0], + ['-1/2', 0, 1, 0, 0, 0, 0, 0], + ['-1/2', 0, 0, 1, 0, 0, 0, 0], + ['-1/2', 0, 0, 0, 1, 0, 0, 0], + ['1/2', 0, 0, 0, 0, 1, 0, 0], + ['1/2', 0, 0, 0, 0, 0, 1, 0], + ['-1/2', 0, 0, 0, 0, 0, 0, 1], + ['1/2', 0, 0, 0, 0, 0, 0, 1], +] +PRIOR_B = [ + [0, 2, 0, 0, 0, 0, 0, 0], [0, 0, 2, 0, 0, 0, 0, 0], + [0, 0, 0, 2, 0, 0, 0, 0], [0, 0, 0, 0, 2, 0, 0, 0], + [0, 0, 0, 0, 0, 2, 0, 0], [0, 0, 0, 0, 0, 0, 2, 0], + [-2, 1, -1, -1, -1, 1, 1, 1], [2, -1, 1, 1, 1, -1, -1, 1], +] +BRANCH_A = [ + ['1/2', 0, 1, 0, 0, 0, 0, 0], + ['-1/2', 1, 0, 1, 0, 0, 0, 0], + ['-1/2', -1, 0, 1, 0, 0, 0, 0], + ['-1/2', 0, 0, 0, 1, 0, 0, 0], + ['1/2', 0, 0, 0, 0, 1, 0, 0], + ['1/2', 0, 0, 0, 0, 0, 1, 0], + ['-1/2', 0, 0, 0, 0, 0, 0, 1], + ['1/2', 0, 0, 0, 0, 0, 0, 1], +] + + +class VerificationError(RuntimeError): + """A mathematical premise, witness, or certificate check failed.""" + + +def need(condition, message): + if not condition: + raise VerificationError(message) + + +def rational_matrix(rows): + return [[Q(x) for x in row] for row in rows] + + +def encode_matrix(rows): + return [[str(x) for x in row] for row in rows] + + +def dot(a, b): + need(len(a) == len(b), 'dot-product shape mismatch') + return sum(x * y for x, y in zip(a, b)) + + +def tr(a): + need(bool(a) and len({len(r) for r in a}) == 1, 'transpose shape mismatch') + return list(map(list, zip(*a))) + + +def mm(a, b): + need(bool(a) and bool(b) and all(len(r) == len(b) for r in a), + 'matrix product shape mismatch') + return [[dot(row, col) for col in tr(b)] for row in a] + + +def matrix_add(a, b, sign=1): + need(len(a) == len(b) and all(len(x) == len(y) for x, y in zip(a, b)), + 'matrix addition shape mismatch') + return [[x + sign * y for x, y in zip(u, v)] for u, v in zip(a, b)] + + +def scale(a, s): + return [[s * x for x in row] for row in a] + + +def inverse(a): + """Rational Gauss-Jordan inversion, with explicit singularity errors.""" + n = len(a) + need(n > 0 and all(len(r) == n for r in a), 'inverse needs square matrix') + m = [[Q(x) for x in row] + [Q(i == j) for j in range(n)] + for i, row in enumerate(a)] + for k in range(n): + p = next((i for i in range(k, n) if m[i][k]), None) + need(p is not None, 'singular normal matrix') + m[k], m[p] = m[p], m[k] + pivot = m[k][k] + m[k] = [x / pivot for x in m[k]] + for i in range(n): + if i != k and m[i][k]: + f = m[i][k] + m[i] = [x - f * y for x, y in zip(m[i], m[k])] + return [r[n:] for r in m] + + +def det_int(a): + """Independent integer Bareiss determinant; every division is checked.""" + n = len(a) + need(all(len(r) == n and all(type(x) is int for x in r) for r in a), + 'integer determinant input') + if n == 0: + return 1 + m = [r[:] for r in a] + sign, previous = 1, 1 + for k in range(n - 1): + p = next((i for i in range(k, n) if m[i][k]), None) + if p is None: + return 0 + if p != k: + m[k], m[p] = m[p], m[k] + sign = -sign + pivot = m[k][k] + for i in range(k + 1, n): + for j in range(k + 1, n): + value, remainder = divmod(m[i][j] * pivot - m[i][k] * m[k][j], + previous) + need(remainder == 0, 'non-exact Bareiss division') + m[i][j] = value + m[i][k] = 0 + previous = pivot + return sign * m[-1][-1] + + +def primitive(v): + g = gcd(*v) + if g == 0: + return list(v) + if next(x for x in v if x) < 0: + g = -g + return [x // g for x in v] + + +def select_rows(rows, ids, ncols=8): + """Fraction-free streaming row selection, distinct from determinant check.""" + pivots, selected = {}, [] + for ident, row in zip(ids, rows): + v = list(row) + for p, w in sorted(pivots.items()): + if v[p]: + s, t = w[p], v[p] + v = primitive([s * x - t * y for x, y in zip(v, w)]) + p = next((i for i, x in enumerate(v) if x), None) + if p is not None: + pivots[p] = primitive(v) + selected.append(ident) + if len(pivots) == ncols: + break + return selected, sorted(pivots) + + +def bit_rank(rows): + pivots = {} + for row in rows: + while row: + p = row.bit_length() - 1 + if p not in pivots: + pivots[p] = row + break + row ^= pivots[p] + return len(pivots) + + +def dense_binary_rank(rows, ncols): + """Literal dense F2 elimination, independently cross-checking bit ranks.""" + m = [list(r) for r in rows] + need(all(len(r) == ncols and all(x in (0, 1) for x in r) for r in m), + 'dense binary input') + k = 0 + for j in range(ncols): + p = next((i for i in range(k, len(m)) if m[i][j]), None) + if p is None: + continue + m[k], m[p] = m[p], m[k] + for i in range(k + 1, len(m)): + if m[i][j]: + m[i] = [x ^ y for x, y in zip(m[i], m[k])] + k += 1 + return k + + +def binary_inverse(rows, n): + m = [r | (1 << (n + i)) for i, r in enumerate(rows)] + for j in range(n): + p = next((i for i in range(j, n) if (m[i] >> j) & 1), None) + need(p is not None, 'singular binary coordinate form') + m[j], m[p] = m[p], m[j] + for i in range(n): + if i != j and ((m[i] >> j) & 1): + m[i] ^= m[j] + need(all((m[i] & ((1 << n) - 1)) == 1 << i for i in range(n)), + 'binary inverse reduction failure') + return [r >> n for r in m] + + +def root_lines(): + roots = set() + for i, j in combinations(range(8), 2): + for signs in product((-2, 2), repeat=2): + v = [0] * 8 + v[i], v[j] = signs + v = tuple(v) + roots.add(max(v, tuple(-x for x in v))) + for v in product((-1, 1), repeat=8): + if sum(x < 0 for x in v) % 2 == 0: + roots.add(max(v, tuple(-x for x in v))) + return sorted(roots) + + +def check_pairing_formula(roots, pairing): + need(len(pairing) == 120, 'pairing shape') + for i, u in enumerate(roots): + expected = 0 + for j, v in enumerate(roots): + q, rem = divmod(dot(u, v), 4) + need(rem == 0, 'root dot product not divisible by four') + expected |= ((q + 1) & 1) << j + need(pairing[i] == expected, 'wrong pairing: unit label is mandatory') + + +def geometry(): + roots = root_lines() + need(len(roots) == 120 and all(dot(v, v) == 8 for v in roots), 'root generation') + need(P == sorted(set(P)) and len(P) == 26, 'fixed puncture') + live = [i for i in range(120) if i not in P] + pairing = [sum((((dot(u, v) // 4) + 1) & 1) << j + for j, v in enumerate(roots)) for u in roots] + check_pairing_formula(roots, pairing) + need(bit_rank(pairing) == 9, 'ambient pairing rank') + need(dense_binary_rank([[(r >> j) & 1 for j in range(120)] + for r in pairing], 120) == 9, 'dense ambient rank') + basis = [] + for i in range(120): + if bit_rank([pairing[j] for j in basis + [i]]) > len(basis): + basis.append(i) + if len(basis) == 9: + break + need(basis == [0, 1, 2, 3, 6, 12, 20, 30, 42], 'pairing-row label basis') + labels = [sum(((row >> b) & 1) << j for j, b in enumerate(basis)) + for row in pairing] + h = [labels[i] for i in basis] + hi = binary_inverse(h, 9) + need(bit_rank(labels) == 9, 'label span') + # Check the nondegenerate label form on every full-root ordered pair. + for i, li in enumerate(labels): + transformed = 0 + for k in range(9): + if (li >> k) & 1: + transformed ^= hi[k] + for j, lj in enumerate(labels): + need(((transformed & lj).bit_count() & 1) == ((pairing[i] >> j) & 1), + 'label-coordinate pairing reconstruction') + rows, cols = select_rows([roots[i] for i in live], live) + need(len(rows) == 8, 'live rational root rank') + minor = det_int([[roots[i][j] for j in cols] for i in rows]) + need(minor != 0, 'live root rank witness') + live_mask = sum(1 << i for i in live) + need(bit_rank([pairing[i] & live_mask for i in live]) == 9, 'live pairing rank') + g = {'roots': roots, 'live': live, 'pairing': pairing, 'labels': labels, + 'R': [[Q(x, 2) for x in roots[i]] for i in live]} + report = {'punctures': P, 'live_indices': live, 'root_count': 120, + 'root_sha256': hashlib.sha256(json.dumps(roots, separators=(',', ':')).encode()).hexdigest(), + 'ambient_pairing_rank': 9, 'live_pairing_rank': 9, + 'label_basis_pairing_rows': basis, 'labels': labels, + 'coordinate_form_inverse_rows': hi, 'pairing_reconstruction_entries': 14400, + 'live_root_rank': 8, 'live_root_minor_rows': rows, + 'live_root_minor_columns': cols, 'live_doubled_root_minor_determinant': minor} + return g, report + + +def support(g, normal): + return [i for i in g['live'] if dot(g['roots'][i], normal) != 0] + + +def label_dimension(g, indices): + return bit_rank(g['labels'][i] for i in indices) + + +def rectangle_rank(g, s, t): + mask = sum(1 << j for j in t) + rank = bit_rank(g['pairing'][i] & mask for i in s) + dense = [[(g['pairing'][i] >> j) & 1 for j in t] for i in s] + need(rank == dense_binary_rank(dense, len(t)), 'rectangular rank disagreement') + return rank + + +def kernel_inventory(g): + roots, live, labels = g['roots'], g['live'], g['labels'] + records, groups = [], {} + for lam in range(1, 512): + violations = [i for i in live if (labels[i] & lam).bit_count() & 1] + rows, cols = select_rows([roots[i] for i in violations], violations) + rank = len(rows) + need(rank in (7, 8), 'unexpected annihilator-matrix rank') + minor = det_int([[roots[i][j] for j in cols] for i in rows]) + need(minor != 0, 'invalid annihilator rank lower witness') + root = None + if rank == 7: + candidates = [j for j, v in enumerate(roots) + if all(dot(roots[i], v) == 0 for i in violations)] + need(len(candidates) == 1, 'rank-seven kernel is not one certified root line') + root = candidates[0] + # Nonzero kernel + nonzero 7-minor proves EXACT rank seven over Q and C. + need(any(roots[root]), 'zero kernel witness') + groups.setdefault(root, []).append(lam) + records.append({'lambda': lam, 'violation_count': len(violations), 'rank': rank, + 'minor_root_rows': rows, 'minor_columns': cols, + 'minor_determinant': minor, 'kernel_root_index': root}) + need(Counter(x['rank'] for x in records) == Counter({8: 482, 7: 29}), 'inventory totals') + need(sorted(groups) == sorted(P + [30]), 'complete reduced-direction set') + reduced = [] + for index in sorted(groups): + s = support(g, roots[index]) + dimension = label_dimension(g, s) + annihilators = [lam for lam in range(1, 512) + if all(((labels[i] & lam).bit_count() & 1) == 0 for i in s)] + need(annihilators == groups[index], 'kernel/support annihilator mismatch') + need(dimension == (7 if index == 0 else 8), 'reduced support dimension') + reduced.append({'root_index': index, 'dimension': dimension, + 'support': s, 'annihilator_functionals': annihilators}) + eligible_a = [i for i in sorted(groups) if dot(roots[i], FIXED_B) == 0] + eligible_b = [i for i in sorted(groups) if dot(roots[i], FIXED_A) == 0] + need(eligible_a == [30] and eligible_b == ELIGIBLE_B, 'fixed-pair perpendicular inventory') + c_dots = [dot(roots[30], roots[i]) for i in eligible_b] + need(all(c_dots), 'a reduced residual B direction is perpendicular to r30') + costs_c = [rectangle_rank(g, support(g, roots[30]), support(g, roots[i])) + for i in eligible_b] + need(costs_c == [7 if i == 30 else 8 for i in eligible_b], 'r30 pair charges') + return {'matrices': records, 'rank_histogram': {'7': 29, '8': 482}, + 'reduced_directions': reduced, 'eligible_residual_A_roots': eligible_a, + 'eligible_residual_B_roots': eligible_b, + 'doubled_root30_dot_eligible_B': c_dots, 'root30_pair_costs': costs_c} + + +def check_all_pairs(g, d, t): + need(len(d) == len(t) == 94 and all(len(row) == 8 for row in d + t), + 'decoder must have exactly 94 rows and eight terms') + zero_rhs = 0 + for i in range(94): + for j in range(94): + rhs = 2 * dot(g['R'][i], g['R'][j]) + need(dot(d[i], t[j]) == rhs, 'all-pairs identity fails at live positions %d,%d' % (i, j)) + zero_rhs += rhs == 0 + return {'ordered_entries_checked': 8836, 'zero_rhs_entries_checked': zero_rhs} + + +def term_reports(g, d, t, di=None, ti=None): + if di is None: + di = [[Q(0)] * 8 for _ in range(94)] + if ti is None: + ti = [[Q(0)] * 8 for _ in range(94)] + terms = [] + for k in range(8): + s = [index for p, index in enumerate(g['live']) if d[p][k] != 0 or di[p][k] != 0] + u = [index for p, index in enumerate(g['live']) if t[p][k] != 0 or ti[p][k] != 0] + terms.append({'term': k, 'D_support': s, 'T_support': u, + 'support_sizes': [len(s), len(u)], + 'label_dimensions': [label_dimension(g, s), label_dimension(g, u)], + 'copy_cost': rectangle_rank(g, s, u)}) + return terms + + +def check_claimed_bill(report, costs, total): + need(costs == [t['copy_cost'] for t in report['terms']], 'understated or altered separate term costs') + need(total == sum(costs) == report['total_copy_cost'], 'incorrect complete bill') + + +def verify_decoder(g, a, b, expected_costs=None): + need(len(a) == len(b) == 8 and all(len(row) == 8 for row in a + b), 'normal matrix dimensions') + need(tr(a)[0] == FIXED_A and tr(b)[0] == FIXED_B, 'designated first pair must be exact, not merely proportional') + two_i = [[Q(2 * (i == j)) for j in range(8)] for i in range(8)] + need(mm(a, tr(b)) == two_i, 'A B^T is not 2I') + need(mm(tr(a), b) == two_i, 'A^T B is not 2I') + d, t = mm(g['R'], a), mm(g['R'], b) + identity = check_all_pairs(g, d, t) + terms = term_reports(g, d, t) + result = {'A_rows': encode_matrix(a), 'B_rows': encode_matrix(b), + 'identity': identity, 'terms': terms, + 'total_copy_cost': sum(x['copy_cost'] for x in terms)} + if expected_costs is not None: + check_claimed_bill(result, expected_costs, sum(expected_costs)) + return result + + +def optimal_classification(g): + """Both a structural six-pair description and every 7-subset determinant.""" + roots = g['roots'] + for x, y in SIX_PAIRS: + need(tuple(u + v for u, v in zip(roots[x], roots[30])) == roots[y], 'six-pair addition') + canonical_columns = [[int(2 * x) for x in FIXED_B], roots[30]] + [roots[x] for x, _ in SIX_PAIRS] + canonical_det = det_int(tr(canonical_columns)) + need(canonical_det != 0, 'seven-dimensional configuration basis') + structural = set() + for singles in product(*SIX_PAIRS): + structural.add(tuple(sorted((30,) + singles))) + for doubled in range(6): + other_pairs = [pair for j, pair in enumerate(SIX_PAIRS) if j != doubled] + for singles in product(*other_pairs): + structural.add(tuple(sorted(SIX_PAIRS[doubled] + singles))) + direct, histogram = [], Counter() + for indices in combinations(ELIGIBLE_B, 7): + columns = [[int(2 * x) for x in FIXED_B]] + [roots[i] for i in indices] + determinant = det_int(tr(columns)) + histogram[str(determinant)] += 1 + if determinant: + direct.append(indices) + need(len(direct) == 256 and set(direct) == structural, 'optimal basis census') + need(sum(histogram.values()) == 1716, '7-subset census coverage') + return {'six_pairs': [list(p) for p in SIX_PAIRS], + 'doubled_canonical_basis_determinant': canonical_det, + 'subset_count': 1716, 'independent_count': 256, + 'containing_root30': sum(30 in s for s in direct), + 'not_containing_root30': sum(30 not in s for s in direct), + 'determinant_histogram': dict(sorted(histogram.items())), + 'optimal_unordered_B_root_sets': [list(s) for s in direct]} + + +def complex_control(g, a, b): + """Exact Q(i) shear via rational real/imaginary matrices, no complex floats.""" + ai, bi = [[Q(0)] * 8 for _ in range(8)], [[Q(0)] * 8 for _ in range(8)] + for row in range(8): + ai[row][1] = a[row][2] + bi[row][2] = -b[row][1] + d, di = mm(g['R'], a), mm(g['R'], ai) + t, ti = mm(g['R'], b), mm(g['R'], bi) + hermitian_failure = None + zero_rhs = 0 + for i in range(94): + for j in range(94): + rhs = 2 * dot(g['R'][i], g['R'][j]) + real = dot(d[i], t[j]) - dot(di[i], ti[j]) + imag = dot(d[i], ti[j]) + dot(di[i], t[j]) + need(real == rhs and imag == 0, 'complex ordinary-transpose identity') + zero_rhs += rhs == 0 + hr = dot(d[i], t[j]) + dot(di[i], ti[j]) + hi = dot(di[i], t[j]) - dot(d[i], ti[j]) + if hermitian_failure is None and (hr != rhs or hi != 0): + hermitian_failure = {'live_positions': [i, j], + 'root_indices': [g['live'][i], g['live'][j]], + 'computed_real': str(hr), 'computed_imag': str(hi), + 'required_real': str(rhs)} + ar_col, ai_col = tr(a)[1], tr(ai)[1] + need(any(ar_col) and any(ai_col), 'nonzero complex control column') + need(dot(ar_col, ar_col) - dot(ai_col, ai_col) == 0 and dot(ar_col, ai_col) == 0, + 'complex control is not isotropic') + need(hermitian_failure is not None, 'conjugate-transpose control failed to distinguish conventions') + need(tr(ai)[0] == [0] * 8 and tr(bi)[0] == [0] * 8, 'complex control moved first pair') + terms = term_reports(g, d, t, di, ti) + costs = [x['copy_cost'] for x in terms] + need(costs == [6, 8, 9, 8, 8, 8, 8, 8], 'complex shear bill') + # Independently realifying the two changed columns can preserve every + # actual support while destroying their dual compatibility. + bad_a = bad_b = None + chosen_t = chosen_s = None + for candidate in range(1, 20): + aa = copy.deepcopy(a) + for row in range(8): + aa[row][1] += candidate * a[row][2] + if support(g, tr(aa)[1]) == terms[1]['D_support']: + chosen_t, bad_a = candidate, aa + break + need(bad_a is not None, 'realification control A parameter') + for candidate in range(1, 20): + if candidate == chosen_t: + continue + bb = copy.deepcopy(b) + for row in range(8): + bb[row][2] -= candidate * b[row][1] + if support(g, tr(bb)[2]) == terms[2]['T_support']: + chosen_s, bad_b = candidate, bb + break + need(bad_b is not None, 'realification control B parameter') + for k in range(8): + need(support(g, tr(bad_a)[k]) == terms[k]['D_support'] and + support(g, tr(bad_b)[k]) == terms[k]['T_support'], + 'realification did not preserve an actual support') + expect_rejection('support-preserving independent realification', + lambda: verify_decoder(g, bad_a, bad_b)) + return {'construction': 'A[:,1] += i*A[:,2]; B[:,2] -= i*B[:,1], using pre-shear columns', + 'A_real_rows': encode_matrix(a), 'A_imag_rows': encode_matrix(ai), + 'B_real_rows': encode_matrix(b), 'B_imag_rows': encode_matrix(bi), + 'isotropic_A_column': 1, 'isotropic_ordinary_square': ['0', '0'], + 'ordered_complex_entries_checked': 8836, 'zero_rhs_entries_checked': zero_rhs, + 'terms': terms, 'total_copy_cost': sum(costs), + 'hermitian_failure': hermitian_failure, + 'support_preserving_but_incompatible_realification': { + 'A_parameter': chosen_t, 'B_parameter': chosen_s, + 'all_sixteen_supports_preserved': True, 'dual_identity_rejected': True}} + + +def expect_rejection(name, call): + try: + call() + except VerificationError: + return name + raise VerificationError('negative control incorrectly accepted: ' + name) + + +def first_difference(a, b, path='$'): + if type(a) is not type(b): + return path + ' (type)' + if isinstance(a, dict): + if a.keys() != b.keys(): + return path + ' (keys)' + for k in a: + d = first_difference(a[k], b[k], path + '.' + k) + if d: + return d + elif isinstance(a, list): + if len(a) != len(b): + return path + ' (length)' + for i, (x, y) in enumerate(zip(a, b)): + d = first_difference(x, y, path + '[' + str(i) + ']') + if d: + return d + elif a != b: + return path + return None + + +def compare_certificate(received, computed): + need(isinstance(received, dict), 'certificate must be an object') + need(received.get('schema') == SCHEMA, 'certificate schema') + records = received.get('inventory', {}).get('matrices', []) + need([r.get('lambda') for r in records] == list(range(1, 512)), + 'certificate must contain every nonzero functional exactly once, in order') + mismatch = first_difference(received, computed) + need(mismatch is None, 'certificate mismatch at ' + str(mismatch)) + + +def negative_controls(g, a, b, optimal, core): + names = [] + wrong_b = copy.deepcopy(b) + for row in range(8): + wrong_b[row][1] /= 2 + names.append(expect_rejection('wrong residual dual scale', lambda: verify_decoder(g, a, wrong_b))) + names.append(expect_rejection('inverse instead of inverse transpose', + lambda: verify_decoder(g, a, scale(inverse(a), 2)))) + singular_a = copy.deepcopy(a) + for row in range(8): + singular_a[row][2] = singular_a[row][1] + names.append(expect_rejection('singular residual normal basis', + lambda: verify_decoder(g, singular_a, b))) + gauge_a, gauge_b = copy.deepcopy(a), copy.deepcopy(b) + for row in range(8): + gauge_a[row][0] *= 2 + gauge_b[row][0] /= 2 + names.append(expect_rejection('untracked gauge change of designated first pair', + lambda: verify_decoder(g, gauge_a, gauge_b))) + names.append(expect_rejection('undercharged separate invoice', + lambda: check_claimed_bill(optimal, [6, 7, 8, 8, 8, 8, 8, 8], 61))) + forged_terms = copy.deepcopy(optimal['terms']) + forged_terms[1]['D_support'].pop() + names.append(expect_rejection('deleted ACTUAL nonzero support entry', + lambda: need(forged_terms == optimal['terms'], 'false actual support'))) + d, t = mm(g['R'], a), mm(g['R'], b) + bad_d = copy.deepcopy(d) + bad_d[0][1] += 1 + names.append(expect_rejection('altered decoder fails full ordered-entry identity', + lambda: check_all_pairs(g, bad_d, t))) + names.append(expect_rejection('ninth zero term violates exactly-eight contract', + lambda: check_all_pairs(g, [r + [Q(0)] for r in d], + [r + [Q(0)] for r in t]))) + no_unit = [r ^ ((1 << 120) - 1) for r in g['pairing']] + need(bit_rank(no_unit) == 8, 'no-unit control expected rank eight') + names.append(expect_rejection('omitted unit label', + lambda: check_pairing_formula(g['roots'], no_unit))) + # The same full recursive comparison used for external certificates. + bad = copy.deepcopy(core) + bad['inventory']['matrices'] = [r for r in bad['inventory']['matrices'] if r['lambda'] != 286] + names.append(expect_rejection('omitted functional 286', lambda: compare_certificate(bad, core))) + bad = copy.deepcopy(core) + bad['inventory']['matrices'][285]['rank'] = 8 + names.append(expect_rejection('false rank-eight claim at functional 286', + lambda: compare_certificate(bad, core))) + bad = copy.deepcopy(core) + bad['inventory']['matrices'][285]['kernel_root_index'] = 0 + names.append(expect_rejection('wrong kernel direction at functional 286', + lambda: compare_certificate(bad, core))) + bad = copy.deepcopy(core) + bad['inventory']['matrices'][0]['minor_determinant'] += 1 + names.append(expect_rejection('forged exact minor determinant', lambda: compare_certificate(bad, core))) + bad = copy.deepcopy(core) + bad['geometry']['punctures'][0] = 1 + names.append(expect_rejection('changed fixed puncture', lambda: compare_certificate(bad, core))) + return {'rejected': names, 'count': len(names), + 'additional_complex_controls': ['conjugate transpose disagrees', + 'independent support-preserving realification loses duality'], + 'wrong_no_unit_pairing_rank': 8} + + +def compute_certificate(): + g, geo = geometry() + # Reproduce the predecessor FIRST, before any new decoder or conclusion. + pa, pb = rational_matrix(PRIOR_A), rational_matrix(PRIOR_B) + prior = verify_decoder(g, pa, pb, [6, 9, 9, 9, 9, 9, 9, 9]) + inventory = kernel_inventory(g) + b = tr([FIXED_B] + [[Q(x, 2) for x in g['roots'][i]] for i in OPTIMAL_ROOTS]) + a = scale(tr(inverse(b)), 2) + optimal = verify_decoder(g, a, b, [6, 8, 8, 8, 8, 8, 8, 8]) + ba = rational_matrix(BRANCH_A) + bb = scale(tr(inverse(ba)), 2) + branch = verify_decoder(g, ba, bb, [6, 7, 9, 9, 9, 9, 9, 9]) + need(tr(ba)[1] == [Q(x, 2) for x in g['roots'][30]] == tr(bb)[1], '67-branch paired root') + classification = optimal_classification(g) + complex_example = complex_control(g, a, b) + core = {'schema': SCHEMA, 'geometry': geo, 'prior_69': prior, 'inventory': inventory, + 'minimum': 62, 'lower_bound_branches': {'no_reduced_residual_A': 62, + 'a_reduced_residual_A_exists': 67}, + 'optimal_62': optimal, 'sharp_reduced_A_branch_67': branch, + 'optimal_classification': classification, 'complex_isotropic_control': complex_example} + controls = negative_controls(g, a, b, optimal, core) + core['negative_controls'] = controls + return core + + +def main(argv=None): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--certificate', type=Path, + default=Path(__file__).resolve().with_name('certificate.json')) + parser.add_argument('--write-certificate', action='store_true', + help='deliberately regenerate the specified certificate') + args = parser.parse_args(argv) + try: + computed = compute_certificate() + if args.write_certificate: + args.certificate.write_text(json.dumps(computed, indent=2, sort_keys=True) + '\n', encoding='utf-8') + print('WROTE_CERTIFICATE ' + str(args.certificate)) + else: + received = json.loads(args.certificate.read_text(encoding='utf-8')) + compare_certificate(received, computed) + print('PASS_FIXED_PAIRED26_MINIMUM_62') + print('prior=69 optimal=62 reduced_A_branch=67; all 8836 entries checked for each') + print('inventory: 511/511 functionals; rank8=482 rank7=29; 27 complex kernel lines') + print('optimal classes: 256/1716 seven-subsets; 64 with r30, 192 without') + print('Q(i) isotropic example: cost63; 8836 complex entries; ordinary transpose only') + print('negative controls: 14 rejected, plus 2 complex convention/compatibility controls') + return 0 + except (VerificationError, OSError, ValueError, TypeError, KeyError) as exc: + print('FAIL_FIXED_PAIRED26: ' + str(exc), file=sys.stderr) + return 1 + + +if __name__ == '__main__': + sys.exit(main())