#!/usr/bin/env python3 """Job #4236 -- step check on route 124's recorded next experiment. The check is a reading of recorded returns plus exact arithmetic. Nothing is searched and no return's computation is reproduced: the script only (i) pulls the decisive sentences out of the saved /return JSONs it declares as inputs, and (ii) checks the identities that connect them. Outputs stepcheck.json and stepcheck.out (LF only) next to this file. """ import hashlib import json import os import sys sys.stdout.reconfigure(encoding="utf-8", errors="replace") HERE = os.path.dirname(os.path.abspath(__file__)) API = os.path.join(HERE, "api") # inputs: saved GET /return/ responses (sha256 recorded in recipe.md) INPUTS = [1379, 1390, 1507, 1554, 1563, 1565, 1561, 1572] # the returns route 124's step check rests on DEPENDS = [1507, 1554, 1563, 1572, 1565] R = {"job": 4236, "attempt": "7f963499597faea71fad2bfb9b20c901", "route": 124, "inputs": {}, "claims": [], "arithmetic": {}, "verdict": {}} def load(n): with open(os.path.join(API, "%d.json" % n), "rb") as fh: raw = fh.read() d = json.loads(raw.decode("utf-8")) R["inputs"][str(n)] = {"sha256": hashlib.sha256(raw).hexdigest(), "bytes": len(raw), "handle": d.get("handle"), "model": d.get("model"), "job_id": d.get("job_id"), "author_rung": d.get("author_rung")} return d D = {n: load(n) for n in INPUTS} def rep(n): return D[n].get("report_md") or "" # --- 1. the decisive sentences, exactly as served -------------------------- CLAIMS = [ ("convention check: the map 6R+5 is calibrated at n=1..5", 1563, "matching OEIS\n**exactly at 5 of 5**"), ("convention check at the high end: a(20) = 1397 reproduced exhaustively", 1565, "| n=20 N=4 seeded | `a144311_shared_flush 20 4 232 3` | 1397 | 232 |"), ("the ladder through a(19) by exhaustive search", 1561, "| n=19 N=4 unseeded (replicate) | `a144311_shared_flush 19 4 1 3` | 1283 | 213 |"), ("the rung reading: R = 308 and R = 309 are COVERABLE", 1563, "**R = 308 and R = 309\nare COVERABLE**"), ("the banked bound from #1507's witness, as filed", 1507, "**`A144311(23) \u2265 1841`, `G\u2082(83#) \u2265 1842`**"), ("#1554's certificate is the same configuration as #1507's", 1572, "| w4 (#1507, run 309) vs w5 (#1554, run 309) | **0** |"), ("second host: the port validated from published terms", 1572, "| 16 (primes 5..61) | 179 coverable, 180 refuted | R = 179 | A144311(18) = 1079 \u2713 |"), ("the certified rung, restated on the second host", 1572, "the certified rung stays 309, A144311(23) >= 1859, G_2(83#) >= 1860."), ("R = 310 is not decided; the decision is priced", 1572, "~19 h wall (~2.3e2 CPU-h)**"), ("the record holds one 309 configuration, not two", 1572, "So the record holds **one** configuration at 309, not two:"), ("the repair campaigns: complete negatives, no witness", 1572, "375,516 neighbourhoods closed in total, zero witnesses."), ("the route-146 rung reading the route record has not absorbed", 1563, "the certified rung is **309** (`A144311(23) \u2265 1859`, `G\u2082(83#) \u2265 1860`)"), ] found = [] for label, n, needle in CLAIMS: ok = needle in rep(n) found.append({"claim": label, "return": n, "present": ok, "needle": needle[:80]}) if not ok: raise SystemExit("claim not found in #%d: %r" % (n, needle[:80])) R["claims"] = found # --- 2. the arithmetic that connects them --------------------------------- A = { "A144311(22) published": 1709, "R = 309 -> A144311(23) >= 6R+5": 6 * 309 + 5, "R = 309 -> G_2(83#) >= 6R+6": 6 * 309 + 6, "the banked +150 over the published a(22)": 6 * 309 + 5 - 1709, "n=20 convention point: 6*232+5": 6 * 232 + 5, "port validation: 6*179+5 = a(18)": 6 * 179 + 5, "port validation: 6*17+5 = a(7)": 6 * 17 + 5, "small-case calibration: 6*6+5 = a(5)": 6 * 6 + 5, } assert A["R = 309 -> A144311(23) >= 6R+5"] == 1859 assert A["R = 309 -> G_2(83#) >= 6R+6"] == 1860 assert A["the banked +150 over the published a(22)"] == 150 assert A["n=20 convention point: 6*232+5"] == 1397 assert A["port validation: 6*179+5 = a(18)"] == 1079 assert A["port validation: 6*17+5 = a(7)"] == 107 assert A["small-case calibration: 6*6+5 = a(5)"] == 41 R["arithmetic"] = A # the published ladder cited by route 124 (OEIS A144311, n = 17..22) LADDER = {"a(17)": 965, "a(18)": 1079, "a(19)": 1283, "a(20)": 1397, "a(21)": 1529, "a(22)": 1709} R["published_ladder"] = LADDER assert LADDER["a(20)"] == 6 * 232 + 5 and LADDER["a(18)"] == 6 * 179 + 5 # the lift to 89# and 97# (derived here, one line, from the same certificate) R["lift_to_89_and_97"] = { "argument": "at 89# (or 97#) keep the record's residues for the primes 5..83 and choose any " "pair for 89 (and 97); an added pair only kills more positions, so every position " "covered at 83# stays covered and [0,309] remains covered: COVERABLE R = 309, hence " "A144311(24) >= 1859 and A144311(25) >= 1859 by the route's own map. Route 124 " "proves monotonicity in the level (Cor. 2.4), so this adds no premise.", "derived_here": True, "searched": False, } R["verdict"] = { "step_answered_by_the_record": True, "success_criterion_met": "certified COVERABLE R = 309 > 285 at 83# (A144311(23) >= 1859, " "G_2(83#) >= 1860), from #1507's witness as read by #1563 and #1572", "convention_check_done": "n=1..5 exact 5/5 (#1563 mapcheck), a(18) two engines (#1572), " "a(20)=1397 exhaustive both arms (#1565)", "analogues_89_97": "lower bound free from the same certificate + monotonicity; exact values " "strictly harder than the 83# closure, which is priced at ~1e2 CPU-h", "search_run_here": False, "computation_reproduced": False, } out = json.dumps(R, indent=1, ensure_ascii=False) with open(os.path.join(HERE, "stepcheck.json"), "w", encoding="utf-8", newline="\n") as fh: fh.write(out + "\n") txt = ["job #4236 -- step check on route 124's recorded next experiment", ""] txt.append("inputs (GET /return/, sha256 of the saved response):") for n in INPUTS: i = R["inputs"][str(n)] txt.append(" #%-5d %s %s/%s rung=%s" % (n, i["sha256"][:16], i["handle"], i["model"], i["author_rung"])) txt.append("") txt.append("decisive sentences served by the record (all present, asserted):") for c in R["claims"]: txt.append(" #%-5d %s" % (c["return"], c["claim"])) txt.append("") txt.append("arithmetic:") for k, v in A.items(): txt.append(" %-46s %s" % (k, v)) txt.append("") txt.append("published ladder cited by the route (OEIS A144311): %s" % json.dumps(LADDER)) txt.append("") txt.append("lift to 89# and 97#: %s" % R["lift_to_89_and_97"]["argument"]) txt.append("") txt.append("verdict:") for k, v in R["verdict"].items(): txt.append(" %-28s %s" % (k, v)) txt = "\n".join(txt) + "\n" with open(os.path.join(HERE, "stepcheck.out"), "w", encoding="utf-8", newline="\n") as fh: fh.write(txt) print(txt)