Structured proof · Unit 151
lemma isPolar_primeError
Fact (Nat.Prime d) ) with d \bmod 8 = 7 (hd) and a natural number M \ne 0 (instance NeZero M) coprime to d (h): the function E(v) = R_{d,M}(e^{v}) of a real v is polar with residues r(s) = (\sum_{\xi} (\operatorname{ord}_s \widetilde{L}(\cdot, \xi) - \operatorname{ord}_s \widetilde{L}(\cdot, \xi\cdot\chi_d)))/\varphi(M)/(s(1 - s)) for s \notin \{0, 1\}, and r(0) = r(1) = 0 (Lean's division by zero gives 0; of these only r(1) = 0 is asked for, residues being asked at \operatorname{Re} \rho > 0), \xi over the Dirichlet characters modulo M, \operatorname{ord}_s the order of vanishing at s (Mathlib's analyticOrderNatAt, a natural number read in \mathbb{C}). Unfolding IsPolar E r: E is measurable, and there are a real C and a meromorphic \Phi : \mathbb{C} \to \mathbb{C} with |E(v)| \le C\cdot e^{v} for v \ge 0, \Phi(s) = \int_{0}^\infty E(v)e^{(1-s)v} dv for \operatorname{Re} s > 2, s \mapsto (s - 1)\Phi(s) analytic near every point of \operatorname{Re} s \ge 1 (\Phi is a function defined at s = 1, so this product vanishes at s = 1, and \Phi has no pole at 1: off s = 1 it agrees with a function holomorphic near 1), and (z - \rho)\Phi(z) \to r(\rho) as z \to \rho, z \ne \rho, for every \rho with \operatorname{Re} \rho > 0.LSeriesHasSum_mul_vonMangoldt; G(1) is real by analytic continuation of the imaginary part from (2, \infty), which makes (s - 1)\Phi analytic at 1; the residues are the orders of the \widetilde{L} at \rho.Put \kappa := \operatorname{Re} G_{d,M}(1).
Uses
logDerivMeanunit 151s \mapsto G_{d,M}(s)/s - \kappa is analytic near every point of \{\operatorname{Re} s \ge 1\}: every \widetilde{L}(\cdot, \xi) and \widetilde{L}(\cdot, \xi\cdot\chi_d) is entire and has no zero on \operatorname{Re} s \ge 1 (
entireL_ne_zero), so their logarithmic derivatives are analytic there, and s \ne 0 there.Lean states
AnalyticOnNhd ℂ (fun s ↦ logDerivMean d M s / s - κ) {s | 1 ≤ s.re}Usesstep 1,
logDerivMeanunit 151,entireLunit 106,entireL_ne_zerounit 107IsPolaris shown by giving its components: E(v) = R_{d,M}(e^{v}) is measurable; C := |\kappa| + 5; \Phi(s) := (G_{d,M}(s)/s - \kappa)/(s - 1); \Phi is meromorphic; the bound |E(v)| \le C\cdot e^{v} is reduced, by |a - b| \le |a| + |b| with b = \kappa, to a bound on |S(0, e^{v}) - S(1, e^{v}) - v/\varphi(M)| + |\kappa| (step 3.3); the Laplace identity is the hole ?q (step 3.4); the analyticity of (s - 1)\Phi(s) is the hole ?B (step 3.5); the residues are step 3.2.Usesstep 1,
IsPolarunit 107,primeErrorunit 151,lambdaSumunit 151,logDerivMeanunit 151G_{d,M}(1) is real, i.e. G_{d,M}(1)/1 - \kappa = 0: the function x \mapsto \operatorname{Im}(G(x)/x - \kappa) of a real x \ge 1 is analytic (step 2) and vanishes for x > 2 near 3, because there (G(x)/x - \kappa)/(x - 1) = \Phi(x) is the integral of a real function (the Laplace identity, hole ?q, proved in step 3.4); by the identity theorem on the connected half-line [1, \infty) it vanishes at x = 1; and \operatorname{Re}(G(1) - \kappa) = 0 by the definition of \kappa.
Usesstep 2, step 1,
AnalyticOnNhd.,eqOn_zero_of_preconnected_of_eventuallyEq_zero Complex.ext The analyticity of (s - 1)\Phi(s) on \operatorname{Re} s \ge 1 is the hole ?B (proved in step 3.5), and the residues: for every \rho with \operatorname{Re} \rho > 0, (z - \rho)\Phi(z) \to r(\rho) as z \to \rho, z \ne \rho. If \rho = 1: (z - 1)\Phi(z) is continuous at 1 (by ?B) with value 0 at 1, and r(1) = 0 (division by 1\cdot(1 - 1) = 0 gives 0). If \rho \ne 1: by
tendsto_sub_mul_logDeriv_entireL, (z - \rho)\cdot\widetilde{L}'/\widetilde{L}(z, \psi) \to \operatorname{ord}_{\rho} \widetilde{L}(\cdot, \psi) for \psi = \xi and \psi = \xi\cdot\chi_d, so (z - \rho)\cdot G(z) \to (\sum_{\xi} (\operatorname{ord}_{\rho} \widetilde{L}(\cdot, \xi\cdot\chi_d) - \operatorname{ord}_{\rho} \widetilde{L}(\cdot, \xi)))/\varphi(M); dividing by z \to \rho \ne 0 and by z - 1 \to \rho - 1 \ne 0, and with (z - \rho)\kappa \to 0, the limit is r(\rho) = (\sum_{\xi} (\operatorname{ord}_{\rho} \widetilde{L}(\cdot, \xi) - \operatorname{ord}_{\rho} \widetilde{L}(\cdot, \xi\cdot\chi_d)))/\varphi(M)/(\rho(1 - \rho)).Usesstep 3.1,
tendsto_sub_mul_logDeriv_entireLunit 107,quadTwistunit 106,logDerivMeanunit 151,Filter.,tendsto_finsetSum ContinuousWithinAt.sub_const The bound: for v \ge 0, |S(0, e^{v}) - S(1, e^{v}) - \log(e^{v})/\varphi(M)| + |\kappa| \le (|\kappa| + 5)\cdot e^{v}, because |S(0, e^{v})|, |S(1, e^{v})| \le 2e^{v} (
abs_lambdaSum_exp_le), v/\varphi(M) \le v \le e^{v} (\varphi(M) \ge 1, v + 1 \le e^{v}), and |\kappa| \le |\kappa|\cdot e^{v}.Usesstep 1,
abs_lambdaSum_exp_leunit 151,Real.,add_one_le_exp abs_subThe Laplace identity (hole ?q): for every s with \operatorname{Re} s > 2, \Phi(s) = \int_{0}^\infty R_{d,M}(e^{v})e^{(1-s)v} dv.
Let s be a complex number with 2 < \operatorname{Re} s (u).
L: for every natural k, \int_{0}^\infty t^{k} e^{-(s-1)t} dt = k!/(s - 1)^{k+1} (
laplace_pow, as \operatorname{Re}(s - 1) > 0).e: for every natural r, (s + r - 1)\cdot\int_{v>0} S_{d,M}(r, e^{v})\cdot e^{v - sv} dv equals (1/\varphi(M))\cdot\sum_{\xi} (([\xi = 1]/(s - 1) - \widetilde{L}'/\widetilde{L}(s, \xi)) - ([\xi\cdot\chi_d = 1]/(s - 1) - \widetilde{L}'/\widetilde{L}(s, \xi\cdot\chi_d))), the Dirichlet series \sum_{n} \lambda_{d,M}(n)n^{-s}; by the following three facts.
Lean states
(s + r - 1) * ∫ v in _, lambdaSum d M r (rexp v) * (v - s * v).exp = _By the integral representation of Dirichlet series (Mathlib's
LSeries_eq_mul_integral', with exponent 1 + r: the partial sums of |\lambda_{d,M}(k)k^{r-1}| are O(n^{1+r}), from |S_{d,M}(r, y)| \le 2y and \lambda \ge 0; and \operatorname{Re}(s + r - 1) > 1 + r as \operatorname{Re} s > 2), this equals \sum_{k\ge1} \lambda_{d,M}(k)k^{r-1}\cdot k^{-(s+r-1)} = \sum_{k} \lambda_{d,M}(k)k^{-s}.Uses
abs_lambdaSum_exp_leunit 151,lambdaClass_nonneg_and_abs_leunit 151,lambdaSumunit 151,LSeries_eq_mul_integral'\sum_{n} \lambda_{d,M}(n)n^{-s} = (1/\varphi(M))\cdot\sum_{\xi} ((\sum_{n} \xi(n)\Lambda(n)n^{-s}) - (\sum_{n} (\xi\cdot\chi_d)(n)\Lambda(n)n^{-s})), because \lambda_{d,M}(n) = (1/\varphi(M))\cdot\sum_{\xi} \xi(n)\Lambda(n)\cdot(1 - (n/d)) (orthogonality of characters, Mathlib's
residueClass_apply; (\xi\cdot\chi_d)(n) = \xi(n)(n/d)); and each series is [\psi = 1]/(s - 1) - \widetilde{L}'/\widetilde{L}(s, \psi) (LSeriesHasSum_mul_vonMangoldt, \operatorname{Re} s > 1).Uses
LSeriesHasSum_mul_vonMangoldtunit 107,quadTwist_applyunit 107,chiK_eq_legendreSymunit 106,lambdaClassunit 151,ArithmeticFunction.,vonMangoldt. residueClass_apply LSeriesHasSum.sum
Record: \int_{0}^\infty e^{-(s-1)t} dt = 1/(s - 1) and \int_{0}^\infty t\cdot e^{-(s-1)t} dt = 1/(s - 1)^{2} (L at k = 0, 1); both integrands are integrable (their integrals are not 0); and for every r, v \mapsto S_{d,M}(r, e^{v})e^{(1-s)v} is integrable on (0, \infty) (
integrableOn_laplace_of_abs_le, from |S(r, e^{v})| \le 2e^{v} and \operatorname{Re} s > 2).Usesstep 3.4.2, step 3.4.1,
integrableOn_laplace_of_abs_leunit 107,abs_lambdaSum_exp_leunit 151Unfold: R_{d,M}(e^{v}) = S(0, e^{v}) - S(1, e^{v}) - v/\varphi(M) - \kappa, and G_{d,M}; every twist \xi\cdot\chi_d is non-principal (
quadTwist_ne_one: d \ne 2 as d \bmod 8 = 7, and M is coprime to d), so its polar term [\xi\cdot\chi_d = 1]/(s - 1) is 0.Uses
primeErrorunit 151,logDerivMeanunit 151,quadTwist_ne_oneunit 107Split \int R_{d,M}(e^{v})e^{(1-s)v} dv into the integrals of its four terms (each integrable, step 3.4.4).
Usesstep 3.4.4, step 3.4.5
Conclude: with e(0) and e(1) of step 3.4.3, \int S(0)\cdot e^{(1-s)v} - \int S(1)\cdot e^{(1-s)v} = L\lambda(s)/(s - 1) - L\lambda(s)/s; with \int v\cdot e^{(1-s)v} = 1/(s - 1)^{2} and \int e^{(1-s)v} = 1/(s - 1), the four integrals combine to (G(s)/s - \kappa)/(s - 1) = \Phi(s). The identity is the linear combination e(1)/s - e(0)/(s - 1), checked by field arithmetic (s \ne 0, s \ne 1).
Usesstep 3.4.3, step 3.4.4, step 3.4.6