PREREG_half_contra outcome: ACCEPTED (server = smoke in every projection cell; 0 violations in the guaranteed family).

'half': the step promises the root in the half near x (S >= 1/2) while the bracket line puts it in the far half (smaller |f| at the far end) -> halve.
  half alone                                  APS 2806 -> 2564 (!)  CHA 3220 -> 3202
  G2 + contra + rem + point + exp + half      APS 2773 -> 2559  CHA 2073 -> 2047  both 4606 (all of H1-H4; goal kept)
     per problem vs Chandrupatla: APS 98/17/38 p=2.7e-7, CHA 27/6/7 p=8e-4
  contra + rem + point + exp + half (no G2)   APS 2551  CHA 2044  both 4595 (H2 fails by 24)
  with defect it does not combine (APS 2531 -> 2651): the two refuse overlapping steps.
fun9: 77 -> 68 (Chandrupatla 55); fun9.5 24 -> 16.
Server regression x2: 1204 passed, 1 failed = the paper-number check.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
vvs
2026-09-21 19:24:31 +01:00
co-authored by Claude Opus 5
parent 3d74b4531b
commit bbb16ec81c
8 changed files with 101 additions and 5 deletions
+18 -2
View File
@@ -764,7 +764,7 @@ def pure_root(f, a, b, xtol, maxfev, similarity="ratio", scale="derived",
# category variables below then carry the same string the old tests compared.
if "+" in prestep:
parts = prestep.split("+")
cats = ({"defect"}, {"contra"}, {"exp"}, {"flatanalog", "flatanalogmem", "flatanalogpt",
cats = ({"defect"}, {"contra"}, {"exp"}, {"half"}, {"flatanalog", "flatanalogmem", "flatanalogpt",
"flatanalogmempt"})
if (len(parts) != len(set(parts)) or any(not any(p in c for c in cats) for p in parts)
or any(sum(p in c for p in parts) > 1 for c in cats)):
@@ -776,7 +776,7 @@ def pure_root(f, a, b, xtol, maxfev, similarity="ratio", scale="derived",
elif prestep not in ("none", "progress", "slope", "band", "defect", "simpair", "flat",
"flat2", "flatcreep", "flatstick", "flatstickmid", "flatstickexit",
"flatjudge", "flatanalog", "flatanalogmem", "contra",
"flatanalogpt", "flatanalogmempt"):
"flatanalogpt", "flatanalogmempt", "half"):
raise ValueError(f"unknown prestep {prestep!r}")
parts = prestep.split("+")
pre_dec = next((p for p in parts if p in ("band", "defect", "simpair")), "none")
@@ -787,6 +787,7 @@ def pure_root(f, a, b, xtol, maxfev, similarity="ratio", scale="derived",
flat_pt = pre_flat in ("flatanalogpt", "flatanalogmempt")
pre_contra = "contra" in parts
pre_exp = "exp" in parts # PREREG_flat_exp_limit: translation similarity, m = inf
pre_half = "half" in parts # PREREG_half_contra: the half promised vs the bracket
if pre_dec != "none" and scale not in (
"derived3", "derived3_cap", "derived3_m", "bracket", "far"):
# the decision reads a TRIPLE; under the two-point scale there is no third point
@@ -1115,6 +1116,21 @@ def pure_root(f, a, b, xtol, maxfev, similarity="ratio", scale="derived",
if loc != 0.0 and (loc > 0.0) != (brk > 0.0):
step = 0.5 * (A + B) - x
pre_refused += 1
if step is None and pre_half:
# PREREG_half_contra 2026-09-21. Two models of which half holds the
# root. The step: S >= 1/2 means a step of at most half the way to
# the far end - the root promised in the half NEAR x. The bracket
# line: the root lies nearer the end with the smaller |f| - if that is
# the far end, in the FAR half. When they disagree the promise 'the
# root is here' is not taken (fun9: a slope dominated by f(81) = 1e35
# gives S ~ 1 at 20.25) and this evaluation halves. 1/2 is the
# bisection constant itself; no threshold.
f_far = FB if far == B else FA
if S(z_now) >= 0.5 and abs(f_far) < abs(fx):
step = 0.5 * (A + B) - x
pre_refused += 1
if stats is not None:
stats['half_refused'] = stats.get('half_refused', 0) + 1
if step is None and prestep == "flatjudge":
# PREREG_flat_judge 2026-09-21. Enter only when the unkept promise
# AND the point itself looks flat (judged at its evaluation, below);