← Session 31 — ii′-5f: tight R-bound 10.5/48 (piece 3 + pinch)
thinking (6830 chars)
Two issues: (1) I need to re-read the file end (it changed since). (2) I left `sorry` placeholders in farGLeftMaj_series_le's heval — I was mid-thought: the heval should be an INEQUALITY (≤), not equality, since the bricks are ≤. Let me restructure farGLeftMaj_series_le's ending:
The majorant tsum: ∑' ℓ, 4.5·(S0-term + S1-term + S2-term) = 4.5·[c0·S0-tsum + c1·S1-tsum + c2·S2-tsum] via tsum_mul_left + tsum_add (EQUALITY), then ≤ 4.5·[c0·(1/23) + c1·0.1687 + c2·0.0621] via the brick bounds (INEQUALITY with nonneg coeffs). So:
```
have heval_le : (∑' ℓ : ℕ,
4.5 * (A + B + C))
≤ 4.5 * ((0.433 * 0.1942 + 0.886 * 0.0736 + 2.9) * (1 / 23)
+ 0.433 * 0.1687 + 0.886 * 0.0621) := by
rw [tsum_mul_left]
apply mul_le_mul_of_nonneg_left _ (by norm_num : (0:ℝ) ≤ 4.5)
rw [Summable.tsum_add (h1.mul_left _ |>.add (h2.mul_left _)) (h3.mul_left _)]
rw [Summable.tsum_add (h1.mul_left _) (h2.mul_left _)]
rw [tsum_mul_left, tsum_mul_left, tsum_mul_left]
have hle1 := mul_le_mul_of_nonneg_left hA0 (by positivity : (0:ℝ) ≤ 0.433*0.1942+0.886*0.0736+2.9)
have hle2 := mul_le_mul_of_nonneg_left hA1 (by positivity : (0:ℝ) ≤ 0.433)
have hle3 := mul_le_mul_of_nonneg_left hA2 (by positivity : (0:ℝ) ≤ 0.886)
linarith [hle1, hle2, hle3]
```
Wait — but the goal after tsum_mul_left: 4.5·(tsum of A+B+C) ≤ 4.5·(combo): mul_le_mul_of_nonneg_left leaves (tsum of A+B+C) ≤ combo: then the tsum_add rewrites turn it into c0·S0+c1·S1+c2·S2 ≤ combo — via the hle's + linarith ✓.
Then the final assembly of farGLeftMaj_series_le:
```
calc (∑' ℓ : ℕ, farGLeftMaj ℓ)
= (∑ ℓ ∈ Finset.range 14, farGLeftMaj ℓ) + ∑' ℓ : ℕ, farGLeftMaj (ℓ + 14) := hsplit
_ = 0 + ∑' ℓ : ℕ, farGLeftMaj (ℓ + 14) := by rw [hzero]
_ ≤ 4.5 * ((0.433*0.1942+0.886*0.0736+2.9) * (1/23) + 0.433*0.1687 + 0.886*0.0621) := heval_le-trans-hle
_ = 4.5 * (0.433 * (0.1942 * (1/23) + 0.1687) + 0.886 * (0.0736 * (1/23) + 0.0621) + 2.9 * (1/23)) := by ring
```
with hle : ∑' farGLeftMaj(ℓ+14) ≤ ∑' majorant-form (Summable.tsum_le_tsum hpt farGLeftMaj_shift_summable hsumm_shift) then trans heval_le.
Also — I notice farGLeftMaj_series_le's own hpt/hsumm_shift/heval share the same majorant-form summability proof THREE times (in farGLeftMaj_shift_summable, hsumm_shift, heval). That's heavy duplication but compiles-fine.
Also there's a bug in the earlier farGLeftMaj_shift_summable: the calc's second-to-last step has a redundant `le_rfl` self-step and the last calc-form `≤ ... := le_rfl` — the `_ ≤ same := le_rfl` step is pointless but harmless... actually looking at it: the calc in farGLeftMaj_shift_summable ends:
```
_ = (0.433*... ) * (1/...) + (...) + (...) := by rw [h9]; field_simp; ring
_ ≤ same := le_rfl
```
the last step is identity — harmless but let me drop it. Also the hmain/h2/h4/hcast haves in that proof may be unused/messy — the proof was drafted hastily with unused haves (hmain, h2, h4, hcast, h9 used ✓, h2/h4 nonnegs used in the of_norm_bounded? — the norm_ascription used h2/h4? no — I used positivity inline). Unused haves cause linter warnings. Let me rewrite §17's farGLeftMaj_shift_summable cleanly as part of the rewrite — actually, let me rewrite the whole §17 ending (from farGLeftMaj onward) more carefully in the replacement.
Also — the hA2 usage: tail14_loglog_div_add_sq_le gives ≤ 0.0621 ✓.
Let me also double check the of_norm_bounded norm-ascription patterns in the shift_summable: `rw [Real.norm_eq_abs, abs_of_nonneg (by positivity : (0:ℝ) ≤ 4.5 * C0hat (...) / (10 + ...) ^ 2)]` — positivity on 4.5·C0hat/(...)² — C0hat's nonnegativity is NOT syntactic — positivity fails! Need the two_le_C0hat argument: 0 ≤ C0hat(anything): two_le_C0hat needs 1 ≤ arg: C0hat((ℓ+14)+1) with ℓ+15 ≥ 1 ✓:
```
have hnn : (0 : ℝ) ≤ C0hat ((ℓ + 14 : ℝ) + 1) := by
have h := two_le_C0hat (by
have h2 : (1 : ℝ) ≤ ((ℓ + 14 : ℕ) : ℝ) + 1 := by
have h3 : (0 : ℝ) ≤ (ℓ : ℝ) := Nat.cast_nonneg ℓ
rw [show ((ℓ + 14 : ℕ) : ℝ) = (ℓ : ℝ) + 14 from by push_cast; ring]
linarith
exact h2 : (1 : ℝ) ≤ (ℓ + 14 : ℝ) + 1)
linarith
```
hmm — two_le_C0hat (ht : 1 ≤ t) : 2 ≤ C0hat t — the arg: ((ℓ+14:ℕ):ℝ)+1?? C0hat_add_one_le_of_fourteen_le's LHS is C0hat ((j:ℝ)+1) with j = ℓ+14: C0hat ((ℓ+14:ℝ)+1) — two_le_C0hat with t = (ℓ+14:ℝ)+1 ≥ 1 ✓:
```
have hnn : (0 : ℝ) ≤ C0hat ((ℓ + 14 : ℝ) + 1) := by
have h1 : (1 : ℝ) ≤ (ℓ + 14 : ℝ) + 1 := by
have h2 : (0 : ℝ) ≤ (ℓ : ℝ) := Nat.cast_nonneg ℓ
linarith
have h3 := two_le_C0hat h1
linarith
```
Wait — (ℓ+14 : ℝ) — is that ↑ℓ + 14 or ↑(ℓ+14)? In the lemma C0hat_add_one_le_of_fourteen_le (j := ℓ+14): the term is C0hat ((↑(ℓ+14)) + 1) with ↑(ℓ+14) : ℝ — and two_le_C0hat's t = ↑(ℓ+14)+1 ✓ fine, (1:ℝ) ≤ ↑(ℓ+14)+1 ✓.
OK — given all these issues, let me rewrite the whole farGLeftMaj section cleanly. Actually the cleanest path: rewrite from "/-- The left-tail majorant series (if-form on ℕ). -/" to the end with a cleaner, single-pass structure:
```
def farGLeftMaj : ℕ → ℝ := fun ℓ =>
if 14 ≤ ℓ then 4.5 * C0hat ((ℓ : ℝ) + 1) / (10 + (ℓ : ℝ)) ^ 2 else 0
/-- the explicit shifted summand families and their summability -/ (reuse: tail14_inv_add_sq_summable needs to exist — I used inline h1's; let me create standalone:)
lemma tail14_inv_add_sq_summable : Summable (fun j : ℕ => (1 : ℝ) / (((j : ℝ) + 14) + 10) ^ 2)
lemma tail14_loglog_div_add_sq_summable : Summable (fun j : ℕ => Real.log (Real.log ((j : ℝ) + 14)) / (((j : ℝ) + 14) + 10) ^ 2)
```
The first: from antitoneOn_one_div_add_sq.summable_of_integrableOn_Ioi + shift (the inline h1 pattern). The second: the inline hsumm from tail14_loglog_div_add_sq_le — extract as standalone (of_norm_bounded by (1/e)·log-family via log_log_le_div_exp ✓ as I wrote).
Then:
```
/-- pointwise majorant bound for the shifted farGLeftMaj -/
lemma farGLeftMaj_shift_le (ℓ : ℕ) :
farGLeftMaj (ℓ + 14)
≤ 4.5 * ((0.433 * 0.1942 + 0.886 * 0.0736 + 2.9) * (1 / (((ℓ : ℝ) + 14) + 10) ^ 2)
+ (0.433 * Real.log ((ℓ : ℝ) + 14) / (((ℓ : ℝ) + 14) + 10) ^ 2)
+ (0.886 * Real.log (Real.log ((ℓ : ℝ) + 14)) / (((ℓ : ℝ) + 14) + 10) ^ 2))
lemma farGLeftMaj_shift_summable : Summable (fun ℓ : ℕ => farGLeftMaj (ℓ + 14)) := by
apply Summable.of_norm_bounded <the 4.5-scaled combo summable>
intro ℓ
rw [Real.norm_eq_abs, abs_of_nonneg <nonneg>]
exact farGLeftMaj_shift_le ℓ
```
with the nonneg: farGLeftMaj (ℓ+14) = 4.5·C0hat/100... — nonneg via two_le_C0hat ✓.
And the combo summable: 4.5·(c0·A + c1·B + c2·C) — from the three standalone summables via .mul_left/.add ✓.
Then farGLeftMaj_series_le as the cleaned-up version.
Let me rewrite the whole section from `/-- The left-tail majorant series (if-form on ℕ). -/` onward. First re-read the file end to anchor the edit.
The §17 ending needs restructuring (sorry placeholders + duplicated summability proofs). Let me re-read the tail and rewrite the farGLeftMaj section cleanly.
tool: Bash
input
{
"command": "cd D:/Python/Quantum/research/lean/NguyenRH1 && grep -n \"left-tail majorant series\" NguyenRH1/LiTightR.lean && tail -3 NguyenRH1/LiTightR.lean",
"description": "Locate the farGLeftMaj section start"
}
raw content_json (database row)
[{"type":"thinking","thinking":"Two issues: (1) I need to re-read the file end (it changed since). (2) I left `sorry` placeholders in farGLeftMaj_series_le's heval — I was mid-thought: the heval should be an INEQUALITY (≤), not equality, since the bricks are ≤. Let me restructure farGLeftMaj_series_le's ending:\n\nThe majorant tsum: ∑' ℓ, 4.5·(S0-term + S1-term + S2-term) = 4.5·[c0·S0-tsum + c1·S1-tsum + c2·S2-tsum] via tsum_mul_left + tsum_add (EQUALITY), then ≤ 4.5·[c0·(1/23) + c1·0.1687 + c2·0.0621] via the brick bounds (INEQUALITY with nonneg coeffs). So:\n\n```\n have heval_le : (∑' ℓ : ℕ,\n 4.5 * (A + B + C))\n ≤ 4.5 * ((0.433 * 0.1942 + 0.886 * 0.0736 + 2.9) * (1 / 23)\n + 0.433 * 0.1687 + 0.886 * 0.0621) := by\n rw [tsum_mul_left]\n apply mul_le_mul_of_nonneg_left _ (by norm_num : (0:ℝ) ≤ 4.5)\n rw [Summable.tsum_add (h1.mul_left _ |>.add (h2.mul_left _)) (h3.mul_left _)]\n rw [Summable.tsum_add (h1.mul_left _) (h2.mul_left _)]\n rw [tsum_mul_left, tsum_mul_left, tsum_mul_left]\n have hle1 := mul_le_mul_of_nonneg_left hA0 (by positivity : (0:ℝ) ≤ 0.433*0.1942+0.886*0.0736+2.9)\n have hle2 := mul_le_mul_of_nonneg_left hA1 (by positivity : (0:ℝ) ≤ 0.433)\n have hle3 := mul_le_mul_of_nonneg_left hA2 (by positivity : (0:ℝ) ≤ 0.886)\n linarith [hle1, hle2, hle3]\n```\nWait — but the goal after tsum_mul_left: 4.5·(tsum of A+B+C) ≤ 4.5·(combo): mul_le_mul_of_nonneg_left leaves (tsum of A+B+C) ≤ combo: then the tsum_add rewrites turn it into c0·S0+c1·S1+c2·S2 ≤ combo — via the hle's + linarith ✓.\n\nThen the final assembly of farGLeftMaj_series_le:\n```\n calc (∑' ℓ : ℕ, farGLeftMaj ℓ)\n = (∑ ℓ ∈ Finset.range 14, farGLeftMaj ℓ) + ∑' ℓ : ℕ, farGLeftMaj (ℓ + 14) := hsplit\n _ = 0 + ∑' ℓ : ℕ, farGLeftMaj (ℓ + 14) := by rw [hzero]\n _ ≤ 4.5 * ((0.433*0.1942+0.886*0.0736+2.9) * (1/23) + 0.433*0.1687 + 0.886*0.0621) := heval_le-trans-hle\n _ = 4.5 * (0.433 * (0.1942 * (1/23) + 0.1687) + 0.886 * (0.0736 * (1/23) + 0.0621) + 2.9 * (1/23)) := by ring\n```\nwith hle : ∑' farGLeftMaj(ℓ+14) ≤ ∑' majorant-form (Summable.tsum_le_tsum hpt farGLeftMaj_shift_summable hsumm_shift) then trans heval_le.\n\nAlso — I notice farGLeftMaj_series_le's own hpt/hsumm_shift/heval share the same majorant-form summability proof THREE times (in farGLeftMaj_shift_summable, hsumm_shift, heval). That's heavy duplication but compiles-fine.\n\nAlso there's a bug in the earlier farGLeftMaj_shift_summable: the calc's second-to-last step has a redundant `le_rfl` self-step and the last calc-form `≤ ... := le_rfl` — the `_ ≤ same := le_rfl` step is pointless but harmless... actually looking at it: the calc in farGLeftMaj_shift_summable ends:\n```\n _ = (0.433*... ) * (1/...) + (...) + (...) := by rw [h9]; field_simp; ring\n _ ≤ same := le_rfl\n```\nthe last step is identity — harmless but let me drop it. Also the hmain/h2/h4/hcast haves in that proof may be unused/messy — the proof was drafted hastily with unused haves (hmain, h2, h4, hcast, h9 used ✓, h2/h4 nonnegs used in the of_norm_bounded? — the norm_ascription used h2/h4? no — I used positivity inline). Unused haves cause linter warnings. Let me rewrite §17's farGLeftMaj_shift_summable cleanly as part of the rewrite — actually, let me rewrite the whole §17 ending (from farGLeftMaj onward) more carefully in the replacement.\n\nAlso — the hA2 usage: tail14_loglog_div_add_sq_le gives ≤ 0.0621 ✓.\n\nLet me also double check the of_norm_bounded norm-ascription patterns in the shift_summable: `rw [Real.norm_eq_abs, abs_of_nonneg (by positivity : (0:ℝ) ≤ 4.5 * C0hat (...) / (10 + ...) ^ 2)]` — positivity on 4.5·C0hat/(...)² — C0hat's nonnegativity is NOT syntactic — positivity fails! Need the two_le_C0hat argument: 0 ≤ C0hat(anything): two_le_C0hat needs 1 ≤ arg: C0hat((ℓ+14)+1) with ℓ+15 ≥ 1 ✓:\n```\n have hnn : (0 : ℝ) ≤ C0hat ((ℓ + 14 : ℝ) + 1) := by\n have h := two_le_C0hat (by\n have h2 : (1 : ℝ) ≤ ((ℓ + 14 : ℕ) : ℝ) + 1 := by\n have h3 : (0 : ℝ) ≤ (ℓ : ℝ) := Nat.cast_nonneg ℓ\n rw [show ((ℓ + 14 : ℕ) : ℝ) = (ℓ : ℝ) + 14 from by push_cast; ring]\n linarith\n exact h2 : (1 : ℝ) ≤ (ℓ + 14 : ℝ) + 1)\n linarith\n```\nhmm — two_le_C0hat (ht : 1 ≤ t) : 2 ≤ C0hat t — the arg: ((ℓ+14:ℕ):ℝ)+1?? C0hat_add_one_le_of_fourteen_le's LHS is C0hat ((j:ℝ)+1) with j = ℓ+14: C0hat ((ℓ+14:ℝ)+1) — two_le_C0hat with t = (ℓ+14:ℝ)+1 ≥ 1 ✓:\n```\n have hnn : (0 : ℝ) ≤ C0hat ((ℓ + 14 : ℝ) + 1) := by\n have h1 : (1 : ℝ) ≤ (ℓ + 14 : ℝ) + 1 := by\n have h2 : (0 : ℝ) ≤ (ℓ : ℝ) := Nat.cast_nonneg ℓ\n linarith\n have h3 := two_le_C0hat h1\n linarith\n```\nWait — (ℓ+14 : ℝ) — is that ↑ℓ + 14 or ↑(ℓ+14)? In the lemma C0hat_add_one_le_of_fourteen_le (j := ℓ+14): the term is C0hat ((↑(ℓ+14)) + 1) with ↑(ℓ+14) : ℝ — and two_le_C0hat's t = ↑(ℓ+14)+1 ✓ fine, (1:ℝ) ≤ ↑(ℓ+14)+1 ✓.\n\nOK — given all these issues, let me rewrite the whole farGLeftMaj section cleanly. Actually the cleanest path: rewrite from \"/-- The left-tail majorant series (if-form on ℕ). -/\" to the end with a cleaner, single-pass structure:\n\n```\ndef farGLeftMaj : ℕ → ℝ := fun ℓ =>\n if 14 ≤ ℓ then 4.5 * C0hat ((ℓ : ℝ) + 1) / (10 + (ℓ : ℝ)) ^ 2 else 0\n\n/-- the explicit shifted summand families and their summability -/ (reuse: tail14_inv_add_sq_summable needs to exist — I used inline h1's; let me create standalone:)\n\nlemma tail14_inv_add_sq_summable : Summable (fun j : ℕ => (1 : ℝ) / (((j : ℝ) + 14) + 10) ^ 2)\nlemma tail14_loglog_div_add_sq_summable : Summable (fun j : ℕ => Real.log (Real.log ((j : ℝ) + 14)) / (((j : ℝ) + 14) + 10) ^ 2)\n```\nThe first: from antitoneOn_one_div_add_sq.summable_of_integrableOn_Ioi + shift (the inline h1 pattern). The second: the inline hsumm from tail14_loglog_div_add_sq_le — extract as standalone (of_norm_bounded by (1/e)·log-family via log_log_le_div_exp ✓ as I wrote).\n\nThen:\n```\n/-- pointwise majorant bound for the shifted farGLeftMaj -/\nlemma farGLeftMaj_shift_le (ℓ : ℕ) :\n farGLeftMaj (ℓ + 14)\n ≤ 4.5 * ((0.433 * 0.1942 + 0.886 * 0.0736 + 2.9) * (1 / (((ℓ : ℝ) + 14) + 10) ^ 2)\n + (0.433 * Real.log ((ℓ : ℝ) + 14) / (((ℓ : ℝ) + 14) + 10) ^ 2)\n + (0.886 * Real.log (Real.log ((ℓ : ℝ) + 14)) / (((ℓ : ℝ) + 14) + 10) ^ 2))\n\nlemma farGLeftMaj_shift_summable : Summable (fun ℓ : ℕ => farGLeftMaj (ℓ + 14)) := by\n apply Summable.of_norm_bounded <the 4.5-scaled combo summable>\n intro ℓ\n rw [Real.norm_eq_abs, abs_of_nonneg <nonneg>]\n exact farGLeftMaj_shift_le ℓ\n```\nwith the nonneg: farGLeftMaj (ℓ+14) = 4.5·C0hat/100... — nonneg via two_le_C0hat ✓.\n\nAnd the combo summable: 4.5·(c0·A + c1·B + c2·C) — from the three standalone summables via .mul_left/.add ✓.\n\nThen farGLeftMaj_series_le as the cleaned-up version.\n\nLet me rewrite the whole section from `/-- The left-tail majorant series (if-form on ℕ). -/` onward. First re-read the file end to anchor the edit.","signature":""},{"type":"text","text":"The §17 ending needs restructuring (sorry placeholders + duplicated summability proofs). Let me re-read the tail and rewrite the farGLeftMaj section cleanly."},{"type":"tool_use","id":"Bash_180","name":"Bash","input":{"command":"cd D:/Python/Quantum/research/lean/NguyenRH1 && grep -n \"left-tail majorant series\" NguyenRH1/LiTightR.lean && tail -3 NguyenRH1/LiTightR.lean","description":"Locate the farGLeftMaj section start"},"extra_content":null}]