Current task: —

← Session 22 — ii′-1: liCoeff pairing fix + residue machinery

#998 assistant 2026-08-22 02:00:23.671 UTC · 1882→1433 tok open ⤢
thinking (3621 chars)
All confirmed: - `analyticOrderAt_mul (hf : AnalyticAt) (hg : AnalyticAt) : analyticOrderAt (f * g) z₀ = analyticOrderAt f z₀ + analyticOrderAt g z₀` ✓ - `Nat.cast_analyticOrderNatAt (hf : analyticOrderAt f z₀ ≠ ⊤) : (analyticOrderNatAt f z₀ : ℕ∞) = analyticOrderAt f z₀` ✓ [simp] - `AnalyticAt.analyticOrderAt_eq_natCast (hf : AnalyticAt) : analyticOrderAt f z₀ = analyticOrderNatAt f z₀`? — line 86; wait that can't hold when order = ⊤... toNat ⊤ = 0... Let me look — probably: analyticOrderAt f z₀ = analyticOrderNatAt f z₀ in some conditional form. Actually line 71's `Nat.cast_analyticOrderNatAt (hf : analyticOrderAt f z₀ ≠ ⊤) : ↑(analyticOrderNatAt f z₀) = analyticOrderAt f z₀` is the one I want. ✓ - `ENat.natCast_le_natCast : (n : ℕ∞) ≤ (m : ℕ∞) ↔ n ≤ m` ✓ One more check — analyticOrderAt_mul signature says (f * g) with Pi.mul. And the smul version `analyticOrderAt_smul`? For (w−1)^m • h — the factorization uses •. Fine, the factorization comes from the library lemma directly. Now — note the mul lemma at 497: `analyticOrderAt_mul (hf : AnalyticAt 𝕜 f z₀) (hg : AnalyticAt 𝕜 g z₀) : analyticOrderAt (f * g) z₀ = ...` presumably. For zetaA bridge at ρ: analyticOrderAt zetaA ρ = analyticOrderAt (fun w => (w−1)·ζ w) ρ (congr) = analyticOrderAt (fun w => w−1) ρ + analyticOrderAt ζ ρ (mul) = 0 + _ (analyticOrderAt_eq_zero since ρ − 1 ≠ 0, AnalyticAt ✓). Now, one design decision: prove `zeta_order_ne_top_of_ne` via zetaA on univ (isPreconnected_univ ✓). ``` lemma zetaA_analyticOnNhd_univ : AnalyticOnNhd ℂ zetaA Set.univ := fun s _ => by by_cases hs : s = 1 · subst hs; exact zetaA_analyticAt_one · exact zetaA_analyticAt_of_ne hs lemma zeta_order_ne_top_of_ne {ρ : ℂ} (hρ : ρ ≠ 1) : analyticOrderAt riemannZeta ρ ≠ ⊤ := by have hA : analyticOrderAt zetaA ρ ≠ ⊤ := analyticOrderAt_ne_top_of_isPreconnected zetaA_analyticOnNhd_univ isPreconnected_univ (Set.mem_univ 1) (Set.mem_univ ρ) (by rw [zetaA_one] -- analyticOrderAt zetaA 1, with zetaA 1 = 1 ... need: analyticOrderAt zetaA 1 ≠ ⊤: = 0 by (zetaA_analyticAt_one.analyticOrderAt_eq_zero.mpr (by rw[zetaA_one]; norm_num)) then simp) -- bridge have hcong : zetaA =ᶠ[𝓝 ρ] (fun w => (w - 1) * riemannZeta w) := by filter_upwards [eventually_ne_nhds hρ] with w hw using (zetaA_apply hw).symm rw [analyticOrderAt_congr hcong, analyticOrderAt_mul (analyticAt_id.sub analyticAt_const) (analyticAt_riemannZeta hρ)] at hA -- analyticOrderAt (fun w => w - 1) ρ = 0 have h0 : analyticOrderAt (fun w : ℂ => w - 1) ρ = 0 := ((analyticAt_id.sub analyticAt_const).analyticOrderAt_eq_zero).mpr (sub_ne_zero.mpr hρ) rw [h0, zero_add] at hA exact hA ``` Wait — analyticOrderAt_congr direction: `analyticOrderAt_congr (hfg : f =ᶠ[𝓝 z₀] g) : analyticOrderAt f z₀ = analyticOrderAt g z₀` presumably. ✓ Also need `eventually_ne_nhds` — used in LiResidue ✓ exists. Now, careful with `analyticOrderAt_mul` — signature at line 497: `theorem analyticOrderAt_mul (hf : AnalyticAt 𝕜 f z₀) (hg : AnalyticAt 𝕜 g z₀) : analyticOrderAt (f * g) z₀ = analyticOrderAt f z₀ + analyticOrderAt g z₀` (presumably). My function is a lambda `fun w => (w−1) * riemannZeta w` — need to rewrite as Pi.mul: `(fun w => (w−1)·ζ w) = (fun w => w−1) * riemannZeta` via funext/Pi.mul_apply — the session-016 notes warn: "Pi.mul_apply/Pi.add_apply/Pi.sub_apply simp after .mul/.add/.sub". So: rw [show (fun w : ℂ => (w−1)*riemannZeta w) = (fun w : ℂ => w−1) * riemannZeta from by funext w; simp [Pi.mul_apply]]. OK. Now — one more thing to verify: `HolomorphicOn.rectangleBorderIntegrable'` signature (line 188 of ResidueCalcOnRectangles).
All lemmas confirmed. Let me check the `rectangleBorderIntegrable'` signature and `Rectangle`/`RectangleBorder` helper names, then write the file.
tool: Bash
input
{
  "command": "cd \"D:/Python/Quantum/zeta-23-lean\" && sed -n '180,200p' Zeta23/FromPNTPlus/ResidueCalcOnRectangles.lean; echo ---; grep -rn \"theorem rectangle_mem_nhds_iff\\|lemma rectangle_mem_nhds_iff\\|not_mem_rectangleBorder_of_rectangle_mem_nhds\\|rectangleBorder_subset_rectangle\" Zeta23/ --include=\"*.lean\" | head -6",
  "description": "Check rectangle integrability and border helper signatures"
}
raw content_json (database row)
[{"type":"thinking","thinking":"All confirmed:\n- `analyticOrderAt_mul (hf : AnalyticAt) (hg : AnalyticAt) : analyticOrderAt (f * g) z₀ = analyticOrderAt f z₀ + analyticOrderAt g z₀` ✓\n- `Nat.cast_analyticOrderNatAt (hf : analyticOrderAt f z₀ ≠ ⊤) : (analyticOrderNatAt f z₀ : ℕ∞) = analyticOrderAt f z₀` ✓ [simp]\n- `AnalyticAt.analyticOrderAt_eq_natCast (hf : AnalyticAt) : analyticOrderAt f z₀ = analyticOrderNatAt f z₀`? — line 86; wait that can't hold when order = ⊤... toNat ⊤ = 0... Let me look — probably: analyticOrderAt f z₀ = analyticOrderNatAt f z₀ in some conditional form. Actually line 71's `Nat.cast_analyticOrderNatAt (hf : analyticOrderAt f z₀ ≠ ⊤) : ↑(analyticOrderNatAt f z₀) = analyticOrderAt f z₀` is the one I want. ✓\n- `ENat.natCast_le_natCast : (n : ℕ∞) ≤ (m : ℕ∞) ↔ n ≤ m` ✓\n\nOne more check — analyticOrderAt_mul signature says (f * g) with Pi.mul. And the smul version `analyticOrderAt_smul`? For (w−1)^m • h — the factorization uses •. Fine, the factorization comes from the library lemma directly.\n\nNow — note the mul lemma at 497: `analyticOrderAt_mul (hf : AnalyticAt 𝕜 f z₀) (hg : AnalyticAt 𝕜 g z₀) : analyticOrderAt (f * g) z₀ = ...` presumably. For zetaA bridge at ρ: analyticOrderAt zetaA ρ = analyticOrderAt (fun w => (w−1)·ζ w) ρ (congr) = analyticOrderAt (fun w => w−1) ρ + analyticOrderAt ζ ρ (mul) = 0 + _ (analyticOrderAt_eq_zero since ρ − 1 ≠ 0, AnalyticAt ✓). \n\nNow, one design decision: prove `zeta_order_ne_top_of_ne` via zetaA on univ (isPreconnected_univ ✓).\n\n```\nlemma zetaA_analyticOnNhd_univ : AnalyticOnNhd ℂ zetaA Set.univ := fun s _ => by\n  by_cases hs : s = 1\n  · subst hs; exact zetaA_analyticAt_one\n  · exact zetaA_analyticAt_of_ne hs\n\nlemma zeta_order_ne_top_of_ne {ρ : ℂ} (hρ : ρ ≠ 1) : analyticOrderAt riemannZeta ρ ≠ ⊤ := by\n  have hA : analyticOrderAt zetaA ρ ≠ ⊤ := analyticOrderAt_ne_top_of_isPreconnected\n    zetaA_analyticOnNhd_univ isPreconnected_univ (Set.mem_univ 1) (Set.mem_univ ρ) (by\n      rw [zetaA_one]  -- analyticOrderAt zetaA 1, with zetaA 1 = 1\n      ... need: analyticOrderAt zetaA 1 ≠ ⊤: = 0 by (zetaA_analyticAt_one.analyticOrderAt_eq_zero.mpr (by rw[zetaA_one]; norm_num)) then simp)\n  -- bridge\n  have hcong : zetaA =ᶠ[𝓝 ρ] (fun w => (w - 1) * riemannZeta w) := by\n    filter_upwards [eventually_ne_nhds hρ] with w hw using (zetaA_apply hw).symm\n  rw [analyticOrderAt_congr hcong, \n      analyticOrderAt_mul (analyticAt_id.sub analyticAt_const) (analyticAt_riemannZeta hρ)] at hA\n  -- analyticOrderAt (fun w => w - 1) ρ = 0\n  have h0 : analyticOrderAt (fun w : ℂ => w - 1) ρ = 0 :=\n    ((analyticAt_id.sub analyticAt_const).analyticOrderAt_eq_zero).mpr (sub_ne_zero.mpr hρ)\n  rw [h0, zero_add] at hA\n  exact hA\n```\n\nWait — analyticOrderAt_congr direction: `analyticOrderAt_congr (hfg : f =ᶠ[𝓝 z₀] g) : analyticOrderAt f z₀ = analyticOrderAt g z₀` presumably. ✓\n\nAlso need `eventually_ne_nhds` — used in LiResidue ✓ exists.\n\nNow, careful with `analyticOrderAt_mul` — signature at line 497: `theorem analyticOrderAt_mul (hf : AnalyticAt 𝕜 f z₀) (hg : AnalyticAt 𝕜 g z₀) : analyticOrderAt (f * g) z₀ = analyticOrderAt f z₀ + analyticOrderAt g z₀` (presumably). My function is a lambda `fun w => (w−1) * riemannZeta w` — need to rewrite as Pi.mul: `(fun w => (w−1)·ζ w) = (fun w => w−1) * riemannZeta` via funext/Pi.mul_apply — the session-016 notes warn: \"Pi.mul_apply/Pi.add_apply/Pi.sub_apply simp after .mul/.add/.sub\". So: rw [show (fun w : ℂ => (w−1)*riemannZeta w) = (fun w : ℂ => w−1) * riemannZeta from by funext w; simp [Pi.mul_apply]].\n\nOK. Now — one more thing to verify: `HolomorphicOn.rectangleBorderIntegrable'` signature (line 188 of ResidueCalcOnRectangles).","signature":""},{"type":"text","text":"All lemmas confirmed. Let me check the `rectangleBorderIntegrable'` signature and `Rectangle`/`RectangleBorder` helper names, then write the file."},{"type":"tool_use","id":"Bash_24","name":"Bash","input":{"command":"cd \"D:/Python/Quantum/zeta-23-lean\" && sed -n '180,200p' Zeta23/FromPNTPlus/ResidueCalcOnRectangles.lean; echo ---; grep -rn \"theorem rectangle_mem_nhds_iff\\|lemma rectangle_mem_nhds_iff\\|not_mem_rectangleBorder_of_rectangle_mem_nhds\\|rectangleBorder_subset_rectangle\" Zeta23/ --include=\"*.lean\" | head -6","description":"Check rectangle integrability and border helper signatures"},"extra_content":null}]