// Independent check of research/smooth-sieve-literature.md section 3.1's // counterexample to the UNRESTRICTED form of GKM Lemma 10.5. // Single-threaded sieve to e^16 ~ 8.9e6; a few tens of MB, about a second. // Nothing here is parallel or persistent: no machine share was offered. const f = (x, n) => x.toFixed(n); // m = 2, g(t1,t2) = tanh(t2 - t1), y = e^Y, z = e^{2Y}. const gfun = (t1, t2) => Math.tanh(t2 - t1); console.log('=== 1. The cube integral is exactly zero, by antisymmetry ==='); // (1/m!) * int_{[Y,2Y]^2} tanh(t2-t1) dt1 dt2/(t1 t2). // The integrand is ANTIsymmetric under t1<->t2; the measure dt1dt2/(t1t2) and the // domain are both symmetric; hence the integral vanishes identically. function cube(Y, n = 2000) { const a = Y, b = 2 * Y, h = (b - a) / n; let S = 0; for (let i = 0; i < n; i++) for (let j = 0; j < n; j++) { const t1 = a + (i + 0.5) * h, t2 = a + (j + 0.5) * h; S += gfun(t1, t2) / (t1 * t2) * h * h; } return S / 2; // the 1/m! = 1/2! } for (const Y of [3, 5, 8]) console.log(' Y = ' + Y + ' (1/2!) * cube integral = ' + cube(Y).toExponential(3) + ' (zero to rounding)'); console.log(' antisymmetry: g(t1,t2) + g(t2,t1) = ' + (gfun(1.3, 2.9) + gfun(2.9, 1.3)).toExponential(2) + ' identically => integral = 0 EXACTLY'); console.log('\n=== 2. Every ordered summand is positive ==='); console.log(' for p < q, log q - log p > 0 and tanh is strictly increasing with tanh(0)=0,'); console.log(' so g(log p, log q) > 0 for every ordered pair. e.g. g(log 11, log 13) = ' + f(gfun(Math.log(11), Math.log(13)), 6) + ' > 0'); console.log('\n=== 3. The restricted lower bound, against real primes ==='); // p in (e^Y, e^{5Y/4}], q in (e^{7Y/4}, e^{2Y}] => log q - log p >= Y/2, // so g >= tanh(Y/2), and the ordered sum is at least tanh(Y/2) * Sp * Sq with // Sp -> log(5/4), Sq -> log(8/7) by Mertens. const LIM = Math.ceil(Math.exp(16)) + 1; const sieve = new Uint8Array(LIM + 1); for (let i = 2; i * i <= LIM; i++) if (!sieve[i]) for (let j = i * i; j <= LIM; j += i) sieve[j] = 1; const harm = (lo, hi) => { let s = 0; const a = Math.floor(lo), b = Math.min(LIM, Math.floor(hi)); for (let n = Math.max(2, a + 1); n <= b; n++) if (!sieve[n]) s += 1 / n; return s; }; const T54 = Math.log(5 / 4), T87 = Math.log(8 / 7), TGT = T54 * T87; console.log(' target: log(5/4) = ' + f(T54, 6) + ', log(8/7) = ' + f(T87, 6) + ', product = ' + f(TGT, 6)); console.log(' Y Sp=sum 1/p Sq=sum 1/q tanh(Y/2) lower bound vs log(5/4)log(8/7)'); for (const Y of [3, 4, 5, 6, 7, 8]) { const Sp = harm(Math.exp(Y), Math.exp(1.25 * Y)); const Sq = harm(Math.exp(1.75 * Y), Math.exp(2 * Y)); const th = Math.tanh(Y / 2), lb = th * Sp * Sq; console.log(' ' + String(Y).padEnd(5) + f(Sp, 6).padStart(12) + f(Sq, 6).padStart(16) + f(th, 6).padStart(13) + f(lb, 6).padStart(14) + f(lb / TGT, 4).padStart(20)); } console.log(' Sp -> log(5/4) and Sq -> log(8/7) as Mertens says, and tanh(Y/2) -> 1,'); console.log(' so the ordered sum has liminf >= ' + f(TGT, 6) + ' > 0 while the cube term is 0.'); console.log(' => the UNRESTRICTED statement is refuted. CONFIRMED independently.'); console.log('\n=== 4. Does the refutation touch GKM’s own application? ==='); // The note says no: the paper's ensuing integrand g_m^{(2k)}, built from all subset // sums, is symmetric, and for a symmetric integrand the ordered-sum/cube identity is // exactly the m! bookkeeping and is valid. console.log(' For a SYMMETRIC g the cube splits into m! congruent ordered chambers,'); console.log(' so (1/m!)*cube = the ordered sum, and the substitution is exact.'); // demonstrate on a symmetric test function const gsym = (t1, t2) => Math.cos(t1 - t2) + t1 * t2 / 100; function chambers(Y, n = 1200) { const a = Y, b = 2 * Y, h = (b - a) / n; let full = 0, ord = 0; for (let i = 0; i < n; i++) for (let j = 0; j < n; j++) { const t1 = a + (i + 0.5) * h, t2 = a + (j + 0.5) * h; const v = gsym(t1, t2) / (t1 * t2) * h * h; full += v; if (t1 < t2) ord += v; } return { full, ord }; } const c = chambers(5); console.log(' symmetric test g: (1/2!)*cube = ' + f(c.full / 2, 8) + ' ordered chamber = ' + f(c.ord, 8) + ' ratio ' + f(c.ord / (c.full / 2), 6) + ' => identical, as claimed'); console.log(' antisymmetric g (the counterexample): cube = 0 but ordered chamber = ' + f((() => { const Y = 5, n = 1200, a = Y, b = 2 * Y, h = (b - a) / n; let o = 0; for (let i = 0; i < n; i++) for (let j = 0; j < n; j++) { const t1 = a + (i + .5) * h, t2 = a + (j + .5) * h; if (t1 < t2) o += gfun(t1, t2) / (t1 * t2) * h * h; } return o; })(), 6) + ' => the m! bookkeeping fails exactly when g is not symmetric.'); console.log(' So the note’s scoping is right: the defect is in the LEMMA AS STATED,'); console.log(' not in the paper’s use of it, whose integrand is symmetric.');