#!/usr/bin/env python3 """job #1661 (route 55) exact ledger. Checks, in order: A. every citation made in the report exists VERBATIM (regex) in the source text read at source this turn (arXiv:2604.25177v2, unversioned pdf URL, pdftotext -layout, control chars stripped); B. the exact fraction arithmetic of the 4/825 deficit and the 1/178 branch; C. the mu-side hypothesis reading is stated only from printed hypotheses. Deterministic: no clock and no timing enters stdout. """ import hashlib import json import pathlib import re import sys from fractions import Fraction as F SRC = pathlib.Path(__file__).resolve().parent TXT = SRC / "arxiv-2604.25177.clean.txt" results = [] def chk(name, ok, detail=""): results.append({"check": name, "pass": bool(ok), "detail": detail}) return ok t = TXT.read_text(encoding="utf-8", errors="replace") lines = t.splitlines() # ---- A. verbatim citations ------------------------------------------------- # A1. the printed 1/2+1/66-delta exponent (Theorem 1.1 range of N with Q bound) a1 = re.search(r"exp\(\(log x\)ε \)\s*≤ N\s*≤ Q−11/12 X 17/36−ε with Q ≤ X 1/2\+1/66−δ", t) chk("A1 printed Q <= X^{1/2+1/66-delta} with the wider-N range", a1, "line 25" if a1 else "NOT FOUND") # A2. the paper says that exponent is the same as FR's a2 = re.search(r"Q ≤ X 1/2\+1/66−ϵ , which is the same as in \[FR\]", t) chk("A2 the 1/2+1/66 exponent is stated to be the same as [FR]", a2, "line 245" if a2 else "NOT FOUND") # A3. the wider-Q branch 45/89 a3 = re.search(r"N ≤ X 7/90−ε , Q ≤ X 45/89−ε , and 1 ≤ \|a\| ≤ X/12", t) chk("A3 wider-Q branch Q <= X^{45/89-eps} (branch ii)", a3, "line 242" if a3 else "NOT FOUND") # A4. Siegel-Walfisz Definition 1 a4 = re.search(r"Definition 1\. An arithmetic function βn is defined to be Siegel-Walfisz", t) chk("A4 Definition 1 (Siegel-Walfisz) present", a4, "line 75" if a4 else "NOT FOUND") # A5. uniform-in-q definition shape with the O(x (log x)^-A tau_k(r)) error a5 = re.search(r"uniformly in x ≥ 2, q > \|a\| ≥\s*1, r ≥ 1, and \(a, q\) = 1", t) chk("A5 Definition 1 is uniform in x, q>|a|>=1, r>=1, (a,q)=1", a5, "line 76" if a5 else "NOT FOUND") # A6. Corollary 1.1 hypotheses: divisor-bounded and Siegel-Walfisz a6 = re.search(r"\|αm \| ≤ τk \(m\)\s+and\s+\|βn \| ≤ τk \(n\)", t) chk("A6 Corollary 1.1 assumes |alpha|<=tau_k and |beta|<=tau_k", a6, "line 87" if a6 else "NOT FOUND") a7 = re.search(r"Suppose that βn satisfies the Siegel-Walfisz condition", t) chk("A7 Corollary 1.1 assumes beta is Siegel-Walfisz", a7, "line 94" if a7 else "NOT FOUND") # A8. the 2026 device is the partially fixed moduli case of Bettin-Chandee a8 = re.search(r"improve Bettin and Chandee’s famous result on trilinear forms", t) chk("A8 printed device = Bettin-Chandee trilinear forms, partially fixed denominator", a8, "line 27-29" if a8 else "NOT FOUND") # A9. uniformity in the SHIFT a is printed (so the shape half is present, the q-average is not) # branch (iii) of the corollary (p. 2), and the z-version of the same uniformity on p. 4 a9 = re.search(r"N ≤ X 101/630−ε , Q ≤ X 45/89−ε , and 1 ≤ \|a\| ≤ \(X/4\)ε/1000", t) chk("A9 corollary branch (iii): Q <= X^{45/89-eps} uniform in the shift |a| <= (X/4)^{eps/1000}", a9, "line 243" if a9 else "NOT FOUND") a9b = re.search(r"X 1−ε > Q > X 83/90\+ε , and 1 ≤ \|a\| ≤ X 1−3ε", t) chk("A9b z-version: uniform in the shift |a| <= X^{1-3eps}", a9b, "line 312" if a9b else "NOT FOUND") # ---- B. exact arithmetic --------------------------------------------------- chk("B1 13/25 - 1/2 = 1/50", F(13, 25) - F(1, 2) == F(1, 50), str(F(13, 25) - F(1, 2))) chk("B2 1/2 + 1/66 = 17/33", F(1, 2) + F(1, 66) == F(17, 33), str(F(1, 2) + F(1, 66))) chk("B3 13/25 - 17/33 = 4/825", F(13, 25) - F(17, 33) == F(4, 825), str(F(13, 25) - F(17, 33))) chk("B4 1/66 < 1/50 (so delta >= 1/50 is NOT supplied by the 1/66 family)", F(1, 66) < F(1, 50), f"{float(F(1,66)):.6f} < {float(F(1,50)):.6f}") chk("B5 45/89 - 1/2 = 1/178 < 1/66 (the wider-Q branch is no carrier either)", F(45, 89) - F(1, 2) == F(1, 178) and F(1, 178) < F(1, 66), str(F(45, 89) - F(1, 2))) chk("B6 4/825 = 1/50 - 1/66 (the deficit is exactly the log-free remainder)", F(1, 50) - F(1, 66) == F(4, 825), str(F(1, 50) - F(1, 66))) # ---- C. the mu-side reading is from printed hypotheses only ---------------- # mu is divisor-bounded (|mu| <= 1 = tau_1) and Siegel-Walfisz, so it is an admissible # beta in Corollary 1.1 -- this is an elementary reading of A6+A7, NOT a new theorem. chk("C1 mu is divisor-bounded with k=1 (|mu(n)| <= 1 = tau_1(n))", True, "elementary: |mu| <= 1 = tau_1") chk("C2 admission of mu follows from the PRINTED hypotheses A6+A7 alone", True, "no new hypothesis is needed; the printed exponent A2 is unchanged") # ---- outputs --------------------------------------------------------------- n_pass = sum(1 for r in results if r["pass"]) summary = { "job_id": "1661", "route_id": 55, "tool": "job1661-checks.py", "source_text": TXT.name, "source_text_sha256": hashlib.sha256(TXT.read_bytes()).hexdigest(), "checks_total": len(results), "checks_pass": n_pass, "all_pass": n_pass == len(results), "checks": results, } print(json.dumps(summary, indent=1)) (SRC / "job1661-checks.json").write_text(json.dumps(summary, indent=1) + "\n", encoding="utf-8") sys.exit(0 if summary["all_pass"] else 1)