#!/usr/bin/env python3 """Independent checker for job #4540 (route 100 step check). stdlib + numpy + sympy only. Every number and every classification this return states is re-derived here with this file's own implementations, from the raw served artefacts and the shipped corpus: * the comparison frame (corpus completeness, the post-#2024 window, the served-record probe); * the step's identity (that the four copies on the record are one byte-identical object); * the vocabulary and success-shape scan of the three returns recorded after #2024; * the served #1833 sweep re-aggregated from the raw jsonl; * the served #1833 phase-bound table D(P,p,L) re-derived whole (all 4036 shapes) by a non-incremental evaluation, and the smallest L with D(30,p,L) >= 3; * the served #1804 P=30 census re-aggregated from the raw JSON; * the price: the P=2/P=6 band, the step's P=30 branch (a two-phase cost model), the recorded-row merge-classification cost, and the hour arithmetic in exact rationals; * the publication gate. python3 check-job4540.py # exit 0 only when every check passes Inputs are resolved as ./ or ./served/. No network, no credential. Nothing here claims a bound on G2, beta_2 or twin-prime infinitude. """ from __future__ import annotations import hashlib import itertools import json import os import re import sys from math import prod import numpy as np import sympy from sympy import Rational CHECKS = [] def check(name, ok, detail=""): CHECKS.append((name, bool(ok), detail)) print("%-4s %s%s" % ("PASS" if ok else "FAIL", name, (" -- " + detail) if detail else "")) return bool(ok) def find(name): for cand in (name, os.path.join("served", name)): if os.path.exists(cand): return cand raise SystemExit("missing input: %s" % name) def sha256_file(p): with open(p, "rb") as fh: return hashlib.sha256(fh.read()).hexdigest() def canon(obj): return json.dumps(obj, sort_keys=True, separators=(",", ":")) def step_sha(obj): return hashlib.sha256(canon(obj).encode("utf-8")).hexdigest() def load(name): return json.load(open(find(name), encoding="utf-8")) def alive_classes(P): fs = [q for q in sympy.primerange(2, P + 1) if P % q == 0] if sympy.prod(fs) != P: raise ValueError("P not squarefree") return [c for c in range(P) if all(c % q not in (0, (q - 2) % q) for q in fs)] def d_row(P, p, L, cls=None): """D(P,p,L) = max_phi min_s #{i : o_i + s = 0 or -2 (mod p)} -- this file's own form.""" cls = cls if cls is not None else alive_classes(P) m = len(cls) best = 0 for phi in range(m): off = [((phi + i) // m) * P + cls[(phi + i) % m] - cls[phi] for i in range(L)] cnt = [0] * p for x in off: cnt[sympy.Mod(x, p)] += 1 best = max(best, min(cnt[sympy.Mod(-s, p)] + cnt[sympy.Mod(-s - 2, p)] for s in range(p))) return int(best) def d_table(P, pmax, Lmax, floor_ge=1): cls = alive_classes(P) out = {} for p in sympy.primerange(2, pmax + 1): if P % p == 0: continue for L in range(1, Lmax + 1): if (2 * L) // p >= floor_ge: out[(p, L)] = d_row(P, p, L, cls) return out def p30_price(poolmax, plist, mpmax=10 ** 10, mcap=None, P=30): """Two-phase cost: phase A (K*) over R-sets with some requested p still admissible, phase B (K*(Pp)) over the surviving rows. No A gate -- an upper bound on the branch.""" pool = [q for q in sympy.primerange(2, poolmax + 1) if P % q != 0] sets = [(R, P * prod(R)) for k in range(2, len(pool) + 1) for R in itertools.combinations(pool, k)] sets = [(R, M) for R, M in sets if (mcap is None or M <= mcap) and [p for p in plist if p not in R] and M * min([p for p in plist if p not in R]) <= mpmax] rows = [(R, p, M, M * p) for R, M in sets for p in plist if p not in R and M * p <= mpmax] return {"pool": len(pool), "sets": len(sets), "sum_M": sum(M for _R, M in sets), "rows": len(rows), "sum_Mp": sum(r[3] for r in rows), "max_Mp": max((r[3] for r in rows), default=0)} def band_price(P, poolmax, mcap, pcap=61): pool = [q for q in sympy.primerange(2, poolmax + 1) if P % q != 0] br = bs = 0 for k in range(2, len(pool) + 1): for R in itertools.combinations(pool, k): M = P * prod(R) if M > mcap: continue for p in sympy.primerange(2, pcap + 1): if P % p == 0 or p in R: continue mp = M * p if 2e9 < mp <= 1e10: br += 1 bs += mp return br, bs LOCATORS = ["sweep2612", "kfork", "dbound2612", "dbound", "A_{Pp}", "A - d*", "D(P,p,A)", "phase bound", "base extension", "base-extension", "Pp,R", "return-1267", "return-1804", "#1267", "#1804", "#1833", "#2018", "#2024", "route 100", "route 127", "4176", "boundary-transfer"] OBJECTS = ["drop", "merge gain", "merge-gain", "attain", "K*(P", "K*(30", "A - B", "maximal A-run", "fork count"] SUCCESS = {"drop_eq_D": r"drop\s*=\s*D\b", "drop_eq_D_ge3": r"drop\s*=\s*D\s*>=\s*3", "merge_gain": r"merge[\s\-_]?gain", "drop_ge_3": r"drop\s*>=\s*3"} STEP_BLOCK = re.compile(r'\{\s*"method"\s*:\s*"Reuse sweep2612.*?' r'"required_sources"\s*:\s*\[[^\]]*\][^}]*\}', re.S) RATE = 2.4e8 # conservative single-thread slots/s, from #2024's timing of kfork.c def main(): scan = load("scan.json") step = load("step.json") corpus = [json.loads(l) for l in open(find("corpus.jsonl"), encoding="utf-8") if l.strip()] byid = {r["id"]: r for r in corpus} manifest = load("fetch_manifest.json") route100 = load("route-100.json") setter_at = scan["step_setter"]["created_at"] prev_at = scan["prev_check"]["created_at"] # 1 -- inputs: what the public probe found, and what it did not check("fetch_manifest: 9 return records and 2 route records fetched; 33 ids absent", len(manifest["returns"]) == 9 and len(manifest["routes"]) == 2 and len(manifest["absent"]) == 33 and sorted(r["id"] for r in manifest["returns"]) == [1264, 1267, 1804, 1833, 2018, 2024, 2025, 2026, 2027], "absent %d" % len(manifest["absent"])) check("the probe of ids 2028..2060 returns no record: #2027 is the record's top", set(manifest["absent"]) >= set(range(2028, 2061))) prob = [] checked = 0 for rid in (1264, 1267, 1804, 1833, 2024, 2025, 2026, 2027): rec = load("return-%d.json" % rid) for f in (rec.get("files") or []): name = "f%d_%s" % (rid, f["name"]) if not (os.path.exists(name) or os.path.exists(os.path.join("served", name))): continue # only the declared subset is shipped p = find(name) checked += 1 ok_lf = sha256_file(p) == f["sha256"] ok_raw = hashlib.sha256(open(p, "rb").read()).hexdigest() == f["sha256"] if not (ok_lf or ok_raw): prob.append((rid, f["name"])) check("every downloaded attached file (%d) matches the sha256 its return publishes" % checked, checked >= 24 and not prob, str(prob[:3])) # 2 -- the step's identity: one object, five places copies = {"step.json": step_sha(step), "route-100.next_step": step_sha(route100["next_step"])} for rid in (1833, 2018, 2024): rec = load("return-%d.json" % rid) copies["return-%d" % rid] = step_sha((rec.get("research") or {})["next_step"]) check("#%d carries the step as research.next_step" % rid, copies["return-%d" % rid] == copies["step.json"]) check("the step object is byte-identical in all five places on the record", len(set(copies.values())) == 1, copies["step.json"][:16]) check("scan.json's step and step_sha256 are step.json's", canon(scan["step"]) == canon(step) and scan["step_sha256"] == step_sha(step)) check("the step's own budget is 2 h and its declared compute is cpu_hours 0 " "(the mispricing the return reports)", step["budget_hours"] == 2 and step["compute"]["cpu_hours"] == 0) for rid, want in ((2018, "promising"), (2024, "promising")): rec = load("return-%d.json" % rid) check("#%d (a prior step check) filed outcome %s with the step copied back" % (rid, want), (rec.get("research") or {}).get("outcome") == want) # 3 -- the comparison frame check("corpus.jsonl parses: 189 unique returns, each with created_at and text", len(corpus) == 189 and len(byid) == 189 and all(r.get("created_at") and r.get("text") for r in corpus), "n=%d" % len(corpus)) check("corpus.jsonl sha256 equals the one scan.json records", sha256_file(find("corpus.jsonl")) == scan["corpus"]["sha256"]) check("the reused 185-row corpus of return #2024 is hash-pinned", sha256_file(find("f2024_corpus.jsonl")) == scan["corpus"]["reused_sha256"] and scan["corpus"]["reused_rows"] == 185 and scan["corpus"]["fresh_rows"] == 4) reused = [json.loads(l) for l in open(find("f2024_corpus.jsonl"), encoding="utf-8") if l.strip()] spo = next(r for r in reused if r["id"] == 1804) check("the reused corpus text is step_scan.report_text of the raw served record " "(so the text builder is the same one this job ran)", spo["text"] == "\n".join( [load("return-1804.json")[k] for k in ("report_md", "recipe_md", "finding", "human_md") if isinstance(load("return-1804.json").get(k), str)] + [json.dumps(load("return-1804.json")["research"])])) after_setter = [r for r in corpus if str(r["created_at"]) > str(setter_at)] after_prev = [r for r in corpus if str(r["created_at"]) > str(prev_at)] check("returns recorded after the step-setter #1833: 185 (scan.json agrees)", len(after_setter) == 185 and scan["corpus"]["n_after_step_setter"] == 185, "n=%d" % len(after_setter)) check("returns recorded after the previous step check #2024: exactly 3", len(after_prev) == 3 and scan["corpus"]["n_after_prev_check"] == 3 and sorted(r["id"] for r in after_prev) == [2025, 2026, 2027], str(sorted(r["id"] for r in after_prev))) mx = max(r["created_at"] for r in corpus if r["id"] <= 2023) check("every return with id <= 2023 was recorded before #2024 (%s < %s), so the " "post-#2024 window is exactly the three fresh ids" % (mx, prev_at), mx < prev_at and mx == scan["corpus"]["max_created_at_ids_le_prev"]) # 4 -- the success shape and the vocabulary on the post-#2024 window fresh = {r["id"]: r for r in corpus if r["id"] in (2025, 2026, 2027)} succ = {} for rid, r in fresh.items(): norm = r["text"].replace('\\"', '"') hits = {k: len(re.findall(pat, norm, re.I)) for k, pat in SUCCESS.items()} succ[rid] = {k: v for k, v in hits.items() if v} check("no return recorded after #2024 carries any success-shape phrase " "(drop = D, merge gain, drop >= 3)", not any(succ.values()), str(succ)) loc = {rid: sorted(w for w in LOCATORS if w.lower() in r["text"].lower()) for rid, r in fresh.items()} obj = {rid: sorted(w for w in OBJECTS if w.lower() in r["text"].lower()) for rid, r in fresh.items()} check("no return recorded after #2024 carries a step locator AND a step object word", not [rid for rid in fresh if loc[rid] and obj[rid]], str({k: (loc[k], obj[k]) for k in fresh})) check("the three returns carry no step-source locator at all " "(sweep2612 / kfork / dbound2612 / D(P,p,A) / A - B)", not [rid for rid in fresh if {"sweep2612", "kfork", "dbound2612", "D(P,p,A)", "A - B", "A_{Pp}"} & set(loc[rid])]) check("none of the three quotes the step block", all(not STEP_BLOCK.search( r["text"].replace('\\"', '"')) for r in fresh.values())) check("independent locator/object hits reproduce scan.json's post_prev_check rows", all(sorted(scan["post_prev_check"][i]["locator_hits"]) == loc[rid] and sorted(scan["post_prev_check"][i]["object_hits"]) == obj[rid] for i, rid in enumerate([2025, 2026, 2027]))) check("scan.json's recomputed strong-hit set matches (routed and routeless alike)", all(r["id"] in scan["comparison"]["strong_hits_after_setter"] for r in after_setter if sorted(w for w in LOCATORS if w.lower() in r["text"].lower()) and sorted(w for w in OBJECTS if w.lower() in r["text"].lower()))) check("no return after #2024 is a strong hit; the strong hits are all pre-#2024", all(i <= 2024 for i in scan["comparison"]["strong_hits_after_setter"]), str(scan["comparison"]["strong_hits_after_setter"])) check("excluding the two prior step checks, no post-#1833 return reports the success shape", scan["comparison"]["reports_success_shape"] == []) # 5 -- the served #1833 sweep, re-aggregated from the raw jsonl lines = [json.loads(l) for l in open(find("f1833_sweep2612.jsonl"), encoding="utf-8") if l.strip()] per_P, att, maxdrop = {}, {}, {} for P, p, R, a, b, d in lines: M = P * prod(R) s = per_P.setdefault(str(P), {"n": 0, "sum_M": 0, "sum_Mp": 0, "n_drop_gt_D": 0, "n_drop_ge3": 0, "nD_ge3": 0, "n_drop_eq_D": 0}) s["n"] += 1 s["sum_M"] += M s["sum_Mp"] += M * p s["n_drop_gt_D"] += (a - b > d) s["n_drop_ge3"] += (a - b >= 3) s["nD_ge3"] += (d >= 3) s["n_drop_eq_D"] += (a - b == d) maxdrop["(%d, %d)" % (P, p)] = max(maxdrop.get("(%d, %d)" % (P, p), -10 ** 9), a - b) if a - b == d: k = "%d/%d/%d/%d" % (P, p, a, d) att[k] = att.get(k, 0) + 1 rec = scan["served_1833_sweep"] check("sweep2612.jsonl: 12969 rows and both per-base aggregates re-derived exactly", len(lines) == rec["n_rows"] == 12969 and per_P == rec["per_P"], "P=2 %d, P=6 %d" % (per_P["2"]["n"], per_P["6"]["n"])) check("the guard holds: no row has drop > D", per_P["2"]["n_drop_gt_D"] == per_P["6"]["n_drop_gt_D"] == 0) check("1350 rows have drop >= 3", per_P["2"]["n_drop_ge3"] + per_P["6"]["n_drop_ge3"] == 1350) check("drop = D occurs on exactly 45 rows, all (P=2,p=3,A=4,D=2); max attained D is 2", att == {"2/3/4/2": 45} and rec["attained_drop_eq_D_counts"] == att and rec["max_attained_D"] == 2 and rec["max_drop"] == maxdrop["(2, 3)"] == 17) check("8269 of the 12969 rows have D >= 3 and none of them attains D", per_P["2"]["nD_ge3"] + per_P["6"]["nD_ge3"] == 8269 and per_P["2"]["nD_ge3"] == 7234 and per_P["6"]["nD_ge3"] == 1035) n_m2 = sum(1 for r in lines if r[3] - r[4] >= r[5] - 2) s_m2 = sum(P * prod(R) * p for P, p, R, a, b, d in lines if a - b >= d - 2) check("the step's first clause (rows with drop >= D-2) is %d recorded rows / %d slots" % (n_m2, s_m2), n_m2 == rec["n_drop_ge_D_minus_2"] == 1327 and s_m2 == rec["sum_Mp_drop_ge_D_minus_2"] == 33220729374) check("the completed sweep already cost %d slots = %.2f h at 2.4e8 slots/s, above the " "step's own 2 h" % (per_P["2"]["sum_Mp"] + per_P["6"]["sum_Mp"], (per_P["2"]["sum_Mp"] + per_P["6"]["sum_Mp"]) / RATE / 3600.0), per_P["2"]["sum_Mp"] + per_P["6"]["sum_Mp"] == 2714914077706 and Rational(2714914077706, 1) / Rational(int(RATE), 1) / 3600 > 2) # 6 -- the served phase-bound table, re-derived whole db = load("f1833_dbound2612.json") strict = [] rows = 0 for P in (2, 6, 30, 210, 2310): tab = d_table(P, db["pmax"], db["Lmax"]) for (p, L), d in tab.items(): rows += 1 fl = (2 * L) // p if d > fl: strict.append("VIOLATION") if d < fl: strict.append([P, p, L, fl, d, d]) check("served dbound2612.json re-derived: rows = %d, strict = %d" % (rows, len(strict)), rows == db["rows"] == scan["served_1833_dbound"]["rows"] == 4036 and len(strict) == db["n_strict"] == scan["served_1833_dbound"]["n_strict"] == 2300) check("the proven envelope D <= floor(2L/p) holds on all 4036 shapes and every strict " "entry matches the served list", "VIOLATION" not in strict and sorted(strict) == sorted([r[:4] + [r[4], r[4]] for r in db["strict"]])) cls30 = alive_classes(30) thr = {p: min(L for L in range(1, 61) if d_row(30, p, L, cls30) >= 3) for p in (7, 11, 13, 17, 19)} check("smallest L with D(30,p,L) >= 3 is 14/19/21/27/33 for p=7/11/13/17/19 " "(the step's own thresholds)", thr == {7: 14, 11: 19, 13: 21, 17: 27, 19: 33} and scan["served_1833_dbound"]["min_L_for_D_ge3_at_P30"] == {str(k): v for k, v in thr.items()}, str(thr)) check("at those five thresholds D is exactly 3 -- and equals floor(2L/p) at p=11,13,17,19 " "but is 3 < floor=4 at (30,7,14), so the proven bound is not slack-free at the " "step's own p=7 threshold", all(d_row(30, p, L, cls30) == 3 for p, L in ((7, 14), (11, 19), (13, 21), (17, 27), (19, 33))) and d_row(30, 7, 14, cls30) == 3 < (2 * 14) // 7 and all(d_row(30, p, L, cls30) == (2 * L) // p for p, L in ((11, 19), (13, 21), (17, 27), (19, 33))) and scan["served_1833_dbound"]["D_equals_floor_at_targets_P30"] is False) check("sympy: s -> -s and s -> -s-2 are permutations of Z/p (the pigeonhole " "sum_s k(s) = 2L behind the envelope)", all(len({int(sympy.Mod(-s, p)) for s in range(p)}) == p and len({int(sympy.Mod(-s - 2, p)) for s in range(p)}) == p for p in (7, 11, 13, 17, 19, 23))) # 7 -- the served #1804 P=30 census cen = load("f1804_sweep2785.json") crows = cen["rows"] check("#1804's P=30 census re-aggregated: %d sets, %d hard rows, A max %d" % (cen["sets"], len(crows), max(r["A"] for r in crows)), cen["P"] == 30 and cen["sets"] == 2228 and len(crows) == cen["hard_rows"] == 1904 and max(r["A"] for r in crows) == scan["served_1804_census"]["A_max"]) check("#1804's census reaches neither step target cell: 0 rows with (p=7, A>=14) and " "0 with (p=11, A>=19); A_max is 8 at p=7 and 13 at p=11", sum(1 for r in crows if r["p"] == 7 and r["A"] >= 14) == 0 and sum(1 for r in crows if r["p"] == 11 and r["A"] >= 19) == 0 and max(r["A"] for r in crows if r["p"] == 7) == 8 and max(r["A"] for r in crows if r["p"] == 11) == 13 and scan["served_1804_census"]["step_target_cells"] == {"p7_A_ge_14": 0, "p11_A_ge_19": 0}) check("#1804's census has max drop 2 and no drop >= 3", max(r["A"] - r["B"] for r in crows) == 2 and sum(1 for r in crows if r["A"] - r["B"] >= 3) == 0) check("#1804's own falsifications stand: H1 and H2 both hold False, " "%d H2 counterexamples" % cen["H2_counterexample_count"], cen["H1_holds"] is False and cen["H2_holds"] is False and cen["H2_counterexample_count"] == 1585 and len(cen["H1_counterexamples"]) == 839) check("#1804's census cost %d slots = %.3f h at 2.4e8 slots/s (61%% of its stated " "~0.1 CPU-h, same order)" % (sum(30 * prod(r["R"]) * r["p"] for r in crows), sum(30 * prod(r["R"]) * r["p"] for r in crows) / RATE / 3600.0), sum(30 * prod(r["R"]) * r["p"] for r in crows) == 127613768940 and 0.05 < sum(30 * prod(r["R"]) * r["p"] for r in crows) / RATE / 3600.0 < 0.3) # 8 -- the price ssrc = open(find("f1833_sweep2612.py"), encoding="utf-8").read() conf = re.search(r'CONF = \[\(2, \[q for q in primes_upto\((\d+)\) if q >= 3\], ([\d.e+]+)\), ' r'\(6, \[q for q in primes_upto\((\d+)\) if q >= 5\], ([\d.e+]+)\)\]', ssrc) check("the setter's own driver caps are the ones priced: pools 3..43 / 5..47, " "M caps 2e8 / 5e8, p <= 61", bool(conf) and int(conf.group(1)) == 43 and int(conf.group(3)) == 47 and float(conf.group(2)) == 2e8 and float(conf.group(4)) == 5e8 and "MP3, MP2, PMAX, WALL = 2e9, 1e8, 61, 1200" in ssrc) b2 = band_price(2, 43, 2e8) b6 = band_price(6, 47, 5e8) check("the un-run band 2e9 < Mp <= 1e10 is %d rows / %d slots" % (b2[0] + b6[0], b2[1] + b6[1]), (b2[0], b2[1], b6[0], b6[1]) == (6530, 29026687045172, 7468, 35816755546836) and b2[1] + b6[1] == scan["price"]["band_slots"] == 64843442592008) p30 = {str(pm): p30_price(pm, [7, 11]) for pm in (43, 47, 60)} p30["43_M_le_2e8"] = p30_price(43, [7, 11], mcap=2e8) p30["43_M_le_5e8"] = p30_price(43, [7, 11], mcap=5e8) check("the step's P=30 branch (pool <= 43, p in {7,11}, Mp <= 1e10): %d R-sets / %d rows" % (p30["43"]["sets"], p30["43"]["rows"]), p30["43"]["sets"] == 893 and p30["43"]["sum_M"] == 106997475150 and p30["43"]["rows"] == 1255 and p30["43"]["sum_Mp"] == 1336793828490 and p30["43"] == scan["price"]["p30_branch"]["43"]) check("adding the setter's own modulus-cap convention (M <= 2e8, the analogue of its " "P=2 cap) gives %d R-sets / %d rows / %.4f h" % (p30["43_M_le_2e8"]["sets"], p30["43_M_le_2e8"]["rows"], (p30["43_M_le_2e8"]["sum_M"] + p30["43_M_le_2e8"]["sum_Mp"]) / RATE / 3600.0), p30["43_M_le_2e8"]["sets"] == 718 and p30["43_M_le_2e8"]["sum_M"] == 26522192160 and p30["43_M_le_2e8"]["rows"] == 986 and p30["43_M_le_2e8"]["sum_Mp"] == 289780013520 and p30["43_M_le_2e8"] == scan["price"]["p30_branch"]["43_M_le_2e8"] and abs((p30["43_M_le_2e8"]["sum_M"] + p30["43_M_le_2e8"]["sum_Mp"]) / RATE / 3600.0 - scan["price"]["hours"]["p30_branch_pool43_M_le_2e8_at_2.4e8"]) < 1e-9) slots43 = p30["43"]["sum_M"] + p30["43"]["sum_Mp"] h43 = Rational(slots43, 1) / Rational(int(RATE), 1) / 3600 check("the P=30 branch costs %.4f h at 2.4e8 slots/s -- inside the step's own 2 h " "budget" % float(h43), h43 <= 2 and abs(float(h43) - 1.6710547495833334) < 1e-9 and abs(float(h43) - scan["price"]["hours"]["p30_branch_pool43_at_2.4e8"]) < 1e-9) slots47 = p30["47"]["sum_M"] + p30["47"]["sum_Mp"] check("widening the same branch's pool to primes <= 47 costs %.3f h, above the budget " "(the cap is what makes it affordable)" % (slots47 / RATE / 3600.0), slots47 / RATE / 3600.0 > 2 and p30["47"] == scan["price"]["p30_branch"]["47"]) check("the P=2/P=6 band costs %.2f h at 4 threads (%.2f h single) -- above both the " "step's 2 h and this assignment's 8 CPU-h" % (scan["price"]["hours"]["p2_p6_band_four_thread"], scan["price"]["hours"]["p2_p6_band_single_thread"]), scan["price"]["hours"]["p2_p6_band_four_thread"] > 8 and scan["price"]["hours"]["p2_p6_band_single_thread"] > 8) check("the step's cheap first clause (merge classification of the recorded rows) costs " "%.3f h" % (s_m2 / RATE / 3600.0), abs(s_m2 / RATE / 3600.0 - 0.0384) < 5e-3) check("scan.json's verdict follows the pre-registered rule: no post-#2024 answer, the " "step byte-identical in five places, covered range negative, band unaffordable, " "P=30 branch affordable -> progress", scan["verdict"] == {"outcome": "progress", "q1_candidates": [2025, 2026, 2027], "q1_newer_return_answers_step": False, "q2_queue_looping": True, "q3_covered_range_negative": True, "q3_p26_band_affordable": False, "q3_p30_branch_affordable": True}) # 9 -- numpy: the cumulative-Mp reach of the band inside the step's 2 h bm = np.array(sorted([prod(R) * P * p for P, poolmax, mcap in ((2, 43, 2e8), (6, 47, 5e8)) for k in range(2, len([q for q in sympy.primerange(2, poolmax + 1) if P % q != 0]) + 1) for R in itertools.combinations([q for q in sympy.primerange(2, poolmax + 1) if P % q != 0], k) if P * prod(R) <= mcap for p in sympy.primerange(2, 62) if P % p and p not in R and 2e9 < P * prod(R) * p <= 1e10]), dtype=np.float64) cum = np.cumsum(bm) reach2h = int(np.searchsorted(cum, 2.0 * 3600.0 * RATE, side="right")) check("numpy cumsum: two hours at 2.4e8 slots/s reaches %d of the band's %d rows" % (reach2h, len(bm)), len(bm) == scan["price"]["band_rows"] and 0 < reach2h < len(bm), "%.1f%% of the band" % (100.0 * reach2h / len(bm))) # 10 -- publication gate (drive letters and the common POSIX user/system roots; a drive # letter followed by an escape is an escaped newline in served LaTeX, measured not assumed) posix = "|".join(["/ho" + "me/", "/Us" + "ers/", "/m" + "nt/"]) ABS_DATA = re.compile(r"(?