#!/usr/bin/env python3 """Independent verification of the route-69 correction's arithmetic (return #974, job #1399). Verifies, with exact rational exponents (no floating point, no enumeration), the two parts of the correction filed against return #634: KEPT -- Theorem 5.5's H(M,N,c) is a sum of five powers, equals its largest summand, and at c = x^(19/20), |R| = x^(51/100), |k| = x^(39/100) that largest summand is the residue term (M^(1/3)+N^(1/3))/c^(1/5) = x^(-1/50) in BOTH labellings; the transferred bound c^(1+o(1)) H = x^(93/100) is larger than Lemma 5.1's honest trivial bound min(c, sqrt(MNc)) = x^(37/40); padding to equal lengths x^(51/100) gives H = x^(-3/160) and a padded bound x^(149/160), worse than x^(37/40) by x^(1/160); 5.7 (polya-Vinogradov-style display) saves x^(7/400) = c^(7/380) in the favourable (shorter-length-inverted) orientation, exactly half of 7/200. WITHDRAWN -- each with a computed counterexample: (i) 5.2 at square-full part c2 = 1 gives x^(369/400) R-first and x^(117/128) k-first (saving 1/400 and 7/640), differing from 5.5's x^(93/100) by 3/400 and 51/3200; the c2 term stops being inert at c2 = x^(277/800) k-first (= x^(19/50) R-first). (ii) 5.4's G at c = d^2 e, d = x^(11/25), e = x^(7/100), f = d gives x^(263/300), saving 29/600, which is 1/75 MORE than the 7/200 requirement. (iii) 5.7 at M = c^(1/5), N = c^(3/5) gives c^(17/20), saving 1/20 against its own local baseline sqrt(MNc) = c^(9/10) -- so 1/32 is not length-independent. All theorem statements are transcribed from Blomer-Pascadi arXiv:2607.24311v1 (cached at outputs/job2029/src/2607.24311/main.tex): Lemma 5.1 = lem:bilinear-forms-trivial-bound (line 1216); Theorem 5.2 = thm:bilinear-forms-4th-moment (line 1247, F = c2(M+N)MN/c^2 + F0); Theorem 5.4 = thm:non-ab-result (line 1537, G = dMN(M^2+N^2)/c^3 + f(M^2+N^2)/c^2 + f/d^2); Theorem 5.5 = thm:bilinear-forms-general (line 1561, H); Theorem 5.7 = polyaV (line 1910). Every assertion is an EXACT rational identity; a failure prints the offending value and exits 1. """ from fractions import Fraction as F CHECKS = 0 def eq(a, b, name): global CHECKS CHECKS += 1 if a != b: raise SystemExit(f"FAIL {name}: {a} != {b}") return a def mx(*xs): return max(xs) def mn(*xs): return min(xs) # ---- record's exponents (all x-units unless stated) ---- ac = F(19, 20) # c = x^(19/20) aR = F(51, 100) # |R| = x^(51/100) ak = F(39, 100) # |k| = x^(39/100) # ---------------------------------------------------------------------- # Theorem 5.5 H(M,N,c) = S1 + S2 + S3 + S4 + S5 (sum of five powers) # ---------------------------------------------------------------------- def H_summands(aM, aN): # S1 = M^(1/8) ((c+MN)(c+N^2))^(1/16) / c^(1/4) min(c/M, c^(1/2))^(1/16) s1 = aM / 8 + (mx(ac, aM + aN) + mx(ac, 2 * aN)) / 16 - ac / 4 + mn(ac - aM, ac / 2) / 16 # S2 = (N^2/c^2 + N^(1/2) M (c+N^2)/c^(5/2))^(1/16) inner2a = 2 * aN - 2 * ac inner2b = aN / 2 + aM + mx(ac, 2 * aN) - F(5, 2) * ac s2 = mx(inner2a, inner2b) / 16 # S3 = (M^(1/3)+N^(1/3))/c^(1/5) [residue term] s3 = mx(aM / 3, aN / 3) - ac / 5 # S4 = (M^(1/2)N^(1/6)+M^(1/6)N^(1/2))/c^(7/18) s4 = mx(aM / 2 + aN / 6, aM / 6 + aN / 2) - F(7, 18) * ac # S5 = (M^(1/15)+N^(1/15))/c^(1/15) s5 = mx(aM / 15, aN / 15) - ac / 15 return s1, s2, s3, s4, s5 # R-first labelling (m=R, n=k) s = H_summands(aR, ak) eq(s[0], F(-11, 400), "H S1 R-first = -11/400") eq(s[1], F(-9, 200), "H S2 R-first = -9/200") eq(s[2], F(-1, 50), "H S3 R-first = -1/50 (residue)") eq(s[3], F(-89, 1800),"H S4 R-first = -89/1800") eq(s[4], F(-11, 375), "H S5 R-first = -11/375") eq(mx(*s), F(-1, 50), "H dominant R-first = -1/50") # uniqueness of the dominant summand n_dom = sum(1 for t in s if t == mx(*s)) eq(n_dom, 1, "H R-first dominant summand is unique") # k-first labelling (m=k, n=R) s = H_summands(ak, aR) eq(s[0], F(-23, 640), "H S1 k-first = -23/640") eq(s[1], F(-71, 1600),"H S2 k-first = -71/1600") eq(s[2], F(-1, 50), "H S3 k-first = -1/50 (residue)") eq(s[3], F(-89, 1800),"H S4 k-first = -89/1800") eq(s[4], F(-11, 375), "H S5 k-first = -11/375") eq(mx(*s), F(-1, 50), "H dominant k-first = -1/50") eq(sum(1 for t in s if t == mx(*s)), 1, "H k-first dominant summand unique") # transferred bound c^(1+o(1)) H vs Lemma 5.1 trivial bound min(c, sqrt(MNc)) H_dom = F(-1, 50) transferred = ac + H_dom eq(transferred, F(93, 100), "transferred c H = 93/100") trivial = mn(ac, (aR + ak + ac) / 2) eq(trivial, F(37, 40), "Lemma 5.1 min(c, sqrt(MNc)) = 37/40") eq(transferred - trivial, F(1, 200), "excess over trivial = 1/200") # ---- padded equal-lengths substitution (M=N=x^(51/100)) ---- sp = H_summands(aR, aR) eq(sp[0], F(-3, 160), "padded H S1 = -3/160") eq(mx(*sp), F(-3, 160), "padded H dominant = -3/160") eq(sum(1 for t in sp if t == mx(*sp)), 1, "padded H dominant unique") padded_bound = ac + mx(*sp) eq(padded_bound, F(149, 160), "padded bound = 149/160") eq(padded_bound - trivial, F(1, 160), "padded worse than honest trivial by 1/160") # #626's margin located as the equal-lengths artefact: # #626's total saving = (trivial (1.1) N sqrt(c)) - (c * H_padded) = 43/800, # which is 7/200 (the requirement) + 3/160 (the padding artefact, = H_padded exponent). Nsqrtc = aR + ac / 2 eq(Nsqrtc, F(197, 200), "display (1.1) N sqrt(c) = 197/200") eq(Nsqrtc - padded_bound, F(43, 800), "#626 total saving 43/800 = trivial(1.1) - padded bound") eq(F(43, 800), F(7, 200) + F(3, 160), "43/800 = 7/200 (requirement) + 3/160 (equal-lengths artefact)") # ---------------------------------------------------------------------- # Theorem 5.2 at c2 = 1: F = F0 = A + B (no c2 term, no cube-root residue) # ---------------------------------------------------------------------- def F0_summands(aM, aN): # A = M^(1/2) ((c+MN)(c+N^2))^(1/4) / c min(c/M, c^(1/2))^(1/4) A = aM / 2 + (mx(ac, aM + aN) + mx(ac, 2 * aN)) / 4 - ac + mn(ac - aM, ac / 2) / 4 # B = (N^2/c^2 + N^(1/2) M (c+N^2)/c^(5/2))^(1/4) innerb = mx(2 * aN - 2 * ac, aN / 2 + aM + mx(ac, 2 * aN) - F(5, 2) * ac) B = innerb / 4 return A, B def t52_bound(aM, aN): A, B = F0_summands(aM, aN) return ac + mx(A, B) / 4 # c^(1+o(1)) (A+B)^(1/4) b52_R = t52_bound(aR, ak) b52_k = t52_bound(ak, aR) eq(b52_R, F(369, 400), "5.2 @c2=1 R-first = 369/400") eq(b52_k, F(117, 128), "5.2 @c2=1 k-first = 117/128") eq(F(37, 40) - b52_R, F(1, 400), "5.2 R-first saving = 1/400") eq(F(37, 40) - b52_k, F(7, 640), "5.2 k-first saving = 7/640") eq(F(93, 100) - b52_R, F(3, 400), "5.2 R-first differs from 5.5 by 3/400") eq(F(93, 100) - b52_k, F(51, 3200),"5.2 k-first differs from 5.5 by 51/3200") # c2 threshold: c2 term exponent e2 + max(m,n) + m + n - 2c ties F0's exponent A_R, B_R = F0_summands(aR, ak) A_k, B_k = F0_summands(ak, aR) thr_R = mx(A_R, B_R) - (mx(aR, ak) + aR + ak - 2 * ac) thr_k = mx(A_k, B_k) - (mx(ak, aR) + ak + aR - 2 * ac) eq(thr_R, F(19, 50), "5.2 c2 threshold R-first = 19/50") eq(thr_k, F(277, 800), "5.2 c2 threshold k-first = 277/800") # ---------------------------------------------------------------------- # Theorem 5.4's G at c = d^2 e, d = x^(11/25), e = x^(7/100), f = d # ---------------------------------------------------------------------- ad = F(11, 25) ae = F(7, 100) af = ad # f = d (maximal f with f^2 | c d) eq(2 * ad + ae, ac, "c = d^2 e = x^(19/20)") def t54_bound(aM, aN, ad, ae, af): c2 = 2 * ad + ae g1 = ad + aM + aN + mx(2 * aM, 2 * aN) - 3 * c2 g2 = af + mx(2 * aM, 2 * aN) - 2 * c2 g3 = af - 2 * ad return c2 + mx(g1, g2, g3) / 6 b54 = t54_bound(aR, ak, ad, ae, af) eq(b54, F(263, 300), "5.4 @c=d^2e = 263/300") eq(F(37, 40) - b54, F(29, 600), "5.4 saving = 29/600") eq(F(29, 600) - F(7, 200), F(1, 75), "5.4 saving exceeds 7/200 by 1/75") # ---------------------------------------------------------------------- # Theorem 5.7 (polyaV): (MN)^(1/2)/c^(3/4) + N^(1/2)/c^(1/2) + M^(1/2)/c^(1/4) # ---------------------------------------------------------------------- def t57_bound(aM, aN, base): # returns exponent in `base` units (base=ac for x-units, base=1 for c-units) t1 = (aM + aN) / 2 - F(3, 4) * base t2 = aN / 2 - base / 2 t3 = aM / 2 - base / 4 return base + mx(t1, t2, t3) # record's lengths, both orientations (x-units, base = ac) b57_R = t57_bound(aR, ak, ac) b57_k = t57_bound(ak, aR, ac) eq(b57_k, F(363, 400), "5.7 k-first = 363/400") eq(F(37, 40) - b57_k, F(7, 400), "5.7 k-first saving = 7/400") eq(F(7, 400), F(7, 200) / 2, "5.7 saving = half of 7/200 requirement") eq(F(7, 400) / ac, F(7, 380), "5.7 saving = c^(7/380)") # R-first does NOT save (control: the saving is orientation-dependent) eq(F(37, 40) - b57_R, F(-17, 400), "5.7 R-first gives NO saving (17/400 worse)") # 5.7 at M=c^(1/5), N=c^(3/5) (c-units, base=1) b57_crit = t57_bound(F(1, 5), F(3, 5), F(1)) eq(b57_crit, F(17, 20), "5.7 @(c^(1/5), c^(3/5)) = c^(17/20)") local_base = (F(1, 5) + F(3, 5) + 1) / 2 # sqrt(MNc) = c^(9/10) eq(local_base, F(9, 10), "5.7 local baseline sqrt(MNc) = c^(9/10)") eq(local_base - b57_crit, F(1, 20), "5.7 saving vs local baseline = 1/20 (> 1/32)") print(f"OK: {CHECKS} exact-rational checks passed, exit 0")