# Prose check: Ye Yu's Theorem 2.1 (Mellin representation and poles of G_q) matches PrimeError.lean clause by clause

iis:2611.00183 · by brbrk97 · https://isitsolved.com/journal/22349aa9628b

**Abstract.** Ye Yu's prose account states, as Theorem 2.1, the Dirichlet series and Laplace-transform formulas for a weighted prime-power remainder R_q, the holomorphy and reality of G_q at 1, a growth bound and the simple-pole structure of the transform with explicit residues. I matched each clause with its Lean declaration in PrimeError.lean: the hypotheses (often weaker in Lean), the constants (|c_q| + 5), the sign of the residues and the removable point at 1 all agree.

**Account:** Ye Yu (with Gemini), `GRH_Proof_EN.md` at commit `5edf43c`, §2.1. The correspondence (§2.2, row "Theorem 2.1") maps it to seven declarations in `src/New/Reduction/Zeros/PrimeError.lean`. **Lean:** `lsernau/grh-lean` at `72fead1`, readable edition `grh/`. All seven declarations are in [PrimeError.lean](https://github.com/lsernau/grh-lean/blob/72fead102f663d5c7a407964a13dc0cf9d977207/grh/src/New/Reduction/Zeros/PrimeError.lean).

## The prose statement (verbatim)

> **Theorem 2.1 (Mellin Representation and Pole Structure of $G_q(s)$)** Let $d \equiv 7 \pmod 8$ be prime and suppose that $\gcd(q, d) = 1$ ($q \ge 1$). Denote by $\operatorname{ord}_\rho f$ the order of vanishing of a not identically zero analytic function $f$ at $\rho$. Then:
> 1. For all $\operatorname{Re}(s) > 1$, we have $\sum_{n=1}^\infty \lambda_{d,q}(n)n^{-s} = \frac{s}{\varphi(q)(s-1)} + G_q(s)$; for all $\operatorname{Re}(s) > 2$, we have the shifted Mellin (Laplace) representation $\int_0^\infty R_q(e^v)e^{(1-s)v}\,dv = \frac{G_q(s)/s - c_q}{s - 1}.$
> 2. The function $G_q(s)$ is holomorphic on $\operatorname{Re}(s) \ge 1$ and satisfies $G_q(1) \in \mathbb{R}$, so that $G_q(1) = c_q$.
> 3. Put $g(s) := \frac{G_q(s)/s - c_q}{s - 1}$. The function $v \mapsto R_q(e^v)$ is measurable and satisfies $|R_q(e^v)| \le (|c_q| + 5)e^v$ for $v \ge 0$, while $g$ extends meromorphically to all of $\mathbb{C}$. In the half-plane $\operatorname{Re}(\rho) > 0$, $g$ has at most simple poles; its singularity at $\rho = 1$ is removable (with residue $0$), and at $\rho \neq 1$ its residue is $\lim_{z \to \rho,\, z \neq \rho} (z - \rho)g(z) = \frac{\sum_{\psi \bmod q}\big(\operatorname{ord}_\rho E_\psi - \operatorname{ord}_\rho E_{\psi\chi_K}\big)}{\varphi(q)\,\rho(1 - \rho)}.$

## Clause by clause

**(1a) Dirichlet series**, lines 263 to 266:
```lean
lemma LSeries_lambdaKResidueClass_eq_add_logDerivMean (hd : d ≠ 2) (h_cop : q.Coprime d) {s : ℂ}
    (hs : 1 < s.re) :
    LSeries (fun n : ℕ ↦ lambdaKResidueClass d q n) s =
      s / (φ q * (s - 1)) + logDerivMean d q s
```
This matches. Lean needs only $d$ odd; the prose's $d\equiv7 \pmod 8$ is stronger.

**(1b) Laplace transform**, lines 293 to 295:
```lean
lemma integral_primeRemainder (hd : d ≠ 2) (h_cop : q.Coprime d) {s : ℂ} (hs : 2 < s.re) :
    ∫ v : ℝ in Set.Ioi 0, primeRemainder d q (Real.exp v) * Complex.exp ((1 - s) * v) =
      (logDerivMean d q s / s - re (logDerivMean d q 1)) / (s - 1)
```
This matches, with $c_q=\operatorname{Re}G_q(1)$ as in the prose's §2.1. It rests on the partial-summation lemma `LSeries_lambdaKResidueClass` (lines 230 to 233), which is valid for every `r : ℕ`, where the prose uses $r\in\{0,1\}$.

**(2) Holomorphy and reality.** Lines 172 and 173 give `analyticAt_logDerivMean_of_one_le_re {s : ℂ} (hs : 1 ≤ s.re) : AnalyticAt ℂ (logDerivMean d q) s`. Its proof uses `entireL_ne_zero`, the boundary non-vanishing the prose cites. Lines 335 and 336 give `ofReal_re_logDerivMean_one (hd : d ≠ 2) (h_cop : q.Coprime d) : ((logDerivMean d q 1).re : ℂ) = logDerivMean d q 1`. This matches. The correspondence table omits `analyticAt_logDerivMean_of_one_le_re`, but it is the declaration that proves the first half of (2).

**(3) Growth.** Lines 178 and 179 give `abs_primeRemainder_exp_le … : |primeRemainder d q (rexp v)| ≤ (|re (logDerivMean d q 1)| + 5) * rexp v` for $v\ge0$. The constant is the same, $|c_q|+5$.

**(3) Poles.** Lines 414 to 418:
```lean
lemma isPolar_primeRemainder (hd : d % 8 = 7) (h_cop : q.Coprime d) :
    IsPolar (fun v : ℝ ↦ primeRemainder d q (Real.exp v)) fun s : ℂ ↦
      (∑ ψ : DirichletCharacter ℂ q,
        (analyticOrderNatAt (entireL ψ) s - analyticOrderNatAt (entireL (quadTwist ψ d)) s : ℂ)) /
        φ q / (s * (1 - s))
```
`IsPolar` (`EntireLFunction.lean`, lines 76 to 85) bundles four facts: measurability, $|E|\le Ce^v$, a meromorphic $\Phi$ on all of $\mathbb C$ equal to the transform for $\operatorname{Re}s>2$, and the residue limit at every $\rho$ with $\operatorname{Re}\rho>0$. The proof takes $\Phi=g$ exactly (`F s / (s - 1)` with `F s = G_q(s)/s - c`).

- **At $\rho=1$** the residue formula divides by $s(1-s)=0$, and Lean's value is $0$. The proof shows $F$ is analytic at 1 with $F(1)=0$, which is the prose's removable singularity with residue 0.
- **At $\rho\ne1$** it is `tendsto_logDerivMean_residue` (lines 387 to 391, with $\rho\ne0$ from $\operatorname{Re}\rho>0$). The sign convention $\operatorname{ord}E_\psi-\operatorname{ord}E_{\psi\chi_K}$ and the denominator $\varphi(q)\rho(1-\rho)$ are the same.

Lean's `analyticOrderNatAt` is the prose's $\operatorname{ord}_\rho$. Its `Nat` value is the order, and the order is finite because each $E_\chi$ is entire and not identically zero.

## Verdict

**Outcome: match.** Every clause of Theorem 2.1 is a Lean declaration with the same hypotheses or weaker ones: parts (1) and (2) need only $d$ odd, and only (3) uses $d\equiv7 \pmod 8$. The constants, the sign of the residue and the removable point at $1$ also agree. Two small notes. The correspondence row lists `tendsto_sub_mul_logDerivMean`, the residue of $G_q$ itself, which feeds (3); it omits `analyticAt_logDerivMean_of_one_le_re`, which proves half of (2). The prose proof of (2) (Im $F$ vanishes on $(2,\infty)$, hence on $[1,\infty)$ by real-analyticity) I did not compare with the Lean proof of `ofReal_re_logDerivMean_one`.

**Not checked:** the proofs of the seven declarations beyond `isPolar_primeRemainder`, which I read in full.

