§3.1 and Tables 2-3 of the canonical .md brought to current data (Valeri's request). §3.1 said the projection's doubling 'is not a tuning constant' and that zero slack 'behaves as bisection'; both are refuted by measurement (stage12 part 3, rerun as measure_budget_factor.py): the canonical total is 2806 for every multiplier >= 1.25, but the wide-bracket total moves monotonically, 2752 at 1.25 to 4006 at 4, and multiplier 1 costs 4817/2997, nowhere near bisection's 7530/3090. So the proposed safeguard is the EARNED projection (credit, C0 = 1 bit: bisection + 1 step, the cheapest endowment within that promise, 8395 -> 7658 -> 6588), as code and verifier had already fixed but no text said; the scheduled projection stays as the one-constant end of the trade. The text says openly that this choice was made after a question, and that it was not made for the numbers - on the canonical set it costs 762 more.

Tables 2-3 regenerated from sweep_full.json by tables_for_md.py with the verifier's own ranking: Chandrupatla's method, missing from both, is FIRST on the canonical set (2785) and second on the wide-bracket set (2423); the proposed rule is 29th (3568) and 10th (3020); Brent 2889/4099 (was 2890/4101). The abstract, §5 text, §5.1, §5.2 (timed configuration named), §7 (records 2527/2523 are under the scheduled projection: 2523 flat for every multiplier 1.25-4, 2527 becomes 2541 at 1.25; under credit the readings give far less, best constant-free total 6494 by 'defect'), §8.4, §8.11 and the conclusion now say so: parity with the tuned methods at the price of one constant, or a constant-free rule with a tighter guarantee that trails on the canonical set. verify_article.py: 279 checks, measured tables recomputed from fresh runs; 762 tests pass twice.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
vvs
2026-09-21 08:03:21 +01:00
co-authored by Claude Opus 5
parent de1f8f726d
commit 8830765454
8 changed files with 419 additions and 49 deletions
+84
View File
@@ -204,6 +204,7 @@ def main():
verify_per_place()
verify_decision_place()
verify_gap_decomposition()
verify_safeguard_and_tables()
print()
if FAILS:
@@ -419,6 +420,89 @@ def verify_gap_decomposition():
check("log item: x-space control CHA", xcell["CHA"]["total"], 3643)
def verify_safeguard_and_tables():
"""§3.1 of the .md (the multiplier is a free constant; the earned budget), Tables 2-3
regenerated with Chandrupatla, §5.1, and the constant-free numbers of §7. The
measured tables are RECOMPUTED by running the measurement scripts."""
import contextlib
import io
import measure_budget_factor
import measure_records_vs_multiplier
print("\n§3.1: the multiplier and the endowment (fresh runs):")
with contextlib.redirect_stdout(io.StringIO()):
bf = measure_budget_factor.main()
rm = measure_records_vs_multiplier.main()
for c, (aps, cha) in ((1.0, (4817, 2997)), (1.25, (2806, 2752)), (1.5, (2806, 2889)),
(2.0, (2806, 3220)), (3.0, (2806, 3756)), (4.0, (2806, 4006))):
check(f"multiplier {c} APS", bf[c][0], aps)
check(f"multiplier {c} CHA", bf[c][2], cha)
for c0, (aps, cha) in ((0.1, (5344, 3051)), (0.5, (4656, 3002)), (1.0, (3568, 3020)),
(2.0, (3692, 2712)), (5.0, (3006, 2615))):
check(f"endowment {c0} APS", bf["endowment"][c0][0], aps)
check(f"endowment {c0} CHA", bf["endowment"][c0][1], cha)
within_one_step = {c0: sum(v) for c0, v in bf["endowment"].items() if c0 <= 1.0}
check("C0=1 cheapest within the one-step promise",
min(within_one_step, key=within_one_step.get), 1.0)
sh = rm["shape reading (2527)"]
check("2527 at multiplier 1.25", sh[1.25][0], 2541)
check("2527 flat from 1.5 to 4", {sh[f][0] for f in (1.5, 2.0, 3.0, 4.0)}, {2527})
de = rm["defect reading (2523)"]
check("2523 flat from 1.25 to 4", {de[f][0] for f in (1.25, 1.5, 2.0, 3.0, 4.0)}, {2523})
print("\nTables 2-3 regenerated:")
with open("sweep_full.json", encoding="utf8") as fh:
rows = json.load(fh)
by = {r["label"]: r for r in rows}
none_ = "pure.ratio.derived3.none"
for setname, lbl, pl in (("APS", PROJ, 3), ("APS", none_, 2), ("CHA", PROJ, 47),
("CHA", none_, 228), ("CHA", "pure.exp_abs.bracket.both", 4)):
check(f"{setname} {lbl} place", place(rows, setname, lbl), pl)
check("CHA exp_abs.bracket.both total", by["pure.exp_abs.bracket.both"]["CHA"]["total"],
2733)
check("CHA TOMS 748 over the 2x bound", by["toms748"]["CHA"]["over"], 15)
check("CHA Brent over the 2x bound", by["brent"]["CHA"]["over"], 18)
for lbl, setname, opp, want in (
(PROPOSED, "APS", "itp_oracle", (86, 6, 61)),
(PROPOSED, "CHA", "itp_oracle", (2, 3, 35)),
(PROPOSED, "CHA", "bisection", (5, 0, 35)),
(PROJ, "APS", "chandrupatla", (86, 25, 42)),
(PROJ, "APS", "itp", (132, 3, 18)),
(PROJ, "APS", "itp_oracle", (121, 4, 28)),
(PROJ, "APS", "bisection", (152, 1, 0)),
(PROJ, "CHA", "toms748", (31, 1, 8)),
(PROJ, "CHA", "brent", (30, 4, 4)),
(PROJ, "CHA", "itp", (17, 0, 23)),
(PROJ, "CHA", "itp_oracle", (16, 0, 24))):
w, t, l, _ = head_to_head(rows, lbl, opp, setname)
check(f"{lbl.split('.')[-1]} {setname} vs {opp}", (w, t, l), want)
for lbl, want in ((PROPOSED, 6588), (PROJ, 6026), ("chandrupatla", 5208),
("itp_oracle", 5871), ("toms748", 6820), ("brent", 6988)):
check(f"both sets {lbl}", by[lbl]["APS"]["total"] + by[lbl]["CHA"]["total"], want)
print("\n§7 under the earned projection:")
import glob
cells = {}
for p in glob.glob("sweep_*.json"):
if "smoke" in p:
continue
with open(p, encoding="utf8") as fh:
for r in json.load(fh):
cells.setdefault(r["label"], r)
for lbl, aps, cha in (("slope.ratio.derived3.credit", 3507, 2997),
("pure+shape+slope.ratio.derived3.credit", 3755, 3021),
("pure+dissim+slope.ratio.derived3.credit", 3857, 3002),
("pure+shape+dissim+slope.ratio.derived3.credit", 4354, 3037),
("defect.ratio.derived3.credit", 3545, 2949)):
check(f"{lbl} APS", cells[lbl]["APS"]["total"], aps)
check(f"{lbl} CHA", cells[lbl]["CHA"]["total"], cha)
free = [r for r in cells.values() if r.get("spec") and len(r["spec"]) > 3
and r["spec"][0] == "pure" and r["spec"][3] == "credit"
and r["APS"]["solved"] + r["CHA"]["solved"] == 193]
top = min(free, key=lambda r: r["APS"]["total"] + r["CHA"]["total"])
check("best constant-free configuration", top["label"], "defect.ratio.derived3.credit")
check("its total over both sets", top["APS"]["total"] + top["CHA"]["total"], 6494)
PLACEMENT_PER_SET = {
"sweep_direction.json": ("CHA", "pure+dissim+slope.ratio.derived3.safe", 2683),
"sweep_gate.json": ("CHA", "gate.ratio_soft.derived.safe", 2851),