Current task: —

← Session 24 — ii′-2…4: swaps, (4.10) design, contour + website roadmap fixes

#1267 assistant 2026-08-22 18:24:25.090 UTC · 1983→5530 tok open ⤢
thinking (10497 chars)
`isPathConnected_compl_singleton_of_one_lt_rank (h : 1 < Module.rank ℝ E) (x : E) : IsPathConnected ({x}ᶜ)` — for ℂ: rank over ℝ is 2 ✓. But my U = {re > −1} ∖ {1} = {re > −1} ∩ {1}ᶜ — the intersection of the open half-plane with the complement of a point. That's not directly {x}ᶜ. Hmm — but: U path-connected ⟸ ? Alternative cleaner: U is the half-plane minus a point. There's likely no direct lemma for "convex minus point" as IsPathConnected. But I can prove U path-connected via: IsOpen + IsConnected ⟹ IsPathConnected (their pattern: `IsOpen.isConnected_iff_isPathConnected`). IsConnected U: U = H ∖ {1} with H = {re > −1} convex: IsConnected (H ∖ {1}): H connected (convex) and H ∖ {1}... `IsConnected.compl_singleton`?? hmm — from isConnected_compl_singleton_of_one_lt_rank (for the whole space). For a convex set minus a point: U = H ∩ {1}ᶜ: H ∩ ({1}ᶜ) — {1}ᶜ is path-connected (the lemma ✓ rank 2 for ℂ) and H is convex... intersection of a path-connected open-ish with convex isn't automatic. Simplest correct path: their proof structure (IsOpen.isConnected_iff_isPathConnected + explicit path-joinedness proof via JoinedIn) is what Zeta23 did — i.e. they PROVED path-connectedness directly with paths. Cloning with the vertical-horizontal-vertical three-segment path via JoinedIn.ofLine is the reliable route. Actually — hmm, JoinedIn.ofLine for a three-segment path: JoinedIn.trans twice. The per-segment "stays in U" proofs are like theirs (simp + linarith on re/im). Alternatively — a cheap trick: IsPreconnected U via... let me think about what's MINIMAL for the identity principle: `AnalyticOnNhd.eqOn_of_preconnected_of_eventuallyEq` needs IsPreconnected U. IsPreconnected for U = H ∖ {pt}: hmm — is there `IsPreconnected.compl_singleton` for convex in dim ≥ 2? Probably not directly. OK let me think about the honest cost: the JoinedIn path proof for U = {−1 < re} ∖ {1}: basepoint 2. For w ∈ U: - if 0 < re w: w ∈ U₀ (their set) — JoinedIn via their proof (isPathConnected_aux gives JoinedIn w 2 in U₀ ⊆ U — need JoinedIn mono: `JoinedIn.mono`? IsPathConnected is about JoinedIn in the set — JoinedIn F a b with F ⊆ U ⟹ JoinedIn U: there's `JoinedIn.mono` ✓ probably). - if re w ≤ 0: three segments: w → w + 2i → 2 + (im w + 2)i → 2. Hmm wait — actually simpler two segments: w → 2i' hmm: w with re w ≤ 0: go horizontally to re = 2 at im w — if im w ≠ 0: safe (can't hit 1 which has im 0) ✓: w → 2 + (im w)i horizontally then vertically to 2 — vertical at re = 2 never hits 1 ✓. If im w = 0 (w real ≤ 0): go vertically to w + i first (re ≤ 0 ≠ 1 ✓ safe) then as before. So: - im w ≠ 0: w →(horiz) 2 + im w · i →(vert) 2. - im w = 0: w →(vert) w + i →(horiz) 2 + i →(vert) 2 — hmm w + i to 2 + i horizontal at im = 1 ≠ 0 ✓ safe; 2+i → 2 vertical ✓ safe; w → w+i vertical at re w ≤ 0 ≠ 1 ✓ safe. Actually unify: w →(vert) w + i·(1 if im w = 0 else 0)... just do the case split. Or simpler: always w →(horiz) w' := 2 + (im w)i if im w ≠ 0; else the 3-segment. Fine. Each JoinedIn.ofLine (Continuous f) (f 0 = ...) (f 1 = ...) (maps unitInterval into U). This is honestly ~80-120 lines of fiddly simp/linarith. Annoying but mechanical. Hmm — wait. ALTERNATIVE that avoids U's connectedness entirely: use a DIFFERENT region decomposition. The identity I need for the R-bound is at points with σ ∈ [−1/2, 9/2], |t| ≥ 10 — all with |im| ≥ 7.5 — i.e. in the region W := {re > −1, |im| > 5} which is... not connected either (two components: upper/lower half) but each component is CONVEX?? W⁺ := {re > −1, im > 5}: convex ✓ (intersection of two open half-planes) ⟹ preconnected ✓✓!! And W⁺ contains an open part of V (re > 0, im > 5) where the identity holds. So: prove the identity on W⁺ and W⁻ separately (each convex ⟹ preconnected, no point-avoidance needed — the point 1 isn't in W± anyway!). W⁺ = {s | −1 < re s ∧ 5 < im s}: convex: re/im affine constraints ✓ `Convex.inter` of two convex open half-planes: {re > −1} convex: preimage of Ioi under re — `Convex.interior_halfspace...`? There are halfplane convexity lemmas: `convex_halfspace_re_gt`? Let me recall: `convex_halfspace_re_gt (c) : Convex ℝ {z : ℂ | c < z.re}`? something like that exists ✓. Similarly for im. Then IsPreconnected from Convex: `Convex.isPreconnected` ✓. The identity principle on W⁺: both sides analytic on W⁺ (the B̃₂ integral is analytic on {re > −1} ⊇ W⁺ ✓; 1/(s−1) analytic on W⁺ since 1 ∉ W⁺ (im > 5) ✓); agree on V ∩ W⁺ = {re > 0, im > 5} — open nonempty ⊆ W⁺: eventuallyEq at e.g. 2 + 10i ✓ ∈ W⁺ (re 2 > −1 ✓ im 10 > 5 ✓ and ≠ 1 ✓ and re > 0 for V ✓). `AnalyticOnNhd.eqOn_of_preconnected_of_eventuallyEq` — from Zeta0EqZeta's usage: `(AnalyticOnNhd.eqOn_of_preconnected_of_eventuallyEq f_an g_an preconU h2 ?_ s_mem).symm` — the ?_ was an eventuallyEq at the basepoint h2 (2 ∈ U). So signature: (hf : AnalyticOnNhd ℂ f U) (hg : ...) (hU : IsPreconnected U) (hx : x ∈ U) (h : f =ᶠ[𝓝 x] g) : EqOn f g U — ✓. So §4 plan (REVISED — much cheaper): ```lean theorem riemannZeta_eq_level2_upper {s : ℂ} (hs : -1 < s.re) (hs5 : 5 < s.im) : riemannZeta s = 1 / 2 + 1 / (s - 1) - s * (s + 1) * ∫ x in Set.Ioi (1:ℝ), (b2Fun x : ℂ) * (x : ℂ) ^ (-s - 2) ``` Wait — but the application needs the identity at σ ∈ [−1/2, 9/2], |t| ≥ 10 — im > 5 ✓ covered by W⁺; and for t ≤ −10: W⁻ (im < −5) by symmetry or repeat. Hmm — for the disc bound I need it on B(2+it, 5/2) with |t| ≥ 10: points have im ∈ [t−5/2, t+5/2]: for t ≥ 10: im ≥ 7.5 > 5 ✓ W⁺; for t ≤ −10: im ≤ −7.5 < −5: W⁻. Two applications — or conjugate-symmetry. Two applications of the same proof with flipped signs — the W⁻ version: same proof with im < −5 — the basepoint 2 − 10i, the agreeing region {re > 0, im < −5}. Fine — clone. Hmm wait — actually simpler: prove the identity on the region U' := {s | −1 < re s ∧ s ≠ 1}... no — that's the connectedness pain. W± decomposition is clean and sufficient. Actually even better: state the final §5 bound with the disc hypothesis directly, and inside §5's proof apply the identity via W⁺/W⁻ as needed. Let me structure: §4: - `riemannZeta_eq_level2_of_im_gt` : for −1 < re s, 5 < im s: the identity. - `riemannZeta_eq_level2_of_im_lt` : for −1 < re s, im s < −5: the identity. For each: AnalyticOnNhd of both sides on W⁺ (open ✓, preconnected via convex ✓), eventuallyEq at basepoint 2+10i from the V-identity (V := {0 < re s, s ≠ 1} — agreement there via Zeta0EqZeta + the massage + integral_b1_cpow_eq). The V-agreement lemma: ```lean theorem riemannZeta_eq_level2_of_re_pos {s : ℂ} (hs : 0 < s.re) (hs1 : s ≠ 1) : riemannZeta s = 1 / 2 + 1 / (s - 1) - s * (s + 1) * ∫ x in Set.Ioi (1:ℝ), (b2Fun x : ℂ) * (x : ℂ) ^ (-s - 2) := by have h := Zeta0EqZeta (N := 1) (by norm_num) hs hs1 -- ζ₀ 1 s = ζ s... direction: Zeta0EqZeta : ζ₀ N s = riemannZeta s -- massage riemannZeta0 1 s rw [← h] -- goal: ζ₀ 1 s = ... unfold riemannZeta0 -- hmm the def name: riemannZeta0 with local notation ζ₀ rw [riemannZeta0_apply] -- the _apply form: ζ₀ N s = (Σ ...) + ((−N^(1−s))/(1−s) + (−N^(−s))/2 + s·∫(⌊x⌋+1/2−x)·x^(−(s+1))) -- at N = 1: sum range 2 = {0,1}... ... ``` The massage: Σ_{range 2} 1/(n:ℂ)^s = 1/0^s + 1/1^s = 0 + 1 = 1 (s ≠ 0 from re > 0 ✓): `Finset.sum_range_two`? sum_range_succ... then (0:ℂ)^s = 0 via Complex.zero_cpow (s ≠ 0); 1/0 = 0; (1:ℂ)^s = 1 (one_cpow). So the Σ = 1. Then (−(1:ℂ)^(1−s))/(1−s) = −1/(1−s) = 1/(s−1) (one_cpow, div sign); (−1^(−s))/2 = −1/2. And the integral: s·∫(⌊x⌋+1/2−x)·x^(−(s+1)) — relate to ∫B̃₁: (⌊x⌋+1/2−x) = −B̃₁ (on Ioi 1, Int vs Nat floor — WAIT: riemannZeta0's integral uses `⌊x⌋ + 1/2 - x` — which floor? From the def at line 520: `(⌊x⌋ + 1 / 2 - x) / (x : ℂ) ^ (s + 1)` — hmm the display `⌊x⌋` — given `Int.measurable_floor` was used for measurability — Int.floor. But B1 (EulerMaclaurin) is Nat-floor. So the conversion: on Ioi 1: ↑⌊x⌋_Int = ↑⌊x⌋₊_Nat ✓ (natCast_floor_eq_intCast_floor for x ≥ 0 — hmm that's the REVERSE: (↑⌊a⌋₊ : R) = ↑⌊a⌋ — so Nat-cast equals Int-cast ✓ for a ≥ 0). And the div form /x^(s+1) vs ·x^(−(s+1)): div_cpow_eq_cpow_neg? `div_cpow_eq_cpow_neg`? hmm: (x:ℂ)^(−(s+1)) = 1/x^(s+1): `cpow_neg` ✓. So: s·∫_{Ioi 1} (⌊x⌋+1/2−x)/x^(s+1) = s·∫ −B̃₁(x)·x^(−(s+1))... let me handle via integral_congr_ae: pointwise: (↑⌊x⌋ + 1/2 − ↑x)/↑x^(s+1) = −(↑(B1 x))·↑x^(−s−1)... signs and casts — fiddly but mechanical. Then: −s·∫B̃₁x^(−s−1)·(−1)... let me just be careful at compile. Then §5: the disc bound: ```lean /-! ## 5. The polynomial bound on the disc -/ theorem norm_riemannZeta_le_of_mem_closedBall {t : ℝ} (ht : 10 ≤ |t|) {s : ℂ} (hs : s ∈ Metric.closedBall (2 + t * Complex.I) (5/2)) : ‖riemannZeta s‖ ≤ 3/4 * |t| ^ 2 := by -- s has |im| ≥ 15/2 > 5 ✓ and re ≥ −1/2 > −1 ✓: apply the identity -- then the norm chain ``` - im s: |im s − t| ≤ ‖s − (2+it)‖ ≤ 5/2 ⟹ |im s| ≥ |t| − 5/2 ≥ 15/2: so 5 < im s if t > 0 (im s ≥ t − 5/2 ≥ 7.5 > 5 ✓) and im s < −5 if t < 0 ✓ — choose the right identity by cases on sign of t. - re s ≥ 2 − 5/2 = −1/2 > −1 ✓. - s ≠ 1 ✓ (im large). - Then: ζ s = 1/2 + 1/(s−1) − s(s+1)·J(s) with ‖J‖ ≤ (1/8)/(re s + 1) ≤ 1/4 (re s ≥ −1/2 ⟹ re s + 1 ≥ 1/2: 1/(re s+1) ≤ 2: (1/8)·2 = 1/4 ✓): ‖J(s)‖ ≤ ∫ (1/8)x^(−σ−2) = (1/8)·1/(σ+1) — the integral evaluation: ∫₁^∞ x^(−σ−2)dx = 1/(σ+1) for σ > −1: `integral_rpow_of_lt`? there's `integral_Ioi_rpow_of_lt`? hmm — name: `integral_Ioi_rpow_of_lt (ha : a < -1) (hc : 0 < c) : ∫ x in Ioi c, x^a = ...`? probably `integral_Ioi_rpow_of_lt : ∫ x in Ioi c, x^a = -c^(a+1)/(a+1)`?? Let me check at build. Then ‖ζ‖ ≤ 1/2 + 1/‖s−1‖ + ‖s‖·‖s+1‖·(1/8)/(σ+1) ≤ 1/2 + 1/10 + (|t|+9/2)(|t|+11/2)·(1/4) ≤ 3/4·|t|² for |t| ≥ 10 (the arithmetic from the design: ≤ 0.6 + 0.568|t|² ≤ 3/4|t|² ⟺ 0.6 ≤ 0.182|t|² ⟸ 0.182·100 = 18.2 ≥ 0.6 ✓ plenty). Wait — ‖s‖ ≤ |t| + 9/2: ‖s‖ ≤ ‖s − (2+it)‖ + ‖2+it‖ ≤ 5/2 + (2 + |t|) = |t| + 9/2 ✓ (‖2+it‖ ≤ 2+|t| via norm_le_abs_re_add_abs_im). ‖s+1‖ ≤ ‖s‖+1 ≤ |t|+11/2 ✓. ‖s−1‖ ≥ |im(s−1)| = |t| ≥ 10 ✓. The (σ+1) factor: re s ≥ −1/2: 1/(σ+1) ≤ 2 ✓. OK. Write §4 + §5 now. The V-agreement lemma first. For the massage of riemannZeta0 1 s, the def: riemannZeta0 N s = (Σ_{range(N+1)} 1/n^s) + (−N^(1−s))/(1−s) + (−N^(−s))/2 + s·∫_{Ioi N} (⌊x⌋+1/2−x)/x^(s+1). Note: `riemannZeta0_apply` gives the alternate form with (−N^(1−s))/(1−s) + (−N^(−s))/2 + s·∫(⌊x⌋+1/2−x)·x^(−(s+1)) — the apply form has the integral with * x^(−(s+1)) — closer to mine ✓ use riemannZeta0_apply. At N = 1: (−(1:ℂ)^(1−s))/(1−s): (1:ℂ)^(1−s) = 1 (one_cpow) ✓: = −1/(1−s); (−(1:ℂ)^(−s))/2 = −1/2 ✓. Let me write §4 now.
§3 green. Now §4 — the identity extension. Key simplification vs the plan: instead of the connectedness pain of `{re > −1} ∖ {1}`, I'll use the convex regions W± = {re > −1, ±im > 5} (convex ⟹ preconnected, and they contain the application discs).
tool: Edit
input
{
  "replace_all": false,
  "file_path": "D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\NguyenRH1\\LiRBound.lean",
  "old_string": "end NguyenRH1\n\nend",
  "new_string": "/-! ## 4. The level-2 representation of \u03b6 on re s > \u22121 -/\n\n/-- The level-2 representation on re s > 0: from Zeta23's `Zeta0EqZeta`\nplus the level-2 IBP identity. -/\ntheorem riemannZeta_eq_level2_of_re_pos {s : \u2102} (hs : 0 < s.re) (hs1 : s \u2260 1) :\n    riemannZeta s = 1 / 2 + 1 / (s - 1)\n      - s * (s + 1) * \u222b x in Set.Ioi (1:\u211d), (b2Fun x : \u2102) * (x : \u2102) ^ (-s - 2) := by\n  have hs0 : s \u2260 0 := fun h => by rw [h] at hs; simp at hs\n  have h := Zeta0EqZeta (N := 1) (by norm_num) hs hs1\n  rw [\u2190 h]\n  rw [riemannZeta0_apply]\n  have hsum : \u2211 n \u2208 Finset.range (1 + 1), 1 / (n : \u2102) ^ s = 1 := by\n    rw [Finset.sum_range_succ, Finset.sum_range_one]\n    simp [Complex.zero_cpow hs0]\n  rw [hsum]\n  have hI1 : (\u222b x in Set.Ioi ((1 : \u2115) : \u211d), (\u230ax\u230b + 1 / 2 - x) * (x : \u2102) ^ (-(s + 1)))\n      = -\u222b x in Set.Ioi (1:\u211d), (B1 x : \u2102) * (x : \u2102) ^ (-s - 1) := by\n    rw [\u2190 integral_neg]\n    apply integral_congr_ae\n    filter_upwards [self_mem_ae_restrict measurableSet_Ioi] with x hx\n    have hx0 : (0:\u211d) \u2264 x := zero_le_one.trans (Set.mem_Ioi.mp hx).le\n    rw [b1_eq_fract_sub_half hx0, Int.fract]\n    have e : (-(s + 1) : \u2102) = -s - 1 := by ring\n    rw [e]\n    push_cast\n    ring\n  rw [Nat.cast_one, hI1, integral_b1_cpow_eq hs]\n  field_simp\n  ring\n\n/-- The level-2 representation on the upper region W\u207a = {re > \u22121, im > 5}\n(convex, hence preconnected \u2014 the identity principle applies). -/\ntheorem riemannZeta_eq_level2_of_im_gt {s : \u2102} (hs : -1 < s.re) (hs5 : 5 < s.im) :\n    riemannZeta s = 1 / 2 + 1 / (s - 1)\n      - s * (s + 1) * \u222b x in Set.Ioi (1:\u211d), (b2Fun x : \u2102) * (x : \u2102) ^ (-s - 2) := by\n  set W : Set \u2102 := {z | -1 < z.re \u2227 5 < z.im}\n  have hWopen : IsOpen W :=\n    (isOpen_lt continuous_const Complex.continuous_re).inter\n      (isOpen_lt continuous_const Complex.continuous_im)\n  have hWpre : IsPreconnected W :=\n    ((convex_halfspace_re_gt _) -- hmm: {\u22121 < re}\n      |>.inter (convex_halfspace_im_gt _)).isPreconnected\n  -- LHS analytic on W (W avoids 1 since im > 5)\n  have hf_an : AnalyticOnNhd \u2102 riemannZeta W :=\n    (HolomorphicOn_riemannZeta.mono (fun z hz => by\n      intro h1\n      rw [h1] at hz\n      simp at hz)).analyticOnNhd hWopen\n  -- RHS analytic on W\n  have hg_an : AnalyticOnNhd \u2102 (fun s : \u2102 => 1 / 2 + 1 / (s - 1)\n      - s * (s + 1) * \u222b x in Set.Ioi (1:\u211d), (b2Fun x : \u2102) * (x : \u2102) ^ (-s - 2)) W := by\n    intro z hz\n    apply AnalyticAt.sub\n    \u00b7 apply AnalyticAt.add\n      \u00b7 exact analyticAt_const\n      \u00b7 apply AnalyticAt.one_div\n        \u00b7 exact analyticAt_id.sub analyticAt_const\n        \u00b7 intro h\n          have : z = 1 := by rwa [sub_eq_zero] at h\n          rw [this] at hz\n          simp at hz\n    \u00b7 apply AnalyticAt.mul\n      \u00b7 exact analyticAt_id.mul (analyticAt_id.add analyticAt_const)\n      \u00b7 exact ((hasDerivAt_b2Integral hz.1).analyticAt ... )\n  sorry\n  sorry\n\nend NguyenRH1\n\nend"
}
raw content_json (database row)
[{"type":"thinking","thinking":"`isPathConnected_compl_singleton_of_one_lt_rank (h : 1 < Module.rank ℝ E) (x : E) : IsPathConnected ({x}ᶜ)` — for ℂ: rank over ℝ is 2 ✓. But my U = {re > −1} ∖ {1} = {re > −1} ∩ {1}ᶜ — the intersection of the open half-plane with the complement of a point. That's not directly {x}ᶜ. Hmm — but: U path-connected ⟸ ? \n\nAlternative cleaner: U is the half-plane minus a point. There's likely no direct lemma for \"convex minus point\" as IsPathConnected. But I can prove U path-connected via: IsOpen + IsConnected ⟹ IsPathConnected (their pattern: `IsOpen.isConnected_iff_isPathConnected`). IsConnected U: U = H ∖ {1} with H = {re > −1} convex: IsConnected (H ∖ {1}): H connected (convex) and H ∖ {1}... `IsConnected.compl_singleton`?? hmm — from isConnected_compl_singleton_of_one_lt_rank (for the whole space). For a convex set minus a point: U = H ∩ {1}ᶜ: H ∩ ({1}ᶜ) — {1}ᶜ is path-connected (the lemma ✓ rank 2 for ℂ) and H is convex... intersection of a path-connected open-ish with convex isn't automatic.\n\nSimplest correct path: their proof structure (IsOpen.isConnected_iff_isPathConnected + explicit path-joinedness proof via JoinedIn) is what Zeta23 did — i.e. they PROVED path-connectedness directly with paths. Cloning with the vertical-horizontal-vertical three-segment path via JoinedIn.ofLine is the reliable route. Actually — hmm, JoinedIn.ofLine for a three-segment path: JoinedIn.trans twice. The per-segment \"stays in U\" proofs are like theirs (simp + linarith on re/im).\n\nAlternatively — a cheap trick: IsPreconnected U via... let me think about what's MINIMAL for the identity principle: `AnalyticOnNhd.eqOn_of_preconnected_of_eventuallyEq` needs IsPreconnected U. IsPreconnected for U = H ∖ {pt}: hmm — is there `IsPreconnected.compl_singleton` for convex in dim ≥ 2? Probably not directly.\n\nOK let me think about the honest cost: the JoinedIn path proof for U = {−1 < re} ∖ {1}: basepoint 2. For w ∈ U:\n- if 0 < re w: w ∈ U₀ (their set) — JoinedIn via their proof (isPathConnected_aux gives JoinedIn w 2 in U₀ ⊆ U — need JoinedIn mono: `JoinedIn.mono`? IsPathConnected is about JoinedIn in the set — JoinedIn F a b with F ⊆ U ⟹ JoinedIn U: there's `JoinedIn.mono` ✓ probably).\n- if re w ≤ 0: three segments: w → w + 2i → 2 + (im w + 2)i → 2. Hmm wait — actually simpler two segments: w → 2i' hmm: w with re w ≤ 0: go horizontally to re = 2 at im w — if im w ≠ 0: safe (can't hit 1 which has im 0) ✓: w → 2 + (im w)i horizontally then vertically to 2 — vertical at re = 2 never hits 1 ✓. If im w = 0 (w real ≤ 0): go vertically to w + i first (re ≤ 0 ≠ 1 ✓ safe) then as before. So:\n  - im w ≠ 0: w →(horiz) 2 + im w · i →(vert) 2.\n  - im w = 0: w →(vert) w + i →(horiz) 2 + i →(vert) 2 — hmm w + i to 2 + i horizontal at im = 1 ≠ 0 ✓ safe; 2+i → 2 vertical ✓ safe; w → w+i vertical at re w ≤ 0 ≠ 1 ✓ safe.\n  Actually unify: w →(vert) w + i·(1 if im w = 0 else 0)... just do the case split. Or simpler: always w →(horiz) w' := 2 + (im w)i if im w ≠ 0; else the 3-segment. Fine.\n\nEach JoinedIn.ofLine (Continuous f) (f 0 = ...) (f 1 = ...) (maps unitInterval into U). This is honestly ~80-120 lines of fiddly simp/linarith. Annoying but mechanical.\n\nHmm — wait. ALTERNATIVE that avoids U's connectedness entirely: use a DIFFERENT region decomposition. The identity I need for the R-bound is at points with σ ∈ [−1/2, 9/2], |t| ≥ 10 — all with |im| ≥ 7.5 — i.e. in the region W := {re > −1, |im| > 5} which is... not connected either (two components: upper/lower half) but each component is CONVEX?? W⁺ := {re > −1, im > 5}: convex ✓ (intersection of two open half-planes) ⟹ preconnected ✓✓!! And W⁺ contains an open part of V (re > 0, im > 5) where the identity holds. So: prove the identity on W⁺ and W⁻ separately (each convex ⟹ preconnected, no point-avoidance needed — the point 1 isn't in W± anyway!). \n\nW⁺ = {s | −1 < re s ∧ 5 < im s}: convex: re/im affine constraints ✓ `Convex.inter` of two convex open half-planes: {re > −1} convex: preimage of Ioi under re — `Convex.interior_halfspace...`? There are halfplane convexity lemmas: `convex_halfspace_re_gt`? Let me recall: `convex_halfspace_re_gt (c) : Convex ℝ {z : ℂ | c < z.re}`? something like that exists ✓. Similarly for im. Then IsPreconnected from Convex: `Convex.isPreconnected` ✓.\n\nThe identity principle on W⁺: both sides analytic on W⁺ (the B̃₂ integral is analytic on {re > −1} ⊇ W⁺ ✓; 1/(s−1) analytic on W⁺ since 1 ∉ W⁺ (im > 5) ✓); agree on V ∩ W⁺ = {re > 0, im > 5} — open nonempty ⊆ W⁺: eventuallyEq at e.g. 2 + 10i ✓ ∈ W⁺ (re 2 > −1 ✓ im 10 > 5 ✓ and ≠ 1 ✓ and re > 0 for V ✓). \n\n`AnalyticOnNhd.eqOn_of_preconnected_of_eventuallyEq` — from Zeta0EqZeta's usage: `(AnalyticOnNhd.eqOn_of_preconnected_of_eventuallyEq f_an g_an preconU h2 ?_ s_mem).symm` — the ?_ was an eventuallyEq at the basepoint h2 (2 ∈ U). So signature: (hf : AnalyticOnNhd ℂ f U) (hg : ...) (hU : IsPreconnected U) (hx : x ∈ U) (h : f =ᶠ[𝓝 x] g) : EqOn f g U — ✓.\n\nSo §4 plan (REVISED — much cheaper):\n```lean\ntheorem riemannZeta_eq_level2_upper {s : ℂ} (hs : -1 < s.re) (hs5 : 5 < s.im) :\n    riemannZeta s = 1 / 2 + 1 / (s - 1) - s * (s + 1) * ∫ x in Set.Ioi (1:ℝ), (b2Fun x : ℂ) * (x : ℂ) ^ (-s - 2)\n```\nWait — but the application needs the identity at σ ∈ [−1/2, 9/2], |t| ≥ 10 — im > 5 ✓ covered by W⁺; and for t ≤ −10: W⁻ (im < −5) by symmetry or repeat. Hmm — for the disc bound I need it on B(2+it, 5/2) with |t| ≥ 10: points have im ∈ [t−5/2, t+5/2]: for t ≥ 10: im ≥ 7.5 > 5 ✓ W⁺; for t ≤ −10: im ≤ −7.5 < −5: W⁻. Two applications — or conjugate-symmetry. Two applications of the same proof with flipped signs — the W⁻ version: same proof with im < −5 — the basepoint 2 − 10i, the agreeing region {re > 0, im < −5}. Fine — clone.\n\nHmm wait — actually simpler: prove the identity on the region U' := {s | −1 < re s ∧ s ≠ 1}... no — that's the connectedness pain. W± decomposition is clean and sufficient. Actually even better: state the final §5 bound with the disc hypothesis directly, and inside §5's proof apply the identity via W⁺/W⁻ as needed. Let me structure:\n\n§4:\n- `riemannZeta_eq_level2_of_im_gt` : for −1 < re s, 5 < im s: the identity.\n- `riemannZeta_eq_level2_of_im_lt` : for −1 < re s, im s < −5: the identity.\n\nFor each: AnalyticOnNhd of both sides on W⁺ (open ✓, preconnected via convex ✓), eventuallyEq at basepoint 2+10i from the V-identity (V := {0 < re s, s ≠ 1} — agreement there via Zeta0EqZeta + the massage + integral_b1_cpow_eq).\n\nThe V-agreement lemma:\n```lean\ntheorem riemannZeta_eq_level2_of_re_pos {s : ℂ} (hs : 0 < s.re) (hs1 : s ≠ 1) :\n    riemannZeta s = 1 / 2 + 1 / (s - 1) - s * (s + 1) * ∫ x in Set.Ioi (1:ℝ), (b2Fun x : ℂ) * (x : ℂ) ^ (-s - 2) := by\n  have h := Zeta0EqZeta (N := 1) (by norm_num) hs hs1  -- ζ₀ 1 s = ζ s... direction: Zeta0EqZeta : ζ₀ N s = riemannZeta s\n  -- massage riemannZeta0 1 s\n  rw [← h]  -- goal: ζ₀ 1 s = ...\n  unfold riemannZeta0  -- hmm the def name: riemannZeta0 with local notation ζ₀\n  rw [riemannZeta0_apply]  -- the _apply form: ζ₀ N s = (Σ ...) + ((−N^(1−s))/(1−s) + (−N^(−s))/2 + s·∫(⌊x⌋+1/2−x)·x^(−(s+1)))\n  -- at N = 1: sum range 2 = {0,1}...\n  ...\n```\n\nThe massage: Σ_{range 2} 1/(n:ℂ)^s = 1/0^s + 1/1^s = 0 + 1 = 1 (s ≠ 0 from re > 0 ✓): `Finset.sum_range_two`? sum_range_succ... then (0:ℂ)^s = 0 via Complex.zero_cpow (s ≠ 0); 1/0 = 0; (1:ℂ)^s = 1 (one_cpow). So the Σ = 1. Then (−(1:ℂ)^(1−s))/(1−s) = −1/(1−s) = 1/(s−1) (one_cpow, div sign); (−1^(−s))/2 = −1/2. And the integral: s·∫(⌊x⌋+1/2−x)·x^(−(s+1)) — relate to ∫B̃₁: (⌊x⌋+1/2−x) = −B̃₁ (on Ioi 1, Int vs Nat floor — WAIT: riemannZeta0's integral uses `⌊x⌋ + 1/2 - x` — which floor? From the def at line 520: `(⌊x⌋ + 1 / 2 - x) / (x : ℂ) ^ (s + 1)` — hmm the display `⌊x⌋` — given `Int.measurable_floor` was used for measurability — Int.floor. But B1 (EulerMaclaurin) is Nat-floor. So the conversion: on Ioi 1: ↑⌊x⌋_Int = ↑⌊x⌋₊_Nat ✓ (natCast_floor_eq_intCast_floor for x ≥ 0 — hmm that's the REVERSE: (↑⌊a⌋₊ : R) = ↑⌊a⌋ — so Nat-cast equals Int-cast ✓ for a ≥ 0). And the div form /x^(s+1) vs ·x^(−(s+1)): div_cpow_eq_cpow_neg? `div_cpow_eq_cpow_neg`? hmm: (x:ℂ)^(−(s+1)) = 1/x^(s+1): `cpow_neg` ✓.\n\nSo: s·∫_{Ioi 1} (⌊x⌋+1/2−x)/x^(s+1) = s·∫ −B̃₁(x)·x^(−(s+1))... let me handle via integral_congr_ae: pointwise: (↑⌊x⌋ + 1/2 − ↑x)/↑x^(s+1) = −(↑(B1 x))·↑x^(−s−1)... signs and casts — fiddly but mechanical.\n\nThen: −s·∫B̃₁x^(−s−1)·(−1)... let me just be careful at compile.\n\nThen §5: the disc bound:\n```lean\n/-! ## 5. The polynomial bound on the disc -/\n\ntheorem norm_riemannZeta_le_of_mem_closedBall {t : ℝ} (ht : 10 ≤ |t|) {s : ℂ}\n    (hs : s ∈ Metric.closedBall (2 + t * Complex.I) (5/2)) :\n    ‖riemannZeta s‖ ≤ 3/4 * |t| ^ 2 := by\n  -- s has |im| ≥ 15/2 > 5 ✓ and re ≥ −1/2 > −1 ✓: apply the identity\n  -- then the norm chain\n```\n- im s: |im s − t| ≤ ‖s − (2+it)‖ ≤ 5/2 ⟹ |im s| ≥ |t| − 5/2 ≥ 15/2: so 5 < im s if t > 0 (im s ≥ t − 5/2 ≥ 7.5 > 5 ✓) and im s < −5 if t < 0 ✓ — choose the right identity by cases on sign of t.\n- re s ≥ 2 − 5/2 = −1/2 > −1 ✓.\n- s ≠ 1 ✓ (im large).\n- Then: ζ s = 1/2 + 1/(s−1) − s(s+1)·J(s) with ‖J‖ ≤ (1/8)/(re s + 1) ≤ 1/4 (re s ≥ −1/2 ⟹ re s + 1 ≥ 1/2: 1/(re s+1) ≤ 2: (1/8)·2 = 1/4 ✓):\n  ‖J(s)‖ ≤ ∫ (1/8)x^(−σ−2) = (1/8)·1/(σ+1) — the integral evaluation: ∫₁^∞ x^(−σ−2)dx = 1/(σ+1) for σ > −1: `integral_rpow_of_lt`? there's `integral_Ioi_rpow_of_lt`? hmm — name: `integral_Ioi_rpow_of_lt (ha : a < -1) (hc : 0 < c) : ∫ x in Ioi c, x^a = ...`? probably `integral_Ioi_rpow_of_lt : ∫ x in Ioi c, x^a = -c^(a+1)/(a+1)`?? Let me check at build. \n  Then ‖ζ‖ ≤ 1/2 + 1/‖s−1‖ + ‖s‖·‖s+1‖·(1/8)/(σ+1) ≤ 1/2 + 1/10 + (|t|+9/2)(|t|+11/2)·(1/4) ≤ 3/4·|t|² for |t| ≥ 10 (the arithmetic from the design: ≤ 0.6 + 0.568|t|² ≤ 3/4|t|² ⟺ 0.6 ≤ 0.182|t|² ⟸ 0.182·100 = 18.2 ≥ 0.6 ✓ plenty).\n\nWait — ‖s‖ ≤ |t| + 9/2: ‖s‖ ≤ ‖s − (2+it)‖ + ‖2+it‖ ≤ 5/2 + (2 + |t|) = |t| + 9/2 ✓ (‖2+it‖ ≤ 2+|t| via norm_le_abs_re_add_abs_im). ‖s+1‖ ≤ ‖s‖+1 ≤ |t|+11/2 ✓. ‖s−1‖ ≥ |im(s−1)| = |t| ≥ 10 ✓.\n\nThe (σ+1) factor: re s ≥ −1/2: 1/(σ+1) ≤ 2 ✓.\n\nOK. Write §4 + §5 now. The V-agreement lemma first. For the massage of riemannZeta0 1 s, the def: riemannZeta0 N s = (Σ_{range(N+1)} 1/n^s) + (−N^(1−s))/(1−s) + (−N^(−s))/2 + s·∫_{Ioi N} (⌊x⌋+1/2−x)/x^(s+1). Note: `riemannZeta0_apply` gives the alternate form with (−N^(1−s))/(1−s) + (−N^(−s))/2 + s·∫(⌊x⌋+1/2−x)·x^(−(s+1)) — the apply form has the integral with * x^(−(s+1)) — closer to mine ✓ use riemannZeta0_apply.\n\nAt N = 1: (−(1:ℂ)^(1−s))/(1−s): (1:ℂ)^(1−s) = 1 (one_cpow) ✓: = −1/(1−s); (−(1:ℂ)^(−s))/2 = −1/2 ✓.\n\nLet me write §4 now.","signature":""},{"type":"text","text":"§3 green. Now §4 — the identity extension. Key simplification vs the plan: instead of the connectedness pain of `{re > −1} ∖ {1}`, I'll use the convex regions W± = {re > −1, ±im > 5} (convex ⟹ preconnected, and they contain the application discs)."},{"type":"tool_use","id":"Edit_276","name":"Edit","input":{"replace_all":false,"file_path":"D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\NguyenRH1\\LiRBound.lean","old_string":"end NguyenRH1\n\nend","new_string":"/-! ## 4. The level-2 representation of ζ on re s > −1 -/\n\n/-- The level-2 representation on re s > 0: from Zeta23's `Zeta0EqZeta`\nplus the level-2 IBP identity. -/\ntheorem riemannZeta_eq_level2_of_re_pos {s : ℂ} (hs : 0 < s.re) (hs1 : s ≠ 1) :\n    riemannZeta s = 1 / 2 + 1 / (s - 1)\n      - s * (s + 1) * ∫ x in Set.Ioi (1:ℝ), (b2Fun x : ℂ) * (x : ℂ) ^ (-s - 2) := by\n  have hs0 : s ≠ 0 := fun h => by rw [h] at hs; simp at hs\n  have h := Zeta0EqZeta (N := 1) (by norm_num) hs hs1\n  rw [← h]\n  rw [riemannZeta0_apply]\n  have hsum : ∑ n ∈ Finset.range (1 + 1), 1 / (n : ℂ) ^ s = 1 := by\n    rw [Finset.sum_range_succ, Finset.sum_range_one]\n    simp [Complex.zero_cpow hs0]\n  rw [hsum]\n  have hI1 : (∫ x in Set.Ioi ((1 : ℕ) : ℝ), (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-(s + 1)))\n      = -∫ x in Set.Ioi (1:ℝ), (B1 x : ℂ) * (x : ℂ) ^ (-s - 1) := by\n    rw [← integral_neg]\n    apply integral_congr_ae\n    filter_upwards [self_mem_ae_restrict measurableSet_Ioi] with x hx\n    have hx0 : (0:ℝ) ≤ x := zero_le_one.trans (Set.mem_Ioi.mp hx).le\n    rw [b1_eq_fract_sub_half hx0, Int.fract]\n    have e : (-(s + 1) : ℂ) = -s - 1 := by ring\n    rw [e]\n    push_cast\n    ring\n  rw [Nat.cast_one, hI1, integral_b1_cpow_eq hs]\n  field_simp\n  ring\n\n/-- The level-2 representation on the upper region W⁺ = {re > −1, im > 5}\n(convex, hence preconnected — the identity principle applies). -/\ntheorem riemannZeta_eq_level2_of_im_gt {s : ℂ} (hs : -1 < s.re) (hs5 : 5 < s.im) :\n    riemannZeta s = 1 / 2 + 1 / (s - 1)\n      - s * (s + 1) * ∫ x in Set.Ioi (1:ℝ), (b2Fun x : ℂ) * (x : ℂ) ^ (-s - 2) := by\n  set W : Set ℂ := {z | -1 < z.re ∧ 5 < z.im}\n  have hWopen : IsOpen W :=\n    (isOpen_lt continuous_const Complex.continuous_re).inter\n      (isOpen_lt continuous_const Complex.continuous_im)\n  have hWpre : IsPreconnected W :=\n    ((convex_halfspace_re_gt _) -- hmm: {−1 < re}\n      |>.inter (convex_halfspace_im_gt _)).isPreconnected\n  -- LHS analytic on W (W avoids 1 since im > 5)\n  have hf_an : AnalyticOnNhd ℂ riemannZeta W :=\n    (HolomorphicOn_riemannZeta.mono (fun z hz => by\n      intro h1\n      rw [h1] at hz\n      simp at hz)).analyticOnNhd hWopen\n  -- RHS analytic on W\n  have hg_an : AnalyticOnNhd ℂ (fun s : ℂ => 1 / 2 + 1 / (s - 1)\n      - s * (s + 1) * ∫ x in Set.Ioi (1:ℝ), (b2Fun x : ℂ) * (x : ℂ) ^ (-s - 2)) W := by\n    intro z hz\n    apply AnalyticAt.sub\n    · apply AnalyticAt.add\n      · exact analyticAt_const\n      · apply AnalyticAt.one_div\n        · exact analyticAt_id.sub analyticAt_const\n        · intro h\n          have : z = 1 := by rwa [sub_eq_zero] at h\n          rw [this] at hz\n          simp at hz\n    · apply AnalyticAt.mul\n      · exact analyticAt_id.mul (analyticAt_id.add analyticAt_const)\n      · exact ((hasDerivAt_b2Integral hz.1).analyticAt ... )\n  sorry\n  sorry\n\nend NguyenRH1\n\nend"},"extra_content":null}]