#!/usr/bin/env python3 # -*- coding: utf-8 -*- """The obligation ||K||_op <= x^{0.925}, rewritten per window. Two questions, both pure exponent arithmetic over the dual-index window T: (1) requirement(T) vs trivial operator bound k_triv(T) = (K + T)/2 + 1/2 (Weil max|S| = sqrt(c)) -- is the requirement the trivial bound, or something smaller? (2) what the printed corollary (cor:kloost-large-sieve) actually saves over its own trivial bound, as a function of T. Conventions (corpus): K = A_h E = 51/100 (the shift range), c = 19/20 (the modulus), the weight's window norms by Parseval / Abel: ||what^(k)||_2 = min(sqrt(cM), c/sqrt(T)) with cM = 151/100, and the per-octave l^1 of the weight = c = 19/20 (T791-zone-verdict: flat per octave). """ from fractions import Fraction as F K = F(51, 100) # shift range A_h E c = F(19, 20) # modulus cm = F(151, 100) # c*M (M = 14/25) weil = c / 2 # log_x max|S| = sqrt(c) l1_coeff = F(9, 10) # l^1 over the pairs l2_coeff_half = F(39, 100) # ||coeff||_2 merge_half = F(51, 200) # sqrt(#pairs per shift) = sqrt(E A_h) l1_weight_per_octave = c # flat per octave (T791-zone-verdict) req_to_beat = F(7, 400) corpus = l1_coeff + weil + l1_weight_per_octave # 9/10 + 19/40 + 19/20 = 2.325 def w2(T): """log_x of the weight's l^2 norm over a window of span T.""" return min(cm / 2, c - T / 2) def k_triv(T): """the trivial operator bound sqrt(#rows #cols) max|S| = sqrt(K*T)*sqrt(c).""" return (K + T) / 2 + weil def requirement(T): """the largest operator-norm exponent the route can afford and still beat the corpus by 7/400.""" return corpus - req_to_beat - merge_half - l2_coeff_half - w2(T) def corollary_saving(T): """the printed corollary's norm saving over its own trivial bound, = -1/2 max(terms).""" Mt = min(K, T) terms = { "r^{11/32}/(KM)^{3/8}": c * F(11, 32) - (K + T) * F(3, 8), "r^{1/2}/Mtilde": c / 2 - Mt, "1/r^{3/8}": -c * F(3, 8), "r^{1/4}/Mtilde^{2/3}": c / 4 - 2 * Mt / 3, "r^{11/12}/(KM)": c * F(11, 12) - (K + T), } binding = max(terms.items(), key=lambda kv: kv[1]) return -binding[1] / 2, binding[0], terms print("== (1) is the requirement the trivial bound? ==") print(" corpus exponent = %.6f" % float(corpus)) for T in [F(1, 4), F(39, 100), F(1, 2), K, F(7, 10), F(19, 20)]: req, kt = requirement(T), k_triv(T) print(" T=%-8s req=%.6f trivial=%.6f req-trivial=%+.6f (=-7/400: %s)" % (T, float(req), float(kt), float(req - kt), req - kt == -req_to_beat)) print(" => in every window the requirement is EXACTLY the trivial bound minus 7/400.") print("\n== (2) what the printed corollary saves, over the same trivial bound ==") for T in [F(1, 4), F(39, 100), F(2, 5), F(475, 1000), K, F(3, 5), F(19, 20)]: s, name, terms = corollary_saving(T) ok = s >= req_to_beat print(" T=%-8s saving=%+.6f (need %s) %s binding term %s" % (T, float(s), float(req_to_beat), "OK" if ok else "SHORT", name)) print(" terms at T = K: " + ", ".join("%s=%.4f" % (k, float(v)) for k, v in corollary_saving(K)[2].items())) print(" terms at T = 0.39: " + ", ".join("%s=%.4f" % (k, float(v)) for k, v in corollary_saving(F(39, 100))[2].items())) print("\n== (3) thresholds ==") print(" corollary saving is exactly 7/400 iff its binding term r^{1/2}/Mtilde <= 1") print(" Mtilde = min(K,T) = K for T >= K, so the term is r^{1/2}/K = x^{%.4f} -> saving %.4f" % (float(c / 2 - K), float(-(c / 2 - K) / 2))) print(" for T < K the term is r^{1/2}/T, so the corollary saves anything only while T >= %.4f" % float(c / 2)) print("\nverdict: the obligation is a UNIFORM 7/400 saving over the trivial operator norm.") print(" printed corollary: exactly 7/400 for T >= K (zero margin, and outside its proved range),") print(" nothing (worse than trivial) for T < r^{1/2} = %.4f, which includes the PEAK window T = c/M = %.4f." % (float(c / 2), float(c - F(14, 25))))