# coverage2809.py -- job 2809 (route 111). Which Heath-Brown configurations of the band's # modulus weight mu(m), m ~ x^s, are covered by BFI I Theorem 8 (signed, factorable, # tau^B-bounded weights), by BFI I Theorem 9 (smooth inner factor, outer part < x^(1/10)), # and, conditionally, by Fouvry 1987 Corollaire 5 (region D', stated for 1-bounded weights). # # Model (derived in the report): Heath-Brown's identity of order k writes mu on m <= x^s as # a combination of convolutions of <= k factors mu_{<=Z} (Z = x^(s/k), "dust") and <= k-1 # smooth factors 1_{n~N} of any size. The band's extra factor d = [b^2,g] <= (log x)^(3L) # has exponent 0. A configuration is (s; smooth exponents nu_1..nu_t; dust D = s - sum nu), # dust divisible at granularity s/k -> 0 (k fixed but large). It is covered if # T9: some smooth nu_i has s - nu_i < 1/10 (Theorem 9 with q = n_i, r = the rest), or # T8: some sub-product (a subset S of smooth factors plus dust delta in [0, D]) has # exponent y with (s - y, y) in Omega or (y, s - y) in Omega (Theorem 8), or # C5: same with Omega' (Fouvry Cor. 5; conditional, see report). # Exact rational arithmetic; the smooth exponents are on a grid of step 1/G. # stdout is the artifact (deterministic); nothing random, no timing. from fractions import Fraction as F from itertools import combinations_with_replacement as cwr, combinations import sys TENTH = F(1, 10) def w_omega(s): """Open interval of y (exponent of q2) with (theta1, theta2) = (s-y, y) in BFI Thm 8's region.""" lo = max(s - F(1, 3), (5 * s - 2) / 3, F(0)) hi = F(1, 5) if s >= F(29, 56): return None return (lo, hi) if lo < hi else None def w_omega_p(s): """Open interval of y <= s/2 with (s-y, y) in Fouvry's D' (Cor. 5).""" if s >= F(29, 56): return None lo = max((4 * s - F(403, 266)) / 3, (F(7, 4) * s - F(403, 532)) * F(4, 3), F(0)) hi = min((1 - s) / 2, s / 2) return (lo, hi) if lo < hi else None def windows(s, which): w = w_omega(s) if which == "T8" else w_omega_p(s) if w is None: return [] lo, hi = w return [(lo, hi), (s - hi, s - lo)] # both labellings (mirror) def hits(intervals_closed, windows_open): for a, b in intervals_closed: for lo, hi in windows_open: if a < hi and b > lo: return True return False def achievable(nus, D): out = [] n = len(nus) for r in range(n + 1): for S in combinations(range(n), r): base = sum((nus[i] for i in S), F(0)) out.append((base, base + D)) return out def classify(s, nus): D = s - sum(nus, F(0)) if D < 0: return None t9 = any(s - v < TENTH for v in nus) ach = achievable(nus, D) t8 = hits(ach, windows(s, "T8")) c5 = hits(ach, windows(s, "C5")) return t9, t8, c5 def fmt(v): return f"{float(v):.4f}" def main(): G = int(sys.argv[1]) if len(sys.argv) > 1 else 240 TMAX = int(sys.argv[2]) if len(sys.argv) > 2 else 4 levels = [F(1, 2), F(1, 2) + F(1, 240), F(1, 2) + F(1, 120), F(31, 60)] print(f"# coverage2809: grid 1/{G}, up to {TMAX} smooth factors; windows are open intervals of the q2 exponent") for s in levels: w8 = w_omega(s); w5 = w_omega_p(s) print(f"s={s} ({fmt(s)}): T8 window {tuple(map(fmt, w8)) if w8 else None}, C5 window {tuple(map(fmt, w5)) if w5 else None}, T9 needs a smooth factor > {fmt(s - TENTH)}") tot = unc8 = unc85 = 0 examples8, examples85 = [], [] smax = int(s * G) for t in range(0, TMAX + 1): for combo in cwr(range(1, smax + 1), t): nus = [F(c, G) for c in combo] r = classify(s, nus) if r is None: continue t9, t8, c5 = r tot += 1 if not (t9 or t8): unc8 += 1 if len(examples8) < 400 or max(combo) < G // 3: examples8.append(combo) if not (t9 or t8 or c5): unc85 += 1 if len(examples85) < 400 or max(combo) < G // 3: examples85.append(combo) print(f" configurations {tot}; uncovered by T9+T8: {unc8}; uncovered by T9+T8+C5: {unc85}") # one-factor profile: which single smooth exponents nu (rest dust) are uncovered for tag, which in (("T9+T8", False), ("T9+T8+C5", True)): bad = [] for c in range(0, smax + 1): t9, t8, c5 = classify(s, [F(c, G)] if c else []) ok = t9 or t8 or (c5 and which) if not ok: bad.append(c) print(f" one smooth factor + dust, uncovered nu ({tag}): {runs(bad, G)}") for tag, ex in (("T9+T8", examples8), ("T9+T8+C5", examples85)): two = [e for e in ex if len(e) == 2][:6] many = [e for e in ex if len(e) >= 3][:4] small = [e for e in ex if F(max(e), G) < F(1, 3)] print(f" uncovered ({tag}) with every smooth factor < 1/3 (first 400 kept): {len(small)}; max-factor range {fmt(F(min(max(e) for e in small), G)) if small else '-'}..{fmt(F(max(max(e) for e in small), G)) if small else '-'}; samples {[tuple(fmt(F(c, G)) for c in e) for e in small[:5]]}") print(f" sample uncovered ({tag}), 2 factors: {[tuple(fmt(F(c, G)) for c in e) for e in two]}") print(f" sample uncovered ({tag}), >=3 factors: {[tuple(fmt(F(c, G)) for c in e) for e in many]}") def runs(cs, G): if not cs: return "none" out, start, prev = [], cs[0], cs[0] for c in cs[1:]: if c != prev + 1: out.append((start, prev)); start = c prev = c out.append((start, prev)) return ", ".join(f"[{fmt(F(a, G))},{fmt(F(b, G))}]" for a, b in out) if __name__ == "__main__": main()