diff --git a/research/coord-root-p112-global-gauge-seed655425/PROOF.md b/research/coord-root-p112-global-gauge-seed655425/PROOF.md new file mode 100644 index 0000000000..754bdcf0df --- /dev/null +++ b/research/coord-root-p112-global-gauge-seed655425/PROOF.md @@ -0,0 +1,24 @@ +# Exact identity and bounded cost obstruction + +All root lines and normal vectors are the rational E8 model from the pinned `e8lab.py`. The pinned predecessor verifier supplies exact rational frame solving and the all-pairs identity checker. + +Let `b_0,...,b_8` be the coordinate-frame-plus-root normals, with exact dependency + +```text +sum_k z_k b_k = 0, +z = (-1,-1,-1,-1,0,0,0,0,2). +``` + +For every one of the 112 live root lines `r_i`, the verifier solves an exact rational row `c_i` with `sum_k c_ik b_k = 2r_i`. Given any integer vector `w`, define `t_i=` and `D_ik=c_ik+t_i z_k`. Then + +```text +sum_k D_ik b_k += sum_k c_ik b_k + t_i sum_k z_k b_k += 2 r_i. +``` + +Thus the row identity is exact throughout the searched box. The cost of term `k` is computed as the binary rank of the E8 label pairing restricted to the exact row support `X_k={i:D_ik != 0}` and normal support `Y_k={j: != 0}`. The total is the sum of all nine term ranks, with no inactive term silently charged as active. + +The executable enumerates the Cartesian product `{-1,0,1}^8` without sampling. Exact rational coefficients are scaled by their common denominator before zero tests; rank and census operations are integer/F2 operations. The result is two cost-64 assignments with an empty term, three fully active cost-72 assignments, and 6,556 fully active cost-73 assignments. The full all-active minimum in this finite family is therefore 72. + +This conclusion is only about the pinned frame, puncture, shared-gauge rule and finite ternary box. It is not a lower bound for arbitrary per-root gauges or other frames. Exact all-pairs checks of the five cost-at-most-72 representatives confirm the decoder identities; a changed coefficient row gives a negative control. diff --git a/research/coord-root-p112-global-gauge-seed655425/README.md b/research/coord-root-p112-global-gauge-seed655425/README.md new file mode 100644 index 0000000000..eda0aecefb --- /dev/null +++ b/research/coord-root-p112-global-gauge-seed655425/README.md @@ -0,0 +1,61 @@ +# Ternary global-gauge screen for one coordinate-root P112 decoder + +**Scoped exact negative result; no new κ.** On one pinned E8 P112 puncture and one merged nine-normal frame, the full ternary box of correlated coefficient shifts contains no active nine-term decoder below copied-information cost 72. The two cost-64 assignments each remove one term. This does not bound other frames, punctures, independent per-root gauges, or shifts outside the box. + +The research seed is `655425ccd826280b13917975e2854d16`, selected on the `complex-mechanisms` track at catalogue priority revision 3. The exact base is `0b1cccf86e2f5132ed286a26ef0a681a495740ea`; the selected-record SHA256 is `10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32`. That base retains selected conditional finite construction κ `836330098538459/500000000000000000` (about `0.001672660197076918`). The review, source manifest, assembly certificate, selector and task catalogue are pinned in [SOURCES.json](SOURCES.json). + +## Construction family + +The eight deleted E8 lines are the exact coordinate frame with indices `[0, 13, 90, 99, 108, 113, 118, 119]`. Add the first extra root with four nonzero inner products against that frame (index `1`) to make a nine-normal frame. Its unique coefficient dependency is + +```text +z = (-1, -1, -1, -1, 0, 0, 0, 0, 2), sum_k z_k b_k = 0. +``` + +For each live root line `i`, let `c_i` be the exact base row satisfying `sum_k c_ik b_k = 2 r_i`. For one shared integer vector `w ∈ {-1,0,1}^8`, set + +```text +D_ik(w) = c_ik + z_k. +``` + +The identity remains exact for every `w` because the added row term is a scalar multiple of the frame dependency. The verifier enumerates all `3^8 = 6,561` choices. For each of the nine product terms it forms the row support `X_k` and normal support `Y_k`, then charges the exact `F2` pairing rank `rank_F2(X_k,Y_k)`. This is the full copied-information invoice for this decoder family; it does not include a physical frame or recursive restoration circuit, so no κ conversion is justified. + +## Exact result + +| Total copied-information cost | Assignments | Nine terms active | +|---:|---:|---:| +| 64 | 2 | 0 | +| 72 | 3 | 3 | +| 73 | 6,556 | 6,556 | + +The two cost-64 gauges are `w=(0,-1,0,0,0,0,0,0)` and `w=0`; each has one empty row support, so it is an eight-term decoder. The three active cost-72 gauges are + +```text +(-1,-1,0,0,0,0,0,0) +(-1, 0,0,0,0,0,0,0) +( 1, 1,0,0,0,0,0,0) +``` + +Each has nine term ranks `(8,8,8,8,8,8,8,8,8)`. The verifier checks all `112^2 = 12,544` live root pairs for each of these five low-cost exact identities. A one-coefficient mutation is rejected. The predecessor package records `64/112` as its shipped P112 comparator, so this active family supplies no copy-cost saving to carry into a fully charged profile. + +## Scope and overlap + +The scope is a correlated, one-vector gauge family on one puncture. The exact support alphabet is the ternary coordinate box; this is not a search over arbitrary real or integer `w`. + +The selected nine-normal frame comes from merged [PR #1224](https://github.com/CrocSwap/integer-mult-bounds/pull/1224), whose `research/nine-term-decoder-normal-form-seed42/` package scans per-root ratio-class choices in several frames and punctures. This search instead binds all per-root gauge parameters to the same eight-coordinate vector. Direct nearby work was also checked before claiming: PR #1923 / Discussion #1622 treats a symmetric ten-term Householder family; PR #1614 treats A8 simplex punctures; PRs #1779 and #1817 concern rank-16 diagonal batches and their interleaving. None matches this object and parameter family. The live claim is in [Discussion #1167](https://github.com/CrocSwap/integer-mult-bounds/discussions/1167#discussioncomment-18926689). + +The result is a finite census for this family. It is not a universal lower bound for nine-term decoders, a circuit implementation, a supplier-compatible local word, or a new conditional multiplication exponent. The selected record is unchanged. + +## Reproduce + +```sh +python3 -I -B research/coord-root-p112-global-gauge-seed655425/verify.py +python3 scripts/research_package.py --package research/coord-root-p112-global-gauge-seed655425 --check-only +``` + +The first command performs the exact census and writes `RESULT.json`. The registered replay uses Python 3.12 and reruns the same check. `verify.py` refuses to run if the two source modules from merged PR #1224 have drifted from their pinned SHA256 values. + +## Open next questions + +- Does a larger bounded global-shift box contain an active decoder with a lower copy invoice on this puncture? Before expanding the search, derive the optimistic target invoice and claim a new explicit box. +- Can independently chosen per-root gauges be constrained by a meaningful correlation model that is not already covered by the predecessor's ratio-class census? diff --git a/research/coord-root-p112-global-gauge-seed655425/RESULT.json b/research/coord-root-p112-global-gauge-seed655425/RESULT.json new file mode 100644 index 0000000000..2a87f84dd8 --- /dev/null +++ b/research/coord-root-p112-global-gauge-seed655425/RESULT.json @@ -0,0 +1,264 @@ +{ + "schema_version": 1, + "seed": "655425ccd826280b13917975e2854d16", + "base_commit": "0b1cccf86e2f5132ed286a26ef0a681a495740ea", + "selected_record_sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32", + "puncture_indices": [ + 0, + 13, + 90, + 99, + 108, + 113, + 118, + 119 + ], + "extra_root_index": 1, + "normal_dependency": [ + -1, + -1, + -1, + -1, + 0, + 0, + 0, + 0, + 2 + ], + "live_roots": 112, + "global_shift_domain": [ + -1, + 0, + 1 + ], + "assignments": 6561, + "all_cost_histogram": { + "64": 2, + "72": 3, + "73": 6556 + }, + "all_active_cost_histogram": { + "72": 3, + "73": 6556 + }, + "best_all_active": { + "cost": 72, + "w": [ + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "term_ranks": [ + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8 + ], + "term_support_sizes": [ + 56, + 76, + 76, + 76, + 56, + 56, + 56, + 56, + 56 + ], + "exact_pairs": 12544 + }, + "low_cost_exact_controls": [ + { + "cost": 72, + "w": [ + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "term_ranks": [ + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8 + ], + "term_support_sizes": [ + 56, + 76, + 76, + 76, + 56, + 56, + 56, + 56, + 56 + ], + "exact_live_pairs": 12544 + }, + { + "cost": 72, + "w": [ + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "term_ranks": [ + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8 + ], + "term_support_sizes": [ + 76, + 56, + 76, + 76, + 56, + 56, + 56, + 56, + 56 + ], + "exact_live_pairs": 12544 + }, + { + "cost": 64, + "w": [ + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "term_ranks": [ + 8, + 0, + 8, + 8, + 8, + 8, + 8, + 8, + 8 + ], + "term_support_sizes": [ + 76, + 0, + 76, + 76, + 56, + 56, + 56, + 56, + 56 + ], + "exact_live_pairs": 12544 + }, + { + "cost": 64, + "w": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "term_ranks": [ + 0, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8 + ], + "term_support_sizes": [ + 0, + 76, + 76, + 76, + 56, + 56, + 56, + 56, + 56 + ], + "exact_live_pairs": 12544 + }, + { + "cost": 72, + "w": [ + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "term_ranks": [ + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8 + ], + "term_support_sizes": [ + 56, + 88, + 88, + 88, + 56, + 56, + 56, + 56, + 56 + ], + "exact_live_pairs": 12544 + } + ], + "negative_control": "adding 1 to coefficient row 0, term 0 fails at a live pair", + "scope_limit": "This is only the fixed frame, puncture, global coefficient shift, and ternary box; it does not bound independent per-root gauges or other shifts." +} diff --git a/research/coord-root-p112-global-gauge-seed655425/SOURCES.json b/research/coord-root-p112-global-gauge-seed655425/SOURCES.json new file mode 100644 index 0000000000..22098ac71b --- /dev/null +++ b/research/coord-root-p112-global-gauge-seed655425/SOURCES.json @@ -0,0 +1,72 @@ +{ + "schema_version": 1, + "base_commit": "0b1cccf86e2f5132ed286a26ef0a681a495740ea", + "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": "docs/research/community-batch1099-review.md", + "usage": "input", + "git_blob": "6cb6ec061a071a06a2d18cd4dc3e9a2b05d28099", + "sha256": "7e76d2c38e5fce30587835b7251df1430488ae4dd372611ef69a3f03f476b6cb" + }, + { + "path": "research/community-frontier1094-audit/SELECTED-SOURCE.json", + "usage": "input", + "git_blob": "6a75493790b4eff9c4a98051ef8b01d6aad0d5a8", + "sha256": "79b3de5db3dbcb9829789ba58e9e45758926031e2a7d80667a08429d369be53b" + }, + { + "path": "research/community-frontier1094-audit/ASSEMBLY.json", + "usage": "input", + "git_blob": "5fd676df060f3b450782fdf5ff5f6beb63a5eeb0", + "sha256": "1122cb3a575f8c788345fc1bf4c108ac7c3250fb81a5988671f5eb04b3ab3045" + }, + { + "path": "research/nine-term-decoder-normal-form-seed42/e8lab.py", + "usage": "input", + "git_blob": "6aef95fc972f56e600b7c9699238e3a1ce7f7413", + "sha256": "772349edc9dff45fa3cac89fdbbe8bf1bab734e9776a245fcac8e8bd60d94634" + }, + { + "path": "research/nine-term-decoder-normal-form-seed42/verify.py", + "usage": "input", + "git_blob": "994e429042f292084546c8d1efe287dfb5930fd9", + "sha256": "248763cf5ff85f073766aa8a85187a1d314fcf3a716b2586ca8fc1197d4c6c4e" + }, + { + "path": "research/nine-term-decoder-normal-form-seed42/README.md", + "usage": "provenance", + "git_blob": "9cf8ecd3eda302b57ab14302c429b00c255f2dba", + "sha256": "d272081da47d6ea6a2404fddff211418dd6e7c236babf7eb4560737e818c1677" + }, + { + "path": "research/nine-term-decoder-normal-form-seed42/CLAIM.md", + "usage": "provenance", + "git_blob": "ce6c5b94ce1e061c4ea9c8ff39037f81dfd44370", + "sha256": "55eaaa473a2491727bf6efa5cbf48bd28134a6cc16c5b1eb62894a01362bb91d" + }, + { + "path": "research/nine-term-decoder-normal-form-seed42/SOURCES.json", + "usage": "provenance", + "git_blob": "a36ca6604aafcd5ba9a1d13b6be4c5a1eeedd98d", + "sha256": "a4bd91641f598799619a163d0ae30b49fce87903f3517e6cdc8d88889ac51eac" + }, + { + "path": "scripts/choose_research_task.py", + "usage": "provenance", + "git_blob": "695639622a283190948c4187bdbb41997e6e43d7", + "sha256": "f1af1e70858ab1d033ce20ee1968201bc592eb9e3fd05ab8ad78c842c0b028d1" + } + ] +} diff --git a/research/coord-root-p112-global-gauge-seed655425/TASK.json b/research/coord-root-p112-global-gauge-seed655425/TASK.json new file mode 100644 index 0000000000..92bca19467 --- /dev/null +++ b/research/coord-root-p112-global-gauge-seed655425/TASK.json @@ -0,0 +1,68 @@ +{ + "schema_version": 1, + "task_id": "complex-rank-shape-decoder", + "priority_revision": 3, + "seed": "655425ccd826280b13917975e2854d16", + "base_commit": "0b1cccf86e2f5132ed286a26ef0a681a495740ea", + "selected_record_sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32", + "original_card": { + "id": "complex-rank-shape-decoder", + "question": "Can a decoder deliver the local paid mass in fewer, larger-rank children (block frame climbs instead of rank-1 to rank-3 steps)?", + "starting_points": [ + "research/complex-local-word-ceiling/README.md", + "research/complex-decoder-field-extension-seed44/README.md", + "research/complex-frame-pair-decoders/README.md" + ], + "methods": [ + "Find one exact small decoding identity whose frame path climbs in blocks, and price its complete per-call profile.", + "Bound the best effective child rank achievable for one fixed support alphabet, including copies, frames and restoration." + ], + "acceptance_gate": "A per-call local profile, with all copied information, frames and restoration counted, whose ceiling exceeds the selected word's by at least 5%; masked or overcomplete supports must change an assumption of the eight-term all-pairs bound.", + "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": "Before any synthesis, write the candidate per-call local profile (and centre charge / unpaid coordinates if changed) and screen it with ceiling.ceiling(); reject it if even the ideal ceiling does not beat the selected word's by your stated margin. Ideal budget: rank-16 delivery is 2.31x (levers.py).", + "bottleneck_link": "Rank-1 children are about half of recursive cost; the selected word's effective child rank is about 3.9. Larger-rank delivery lowers recursive cost per unit of paid mass.", + "allowed_variations": [ + "One masked, overcomplete or block decoder family with exact labels and supports.", + "A scoped lower bound on effective rank for one alphabet.", + "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": [ + "Repacking idle remainders of an unchanged word (covered by the packing ceiling).", + "Repeating the eight-term all-pairs search inside its proved scope." + ], + "overlap_terms": [ + "rank shape", + "block climb", + "masked decoder", + "overcomplete", + "effective rank" + ] + }, + "scope_status": "refined", + "scope_change_reason": "I tested one correlated gauge family on the merged coordinate-frame-plus-root nine-normal decoder. Its P112 puncture and one-dimensional coefficient dependency differ from the symmetric ten-term Householder witness, A8 simplex punctures and rank-16 diagonal batches. The full ternary global-shift box is an exact, finite construction screen rather than a repeat of the predecessor's independent per-root ratio-class census.", + "actual_scope": "For the E8 P112 puncture obtained by deleting the eight coordinate-frame lines, use the nine normals consisting of those eight coordinate roots and the first extra root with four nonzero coordinate-frame inner products. For every global integer shift w in {-1,0,1}^8, add times the exact null dependency to every root's base coefficient row. Enumerate the exact F2 copied-information cost and test whether all nine terms can be active below cost 64.", + "bottleneck_link": "A lower sum of F2 pairing ranks is a necessary local copied-information saving before frame, hosting and restoration charges. The known P112 comparator is 64; this family has no active nine-term member below 72, so the proposed active overcomplete decoder has no local cost headroom to price into the selected recursive profile.", + "budget_minutes": 60, + "stop_rule": "Exhaust exactly all 3^8 global shifts, compute every term's rational support and F2 pairing rank, and verify the best active decoder on all 112^2 live pairs. Stop after the full census; do not infer a bound for arbitrary per-root shifts, other frames, other punctures or shifts outside the ternary box.", + "outcome": "negative-result", + "evidence": "The exact census has 6,561 shifts: 2 produce cost 64 with one inactive term, 3 active nine-term decoders cost 72 (all nine ranks equal 8), and the remaining 6,556 active decoders cost 73. The best active cost is 72. All three best active identities pass on 12,544 live pairs each; a one-coefficient mutation is rejected. No kappa, full circuit, frame invoice or selected-record change is claimed.", + "author": "Cinna Davis", + "ai_assistance": "Substantial OpenAI Codex assistance in scope selection, exact search, verification and prose. No independent human review or proof-assistant formalization is claimed.", + "open_questions": [ + { + "question": "Does a larger bounded global-shift box contain a lower-copy all-active decoder on this same puncture, or do useful zero patterns require independently chosen per-root gauges?", + "why_it_matters": "This determines whether correlated gauges can improve the P112 copy invoice before any frame or recursive expenses are paid.", + "first_step": "Select a fresh scoped assignment and derive an optimistic cost threshold before enumerating a new shift domain; reuse the exact integer support-mask calculation but pin a new explicit box.", + "blocked_by": "The present result exhausts only the ternary global-shift box, and the known broader per-root ratio-class family is predecessor work rather than evidence for a larger correlated box." + } + ] +} diff --git a/research/coord-root-p112-global-gauge-seed655425/VERIFY.json b/research/coord-root-p112-global-gauge-seed655425/VERIFY.json new file mode 100644 index 0000000000..432965d4b7 --- /dev/null +++ b/research/coord-root-p112-global-gauge-seed655425/VERIFY.json @@ -0,0 +1,26 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "certificates/selected-result.json", + "docs/research/community-batch1099-review.md", + "research/community-frontier1094-audit/ASSEMBLY.json", + "research/community-frontier1094-audit/SELECTED-SOURCE.json", + "research/nine-term-decoder-normal-form-seed42/e8lab.py", + "research/nine-term-decoder-normal-form-seed42/verify.py" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 180, + "checks": "Pin the predecessor source modules; exhaust all 6,561 exact global shifts; recompute all nine F2 pairing ranks; verify the five cost-at-most-72 identities on all 12,544 live pairs; confirm the one-coefficient negative control." + } + ] +} diff --git a/research/coord-root-p112-global-gauge-seed655425/verify.py b/research/coord-root-p112-global-gauge-seed655425/verify.py new file mode 100644 index 0000000000..486656807b --- /dev/null +++ b/research/coord-root-p112-global-gauge-seed655425/verify.py @@ -0,0 +1,161 @@ +#!/usr/bin/env python3 +"""Exact census of one global ternary gauge family on one E8 P112 puncture.""" +from collections import Counter +from fractions import Fraction +import hashlib +import itertools +import json +import math +from pathlib import Path +import sys + +ROOT = Path(__file__).resolve().parents[2] +PACKAGE = Path(__file__).resolve().parent +PREDECESSOR = ROOT / "research/nine-term-decoder-normal-form-seed42" +PINNED = { + "e8lab.py": "772349edc9dff45fa3cac89fdbbe8bf1bab734e9776a245fcac8e8bd60d94634", + "verify.py": "248763cf5ff85f073766aa8a85187a1d314fcf3a716b2586ca8fc1197d4c6c4e", +} + + +def need(condition, message): + if not condition: + raise AssertionError(message) + + +for name, expected in PINNED.items(): + actual = hashlib.sha256((PREDECESSOR / name).read_bytes()).hexdigest() + need(actual == expected, f"pinned predecessor drift: {name}") +sys.path.insert(0, str(PREDECESSOR)) +import e8lab as E # noqa: E402 +import verify as V # noqa: E402 + + +def make_rows(bases, z, roots, w): + rows = {} + for i in roots: + t = sum(a * b for a, b in zip(E.LINES[i], w)) + rows[i] = [bases[i][k] + t * z[k] for k in range(9)] + return rows + + +def support_data(bases_scaled, z_scaled, roots, w, Y): + X = [0] * 9 + for i in roots: + t = sum(a * b for a, b in zip(E.LINES[i], w)) + live_terms = 0 + for k in range(9): + if bases_scaled[i][k] + t * z_scaled[k] != 0: + live_terms |= 1 << k + while live_terms: + bit = live_terms & -live_terms + X[bit.bit_length() - 1] |= 1 << i + live_terms ^= bit + ranks = tuple(E.pairing_rank(X[k], Y[k]) for k in range(9)) + return ranks, tuple(E.popcount(x) for x in X), X + + +def run(): + puncture = V.coordinate_frame() + need(puncture == [0, 13, 90, 99, 108, 113, 118, 119], "coordinate puncture changed") + extra = next(i for i in range(E.N) if i not in puncture and + sum(E.G[i][f] != 0 for f in puncture) == 4) + need(extra == 1, "first four-contact extra root changed") + frame = V.Frame("coordinate frame + root", [E.LINES[f] for f in puncture] + [E.LINES[extra]]) + need(frame.z == [Fraction(-1), Fraction(-1), Fraction(-1), Fraction(-1), + Fraction(0), Fraction(0), Fraction(0), Fraction(0), Fraction(2)], + "coefficient dependency changed") + live = E.FULL ^ sum(1 << i for i in puncture) + roots = list(E.bits(live)) + need(len(roots) == 112, "not the pinned P112 live set") + bases = {i: frame.base(i) for i in roots} + denominator = math.lcm(*(x.denominator for row in bases.values() for x in row), + *(x.denominator for x in frame.z)) + bases_scaled = {i: [int(x * denominator) for x in bases[i]] for i in roots} + z_scaled = [int(x * denominator) for x in frame.z] + Y = [E.support(b, live) for b in frame.F] + need([E.popcount(y) for y in Y] == [56] * 8 + [53], "normal supports changed") + + all_hist = Counter() + active_hist = Counter() + best_active = None + low = [] + for w in itertools.product((-1, 0, 1), repeat=8): + ranks, sizes, X = support_data(bases_scaled, z_scaled, roots, w, Y) + cost = sum(ranks) + active = all(sizes) + all_hist[cost] += 1 + if active: + active_hist[cost] += 1 + candidate = (cost, tuple(w), ranks, sizes) + if best_active is None or candidate < best_active: + best_active = candidate + if cost <= 72: + low.append((cost, tuple(w), ranks, sizes)) + + need(sum(all_hist.values()) == 6561, "ternary box not exhausted") + need(dict(sorted(all_hist.items())) == {64: 2, 72: 3, 73: 6556}, "unexpected full cost census") + need(dict(sorted(active_hist.items())) == {72: 3, 73: 6556}, "unexpected active cost census") + need(best_active == (72, (-1, -1, 0, 0, 0, 0, 0, 0), (8,) * 9, + (56, 76, 76, 76, 56, 56, 56, 56, 56)), "best active result changed") + need(len(low) == 5, "low-cost representatives changed") + + exact_examples = [] + for cost, w, ranks, sizes in low: + rows = make_rows(bases, frame.z, roots, w) + exact, count = V.exact_on_pairs(rows, frame.F, live) + need(exact and count == 112 ** 2, f"decoder identity failed for {w}") + if cost == 72: + need(all(sizes) and ranks == (8,) * 9, "active control is malformed") + else: + need(not all(sizes), "cost-64 control unexpectedly has nine active terms") + exact_examples.append({ + "cost": cost, + "w": list(w), + "term_ranks": list(ranks), + "term_support_sizes": list(sizes), + "exact_live_pairs": count, + }) + + # A deliberately false coefficient row must be detected by the exact pair check. + bad = make_rows(bases, frame.z, roots, best_active[1]) + bad[roots[0]][0] += 1 + need(V.exact_on_pairs(bad, frame.F, live)[0] is False, "one-coefficient mutation escaped control") + + result = { + "schema_version": 1, + "seed": "655425ccd826280b13917975e2854d16", + "base_commit": "0b1cccf86e2f5132ed286a26ef0a681a495740ea", + "selected_record_sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32", + "puncture_indices": puncture, + "extra_root_index": extra, + "normal_dependency": [int(x) for x in frame.z], + "live_roots": len(roots), + "global_shift_domain": [-1, 0, 1], + "assignments": sum(all_hist.values()), + "all_cost_histogram": {str(k): v for k, v in sorted(all_hist.items())}, + "all_active_cost_histogram": {str(k): v for k, v in sorted(active_hist.items())}, + "best_all_active": { + "cost": best_active[0], + "w": list(best_active[1]), + "term_ranks": list(best_active[2]), + "term_support_sizes": list(best_active[3]), + "exact_pairs": 112 ** 2, + }, + "low_cost_exact_controls": exact_examples, + "negative_control": "adding 1 to coefficient row 0, term 0 fails at a live pair", + "scope_limit": "This is only the fixed frame, puncture, global coefficient shift, and ternary box; it does not bound independent per-root gauges or other shifts.", + } + (PACKAGE / "RESULT.json").write_text(json.dumps(result, indent=2) + "\n", encoding="utf-8") + print("PASS_COORD_ROOT_P112_GLOBAL_GAUGE", json.dumps({ + "assignments": result["assignments"], + "all_cost_histogram": result["all_cost_histogram"], + "all_active_cost_histogram": result["all_active_cost_histogram"], + "best_active": result["best_all_active"], + "exact_controls": len(exact_examples), + "mutation_rejected": True, + }, sort_keys=True)) + + +if __name__ == "__main__": + run()