← Session 24 — ii′-2…4: swaps, (4.10) design, contour + website roadmap fixes
thinking (13040 chars)
The user wants to continue with ii′-5b: the B̃₂ periodic Bernoulli function + one IBP level for the ζ representation + the |ζ| ≤ C(1+|t|)² bound on σ ≥ −1/2.
Let me plan ii′-5b carefully:
**Goal:** In Lean, prove:
1. The B̃₂ function: B̃₂(x) = ((x − ⌊x⌋)² − (x−⌊x⌋))/2 — periodic with period 1, continuous, |B̃₂| ≤ 1/8, and ∫₀^x B̃₁(t)dt = B̃₂(x) with B̃₁(x) = x − ⌊x⌋ − 1/2.
Actually — Zeta23's B1 is defined as `B1 (x : ℝ) : ℝ := x - ⌊x⌋₊ - 1/2` (with Nat floor!). Let me use the same Nat-floor convention: B̃₂(x) := (u² − u)/2 where u = x − ⌊x⌋₊ ∈ [0,1). On [0,1): (u²−u)/2 ∈ [−1/8, 0] (min at u = 1/2: (1/4−1/2)/2 = −1/8). |B̃₂| ≤ 1/8 ✓.
2. The IBP step: from the B₁ representation to the B₂ representation:
ζ₀(1, s) form: ζ(s) = 1/2 + 1/(s−1) + s·∫₁^∞ B̃₁(x)·x^{−s−1}dx for re s > 0.
Hmm wait — the Zeta23 rep: riemannZeta0 N s = (Σ_{n=0}^{N} 1/n^s) + (−N^(1−s))/(1−s) + (−N^(−s))/2 + s·∫_N^∞ (⌊x⌋+1/2−x)/x^{s+1} dx. Note ⌊x⌋+1/2−x = −(x−⌊x⌋−1/2) = −B̃₁(x). So the integral term is −s∫_N^∞ B̃₁(x)x^{−s−1}dx.
At N = 1: Σ_{n∈range 2} 1/n^s = 1/0^s + 1/1^s. Hmm — 0^s for s ≠ 0 is 0 (cpow zero), so 1/0^s = 1/0 = 0 (junk). So the sum = 0 + 1 = 1. And (−1^(1−s))/(1−s) = −1/(1−s) = 1/(s−1); (−1^(−s))/2 = −1/2. So ζ(s) = 1 + 1/(s−1) − 1/2 − s∫₁^∞ B̃₁(x)x^{−s−1}dx = 1/2 + 1/(s−1) − s∫₁^∞ B̃₁x^{−s−1}.
IBP: ∫₁^∞ B̃₁(x)x^{−s−1}dx = [B̃₂(x)·x^{−s−1}]₁^∞ + (s+1)∫₁^∞ B̃₂(x)x^{−s−2}dx = 0 (B̃₂(1) = 0; at ∞: B̃₂ bounded, x^{−s−1} → 0 for re s > 0 hmm — wait for the IBP identity to hold at re s > 0 the boundary at ∞ needs x^{−(s+1)} → 0 i.e. re(s+1) > 0 ⟺ re s > −1 ✓ actually!) — so ∫₁^∞ B̃₁x^{−s−1} = (s+1)∫₁^∞ B̃₂x^{−s−2} — and the RHS integral converges for re s > −1. But the LHS only converges for re s > 0! So the EQUALITY is proved first for re s > 0 (where both converge), then the function s ↦ (s+1)∫B̃₂x^{−s−2} is analytic on re s > −1 (integral of bounded·x^{−s−2} — locally uniform convergence ⟹ analytic), giving the analytic continuation of the rep.
Final: ζ(s) = 1/2 + 1/(s−1) − s(s+1)∫₁^∞ B̃₂(x)x^{−s−2}dx, valid for re s > −1, s ≠ 1... wait — at re s ∈ (−1, 0]: the LHS ζ(s) — the identity principle: both sides analytic on {re s > −1} \ {1}? LHS ζ analytic off 1 ✓; RHS: 1/(s−1) + analytic-integral ✓. They agree on {re s > 0} \ {1} — identity principle on the preconnected open set {re s > −1, s ≠ 1}: agree on the nonempty open subset {re s > 1}-ish ⟹ agree everywhere. So the rep holds on re s > −1, s ≠ 1 ✓.
Then the bound: |ζ(s)| ≤ 1/2 + 1/|s−1| + |s||s+1|·(1/8)/(σ+1) for σ > −1.
On the disc |s − (2+it)| ≤ 5/2: σ ≥ −1/2 ⟹ 1/(σ+1) ≤ 2; |s| ≤ |s₀|+5/2 ≤ 2+|t|+2.5 = |t|+4.5; |s+1| ≤ |t|+5.5; |s−1| ≥ |t|−1 ≥ 9 (|t| ≥ 10) hmm actually |s−1| ≥ |Im(s−1)| = |t| ≥ 10. So |ζ(s)| ≤ 1/2 + 1/10 + (|t|+4.5)(|t|+5.5)/4 ≤ ... ≤ C(1+|t|)² — trace the constant: (|t|+4.5)(|t|+5.5)/4 = (|t|²+10|t|+24.75)/4 ≤ (|t|²+10|t|+24.75)/4; for |t| ≥ 10: ≤ (|t|² + |t|² + 0.25|t|²)/4·... = (2.25|t|²)/4 hmm: 10|t| ≤ |t|² (|t|≥10); 24.75 ≤ 0.2475|t|²: total ≤ (1+1+0.2475)|t|²/4 = 2.2475|t|²/4 ≤ 0.562|t|². So |ζ(s)| ≤ 0.6 + 0.562|t|² ≤ 0.57|t|² for |t| ≥ 10. Clean: **‖ζ(s)‖ ≤ (3/5)·|t|² on the disc** — well, constants to be pinned in Lean as whatever comes out.
3. Lean components:
a. `b2Fun (x : ℝ) : ℝ := ((x - ⌊x⌋₊)^2 - (x - ⌊x⌋₊))/2` with:
- periodic: b2Fun (x+1) = b2Fun x (Nat floor: ⌊x+1⌋₊ = ⌊x⌋₊+1 — `Nat.floor_add_one`? For nat floor: ⌊x+1⌋₊ = ⌊x⌋₊ + 1 — exists `Nat.floor_add_one`? hmm — Zeta23's B1 uses ⌊x⌋₊ (Nat floor). Nat.floor (x+1) = Nat.floor x + 1: `Nat.floor_add_one` exists? There's `Nat.floor_add_nat` (⌊x + n⌋₊ = ⌊x⌋₊ + n) ✓ sure. So b2Fun(x+1) = b2Fun(x) ✓.
- |b2Fun x| ≤ 1/8: u = x−⌊x⌋₊ ∈ [0,1): (u²−u)/2 = −u(1−u)/2: u(1−u) ∈ [0, 1/4] (max at u = 1/2): so b2Fun ∈ [−1/8, 0] ✓. Need u ≥ 0 (Nat.floor_le for x ≥ 0; for x < 0 Nat floor is 0! ⌊x⌋₊ = 0 for x < 0 — then u = x < 0 — hmm! Nat.floor of negative x is 0, so B̃₁(x) = x − 0 − 1/2 = x−1/2 for x < 0 — NOT periodic!! But we only integrate on [1, ∞) — x ≥ 1 > 0 ✓ fine. Define b2Fun only needing [0,∞) properties; for x < 0 junk is fine.)
- Continuous: on each [n, n+1) polynomial; at integers: limit from left at n: u → 1⁻: (1−1)/2 = 0 = b2Fun(n) (u(n) = 0): continuous ✓. In Lean: continuity of b2Fun — via periodicity + polynomial on Ico... hmm — might be easier: b2Fun(x) = (1/2)·(u(x)²−u(x)) with u(x) = x − ⌊x⌋₊. Continuity of u at non-integers ✓ (floor continuous off ℤ); at integers n: u(n) = 0, left limit 1, but b2Fun(1) = b2Fun(0) = 0 ⟹ b2Fun continuous at integers ✓. Proving this in Lean: `Continuous` via... hmm. Maybe define b2Fun as the periodic extension or prove continuity via: continuous_on each interval + matching endpoints. There might be friction. Alternative: define b2Fun via the integral: b2Fun(x) := ∫₀^x B̃₁(t)dt — then continuity is FREE (integral of a locally integrable function is continuous ✓), periodicity needs proof (B̃₁ has mean zero over each period ⟹ b2Fun(n) = 0 ⟹ periodic)... Actually the cleanest Lean route: b2Fun(x) := ∫ (B1 t) dt from 0 to x (intervalIntegral). Properties:
- continuous ✓ (integral of locally integrable).
- b2Fun(n) = 0 for n : ℕ: ∫₀^n B̃₁ = Σ_{k=0}^{n−1} ∫ₖ^{k+1} B̃₁ = n·∫₀¹(t−1/2)dt = 0 ✓.
- periodic: b2Fun(x+1) − b2Fun(x) = ∫ₓ^{x+1} B̃₁ = ∫₀¹ B̃₁ = 0 (periodicity of B̃₁: B̃₁(t+1) = B̃₁(t) — Nat floor ✓; then ∫ₓ^{x+1} = ∫₀¹ via the periodic integral shift lemma — Mathlib: `intervalIntegral.integral_comp_add_right`? or the periodic function integral: `Function.Periodic.intervalIntegral_add_eq` ✓ exists for periodic functions: ∫ₓ^{x+T} f = ∫₀^T f).
- HasDerivAt b2Fun (B̃₁ x) at non-integer x (FTC: B̃₁ continuous at x off ℤ ✓): `intervalIntegral.integral_hasDerivAt_right`? or deriv_of_integral... FTC forms exist.
- |b2Fun| ≤ 1/8: from periodicity + on [0,1]: b2Fun(x) = ∫₀^x (t−1/2)dt = x²/2−x/2 ✓ computation.
This integral-definition route avoids the floor-continuity grind.
b. The IBP: ∫₁^∞ B̃₁(x)·g(x)dx with g(x) = x^{−s−1} (g' = −(s+1)x^{−s−2}):
∫₁^N B̃₁ g = B̃₂(N)g(N) − B̃₂(1)g(1) + (s+1)∫₁^N B̃₂ x^{−s−2} = B̃₂(N)N^{−s−1} + (s+1)∫₁^N B̃₂x^{−s−2}.
(IBP: ∫ u dv = uv − ∫ v du with u = g, dv = B̃₁dx, v = B̃₂: ∫₁^N B̃₁ g = [B̃₂ g]₁^N − ∫₁^N B̃₂ g' = B̃₂(N)g(N) − 0 − ∫ B̃₂·(−(s+1)x^{−s−2}) = B̃₂(N)g(N) + (s+1)∫B̃₂x^{−s−2} ✓.)
Then N → ∞: B̃₂(N)·N^{−s−1} → 0 for re s > −1... wait for the IBP identity at re s > 0 (where the LHS integral converges): take N → ∞ along integers: B̃₂(N) = 0 for integer N!! So the boundary term is EXACTLY ZERO at integer N ✓✓ — no limit argument needed for the boundary: ∫₁^N B̃₁ g = (s+1)∫₁^N B̃₂ x^{−s−2} for INTEGER N exactly. Then N → ∞ both sides: LHS → ∫₁^∞ B̃₁ g (re s > 0: dominated by (1/2)x^{−σ−1} ✓ integrable), RHS → (s+1)∫₁^∞ B̃₂x^{−s−2} (re s > −1: dominated by (1/8)x^{−σ−2} ✓). So for re s > 0: ∫₁^∞ B̃₁ x^{−s−1} = (s+1)∫₁^∞ B̃₂ x^{−s−2} ✓.
In Lean: intervalIntegral IBP on [1, N]: `intervalIntegral.integral_mul_deriv_eq_deriv_mul`? or the EulerMaclaurin helper `integral_deriv_mul_add_const`... The standard: `intervalIntegral.integral_deriv_mul_eq_sub (hu : ∀ x ∈ [[a,b]], HasDerivAt u (u' x) x) ...`? Mathlib: `intervalIntegral.integral_deriv_mul_eq_sub (huu' : ∀ x ∈ uIcc a b, HasDerivAt u (u' x) x) (hvv')... (hu' : IntervalIntegrable u' ...) (hv' : ...): ∫ u*v' = u*b*v*b − u*a*v*a − ∫ u'*v`? Something like `intervalIntegral.integral_deriv_mul_eq_sub`. B̃₂ has HasDerivAt only OFF integers — but the IBP lemmas need... hmm — HasDerivAt at EVERY point of [1,N] fails at integers. Use the "a.e. derivative" IBP version: `intervalIntegral.integral_mul_deriv_eq_deriv_mul` (needs u v absolutely continuous-ish: Continuous + IntervalIntegrable derivs + HasDerivAt a.e.?). There's `MeasureTheory.integral... ` hmm. Simplest robust: split ∫₁^N = Σₖ∫ₖ^{k+1} and IBP on each open interval where B̃₂ is smooth (HasDerivAt everywhere on [k, k+1] — at endpoints HasDerivAt within... the IBP lemma needs HasDerivAt at all points of the closed interval: at integer points B̃₂ is NOT differentiable (B̃₁ jumps)... Actually is B̃₂ differentiable at integers? B̃₂'(n⁺) = B̃₁(n⁺) = −1/2+1−... B̃₁(n) = n−⌊n⌋−1/2 = −1/2; B̃₁(n⁻) = 1/2. So B̃₂ has a corner at integers — not differentiable there. So per-interval [k, k+1]: B̃₂ HasDerivAt at interior, continuous on closed ✓ — the IBP lemma with HasDerivAt on the INTERIOR + continuity on closed interval: `intervalIntegral.integral_deriv_mul_eq_sub_of_hasDerivAt`? or of_hasDerivWithinAt? There are versions: `intervalIntegral.integral_deriv_mul_eq_sub_of_hasDerivWithinAt`? I believe there are variants for HasDerivWithinAt on Ioo + continuity on Icc — those are designed exactly for this (e.g. used for Taylor). I'll find at build time.
Alternatively use the a.e. version: `intervalIntegral.integral_mul_deriv_eq_deriv_mul (hu : ∀ x, HasDerivAt u (u' x) x) ...`? no that's everywhere. There's `intervalIntegral.integral_deriv_mul_eq_sub` with IntervalIntegrable of derivatives + HasDerivWithinAt a.e.? — I'll check exact names in implementation.
c. Analyticity of s ↦ (s+1)·∫₁^∞ B̃₂(x)x^{−s−2}dx on {re s > −1}: dominated local-uniform convergence on compact subsets + each x^{−s−2} analytic in s. Mathlib: analyticity of parameter integrals — is there `analyticAt_integral`? hmm — there's the "analytic function of a parameter under the integral" — `Complex.analyticAt_integral`? Not sure it exists in Mathlib. Alternative: avoid proving analyticity of the integral directly — instead prove the BOUND for σ ∈ (−1/2, ...] only where... hmm no wait — the identity extension needs analyticity of the RHS on re > −1.
Alternative avoiding parameter-integral analyticity: prove the identity ζ(s) = [B₂ form] directly on re s > −1 \ {1} by a SECOND route: the B₂ form at re s > −1 — hmm the identity principle needs both sides analytic. RHS analyticity: s ↦ ∫₁^∞ B̃₂(x) x^{−s−2} dx. On re s > −1+δ: |integrand| ≤ (1/8)x^{−1+δ−2} = x^{−3+δ}/8 integrable ✓ uniform on the half-plane strip — so the integral is a uniform limit of analytic... the partial integrals ∫₁^N analytic in s (finite interval integral of analytic-in-s integrand — still needs a lemma!).
Hmm — Mathlib does have differentiability under the integral sign: `hasDerivAt_integral_of_dominated_loc_fint_lip`? — for ℂ differentiability there's... `Complex.differentiableAt_of_...`? Hmm. There might be an easier path: TAIL BOUND the difference: for the R-bound we don't need the identity for σ < 0 via identity principle — we need the BOUND |ζ(s)| ≤ ... for σ ∈ [−1/2, 0]. Alternative: get the bound for σ < 0 WITHOUT the identity: hmm — the bound is on |ζ| so we need ζ = the expression.
OK the cleanest available: `DifferentiableOn` of the parameter integral via dominated convergence for derivatives. Mathlib: `hasDerivAt_integral_of_dominated_loc_fint_lip` (real param) — for ℂ param: there's `Complex.hasDerivAt_integral...`? Hmm. What does Zeta23 use for ζ₀'s analyticity? `HolomorphicOn_riemannZeta0` (used in Zeta0EqZeta!) — "HolomorphicOn_riemannZeta0 N_pos : HolomorphicOn ℂ (ζ₀ N) {s | ...}" — Zeta23 PROVED the ζ₀ rep is holomorphic (on re > 0 \ {1}?). And HasDerivAt_Zeta0Integral (line 949: hasDerivAt_Zeta0Integral {N} (Npos) {s} (hs : s ∈ {s | 0 < s.re})). So Zeta23 has the machinery for parameter-integral differentiability for this EXACT integral family. For our B₂ integral, mimic `hasDerivAt_Zeta0Integral`'s proof pattern (it's in ZetaBounds.lean — the ∫_N^∞ (⌊x⌋+1/2−x)x^{−s−1} hasDerivAt lemma). The B₂ version follows the same pattern with the better decay x^{−s−2} allowing re s > −1.
So sub-build c: `hasDerivAt_B2Integral`: for re s > −1: HasDerivAt (fun s => ∫ x in Ioi 1, B̃₂(x)·x^{−(s+2)}) (∫ B̃₂·(−log x)·x^{−s−2}) s — via dominated convergence + mean-value on x^{−s−2} difference quotients. This is the heavy analytic bit of 5b. The Zeta23 proof of hasDerivAt_Zeta0Integral is the template — let me look at its proof size/structure to estimate.
d. Assembly:
- On re s > 0: ζ(s) = 1/2 + 1/(s−1) − s·(∫₁^∞ B̃₁ x^{−s−1}) = 1/2 + 1/(s−1) − s(s+1)∫₁^∞ B̃₂x^{−s−2} (using ζ₀ 1 = ζ + the IBP identity).
- Both sides analytic on {re s > −1} \ {1} (LHS: HolomorphicOn_riemannZeta — Zeta23 has it ✓ (used in Zeta0EqZeta proof); RHS via c). Identity principle (AnalyticOnNhd.eqOn_of_preconnected_of_eventuallyEq as in Zeta0EqZeta's proof — copy that pattern): the set {re s > −1} \ {1} is preconnected ✓ (Zeta23 did similar for U = {z ≠ 1 ∧ 0 < re}).
- Bound: |ζ(s)| ≤ 1/2 + 1/|s−1| + |s||s+1|·(1/8)/(σ+1).
Let me look at hasDerivAt_Zeta0Integral to size the work.
Also for the ζ₀-at-N=1 simplification: the sum Σ_{n∈range 2} 1/(n:ℂ)^s = 1/0^s + 1/1^s: 0^s = 0 (cpow_zero? (0:ℂ)^s for s ≠ 0: `Complex.zero_cpow` (hs : s ≠ 0): (0:ℂ)^s = 0 ✓), so 1/0^s = 1/0 = 0 ✓ (inv_zero... 0⁻¹ = 0 in ℂ ✓). So sum = 0 + 1 = 1 ✓. And (−(1:ℂ)^(1−s))/(1−s) = −1/(1−s) = 1/(s−1) ✓ (one_cpow). (−1^(−s))/2 = −1/2 ✓.
Let me read the Zeta23 hasDerivAt_Zeta0Integral proof to gauge.
Continuing into **ii′-5b** (the B̃₂/IBP build). First, sizing the parameter-integral analyticity step — reading Zeta23's `hasDerivAt_Zeta0Integral` template.
tool: Bash
input
{
"command": "cd D:/Python/Quantum/zeta-23-lean && sed -n '940,1067p' Zeta23/FromPNTPlus/ZetaBounds.lean",
"description": "Read hasDerivAt_Zeta0Integral proof template"
}
raw content_json (database row)
[{"type":"thinking","thinking":"The user wants to continue with ii′-5b: the B̃₂ periodic Bernoulli function + one IBP level for the ζ representation + the |ζ| ≤ C(1+|t|)² bound on σ ≥ −1/2.\n\nLet me plan ii′-5b carefully:\n\n**Goal:** In Lean, prove:\n1. The B̃₂ function: B̃₂(x) = ((x − ⌊x⌋)² − (x−⌊x⌋))/2 — periodic with period 1, continuous, |B̃₂| ≤ 1/8, and ∫₀^x B̃₁(t)dt = B̃₂(x) with B̃₁(x) = x − ⌊x⌋ − 1/2.\n \n Actually — Zeta23's B1 is defined as `B1 (x : ℝ) : ℝ := x - ⌊x⌋₊ - 1/2` (with Nat floor!). Let me use the same Nat-floor convention: B̃₂(x) := (u² − u)/2 where u = x − ⌊x⌋₊ ∈ [0,1). On [0,1): (u²−u)/2 ∈ [−1/8, 0] (min at u = 1/2: (1/4−1/2)/2 = −1/8). |B̃₂| ≤ 1/8 ✓.\n\n2. The IBP step: from the B₁ representation to the B₂ representation:\n ζ₀(1, s) form: ζ(s) = 1/2 + 1/(s−1) + s·∫₁^∞ B̃₁(x)·x^{−s−1}dx for re s > 0.\n \n Hmm wait — the Zeta23 rep: riemannZeta0 N s = (Σ_{n=0}^{N} 1/n^s) + (−N^(1−s))/(1−s) + (−N^(−s))/2 + s·∫_N^∞ (⌊x⌋+1/2−x)/x^{s+1} dx. Note ⌊x⌋+1/2−x = −(x−⌊x⌋−1/2) = −B̃₁(x). So the integral term is −s∫_N^∞ B̃₁(x)x^{−s−1}dx.\n \n At N = 1: Σ_{n∈range 2} 1/n^s = 1/0^s + 1/1^s. Hmm — 0^s for s ≠ 0 is 0 (cpow zero), so 1/0^s = 1/0 = 0 (junk). So the sum = 0 + 1 = 1. And (−1^(1−s))/(1−s) = −1/(1−s) = 1/(s−1); (−1^(−s))/2 = −1/2. So ζ(s) = 1 + 1/(s−1) − 1/2 − s∫₁^∞ B̃₁(x)x^{−s−1}dx = 1/2 + 1/(s−1) − s∫₁^∞ B̃₁x^{−s−1}.\n \n IBP: ∫₁^∞ B̃₁(x)x^{−s−1}dx = [B̃₂(x)·x^{−s−1}]₁^∞ + (s+1)∫₁^∞ B̃₂(x)x^{−s−2}dx = 0 (B̃₂(1) = 0; at ∞: B̃₂ bounded, x^{−s−1} → 0 for re s > 0 hmm — wait for the IBP identity to hold at re s > 0 the boundary at ∞ needs x^{−(s+1)} → 0 i.e. re(s+1) > 0 ⟺ re s > −1 ✓ actually!) — so ∫₁^∞ B̃₁x^{−s−1} = (s+1)∫₁^∞ B̃₂x^{−s−2} — and the RHS integral converges for re s > −1. But the LHS only converges for re s > 0! So the EQUALITY is proved first for re s > 0 (where both converge), then the function s ↦ (s+1)∫B̃₂x^{−s−2} is analytic on re s > −1 (integral of bounded·x^{−s−2} — locally uniform convergence ⟹ analytic), giving the analytic continuation of the rep.\n \n Final: ζ(s) = 1/2 + 1/(s−1) − s(s+1)∫₁^∞ B̃₂(x)x^{−s−2}dx, valid for re s > −1, s ≠ 1... wait — at re s ∈ (−1, 0]: the LHS ζ(s) — the identity principle: both sides analytic on {re s > −1} \\ {1}? LHS ζ analytic off 1 ✓; RHS: 1/(s−1) + analytic-integral ✓. They agree on {re s > 0} \\ {1} — identity principle on the preconnected open set {re s > −1, s ≠ 1}: agree on the nonempty open subset {re s > 1}-ish ⟹ agree everywhere. So the rep holds on re s > −1, s ≠ 1 ✓.\n\n Then the bound: |ζ(s)| ≤ 1/2 + 1/|s−1| + |s||s+1|·(1/8)/(σ+1) for σ > −1.\n On the disc |s − (2+it)| ≤ 5/2: σ ≥ −1/2 ⟹ 1/(σ+1) ≤ 2; |s| ≤ |s₀|+5/2 ≤ 2+|t|+2.5 = |t|+4.5; |s+1| ≤ |t|+5.5; |s−1| ≥ |t|−1 ≥ 9 (|t| ≥ 10) hmm actually |s−1| ≥ |Im(s−1)| = |t| ≥ 10. So |ζ(s)| ≤ 1/2 + 1/10 + (|t|+4.5)(|t|+5.5)/4 ≤ ... ≤ C(1+|t|)² — trace the constant: (|t|+4.5)(|t|+5.5)/4 = (|t|²+10|t|+24.75)/4 ≤ (|t|²+10|t|+24.75)/4; for |t| ≥ 10: ≤ (|t|² + |t|² + 0.25|t|²)/4·... = (2.25|t|²)/4 hmm: 10|t| ≤ |t|² (|t|≥10); 24.75 ≤ 0.2475|t|²: total ≤ (1+1+0.2475)|t|²/4 = 2.2475|t|²/4 ≤ 0.562|t|². So |ζ(s)| ≤ 0.6 + 0.562|t|² ≤ 0.57|t|² for |t| ≥ 10. Clean: **‖ζ(s)‖ ≤ (3/5)·|t|² on the disc** — well, constants to be pinned in Lean as whatever comes out.\n\n3. Lean components:\n a. `b2Fun (x : ℝ) : ℝ := ((x - ⌊x⌋₊)^2 - (x - ⌊x⌋₊))/2` with:\n - periodic: b2Fun (x+1) = b2Fun x (Nat floor: ⌊x+1⌋₊ = ⌊x⌋₊+1 — `Nat.floor_add_one`? For nat floor: ⌊x+1⌋₊ = ⌊x⌋₊ + 1 — exists `Nat.floor_add_one`? hmm — Zeta23's B1 uses ⌊x⌋₊ (Nat floor). Nat.floor (x+1) = Nat.floor x + 1: `Nat.floor_add_one` exists? There's `Nat.floor_add_nat` (⌊x + n⌋₊ = ⌊x⌋₊ + n) ✓ sure. So b2Fun(x+1) = b2Fun(x) ✓.\n - |b2Fun x| ≤ 1/8: u = x−⌊x⌋₊ ∈ [0,1): (u²−u)/2 = −u(1−u)/2: u(1−u) ∈ [0, 1/4] (max at u = 1/2): so b2Fun ∈ [−1/8, 0] ✓. Need u ≥ 0 (Nat.floor_le for x ≥ 0; for x < 0 Nat floor is 0! ⌊x⌋₊ = 0 for x < 0 — then u = x < 0 — hmm! Nat.floor of negative x is 0, so B̃₁(x) = x − 0 − 1/2 = x−1/2 for x < 0 — NOT periodic!! But we only integrate on [1, ∞) — x ≥ 1 > 0 ✓ fine. Define b2Fun only needing [0,∞) properties; for x < 0 junk is fine.)\n - Continuous: on each [n, n+1) polynomial; at integers: limit from left at n: u → 1⁻: (1−1)/2 = 0 = b2Fun(n) (u(n) = 0): continuous ✓. In Lean: continuity of b2Fun — via periodicity + polynomial on Ico... hmm — might be easier: b2Fun(x) = (1/2)·(u(x)²−u(x)) with u(x) = x − ⌊x⌋₊. Continuity of u at non-integers ✓ (floor continuous off ℤ); at integers n: u(n) = 0, left limit 1, but b2Fun(1) = b2Fun(0) = 0 ⟹ b2Fun continuous at integers ✓. Proving this in Lean: `Continuous` via... hmm. Maybe define b2Fun as the periodic extension or prove continuity via: continuous_on each interval + matching endpoints. There might be friction. Alternative: define b2Fun via the integral: b2Fun(x) := ∫₀^x B̃₁(t)dt — then continuity is FREE (integral of a locally integrable function is continuous ✓), periodicity needs proof (B̃₁ has mean zero over each period ⟹ b2Fun(n) = 0 ⟹ periodic)... Actually the cleanest Lean route: b2Fun(x) := ∫ (B1 t) dt from 0 to x (intervalIntegral). Properties:\n - continuous ✓ (integral of locally integrable).\n - b2Fun(n) = 0 for n : ℕ: ∫₀^n B̃₁ = Σ_{k=0}^{n−1} ∫ₖ^{k+1} B̃₁ = n·∫₀¹(t−1/2)dt = 0 ✓.\n - periodic: b2Fun(x+1) − b2Fun(x) = ∫ₓ^{x+1} B̃₁ = ∫₀¹ B̃₁ = 0 (periodicity of B̃₁: B̃₁(t+1) = B̃₁(t) — Nat floor ✓; then ∫ₓ^{x+1} = ∫₀¹ via the periodic integral shift lemma — Mathlib: `intervalIntegral.integral_comp_add_right`? or the periodic function integral: `Function.Periodic.intervalIntegral_add_eq` ✓ exists for periodic functions: ∫ₓ^{x+T} f = ∫₀^T f).\n - HasDerivAt b2Fun (B̃₁ x) at non-integer x (FTC: B̃₁ continuous at x off ℤ ✓): `intervalIntegral.integral_hasDerivAt_right`? or deriv_of_integral... FTC forms exist.\n - |b2Fun| ≤ 1/8: from periodicity + on [0,1]: b2Fun(x) = ∫₀^x (t−1/2)dt = x²/2−x/2 ✓ computation.\n This integral-definition route avoids the floor-continuity grind. \n\n b. The IBP: ∫₁^∞ B̃₁(x)·g(x)dx with g(x) = x^{−s−1} (g' = −(s+1)x^{−s−2}):\n ∫₁^N B̃₁ g = B̃₂(N)g(N) − B̃₂(1)g(1) + (s+1)∫₁^N B̃₂ x^{−s−2} = B̃₂(N)N^{−s−1} + (s+1)∫₁^N B̃₂x^{−s−2}.\n (IBP: ∫ u dv = uv − ∫ v du with u = g, dv = B̃₁dx, v = B̃₂: ∫₁^N B̃₁ g = [B̃₂ g]₁^N − ∫₁^N B̃₂ g' = B̃₂(N)g(N) − 0 − ∫ B̃₂·(−(s+1)x^{−s−2}) = B̃₂(N)g(N) + (s+1)∫B̃₂x^{−s−2} ✓.)\n Then N → ∞: B̃₂(N)·N^{−s−1} → 0 for re s > −1... wait for the IBP identity at re s > 0 (where the LHS integral converges): take N → ∞ along integers: B̃₂(N) = 0 for integer N!! So the boundary term is EXACTLY ZERO at integer N ✓✓ — no limit argument needed for the boundary: ∫₁^N B̃₁ g = (s+1)∫₁^N B̃₂ x^{−s−2} for INTEGER N exactly. Then N → ∞ both sides: LHS → ∫₁^∞ B̃₁ g (re s > 0: dominated by (1/2)x^{−σ−1} ✓ integrable), RHS → (s+1)∫₁^∞ B̃₂x^{−s−2} (re s > −1: dominated by (1/8)x^{−σ−2} ✓). So for re s > 0: ∫₁^∞ B̃₁ x^{−s−1} = (s+1)∫₁^∞ B̃₂ x^{−s−2} ✓.\n \n In Lean: intervalIntegral IBP on [1, N]: `intervalIntegral.integral_mul_deriv_eq_deriv_mul`? or the EulerMaclaurin helper `integral_deriv_mul_add_const`... The standard: `intervalIntegral.integral_deriv_mul_eq_sub (hu : ∀ x ∈ [[a,b]], HasDerivAt u (u' x) x) ...`? Mathlib: `intervalIntegral.integral_deriv_mul_eq_sub (huu' : ∀ x ∈ uIcc a b, HasDerivAt u (u' x) x) (hvv')... (hu' : IntervalIntegrable u' ...) (hv' : ...): ∫ u*v' = u*b*v*b − u*a*v*a − ∫ u'*v`? Something like `intervalIntegral.integral_deriv_mul_eq_sub`. B̃₂ has HasDerivAt only OFF integers — but the IBP lemmas need... hmm — HasDerivAt at EVERY point of [1,N] fails at integers. Use the \"a.e. derivative\" IBP version: `intervalIntegral.integral_mul_deriv_eq_deriv_mul` (needs u v absolutely continuous-ish: Continuous + IntervalIntegrable derivs + HasDerivAt a.e.?). There's `MeasureTheory.integral... ` hmm. Simplest robust: split ∫₁^N = Σₖ∫ₖ^{k+1} and IBP on each open interval where B̃₂ is smooth (HasDerivAt everywhere on [k, k+1] — at endpoints HasDerivAt within... the IBP lemma needs HasDerivAt at all points of the closed interval: at integer points B̃₂ is NOT differentiable (B̃₁ jumps)... Actually is B̃₂ differentiable at integers? B̃₂'(n⁺) = B̃₁(n⁺) = −1/2+1−... B̃₁(n) = n−⌊n⌋−1/2 = −1/2; B̃₁(n⁻) = 1/2. So B̃₂ has a corner at integers — not differentiable there. So per-interval [k, k+1]: B̃₂ HasDerivAt at interior, continuous on closed ✓ — the IBP lemma with HasDerivAt on the INTERIOR + continuity on closed interval: `intervalIntegral.integral_deriv_mul_eq_sub_of_hasDerivAt`? or of_hasDerivWithinAt? There are versions: `intervalIntegral.integral_deriv_mul_eq_sub_of_hasDerivWithinAt`? I believe there are variants for HasDerivWithinAt on Ioo + continuity on Icc — those are designed exactly for this (e.g. used for Taylor). I'll find at build time.\n \n Alternatively use the a.e. version: `intervalIntegral.integral_mul_deriv_eq_deriv_mul (hu : ∀ x, HasDerivAt u (u' x) x) ...`? no that's everywhere. There's `intervalIntegral.integral_deriv_mul_eq_sub` with IntervalIntegrable of derivatives + HasDerivWithinAt a.e.? — I'll check exact names in implementation.\n\n c. Analyticity of s ↦ (s+1)·∫₁^∞ B̃₂(x)x^{−s−2}dx on {re s > −1}: dominated local-uniform convergence on compact subsets + each x^{−s−2} analytic in s. Mathlib: analyticity of parameter integrals — is there `analyticAt_integral`? hmm — there's the \"analytic function of a parameter under the integral\" — `Complex.analyticAt_integral`? Not sure it exists in Mathlib. Alternative: avoid proving analyticity of the integral directly — instead prove the BOUND for σ ∈ (−1/2, ...] only where... hmm no wait — the identity extension needs analyticity of the RHS on re > −1.\n \n Alternative avoiding parameter-integral analyticity: prove the identity ζ(s) = [B₂ form] directly on re s > −1 \\ {1} by a SECOND route: the B₂ form at re s > −1 — hmm the identity principle needs both sides analytic. RHS analyticity: s ↦ ∫₁^∞ B̃₂(x) x^{−s−2} dx. On re s > −1+δ: |integrand| ≤ (1/8)x^{−1+δ−2} = x^{−3+δ}/8 integrable ✓ uniform on the half-plane strip — so the integral is a uniform limit of analytic... the partial integrals ∫₁^N analytic in s (finite interval integral of analytic-in-s integrand — still needs a lemma!). \n \n Hmm — Mathlib does have differentiability under the integral sign: `hasDerivAt_integral_of_dominated_loc_fint_lip`? — for ℂ differentiability there's... `Complex.differentiableAt_of_...`? Hmm. There might be an easier path: TAIL BOUND the difference: for the R-bound we don't need the identity for σ < 0 via identity principle — we need the BOUND |ζ(s)| ≤ ... for σ ∈ [−1/2, 0]. Alternative: get the bound for σ < 0 WITHOUT the identity: hmm — the bound is on |ζ| so we need ζ = the expression. \n \n OK the cleanest available: `DifferentiableOn` of the parameter integral via dominated convergence for derivatives. Mathlib: `hasDerivAt_integral_of_dominated_loc_fint_lip` (real param) — for ℂ param: there's `Complex.hasDerivAt_integral...`? Hmm. What does Zeta23 use for ζ₀'s analyticity? `HolomorphicOn_riemannZeta0` (used in Zeta0EqZeta!) — \"HolomorphicOn_riemannZeta0 N_pos : HolomorphicOn ℂ (ζ₀ N) {s | ...}\" — Zeta23 PROVED the ζ₀ rep is holomorphic (on re > 0 \\ {1}?). And HasDerivAt_Zeta0Integral (line 949: hasDerivAt_Zeta0Integral {N} (Npos) {s} (hs : s ∈ {s | 0 < s.re})). So Zeta23 has the machinery for parameter-integral differentiability for this EXACT integral family. For our B₂ integral, mimic `hasDerivAt_Zeta0Integral`'s proof pattern (it's in ZetaBounds.lean — the ∫_N^∞ (⌊x⌋+1/2−x)x^{−s−1} hasDerivAt lemma). The B₂ version follows the same pattern with the better decay x^{−s−2} allowing re s > −1.\n \n So sub-build c: `hasDerivAt_B2Integral`: for re s > −1: HasDerivAt (fun s => ∫ x in Ioi 1, B̃₂(x)·x^{−(s+2)}) (∫ B̃₂·(−log x)·x^{−s−2}) s — via dominated convergence + mean-value on x^{−s−2} difference quotients. This is the heavy analytic bit of 5b. The Zeta23 proof of hasDerivAt_Zeta0Integral is the template — let me look at its proof size/structure to estimate.\n\n d. Assembly: \n - On re s > 0: ζ(s) = 1/2 + 1/(s−1) − s·(∫₁^∞ B̃₁ x^{−s−1}) = 1/2 + 1/(s−1) − s(s+1)∫₁^∞ B̃₂x^{−s−2} (using ζ₀ 1 = ζ + the IBP identity).\n - Both sides analytic on {re s > −1} \\ {1} (LHS: HolomorphicOn_riemannZeta — Zeta23 has it ✓ (used in Zeta0EqZeta proof); RHS via c). Identity principle (AnalyticOnNhd.eqOn_of_preconnected_of_eventuallyEq as in Zeta0EqZeta's proof — copy that pattern): the set {re s > −1} \\ {1} is preconnected ✓ (Zeta23 did similar for U = {z ≠ 1 ∧ 0 < re}).\n - Bound: |ζ(s)| ≤ 1/2 + 1/|s−1| + |s||s+1|·(1/8)/(σ+1).\n\n Let me look at hasDerivAt_Zeta0Integral to size the work.\n\nAlso for the ζ₀-at-N=1 simplification: the sum Σ_{n∈range 2} 1/(n:ℂ)^s = 1/0^s + 1/1^s: 0^s = 0 (cpow_zero? (0:ℂ)^s for s ≠ 0: `Complex.zero_cpow` (hs : s ≠ 0): (0:ℂ)^s = 0 ✓), so 1/0^s = 1/0 = 0 ✓ (inv_zero... 0⁻¹ = 0 in ℂ ✓). So sum = 0 + 1 = 1 ✓. And (−(1:ℂ)^(1−s))/(1−s) = −1/(1−s) = 1/(s−1) ✓ (one_cpow). (−1^(−s))/2 = −1/2 ✓.\n\nLet me read the Zeta23 hasDerivAt_Zeta0Integral proof to gauge.","signature":""},{"type":"text","text":"Continuing into **ii′-5b** (the B̃₂/IBP build). First, sizing the parameter-integral analyticity step — reading Zeta23's `hasDerivAt_Zeta0Integral` template."},{"type":"tool_use","id":"Bash_178","name":"Bash","input":{"command":"cd D:/Python/Quantum/zeta-23-lean && sed -n '940,1067p' Zeta23/FromPNTPlus/ZetaBounds.lean","description":"Read hasDerivAt_Zeta0Integral proof template"},"extra_content":null}]