"""Hypothetical variants, part 2: further 'exponent pairs' as seeds of the closure under A and B (words), used for U < 3, and along the line in the count of pairs. Double precision; investigation only.""" import sys, os sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))); sys.argv = ['x'] import numpy as np from math import log import verify_explicit_waring_stage8 as V # the earlier version of the program (see README.yaml) from table20_hypo1 import band_Lambda, BASE, DMAX, C0 TS = [(float(a), float(b), float(A), float(B), w) for a, b, A, B, w in V.A_TS_PIECES] TS.sort() print('pieces of theta^star for t > 1/20:', len(TS), TS[0][:2], TS[-1][:2], [p[4] for p in TS[:4]]) def A(p): k, l = p; return (k/(2*k+2), (k+l+1)/(2*k+2)) def B(p): k, l = p; return (l-0.5, k+0.5) def closure(seeds, depth=12): S = {(round(k, 13), round(l, 13)) for k, l in seeds}; front = set(S) for _ in range(depth): new = set() for p in front: for q in (A(p), B(p)): q = (round(q[0], 13), round(q[1], 13)) if 0 <= q[0] <= 0.5 <= q[1] <= 1 and q not in S: new.add(q) S |= new; front = new return sorted(S) def theta_high(t, pairs): """theta on (1/12, 1/2] : the present function, improved by the lines of the pairs""" th = np.zeros_like(t) for a, b, Aw, Bw, w in TS: m = (t > a) & (t <= b); th[m] = Aw - Bw*t[m] m = t > 0.45; th[m] = np.maximum(th[m], 2 - 2*t[m]) for k, l in pairs: if k > 1e-9: th = np.maximum(th, 1 + (1 - l - t)/k) # 1 - l - k(U-1) >= t return th def constant(pairs, line_pairs=None, n=400000): line_pairs = BASE if line_pairs is None else line_pairs # t* with theta(t*) = 2 - t* lo, hi = 0.15, 0.30 for _ in range(60): mid = 0.5*(lo + hi) if theta_high(np.array([mid]), pairs)[0] > 2 - mid: lo = mid else: hi = mid ts = lo x = np.linspace(log(1/12), log(ts), 2*n+1); t = np.exp(x); f = 1.0/theta_high(t, pairs); h = (x[-1]-x[0])/(2*n) Ihigh = h/3*(f[0] + f[-1] + 4*f[1:-1:2].sum() + 2*f[2:-1:2].sum()) Ilow = 0.0 for D in range(3, DMAX+1): Ilow += band_Lambda(D, line_pairs, n=(1500 if D < 200 else 200)) # tail D > DMAX: as for the present function (sum of Lambda_D^sharp) tail = float(np.sum(V._A_LSH[DMAX-3:])) + 2.0/V.A_NT return 2 + log((2 - ts)/ts) + 2*(Ihigh + Ilow + tail), ts if __name__ == '__main__': words = [(float(d['kap']), float(d['lam'])) for d in V.A_WORDS] c, ts = constant([]); print('present function (check): %.7f, t* = %.6f (41/191 = %.6f), C0* = %.7f' % (c, ts, 41/191, C0)) own = BASE + words + [(1/36, 31/36), (0.0, 11/12)] c, ts = constant([], line_pairs=own); print('all estimates of the appendix along the line: %.6f' % c) for name, seeds in [('Robert-Sargos (1/13, 10/13)', [(1/13, 10/13)]), ('Huxley (32/205, 269/410)', [(32/205, 269/410)]), ('Bourgain (13/84, 55/84)', [(13/84, 55/84)]), ('all three', [(1/13, 10/13), (32/205, 269/410), (13/84, 55/84)])]: cl = closure([(0.0, 1.0), (0.5, 0.5)] + seeds, depth=12) c1, t1 = constant(cl, line_pairs=BASE) c2, t2 = constant(cl, line_pairs=BASE + cl) print('%-30s closure %5d pairs: words only %.6f (t* = %.5f); also along the line %.6f' % (name, len(cl), c1, t1, c2)) cl = closure([(0.0, 1.0), (0.5, 0.5)], depth=14) c1, t1 = constant(cl); print('closure of the trivial pairs to depth 14 (all words): %.6f, t* = %.6f' % (c1, t1))