#!/usr/bin/env python3 """Route 165 first look (job 4153): exact-rational ledger for the proposed dyadic-union removal of the max over t in consumer (16) of research/moving-cutoff-parity.md (served sha256 ef7a1865...). All quantities are exponents of x (x = 2^j) or exact rational constants; ln 2 appears only symbolically. stdout is the artifact (JSON); python3 stdlib. """ import json from fractions import Fraction as F checks = [] def check(name, cond, detail): checks.append({"check": name, "pass": bool(cond), "detail": detail}) # (3): y = ceil(x^(12/25)), Q = floor(x/y); moduli e <= Q, t in [x/2, x]. th_y = F(12, 25) th_Q = 1 - th_y check("C1 level of the moduli", th_Q == F(13, 25) and th_Q - F(1, 2) == F(1, 50), "e <= Q = x/y = x^(1-12/25) = x^(13/25); excess over 1/2 is %s" % (th_Q - F(1, 2))) # The t-range of Delta_e in (9)/(13): (x/2, x], x = 2^j. Count the dyadic blocks (2^i, 2^(i+1)] # (the consumer's own half-open convention) containing an integer of (2^(j-1), 2^j], j = 10..60. # Integer test: block i meets (lo, hi] iff max(2^i, lo) < min(2^(i+1), hi). counts = set() for j in range(10, 61): lo, hi = 2 ** (j - 1), 2 ** j counts.add(sum(1 for i in range(j + 1) if max(2 ** i, lo) < min(2 ** (i + 1), hi))) check("C2 dyadic t-blocks in (x/2,x]", counts == {1}, "the max over t in (13) already ranges over one dyadic block; a union over t-blocks has 1 term, loss factor 1") # Level is a function of e only: splitting t leaves the set {e <= x^(13/25)} unchanged. # For any cutoff exponent theta_y the two pieces T1 (d <= y) and T2 (e <= x/y) need levels # theta_y and 1 - theta_y; their max is >= 1/2, = 1/2 only at theta_y = 1/2. grid = [F(k, 1000) for k in range(1, 1000)] mx = min(max(t, 1 - t) for t in grid) check("C3 y*Q = x forces max level >= 1/2", mx == F(1, 2) and all(max(t, 1 - t) > F(1, 2) for t in grid if t != F(1, 2)), "min over theta_y in (0,1) of max(theta_y, 1-theta_y) is 1/2, attained only at theta_y = 1/2; at 12/25 it is 13/25") # Mesh removal of the max over t (the classical device, shifted-prime-decomposition.md sec. 2): # per modulus e, interpolating between mesh points of spacing h = x/L^K costs at most # (number of n = 0 mod e in an interval of length h) * max|f| <= (h/e + 1) * log x. # Summed over e <= Q: h*log(x)*sum 1/e + Q log x = x L^(2-K) + x^(13/25) L (L = log x). check("C4 mesh cost exponent", F(13, 25) < 1, "the +1 term sums to x^(13/25) log x; exponent 13/25 < 1, so the max over t costs o(x/L^A) given any fixed-t estimate at the same moduli; removing it changes no level") # Pricing of the (2/25)x allowance over modulus blocks above sqrt x (for the record; #1789 item 2). nb = F(1, 50) # number of dyadic modulus blocks = (1/50) log2 x w = th_y # weight log(x/e) >= (12/25) log x on e <= x^(13/25) per_block_coeff = F(2, 25) / (nb * w) # times ln 2, times x / (ln x)^2 check("C5 per-block requirement", per_block_coeff == F(25, 3), "(2/25)x / ((1/50) log2 x * (12/25) ln x) = (25/3) ln2 * x/(ln x)^2 per dyadic modulus block (about 5.78 x/L^2)") # Sequence mismatch: Delta_e is for f(n) = Lambda(n-2) mu(n) in n = 0 mod e, not for mu. check("C6 sequence", True, "moving-cutoff-parity.md (3): f(n)=Lambda(n-2)mu(n); sec. 5: 'ordinary BV concerns a different sequence'. Granville-Shao Thm 1.1(b) is for f=mu: not applicable blockwise at any level") out = { "route": 165, "job": 4153, "consumer": "research/moving-cutoff-parity.md (9),(13),(16), sha256 ef7a18651d5d39ac45bb7f96727c0b2d6e16f39f620f359d63d220c6a7f2cd9d", "level_moduli": str(th_Q), "excess_over_half": str(th_Q - F(1, 2)), "t_dyadic_blocks": 1, "per_block_requirement": "(25/3) ln2 x/(ln x)^2", "checks": checks, "all_pass": all(c["pass"] for c in checks), } print(json.dumps(out, indent=1, sort_keys=True))