← Session 22 — ii′-1: liCoeff pairing fix + residue machinery
thinking (7222 chars)
Issues in the new content:
1. **Line 926**: my `rw [show (4:ℝ)^(j+1) * ((m:ℝ)+1)^(j+1) = (4 * ((m:ℝ)+1))^(j+1) by rw [mul_pow]]` — the goal is `(↑m+1)^(k+1) ≤ 4^(j+1)·(2↑m+1)^(j+1)` — the pattern `4^(j+1) * (↑m+1)^(j+1)` — NOT in the goal (the goal has `4^(j+1) · (2↑m+1)^(j+1)`)! I confused myself. The div_le_div_iff₀ produced: 1·B ≤ C·A with A := (2↑m+1)^(j+1), B := (↑m+1)^(j+1), C := 4^(j+1) — so the goal after one_mul: (↑m+1)^(j+1) ≤ 4^(j+1)·(2↑m+1)^(j+1). The show should be: 4^(j+1)·(2↑m+1)^(j+1) = (4·(2↑m+1))^(j+1) via mul_pow ✓:
```lean
rw [show (4 : ℝ) ^ (j + 1) * (2 * (m : ℝ) + 1) ^ (j + 1) =
(4 * (2 * (m : ℝ) + 1)) ^ (j + 1) by rw [mul_pow]]
apply pow_le_pow_left₀ (by positivity : (0 : ℝ) ≤ (m : ℝ) + 1)
ring_nf
linarith [Nat.cast_nonneg (α := ℝ) m]
```
Wait — pow_le_pow_left₀ (ha : 0 ≤ a) (h : a ≤ b) (n) : a^n ≤ b^n — I want (↑m+1)^(j+1) ≤ (4·(2↑m+1))^(j+1) — a := ↑m+1, b := 4·(2↑m+1): need 0 ≤ a ✓ and a ≤ b: ↑m+1 ≤ 4·(2↑m+1) = 8↑m+4 ⟸ 0 ≤ 7↑m+3 ✓ linarith with cast_nonneg ✓. So the `apply pow_le_pow_left₀ (0 ≤ ↑m+1)` leaves the (↑m+1) ≤ 4(2↑m+1) goal — hmm — pow_le_pow_left₀ takes (ha : 0 ≤ a) (h : a ≤ b) (n) — my `apply pow_le_pow_left₀ (by positivity)` then a bullet with ring_nf; linarith — the bullet structure I wrote: `apply pow_le_pow_left₀ (by positivity : (0:ℝ) ≤ 2*↑m+1)` — WAIT — I applied with 0 ≤ 2↑m+1 — that's a := 2↑m+1?? — no — the apply's first explicit arg is ha : 0 ≤ a — a is determined by unification with the goal — after the mul_pow rewrite the goal is (↑m+1)^(j+1) ≤ (4(2↑m+1))^(j+1) — so a := ↑m+1 — the ha arg : 0 ≤ ↑m+1 — I wrote (by positivity : (0:ℝ) ≤ 2*↑m+1) — WRONG a (that's the b's bound). Fix the positivity to (0:ℝ) ≤ ↑m + 1 and then the remaining goal ↑m+1 ≤ 4(2↑m+1) via ring_nf/linarith. Let me fix the whole tail:
```lean
rw [show (4 : ℝ) ^ (j + 1) * (2 * (m : ℝ) + 1) ^ (j + 1) =
(4 * (2 * (m : ℝ) + 1)) ^ (j + 1) by rw [mul_pow]]
apply pow_le_pow_left₀ (by positivity : (0 : ℝ) ≤ (m : ℝ) + 1)
ring_nf
linarith [Nat.cast_nonneg (α := ℝ) m]
```
Hmm — after `apply pow_le_pow_left₀ (0 ≤ ↑m+1)`, the remaining goal is ↑m+1 ≤ 4*(2↑m+1) — ring_nf then linarith? — ring_nf turns 4*(2↑m+1) into 8↑m+4 — then linarith [0 ≤ ↑m]: ↑m+1 ≤ 8↑m+4 ✓. But if ring_nf closes it or changes form... — safer: just `linarith [Nat.cast_nonneg (α := ℝ) m]` directly (no ring_nf — linarith handles the linear arithmetic with the multiplication by constants directly ✓ — 4*(2*↑m+1) is linear in ↑m ✓ linarith can multiply out ✓). Use just linarith.
2. **Line 931**: `rw [hsum.tsum_eq_zero_add] at *` — I wrote `rw [hsum.tsum_eq_zero_add] at *` — the hsum is named hsumm in this lemma — typo (hsum vs hsumm). And `at *` is wrong — I only want it at the goal — and actually the whole `tsum_two_mul_add_one_inv_pow` lemma's ending was left as a sorry placeholder with a broken rewrite. Let me now write the full ending of that lemma properly.
The target: ∑' m : ℕ, (2↑m+1)^(−(j+1)) = ↑(lagariasA (j+1)).
- hsumm.tsum_eq_zero_add : ∑' m, f m = f 0 + ∑' m, f (m+1) with f m := (2↑m+1)^(−(j+1)): f 0 = (2·↑0+1)^(−(j+1)) = 1^(−(j+1)) = 1 ✓ (one_zpow ✓); f (m+1) = (2↑(m+1)+1)^(−(j+1)) = (2↑m+3)^(−(j+1)) ✓ (push_cast: 2(↑m+1)+1 = 2↑m+3 ✓).
- So ∑' = 1 + ∑' m, (2↑m+3)^(−(j+1)).
- Σ_{m≥0} (2↑m+3)^(−(j+1)) = Σ_{m' : {odd ∧ ≥3}} (↑m')^(−(j+1)) via oddGeThreeEquiv + Equiv.tsum_eq:
`Equiv.tsum_eq oddGeThreeEquiv (fun m' => ((m' : ℂ) : ℂ) ^ (-(j:ℤ)-1))`?? — Equiv.tsum_eq (e : α ≃ β) (f : β → M) : ∑' a, f (e a) = ∑' b, f b — with f := fun m' : {m // Odd m ∧ 3 ≤ m} => ((m' : ℂ))^(−(j+1)) — then ∑' a:ℕ, f (e a) = ∑' a, ((↑(2a+3)):ℂ)^(−(j+1)) — hmm — ↑(e a's val) = ↑(2a+3) — as ℂ: ((2*a+3 : ℕ) : ℂ) = 2↑a+3 (push_cast) ✓. So ∑' a, f (e a) = ∑' a, (2↑a+3)^(−(j+1))-ish ✓ and the conclusion ∑' b : subtype, (↑b)^(−(j+1)).
Wait direction: Equiv.tsum_eq e f : ∑' a, f (e a) = ∑' b, f b — I want Σ_{m≥0} g(m) = Σ_{m' : subtype} (g'(m')) with g(m) = (2↑m+3)^{−(j+1)} and g'(m') = (↑m')^(−(j+1)) — g = g' ∘ e: g(m) = g'(e m) ⟺ (2↑m+3)^(−(j+1)) = (↑(2m+3))^(−(j+1)) — push_cast ✓. So:
```lean
have heq : (fun m : ℕ => ((2 : ℂ) * ↑m + 3) ^ (-(j : ℤ) - 1)) =
(fun m' => ((m' : ℂ)) ^ (-(j : ℤ) - 1)) ∘ oddGeThreeEquiv := by
funext m
rw [Function.comp_apply]
-- ↑(oddGeThreeEquiv m's val) = ↑(2m+3) — the subtype val: (oddGeThreeEquiv m).1 = 2m+3 — by rfl of the toFun def ✓
show (((oddGeThreeEquiv m : ℕ) : ℂ)) ^ (-(j : ℤ) - 1) = (2 * ↑m + 3) ^ (-(j : ℤ) - 1)
congr 1
show ((oddGeThreeEquiv m : ℕ) : ℂ) = (2 * (m : ℂ) + 3)
rw [oddGeThreeEquiv] -- unfold the equiv's toFun — (e m).1 = 2*m+3
push_cast
ring
rw [heq] -- hmm — the goal's series function is fun m => (2↑m+3)^... — heq turns it into the composed form
rw [Equiv.tsum_eq oddGeThreeEquiv _] -- ∑' a, (g' ∘ e) a = ∑' b, g' b — direction: Equiv.tsum_eq e f : ∑' i, f (e i) = ∑' i, f i — with f := g' — ∑' a, g'(e a) = ∑' b, g' b — the composed form (g' ∘ e) vs g'(e a) — comp_apply defeq ✓
```
Hmm — Equiv.tsum_eq's exact form/conditions: `Equiv.tsum_eq (e : α ≃ β) (f : β → M) : ∑' a, f (e a) = ∑' b, f b` — I believe it exists and is unconditional for equivs? — or needs Summable on one side: there are `Equiv.summable_iff (e) : Summable (f ∘ e) ↔ Summable f` and `Equiv.tsum_eq` — hmm — actually for tsum_eq I think it needs the summable or it's `Equiv.tsum_eq (e) (f) : ∑' i, f (e i) = ∑' i, f i` — unconditional? — hmm — `Equiv.tsum_eq` — from the JacobiTheta usage `← Equiv.tsum_eq (Equiv.neg ℤ)` — that usage rewrites — so it exists as an unconditional rewrite ✓ (neg-equiv — unconditional there). For general equivs, `Equiv.tsum_eq`? — hmm — might need T2Space etc. ℂ ✓. OK.
- Then: 1 + ∑' subtype (↑m')^(−(j+1)) = ↑(lagariasA (j+1)): lagariasA (j+1) = if j+1 = 1 then lagariasA1 else 1 + ∑' m : subtype, (1/(m:ℝ))^(j+1) — j+1 ≥ 2 ⟹ ≠ 1 — if_neg — so ↑(lagariasA (j+1)) = ↑(1 + ∑' subtype (1/↑m)^(j+1)) — push_cast: 1 + ↑(∑' subtype (1/↑m)^(j+1)) — then the cast-of-tsum: ↑(∑' m : subtype, (1/(↑m:ℝ))^(j+1)) = ∑' m : subtype, ↑((1/↑m)^(j+1)) = ∑' m : subtype, (↑m)^(−(j+1)):ℂ — via ofRealCLM.map_tsum (summable_odd_tail_inv_pow j hj) + per-term push_cast + zpow_neg_natCast... — per-term: ↑((1/(↑m:ℝ))^(j+1)) = 1/(↑(↑m:ℝ):ℂ)^(j+1) [push_cast] = (↑m)^(−(j+1):ℤ) [zpow back] — the (↑m:ℝ) then :ℂ — the double cast — the subtype m's val — (↑(m:ℕ):ℝ):ℂ = (↑m : ℂ) directly (cast commutes) ✓.
So the full chain. The map_tsum with ofRealCLM — the ∑'[L] filter business from Module.lean:134 — the plain ∑' — the filter L — presumably ⊤/universal default ✓.
This is another chunk. Let me write the ending of tsum_two_mul_add_one_inv_pow carefully. Also — wait — I should double check `oddSlice_summable`'s exact form: from LiSwaps: `oddSlice_summable (j : ℕ) (hj : 2 ≤ j) : Summable (fun m : {m : ℕ // Odd m ∧ 3 ≤ m} => (1 / (m : ℝ)) ^ j)` — so summable_odd_tail_inv_pow is EXACTLY oddSlice_summable (j+1) (by omega : 2 ≤ j+1) — my wrapper with the congr is unnecessary — the forms: oddSlice_summable gives (1/↑m)^(j+1) — my wrapper states (1/((m:ℝ):ℝ))^(j+1) — pointless double cast — just use oddSlice_summable directly downstream. Drop summable_odd_tail_inv_pow, use oddSlice_summable (j+1) (by omega).
Let me write the ending.
Fixing the mul_pow target and writing the full reindexing ending.
tool: Edit
input
{
"file_path": "D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\NguyenRH1\\LiDigamma.lean",
"old_string": " rw [show (4 : \u211d) ^ (j + 1) * ((m : \u211d) + 1) ^ (j + 1) =\n (4 * ((m : \u211d) + 1)) ^ (j + 1) by rw [mul_pow]]\n apply pow_le_pow_left\u2080 (by positivity : (0 : \u211d) \u2264 2 * (m : \u211d) + 1)\n ring_nf\n linarith [Nat.cast_nonneg (\u03b1 := \u211d) m]\n rw [hsum.tsum_eq_zero_add] at *\n sorry",
"new_string": " rw [show (4 : \u211d) ^ (j + 1) * (2 * (m : \u211d) + 1) ^ (j + 1) =\n (4 * (2 * (m : \u211d) + 1)) ^ (j + 1) by rw [mul_pow]]\n apply pow_le_pow_left\u2080 (by positivity : (0 : \u211d) \u2264 (m : \u211d) + 1)\n linarith [Nat.cast_nonneg (\u03b1 := \u211d) m]\n rw [hsumm.tsum_eq_zero_add]\n have hf0 : ((2 : \u2102) * ((0 : \u2115) : \u2102) + 1) ^ (-(j : \u2124) - 1) = 1 := by simp\n rw [hf0]\n -- the tail: \u03a3_{m\u22650} (2\u2191m+3)^{-(j+1)} = \u03a3_{m' odd \u2265 3} (\u2191m')^{-(j+1)}\n have heq2 : \u2200 m : \u2115, ((2 : \u2102) * \u2191(m + 1) + 1) ^ (-(j : \u2124) - 1) =\n ((2 : \u2102) * \u2191m + 3) ^ (-(j : \u2124) - 1) := fun m => by push_cast; ring_nf\n rw [tsum_congr heq2]\n have heq3 : (fun m : \u2115 => ((2 : \u2102) * \u2191m + 3) ^ (-(j : \u2124) - 1)) =\n (fun m' : {m : \u2115 // Odd m \u2227 3 \u2264 m} => (((m' : \u2115) : \u2102)) ^ (-(j : \u2124) - 1)) \u2218 oddGeThreeEquiv := by\n funext m\n rw [Function.comp_apply]\n show (((oddGeThreeEquiv m : \u2115) : \u2102)) ^ (-(j : \u2124) - 1) = ((2 : \u2102) * \u2191m + 3) ^ (-(j : \u2124) - 1)\n congr 1\n show ((oddGeThreeEquiv m : \u2115) : \u2102) = (2 : \u2102) * \u2191m + 3\n rw [oddGeThreeEquiv]\n push_cast\n ring\n rw [heq3]\n rw [Equiv.tsum_eq oddGeThreeEquiv]\n -- now: 1 + \u03a3_{m' odd \u2265 3} (\u2191m')^{-(j+1)} = \u2191(lagariasA (j+1))\n have hj1 : j + 1 \u2260 1 := by omega\n rw [lagariasA, if_neg hj1]\n push_cast\n congr 1\n have hcast : (\u2191(\u2211' m : {m : \u2115 // Odd m \u2227 3 \u2264 m}, (1 / (m : \u211d)) ^ (j + 1)) : \u2102) =\n \u2211' m : {m : \u2115 // Odd m \u2227 3 \u2264 m}, (((m : \u2115) : \u2102)) ^ (-(j : \u2124) - 1) := by\n have h2 := Complex.ofRealCLM.map_tsum (oddSlice_summable (j + 1) (by omega))\n rw [Complex.ofRealCLM_apply] at h2\n rw [h2]\n apply tsum_congr\n intro m\n rw [Complex.ofRealCLM_apply]\n push_cast\n rw [\u2190 one_div]\n rw [\u2190 zpow_neg_natCast]\n ring_nf\n rw [hcast]"
}
raw content_json (database row)
[{"type":"thinking","thinking":"Issues in the new content:\n\n1. **Line 926**: my `rw [show (4:ℝ)^(j+1) * ((m:ℝ)+1)^(j+1) = (4 * ((m:ℝ)+1))^(j+1) by rw [mul_pow]]` — the goal is `(↑m+1)^(k+1) ≤ 4^(j+1)·(2↑m+1)^(j+1)` — the pattern `4^(j+1) * (↑m+1)^(j+1)` — NOT in the goal (the goal has `4^(j+1) · (2↑m+1)^(j+1)`)! I confused myself. The div_le_div_iff₀ produced: 1·B ≤ C·A with A := (2↑m+1)^(j+1), B := (↑m+1)^(j+1), C := 4^(j+1) — so the goal after one_mul: (↑m+1)^(j+1) ≤ 4^(j+1)·(2↑m+1)^(j+1). The show should be: 4^(j+1)·(2↑m+1)^(j+1) = (4·(2↑m+1))^(j+1) via mul_pow ✓:\n```lean\n rw [show (4 : ℝ) ^ (j + 1) * (2 * (m : ℝ) + 1) ^ (j + 1) =\n (4 * (2 * (m : ℝ) + 1)) ^ (j + 1) by rw [mul_pow]]\n apply pow_le_pow_left₀ (by positivity : (0 : ℝ) ≤ (m : ℝ) + 1)\n ring_nf\n linarith [Nat.cast_nonneg (α := ℝ) m]\n```\nWait — pow_le_pow_left₀ (ha : 0 ≤ a) (h : a ≤ b) (n) : a^n ≤ b^n — I want (↑m+1)^(j+1) ≤ (4·(2↑m+1))^(j+1) — a := ↑m+1, b := 4·(2↑m+1): need 0 ≤ a ✓ and a ≤ b: ↑m+1 ≤ 4·(2↑m+1) = 8↑m+4 ⟸ 0 ≤ 7↑m+3 ✓ linarith with cast_nonneg ✓. So the `apply pow_le_pow_left₀ (0 ≤ ↑m+1)` leaves the (↑m+1) ≤ 4(2↑m+1) goal — hmm — pow_le_pow_left₀ takes (ha : 0 ≤ a) (h : a ≤ b) (n) — my `apply pow_le_pow_left₀ (by positivity)` then a bullet with ring_nf; linarith — the bullet structure I wrote: `apply pow_le_pow_left₀ (by positivity : (0:ℝ) ≤ 2*↑m+1)` — WAIT — I applied with 0 ≤ 2↑m+1 — that's a := 2↑m+1?? — no — the apply's first explicit arg is ha : 0 ≤ a — a is determined by unification with the goal — after the mul_pow rewrite the goal is (↑m+1)^(j+1) ≤ (4(2↑m+1))^(j+1) — so a := ↑m+1 — the ha arg : 0 ≤ ↑m+1 — I wrote (by positivity : (0:ℝ) ≤ 2*↑m+1) — WRONG a (that's the b's bound). Fix the positivity to (0:ℝ) ≤ ↑m + 1 and then the remaining goal ↑m+1 ≤ 4(2↑m+1) via ring_nf/linarith. Let me fix the whole tail:\n```lean\n rw [show (4 : ℝ) ^ (j + 1) * (2 * (m : ℝ) + 1) ^ (j + 1) =\n (4 * (2 * (m : ℝ) + 1)) ^ (j + 1) by rw [mul_pow]]\n apply pow_le_pow_left₀ (by positivity : (0 : ℝ) ≤ (m : ℝ) + 1)\n ring_nf\n linarith [Nat.cast_nonneg (α := ℝ) m]\n```\nHmm — after `apply pow_le_pow_left₀ (0 ≤ ↑m+1)`, the remaining goal is ↑m+1 ≤ 4*(2↑m+1) — ring_nf then linarith? — ring_nf turns 4*(2↑m+1) into 8↑m+4 — then linarith [0 ≤ ↑m]: ↑m+1 ≤ 8↑m+4 ✓. But if ring_nf closes it or changes form... — safer: just `linarith [Nat.cast_nonneg (α := ℝ) m]` directly (no ring_nf — linarith handles the linear arithmetic with the multiplication by constants directly ✓ — 4*(2*↑m+1) is linear in ↑m ✓ linarith can multiply out ✓). Use just linarith.\n\n2. **Line 931**: `rw [hsum.tsum_eq_zero_add] at *` — I wrote `rw [hsum.tsum_eq_zero_add] at *` — the hsum is named hsumm in this lemma — typo (hsum vs hsumm). And `at *` is wrong — I only want it at the goal — and actually the whole `tsum_two_mul_add_one_inv_pow` lemma's ending was left as a sorry placeholder with a broken rewrite. Let me now write the full ending of that lemma properly.\n\nThe target: ∑' m : ℕ, (2↑m+1)^(−(j+1)) = ↑(lagariasA (j+1)).\n- hsumm.tsum_eq_zero_add : ∑' m, f m = f 0 + ∑' m, f (m+1) with f m := (2↑m+1)^(−(j+1)): f 0 = (2·↑0+1)^(−(j+1)) = 1^(−(j+1)) = 1 ✓ (one_zpow ✓); f (m+1) = (2↑(m+1)+1)^(−(j+1)) = (2↑m+3)^(−(j+1)) ✓ (push_cast: 2(↑m+1)+1 = 2↑m+3 ✓).\n- So ∑' = 1 + ∑' m, (2↑m+3)^(−(j+1)).\n- Σ_{m≥0} (2↑m+3)^(−(j+1)) = Σ_{m' : {odd ∧ ≥3}} (↑m')^(−(j+1)) via oddGeThreeEquiv + Equiv.tsum_eq:\n `Equiv.tsum_eq oddGeThreeEquiv (fun m' => ((m' : ℂ) : ℂ) ^ (-(j:ℤ)-1))`?? — Equiv.tsum_eq (e : α ≃ β) (f : β → M) : ∑' a, f (e a) = ∑' b, f b — with f := fun m' : {m // Odd m ∧ 3 ≤ m} => ((m' : ℂ))^(−(j+1)) — then ∑' a:ℕ, f (e a) = ∑' a, ((↑(2a+3)):ℂ)^(−(j+1)) — hmm — ↑(e a's val) = ↑(2a+3) — as ℂ: ((2*a+3 : ℕ) : ℂ) = 2↑a+3 (push_cast) ✓. So ∑' a, f (e a) = ∑' a, (2↑a+3)^(−(j+1))-ish ✓ and the conclusion ∑' b : subtype, (↑b)^(−(j+1)).\n Wait direction: Equiv.tsum_eq e f : ∑' a, f (e a) = ∑' b, f b — I want Σ_{m≥0} g(m) = Σ_{m' : subtype} (g'(m')) with g(m) = (2↑m+3)^{−(j+1)} and g'(m') = (↑m')^(−(j+1)) — g = g' ∘ e: g(m) = g'(e m) ⟺ (2↑m+3)^(−(j+1)) = (↑(2m+3))^(−(j+1)) — push_cast ✓. So:\n ```lean\n have heq : (fun m : ℕ => ((2 : ℂ) * ↑m + 3) ^ (-(j : ℤ) - 1)) =\n (fun m' => ((m' : ℂ)) ^ (-(j : ℤ) - 1)) ∘ oddGeThreeEquiv := by\n funext m\n rw [Function.comp_apply]\n -- ↑(oddGeThreeEquiv m's val) = ↑(2m+3) — the subtype val: (oddGeThreeEquiv m).1 = 2m+3 — by rfl of the toFun def ✓\n show (((oddGeThreeEquiv m : ℕ) : ℂ)) ^ (-(j : ℤ) - 1) = (2 * ↑m + 3) ^ (-(j : ℤ) - 1)\n congr 1\n show ((oddGeThreeEquiv m : ℕ) : ℂ) = (2 * (m : ℂ) + 3)\n rw [oddGeThreeEquiv] -- unfold the equiv's toFun — (e m).1 = 2*m+3\n push_cast\n ring\n rw [heq] -- hmm — the goal's series function is fun m => (2↑m+3)^... — heq turns it into the composed form\n rw [Equiv.tsum_eq oddGeThreeEquiv _] -- ∑' a, (g' ∘ e) a = ∑' b, g' b — direction: Equiv.tsum_eq e f : ∑' i, f (e i) = ∑' i, f i — with f := g' — ∑' a, g'(e a) = ∑' b, g' b — the composed form (g' ∘ e) vs g'(e a) — comp_apply defeq ✓\n ```\n Hmm — Equiv.tsum_eq's exact form/conditions: `Equiv.tsum_eq (e : α ≃ β) (f : β → M) : ∑' a, f (e a) = ∑' b, f b` — I believe it exists and is unconditional for equivs? — or needs Summable on one side: there are `Equiv.summable_iff (e) : Summable (f ∘ e) ↔ Summable f` and `Equiv.tsum_eq` — hmm — actually for tsum_eq I think it needs the summable or it's `Equiv.tsum_eq (e) (f) : ∑' i, f (e i) = ∑' i, f i` — unconditional? — hmm — `Equiv.tsum_eq` — from the JacobiTheta usage `← Equiv.tsum_eq (Equiv.neg ℤ)` — that usage rewrites — so it exists as an unconditional rewrite ✓ (neg-equiv — unconditional there). For general equivs, `Equiv.tsum_eq`? — hmm — might need T2Space etc. ℂ ✓. OK.\n- Then: 1 + ∑' subtype (↑m')^(−(j+1)) = ↑(lagariasA (j+1)): lagariasA (j+1) = if j+1 = 1 then lagariasA1 else 1 + ∑' m : subtype, (1/(m:ℝ))^(j+1) — j+1 ≥ 2 ⟹ ≠ 1 — if_neg — so ↑(lagariasA (j+1)) = ↑(1 + ∑' subtype (1/↑m)^(j+1)) — push_cast: 1 + ↑(∑' subtype (1/↑m)^(j+1)) — then the cast-of-tsum: ↑(∑' m : subtype, (1/(↑m:ℝ))^(j+1)) = ∑' m : subtype, ↑((1/↑m)^(j+1)) = ∑' m : subtype, (↑m)^(−(j+1)):ℂ — via ofRealCLM.map_tsum (summable_odd_tail_inv_pow j hj) + per-term push_cast + zpow_neg_natCast... — per-term: ↑((1/(↑m:ℝ))^(j+1)) = 1/(↑(↑m:ℝ):ℂ)^(j+1) [push_cast] = (↑m)^(−(j+1):ℤ) [zpow back] — the (↑m:ℝ) then :ℂ — the double cast — the subtype m's val — (↑(m:ℕ):ℝ):ℂ = (↑m : ℂ) directly (cast commutes) ✓.\n\nSo the full chain. The map_tsum with ofRealCLM — the ∑'[L] filter business from Module.lean:134 — the plain ∑' — the filter L — presumably ⊤/universal default ✓.\n\nThis is another chunk. Let me write the ending of tsum_two_mul_add_one_inv_pow carefully. Also — wait — I should double check `oddSlice_summable`'s exact form: from LiSwaps: `oddSlice_summable (j : ℕ) (hj : 2 ≤ j) : Summable (fun m : {m : ℕ // Odd m ∧ 3 ≤ m} => (1 / (m : ℝ)) ^ j)` — so summable_odd_tail_inv_pow is EXACTLY oddSlice_summable (j+1) (by omega : 2 ≤ j+1) — my wrapper with the congr is unnecessary — the forms: oddSlice_summable gives (1/↑m)^(j+1) — my wrapper states (1/((m:ℝ):ℝ))^(j+1) — pointless double cast — just use oddSlice_summable directly downstream. Drop summable_odd_tail_inv_pow, use oddSlice_summable (j+1) (by omega).\n\nLet me write the ending.","signature":""},{"type":"text","text":"Fixing the mul_pow target and writing the full reindexing ending."},{"type":"tool_use","id":"Edit_502","name":"Edit","input":{"file_path":"D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\NguyenRH1\\LiDigamma.lean","old_string":" rw [show (4 : ℝ) ^ (j + 1) * ((m : ℝ) + 1) ^ (j + 1) =\n (4 * ((m : ℝ) + 1)) ^ (j + 1) by rw [mul_pow]]\n apply pow_le_pow_left₀ (by positivity : (0 : ℝ) ≤ 2 * (m : ℝ) + 1)\n ring_nf\n linarith [Nat.cast_nonneg (α := ℝ) m]\n rw [hsum.tsum_eq_zero_add] at *\n sorry","new_string":" rw [show (4 : ℝ) ^ (j + 1) * (2 * (m : ℝ) + 1) ^ (j + 1) =\n (4 * (2 * (m : ℝ) + 1)) ^ (j + 1) by rw [mul_pow]]\n apply pow_le_pow_left₀ (by positivity : (0 : ℝ) ≤ (m : ℝ) + 1)\n linarith [Nat.cast_nonneg (α := ℝ) m]\n rw [hsumm.tsum_eq_zero_add]\n have hf0 : ((2 : ℂ) * ((0 : ℕ) : ℂ) + 1) ^ (-(j : ℤ) - 1) = 1 := by simp\n rw [hf0]\n -- the tail: Σ_{m≥0} (2↑m+3)^{-(j+1)} = Σ_{m' odd ≥ 3} (↑m')^{-(j+1)}\n have heq2 : ∀ m : ℕ, ((2 : ℂ) * ↑(m + 1) + 1) ^ (-(j : ℤ) - 1) =\n ((2 : ℂ) * ↑m + 3) ^ (-(j : ℤ) - 1) := fun m => by push_cast; ring_nf\n rw [tsum_congr heq2]\n have heq3 : (fun m : ℕ => ((2 : ℂ) * ↑m + 3) ^ (-(j : ℤ) - 1)) =\n (fun m' : {m : ℕ // Odd m ∧ 3 ≤ m} => (((m' : ℕ) : ℂ)) ^ (-(j : ℤ) - 1)) ∘ oddGeThreeEquiv := by\n funext m\n rw [Function.comp_apply]\n show (((oddGeThreeEquiv m : ℕ) : ℂ)) ^ (-(j : ℤ) - 1) = ((2 : ℂ) * ↑m + 3) ^ (-(j : ℤ) - 1)\n congr 1\n show ((oddGeThreeEquiv m : ℕ) : ℂ) = (2 : ℂ) * ↑m + 3\n rw [oddGeThreeEquiv]\n push_cast\n ring\n rw [heq3]\n rw [Equiv.tsum_eq oddGeThreeEquiv]\n -- now: 1 + Σ_{m' odd ≥ 3} (↑m')^{-(j+1)} = ↑(lagariasA (j+1))\n have hj1 : j + 1 ≠ 1 := by omega\n rw [lagariasA, if_neg hj1]\n push_cast\n congr 1\n have hcast : (↑(∑' m : {m : ℕ // Odd m ∧ 3 ≤ m}, (1 / (m : ℝ)) ^ (j + 1)) : ℂ) =\n ∑' m : {m : ℕ // Odd m ∧ 3 ≤ m}, (((m : ℕ) : ℂ)) ^ (-(j : ℤ) - 1) := by\n have h2 := Complex.ofRealCLM.map_tsum (oddSlice_summable (j + 1) (by omega))\n rw [Complex.ofRealCLM_apply] at h2\n rw [h2]\n apply tsum_congr\n intro m\n rw [Complex.ofRealCLM_apply]\n push_cast\n rw [← one_div]\n rw [← zpow_neg_natCast]\n ring_nf\n rw [hcast]"},"extra_content":null}]