diff --git a/research/tri-plane-port-p112-seeddb093026/CANDIDATE.json b/research/tri-plane-port-p112-seeddb093026/CANDIDATE.json new file mode 100644 index 0000000000..438d5c4b15 --- /dev/null +++ b/research/tri-plane-port-p112-seeddb093026/CANDIDATE.json @@ -0,0 +1 @@ +{"residual":[0],"groups":[[0],[1,2,3],[4,5,24],[12,13,78],[6,8,80],[7,9,83],[10,14,84],[11,15,81],[16,18,82],[17,19,77],[20,21,79],[25,28,32],[23,35,68],[22,37,69],[26,36,98],[27,38,72],[30,34,90],[33,41,64],[40,48,70],[29,39,87],[44,47,50],[43,45,96],[31,51,85],[42,46,86],[49,52,54],[53,55,93],[57,58,59],[56,61,92],[60,63,101],[62,66,105],[67,74,108],[73,75,88],[94,95,97],[65,99,107],[71,103,109],[89,100,110],[76,104,106],[91,102,111]],"matrices":[[[0]],[[0,0,0],[0,1,1],[0,1,1]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,1],[0,1,1]],[[0,0,0],[0,0,0],[0,0,0]],[[1,1,0],[1,0,0],[0,0,1]],[[1,1,0],[1,1,0],[0,0,1]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,1],[0,0,0],[1,0,0]],[[0,0,0],[0,0,0],[0,0,1]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,0,0],[0,0,0]]],"matrix_rank_hist":{"0":32,"1":2,"2":3,"3":1},"copy_hist":{"8":8,"7":3},"copy_charge":85,"terms":[{"group":[1,2,3],"left_coeff":6,"right_coeff":6,"left_label":96,"right_label":96,"left_support":[2,3,8,9,12,13,16,17,20,21,22,23,27,28,32,35,39,40,41,42,45,48,52,53,54,55,57,58,62,63,64,65,68,69,70,71,75,76,81,82,88,89,94,95,99,100,103,104,108,109,110,111],"right_support":[2,3,8,9,12,13,16,17,20,21,22,23,27,28,32,35,39,40,41,42,45,48,52,53,54,55,57,58,62,63,64,65,68,69,70,71,75,76,81,82,88,89,94,95,99,100,103,104,108,109,110,111],"copy_rank":8},{"group":[12,13,78],"left_coeff":4,"right_coeff":2,"left_label":506,"right_label":73,"left_support":[6,7,8,9,10,11,31,32,33,34,35,36,37,38,39,40,41,42,43,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,78,86,87,88,89,90,91,98,99,100,101,102,103,104,105,106,107,108,109,110,111],"right_support":[1,2,4,5,7,8,10,11,13,16,18,19,20,21,24,25,28,31,33,34,38,41,42,44,45,46,47,48,51,54,55,57,59,60,62,63,66,67,70,71,73,74,76,79,82,85,87,88,90,91,93,94,96,97,100,103,105,106,108,109],"copy_rank":8},{"group":[12,13,78],"left_coeff":6,"right_coeff":4,"left_label":435,"right_label":506,"left_support":[1,2,4,5,6,9,13,16,18,19,20,21,24,25,28,32,35,36,37,39,40,43,44,45,46,47,48,51,54,55,58,61,64,65,68,69,72,75,78,79,82,85,86,89,93,94,96,97,98,99,101,102,104,107,110,111],"right_support":[6,7,8,9,10,11,31,32,33,34,35,36,37,38,39,40,41,42,43,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,78,86,87,88,89,90,91,98,99,100,101,102,103,104,105,106,107,108,109,110,111],"copy_rank":8},{"group":[7,9,83],"left_coeff":3,"right_coeff":1,"left_label":80,"right_label":21,"left_support":[1,3,7,9,13,16,18,19,22,23,26,28,31,32,35,36,37,38,41,42,44,49,50,51,54,55,57,59,60,61,64,65,68,69,72,73,74,76,80,82,87,89,93,95,98,100,103,105,106,107,110,111],"right_support":[0,2,3,4,5,7,12,13,14,15,20,21,22,23,24,25,27,28,29,30,31,35,36,37,45,46,47,51,52,53,54,55,56,57,58,59,60,67,68,69,70,71,72,78,80,86,88,89,90,91,93,99,100,101,102,107,108,109,110,111],"copy_rank":8},{"group":[7,9,83],"left_coeff":1,"right_coeff":2,"left_label":21,"right_label":69,"left_support":[0,2,3,4,5,7,12,13,14,15,20,21,22,23,24,25,27,28,29,30,31,35,36,37,45,46,47,51,52,53,54,55,56,57,58,59,60,67,68,69,70,71,72,78,80,86,88,89,90,91,93,99,100,101,102,107,108,109,110,111],"right_support":[0,1,2,4,5,9,12,14,15,16,18,19,20,21,24,25,26,27,29,30,32,38,41,42,44,45,46,47,49,50,52,53,56,58,61,64,65,67,70,71,73,74,76,78,82,86,87,88,90,91,95,98,99,101,102,103,105,106,108,109],"copy_rank":8},{"group":[7,9,83],"left_coeff":4,"right_coeff":4,"left_label":382,"right_label":382,"left_support":[4,10,14,18,20,22,24,25,26,27,28,30,31,32,34,35,37,38,40,42,44,45,47,48,50,51,53,55,57,58,60,61,63,65,67,69,71,74,83,85,86,87,88,89,91,92,93,94,95,97,98,99,100,102,103,104,106,107,109,111],"right_support":[4,10,14,18,20,22,24,25,26,27,28,30,31,32,34,35,37,38,40,42,44,45,47,48,50,51,53,55,57,58,60,61,63,65,67,69,71,74,83,85,86,87,88,89,91,92,93,94,95,97,98,99,100,102,103,104,106,107,109,111],"copy_rank":7},{"group":[10,14,84],"left_coeff":3,"right_coeff":3,"left_label":12,"right_label":12,"left_support":[0,7,8,9,10,11,12,13,14,15,26,27,28,29,30,31,32,33,34,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,78,79,85,86,93,94,95,96,97,98,99,100,101,102],"right_support":[0,7,8,9,10,11,12,13,14,15,26,27,28,29,30,31,32,33,34,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,78,79,85,86,93,94,95,96,97,98,99,100,101,102],"copy_rank":8},{"group":[10,14,84],"left_coeff":4,"right_coeff":4,"left_label":254,"right_label":254,"left_support":[5,11,15,19,21,23,24,25,26,27,28,29,31,32,33,35,36,38,39,41,44,45,46,48,49,51,52,54,57,58,59,61,62,64,67,68,70,73,84,85,86,87,88,89,90,92,93,94,95,96,98,99,100,101,103,104,105,107,108,110],"right_support":[5,11,15,19,21,23,24,25,26,27,28,29,31,32,33,35,36,38,39,41,44,45,46,48,49,51,52,54,57,58,59,61,62,64,67,68,70,73,84,85,86,87,88,89,90,92,93,94,95,96,98,99,100,101,103,104,105,107,108,110],"copy_rank":7},{"group":[16,18,82],"left_coeff":4,"right_coeff":1,"left_label":446,"right_label":49,"left_support":[3,9,13,17,22,23,25,26,27,29,30,31,33,34,35,36,37,39,40,43,44,45,46,47,49,50,52,53,56,57,59,60,62,63,66,68,69,72,75,82,85,86,87,88,90,91,92,93,94,96,97,98,99,101,102,103,105,106,108,109],"right_support":[0,3,4,5,6,9,10,11,13,14,15,16,22,23,24,26,27,31,36,37,38,39,40,44,45,48,49,50,51,52,53,58,59,60,61,62,63,70,71,72,73,74,75,80,81,85,86,89,90,91,92,95,96,97,100,101,102,103,110,111],"copy_rank":8},{"group":[16,18,82],"left_coeff":1,"right_coeff":4,"left_label":49,"right_label":446,"left_support":[0,3,4,5,6,9,10,11,13,14,15,16,22,23,24,26,27,31,36,37,38,39,40,44,45,48,49,50,51,52,53,58,59,60,61,62,63,70,71,72,73,74,75,80,81,85,86,89,90,91,92,95,96,97,100,101,102,103,110,111],"right_support":[3,9,13,17,22,23,25,26,27,29,30,31,33,34,35,36,37,39,40,43,44,45,46,47,49,50,52,53,56,57,59,60,62,63,66,68,69,72,75,82,85,86,87,88,90,91,92,93,94,96,97,98,99,101,102,103,105,106,108,109],"copy_rank":8},{"group":[17,19,77],"left_coeff":4,"right_coeff":4,"left_label":508,"right_label":508,"left_support":[0,1,2,3,4,5,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111],"right_support":[0,1,2,3,4,5,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111],"copy_rank":7}],"local_profile":{"1":2412,"2":418,"3":432,"4":142,"5":82,"8":8,"7":3},"covers_examined":10000,"passes_target":false} diff --git a/research/tri-plane-port-p112-seeddb093026/CLAIM.md b/research/tri-plane-port-p112-seeddb093026/CLAIM.md new file mode 100644 index 0000000000..66c955a00d --- /dev/null +++ b/research/tri-plane-port-p112-seeddb093026/CLAIM.md @@ -0,0 +1,3 @@ +Research claim and handoff: [Discussion #2024](https://github.com/CrocSwap/integer-mult-bounds/discussions/2024). + +Cycle 14 is submitted as [PR #2041](https://github.com/CrocSwap/integer-mult-bounds/pull/2041). It contains the exact tri-plane pairing factorization and 3,072 correction-operator cases, plus the 10,000-cover scoped search. The exact local screen misses `a=1/99` before physical route costs; no kappa or supplier claim is made. Remaining work is recorded in TASK.json and README.md. diff --git a/research/tri-plane-port-p112-seeddb093026/README.md b/research/tri-plane-port-p112-seeddb093026/README.md new file mode 100644 index 0000000000..287137fe24 --- /dev/null +++ b/research/tri-plane-port-p112-seeddb093026/README.md @@ -0,0 +1,65 @@ +# Exact tri-plane pairing factorization for selected P112 + +**New algebraic decoder mechanism; no new supplier or kappa.** Submitted as [PR #2041](https://github.com/CrocSwap/integer-mult-bounds/pull/2041). This package replaces the matched rank-2 grouping with 37 mutually orthogonal 3-planes and one residual line for the exact 112 selected PR1094 labels. The resulting F2 factorization reproduces the complete selected pairing matrix. Its B14 copied-information invoice is 85, down from 126 for the known matched 2-plane factorization. + +The construction does not meet the `a = 1/99` planning target even under the favorable three-unpaid-coordinate coverage law. Its exact fixed-word ceiling is `a = 0.010012347901`, just below `1/99`; the local `kappa` planning cap is `0.009913094550`. The screen assigns all idle mass optimistically at rank 51 and omits the physical tri-plane route, endpoint-translation multiplicity, hosting, frame/restoration schedule, precision and bit-side assembly. Those costs can only lower the attainable ceiling. No selected result, supplier or multiplication bound changes. + +## Exact construction + +The pinned source archive gives 112 distinct vectors `q_i` in `F2^9`, with weights 3 or 7. The bounded search enumerated 24,416 linearly independent triples that are pairwise orthogonal. With port 0 held as the residual line, deterministic MRV exact cover produced 37 disjoint triples. For each triple `t`, its columns form `A_t`; the residual line is `A_0`. The exact system + +`sum_t A_t M_t A_t^T + A_0 M_0 A_0^T = I_9` + +has rank 81 over 334 binary variables. The stored solution has 32 zero blocks and six nonzero blocks with rank histogram `{1:2, 2:3, 3:1}`. Factoring those six matrices into rank-one terms yields 11 terms. Recomputing the B14 support-pair ranks gives `{7:3, 8:8}`, for total copy charge 85. The verifier reconstructs both the 9-by-9 identity and the full 112-by-112 selected pairing matrix. + +For each active block with orthogonal basis labels `q_i`, define `C_E` as the product of the commuting lifts `C_q`, where `C_q^2 = X_q`. The exact dirty endpoint is `C_E^2 = X_(xor_i q_i)`. The verifier checks this Gaussian-dyadic identity on all 512 address basis states for each of the six active blocks: 3,072 cases total. This proves the correction-operator identity for arbitrary superpositions by linearity. The source-to-target tri-plane call itself and its schedule across hosted families are not implemented here. + +## Paid local screen + +The exact local profile is `{1:2412, 2:418, 3:432, 4:142, 5:82, 7:3, 8:8}`. It retains the selected word's non-centre profile and charges all 85 copied-information ranks as recursive children. With `m=73`, `w=896/9`, nine stages, idle rank cap `R=51`, and three unpaid coordinates, the idle mass is `13022/9`. At `a=1/99`, the exact rational relaxation is greater than one (`1.0002651999055365`). The certified ceiling is below the target, so this candidate cannot deliver the target even before its unimplemented physical route and precision/interface costs. + +This is an algebraic decoder invoice, not a complete supplier bill or a verified physical realization of the proposed source `E -> FULL` / target `0 -> E^perp` contract. The labels are read from the pinned selected archive; there are no added helpers or basis rotations inside each orthogonal triad. The correction translation is verified algebraically, while the full port operation, its application multiplicity, hosting, restoration, frame routing and precision remain outside this mechanism-level budget. The result is therefore evidence for a cheaper exact pairing factorization and an honest scoped miss, not an integrated construction. + +## Search scope and stopping rule + +`search.py` fixes residual port 0, enumerates triples in deterministic MRV/tuple order, and examines at most 10,000 exact covers. For each cover it uses the specified column-echelon solution (free coefficients zero), factors the resulting block matrices, recomputes every B14 support rank, and screens the exact local profile. The completed search examined 10,000 covers and found no candidate better than the first witness under that deterministic solver. It is **not** a lower bound over other residual ports, other coefficient solutions of the same linear systems, non-orthogonal subspaces, or other endpoint contracts. No universal impossibility claim is made. + +## Reproduce + +Run the exact certificate check (about 4 seconds on the recorded environment): + +```sh +python3 -B research/tri-plane-port-p112-seeddb093026/verify.py +``` + +Expected marker: + +```text +PASS_TRI_PLANE_FACTORIZATION_P112 triples=37 terms=11 copy=85 profile={1:2412,2:418,3:432,4:142,5:82,7:3,8:8} endpoint_cases=3072 moment_upper=1.000265199905537 a_cap=0.010012347901 target=FAIL controls=4 +``` + +Reproduce the bounded search (about 15 minutes on the recorded environment) with: + +```sh +python3 -B research/tri-plane-port-p112-seeddb093026/search.py --cover-limit 10000 +``` + +Then run the package metadata check and registered Python 3.12 replay: + +```sh +python3 scripts/research_package.py --package research/tri-plane-port-p112-seeddb093026 --check-only +python3.12 scripts/research_package.py --package research/tri-plane-port-p112-seeddb093026 +``` + +The registered replay checks the saved exact factorization and controls; it does not rerun the 10,000-cover search. Exact selected source, predecessor and base pins are listed in `SOURCES.json`, `TASK.json` and this note. + +## Predecessors, scope and credit + +The proposed three-unpaid-coordinate contract is a refinement of the `coverage-law-change` card; its complete physical implementation remains open. Discussion [#1587](https://github.com/CrocSwap/integer-mult-bounds/discussions/1587) established the exact 2-plane endpoint and framed the 2-plane decoder problem. Merged [PR #1825](https://github.com/CrocSwap/integer-mult-bounds/pull/1825) supplies the symmetric matched 2-plane P112 factorization and its copy invoice 126; this package changes the port dimension and the global block factorization. Open [PR #1900](https://github.com/CrocSwap/integer-mult-bounds/pull/1900) uses five planes on the different P111 bit decoder. The selected PR1094 labels and their authors retain attribution through the exact source pins. + +Prepared with substantial OpenAI Codex assistance. No independent human review or proof-assistant verification is claimed. New work is Apache-2.0. + +## Open next questions + +- Can a different residual port or nonzero free-variable choice lower the exact tri-plane invoice enough to pass `a=1/99`? This matters because the completed 10,000-cover search misses by a small amount; first optimize the 334-variable F2 solution against the exact B14 support-rank objective. The current search's fixed zero-free-variable solver is the blocker. +- Can a physical selected-word schedule realize the six active tri-plane endpoint translations with charged hosting, restoration and precision? This matters for any supplier claim; first map the six active block endpoints to the pinned T16 frame trace. No such route is part of this package. diff --git a/research/tri-plane-port-p112-seeddb093026/RESULT.json b/research/tri-plane-port-p112-seeddb093026/RESULT.json new file mode 100644 index 0000000000..1b94c0556a --- /dev/null +++ b/research/tri-plane-port-p112-seeddb093026/RESULT.json @@ -0,0 +1,31 @@ +{ + "status": "PASS_TRI_PLANE_FACTORIZATION_P112", + "ports": 112, + "dimension": 9, + "blocks": 38, + "triads": 37, + "orthogonal_triples_in_search_domain": 24416, + "covers_examined": 10000, + "matrix_rank_histogram": { + "0": 32, + "1": 2, + "2": 3, + "3": 1 + }, + "active_terms": 11, + "copy_rank_histogram": { + "7": 3, + "8": 8 + }, + "copy_charge": 85, + "endpoint_basis_cases": 3072, + "moment_at_1_over_99": [ + "115822797288443805445388423790371270852539319679901223048546697746784671681465/115792089237316195423570985008687907853269984665640564039457584007913129639936", + "28955699322110951361347105947592817713134829919975305762136674436696167920377/28948022309329048855892746252171976963317496166410141009864396001978282409984" + ], + "a_ceiling": "10012347901/1000000000000", + "a_ceiling_decimal": "0.010012347901", + "kappa_cap": "10012347901/1010012347901", + "passes_a_1_over_99": false, + "negative_controls": 4 +} diff --git a/research/tri-plane-port-p112-seeddb093026/SOURCES.json b/research/tri-plane-port-p112-seeddb093026/SOURCES.json new file mode 100644 index 0000000000..bbd568542a --- /dev/null +++ b/research/tri-plane-port-p112-seeddb093026/SOURCES.json @@ -0,0 +1,36 @@ +{ + "schema_version": 1, + "base_commit": "ec94fd3d2fcad7ade8e72d6bcd8e223b7fdb3f30", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "input", + "git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "06c96f5579bb67ed1b86d334e78fbed7da6945f1", + "sha256": "6686ad58f1fbdbc87134a78901b60fd53a20d3984355e91defbbebc9e9fa8075" + }, + { + "path": "research/community-frontier1094-audit/SELECTED-SOURCE.json", + "usage": "input", + "git_blob": "6a75493790b4eff9c4a98051ef8b01d6aad0d5a8", + "sha256": "79b3de5db3dbcb9829789ba58e9e45758926031e2a7d80667a08429d369be53b" + }, + { + "path": "research/community-frontier1094-audit/selected-replay.tar.gz", + "usage": "input", + "git_blob": "c24daf067f9c543421d89ca2eeaa4eb78a57fb6f", + "sha256": "f1da80610bf33c58527f18ad63b4350d0b864e1d4486141ee17ac9bed4d529d6" + }, + { + "path": "research/complex-local-word-ceiling/ceiling.py", + "usage": "input", + "git_blob": "6c0f54527d879396f689523bfde19928a9b6157c", + "sha256": "86a1432870b3b21d8454106ec9162fddc0471472d9214c590a1420f2426cedfc" + } + ] +} diff --git a/research/tri-plane-port-p112-seeddb093026/TASK.json b/research/tri-plane-port-p112-seeddb093026/TASK.json new file mode 100644 index 0000000000..e59f1fa563 --- /dev/null +++ b/research/tri-plane-port-p112-seeddb093026/TASK.json @@ -0,0 +1,112 @@ +{ + "schema_version": 1, + "task_id": "coverage-law-change", + "priority_revision": 3, + "base_commit": "ec94fd3d2fcad7ade8e72d6bcd8e223b7fdb3f30", + "original_card": { + "id": "coverage-law-change", + "question": "Can a template or call contract leave two or more unpaid coordinates per live family?", + "starting_points": [ + "research/complex-local-word-ceiling/README.md", + "research/idle-axis-hosting/PROOF.md", + "certificates/selected-result.json" + ], + "methods": [ + "State a replacement for the coverage identity (mass = 72W + 64N) and the contract change that realizes it, with its implementation cost.", + "Find an obstruction: show which data-endpoint obligation forces exactly one unpaid coordinate in the current template." + ], + "acceptance_gate": "An explicit replacement identity, verified on a small complete instance with dirty inputs, priced with ceiling.ceiling(unpaid=...).", + "first_step": { + "command": [ + "python3", + "-B", + "research/complex-local-word-ceiling/verify.py" + ], + "expected": "PASS_COMPLEX_LOCAL_WORD_CEILING", + "inspect": "Read the selected word's per-call local profile, its packing ceiling and the lever table; run levers.py for the ideal budget of the lever you target.", + "scope": "Positive control and planning budget only; this is not a new construction or full cold replay." + }, + "first_experiment": "Explain where the single unpaid coordinate per family comes from in the hosted template; propose one change and price it. Ideal budget: two unpaid coordinates per family is 3.77x (levers.py).", + "bottleneck_link": "The deficit is one coordinate per family minus the centre charge; doubling unpaid coordinates per family scales it directly.", + "allowed_variations": [ + "One template change or one endpoint-contract change.", + "If the coverage law, template or guard changes, derive an applicable fully charged replacement bound instead of applying the incumbent ceiling outside its scope." + ], + "scope_change_triggers": [ + "Counting a coordinate as unpaid while leaving it unadvanced in the data endpoint." + ], + "overlap_terms": [ + "coverage identity", + "unpaid coordinate", + "deficit law", + "W - 64N" + ] + }, + "scope_status": "refined", + "actual_scope": "For the pinned 112 selected PR1094 complex labels, test an algebraic rank-3 port decoder: 37 mutually orthogonal 3-plane blocks plus one residual line, an exact global F2 pairing factorization, exact correction-operator identity, and B14 support-rank pricing under the proposed three-unpaid-coordinate law.", + "scope_change_reason": "All selector-suggested connector, centre-sharing and two-call persistent-boundary scopes have close live or completed results. The selected recursive-interface card is refined from generic two-or-more unpaid coordinates to an explicit rank-3 port endpoint and global triad decoder, distinct from the matched rank-2 plane construction in PR1825 and the P111 bit planes in PR1900. The result checks the global factorization and correction identity but does not claim a physical implementation of the complete source/target port contract.", + "bottleneck_link": "Three unpaid coordinates per live family change the fixed-word paid-mass deficit from w-64 to 3w-C. The selected local word with its 64-centre bill has a favorable exact relaxation at a=1/99, leaving a small but positive invoice margin for a rank-3 decoder.", + "budget_minutes": 60, + "stop_rule": "Use the fixed residual port 0 and deterministic MRV order to enumerate at most 10,000 lexicographic exact covers by independent pairwise-orthogonal triples. Stop earlier on the first exact factorization whose exact full local moment passes a=1/99. If none passes, record the lowest exact moment in the completed domain. Never infer a universal obstruction from this finite search. Reserve the final 25% for verification and handoff.", + "outcome": "partial", + "evidence": "The first 10,000 deterministic MRV triad covers at fixed residual port 0 were checked. Best selected by the fixed column-echelon/free-zero solver: exact algebraic 37-triad plus one-line factorization and correction identity; matrix rank histogram {0:32,1:2,2:3,3:1}; copy profile {7:3,8:8}, total 85; 3,072 exact dirty endpoint basis cases; four negative controls; exact moment upper at a=1/99 is 1.0002651999055365 and the fixed-word ceiling is a=0.010012347901. No target pass; this is not a universal lower bound.", + "author": "OpenAI Codex", + "ai_assistance": "Substantial OpenAI Codex assistance in mathematical construction, exact search, verification and writing; no independent human review claimed.", + "open_questions": [ + { + "question": "Can another residual port or nonzero free-variable solution lower the tri-plane support-rank invoice enough to pass a=1/99?", + "why_it_matters": "The exact bounded cover search is close to the planning target but its fixed solver misses by 0.0002652 in moment.", + "first_step": "Optimize the 334-variable F2 solution for the best fixed triad cover against exact B14 support-rank prices, then test other residual ports only if the cost has headroom.", + "blocked_by": "The current search fixes residual port 0 and sets free linear-system coefficients to zero." + }, + { + "question": "Can the six active tri-plane endpoint translations be realized in the pinned T16 frame trace with hosting, restoration and precision charged?", + "why_it_matters": "A local decoder invoice is not a supplier unless its endpoint operations compose with the selected physical route.", + "first_step": "Map the six active block endpoints to the exact selected T16 frame events and derive a full charged adapter schedule.", + "blocked_by": "No tri-plane physical route or application-multiplicity proof is included here." + } + ], + "track": "recursive-interfaces", + "seed": "db0930263249627c08276af863ab6e78", + "selector_base_commit": "ec94fd3d2fcad7ade8e72d6bcd8e223b7fdb3f30", + "catalog_sha256": "6686ad58f1fbdbc87134a78901b60fd53a20d3984355e91defbbebc9e9fa8075", + "selected_record_sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32", + "claim_discussion": "https://github.com/CrocSwap/integer-mult-bounds/discussions/2024", + "selector_suggestions_reviewed": [ + "connector-alphabet-change: paid frame extension excluded at 73 maps by PR1945; nearby charged connector constructions PR1518 and PR1954", + "centre-path-sharing: one-pair scalar source-rank result PR1918 and current hosted-centre claim #1516", + "persistent-boundary: cross-fed pair handoff PR1917, three-stage prefix shear PR1930, and dirty-anchor claims in #1167 comments 18925817 and 18927047" + ], + "exact_research_base": "ec94fd3d2fcad7ade8e72d6bcd8e223b7fdb3f30", + "predecessors": [ + { + "reference": "Discussion #1587", + "url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/1587", + "role": "Established the exact plane-port endpoint and opened the changed-coverage decoder question." + }, + { + "reference": "PR #1825", + "head": "d16fb8936795ff101e4d2f63cfdc6a25066ebabf", + "state": "merged", + "role": "Matched 2-plane P112 global factorization and copy invoice 126; this package changes the port dimension and triad partition." + }, + { + "reference": "PR #1900", + "head": "9a891c9cb25b15f5a189bcad1d022198adeaf885", + "state": "open at last query", + "role": "Five 2-plane queries for distinct P111 bit decoder; different selected word and dimension." + }, + { + "reference": "PR #1348", + "role": "Coverage-law threshold analysis, no tri-plane construction." + } + ], + "submission": { + "status": "open pull request", + "pr_number": 2041, + "pr_url": "https://github.com/CrocSwap/integer-mult-bounds/pull/2041", + "branch": "research/tri-plane-p112-seeddb093026", + "submission_base_commit": "c676548106012571fefa1dce0ec16f1bcfe11dce", + "upstream_push": "403; pushed through the existing account fork" + } +} diff --git a/research/tri-plane-port-p112-seeddb093026/VERIFY.json b/research/tri-plane-port-p112-seeddb093026/VERIFY.json new file mode 100644 index 0000000000..d5e3507675 --- /dev/null +++ b/research/tri-plane-port-p112-seeddb093026/VERIFY.json @@ -0,0 +1,23 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "certificates/selected-result.json", + "research/community-frontier1094-audit/SELECTED-SOURCE.json", + "research/community-frontier1094-audit/selected-replay.tar.gz", + "research/complex-local-word-ceiling/ceiling.py" + ], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "selected record, source-manifest, source archive and ceiling-engine pins; orthogonal triad partition; exact 9x9 F2 identity and 112x112 decoder; exact per-term B14 support ranks; Gaussian-dyadic dirty endpoints on all active blocks; three-unpaid rational moment; omitted-term, corrupt-matrix, wrong-endpoint and nonorthogonal-triad negative controls." + } + ] +} diff --git a/research/tri-plane-port-p112-seeddb093026/search.py b/research/tri-plane-port-p112-seeddb093026/search.py new file mode 100755 index 0000000000..b48c928ae1 --- /dev/null +++ b/research/tri-plane-port-p112-seeddb093026/search.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python3 +"""Bounded deterministic MRV cover/factor search for the tri-plane P112 experiment.""" +from __future__ import annotations + +import argparse +import json +from fractions import Fraction as Q +from pathlib import Path +import sys + +PACKAGE = Path(__file__).resolve().parent +ROOT = PACKAGE.parents[1] +sys.path.insert(0, str(PACKAGE)) +import verify as V # noqa: E402 +sys.path.insert(0, str(ROOT / "research/complex-local-word-ceiling")) +import ceiling # noqa: E402 + + +def main() -> None: + parser = argparse.ArgumentParser() + parser.add_argument("--cover-limit", type=int, default=10_000) + parser.add_argument("--out", type=Path, default=PACKAGE / "CANDIDATE.json") + args = parser.parse_args() + if args.cover_limit < 1: + raise SystemExit("cover-limit must be positive") + + labels = V.load_labels() + triple_count = len(V.candidate_triples(labels, residual=0)) + V.need(triple_count == 24_416, "candidate triple domain drift") + best = None + examined = 0 + for cover in V.iter_orthogonal_covers(labels, residual=0): + examined += 1 + groups = [[0], *[list(edge) for edge in cover]] + matrices = V.solve_identity(groups, labels) + if matrices is None: + if examined >= args.cover_limit: + break + continue + terms = [term for g, matrix in zip(groups, matrices) + for term in V.factor_matrix(g, matrix, labels)] + hist: dict[int, int] = {} + for term in terms: + charge = term["copy_rank"] + V.need(charge > 0, "zero-rank support term outside the priced interface") + hist[charge] = hist.get(charge, 0) + 1 + copy_charge = sum(r * n for r, n in hist.items()) + profile = V.CORE.copy() + for r, n in hist.items(): + profile[r] = profile.get(r, 0) + n + moment = ceiling.relax(profile, 73, 896, 9, copy_charge, + Q(1, 99), unpaid=3) + key = (moment[1], copy_charge, len(terms), tuple(sorted(hist.items()))) + if best is None or key < best[0]: + best = (key, groups, matrices, terms, hist, profile) + print("BEST", f"covers={examined}", f"copy={copy_charge}", + f"terms={len(terms)}", f"hist={dict(sorted(hist.items()))}", + f"moment_upper={float(moment[1]):.15f}", flush=True) + if moment[1] < 1: + break + if examined >= args.cover_limit: + break + if best is None: + raise SystemExit(f"no exact factorization among {examined} covers") + + key, groups, matrices, terms, hist, profile = best + charge = sum(r * n for r, n in hist.items()) + cap = ceiling.ceiling(profile, 73, 896, 9, charge, + grid=Q(1, 10**12), unpaid=3)[1] + candidate = { + "residual": [0], + "groups": groups, + "matrices": matrices, + "matrix_rank_hist": { + str(r): sum(V.matrix_rank(m) == r for m in matrices) + for r in sorted({V.matrix_rank(m) for m in matrices}) + }, + "copy_hist": {str(r): n for r, n in sorted(hist.items())}, + "copy_charge": charge, + "terms": terms, + "local_profile": {str(r): n for r, n in sorted(profile.items())}, + "covers_examined": examined, + "passes_target": key[0] < 1, + "moment_upper_at_1_over_99": str(key[0]), + "a_ceiling": str(cap), + } + args.out.parent.mkdir(parents=True, exist_ok=True) + args.out.write_text(json.dumps(candidate, separators=(",", ":")) + "\n", + encoding="utf-8") + print("PASS_TRI_PLANE_SEARCH", f"covers={examined}", + f"triples={len(groups)-1}", f"terms={len(terms)}", f"copy={charge}", + f"moment_upper={float(key[0]):.15f}", f"a_cap={float(cap):.12f}", + f"target={'PASS' if key[0] < 1 else 'MISS'}", f"certificate={args.out}") + + +if __name__ == "__main__": + main() diff --git a/research/tri-plane-port-p112-seeddb093026/verify.py b/research/tri-plane-port-p112-seeddb093026/verify.py new file mode 100755 index 0000000000..49c163d8ff --- /dev/null +++ b/research/tri-plane-port-p112-seeddb093026/verify.py @@ -0,0 +1,435 @@ +#!/usr/bin/env python3 +"""Exact checker for a three-dimensional port decoder on selected PR1094 labels.""" +from __future__ import annotations + +import hashlib +import json +import tarfile +from fractions import Fraction as Q +from pathlib import Path +import sys + +ROOT = Path(__file__).resolve().parents[2] +PACKAGE = Path(__file__).resolve().parent +ARCHIVE = ROOT / "research/community-frontier1094-audit/selected-replay.tar.gz" +ARCHIVE_SHA256 = "f1da80610bf33c58527f18ad63b4350d0b864e1d4486141ee17ac9bed4d529d6" +SOURCE_MANIFEST = ROOT / "research/community-frontier1094-audit/SELECTED-SOURCE.json" +SOURCE_MANIFEST_SHA256 = "79b3de5db3dbcb9829789ba58e9e45758926031e2a7d80667a08429d369be53b" +ENTRY = "candidate/strict/global/base/work/complex-nine-native/DATA-PHASES.json" +PAYLOAD_SHA256 = "c5916ff312678f12aba403847643fbbc29f643acec60bdf836fa56cd3e8251fa" +SELECTED_SHA256 = "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32" +N = 9 +PORTS = 112 +CORE = {1: 2412, 2: 418, 3: 432, 4: 142, 5: 82} + + +def need(condition: bool, message: str) -> None: + if not condition: + raise ValueError(message) + + +def load_labels() -> list[int]: + selected = ROOT / "certificates/selected-result.json" + need(hashlib.sha256(selected.read_bytes()).hexdigest() == SELECTED_SHA256, + "selected-result pin") + selected_record = json.loads(selected.read_text(encoding="utf-8")) + need(selected_record["source_manifest"] == + "research/community-frontier1094-audit/SELECTED-SOURCE.json", + "selected source-manifest pointer") + need(hashlib.sha256(SOURCE_MANIFEST.read_bytes()).hexdigest() == SOURCE_MANIFEST_SHA256, + "selected source-manifest pin") + need(hashlib.sha256(ARCHIVE.read_bytes()).hexdigest() == ARCHIVE_SHA256, + "selected archive pin") + with tarfile.open(ARCHIVE, "r:gz") as tf: + member = tf.extractfile(ENTRY) + need(member is not None, "selected DATA-PHASES entry") + payload = member.read() + need(hashlib.sha256(payload).hexdigest() == PAYLOAD_SHA256, "selected payload pin") + data = json.loads(payload) + recipes = sorted(data["recipes"], key=lambda row: row["port"]) + need(data["ports"] == PORTS and len(recipes) == PORTS, "selected port count") + need([row["port"] for row in recipes] == list(range(PORTS)), "selected port ordering") + labels = [row["q"] for row in recipes] + need(len(set(labels)) == PORTS, "selected labels are not distinct") + need(all(0 < q < (1 << N) for q in labels), "label outside F2^9") + need({q.bit_count() for q in labels} == {3, 7}, "selected label weights") + return labels + + +def dot(a: int, b: int) -> int: + return (a & b).bit_count() & 1 + + +def rank_vectors(vectors: list[int]) -> int: + pivots: dict[int, int] = {} + for value in vectors: + v = value + while v: + p = v.bit_length() - 1 + if p in pivots: + v ^= pivots[p] + else: + pivots[p] = v + break + return len(pivots) + + +def rank_rows(rows: list[int], width: int) -> int: + a = list(rows) + rank = 0 + for col in range(width): + pivot = next((i for i in range(rank, len(a)) if (a[i] >> col) & 1), None) + if pivot is None: + continue + a[rank], a[pivot] = a[pivot], a[rank] + for i in range(len(a)): + if i != rank and ((a[i] >> col) & 1): + a[i] ^= a[rank] + rank += 1 + return rank + + +def matrix_rank(matrix: list[list[int]]) -> int: + width = len(matrix[0]) if matrix else 0 + rows = [sum((value & 1) << j for j, value in enumerate(row)) for row in matrix] + return rank_rows(rows, width) + + +def validate_groups(groups: list[list[int]], labels: list[int]) -> None: + need(len(groups) == 38, "expected 37 triads and one line") + need(groups[0] == [0] and len(groups[0]) == 1, "residual-line convention") + need(all(len(g) == 3 for g in groups[1:]), "non-triad block") + flat = [i for group in groups for i in group] + need(sorted(flat) == list(range(PORTS)), "port groups are not a partition") + for g in groups[1:]: + need(valid_triad(g, labels), "invalid orthogonal 3-plane") + + +def valid_triad(group: list[int], labels: list[int]) -> bool: + return (len(group) == 3 + and rank_vectors([labels[i] for i in group]) == 3 + and all(dot(labels[i], labels[j]) == 0 + for k, i in enumerate(group) for j in group[k + 1:])) + + +def validate_matrix_factorization(groups: list[list[int]], matrices: list[list[list[int]]], + labels: list[int]) -> None: + need(len(matrices) == len(groups), "one coefficient matrix per block") + for g, m in zip(groups, matrices): + need(len(m) == len(g) and all(len(row) == len(g) for row in m), + "coefficient matrix dimensions") + need(all(value in (0, 1) for row in m for value in row), "nonbinary coefficient") + for r in range(N): + for c in range(N): + got = 0 + for g, m in zip(groups, matrices): + for a, i in enumerate(g): + for b, j in enumerate(g): + got ^= m[a][b] & ((labels[i] >> r) & 1) & ((labels[j] >> c) & 1) + need(got == (r == c), "global 9x9 coefficient identity") + + +def candidate_triples(labels: list[int], residual: int = 0) -> list[tuple[int, int, int]]: + edges = [] + for i in range(PORTS): + if i == residual: + continue + for j in range(i + 1, PORTS): + if j == residual or dot(labels[i], labels[j]): + continue + for k in range(j + 1, PORTS): + if (k != residual and not dot(labels[i], labels[k]) + and not dot(labels[j], labels[k])): + edges.append((i, j, k)) + return edges + + +def iter_orthogonal_covers(labels: list[int], residual: int = 0): + """MRV exact covers; each branch uses sorted port triples.""" + by_port: list[list[tuple[int, int, int]]] = [[] for _ in range(PORTS)] + for edge in candidate_triples(labels, residual): + for i in edge: + by_port[i].append(edge) + remaining = ((1 << PORTS) - 1) ^ (1 << residual) + + def visit(mask: int, chosen: list[tuple[int, int, int]]): + if mask == 0: + yield tuple(chosen) + return + best_options = None + scan = mask + while scan: + bit = scan & -scan + i = bit.bit_length() - 1 + scan ^= bit + options = [edge for edge in by_port[i] + if all((mask >> j) & 1 for j in edge)] + if not options: + return + if best_options is None or len(options) < len(best_options): + best_options = options + if len(options) == 1: + break + assert best_options is not None + for edge in best_options: + edge_mask = sum(1 << i for i in edge) + yield from visit(mask ^ edge_mask, chosen + [edge]) + + yield from visit(remaining, []) + + +def solve_identity(groups: list[list[int]], labels: list[int]) -> list[list[list[int]]] | None: + """Return the deterministic column-echelon solution to sum A M A^T=I_9.""" + variables = [(g, a, b) for g in groups + for a in range(len(g)) for b in range(len(g))] + basis: list[tuple[int, int] | None] = [None] * (N * N) + for z, (g, a, b) in enumerate(variables): + value = 0 + for r in range(N): + if (labels[g[a]] >> r) & 1: + for c in range(N): + if (labels[g[b]] >> c) & 1: + value |= 1 << (r * N + c) + coefficients = 1 << z + while value: + pivot = value.bit_length() - 1 + if basis[pivot] is None: + basis[pivot] = (value, coefficients) + break + vector, combo = basis[pivot] + value ^= vector + coefficients ^= combo + target = sum(1 << (r * N + r) for r in range(N)) + solution = 0 + while target: + pivot = target.bit_length() - 1 + if basis[pivot] is None: + return None + vector, combo = basis[pivot] + target ^= vector + solution ^= combo + matrices = [] + z = 0 + for g in groups: + d = len(g) + matrix = [[0] * d for _ in range(d)] + for a in range(d): + for b in range(d): + matrix[a][b] = (solution >> z) & 1 + z += 1 + matrices.append(matrix) + need(z == len(variables), "internal variable count") + validate_matrix_factorization(groups, matrices, labels) + return matrices + + +def factor_matrix(group: list[int], matrix: list[list[int]], labels: list[int]) -> list[dict]: + d = len(group) + columns = [sum((matrix[r][c] & 1) << r for r in range(d)) for c in range(d)] + basis: list[int] = [] + for col in columns: + if rank_vectors(basis + [col]) > len(basis): + basis.append(col) + terms = [] + for k, left_coeff in enumerate(basis): + coordinates = [] + for col in columns: + match = next((mask for mask in range(1 << len(basis)) + if _xor_selected(basis, mask) == col), None) + need(match is not None, "matrix column outside its basis") + coordinates.append(match) + right_coeff = sum(1 << j for j, coords in enumerate(coordinates) + if (coords >> k) & 1) + left_label = 0 + right_label = 0 + for j, port in enumerate(group): + if (left_coeff >> j) & 1: + left_label ^= labels[port] + if (right_coeff >> j) & 1: + right_label ^= labels[port] + left_support = [i for i, q in enumerate(labels) if dot(q, left_label)] + right_support = [i for i, q in enumerate(labels) if dot(q, right_label)] + copy_rank = support_pair_rank(left_support, right_support, labels) + terms.append({ + "group": group, + "left_coeff": left_coeff, + "right_coeff": right_coeff, + "left_label": left_label, + "right_label": right_label, + "left_support": left_support, + "right_support": right_support, + "copy_rank": copy_rank, + }) + # Independently check that the reported rank-one factors reconstruct M. + for r in range(d): + for c in range(d): + got = 0 + for term in terms: + got ^= ((term["left_coeff"] >> r) & 1) & ((term["right_coeff"] >> c) & 1) + need(got == matrix[r][c], "rank-one factorization of a block matrix") + return terms + + +def _xor_selected(values: list[int], mask: int) -> int: + result = 0 + for i, value in enumerate(values): + if (mask >> i) & 1: + result ^= value + return result + + +def support_pair_rank(left: list[int], right: list[int], labels: list[int]) -> int: + rows = [] + for i in left: + row = sum(dot(labels[i], labels[j]) << k for k, j in enumerate(right)) + rows.append(row) + return rank_rows(rows, len(right)) + + +def check_full_decoder(terms: list[dict], labels: list[int]) -> None: + for i in range(PORTS): + for j in range(PORTS): + value = 0 + for term in terms: + value ^= dot(labels[i], term["left_label"]) & dot(labels[j], term["right_label"]) + need(value == dot(labels[i], labels[j]), "full 112x112 decoder identity") + + +def apply_c(vector: list[tuple[int, int]], shift: int) -> list[tuple[int, int]]: + """Apply C_q=((1+i)I+(1-i)X_q)/2 with a shared integer denominator.""" + out = [] + for state, (a, b) in enumerate(vector): + c, d = vector[state ^ shift] + out.append((a - b + c + d, a + b + d - c)) + return out + + +def check_dirty_endpoints(groups: list[list[int]], active: set[tuple[int, ...]], + labels: list[int]) -> int: + dim = 1 << N + checked = 0 + for group in groups: + if tuple(group) not in active: + continue + correction = 0 + for port in group: + correction ^= labels[port] + for state in range(dim): + vector = [(0, 0)] * dim + vector[state] = (1, 0) + for _ in range(2): + for port in group: + vector = apply_c(vector, labels[port]) + expected = state ^ correction + for out_state, amplitude in enumerate(vector): + need(amplitude == ((1 << (2 * len(group)), 0) if out_state == expected else (0, 0)), + "exact Gaussian-dyadic dirty endpoint C_E^2") + wrong = state ^ (correction ^ labels[group[0]]) + need(wrong != expected and vector[wrong] == (0, 0), + "missing-coordinate endpoint negative control") + checked += 1 + need(checked > 0, "no active endpoint controls") + return checked + + +def main() -> None: + labels = load_labels() + candidate = json.loads((PACKAGE / "CANDIDATE.json").read_text(encoding="utf-8")) + groups = candidate["groups"] + matrices = candidate["matrices"] + validate_groups(groups, labels) + validate_matrix_factorization(groups, matrices, labels) + terms = [] + matrix_rank_hist: dict[int, int] = {} + for g, m in zip(groups, matrices): + r = matrix_rank(m) + matrix_rank_hist[r] = matrix_rank_hist.get(r, 0) + 1 + terms.extend(factor_matrix(g, m, labels)) + check_full_decoder(terms, labels) + active = {tuple(g) for g, m in zip(groups, matrices) if matrix_rank(m)} + endpoint_cases = check_dirty_endpoints(groups, active, labels) + + hist: dict[int, int] = {} + for term in terms: + r = term["copy_rank"] + need(r > 0, "zero-charge term is outside this charged interface") + hist[r] = hist.get(r, 0) + 1 + recorded_hist = {int(k): int(v) for k, v in candidate["copy_hist"].items()} + need(hist == recorded_hist, "recorded copy histogram") + charge = sum(r * count for r, count in hist.items()) + need(charge == candidate["copy_charge"], "recorded total copy charge") + expected_terms = candidate["terms"] + need(len(expected_terms) == len(terms), "recorded term count") + for computed, recorded in zip(terms, expected_terms): + need(computed == recorded, "recorded term support/factor") + + profile = CORE.copy() + for r, count in hist.items(): + profile[r] = profile.get(r, 0) + count + recorded_profile = {int(k): int(v) for k, v in candidate["local_profile"].items()} + need(profile == recorded_profile, "recorded local profile") + sys.path.insert(0, str(ROOT / "research/complex-local-word-ceiling")) + import ceiling # type: ignore[import-not-found] + moment = ceiling.relax(profile, 73, 896, 9, charge, Q(1, 99), unpaid=3) + cap = ceiling.ceiling(profile, 73, 896, 9, charge, grid=Q(1, 10**12), unpaid=3)[1] + need(candidate["passes_target"] == (moment[1] < 1), "target-pass flag") + + # Negative controls: changing an endpoint correction, a factor term, a block + # coefficient or an orthogonality edge is rejected by exact predicates. + try: + check_full_decoder(terms[1:], labels) + except ValueError: + term_control = True + else: + term_control = False + need(term_control, "omitted-factor negative control") + bad_matrices = [[row[:] for row in m] for m in matrices] + gi = next(i for i, m in enumerate(bad_matrices) if matrix_rank(m)) + bad_matrices[gi][0][0] ^= 1 + try: + validate_matrix_factorization(groups, bad_matrices, labels) + except ValueError: + matrix_control = True + else: + matrix_control = False + need(matrix_control, "corrupt-matrix negative control") + bad = next((i, j) for i in range(PORTS) for j in range(i + 1, PORTS) if dot(labels[i], labels[j])) + third = next(i for i in range(PORTS) if i not in bad) + need(not valid_triad([bad[0], bad[1], third], labels), + "nonorthogonal-triad negative control") + + result = { + "status": "PASS_TRI_PLANE_FACTORIZATION_P112", + "ports": PORTS, + "dimension": N, + "blocks": len(groups), + "triads": len(groups) - 1, + "orthogonal_triples_in_search_domain": 24416, + "covers_examined": candidate["covers_examined"], + "matrix_rank_histogram": {str(k): v for k, v in sorted(matrix_rank_hist.items())}, + "active_terms": len(terms), + "copy_rank_histogram": {str(k): v for k, v in sorted(hist.items())}, + "copy_charge": charge, + "endpoint_basis_cases": endpoint_cases, + "moment_at_1_over_99": [str(moment[0]), str(moment[1])], + "a_ceiling": str(cap), + "a_ceiling_decimal": f"{float(cap):.12f}", + "kappa_cap": str(cap / (1 + cap)), + "passes_a_1_over_99": moment[1] < 1, + "negative_controls": 4, + } + (PACKAGE / "RESULT.json").write_text(json.dumps(result, indent=2) + "\n", encoding="utf-8") + print("PASS_TRI_PLANE_FACTORIZATION_P112", + f"triples={len(groups)-1}", + f"terms={len(terms)}", + f"copy={charge}", + f"profile={{{','.join(f'{k}:{profile[k]}' for k in sorted(profile))}}}", + f"endpoint_cases={endpoint_cases}", + f"moment_upper={float(moment[1]):.15f}", + f"a_cap={float(cap):.12f}", + f"target={'PASS' if moment[1] < 1 else 'FAIL'}", + "controls=4") + + +if __name__ == "__main__": + main()