Revision 3: exact-zero stop in section 4; Table 12 with the post hoc Lagouanelle variant (branch m>=2: corpus 4 5568, six corpora 18372, multiple/fractional 6540, APS 2960; A' 178/34/28), the controls' missing exit in its caption; the reading of Table 12 restated in 7.1, 6.6 and the conclusion - the analogy order transfers to the classical frame and works better there than in A's split (2809 vs 4042 on multiple roots), and A's layer as a whole (detector with exit) earns its place (+1233 vs -3934). Server: verify 548 OK / 0 BAD, regression x2 1239 passed, PDF 32 pages, 0 errors, 0 overfull.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
vvs
2026-09-22 09:31:40 +01:00
co-authored by Claude Opus 5
parent aa304cd262
commit 1eb2c1664f
9 changed files with 244 additions and 7 deletions
+34
View File
@@ -223,6 +223,7 @@ def main():
verify_revision1()
verify_controls()
verify_revision2()
verify_revision3()
print()
if FAILS:
@@ -1180,5 +1181,38 @@ def verify_revision2():
check(f"Table 3 row {lb}", (c["total"], c["solved"], c["over"]), want_)
def verify_revision3():
"""Revision 3 (point 5): the post hoc branch m >= 2 and the reading of Table 12."""
print("\nRevision 3:")
def cost(v):
return v[0] if v[1] else 200
def tot(r, keep=None):
return sum(cost(v) for p, v in r.items() if keep is None or keep(p))
sets = ("APS", "CHA", "NEW", "RJL", "APP", "D")
P = _load("sweep_estimated_posthoc.json")
K = _load("sweep_estimated.json")["k3_analogy"]
seen, four = _load("sweep_fourth_seen.json"), _load("sweep_fourth_fourth.json")
ap = dict(seen["Aprime"])
ap.update(four["Aprime"])
K1 = _load("sweep_controls.json")["K1"]
nonsimple = lambda m: m >= 2.0 or m <= 2.0 / 3.0 # noqa: E731
def group(r):
return sum(tot(r[s], lambda p, _m=K1[s]["mstar"]: nonsimple(_m[p])) for s in ("CHA", "NEW", "D"))
check("Table 12 post hoc row", (tot(P["D"]), sum(tot(P[s]) for s in sets), group(P), tot(P["APS"])),
(5568, 18372, 6540, 2960))
ps = list(ap["D"])
w = sum(cost(ap["D"][p]) < cost(P["D"][p]) for p in ps)
l = sum(cost(ap["D"][p]) > cost(P["D"][p]) for p in ps)
check("A' vs the post hoc variant on corpus 4", (w, len(ps) - w - l, l), (178, 34, 28))
check("post hoc violations", sum(v[2] for s in sets for v in P[s].values()), 0)
gain = group(ap) - group(K)
loss = (sum(tot(K[s]) for s in sets) - group(K)) - (sum(tot(ap[s]) for s in sets) - group(ap))
check("transferred detector: gain on multiple roots < loss elsewhere (vs A')", (gain, loss, gain < loss),
(1233, 3934, True))
if __name__ == "__main__":
main()