#!/usr/bin/env python3 """job #1518 — offline checks for the rescue reading of return #6. Every check reads evidence already saved under this run's work/job1518/replies/ (served documents fetched from https://solveathome.org/projects/twin-primes/docs/ plus the return record) and re-derives one numeric or textual claim of the report. No network, no sibling run is read. Prints one JSON object. """ import json import pathlib import re R = pathlib.Path(__file__).with_name("replies") out = {"checks": []} def add(name, ok, evidence): out["checks"].append({"name": name, "ok": bool(ok), "evidence": evidence}) ret6 = json.loads((R / "return6.json").read_text()) note = json.loads((R / "anchored-note.json").read_text())["raw"] row7 = json.loads((R / "row7-recon.json").read_text())["raw"] sc = json.loads((R / "search-conventions.json").read_text())["raw"] # 1. The assignment's target really is the audit whose negative block names the family. rep = ret6["report_md"] add("return #6 is the audit of the anchored-note wrapper (job #57)", ret6["job_id"] == 57 and ret6["type"] == "audit" and "# Job #57: audit" in rep, {"return_id": ret6["id"], "job_id": ret6["job_id"], "type": ret6["type"]}) # 2. The exact negative block return #6 carries (quoted, not paraphrased). for phrase in ["row 7 moved AGAINST on 2026-08-20", "bounded-differences family", "the direction is adverse", "TPC-STRENGTH"]: add("return #6 §5 carries %r" % phrase, phrase in rep, {"found": phrase in rep}) # 3. The decisive source read: return #6 §5 points at row7-recon §5-§6; the # same file carries the mechanism-vs-target split this report is about. add("row7-recon states the adverse-direction argument", "On Assumption A: nothing, and the direction is adverse" in row7, {"z-values quoted": re.findall(r"−[0-9,.]+", row7)[:8]}) add("row7-recon prices the one attainable concentration payoff as PUBLISHED-ANCHOR", "PUBLISHED-ANCHOR" in row7 and "almost-all theorem" in row7, {}) add("row7-recon records the owning convention's checkbox list (BFT §5)", "1908.08613" in row7 and "Bennett" in row7 and "Azuma" in row7, {}) add("row7-recon records that a sharper bound moves the target the wrong way", "sharper** tail bound places the anchor in a **smaller** exceptional set" in row7 or "moves\nthis target the wrong way by construction" in row7 or "wrong way by construction" in row7, {}) # 4. The exact (unconditional) half of the obstruction, from the note itself. add("anchored-note §3 states Proposition 1 (measure bounds cannot decide the anchor)", "Proposition 1 (measure-theoretic bounds cannot decide the anchored" in note, {}) add("anchored-note §3 states the epsilon*W < 1 decision criterion", "decides the anchor only if \u03b5W < 1" in note, {}) # 5. Arithmetic of the decision criterion at @19 from the note's own table. # Chebyshev exceptional fraction Var/E^2 at @19 and the tile width W=19#. E19, VarE19, W19 = 41441.19, 0.347, 9699690 eps19 = VarE19 / E19 ** 2 add("@19: the almost-all fraction falls short of the decision threshold 1/W", eps19 < 1.0 / W19, {"eps = Var/E^2": eps19, "1/W": 1.0 / W19, "1/eps": 1.0 / eps19}) add("anchored-note §3 beta table reproduces the recorded descent", all(beta in note for beta in ["1.1556", "0.8930", "0.8530", "0.8455"]), {"betas found": [b for b in ["1.1556", "1.1458", "1.0089", "0.9549", "0.9261", "0.8930", "0.8752", "0.8626", "0.8530", "0.8455"] if b in note]}) # 6. The one strike-structure alternative and its recorded refutation. add("anchored-note §4 records corr(VR, S) ~ 0 (strike statistics do not see survival)", "corr(VR, S)" in note and "strike statistics cannot see" in note, {}) # 7. The search-record gap this report records as an obligation: no # owning-convention row for the §10 arithmetic input exists. hits = [m.start() for m in re.finditer("mod 30", sc, re.I)] add("search-conventions has exactly one 'mod 30' hit and it is the translation table, not a search row", len(hits) == 1 and "primorial wheel" in sc[hits[0] - 400:hits[0] + 400], {"hits": len(hits)}) add("search-conventions has no row for equidistribution of floor(W/q) mod 30 over scour primes", not re.search(r"W/q.{0,40}mod 30|mod 30.{0,40}scour", sc, re.I), {}) # 8. §10's named all-x blocker is the arithmetic input, not a tail bound. add("anchored-note §10 names the analytic blocker as an equidistribution input", "equidistribution of \u2308W/q\u2309" in note and "Siegel-Walfisz adjacent" in note, {}) out["passed"] = sum(1 for c in out["checks"] if c["ok"]) out["total"] = len(out["checks"]) print(json.dumps(out, indent=1))