"""Revision 3 into article/sim_numerics.md: 4 the exact-zero stop stated in section 4 (it holds for every method on every corpus) 5 Table 12: the post hoc Lagouanelle variant on the branch m >= 2 (marked), the missing exit of the controls in the caption, and the conclusion from Table 12 restated in 7.1, 6.6 and 8 Exact anchors, each found exactly once, or nothing is written. python -u apply_article_revision3.py """ from __future__ import annotations PATH = "article/sim_numerics.md" R = [] def E(old, new): R.append((old, new)) E("$x$-tolerance $10^{-12}$; budget 200 evaluations.", "$x$-tolerance $10^{-12}$; budget 200 evaluations. Every method, ours included, stops when its bracket is no wider than $\\varepsilon_x$ or when it evaluates an exact zero of the function it works on; none stops on a small $|f|$.") E("**Table 12.** Chandrupatla on the transformed function: the multiplicity estimated during the run, against A′, the oracle of Table 11 and Chandrupatla on $f$. Totals, failures charged; the 148 multiple and fractional roots of Table 11, and the simple-root canonical set.", "**Table 12.** Chandrupatla on the transformed function: the multiplicity estimated during the run, against A′, the oracle of Table 11 and Chandrupatla on $f$. Totals, failures charged; the 148 multiple and fractional roots of Table 11, and the simple-root canonical set. The estimated forms have no exit: an order once taken is held to the end of the run. A′ leaves its regime by the exit of §6.2.") E("| Chandrupatla on $g$, $\\hat m$ by Lagouanelle | 7526 | 30991 | 6041 | 7215 |", "| Chandrupatla on $g$, $\\hat m$ by Lagouanelle | 7526 | 30991 | 6041 | 7215 |\n| the same, branch $m\\ge2$ only (post hoc) | 5568 | 18372 | 6540 | 2960 |") E("(A variant restricted to the branch $m\\ge2$ was not among the controls recorded.)", "Restricted after the fact to the branch $m\\ge2$ (post hoc, `POSTHOC_lag_branch_2026-09-22.md`), it no longer breaks, but in this frame it hardly sees a multiple root either: 6540 on the 148 multiple and fractional roots against 7011 for Chandrupatla on $f$, and 5568 on corpus 4, with A′ ahead 178/34/28.") E("So the decision layer of A′ earns its place against the classical method with an estimated order as well; and the split (7), not the order estimate, is where A′ leaves most to the transformation.", "Two conclusions follow. First, the order read by analogy transfers to the classical frame and works better there than in A′'s own split: on the multiple and fractional roots Chandrupatla's interpolation with that order beats A′ itself (2809 against 4042). Second, A′'s decision layer as a whole — the detector together with its exit — earns its place: without an exit the transferred detector loses more on simple roots than it gains on multiple ones, and A′ stays ahead on corpus 4 and over the six corpora.") E("§7.1 puts this claim against the detectors a reader would try first, and against the transformation with the multiplicity known in advance or estimated during the run.", "§7.1 tests this against the detectors a reader would try first and against the classical transformation with the multiplicity known or estimated, and the outcome is sharper than the claim: the order read by analogy transfers to the classical frame and works better there than in A′'s own split, while A′'s exit is what keeps simple roots cheap.") E("Its decision layer beats Lagouanelle's estimate, Chandrupatla's band and no detector put in its place, and Chandrupatla's method on the transformed function with the order estimated during the run;", "Its detector, the order read by analogy, beats Lagouanelle's estimate, Chandrupatla's band and no detector put in its place, and it transfers: inside Chandrupatla's interpolation on the transformed function it does better on multiple roots than A′'s own split, while only A′'s exit keeps simple roots cheap;") def main(): src = open(PATH, encoding="utf8").read() bad = [o[:80] for o, _ in R if src.count(o) != 1] if bad: for b in bad: print("ANCHOR NOT FOUND EXACTLY ONCE:", repr(b)) raise SystemExit(f"{len(bad)} anchors failed; nothing written") for o, n in R: src = src.replace(o, n) open(PATH, "w", encoding="utf8").write(src) print(f"applied {len(R)}") if __name__ == "__main__": main()