← Session 31 — ii′-5f: tight R-bound 10.5/48 (piece 3 + pinch)
thinking (13982 chars)
Section 10 (farW + S₃) compiles clean. Now chunk 9c (as §11): the six tail bricks. Let me write them. Plan (from my earlier analysis):
```lean
/-! ## 11. Piece 3c: the six tail-weight bricks -/
-- RW₀: Σ_{k≥11} 1/k² ≤ 0.1
lemma antitoneOn_one_div_sq : AntitoneOn (fun x : ℝ => 1 / x ^ 2) (Set.Ici 10)
lemma integral_one_div_sq_Ioi_ten : ∫ x in Set.Ioi (10 : ℝ), 1 / x ^ 2 = 1 / 10
lemma tail11_inv_sq_le : ∑' k : ℕ, (1 : ℝ) / ((k : ℝ) + 11) ^ 2 ≤ 0.1
-- RW₁: Σ log k/k² ≤ 0.3303
lemma integral_log_div_sq_Ioi_ten : ∫ x in Set.Ioi (10 : ℝ), Real.log x / x ^ 2 = (Real.log 10 + 1) / 10
lemma tail11_log_div_sq_le : ∑' k : ℕ, Real.log ((k : ℝ) + 11) / ((k : ℝ) + 11) ^ 2 ≤ 0.3303
-- RW₂: Σ loglog k/k² ≤ 0.1216
lemma tail11_loglog_div_sq_le : ∑' k : ℕ, Real.log (Real.log ((k : ℝ) + 11)) / ((k : ℝ) + 11) ^ 2 ≤ 0.1216
-- LA₀: Σ_{j≥14} 1/(j+10)² ≤ 1/23
lemma antitoneOn_one_div_add_sq : AntitoneOn (fun x : ℝ => 1 / (x + 10) ^ 2) (Set.Ici 13)
lemma integral_one_div_add_sq_Ioi_thirteen : ∫ x in Set.Ioi (13 : ℝ), 1 / (x + 10) ^ 2 = 1 / 23
lemma tail14_inv_add_sq_le : ∑' j : ℕ, (1 : ℝ) / (((j : ℝ) + 14) + 10) ^ 2 ≤ 1 / 23
-- LA₁: Σ log j/(j+10)² ≤ 0.1687
lemma antitoneOn_log_div_add_sq : AntitoneOn (fun x : ℝ => Real.log x / (x + 10) ^ 2) (Set.Ici 13)
lemma integral_log_div_add_sq_Ioi_thirteen : ∫ x in Set.Ioi (13 : ℝ), Real.log x / (x + 10) ^ 2 = Real.log 13 / 23 + Real.log (23 / 13) / 10
lemma tail14_log_div_add_sq_le : ∑' j : ℕ, Real.log ((j : ℝ) + 14) / (((j : ℝ) + 14) + 10) ^ 2 ≤ 0.1687
-- LA₂: Σ loglog j/(j+10)² ≤ 0.0621
lemma tail14_loglog_div_add_sq_le : ∑' j : ℕ, Real.log (Real.log ((j : ℝ) + 14)) / (((j : ℝ) + 14) + 10) ^ 2 ≤ 0.0621
```
Details:
**antitoneOn_one_div_sq**: intro a ha b hb hab: show 1/b² ≤ 1/a²: one_div_le_one_div_of_le (0 < a²) (a² ≤ b²): a ≥ 10 > 0: pow_le_pow_left₀ (0 ≤ a) hab 2.
**integrableOn_one_div_sq**: integrableOn_Ioi_deriv_of_nonneg' (F = −x⁻¹, F' = 1/x²):
```
lemma integrableOn_one_div_sq : IntegrableOn (fun x : ℝ => 1 / x ^ 2) (Set.Ioi (10 : ℝ)) volume := by
apply integrableOn_Ioi_deriv_of_nonneg' (fun x hx => ?_) ?_ ?_
· -- HasDerivAt (−x⁻¹) (1/x²) x
have hx0 : x ≠ 0 := by have h := (Set.mem_Ici.mp hx); linarith
have h1 := ((hasDerivAt_id' x).inv hx0).neg
-- HasDerivAt (x ↦ x⁻¹) (-x⁻²) x; neg: (−x⁻¹) (x⁻²)
rw [show (fun y : ℝ => -y⁻¹) = -(fun y : ℝ => y⁻¹) from rfl] at *
rw [show (1 : ℝ) / x ^ 2 = -(-(x ^ 2)⁻¹) from by rw [neg_neg, one_div, one_div, inv_pow]]
convert h1 using 2 <;> ring
· intro x hx
have hx10 : (10 : ℝ) < x := hx
positivity
· -- Tendsto (−x⁻¹) atTop (𝓝 0)
simpa using tendsto_inv_atTop_zero.neg
```
Hmm — the hasDerivAt for x⁻¹: hasDerivAt_id' x .inv hx0 : HasDerivAt (fun y => y⁻¹) (-(x^2)⁻¹)?? The derivative of x⁻¹ is −1/x² = −(x²)⁻¹: `HasDerivAt.inv (hc : c ≠ 0) : HasDerivAt (fun x => x⁻¹) (-x⁻¹ * f')...` — for f = id, f' = 1: HasDerivAt.inv (hasDerivAt_id' x) hx0 : HasDerivAt (fun y => y⁻¹) (-(x⁻¹)^2 * 1)?? hmm the exact form: HasDerivAt (x ↦ x⁻¹) (-(x^2)⁻¹ * 1)? or −x⁻¹ * x⁻¹ * ... Let me not guess: the deriv of inv is −(x^2)⁻¹ via `hasDerivAt_inv`? There might be `hasDerivAt_inv (hx : x ≠ 0) : HasDerivAt (fun y => y⁻¹) (-(x^2)⁻¹) x`? Hmm. Simpler: use (−1/x) with HasDerivAt of 1/x = x⁻¹ directly: `.neg` of inv-deriv. The derivative VALUE matters for integrableOn_Ioi_deriv_of_nonneg' — it wants HasDerivAt F f x with f = the integrand 1/x² — the form must match: 1/x² vs whatever comes out. Let me write it defensively:
```
have h1 : HasDerivAt (fun y : ℝ => -y⁻¹) (1 / x ^ 2) x := by
have h2 := (hasDerivAt_id' x).inv hx0
-- h2 : HasDerivAt (fun y => y⁻¹) (-(x ^ 2)⁻¹ * 1) x (form TBD)
have h3 := h2.neg
rw [show (-(fun y : ℝ => y⁻¹)) = (fun y : ℝ => -y⁻¹) from rfl] at h3
rw [show (-(-(x ^ 2)⁻¹ * 1)) = 1 / x ^ 2 from by
rw [neg_neg, mul_one, one_div, one_div, inv_pow]] at h3
exact h3
```
The inv derivative form: `HasDerivAt.inv (hf : HasDerivAt f f' x) (hc : f x ≠ 0) : HasDerivAt (fun x => (f x)⁻¹) (-(f x ^ 2)⁻¹ * f') x`? or (−f'/(f x)^2)? For ℝ, inv-deriv = −f'/f². The exact normalization: unknown; I'll use `show ... from by field_simp; ring` patterns resiliently: instead of predicting, use `simpa` to normalize: `simpa [one_div, inv_pow, mul_neg, neg_neg] using h3`. Let me use simpa with a broad set.
**integral_one_div_sq_Ioi_ten**: integral_Ioi_of_hasDerivAt_of_tendsto' (hderiv) (integrable) (tendsto): = (0 − (−(10)⁻¹)) = 1/10:
```
lemma integral_one_div_sq_Ioi_ten : ∫ x in Set.Ioi (10 : ℝ), 1 / x ^ 2 = 1 / 10 := by
have h := integral_Ioi_of_hasDerivAt_of_tendsto'
(fun x hx => <hderiv at x>) integrableOn_one_div_sq <tendsto>
rw [h]
show (0 : ℝ) - -((10 : ℝ)⁻¹) = 1 / 10
norm_num
```
(the integral_log_div_sq_Ioi_three pattern: rw [h]; show 0 − −(...) = ...; ring/norm_num).
**tail11_inv_sq_le**:
```
lemma tail11_inv_sq_le : ∑' k : ℕ, (1 : ℝ) / ((k : ℝ) + 11) ^ 2 ≤ 0.1 := by
have hle := antitoneOn_one_div_sq.tsum_comp_add_le_integral 10
integrableOn_one_div_sq (fun t ht => by
have ht10 : (10 : ℝ) < t := ht
positivity)
rw [integral_one_div_sq_Ioi_ten] at hle
have hcongr : (∑' n : ℕ, 1 / ((↑(n + 10 + 1) : ℝ)) ^ 2)
= ∑' n : ℕ, (1 : ℝ) / ((n : ℝ) + 11) ^ 2 := by
refine tsum_congr fun n => ?_
have h1 : ((↑(n + 10 + 1) : ℕ) : ℝ) = (n : ℝ) + 11 := by push_cast; ring
rw [h1]
rw [hcongr] at hle
-- hle : ∑' n, 1/((n:ℝ)+11)^2 ≤ 1/10
have h2 : (1 : ℝ) / 10 = 0.1 := by norm_num
rw [h2] at hle
exact hle
```
Careful with the tsum_comp_add_le_integral's output form: from tsum_log_div_sq_tail_le, it was ∑' n, f ↑(n+3+1) — i.e. f applied to ↑(n+c+1) — the nonneg arg (fun t ht => ...) with ht : t ∈ Ici?? In that proof: `(fun t ht => by have ht3 : (3 : ℝ) < t := ht; ...)` — ht3 : 3 < t from ht — ht : t ∈ Set.Ici 3? mem_Ici gives 3 ≤ t not < — they wrote `have ht3 : (3:ℝ) < t := ht` directly — so ht : 3 < t, meaning the nonneg is quantified over Ioi?? Let me look at the exact signature of AntitoneOn.tsum_comp_add_le_integral in the vendored Mathlib to get the arg forms right.
Also the f in hle will be (fun x => 1/x^2) applied: ∑' n, (fun x => 1/x^2) ↑(n+10+1) = ∑' n, 1/(↑(n+10+1))^2 ✓.
**RW₁ tail11_log_div_sq_le**: same pattern with antitoneOn_log_div_sq (Ici 3) → mono to Ici 10, integrableOn_log_div_sq (Ioi 3) → mono to Ioi 10, integral = (log 10+1)/10 via the same antiderivative (hasDerivAt_neg_log_add_one_div exists ✓) + tendsto_neg_log_add_one_div ✓. Then ≤ (2.3026+1)/10 = 0.33026 ≤ 0.3303 (log_ten_le).
**RW₂ tail11_loglog_div_sq_le**: pointwise bound + tsum_le_tsum:
```
lemma tail11_loglog_div_sq_le : ∑' k, loglog(k+11)/(k+11)² ≤ 0.1216 := by
have hpt : ∀ k : ℕ, Real.log (Real.log ((k:ℝ)+11)) / ((k:ℝ)+11)^2
≤ (1 / Real.exp 1) * (Real.log ((k:ℝ)+11) / ((k:ℝ)+11)^2) := by
intro k
have h1 : (1 : ℝ) < (k : ℝ) + 11 := by
have : (0 : ℝ) ≤ (k : ℝ) := Nat.cast_nonneg k
linarith
have h2 := log_log_le_div_exp h1
-- log(log x) ≤ (1/e)·log x; divide by x² ≥ 0
have h3 : (0 : ℝ) ≤ ((k : ℝ) + 11) ^ 2 := by positivity
have h4 : Real.log (Real.log ((k:ℝ)+11)) / ((k:ℝ)+11)^2
≤ ((1 / Real.exp 1) * Real.log ((k:ℝ)+11)) / ((k:ℝ)+11)^2 :=
div_le_div_of_nonneg_right h2 h3
rw [mul_div_assoc] at h4
exact h4
have hsumm2 : Summable (fun k : ℕ => (1 / Real.exp 1) * (Real.log ((k:ℝ)+11) / ((k:ℝ)+11)^2)) :=
(<RW₁ summable>).mul_left _
have hsumm : Summable (fun k : ℕ => Real.log (Real.log ((k:ℝ)+11)) / ((k:ℝ)+11)^2) := by
apply Summable.of_norm_bounded hsumm2
intro k
rw [Real.norm_eq_abs, abs_of_nonneg ?_]
· exact hpt k
· -- 0 ≤ loglog(k+11)/(k+11)²: loglog(k+11) ≥ loglog 11 ≥ 0 (log 11 ≥ 2.3978 ≥ 1)
have h1 : (0 : ℝ) ≤ Real.log (Real.log ((k:ℝ)+11)) := by
apply Real.log_nonneg
have h2 : (1 : ℝ) ≤ Real.log ((k:ℝ)+11) := by
have h3 := log_eleven_ge
have h4 : Real.log 11 ≤ Real.log ((k:ℝ)+11) :=
Real.log_le_log (by norm_num) (by
have : (0 : ℝ) ≤ (k : ℝ) := Nat.cast_nonneg k
linarith)
linarith [h3, h4]
exact h2
positivity
have hle := Summable.tsum_le_tsum hpt hsumm hsumm2
rw [tsum_mul_left] at hle
-- hle : tsum ≤ (1/e) * tsum(log/²) ≤ (1/e) * 0.3303 ≤ 0.3679 * 0.3303 = 0.12151227 ≤ 0.1216
have h1 := tail11_log_div_sq_le
have h2 := one_div_exp_one_le
have h3 : (1 / Real.exp 1) * 0.3303 ≤ 0.1216 := by
calc (1 / Real.exp 1) * 0.3303 ≤ 0.3679 * 0.3303 :=
mul_le_mul_of_nonneg_right h2 (by norm_num)
_ ≤ 0.1216 := by norm_num
-- assemble
have h4 : (1 / Real.exp 1) * (∑' k : ℕ, Real.log ((k:ℝ)+11) / ((k:ℝ)+11)^2)
≤ (1 / Real.exp 1) * 0.3303 :=
mul_le_mul_of_nonneg_left h1 (by positivity : (0:ℝ) ≤ 1 / Real.exp 1)
linarith [hle, h4, h3]
```
Wait — issue: the RW₁ sum I named tail11_log_div_sq_le needs to be proved BEFORE RW₂ (order in file ✓). And I need its Summable too — expose `tail11_log_div_sq_summable`.
Hmm — the RW₂ bound chain: hle : T ≤ (1/e)·S where S = the log-tsum; S ≤ 0.3303: so T ≤ (1/e)·0.3303 ≤ 0.1216 — need (1/e)·S ≤ (1/e)·0.3303 via mul_le_mul_of_nonneg_left h1 (0 ≤ 1/e) ✓. Then linarith with h3 ✓. But wait — mul_le_mul_of_nonneg_left's nonneg: 0 ≤ 1/exp 1: positivity should do.
**LA₀ antitoneOn_one_div_add_sq**: direct: a ≤ b ⟹ a+10 ≤ b+10 ⟹ (a+10)² ≤ (b+10)² ⟹ 1/(b+10)² ≤ 1/(a+10)² ✓.
**LA₀ integrable/integral**: F = −(x+10)⁻¹: HasDerivAt (−(x+10)⁻¹) ((x+10)⁻²... = 1/(x+10)²):
```
have h1 : HasDerivAt (fun y : ℝ => -(y + 10)⁻¹) (1 / (x + 10) ^ 2) x := by
have h2 := ((hasDerivAt_id' x).const_add 10).inv (by linarith : x + 10 ≠ 0)
have h3 := h2.neg
simpa [one_div, inv_pow, mul_neg, neg_neg, Function.comp_def, Pi.neg_apply] using h3
```
∫₁₃^∞ = 0 − (−(13+10)⁻¹) = 1/23 ✓.
**LA₁ antitoneOn_log_div_add_sq**: antitoneOn_of_deriv_nonpos (convex_Ici 13) (cont) (diff) (deriv ≤ 0):
- continuity: log x/(x+10)² continuous on Ici 13: (Real.differentiableAt_log (x ≠ 0)).div ((differentiableAt_id.add_const 10).pow 2) (x+10)² ≠ 0 → .continuousAt.continuousWithinAt (the antitoneOn_log_div_sq pattern ✓).
- differentiable on interior (Ioi 13): same → .differentiableWithinAt.
- deriv ≤ 0: deriv (log x/(x+10)²) x = ((x+10)/x − 2·log x)/(x+10)³ — compute via HasDerivAt quotient: ((Real.hasDerivAt_log hx0).div ((hasDerivAt_id' x).const_add 10 |>.pow 2?) hmm — (x+10)² as a function: (fun y => (y+10)^2): HasDerivAt → 2(x+10)·1 = 2(x+10). Build: h1 := (hasDerivAt_id' x).const_add 10 : HasDerivAt (·+10) 1 x; h2 := h1.pow 2? `HasDerivAt.pow`? there's `HasDerivAt.pow (n : ℕ)`? or use hasDerivAt_pow 2 x composed... (fun y => (y+10)^2) = (pow 2)∘(·+10): ((hasDerivAt_pow 2 (x+10)).comp x h1) : derivative (2(x+10)^1)·1. Then (Real.hasDerivAt_log hx0).div h2' (x+10)² ≠ 0: quotient rule: (x⁻¹·(x+10)² − log x·2(x+10))/((x+10)²)² = ((x+10)/x − 2 log x)/(x+10)³ — show by field_simp-ish algebra.
Then ≤ 0: (x+10)/x − 2 log x ≤ 0 ⟸ (x+10)/x ≤ 2 log x: x ≥ 13: (x+10)/x = 1+10/x ≤ 1+10/13 = 23/13 ≤ 2 ✓ and 2 log x ≥ 2·log 13... need log x ≥ 1: x ≥ 13 > e ✓ (Real.log_le_log (exp_pos 1) : exp 1 ≤ 13 ⟹ log 13 ≥ 1: Real.le_log_iff_exp_le (13 > 0): 1 ≤ log 13 ⟺ exp 1 ≤ 13: exp 1 ≤ 2.7182819 ≤ 13 ✓). So 2 log x ≥ 2·1 = 2 ≥ 23/13·... = 1.77 ≥ (x+10)/x ✓.
The deriv equality: deriv f x = the HasDerivAt's value: h.deriv.
**LA₁ integrableOn**: integrableOn_Ioi_deriv_of_nonneg' (F = the antiderivative −log x/(x+10) + (1/10)·log(x/(x+10))):
```
have hF : ∀ x ∈ Set.Ici 13, HasDerivAt (fun y => -Real.log y / (y + 10) + (1/10) * Real.log (y / (y + 10)))
(Real.log x / (x + 10) ^ 2) x
```
Build: F1 = −(log x)/(x+10): derivative: −[x⁻¹(x+10)⁻¹... via ((Real.hasDerivAt_log hx0).div (hasDerivAt_id' x).const_add 10 hx10).neg: quotient: −[(x⁻¹·(x+10) − log x·1)/(x+10)²] = −1/(x(x+10)) + log x/(x+10)².
F2 = (1/10)·log(x/(x+10)): derivative: (1/10)·(1/(x/(x+10)))·(deriv of x/(x+10)) — the quotient x/(x+10): ((hasDerivAt_id' x).div (hasDerivAt_id' x).const_add 10 hx10) : ((x+10) − x)/(x+10)² = 10/(x+10)²; then Real.hasDerivAt_log (x/(x+10) ≠ 0).comp: (x/(x+10))⁻¹ · 10/(x+10)² = ((x+10)/x)·10/(x+10)² = 10/(x(x+10)); times 1/10: 1/(x(x+10)) ✓ cancels F1's −1/(x(x+10)) leaving log x/(x+10)² ✓.
Assemble via .add and algebra normalizations (show-rws + field_simp).
Tendsto F → 0: F1 = −log x/(x+10): |log x/(x+10)| ≤ (log x/x)·(x/(x+10)): log x/x → 0 (Real.tendsto_pow_log_div_mul_add_atTop 1 0 1 one_ne_zero — the file used `Real.tendsto_pow_log_div_mul_add_atTop 1 0 1 one_ne_zero` for log x/x → 0 in tendsto_neg_log_add_one_div ✓ reuse); x/(x+10) → 1: Tendsto (fun x => x/(x+10)) atTop (𝓝 1): x/(x+10) = 1/(1+10/x): 10/x → 0 (tendsto_const_nhds.mul tendsto_inv_atTop_zero-ish: 10·(1/x): (tendsto_inv_atTop_zero).const_mul 10), 1+that → 1, 1/that → 1: via Tendsto.div tendsto_const_nhds ((tendsto_const_nhds).add ...) (1 ≠ 0). Then log x/(x+10) = (log x/x)·(x/(x+10)) → 0·1 = 0 ✓ (Tendsto.mul). F2 = (1/10)·log(x/(x+10)) → (1/10)·log 1 = 0: (Real.continuousAt_log (1:ℝ) ≠ 0... Real.continuousAt_log : ContinuousAt Real.log 1 (1 ≠ 0): .tendsto : Tendsto log (𝓝 1) (𝓝 (log 1)): comp with the ratio-tendsto: Tendsto (fun x => log (x/(x+10))) atTop (𝓝 (log 1)) ✓ log 1 = 0 ✓ const_mul.
Sum → 0 − 0 = 0 ✓.
F(13) = −log 13/23 + (1/10)·log(13/23): integral = 0 − F(13) = log 13/23 − (1/10)·log(13/23) = log 13/23 + (1/10)·log(23/13) ✓ (log(13/23) = −log(23/13)).
Bound: ≤ 2.565/23 + 0.571/10 = 0.111522+0.0571 = 0.168622 ≤ 0.1687 ✓.
Nonneg for the integrableOn_Ioi_deriv_of_nonneg': log x/(x+10)² ≥ 0 for x ≥ 13 ✓ (log x ≥ 0).
**LA₁ integral statement**: I said = log 13/23 + log(23/13)/10. Then ≤ 0.1687.
**LA₂**: pointwise like RW₂: ≤ (1/e)·0.1687 ≤ 0.3679·0.1687 = 0.06206623 ≤ 0.0621 ✓.
Also need the summables for each (for tsum_le_tsum in LA₂/RW₂): LA₁'s summable: from the antitone-integral machine: `AntitoneOn.summable_of_integrableOn_Ioi` (used in summable_log_div_sq_tail ✓). Expose each.
The nonneg arg in tsum_comp_add_le_integral — let me check its exact signature in this Mathlib first.
Section 10 compiles. Now checking the exact `AntitoneOn.tsum_comp_add_le_integral` signature before writing the six bricks.
tool: Bash
input
{
"command": "grep -rn \"tsum_comp_add_le_integral\\|summable_of_integrableOn_Ioi\" D:/Python/Quantum/zeta-23-lean/.lake/packages/mathlib/Mathlib/Analysis/ --include=\"*.lean\" 2>/dev/null | grep \"theorem\\|lemma\" | head -8",
"description": "Find the integral-test lemma signatures"
}
raw content_json (database row)
[{"type":"thinking","thinking":"Section 10 (farW + S₃) compiles clean. Now chunk 9c (as §11): the six tail bricks. Let me write them. Plan (from my earlier analysis):\n\n```lean\n/-! ## 11. Piece 3c: the six tail-weight bricks -/\n\n-- RW₀: Σ_{k≥11} 1/k² ≤ 0.1\nlemma antitoneOn_one_div_sq : AntitoneOn (fun x : ℝ => 1 / x ^ 2) (Set.Ici 10)\nlemma integral_one_div_sq_Ioi_ten : ∫ x in Set.Ioi (10 : ℝ), 1 / x ^ 2 = 1 / 10\nlemma tail11_inv_sq_le : ∑' k : ℕ, (1 : ℝ) / ((k : ℝ) + 11) ^ 2 ≤ 0.1\n\n-- RW₁: Σ log k/k² ≤ 0.3303\nlemma integral_log_div_sq_Ioi_ten : ∫ x in Set.Ioi (10 : ℝ), Real.log x / x ^ 2 = (Real.log 10 + 1) / 10\nlemma tail11_log_div_sq_le : ∑' k : ℕ, Real.log ((k : ℝ) + 11) / ((k : ℝ) + 11) ^ 2 ≤ 0.3303\n\n-- RW₂: Σ loglog k/k² ≤ 0.1216\nlemma tail11_loglog_div_sq_le : ∑' k : ℕ, Real.log (Real.log ((k : ℝ) + 11)) / ((k : ℝ) + 11) ^ 2 ≤ 0.1216\n\n-- LA₀: Σ_{j≥14} 1/(j+10)² ≤ 1/23\nlemma antitoneOn_one_div_add_sq : AntitoneOn (fun x : ℝ => 1 / (x + 10) ^ 2) (Set.Ici 13)\nlemma integral_one_div_add_sq_Ioi_thirteen : ∫ x in Set.Ioi (13 : ℝ), 1 / (x + 10) ^ 2 = 1 / 23\nlemma tail14_inv_add_sq_le : ∑' j : ℕ, (1 : ℝ) / (((j : ℝ) + 14) + 10) ^ 2 ≤ 1 / 23\n\n-- LA₁: Σ log j/(j+10)² ≤ 0.1687\nlemma antitoneOn_log_div_add_sq : AntitoneOn (fun x : ℝ => Real.log x / (x + 10) ^ 2) (Set.Ici 13)\nlemma integral_log_div_add_sq_Ioi_thirteen : ∫ x in Set.Ioi (13 : ℝ), Real.log x / (x + 10) ^ 2 = Real.log 13 / 23 + Real.log (23 / 13) / 10\nlemma tail14_log_div_add_sq_le : ∑' j : ℕ, Real.log ((j : ℝ) + 14) / (((j : ℝ) + 14) + 10) ^ 2 ≤ 0.1687\n\n-- LA₂: Σ loglog j/(j+10)² ≤ 0.0621\nlemma tail14_loglog_div_add_sq_le : ∑' j : ℕ, Real.log (Real.log ((j : ℝ) + 14)) / (((j : ℝ) + 14) + 10) ^ 2 ≤ 0.0621\n```\n\nDetails:\n\n**antitoneOn_one_div_sq**: intro a ha b hb hab: show 1/b² ≤ 1/a²: one_div_le_one_div_of_le (0 < a²) (a² ≤ b²): a ≥ 10 > 0: pow_le_pow_left₀ (0 ≤ a) hab 2.\n\n**integrableOn_one_div_sq**: integrableOn_Ioi_deriv_of_nonneg' (F = −x⁻¹, F' = 1/x²):\n```\nlemma integrableOn_one_div_sq : IntegrableOn (fun x : ℝ => 1 / x ^ 2) (Set.Ioi (10 : ℝ)) volume := by\n apply integrableOn_Ioi_deriv_of_nonneg' (fun x hx => ?_) ?_ ?_\n · -- HasDerivAt (−x⁻¹) (1/x²) x\n have hx0 : x ≠ 0 := by have h := (Set.mem_Ici.mp hx); linarith\n have h1 := ((hasDerivAt_id' x).inv hx0).neg\n -- HasDerivAt (x ↦ x⁻¹) (-x⁻²) x; neg: (−x⁻¹) (x⁻²)\n rw [show (fun y : ℝ => -y⁻¹) = -(fun y : ℝ => y⁻¹) from rfl] at *\n rw [show (1 : ℝ) / x ^ 2 = -(-(x ^ 2)⁻¹) from by rw [neg_neg, one_div, one_div, inv_pow]]\n convert h1 using 2 <;> ring\n · intro x hx\n have hx10 : (10 : ℝ) < x := hx\n positivity\n · -- Tendsto (−x⁻¹) atTop (𝓝 0)\n simpa using tendsto_inv_atTop_zero.neg\n```\nHmm — the hasDerivAt for x⁻¹: hasDerivAt_id' x .inv hx0 : HasDerivAt (fun y => y⁻¹) (-(x^2)⁻¹)?? The derivative of x⁻¹ is −1/x² = −(x²)⁻¹: `HasDerivAt.inv (hc : c ≠ 0) : HasDerivAt (fun x => x⁻¹) (-x⁻¹ * f')...` — for f = id, f' = 1: HasDerivAt.inv (hasDerivAt_id' x) hx0 : HasDerivAt (fun y => y⁻¹) (-(x⁻¹)^2 * 1)?? hmm the exact form: HasDerivAt (x ↦ x⁻¹) (-(x^2)⁻¹ * 1)? or −x⁻¹ * x⁻¹ * ... Let me not guess: the deriv of inv is −(x^2)⁻¹ via `hasDerivAt_inv`? There might be `hasDerivAt_inv (hx : x ≠ 0) : HasDerivAt (fun y => y⁻¹) (-(x^2)⁻¹) x`? Hmm. Simpler: use (−1/x) with HasDerivAt of 1/x = x⁻¹ directly: `.neg` of inv-deriv. The derivative VALUE matters for integrableOn_Ioi_deriv_of_nonneg' — it wants HasDerivAt F f x with f = the integrand 1/x² — the form must match: 1/x² vs whatever comes out. Let me write it defensively:\n```\n have h1 : HasDerivAt (fun y : ℝ => -y⁻¹) (1 / x ^ 2) x := by\n have h2 := (hasDerivAt_id' x).inv hx0\n -- h2 : HasDerivAt (fun y => y⁻¹) (-(x ^ 2)⁻¹ * 1) x (form TBD)\n have h3 := h2.neg\n rw [show (-(fun y : ℝ => y⁻¹)) = (fun y : ℝ => -y⁻¹) from rfl] at h3\n rw [show (-(-(x ^ 2)⁻¹ * 1)) = 1 / x ^ 2 from by\n rw [neg_neg, mul_one, one_div, one_div, inv_pow]] at h3\n exact h3\n```\nThe inv derivative form: `HasDerivAt.inv (hf : HasDerivAt f f' x) (hc : f x ≠ 0) : HasDerivAt (fun x => (f x)⁻¹) (-(f x ^ 2)⁻¹ * f') x`? or (−f'/(f x)^2)? For ℝ, inv-deriv = −f'/f². The exact normalization: unknown; I'll use `show ... from by field_simp; ring` patterns resiliently: instead of predicting, use `simpa` to normalize: `simpa [one_div, inv_pow, mul_neg, neg_neg] using h3`. Let me use simpa with a broad set.\n\n**integral_one_div_sq_Ioi_ten**: integral_Ioi_of_hasDerivAt_of_tendsto' (hderiv) (integrable) (tendsto): = (0 − (−(10)⁻¹)) = 1/10: \n```\nlemma integral_one_div_sq_Ioi_ten : ∫ x in Set.Ioi (10 : ℝ), 1 / x ^ 2 = 1 / 10 := by\n have h := integral_Ioi_of_hasDerivAt_of_tendsto'\n (fun x hx => <hderiv at x>) integrableOn_one_div_sq <tendsto>\n rw [h]\n show (0 : ℝ) - -((10 : ℝ)⁻¹) = 1 / 10\n norm_num\n```\n(the integral_log_div_sq_Ioi_three pattern: rw [h]; show 0 − −(...) = ...; ring/norm_num).\n\n**tail11_inv_sq_le**: \n```\nlemma tail11_inv_sq_le : ∑' k : ℕ, (1 : ℝ) / ((k : ℝ) + 11) ^ 2 ≤ 0.1 := by\n have hle := antitoneOn_one_div_sq.tsum_comp_add_le_integral 10\n integrableOn_one_div_sq (fun t ht => by\n have ht10 : (10 : ℝ) < t := ht\n positivity)\n rw [integral_one_div_sq_Ioi_ten] at hle\n have hcongr : (∑' n : ℕ, 1 / ((↑(n + 10 + 1) : ℝ)) ^ 2)\n = ∑' n : ℕ, (1 : ℝ) / ((n : ℝ) + 11) ^ 2 := by\n refine tsum_congr fun n => ?_\n have h1 : ((↑(n + 10 + 1) : ℕ) : ℝ) = (n : ℝ) + 11 := by push_cast; ring\n rw [h1]\n rw [hcongr] at hle\n -- hle : ∑' n, 1/((n:ℝ)+11)^2 ≤ 1/10\n have h2 : (1 : ℝ) / 10 = 0.1 := by norm_num\n rw [h2] at hle\n exact hle\n```\nCareful with the tsum_comp_add_le_integral's output form: from tsum_log_div_sq_tail_le, it was ∑' n, f ↑(n+3+1) — i.e. f applied to ↑(n+c+1) — the nonneg arg (fun t ht => ...) with ht : t ∈ Ici?? In that proof: `(fun t ht => by have ht3 : (3 : ℝ) < t := ht; ...)` — ht3 : 3 < t from ht — ht : t ∈ Set.Ici 3? mem_Ici gives 3 ≤ t not < — they wrote `have ht3 : (3:ℝ) < t := ht` directly — so ht : 3 < t, meaning the nonneg is quantified over Ioi?? Let me look at the exact signature of AntitoneOn.tsum_comp_add_le_integral in the vendored Mathlib to get the arg forms right.\n\nAlso the f in hle will be (fun x => 1/x^2) applied: ∑' n, (fun x => 1/x^2) ↑(n+10+1) = ∑' n, 1/(↑(n+10+1))^2 ✓.\n\n**RW₁ tail11_log_div_sq_le**: same pattern with antitoneOn_log_div_sq (Ici 3) → mono to Ici 10, integrableOn_log_div_sq (Ioi 3) → mono to Ioi 10, integral = (log 10+1)/10 via the same antiderivative (hasDerivAt_neg_log_add_one_div exists ✓) + tendsto_neg_log_add_one_div ✓. Then ≤ (2.3026+1)/10 = 0.33026 ≤ 0.3303 (log_ten_le).\n\n**RW₂ tail11_loglog_div_sq_le**: pointwise bound + tsum_le_tsum:\n```\nlemma tail11_loglog_div_sq_le : ∑' k, loglog(k+11)/(k+11)² ≤ 0.1216 := by\n have hpt : ∀ k : ℕ, Real.log (Real.log ((k:ℝ)+11)) / ((k:ℝ)+11)^2\n ≤ (1 / Real.exp 1) * (Real.log ((k:ℝ)+11) / ((k:ℝ)+11)^2) := by\n intro k\n have h1 : (1 : ℝ) < (k : ℝ) + 11 := by\n have : (0 : ℝ) ≤ (k : ℝ) := Nat.cast_nonneg k\n linarith\n have h2 := log_log_le_div_exp h1\n -- log(log x) ≤ (1/e)·log x; divide by x² ≥ 0\n have h3 : (0 : ℝ) ≤ ((k : ℝ) + 11) ^ 2 := by positivity\n have h4 : Real.log (Real.log ((k:ℝ)+11)) / ((k:ℝ)+11)^2\n ≤ ((1 / Real.exp 1) * Real.log ((k:ℝ)+11)) / ((k:ℝ)+11)^2 :=\n div_le_div_of_nonneg_right h2 h3\n rw [mul_div_assoc] at h4\n exact h4\n have hsumm2 : Summable (fun k : ℕ => (1 / Real.exp 1) * (Real.log ((k:ℝ)+11) / ((k:ℝ)+11)^2)) :=\n (<RW₁ summable>).mul_left _\n have hsumm : Summable (fun k : ℕ => Real.log (Real.log ((k:ℝ)+11)) / ((k:ℝ)+11)^2) := by\n apply Summable.of_norm_bounded hsumm2\n intro k\n rw [Real.norm_eq_abs, abs_of_nonneg ?_]\n · exact hpt k\n · -- 0 ≤ loglog(k+11)/(k+11)²: loglog(k+11) ≥ loglog 11 ≥ 0 (log 11 ≥ 2.3978 ≥ 1)\n have h1 : (0 : ℝ) ≤ Real.log (Real.log ((k:ℝ)+11)) := by\n apply Real.log_nonneg\n have h2 : (1 : ℝ) ≤ Real.log ((k:ℝ)+11) := by\n have h3 := log_eleven_ge\n have h4 : Real.log 11 ≤ Real.log ((k:ℝ)+11) :=\n Real.log_le_log (by norm_num) (by\n have : (0 : ℝ) ≤ (k : ℝ) := Nat.cast_nonneg k\n linarith)\n linarith [h3, h4]\n exact h2\n positivity\n have hle := Summable.tsum_le_tsum hpt hsumm hsumm2\n rw [tsum_mul_left] at hle\n -- hle : tsum ≤ (1/e) * tsum(log/²) ≤ (1/e) * 0.3303 ≤ 0.3679 * 0.3303 = 0.12151227 ≤ 0.1216\n have h1 := tail11_log_div_sq_le\n have h2 := one_div_exp_one_le\n have h3 : (1 / Real.exp 1) * 0.3303 ≤ 0.1216 := by\n calc (1 / Real.exp 1) * 0.3303 ≤ 0.3679 * 0.3303 :=\n mul_le_mul_of_nonneg_right h2 (by norm_num)\n _ ≤ 0.1216 := by norm_num\n -- assemble\n have h4 : (1 / Real.exp 1) * (∑' k : ℕ, Real.log ((k:ℝ)+11) / ((k:ℝ)+11)^2)\n ≤ (1 / Real.exp 1) * 0.3303 :=\n mul_le_mul_of_nonneg_left h1 (by positivity : (0:ℝ) ≤ 1 / Real.exp 1)\n linarith [hle, h4, h3]\n```\nWait — issue: the RW₁ sum I named tail11_log_div_sq_le needs to be proved BEFORE RW₂ (order in file ✓). And I need its Summable too — expose `tail11_log_div_sq_summable`.\n\nHmm — the RW₂ bound chain: hle : T ≤ (1/e)·S where S = the log-tsum; S ≤ 0.3303: so T ≤ (1/e)·0.3303 ≤ 0.1216 — need (1/e)·S ≤ (1/e)·0.3303 via mul_le_mul_of_nonneg_left h1 (0 ≤ 1/e) ✓. Then linarith with h3 ✓. But wait — mul_le_mul_of_nonneg_left's nonneg: 0 ≤ 1/exp 1: positivity should do.\n\n**LA₀ antitoneOn_one_div_add_sq**: direct: a ≤ b ⟹ a+10 ≤ b+10 ⟹ (a+10)² ≤ (b+10)² ⟹ 1/(b+10)² ≤ 1/(a+10)² ✓.\n\n**LA₀ integrable/integral**: F = −(x+10)⁻¹: HasDerivAt (−(x+10)⁻¹) ((x+10)⁻²... = 1/(x+10)²): \n```\nhave h1 : HasDerivAt (fun y : ℝ => -(y + 10)⁻¹) (1 / (x + 10) ^ 2) x := by\n have h2 := ((hasDerivAt_id' x).const_add 10).inv (by linarith : x + 10 ≠ 0)\n have h3 := h2.neg\n simpa [one_div, inv_pow, mul_neg, neg_neg, Function.comp_def, Pi.neg_apply] using h3\n```\n∫₁₃^∞ = 0 − (−(13+10)⁻¹) = 1/23 ✓.\n\n**LA₁ antitoneOn_log_div_add_sq**: antitoneOn_of_deriv_nonpos (convex_Ici 13) (cont) (diff) (deriv ≤ 0):\n- continuity: log x/(x+10)² continuous on Ici 13: (Real.differentiableAt_log (x ≠ 0)).div ((differentiableAt_id.add_const 10).pow 2) (x+10)² ≠ 0 → .continuousAt.continuousWithinAt (the antitoneOn_log_div_sq pattern ✓).\n- differentiable on interior (Ioi 13): same → .differentiableWithinAt.\n- deriv ≤ 0: deriv (log x/(x+10)²) x = ((x+10)/x − 2·log x)/(x+10)³ — compute via HasDerivAt quotient: ((Real.hasDerivAt_log hx0).div ((hasDerivAt_id' x).const_add 10 |>.pow 2?) hmm — (x+10)² as a function: (fun y => (y+10)^2): HasDerivAt → 2(x+10)·1 = 2(x+10). Build: h1 := (hasDerivAt_id' x).const_add 10 : HasDerivAt (·+10) 1 x; h2 := h1.pow 2? `HasDerivAt.pow`? there's `HasDerivAt.pow (n : ℕ)`? or use hasDerivAt_pow 2 x composed... (fun y => (y+10)^2) = (pow 2)∘(·+10): ((hasDerivAt_pow 2 (x+10)).comp x h1) : derivative (2(x+10)^1)·1. Then (Real.hasDerivAt_log hx0).div h2' (x+10)² ≠ 0: quotient rule: (x⁻¹·(x+10)² − log x·2(x+10))/((x+10)²)² = ((x+10)/x − 2 log x)/(x+10)³ — show by field_simp-ish algebra.\n Then ≤ 0: (x+10)/x − 2 log x ≤ 0 ⟸ (x+10)/x ≤ 2 log x: x ≥ 13: (x+10)/x = 1+10/x ≤ 1+10/13 = 23/13 ≤ 2 ✓ and 2 log x ≥ 2·log 13... need log x ≥ 1: x ≥ 13 > e ✓ (Real.log_le_log (exp_pos 1) : exp 1 ≤ 13 ⟹ log 13 ≥ 1: Real.le_log_iff_exp_le (13 > 0): 1 ≤ log 13 ⟺ exp 1 ≤ 13: exp 1 ≤ 2.7182819 ≤ 13 ✓). So 2 log x ≥ 2·1 = 2 ≥ 23/13·... = 1.77 ≥ (x+10)/x ✓.\n The deriv equality: deriv f x = the HasDerivAt's value: h.deriv.\n\n**LA₁ integrableOn**: integrableOn_Ioi_deriv_of_nonneg' (F = the antiderivative −log x/(x+10) + (1/10)·log(x/(x+10))):\n```\nhave hF : ∀ x ∈ Set.Ici 13, HasDerivAt (fun y => -Real.log y / (y + 10) + (1/10) * Real.log (y / (y + 10)))\n (Real.log x / (x + 10) ^ 2) x\n```\nBuild: F1 = −(log x)/(x+10): derivative: −[x⁻¹(x+10)⁻¹... via ((Real.hasDerivAt_log hx0).div (hasDerivAt_id' x).const_add 10 hx10).neg: quotient: −[(x⁻¹·(x+10) − log x·1)/(x+10)²] = −1/(x(x+10)) + log x/(x+10)².\nF2 = (1/10)·log(x/(x+10)): derivative: (1/10)·(1/(x/(x+10)))·(deriv of x/(x+10)) — the quotient x/(x+10): ((hasDerivAt_id' x).div (hasDerivAt_id' x).const_add 10 hx10) : ((x+10) − x)/(x+10)² = 10/(x+10)²; then Real.hasDerivAt_log (x/(x+10) ≠ 0).comp: (x/(x+10))⁻¹ · 10/(x+10)² = ((x+10)/x)·10/(x+10)² = 10/(x(x+10)); times 1/10: 1/(x(x+10)) ✓ cancels F1's −1/(x(x+10)) leaving log x/(x+10)² ✓.\nAssemble via .add and algebra normalizations (show-rws + field_simp).\n\nTendsto F → 0: F1 = −log x/(x+10): |log x/(x+10)| ≤ (log x/x)·(x/(x+10)): log x/x → 0 (Real.tendsto_pow_log_div_mul_add_atTop 1 0 1 one_ne_zero — the file used `Real.tendsto_pow_log_div_mul_add_atTop 1 0 1 one_ne_zero` for log x/x → 0 in tendsto_neg_log_add_one_div ✓ reuse); x/(x+10) → 1: Tendsto (fun x => x/(x+10)) atTop (𝓝 1): x/(x+10) = 1/(1+10/x): 10/x → 0 (tendsto_const_nhds.mul tendsto_inv_atTop_zero-ish: 10·(1/x): (tendsto_inv_atTop_zero).const_mul 10), 1+that → 1, 1/that → 1: via Tendsto.div tendsto_const_nhds ((tendsto_const_nhds).add ...) (1 ≠ 0). Then log x/(x+10) = (log x/x)·(x/(x+10)) → 0·1 = 0 ✓ (Tendsto.mul). F2 = (1/10)·log(x/(x+10)) → (1/10)·log 1 = 0: (Real.continuousAt_log (1:ℝ) ≠ 0... Real.continuousAt_log : ContinuousAt Real.log 1 (1 ≠ 0): .tendsto : Tendsto log (𝓝 1) (𝓝 (log 1)): comp with the ratio-tendsto: Tendsto (fun x => log (x/(x+10))) atTop (𝓝 (log 1)) ✓ log 1 = 0 ✓ const_mul.\nSum → 0 − 0 = 0 ✓.\nF(13) = −log 13/23 + (1/10)·log(13/23): integral = 0 − F(13) = log 13/23 − (1/10)·log(13/23) = log 13/23 + (1/10)·log(23/13) ✓ (log(13/23) = −log(23/13)).\nBound: ≤ 2.565/23 + 0.571/10 = 0.111522+0.0571 = 0.168622 ≤ 0.1687 ✓.\n\nNonneg for the integrableOn_Ioi_deriv_of_nonneg': log x/(x+10)² ≥ 0 for x ≥ 13 ✓ (log x ≥ 0).\n\n**LA₁ integral statement**: I said = log 13/23 + log(23/13)/10. Then ≤ 0.1687.\n\n**LA₂**: pointwise like RW₂: ≤ (1/e)·0.1687 ≤ 0.3679·0.1687 = 0.06206623 ≤ 0.0621 ✓.\n\nAlso need the summables for each (for tsum_le_tsum in LA₂/RW₂): LA₁'s summable: from the antitone-integral machine: `AntitoneOn.summable_of_integrableOn_Ioi` (used in summable_log_div_sq_tail ✓). Expose each.\n\nThe nonneg arg in tsum_comp_add_le_integral — let me check its exact signature in this Mathlib first.","signature":""},{"type":"text","text":"Section 10 compiles. Now checking the exact `AntitoneOn.tsum_comp_add_le_integral` signature before writing the six bricks."},{"type":"tool_use","id":"Bash_94","name":"Bash","input":{"command":"grep -rn \"tsum_comp_add_le_integral\\|summable_of_integrableOn_Ioi\" D:/Python/Quantum/zeta-23-lean/.lake/packages/mathlib/Mathlib/Analysis/ --include=\"*.lean\" 2>/dev/null | grep \"theorem\\|lemma\" | head -8","description":"Find the integral-test lemma signatures"},"extra_content":null}]