#!/usr/bin/env python3 """job2111 ledger — rescue of return #170 (price the UNREAD divisor-bounded lead). Every check prints PASS/FAIL with its measured value. Timings go to stderr so the stdout log stays byte-reproducible. Reads only files under this run's work/ directory plus the served docs saved there; no network, no credentials, no writes outside stdout. Checks: A1 #170 is a trusted REJECTION of a direction (statement-level), not of a route/attempt A2 the review's own falsifier clause, verbatim, and its Type-II sentence A3 the record's own pre-review status of the lead: title only / UNREAD / not importable A4 the changed ingredient: the paper's statements, from two venue pages (bytes + sha256) A5 exact level arithmetic: the object's lcm exponent vs every published lane A6 the support clause, measured exactly: mu's support is squarefree, not smooth A7 the changed ingredient does NOT satisfy the review's falsifier (scope check) A8 prior art: BV-for-mu at level 1/2 is known; the record's derived Mobius-BV level A9 the d=1 reading the review relies on is anchored in the served text A10 channel record: arXiv API and one venue page failed as CHANNELS, never as absence """ import hashlib import json import os import re import sys import time from fractions import Fraction as F HERE = os.path.dirname(os.path.abspath(__file__)) WORK = os.path.dirname(HERE) # .../work DOCS = os.path.join(WORK, "docs") RESULTS = [] def check(name, ok, detail): RESULTS.append((name, bool(ok))) print("%s %s -- %s" % ("PASS" if ok else "FAIL", name, detail)) def rd(p): with open(p, encoding="utf-8", errors="replace") as f: return f.read() def sha(path): return hashlib.sha256(open(path, "rb").read()).hexdigest() # ------------------------------------------------------------------ inputs r170 = json.load(open(os.path.join(WORK, "r170.json"), encoding="utf-8")) rev = r170["reviews"][0] notes = rev["notes_md"] fca = rd(os.path.join(DOCS, "full-coefficient-average.md")) exec4 = rd(os.path.join(DOCS, "RESEARCH-EXECUTION.md")) mbv = rd(os.path.join(DOCS, "mobius-bv-derivation.md")) handoff = rd(os.path.join(DOCS, "RESEARCH-HANDOFF.md")) osu = rd(os.path.join(HERE, "osu-seminar-roy.html")) absx = rd(os.path.join(HERE, "rsv-abstract.txt")) vpub = rd(os.path.join(HERE, "vatwani-publications.html")) # ------------------------------------------------------------------ A1 check("A1 #170 is a trusted rejection of a DIRECTION", r170["type"] == "direction" and r170["status"] == "rejected" and r170["final_rung"] is None and r170["research_route_id"] is None and rev["verdict"] == "reject" and rev["trusted"] is True and rev["rung"] == "refuted" and rev["reject_reason"] == "refuted" and r170["author_rung"] == "conjectured", "type=%s status=%s final_rung=%r route=%r rung=%s trusted=%s weight=%s author_rung=%s" % (r170["type"], r170["status"], r170["final_rung"], r170["research_route_id"], rev["rung"], rev["trusted"], rev["weight"], r170["author_rung"])) # ------------------------------------------------------------------ A2 falsifier = ("What would falsify this review") t2 = ("a theorem on multiplicative functions in progressions says nothing about a bilinear Type II sum") low = notes.lower() check("A2 the review's falsifier clause and its Type-II sentence are verbatim", falsifier in notes and t2.lower() in low and "eh_{mu}" in low and "x^(1/2+eps)" in notes, "notes_md %d chars sha256 %s" % (len(notes), hashlib.sha256(notes.encode()).hexdigest())) i = notes.find(falsifier) print(" falsifier clause: %s" % " ".join(notes[i:i + 300].split())) # ------------------------------------------------------------------ A3 check("A3 the record's own pre-review status of the lead is title-only / UNREAD", "Roy-Savalia-Vatwani" in fca and "title only" in fca and "UNREAD. Not importable." in fca and "no arXiv record under au:Vatwani or au:Savalia" in fca and "UNREAD lead, with no theorem imported" in exec4 and "not made multiplicative" in exec4, "full-coefficient-average.md %d chars, RESEARCH-EXECUTION.md %d chars" % (len(fca), len(exec4))) # ------------------------------------------------------------------ A4 phrases = ["mean-value estimate for trilinear forms involving arbitrary sequences over arithmetic progressions", "excluding the contribution of exceptional characters", "minimal hypotheses on the growth of the sequences", "upper bounds in terms of the $L^2$-norms of the corresponding sequences", "multiplicative functions supported on smooth numbers", "q\u2264x^{3/5}\u2212\\epsilon", "Siegel-Walfisz criterion"] missing = [p for p in phrases if p not in absx] check("A4 the changed ingredient (the paper's statements) is on the record in bytes", not missing and "Divisor-bounded multiplicative functions in arithmetic progressions" in vpub and "submitted" in vpub and "trilinear" in osu, "osu page %d B sha256 %s; abstract %d B sha256 %s; missing=%s" % (len(osu.encode()), sha(os.path.join(HERE, "osu-seminar-roy.html")), len(absx), hashlib.sha256(absx.encode()).hexdigest(), missing)) # ------------------------------------------------------------------ A5 e1 = F(1, 2) # e_1 = floor(x^(1/2+eps)), eps>0 fixed (RESEARCH-HANDOFF l.231) U = F(6, 25) # the divisor cut d <= U = V = x^(6/25) (#170's F1) lcm_exp = e1 + U # lcm(e,d), worst case lanes = {"Bombieri-Vinogradov / BV-for-mu (record)": F(1, 2), "record's derived Mobius-BV T^(1/2)/log^B": F(1, 2), "Roy-Savalia-Vatwani corollary (smooth support)": F(3, 5), "Pascadi Thm 1.5 (smooth numbers, all moduli)": F(5, 8), "Drappeau-Granville-Shao Thm 1.2 (class C)": F(3, 5)} above = [k for k, v in lanes.items() if v < lcm_exp] check("A5 the object's lcm level exceeds EVERY published lane, exactly", lcm_exp == F(37, 50) and float(lcm_exp) == 0.74 and len(above) == len(lanes) and e1 == F(1, 2) and U == F(6, 25) # eps>0 makes e_1's exponent exceed 1/2 strictly and max(lanes.values()) == F(5, 8) and F(3, 5) < F(5, 8) < lcm_exp and "x^(1/2+eps)" in notes, # the review's own premise, quoted above "e_1=x^(1/2+eps)%s, U=%s, lcm exponent=%s=%.4f; lanes %s; above-lane count %d/%d" % (" (eps>0)", U, lcm_exp, float(lcm_exp), {k: str(v) for k, v in lanes.items()}, len(above), len(lanes))) # ------------------------------------------------------------------ A6 N, y = 200000, 447 # 447 = isqrt(200000) prime = bytearray([1]) * (N + 1) prime[0] = prime[1] = 0 for p in range(2, int(N ** 0.5) + 1): if prime[p]: for m in range(p * p, N + 1, p): prime[m] = 0 # y-smooth indicator: every prime factor <= y is_y_smooth = bytearray([1]) * (N + 1) is_y_smooth[0] = 0 for p in range(2, N + 1): if prime[p] and p > y: for m in range(p, N + 1, p): is_y_smooth[m] = 0 sqfree = bytearray([1]) * (N + 1) sqfree[0] = 0 for p in range(2, int(N ** 0.5) + 1): if prime[p]: pp = p * p for m in range(pp, N + 1, pp): sqfree[m] = 0 psi = sum(is_y_smooth[1:]) sqf = sum(sqfree[1:]) both = sum(1 for n in range(1, N + 1) if sqfree[n] and is_y_smooth[n]) non_smooth_sqf = sqf - both check("A6 support clause: mu's support is squarefree, and the smooth part is a minority", psi < N / 2 and abs(sqf / N - 6 / 3.141592653589793 ** 2) < 1e-3 and both < psi and non_smooth_sqf > both, "N=%d y=isqrt(N)=%d: Psi(N,y)=%d (%.4f N), squarefree=%d (%.4f N), squarefree&smooth=%d (%.4f N)" % (N, y, psi, psi / N, sqf, sqf / N, both, both / N)) # ------------------------------------------------------------------ A7 has_restriction = "supported on smooth numbers" in absx and "Siegel-Walfisz" in absx claims_arbitrary_weights = re.search(r"arbitrary (bounded )?weights", absx) is not None check("A7 the changed ingredient does NOT satisfy the review's falsifier", has_restriction and not claims_arbitrary_weights, "smooth-support + Siegel-Walfisz restriction present; an unconditional level for arbitrary " "bounded weights in class -2 is NOT claimed (falsifier unmet -> the refutation stands at its scope)") # ------------------------------------------------------------------ A8 gs = re.search(r"The analogous result is known to hold when f = .{1,3}, the M.{0,2}bius function", mbv) check("A8 prior art: BV-for-mu at level 1/2 is known, and the record's level is 1/2 with a log power", gs is not None and "Q\u2264T^(1/2)/(log T)^B" in mbv and "The level is exactly 1/2 with a logarithmic saving" in mbv and "Granville\u2013Shao" in mbv, "mobius-bv-derivation.md %d chars: level 1/2 (log power) + the Granville\u2013Shao mu sentence" % len(mbv)) # ------------------------------------------------------------------ A9 check("A9 the review's d=1 reading is anchored in the served text", "f(n)=Lambda(n-2)mu(n)" in handoff and "e_1=floor(x^(1/2+eps))" in handoff and "D^(e_1)>=-4x/25+o(x)" in handoff and "d | n-2" in notes.replace(" ", " "), "RESEARCH-HANDOFF has f, e_1 and the sufficient input; the review's d=1 term = mu(n)log(n-2) " "with modulus e <= e_1") # ------------------------------------------------------------------ A10 ch = json.load(open(os.path.join(HERE, "channels.json"), encoding="utf-8")) check("A10 channel failures are recorded as channels, never as absence", any("406" in v for v in ch["arxiv"].values()) and any("SSL" in v for v in ch["pages"].values()) and ch["web_search"]["organic_results"] > 0 and ch["claim"] == "failure, not absence", "arxiv API 406 x%d, one venue page SSL-failed x%d, web_search up (%d organic results)" % (sum("406" in v for v in ch["arxiv"].values()), sum("SSL" in v for v in ch["pages"].values()), ch["web_search"]["organic_results"])) ok = sum(1 for _, o in RESULTS if o) print("\n%d/%d PASS" % (ok, len(RESULTS))) print("ALL_PASS = %s" % (ok == len(RESULTS))) sys.exit(0 if ok == len(RESULTS) else 1)