research/lab/py/gaussian-franel
0 directories and 2 files in research/lab/py/gaussian-franel.
gaussian-franel
- Franel's identity one field up: an exact formula for the Fourier
L^2discrepancy of the Gaussian Farey set on the torusC/Z[i], written as a gcd-weighted double sum over Gaussian Mertens sums. - The node set is the one spun-stack lights:
w = u/din lowest terms inZ[i], denominators one per associate class withN(d) <= N, numerators the reduced residues modd, read moduloZ[i]in the unit square. - Three results: the Gaussian Ramanujan sum in Mobius form (Theorem 1), the identity itself (Theorem 2), and the two-sided equivalence with the Riemann hypothesis for
zeta_{Q(i)}(s) = zeta(s) L(s, chi_-4)(Theorem 3). - Everything exact where the claim is exact: Gaussian Euclidean gcd, complete residue systems on the gcd box, sums of roots of unity reduced modulo the cyclotomic polynomial, and the identity itself an exact rational.
THE OBJECT
- Pairing:
<lambda, w> = Re(lambda w), which isp x - q yforlambda = p + qiandw = x + iy. It isZ[i]-periodic inw, soe_lambda(w) = e(<lambda, w>)is a character ofC/Z[i], andlambda -> e_lambdais an isomorphism ofZ[i]onto the dual group. - The choice matters once. Under this pairing the character
e_lambdais trivial on(1/d) Z[i] / Z[i]exactly whend | lambda; under the Euclidean pairingRe(conj(lambda) w)the same condition readsconj(d) | lambda. The two differ by relabelling the dual by conjugation, which fixesN(lambda), so no printed number below depends on the choice. - The node set:
G_N = {u/d mod Z[i] : [d] an associate class with N(d) <= N, u mod d, gcd(u, d) = 1}, of sizem = sum_{[d], N(d) <= N} Phi(d), the Gaussian totient sum. This is the lit set of the exact spun stack. - Against the complex Farey set of arXiv:2407.04380,
G_T = {pr(p/q) : p, q in Z[i], 0 < |q| <= T}: the two sets are equal, withN = T^2, the factor being 1. Lettingqrun over all four associates andpover all ofZ[i]produces each torus point exactly once anyway, since a reduced denominator class[d]contributes thePhi(d)pointsu/dhowever its associates are listed. Verified by buildingG_Tliterally,qover every element of norm at mostT^2andpover the box[0, N(q))^2, which covers a complete residue system becauseN(q)andi N(q)both lie in the ideal: the two sets agree atT = 2, 3, 4, 5, 6with4, 24, 64, 176, 320points (check_sayous).
THE FUNCTIONAL
- There is no rank. Franel's
sum_j delta_j^2needs the linear order ofF_Qon[0,1]andC/Z[i]has none, so the twin is a choice and is named as one. - The choice:
D_2(N)^2 = (1/m^2) sum_{lambda != 0} |S_N(lambda)|^2 / N(lambda)^2withS_N(lambda) = sum_{w in G_N} e(<lambda, w>), whereN(lambda) = |lambda|^2. - Why this one. Writing
nu_Nfor the deviation of the empirical measure from Haar, the sum is|| nu_N * K ||_2^2for the kernel withhat K(lambda) = N(lambda)^-1, soD_2(N) = 4 pi^2 || U_N ||_2withU_Nthe periodic Newtonian potential ofnu_N,-Laplacian U_N = nu_N. It is translation-invariant, invariant under the unit group ofZ[i], needs no fundamental domain and no anchored box, and it metrises weak-* convergence to Haar, so it is a Weyl criterion inL^2. The anchoredL^2star-discrepancy fails all four. - The classical twin of the same functional is Edwards'
I. WithS(k) = sum_{rho in F_Q} e(k rho)andB1barthe sawtooth,int_0^1 (sum_rho B1bar(u + rho))^2 du = (1/(4 pi^2)) sum_{k != 0} |S(k)|^2 / k^2, so the classicalm^2 D_2^2is4 pi^2 I, and Edwards section 12.2 evaluatesIassum_{a,b} M(Q/a) M(Q/b) gcd(a,b)^2 / (12 a b). Theorem 2 is that evaluation one field up.
THEOREM 1, THE EXPONENTIAL SUM
- Partition
G_Nby reduced denominator class:S_N(lambda) = sum_{[d], N(d) <= N} c_d(lambda)with the Gaussian Ramanujan sumc_d(lambda) = sum_{u mod d, gcd(u,d) = 1} e(<lambda, u/d>). Well defined:u -> u + dtmovesu/dbyt in Z[i]and<lambda, t>is an integer; replacingdby an associate permutes the reduced residues, soc_ddepends only on the ideal. - Kluyver in
Z[i].c_d(lambda) = sum_{e | gcd(d, lambda)} mu_G(d/e) N(e), the sum over ideal divisors,mu_Gthe Mobius function on ideals ofZ[i], with the conventiongcd(d, 0) = dso thatc_d(0) = Phi(d). Proved. - Proof. Every residue
u mod dhasgcd(u, d) = d/efor a unique ideale | d, and thenu/d = u'/ewithu'reduced mode, sosum_{e | d} c_e(lambda) = sum_{u mod d} e(<lambda, u/d>). The right side is the sum of a character over the finite abelian groupZ[i]/(d); that character is trivial ifflambda/d in Z[i], tested onu = 1andu = i, so the sum isN(d)whend | lambdaand0otherwise. Mobius inversion over the divisor lattice of the ideal(d), which is a lattice of ideals becauseZ[i]is a principal ideal domain, gives the stated formula. - The Mertens form. Writing
d = e fandM_G(x) = sum_{[f], N(f) <= x} mu_G(f)for the Gaussian Mertens function over associate classes,S_N(lambda) = sum_{[e] | lambda, N(e) <= N} N(e) M_G(N / N(e)). Proved, by exchanging the two sums. Atlambda = 0this is the zero modem = sum_{[e], N(e) <= N} N(e) M_G(N/N(e)), and at any unitlambdait isS_N(lambda) = M_G(N). - Verified exactly at
N = 50. All 2720 Gaussian Ramanujan sums, one for each of the 40 associate classes and each of the 68 nonzerolambdawithN(lambda) <= 20, are computed by literal summation over the reduced residues as integer vectors of roots of unity reduced moduloPhi_{N(d)}, and every one is a rational integer equal to the Mobius formula: 0 mismatches. The 68 class sums equal the Mertens form: 0 mismatches. The 68 literal sums over all 672 nodes agree with both in floating point, worst error1.281e-13(check_theorem_1). - Verified, the zero mode:
120,672,10608at norm bounds20,50,200, read both assum Phi(d)and assum N(e) M_G(N/N(e))(main). The middle two are the node counts spun-stack prints.
THEOREM 2, FRANEL ONE FIELD UP
- The identity. With
F(N) = sum_{[a],[b] : N(a), N(b) <= N} (N(gcd(a,b))^2 / (N(a) N(b))) M_G(N/N(a)) M_G(N/N(b)),
m^2 D_2(N)^2 = 4 zeta_K(2) F(N), zeta_K(2) = zeta(2) L(2, chi_-4) = zeta(2) * Catalan = 1.506703
- Proved. Substitute the Mertens form of Theorem 1, expand the square, and exchange: for fixed ideals
a, bthe inner sum issum_{lambda != 0, lcm(a,b) | lambda} N(lambda)^-2 = 4 zeta_K(2) / N(lcm(a,b))^2, the 4 because every nonzero ideal has four generators. ThenN(a) N(b) / N(lcm(a,b))^2 = N(gcd(a,b))^2 / (N(a) N(b)). The double sum is finite becauseM_G(N/N(a))vanishes forN(a) > N, so the right side is exact, andF(N)is an exact rational. - The kernel is the gcd matrix
N(gcd(a,b))^2 / (N(a) N(b)), the Gaussian twin of thegcd(m,n)^2/(mn)that is the layer Gram matrix of the parity carpet stack on the stack page. The same Smith kernel carries the moire correlation law and the Franel identity. - Verified at
N = 20andN = 50against the Fourier side truncated atN(lambda) <= 200000, the tail bounded bym^2 (4 zeta_K(2) - sum_{0 < N(lambda) <= 200000} N(lambda)^-2)since|S_N(lambda)| <= m. AtN = 20,m = 120,F(N) = 114917096/3663075 = 31.371756, identity189.071678against truncated Fourier side189.069795, gap0.001883inside the tail bound0.226192. AtN = 50,m = 672,F(N) = 17870882021826065419/177236423132266875 = 100.830753, identity607.687997against607.677451, gap0.010546inside the tail bound7.093392(check_theorem_2). - The classical control is the same code path on the rational data. At
Q = 40the direct Farey enumeration givesm = 490andsum delta_v^2 = 0.0104270117, andC(Q) - 1 = 12 m sum delta_v^2holds as an identity of exact rationals, which is Edwards section 12.2 regenerated here; the sieve route readsC(40) = 62.310828579against the exact62.310828579(classical_exact,farey_delta_square,franel_form). Verified.
THEOREM 3, THE EQUIVALENCE
- Statement.
F(N) = O(N^{1+eps})for everyeps > 0, equivalentlym^2 D_2(N)^2 = O(N^{1+eps}), equivalentlyD_2(N) = O(N^{-3/2+eps}), is equivalent to the Riemann hypothesis forzeta_{Q(i)}(s) = zeta(s) L(s, chi_-4). That hypothesis is RH and GRH forchi_-4together and is strictly stronger than RH; the product is named every time it appears and is never shortened. - The load-bearing input is
M_G(x) = O(x^{1/2+eps})for everyeps > 0if and only ifzeta_Khas no zero withRe s > 1/2. It is not called standard here; both directions are stated with their hypotheses. - The input, backward. The bound gives the hypothesis. Proved, elementarily. Write
m(n) = sum_{N(a) = n} mu_G(a), soM_G(x) = sum_{n <= x} m(n)andsum_n m(n) n^{-s} = 1/zeta_K(s)onRe s > 1. Partial summation givessum_{n <= x} m(n) n^{-s} = M_G(x) x^{-s} + s int_1^x M_G(t) t^{-s-1} dt, and under the bound both pieces converge asx -> infinitywheneverRe s > 1/2. A Dirichlet series is analytic in its half plane of convergence, so1/zeta_Kcontinues analytically toRe s > 1/2, and a zero ofzeta_Kthere would be a pole of it. Nothing aboutzeta_Kbeyond its Euler product is used. - The input, forward. The hypothesis gives the bound. Proved, by Littlewood's argument transcribed to
zeta_K, with the two analytic inputs cited rather than assumed. Perron at half-integerxwritesM_G(x) = (1/(2 pi i)) int_{Re s = 1 + 1/log x} x^s / (s zeta_K(s)) dsup to the standard truncation error, and the contour is pushed left toRe s = 1/2 + epsand closed on horizontal segments at heights wherezeta_Kis not small. Both inputs are proved for a Dedekind zeta in arXiv:2109.06665, On a Mertens-type conjecture for number fields, Math. Proc. Cambridge Philos. Soc., read at source. Its Lemma 5.4 gives, under the hypothesis and for|t| >= 1,|log zeta_K(s)| <= n_K (log(1/(1 - sigma)) + O((log tau)^{2 - 2 sigma} / ((1 - sigma) log log tau)))on1/2 + 1/log log tau <= sigma <= 1 - 1/log log tauwithtau = |t| + 4, which exponentiates to1/zeta_K(sigma + it) << tau^deltafor everydelta > 0, uniformly onsigma >= 1/2 + eps. Its Lemma 2.4 gives, under the same hypothesis, heightsT_n in [n, n+1)with|zeta_K(sigma + i T_n)| >= exp(-C log n / log log n)for-1 <= sigma <= 2, which are the horizontal segments the contour closes on. TakingT = x^2makes each of the three piecesO(x^{1/2 + eps + delta}), so the bound holds at half-integers and hence everywhere,M_Gmoving between consecutive half-integers by the number of ideals of one norm, which isO(x^eps). - The biconditional is assembled here, not quoted. That paper states neither half as an equivalence; what it supplies is its
(1.1),1/zeta_K(s) = s int_1^infinity M_K(x) x^{-s-1} dx, which is the backward direction's Mellin identity one field up, its Lemma 5.4 and its Lemma 2.4, and the two paragraphs above are the assembly. The argument's shape is Edwards section 12.1, read at source, which supplies the completion Littlewood omitted; that section cites Titchmarsh Theorem 14.25(c) territory for the rational biconditional and isK = Qonly. - Theorem 3, forward. The hypothesis gives the decay. Proved, through the forward input above. Under
|M_G(x)| <= C_eps x^{1/2+eps}, each term of Theorem 1 is at mostC_eps N^{1/2+eps} N(e)^{1/2}, and onlyewithN(e) <= min(N, N(lambda))contribute, so|S_N(lambda)| <= C_eps N^{1/2+eps} d(lambda) min(N, N(lambda))^{1/2}withdthe number of ideal divisors. Splitting thelambdasum atN(lambda) = Ngivessum_{N(lambda) <= N} d(lambda)^2 / N(lambda) = O(log^4 N)andN sum_{N(lambda) > N} d(lambda)^2 / N(lambda)^2 = O(log^3 N), som^2 D_2(N)^2 = O(N^{1+3eps}). - Theorem 3, backward. The decay gives the hypothesis. Proved outright, the backward input being elementary. In one line: the four units
lambdahaveN(lambda) = 1andS_N(lambda) = M_G(N), so dropping every other term of the Fourier sum givesM_G(N)^2 <= zeta_K(2) F(N). HenceF(N) = O(N^{1+eps})forcesM_G(N) = O(N^{1/2+eps}), and the backward input turns that into the absence of zeros right of the critical line. - The two halves are not equally cheap. Backward needs nothing but the Euler product and partial summation; forward needs Perron and two conditional estimates for
zeta_K, both read at source in the paper cited above. The backward direction is easier than Franel's because the functional is a Fourier sum by construction whilesum_j delta_j^2is a rank statistic. What is not free is the identity: the content is Theorem 2, which turns a two-dimensional discrepancy into a finite gcd-weighted quadratic form in Gaussian Mertens sums, and the thresholdN^{1+eps}, which is derived rather than inherited. - The inequality of the backward direction is Verified at every rung of the meter,
M_G(N)^2 / (zeta_K(2) F(N))never rising above0.017(main). - What the equivalence is not. The Gaussian Farey set on
C/Z[i]is not the rational Farey sequence carrying a character weight. Huxley's theorem forlambda(q) = chi(q)reaches the zeros of one DirichletL-function through weighted rational Farey points; this object is unweighted, two-dimensional, and invariant under the unit group, and it reacheszetaandL(s, chi_-4)together becausezeta_Kfactors. Whether a number-field Farey sequence in the announced second part of that paper already carries a discrepancy statement is not settled here, that part being unread.
WHAT IT PRINTS
check_sayousatT = 2, 3, 4, 5, 6: the literal complex Farey setG_Tand the node set atN = T^2are equal, with4, 24, 64, 176, 320points.check_residuesto norm bound 200: 158 associate classes,0residue systems of the wrong size,0collisions modd,0disagreements with the Gaussian totient. The residues ofdare the box[0, g) x [0, N(d)/g)withg = gcd(Re d, Im d), a fundamental domain of the ideal because its area is the index and its two sides are the Hermite normal form of the lattice.check_theorem_1atN = 50andN(lambda) <= 20: 672 nodes, 68 characters, 2720 exact Gaussian Ramanujan sums,0Mobius-formula mismatches,0Mertens-form mismatches,0literal node-sum mismatches at1e-9, worst literal error1.281e-13.main, the zero mode:sum Phi(d)andsum N(e) M_G(N/N(e))both read120,672,10608at norm bounds20,50,200.readout:sum_{N(a) <= x} M_G(x/N(a)) = 1at everyxfrom 1 to 2000, the Gaussian twin of the collapsing global readout of the Mertens meter.check_theorem_2atN = 20, 50: the exact rationalF(N), the identity, the Fourier side truncated atN(lambda) <= 200000, the gap and the printed tail bound, with the gap inside the bound at both.farey_delta_squareandclassical_exactatQ = 40:m = 490,sum delta_v^2 = 0.0104270117, andC(Q) - 1 = 12 m sum delta_v^2as exact rationals.franel_formon the rational data atQ = 125to8000:S2 * Q = (C(Q) - 1) Q / (12 Phi(Q))reads0.5395, 0.5848, 0.6241, 0.6387, 0.6560, 0.6538, 0.6564, regenerating the Farey discrepancy table of the Farey page with no Farey enumeration anywhere.franel_formon the Gaussian data atN = 100to64000: the meter table,m,F(N),F(N)/N,D_2(N)^2 N^3, the local log-log slope ofF,M_G(N), the ratioM_G(N)^2 / (zeta_K(2) F(N)), and the classicalC(N)/Nbeside it.
N | m | F(N) | F(N)/N | D_2(N)^2 N^3 | slope | M_G(N) | classical C(N)/N |
|---|---|---|---|---|---|---|---|
| 100 | 2600 | 212.1213 | 2.121213 | 189.1147 | - | -2 | 1.877964 |
| 250 | 16424 | 619.1589 | 2.476636 | 216.1484 | 1.1691 | 0 | 2.140099 |
| 500 | 65784 | 1278.4558 | 2.556912 | 222.5578 | 1.0460 | -3 | 2.282045 |
| 1000 | 260944 | 2725.4800 | 2.725480 | 241.2326 | 1.0921 | -1 | 2.332467 |
| 2000 | 1045088 | 5556.4599 | 2.778230 | 245.2845 | 1.0277 | -8 | 2.394800 |
| 4000 | 4176032 | 11394.1497 | 2.848537 | 252.0124 | 1.0361 | -1 | 2.385130 |
| 8000 | 16680488 | 23773.2448 | 2.971656 | 263.6505 | 1.0610 | -21 | 2.394592 |
| 16000 | 66694240 | 47603.5196 | 2.975220 | 264.1861 | 1.0017 | 18 | 2.442443 |
| 32000 | 266670328 | 96361.4734 | 3.011296 | 267.6034 | 1.0174 | 38 | 2.499486 |
| 64000 | 1067245288 | 193284.7209 | 3.020074 | 268.0999 | 1.0042 | -70 | 2.478573 |
- Reading the table: the local slope of
Fwalks to1.0042andF(N)/Nclimbs slowly from2.12to3.02, which is the shape a bounded power of a logarithm has and is what the equivalence predicts; the classical column climbs the same way. No exponent is claimed beyond this window, which is 10 nested points and cannot separateN^{1+eps}fromN^{1.02}. Verified, as a window.
RUN
uv run python research/lab/py/gaussian-franel/gaussian_franel.py- From the repository root. One core, under one second.
- Domain: the identification with the complex Farey set at
T = 2to6, residue systems to norm bound 200, exact checks at norm bound 50 withN(lambda) <= 20, the identity at norm bounds 20 and 50 against the Fourier side toN(lambda) <= 200000, the classical control atQ = 40and the classical meter toQ = 8000, the Gaussian meter toN = 64000. - Nothing is written to disk.
WITNESSES
- Theorem 1:
ramanujan_exactagainstramanujan_formulaandsum_formula, withliteral_sumover the node set as the third route. - Theorem 2:
franel_exactagainstlambda_side, with the printed tail bound;farey_delta_squareagainstclassical_exactas the published control. - Theorem 3: the meter columns of
main, andM_G(N)^2 / (zeta_K(2) F(N)) <= 1at every rung. - The node set and its count:
node_setandtotient_class, agreeing with the Gaussian totient sums of spun-stack;check_residuesfor the residue systems andcheck_sayousfor the identification with the complex Farey set of the literature.
- gaussian_franel.py13.5 kB
- README.md17.8 kB