From 8744f324e1b0ed8e5a22166a21f011a9328c35ed Mon Sep 17 00:00:00 2001 From: pinterbanget Date: Thu, 22 Oct 2026 17:28:51 +0700 Subject: [PATCH] =?UTF-8?q?Independently=20recompute=20#4602's=20lever=20t?= =?UTF-8?q?able=20subset=20on=20both=20invoices=20with=20a=2040-digit=20De?= =?UTF-8?q?cimal=20engine:=20all=20values=20match=20(no=20new=20=CE=BA)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- research/pr4602-lever-recompute/README.md | 48 +++++++ research/pr4602-lever-recompute/SOURCES.json | 30 +++++ research/pr4602-lever-recompute/TASK.json | 100 +++++++++++++++ research/pr4602-lever-recompute/VERIFY.json | 23 ++++ research/pr4602-lever-recompute/verify.py | 127 +++++++++++++++++++ 5 files changed, 328 insertions(+) create mode 100644 research/pr4602-lever-recompute/README.md create mode 100644 research/pr4602-lever-recompute/SOURCES.json create mode 100644 research/pr4602-lever-recompute/TASK.json create mode 100644 research/pr4602-lever-recompute/VERIFY.json create mode 100644 research/pr4602-lever-recompute/verify.py diff --git a/research/pr4602-lever-recompute/README.md b/research/pr4602-lever-recompute/README.md new file mode 100644 index 0000000000..c80acec2ca --- /dev/null +++ b/research/pr4602-lever-recompute/README.md @@ -0,0 +1,48 @@ +# Independent recomputation of #4602's lever re-pricing + +**Task:** independent-moment (independent check). **Base:** canonical main `f626db5c`. **No κ is claimed.** + +## The claim + +Matarener's #4602 (head `0dadb877`) recomputes the #1240 one-at-a-time ideal lever budgets on the current complete invoices: #4470's complex invoice and the retained query-thinned BIT invoice. It finds the root of Σ_T n·r^(1−C) = Σ_P n·r^(1−C) with exact interval arithmetic. + +## What is checked here + +The values are recomputed independently. Nothing is imported from #4602. + +- **Complex invoice.** Rebuilt from main's pinned `joint-helper-lattice/CONTROLLER.json`, using PR4470's local paid list. The 8 H8 jobs per call are the owned centre. +- **BIT invoice.** Read from main's pinned `query-thinned-controllers/RESULT.json`: targets, paid, whole-idle and 15 × 111 thin queries. +- **Roots.** Each root comes from a 40-digit Decimal bisection. This engine differs from #4602's outward-rounded log/exp series. + +| quantity | complex | BIT | #4602 | +|---|---|---|---| +| baseline raw root | 0.0030201659 | 0.0034642489 | 0.0030202 / 0.0034642 | +| paid-moment share: idle / local / shears / centre | 59.0% / 39.8% / 0.71% / 0.48% | 56.4% / 42.8% / 0.77% / — | 59/40/0.7/0.5 and 56/43/0.8 | +| centre free | 0.0076503 | — | 0.00765 | +| centre shared by two calls | 0.0053347 | — | 0.00533 | +| query shears free | 0.0099146 | 0.0113100 | 0.0099 / 0.0113 | +| two unpaid coordinates per idle family | 0.0282012 | 0.0318657 | 0.0282 / 0.0319 | +| free idle stages | 0.317 | 0.323 | > 1/6 | + +- **Agreement.** Every recomputed value matches #4602 to the digits it reports. +- **Semantic control.** Substituting #4610's changed local list moves the complex baseline off 0.0030202. + +## Verify + +```text +python3 -B research/pr4602-lever-recompute/verify.py +``` + +The check takes about 2 s and uses the standard library only. + +## Limitations + +- **Two rows not recomputed:** the rank-16 local-children and rank-one pairing levers. They depend on #4602's merge rule. +- **Outer rows not recomputed:** strictification and the BIT ordinary conversion. +- **Root uniqueness** is not certified here, as in #4602. + +## Open next questions + +- **The remaining lever rows.** Recompute them once the local-job merge rule is fixed explicitly. + +Credit: Matarener (Mark) for #4602; 1337isnot1337 and Cinna Davis (#4440, #4470), zxv (#4359) and the #1240 lever table authors. Prepared by Ryanson Jonathan with substantial Claude Code (Claude Opus 5.5) assistance. diff --git a/research/pr4602-lever-recompute/SOURCES.json b/research/pr4602-lever-recompute/SOURCES.json new file mode 100644 index 0000000000..4e02465caa --- /dev/null +++ b/research/pr4602-lever-recompute/SOURCES.json @@ -0,0 +1,30 @@ +{ + "schema_version": 1, + "base_commit": "f626db5c3a3d781d8f7695038776c621651f75e1", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "ed33caef5c5827693e9572d252a66f99cbb73d40", + "sha256": "5732707cc1e460b090b53f2463162749ad860de878a18f7408938671d295a9d9" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "64bfc5af6709ed9811171e0a2108f05e1219cb65", + "sha256": "352a6184713b8843d96fd2c2071eb7aeaa655906b7c51d45ad444912666c8a96" + }, + { + "path": "research/joint-helper-lattice/CONTROLLER.json", + "usage": "input", + "git_blob": "49a2f0675819f9deeea27ed77be2c2b6ff2e87e5", + "sha256": "1f5d6aa267e4e66048818714b5d3b5eae17a58abe91d15deeaa34574f7391a5f" + }, + { + "path": "research/query-thinned-controllers/RESULT.json", + "usage": "input", + "git_blob": "e0695152c98d727edfd0d2034b58a1c7e8682c0c", + "sha256": "6ebfc8c0f09166f4834e9d7427410cb31aefff2cd4d4ce588c8e52c9c70e9a0f" + } + ] +} diff --git a/research/pr4602-lever-recompute/TASK.json b/research/pr4602-lever-recompute/TASK.json new file mode 100644 index 0000000000..8acc4a2ea1 --- /dev/null +++ b/research/pr4602-lever-recompute/TASK.json @@ -0,0 +1,100 @@ +{ + "schema_version": 1, + "task_id": "independent-moment", + "priority_revision": 7, + "base_commit": "f626db5c3a3d781d8f7695038776c621651f75e1", + "original_card": { + "id": "independent-moment", + "question": "Does a new paid-profile or mixture-ceiling claim have independent source-bound coverage of its actual changed ledger?", + "starting_points": [ + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "research/staged544-mixed-fourth-entry/README.md", + "research/staged-fourth-mixture-ceiling/README.md", + "research/r437-two-window-carrier/README.md" + ], + "methods": [ + "Independently reconstruct one changed paid ledger or pooled dual with exact source and model binding.", + "Check a genuinely uncovered moment implication with a different enclosure method and semantic controls." + ], + "acceptance_gate": "Demonstrate independence, source binding, positive cases and semantic failure controls. Name the existing checks and the missing coverage. More digits or another equivalent evaluation of an unchanged root is not by itself new verification coverage.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Choose one uncovered implication in #4088 literal mixed fill, #4091 pooled dual/model binding or #4067 changed frame/host bill. #4091 pins an earlier #4088 head: validate word, capacity and stock equivalence before applying that ceiling to the later fill.", + "scope": "Source-binding orientation only; no scientific replay, theorem acceptance or supplier admission. Budget any heavy replay separately." + }, + "first_experiment": "Independently reconstruct one changed ledger or pooled certificate with a positive case and a semantic failure control. Compare exact sources and name what existing checks miss. Keep this separate from supplier-boundary-audit (ordinary/outer dispatch) and uniform-transfer-audit (all-size proof). Stop after the chosen implication; more digits of an unchanged root are not additional mechanism coverage.", + "bottleneck_link": "Independent pricing prevents unsupported frontier claims and can reveal genuine accounting slack.", + "allowed_variations": [ + "Reconstruct either a source ledger or a numeric enclosure with a different method." + ], + "scope_change_triggers": [ + "Importing the primary function and calling its output independent verification.", + "Calling an aggregate histogram or source archive an independently accepted physical supplier." + ], + "overlap_terms": [ + "independent moment", + "rank histogram", + "exact enclosure", + "2979", + "rank7 joint endframes", + "paired extraction", + "joint lowering", + "4088", + "4091", + "4067", + "staged544-mixed-fourth-entry", + "staged-fourth-mixture-ceiling", + "r437-two-window-carrier" + ], + "existing_checks": [ + { + "scope": "PR #4088: mixed local/owner/phase ledger and moment reported.", + "evidence": "research/staged544-mixed-fourth-entry/README.md", + "remaining": "Independent binding of changed construction to paid histogram, distinct from full admission.", + "status": "author-checked", + "source_commit": "72d7efc181edb21806a878f174847c96dd410ab0", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4091: sharp pooled ceiling proposed for fixed THREE/FOUR words and inventory.", + "evidence": "research/staged-fourth-mixture-ceiling/README.md", + "remaining": "Validate dual, exhaustive pattern scope and exact source equivalence before applying to newer fills.", + "status": "author-checked", + "source_commit": "a29bdd8f56cd18b805917775cdec09ff935eddc4", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4067: paid (2,2) to (1,3) exchange and fixed OQ4 host reported.", + "evidence": "research/r437-two-window-carrier/README.md", + "remaining": "Independent full cost delta; remaining caller/precision/stock obligations are separate.", + "status": "author-checked", + "source_commit": "a95f11c52e3ca1e4c5171b3c20d8f4b0815aee2e", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + } + ] + }, + "scope_status": "unchanged", + "actual_scope": "Does a new paid-profile or mixture-ceiling claim have independent source-bound coverage of its actual changed ledger?", + "scope_change_reason": null, + "bottleneck_link": "Independent recomputation of the post-#4359 lever re-pricing (#4602) that informs controller-level priorities.", + "budget_minutes": 30, + "stop_rule": "Stop at the recomputed subset of levers.", + "outcome": "completed", + "evidence": "40-digit Decimal roots from pinned CONTROLLER.json (complex, PR4470 list) and query-thinned RESULT.json (BIT): baselines 0.0030202/0.0034642; shares idle 59%/56%, local 40%/43%, shears 0.7%/0.8%, centre 0.5%; centre free 0.00765, centre shared 0.00533, shears free 0.0099/0.0113, two unpaid idle coords 0.0282/0.0319, idle free > 1/6; changed-profile control detected.", + "author": "Ryanson Jonathan, with Claude Code (Claude Opus 5.5) assistance", + "ai_assistance": "Substantial Claude Code (Claude Opus 5.5) assistance; no independent human review.", + "open_questions": [ + { + "question": "Rank-16 local children and rank-one pairing levers.", + "why_it_matters": "Remaining rows of the #4602 table.", + "first_step": "Fix an explicit merge rule for local jobs and recompute both invoices.", + "blocked_by": "#4602's merge rule definition." + } + ] +} diff --git a/research/pr4602-lever-recompute/VERIFY.json b/research/pr4602-lever-recompute/VERIFY.json new file mode 100644 index 0000000000..956a9c0141 --- /dev/null +++ b/research/pr4602-lever-recompute/VERIFY.json @@ -0,0 +1,23 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "certificates/selected-result.json", + "docs/research/agent-task-catalog.json", + "research/joint-helper-lattice/CONTROLLER.json", + "research/query-thinned-controllers/RESULT.json" + ], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Rebuild both invoices from pinned records; 40-digit Decimal roots; baselines, shares and six lever roots vs #4602's reported digits; changed-profile control." + } + ] +} diff --git a/research/pr4602-lever-recompute/verify.py b/research/pr4602-lever-recompute/verify.py new file mode 100644 index 0000000000..745a474767 --- /dev/null +++ b/research/pr4602-lever-recompute/verify.py @@ -0,0 +1,127 @@ +#!/usr/bin/env python3 +"""Independent 40-digit recomputation of PR #4602's lever re-pricing (Matarener, head 0dadb877). + +#4602 recomputes the #1240 one-at-a-time ideal lever budgets on the current complete invoices (#4470 complex, retained +query-thinned BIT) by solving sum_T n r^(1-C) = sum_P n r^(1-C). This verifier recomputes a subset independently: +nothing is imported from #4602; the complex invoice is rebuilt from main's pinned joint-helper-lattice/CONTROLLER.json +with PR4470's local paid list (8 H8 per call = owned centre) and helper list, the BIT invoice is read from main's +pinned query-thinned-controllers/RESULT.json (targets, paid, whole_idle, thin_queries), and every root is a 40-digit +Decimal bisection (a different engine from #4602's outward-rounded log/exp series). Checked against #4602's reported +values (to the digits it reports): + complex: baseline 0.0030202; shares idle 59%, local 40%, shears 0.7%, centre 0.5%; centre free 0.00765; + centre shared 0.00533; query shears free 0.0099; two unpaid coordinates per idle family 0.0282; + free idle stages > 1/6; + BIT: baseline 0.0034642; shares idle 56%, shears 0.8%; shears free 0.0113; two unpaid idle coordinates 0.0319. +Ryanson Jonathan with Claude Code (Claude Opus 5.5) assistance. Apache-2.0. +""" +from collections import Counter +from decimal import Decimal as D, getcontext +import json +from pathlib import Path +import sys + +ROOT = Path(__file__).resolve().parents[2] +HELPERS = {4: 28, 7: 7, 8: 47, 9: 326} +P4470 = {1: 2237, 2: 388, 3: 494, 4: 147, 5: 36, 8: 8} +getcontext().prec = 40 + + +def need(condition, message): + if not condition: + raise AssertionError(message) + + +def complex_parts(): + row = json.loads((ROOT / "research/joint-helper-lattice/CONTROLLER.json").read_text(encoding="utf-8")) + targets, parts = Counter(), {k: Counter() for k in ("local", "centre", "shears", "idle")} + for e in row["physical_events"]: + if e[0] == "LOCAL": + targets.update(HELPERS) + for r, n in P4470.items(): + parts["centre" if r == 8 else "local"][r] += n + elif e[0] == "QUERY_SHEAR": + parts["shears"][1] += 112 + elif e[0] == "IDLE": + parts["idle"][8 * len(e[2])] += 224 + for term in row["diagonal"]: + targets[1 + 8 * sum(term[1:])] += 112 + return targets, parts + + +def bit_parts(): + d = json.loads((ROOT / "research/query-thinned-controllers/RESULT.json").read_text(encoding="utf-8"))["bit_invoice"] + ints = lambda h: Counter({int(k): int(v) for k, v in h.items()}) + targets, paid, idle = ints(d["targets"]), ints(d["paid"]), ints(d["whole_idle"]) + shears = Counter({1: int(d["thin_queries"])}) + local = paid.copy() + local.subtract(idle) + local.subtract(shears) + need(min(local.values()) >= 0 and int(d["thin_queries"]) == 15 * 111, "BIT parts") + return targets, {"local": +local, "centre": Counter(), "shears": shears, "idle": idle} + + +def moment(h, s): + return sum(D(n) * (D(r).ln() * s).exp() for r, n in h.items() if n) + + +def root(targets, paid, hi=D("0.5")): + lo = D("0.00001") + need(moment(targets, 1 - lo) > moment(paid, 1 - lo) and moment(targets, 1 - hi) < moment(paid, 1 - hi), "bracket") + for _ in range(90): + mid = (lo + hi) / 2 + if moment(targets, 1 - mid) > moment(paid, 1 - mid): + lo = mid + else: + hi = mid + return lo + + +def total(parts, **change): + out = Counter() + for k, p in parts.items(): + out.update(change.get(k, p)) + return out + + +def near(x, reported): + digits = len(reported.split(".")[1]) + return abs(x - D(reported)) <= D(1).scaleb(-digits) / 2 + + +def main(): + res = {} + for name, (targets, parts) in (("complex", complex_parts()), ("BIT", bit_parts())): + base = root(targets, total(parts)) + mass = moment(total(parts), 1 - base) + shares = {k: moment(v, 1 - base) / mass for k, v in parts.items()} + two_unpaid = Counter({r - 2: n for r, n in parts["idle"].items()}) + out = {"baseline": base, "shares": {k: round(float(v), 4) for k, v in shares.items()}, + "shears_free": root(targets, total(parts, shears=Counter())), + "two_unpaid_idle": root(targets, total(parts, idle=two_unpaid)), + "idle_free": root(targets, total(parts, idle=Counter()), hi=D("0.9"))} + if name == "complex": + out["centre_free"] = root(targets, total(parts, centre=Counter())) + half = Counter({r: D(n) / 2 for r, n in parts["centre"].items()}) + out["centre_shared"] = root(targets, total(parts, centre=half)) + res[name] = out + c, b = res["complex"], res["BIT"] + need(near(c["baseline"], "0.0030202") and near(b["baseline"], "0.0034642"), "baselines") + need(round(c["shares"]["idle"], 2) == 0.59 and round(c["shares"]["local"], 2) == 0.40, "complex idle 59%, local 40%") + need(round(c["shares"]["shears"], 3) == 0.007 and round(c["shares"]["centre"], 3) == 0.005, "shears 0.7%, centre 0.5%") + need(round(b["shares"]["idle"], 2) == 0.56 and round(b["shares"]["shears"], 3) == 0.008, "BIT idle 56%, shears 0.8%") + need(near(c["centre_free"], "0.00765") and near(c["centre_shared"], "0.00533"), "centre levers") + need(near(c["shears_free"], "0.0099") and near(b["shears_free"], "0.0113"), "shear levers") + need(near(c["two_unpaid_idle"], "0.0282") and near(b["two_unpaid_idle"], "0.0319"), "two unpaid idle coordinates") + need(c["idle_free"] > D(1) / 6 and b["idle_free"] > D(1) / 6, "free idle stages exceed 1/6") + # semantic control: #4610's changed local list moves the complex baseline off #4602's reported value + targets, parts = complex_parts() + changed = Counter({1: 18 * 2201, 2: 18 * 412, 3: 18 * 506, 4: 18 * 135, 5: 18 * 36}) + need(not near(root(targets, total(parts, local=changed)), "0.0030202"), "control: a changed profile is detected") + print(json.dumps({"status": "PASS_PR4602_LEVER_RECOMPUTE", + "complex": {k: (str(v)[:12] if isinstance(v, D) else v) for k, v in c.items()}, + "BIT": {k: (str(v)[:12] if isinstance(v, D) else v) for k, v in b.items()}, + "new_kappa_claimed": False}, indent=1)) + + +if __name__ == "__main__": + sys.exit(main())