← Session 35 — ii′-6-R: Lagarias 6.1 right-tail re-proof (E-032/D-073)
thinking (17140 chars)
Clean compile. DL-3a + DL-3b done (zeta halving + kernel envelope). Now DL-3c (product envelope + certified constants) and DL-3d (integrals + capstone).
DL-3c design:
```lean
/-- The product envelope: ‖Jlag n (σ+iU)‖ ≤ (4·e^{−cσ} + 4·2^{−σ})·dirichletC2
with c = log 2 − 4/9. -/
theorem Jlag_dogleg_norm_le_envelope {n : ℕ} {σ U : ℝ}
(hσ : 3 ≤ σ) (hU : 0 < U) (hnU : (n : ℝ) ≤ (4 / 9) * U ^ 2) (t : ℝ) :
‖Jlag n ((σ : ℝ) + t * Complex.I)‖ ≤
(4 * Real.exp (-(Real.log 2 - 4 / 9) * σ) + 4 * (2 : ℝ) ^ (-σ)) * dirichletC2 := by
-- ‖Jlag‖ ≤ (‖(1+1/(w−1))ⁿ‖+1)·‖ζ′/ζ‖
-- ‖(1+1/(w−1))ⁿ‖ ≤ e^{(4/9)σ} (DL-3b); ‖ζ′/ζ‖ ≤ 2^{−(σ−2)}·dirichletC2 (DL-3a)
-- product: e^{(4/9)σ}·2^{−(σ−2)} = 4·e^{−cσ}; plus 2^{−(σ−2)} = 4·2^{−σ}
```
Key algebra: e^{(4/9)σ}·2^{−(σ−2)} = e^{(4/9)σ}·e^{−(σ−2)log2} = e^{(4/9)σ − (σ−2)log2} = e^{2log2 + ((4/9)−log2)σ} = e^{2log2}·e^{−(log2−4/9)σ} = 4·e^{−cσ} (e^{2log2} = (e^{log2})² = 4 ✓). And 2^{−(σ−2)} = 2^{−σ+2} = 4·2^{−σ} ✓.
Jlag's norm: Jlag n w = kFun n w * (−logDeriv ζ w): ‖Jlag‖ = ‖kFun‖·‖logDeriv‖. kFun n w = (w/(w−1))ⁿ − 1 — hmm — the kernel envelope lemma is about (1+1/(w−1))ⁿ — and kFun n w = (w/(w−1))ⁿ − 1 = (1+1/(w−1))ⁿ − 1: w/(w−1) = 1+1/(w−1) ✓ (the kFun_add_one-style identity at w−1: (w−1+1)/(w−1) = 1+1/(w−1) ✓). So ‖kFun n w‖ ≤ ‖(1+1/(w−1))ⁿ‖ + 1 — need (w/(w−1)) = 1+1/(w−1) as a complex identity: w/(w−1) = (w−1+1)/(w−1) = 1+1/(w−1) ✓ (w−1 ≠ 0 since im = U > 0 ✓).
With w = σ+it: w−1 = (σ−1)+it ✓ the envelope lemma applies at (σ, t) with hU := t > 0 — hmm the envelope lemma takes {σ U : ℝ} with the point ((σ:ℝ)−1)+U·I ✓ exactly w−1 with U := t.
So:
```
theorem Jlag_dogleg_norm_le_envelope {n : ℕ} {σ t : ℝ}
(hσ : 3 ≤ σ) (ht : 0 < t) (hnU : (n : ℝ) ≤ (4 / 9) * t ^ 2) :
‖Jlag n ((σ : ℝ) + t * Complex.I)‖ ≤
(4 * Real.exp (-(Real.log 2 - 4 / 9) * σ) + 4 * (2 : ℝ) ^ (-σ)) * dirichletC2 := by
have hw1 : (((σ : ℝ) + t * Complex.I) - 1) = ((σ : ℝ) - 1) + t * Complex.I := by
push_cast
ring
have hwid : ((σ : ℝ) + t * Complex.I) / (((σ : ℝ) + t * Complex.I) - 1) =
1 + 1 / (((σ : ℝ) - 1) + t * Complex.I) := by
rw [hw1]
field_simp [show (((σ : ℝ) - 1) + t * Complex.I) ≠ 0 from ...]
ring
have hker := one_add_div_pow_norm_le_exp_four_ninths hσ ht hnU
have hzeta := norm_logDeriv_zeta_le_two_pow (show (2 : ℝ) ≤ σ by linarith) (t := t)
-- ‖kFun‖ ≤ e^{(4/9)σ} + 1
have hk : ‖kFun n ((σ : ℝ) + t * Complex.I)‖ ≤ Real.exp ((4 / 9) * σ) + 1 := by
unfold kFun
rw [hwid]
calc ‖(1 + 1 / (((σ : ℝ) - 1) + t * Complex.I)) ^ n - 1‖
≤ ‖(1 + 1 / (((σ : ℝ) - 1) + t * Complex.I)) ^ n‖ + ‖(1 : ℂ)‖ := norm_sub_le _ _
_ = ‖(1 + 1 / (((σ : ℝ) - 1) + t * Complex.I))‖ ^ n + 1 := by rw [norm_pow, norm_one]
_ ≤ Real.exp ((4 / 9) * σ) + 1 := by linarith [hker]
-- the product
have hprod : ‖Jlag n ((σ : ℝ) + t * Complex.I)‖ ≤
(Real.exp ((4 / 9) * σ) + 1) * ((2 : ℝ) ^ (-(σ - 2)) * dirichletC2) := by
have hn3 : ‖Jlag n ((σ : ℝ) + t * Complex.I)‖ =
‖kFun n ((σ : ℝ) + t * Complex.I)‖ *
‖logDeriv riemannZeta ((σ : ℝ) + t * Complex.I)‖ := by
show ‖kFun n ((σ : ℝ) + t * Complex.I) *
(-logDeriv riemannZeta ((σ : ℝ) + t * Complex.I))‖ = _
rw [norm_mul, norm_neg]
rw [hn3]
exact mul_le_mul hk hzeta (norm_nonneg _)
(add_nonneg (Real.exp_nonneg _) (by norm_num))
-- algebra: (e^{(4/9)σ}+1)·2^{−(σ−2)} = 4·e^{−cσ} + 4·2^{−σ}
have halg : (Real.exp ((4 / 9) * σ) + 1) * ((2 : ℝ) ^ (-(σ - 2))) =
4 * Real.exp (-(Real.log 2 - 4 / 9) * σ) + 4 * (2 : ℝ) ^ (-σ) := by
have h2 : (2 : ℝ) ^ (-(σ - 2)) = 4 * Real.exp (-(Real.log 2) * σ) := by
rw [show -(σ - 2) = -σ + 2 by ring, Real.rpow_add (by norm_num : (0:ℝ) < 2)]
have h2m2 : (2 : ℝ) ^ (2 : ℝ) = 4 := by
rw [show (2 : ℝ) = ((2 : ℕ) : ℝ) by norm_num, Real.rpow_natCast]
norm_num
rw [h2m2]
congr 1
· rw [Real.rpow_def_of_pos (by norm_num : (0:ℝ) < 2)]
congr 1
ring
...
```
Hmm — getting complicated with rpow. The 2^{−x} = e^{−x log 2} conversion: Real.rpow_def_of_pos : 0 < x → x ^ y = Real.exp (y * Real.log x) — with x = 2, y = −σ: 2^{−σ} = e^{−σ·log 2} ✓.
Let me structure halg:
```
have halg : (Real.exp ((4 / 9) * σ) + 1) * ((2 : ℝ) ^ (-(σ - 2))) =
4 * Real.exp (-(Real.log 2 - 4 / 9) * σ) + 4 * (2 : ℝ) ^ (-σ) := by
have h2a : (2 : ℝ) ^ (-(σ - 2)) = 4 * (2 : ℝ) ^ (-σ) := by
rw [show -(σ - 2) = -σ + 2 by ring, Real.rpow_add (by norm_num : (0:ℝ) < 2),
show (2 : ℝ) ^ ((2 : ℝ)) = (4 : ℝ) by
rw [show ((2 : ℝ)) = ((2 : ℕ) : ℝ) by norm_num, Real.rpow_natCast]; norm_num]
ring
rw [h2a]
have h2b : (2 : ℝ) ^ (-σ) = Real.exp (-(Real.log 2) * σ) := by
rw [Real.rpow_def_of_pos (by norm_num : (0 : ℝ) < 2)]
congr 1
ring
rw [h2b]
have h4 : Real.exp ((4 / 9) * σ) * (4 * Real.exp (-(Real.log 2) * σ)) =
4 * Real.exp (-(Real.log 2 - 4 / 9) * σ) := by
rw [← Real.exp_add]
congr 1
have h8 : Real.exp ((Real.log 2) * 2) = 4 := by
rw [← Real.exp_nat_mul, Real.exp_log (by norm_num : (0:ℝ) < 2)]
norm_num
...
```
Getting messy. Alternative cleaner: prove halg by showing both sides equal via exp-of-sum:
LHS = (e^{(4/9)σ}+1)·4·2^{−σ} = 4·[e^{(4/9)σ}·2^{−σ} + 2^{−σ}]
4·e^{−cσ} = 4·e^{(4/9)σ−σ log2}·... : e^{(4/9)σ}·2^{−σ} = e^{(4/9)σ}·e^{−σ log2} = e^{(4/9)σ−σ log2} = e^{−(log2−4/9)σ} = e^{−cσ} ✓.
So LHS = 4·(e^{−cσ} + 2^{−σ}) = RHS ✓ (4·e^{−cσ} + 4·2^{−σ}).
Cleanest derivation:
```
have h2b : (2 : ℝ) ^ (-σ) = Real.exp (-(Real.log 2) * σ) := by
rw [Real.rpow_def_of_pos (by norm_num : (0 : ℝ) < 2)]
congr 1
ring
have h2a : (2 : ℝ) ^ (-(σ - 2)) = 4 * (2 : ℝ) ^ (-σ) := by
rw [show (-(σ - 2)) = -σ + 2 by ring, Real.rpow_add (by norm_num : (0 : ℝ) < 2)]
have h22 : (2 : ℝ) ^ ((2 : ℕ) : ℝ) = 4 := by
rw [Real.rpow_natCast]
norm_num
rw [show ((2 : ℕ) : ℝ) = (2 : ℝ) by norm_num] at h22 -- hmm circular
...
```
The (2:ℝ)^(2:ℝ) = 4: ((2:ℝ))^((2:ℕ):ℝ) = (2:ℝ)^(2:ℕ) via rpow_natCast = 4 by norm_num:
```
have h22 : (2 : ℝ) ^ ((2 : ℕ) : ℝ) = (4 : ℝ) := by
rw [Real.rpow_natCast]
norm_num
```
Real.rpow_natCast (x : ℝ) (n : ℕ) : x ^ ((n : ℝ)) = x ^ n ✓ — so rw [Real.rpow_natCast] turns (2:ℝ)^((2:ℕ):ℝ) into (2:ℝ)^(2:ℕ) = 4 by norm_num ✓. But the goal's exponent after rpow_add is (2 : ℝ) (the numeral-real) not ((2:ℕ):ℝ) — need the cast bridge: (2:ℝ) = ((2:ℕ):ℝ) by norm_num (Nat.cast_ofNat ✓ — actually (2:ℕ):ℝ as a term: `(2 : ℕ) : ℝ` and `(2 : ℝ)` — norm_num proves equal ✓).
So h2a:
```
have h2a : (2 : ℝ) ^ (-(σ - 2)) = 4 * (2 : ℝ) ^ (-σ) := by
rw [show (-(σ - 2)) = -σ + 2 by ring, Real.rpow_add (by norm_num : (0 : ℝ) < 2)]
have h22 : (2 : ℝ) ^ (2 : ℝ) = (4 : ℝ) := by
rw [show ((2 : ℝ)) = (((2 : ℕ) : ℝ)) by norm_num, Real.rpow_natCast]
norm_num
rw [h22]
ring
```
Hmm the h22's rw [show (2:ℝ) = ((2:ℕ):ℝ) ...] rewrites the GOAL's (2:ℝ)^? — risky (rewrites all (2:ℝ) occurrences incl the base!). The base is (2:ℝ) too — rewriting base (2:ℝ) → ((2:ℕ):ℝ) gives ((2:ℕ):ℝ)^((2:ℕ):ℝ)?? then rpow_natCast needs the EXPONENT as ((2:ℕ):ℝ) ✓ then → ((2:ℕ):ℝ)^(2:ℕ) = 4 by norm_num ✓ — but rw [show (2:ℝ) = ((2:ℕ):ℝ)] rewrites EVERYWHERE (base too) — fine, the final norm_num closes ((2:ℕ):ℝ)^(2:ℕ) = 4 ✓. But the "rewrites everywhere" gotcha — within h22's tiny goal it's harmless (all occurrences become the cast form ✓).
Cleaner alternative for h22: `have h22 : (2 : ℝ) ^ (2 : ℝ) = (4 : ℝ) := by norm_num [show ((2 : ℝ)) = ((2 : ℕ) : ℝ) by norm_num, Real.rpow_natCast]`?? — norm_num with the cast bridge inline... or simply:
```
have h22 : (2 : ℝ) ^ ((2 : ℕ) : ℝ) = (4 : ℝ) := by
rw [Real.rpow_natCast]
norm_num
```
and then use it via: the exponent after rpow_add is (2:ℝ) — convert with `show ((2 : ℕ) : ℝ) = (2 : ℝ) from by norm_num` used as a rewrite in the right direction: rw [← this_show]... I'll just do:
```
rw [show (-(σ - 2)) = -σ + 2 by ring, Real.rpow_add (by norm_num : (0 : ℝ) < 2),
show ((2 : ℝ)) = (((2 : ℕ) : ℝ)) by norm_num, Real.rpow_natCast]
```
wait — the `show ((2:ℝ)) = ((2:ℕ):ℝ)` rewrites (2:ℝ) → ((2:ℕ):ℝ) EVERYWHERE in the goal — goal at that point: (2:ℝ)^(-σ+2) = 4·(2:ℝ)^(-σ): rewriting all (2:ℝ): ((2:ℕ):ℝ)^(-σ+2) = 4·((2:ℕ):ℝ)^(-σ)?? hmm no — rw [show ((2:ℝ)) = (((2:ℕ):ℝ)) by norm_num] rewrites occurrences of the PATTERN (2:ℝ) — both bases AND the exponent position... wait the goal at that point is `(2:ℝ) ^ (-σ + 2) = 4 * (2 : ℝ) ^ (-σ)`?? No wait — after rpow_add, the LHS became (2:ℝ)^(-σ)·(2:ℝ)^(2:ℝ) — hmm no: rpow_add : x^(y+z) = x^y·x^z: (2:ℝ)^(-σ+2) → (2:ℝ)^(-σ)·(2:ℝ)^(2:ℝ). So goal: (2:ℝ)^(-σ)·(2:ℝ)^(2:ℝ) = 4·(2:ℝ)^(-σ). rw [show (2:ℝ) = ((2:ℕ):ℝ)]: rewrites ALL (2:ℝ) atoms INCLUDING the (2:ℝ)^(-σ) bases and the (2:ℝ)^(2:ℝ) base and exponent — everything becomes ((2:ℕ):ℝ) ✓ then rw [Real.rpow_natCast] — rewrites ((2:ℕ):ℝ)^((2:ℕ):ℝ)?? — rpow_natCast pattern is x ^ (↑n) with x := ?, n := ? — it will match the FIRST rpow with a nat-cast exponent — the ((2:ℕ):ℝ)^(-σ) has exponent −σ (not a cast) ✓ skip; the ((2:ℕ):ℝ)^((2:ℕ):ℝ) has exponent ((2:ℕ):ℝ) = ↑(2:ℕ) ✓ matches → ((2:ℕ):ℝ)^(2:ℕ). Then norm_num : ((2:ℕ):ℝ)^(2:ℕ) = 4 and the goal becomes 4·(2:ℝ)^(-σ) = 4·(2:ℝ)^(-σ) — wait the casts changed everywhere — the RHS's (2:ℝ)^(-σ) also became ((2:ℕ):ℝ)^(-σ) and LHS's matching ✓ then the goal is ((2:ℕ):ℝ)^(-σ)·4 = 4·((2:ℕ):ℝ)^(-σ) ✓ `ring` closes (mul comm) ✓. But norm_num was supposed to close after rpow_natCast... the rw chain ends with Real.rpow_natCast and then I need a final norm_num/ring — sequence: rw [show, rpow_add, show, rpow_natCast]; ring?? after rpow_natCast the goal: ((2:ℕ):ℝ)^(-σ)·((2:ℕ):ℝ)^(2:ℕ) = 4·((2:ℕ):ℝ)^(-σ): ((2:ℕ):ℝ)^(2:ℕ) — norm_num can evaluate ((2:ℕ):ℝ)^(2:ℕ) = 4? It's (2:ℝ)^2 = 4 — but the term is ((2:ℕ):ℝ) — norm_num normalizes casts ✓ probably computes it. If not, `norm_num [Real.rpow_natCast]`... I'm overcomplicating. Alternative SIMPLE route for 2^(2:ℝ) = 4: `Real.rpow_two (x : ℝ) : x ^ (2 : ℝ) = x ^ 2`!! There's `Real.rpow_two : x ^ (2 : ℝ) = x ^ 2` — exists? Hmm — I recall `Real.rpow_two (x : ℝ) : x ^ (2 : ℝ) = x * x` or x^2 — let me just use the npow bridge once for the whole goal:
Simplest robust overall approach for halg: avoid rpow_add entirely by working with the exponent arithmetic at the EXP level only:
```
have h2b : (2 : ℝ) ^ (-σ) = Real.exp (-(Real.log 2) * σ) := by
rw [Real.rpow_def_of_pos (by norm_num : (0 : ℝ) < 2)]
congr 1
ring
have h2a : (2 : ℝ) ^ (-(σ - 2)) = 4 * (2 : ℝ) ^ (-σ) := by
rw [h2b]
have e : (-(σ - 2)) = -σ + 2 := by ring
rw [e, Real.rpow_add (by norm_num : (0 : ℝ) < 2), h2b]
have h22 : (2 : ℝ) ^ (2 : ℝ) = 4 := by
rw [Real.rpow_def_of_pos (by norm_num : (0 : ℝ) < 2)]
calc Real.exp ((2 : ℝ) * Real.log 2)
= Real.exp (Real.log 2 * 2) := by congr 1; ring
_ = (Real.exp (Real.log 2)) ^ 2 := by rw [← Real.exp_nat_mul]
_ = 4 := by rw [Real.exp_log (by norm_num : (0 : ℝ) < 2)]; norm_num
rw [h22]
ring
```
Hmm — Real.exp_nat_mul : exp (↑n * x) = (exp x)^n — for (exp (log 2))^2: rw [← Real.exp_nat_mul] turns exp(log 2 * 2)... exp(log2·2) with 2 a REAL literal — exp_nat_mul needs ↑n * x with n : ℕ: log 2 * 2 — is `log 2 * 2` of the form ↑n * x? log2·2 = 2·log2 (comm): the exponent after `congr 1; ring` — I made it `Real.log 2 * 2` — hmm the ← Real.exp_nat_mul pattern is exp (↑n * x) — with n = 2, x = log 2: exp (↑2 * log 2) — the term is exp (Real.log 2 * 2) — mul_comm issue: ↑2 * log 2 vs log 2 * 2 — rw [← Real.exp_nat_mul] might not match due to comm. Use `Real.exp_two_mul`?? or just: exp (2 * log 2) = (exp (log 2))^2 via Real.exp_nat_mul directly: Real.exp_nat_mul (Real.log 2) 2 : exp (↑2 * log 2) = (exp (log 2))^2 — so write the exponent as ↑2 * log 2: `(2 : ℝ) * Real.log 2 = ((2 : ℕ) : ℝ) * Real.log 2`?? — ugh the cast.
SIMPLEST: bypass: (2:ℝ)^(2:ℝ) = 4 — prove by:
```
have h22 : (2 : ℝ) ^ (2 : ℝ) = 4 := by
rw [Real.rpow_two]
norm_num
```
Does Real.rpow_two exist? In Mathlib: `Real.rpow_two (x : ℝ) : x ^ (2 : ℝ) = x ^ 2` — I'm fairly confident this exists (there's Real.rpow_one : x ^ (1 : ℝ) = x, Real.rpow_zero, Real.rpow_natCast, Real.rpow_two...). Let me check quickly with grep. If it exists, h22 is 2 lines.
For halg's final assembly:
```
rw [h2a, h2b]
have hexp_alg : Real.exp ((4 / 9) * σ) * Real.exp (-(Real.log 2) * σ) =
Real.exp (-(Real.log 2 - 4 / 9) * σ) := by
rw [← Real.exp_add]
congr 1
ring
calc (Real.exp ((4 / 9) * σ) + 1) * (4 * Real.exp (-(Real.log 2) * σ))
= 4 * (Real.exp ((4 / 9) * σ) * Real.exp (-(Real.log 2) * σ)) +
4 * Real.exp (-(Real.log 2) * σ) := by ring
_ = 4 * Real.exp (-(Real.log 2 - 4 / 9) * σ) + 4 * Real.exp (-(Real.log 2) * σ) := by
rw [hexp_alg]
_ = 4 * Real.exp (-(Real.log 2 - 4 / 9) * σ) + 4 * (2 : ℝ) ^ (-σ) := by rw [h2b]
```
✓ clean.
Then the certified constants for the capstone:
- c := Real.log 2 − 4/9; hc : 0.2487 ≤ c (log_two_gt_d9 : 0.6931471803 ≤ log 2: c ≥ 0.6931471803 − 0.4444444444... — 4/9 ≤ 0.4444444445: c ≥ 0.2487027358 ≥ 0.2487 ✓).
- e^{4/3} ≤ 3.8073: e^{4/3} = e·e^{1/3}: e^{1/3} ≤ 1.4006 (the (1−x/16)⁻¹⁶ trick at x = 1/3: (1−(1/3)/16)⁻¹⁶ = (1−1/48)⁻¹⁶ = (48/47)¹⁶: need (48/47)¹⁶ ≤ 1.4006 — a rational power bound — norm_num-able: (48/47)¹⁶ ≤ 1.4006 ⟺ 48¹⁶ ≤ 1.4006·47¹⁶ — huge integers — norm_num might choke but it's a single closed rational inequality (48^16 = 2.9e26, 47^16 = 2.1e26·1.4006 — computable by decide/norm_num with big numbers... risky. Alternative: e^{1/3} ≤ 1.3957 (tighter, true 1.39561): via e^{1/3} = 1/e^{−1/3} ≥ ... — for UPPER: e^{1/3} ≤ (Σ₀ᴷ (1/3)^i/i!)⁻¹?? no — the standard route in the project: exp_le_inv_sub_sixteen (exp x ≤ (1−x/16)⁻¹⁶) exists in LiBasePoints ✓ REUSE IT: exp (1/3) ≤ (1−(1/3)/16)⁻¹⁶ = (47/48)⁻¹⁶ = (48/47)¹⁶. Then need (48/47)¹⁶ ≤ 1.4006 — via norm_num: (48/47)¹⁶ as a rational: 48^16/47^16 — norm_num evaluates powers of numerals: (48/47)^16 = 48^16/47^16 and compares to 1.4006 = 7003/5000: cross-multiplied integer inequality: 48^16·5000 ≤ 7003·47^16 — norm_num can do it (big numbers but norm_num handles ~30-digit integers routinely). So:
```
have he13 : Real.exp (1 / 3) ≤ (1.4006 : ℝ) :=
le_trans (exp_le_inv_sub_sixteen (by norm_num) (by norm_num)) (by norm_num)
```
exp_le_inv_sub_sixteen {x} (hx0 : 0 ≤ x) (hx1 : x < 16) : exp x ≤ (1 − x/16)⁻¹ ^ 16 ✓ — with x = 1/3: (1 − (1/3)/16)⁻¹^16 = (1−1/48)⁻¹^16 = (47/48)⁻¹^16 = (48/47)^16 — the le_trans needs (47/48)⁻¹^16 ≤ 1.4006 by norm_num — the ⁻¹^16: ((47/48)⁻¹)^16 = (48/47)^16 ✓ norm_num should evaluate.
Then e^{4/3} = e·e^{1/3} ≤ 2.7182818286·1.4006 = 3.80720... → charge 3.8073:
```
have he43 : Real.exp (4 / 3) ≤ (3.8073 : ℝ) := by
rw [show (4 / 3 : ℝ) = 1 + 1 / 3 by norm_num, Real.exp_add]
calc Real.exp 1 * Real.exp (1 / 3) ≤ 2.7182818286 * 1.4006 :=
mul_le_mul Real.exp_one_lt_d9.le he13 (Real.exp_pos _).le (by norm_num)
_ ≤ 3.8073 := by norm_num
```
2.7182818286·1.4006 = 3.80718 ≤ 3.8073 ✓.
- e^{−3c} = e^{4/3}/8: e^{−3c} = e^{−3(log2−4/9)} = e^{−3log2+4/3} = e^{4/3}·e^{−3log2}; e^{−3log2} = (e^{log2})^{−3} = 2^{−3} = 1/8 ✓.
- log 2 for the 1/(2 log 2) term: 1/(2·0.6931471803) = 0.72134 → charge 0.7214.
The R_DL assembly: e^{4/3}/(2c) + 1/(2 log2) ≤ 3.8073/(2·0.2487) + 0.7214 = 3.8073/0.4974 + 0.7214 = 7.6544+0.7214 = 8.3758 → charge 8.38.
DL-3d (the integrals + capstone):
```lean
/-- ∫₃^XR 4·e^{−cσ}dσ ≤ e^{4/3}/(2c) and ∫₃^XR 4·2^{−σ}dσ ≤ 1/(2 log 2),
the capstone: ‖HIntegral (Jlag n) 3 XR U‖ ≤ 8.38. -/
```
The integral bound: ‖HIntegral (Jlag n) 3 XR U‖ = ‖∫_3^XR Jlag(σ+iU)dσ‖ ≤ ∫_3^XR ‖Jlag‖ dσ ≤ ∫_3^XR (4e^{−cσ}+4·2^{−σ})·dirichletC2 dσ = dirichletC2·[4∫e^{−cσ} + 4∫2^{−σ}] ≤ dirichletC2·[e^{4/3}/(2c)+1/(2 log2)] ≤ 8.38 (dirichletC2 ≤ 1).
The route: intervalIntegral.norm_integral_le_of_norm_le (the Basic.lean:755 version: (hab : a ≤ b) (h : ∀ᵐ t, t ∈ Ioc a b → ‖f t‖ ≤ g t) (hbound : IntervalIntegrable g μ a b) : ‖∫ f‖ ≤ ∫ g) with g = the envelope (integrable: continuous exp/rpow ✓). Then ∫ g = the FTC evaluations.
FTC: ∫_{3}^{XR} Real.exp (−cσ) dσ = (−e^{−c·XR}/c) − (−e^{−3c}/c) = (e^{−3c}−e^{−cXR})/c ≤ e^{−3c}/c. Via `intervalIntegral.integral_eq_sub_of_hasDerivAt (hf : ∀ x ∈ Icc, HasDerivAt F (f x) x) (hcont : ContinuousOn f ...)`: ∫ f = F(XR)−F(3) with F = fun σ => −exp(−cσ)/c: HasDerivAt F (exp(−cσ)) σ ✓ (chain: d/dσ[−exp(−cσ)/c] = −exp(−cσ)·(−c)/c = exp(−cσ) ✓).
Hmm — check the exact FTC lemma name in this Mathlib: `intervalIntegral.integral_eq_sub_of_hasDerivAt (h : ∀ x ∈ uIcc a b, HasDerivAt f' (f x) x) (hcont : ContinuousOn f (uIcc a b)) : ∫ x in a..b, f' x ∂μ = f b - f a`?? — something like that. There are several variants (integral_eq_sub_of_hasDerivAt, integral_eq_sub_of_hasDerivAt_of_le...). Let me check when I get there.
This DL-3d is another ~200 lines. Given the length already, let me get DL-3c (envelope + constants) written and compiling first, then DL-3d.
DL-3a/3b green. Now DL-3c — the product envelope + algebra + certified constants. Checking `Real.rpow_two` exists for the 2^(2:ℝ) = 4 step.
tool: Bash
input
{
"command": "cd D:/Python/Quantum/zeta-23-lean && grep -rn \"theorem rpow_two\\|lemma rpow_two\" .lake/packages/mathlib/Mathlib/Analysis/SpecialFunctions/Pow/*.lean 2>/dev/null | head -3; grep -rn \"theorem integral_eq_sub_of_hasDerivAt\\b\" .lake/packages/mathlib/Mathlib/MeasureTheory/Integral/IntervalIntegral/*.lean 2>/dev/null | head -4",
"description": "Check Real.rpow_two and FTC lemma names"
}
raw content_json (database row)
[{"type":"thinking","thinking":"Clean compile. DL-3a + DL-3b done (zeta halving + kernel envelope). Now DL-3c (product envelope + certified constants) and DL-3d (integrals + capstone).\n\nDL-3c design:\n```lean\n/-- The product envelope: ‖Jlag n (σ+iU)‖ ≤ (4·e^{−cσ} + 4·2^{−σ})·dirichletC2\nwith c = log 2 − 4/9. -/\ntheorem Jlag_dogleg_norm_le_envelope {n : ℕ} {σ U : ℝ}\n (hσ : 3 ≤ σ) (hU : 0 < U) (hnU : (n : ℝ) ≤ (4 / 9) * U ^ 2) (t : ℝ) :\n ‖Jlag n ((σ : ℝ) + t * Complex.I)‖ ≤\n (4 * Real.exp (-(Real.log 2 - 4 / 9) * σ) + 4 * (2 : ℝ) ^ (-σ)) * dirichletC2 := by\n -- ‖Jlag‖ ≤ (‖(1+1/(w−1))ⁿ‖+1)·‖ζ′/ζ‖\n -- ‖(1+1/(w−1))ⁿ‖ ≤ e^{(4/9)σ} (DL-3b); ‖ζ′/ζ‖ ≤ 2^{−(σ−2)}·dirichletC2 (DL-3a)\n -- product: e^{(4/9)σ}·2^{−(σ−2)} = 4·e^{−cσ}; plus 2^{−(σ−2)} = 4·2^{−σ}\n```\nKey algebra: e^{(4/9)σ}·2^{−(σ−2)} = e^{(4/9)σ}·e^{−(σ−2)log2} = e^{(4/9)σ − (σ−2)log2} = e^{2log2 + ((4/9)−log2)σ} = e^{2log2}·e^{−(log2−4/9)σ} = 4·e^{−cσ} (e^{2log2} = (e^{log2})² = 4 ✓). And 2^{−(σ−2)} = 2^{−σ+2} = 4·2^{−σ} ✓.\n\nJlag's norm: Jlag n w = kFun n w * (−logDeriv ζ w): ‖Jlag‖ = ‖kFun‖·‖logDeriv‖. kFun n w = (w/(w−1))ⁿ − 1 — hmm — the kernel envelope lemma is about (1+1/(w−1))ⁿ — and kFun n w = (w/(w−1))ⁿ − 1 = (1+1/(w−1))ⁿ − 1: w/(w−1) = 1+1/(w−1) ✓ (the kFun_add_one-style identity at w−1: (w−1+1)/(w−1) = 1+1/(w−1) ✓). So ‖kFun n w‖ ≤ ‖(1+1/(w−1))ⁿ‖ + 1 — need (w/(w−1)) = 1+1/(w−1) as a complex identity: w/(w−1) = (w−1+1)/(w−1) = 1+1/(w−1) ✓ (w−1 ≠ 0 since im = U > 0 ✓).\n\nWith w = σ+it: w−1 = (σ−1)+it ✓ the envelope lemma applies at (σ, t) with hU := t > 0 — hmm the envelope lemma takes {σ U : ℝ} with the point ((σ:ℝ)−1)+U·I ✓ exactly w−1 with U := t.\n\nSo:\n```\ntheorem Jlag_dogleg_norm_le_envelope {n : ℕ} {σ t : ℝ}\n (hσ : 3 ≤ σ) (ht : 0 < t) (hnU : (n : ℝ) ≤ (4 / 9) * t ^ 2) :\n ‖Jlag n ((σ : ℝ) + t * Complex.I)‖ ≤\n (4 * Real.exp (-(Real.log 2 - 4 / 9) * σ) + 4 * (2 : ℝ) ^ (-σ)) * dirichletC2 := by\n have hw1 : (((σ : ℝ) + t * Complex.I) - 1) = ((σ : ℝ) - 1) + t * Complex.I := by\n push_cast\n ring\n have hwid : ((σ : ℝ) + t * Complex.I) / (((σ : ℝ) + t * Complex.I) - 1) =\n 1 + 1 / (((σ : ℝ) - 1) + t * Complex.I) := by\n rw [hw1]\n field_simp [show (((σ : ℝ) - 1) + t * Complex.I) ≠ 0 from ...]\n ring\n have hker := one_add_div_pow_norm_le_exp_four_ninths hσ ht hnU\n have hzeta := norm_logDeriv_zeta_le_two_pow (show (2 : ℝ) ≤ σ by linarith) (t := t)\n -- ‖kFun‖ ≤ e^{(4/9)σ} + 1\n have hk : ‖kFun n ((σ : ℝ) + t * Complex.I)‖ ≤ Real.exp ((4 / 9) * σ) + 1 := by\n unfold kFun\n rw [hwid]\n calc ‖(1 + 1 / (((σ : ℝ) - 1) + t * Complex.I)) ^ n - 1‖\n ≤ ‖(1 + 1 / (((σ : ℝ) - 1) + t * Complex.I)) ^ n‖ + ‖(1 : ℂ)‖ := norm_sub_le _ _\n _ = ‖(1 + 1 / (((σ : ℝ) - 1) + t * Complex.I))‖ ^ n + 1 := by rw [norm_pow, norm_one]\n _ ≤ Real.exp ((4 / 9) * σ) + 1 := by linarith [hker]\n -- the product\n have hprod : ‖Jlag n ((σ : ℝ) + t * Complex.I)‖ ≤\n (Real.exp ((4 / 9) * σ) + 1) * ((2 : ℝ) ^ (-(σ - 2)) * dirichletC2) := by\n have hn3 : ‖Jlag n ((σ : ℝ) + t * Complex.I)‖ =\n ‖kFun n ((σ : ℝ) + t * Complex.I)‖ *\n ‖logDeriv riemannZeta ((σ : ℝ) + t * Complex.I)‖ := by\n show ‖kFun n ((σ : ℝ) + t * Complex.I) *\n (-logDeriv riemannZeta ((σ : ℝ) + t * Complex.I))‖ = _\n rw [norm_mul, norm_neg]\n rw [hn3]\n exact mul_le_mul hk hzeta (norm_nonneg _)\n (add_nonneg (Real.exp_nonneg _) (by norm_num))\n -- algebra: (e^{(4/9)σ}+1)·2^{−(σ−2)} = 4·e^{−cσ} + 4·2^{−σ}\n have halg : (Real.exp ((4 / 9) * σ) + 1) * ((2 : ℝ) ^ (-(σ - 2))) =\n 4 * Real.exp (-(Real.log 2 - 4 / 9) * σ) + 4 * (2 : ℝ) ^ (-σ) := by\n have h2 : (2 : ℝ) ^ (-(σ - 2)) = 4 * Real.exp (-(Real.log 2) * σ) := by\n rw [show -(σ - 2) = -σ + 2 by ring, Real.rpow_add (by norm_num : (0:ℝ) < 2)]\n have h2m2 : (2 : ℝ) ^ (2 : ℝ) = 4 := by\n rw [show (2 : ℝ) = ((2 : ℕ) : ℝ) by norm_num, Real.rpow_natCast]\n norm_num\n rw [h2m2]\n congr 1\n · rw [Real.rpow_def_of_pos (by norm_num : (0:ℝ) < 2)]\n congr 1\n ring\n ...\n```\nHmm — getting complicated with rpow. The 2^{−x} = e^{−x log 2} conversion: Real.rpow_def_of_pos : 0 < x → x ^ y = Real.exp (y * Real.log x) — with x = 2, y = −σ: 2^{−σ} = e^{−σ·log 2} ✓.\n\nLet me structure halg:\n```\n have halg : (Real.exp ((4 / 9) * σ) + 1) * ((2 : ℝ) ^ (-(σ - 2))) =\n 4 * Real.exp (-(Real.log 2 - 4 / 9) * σ) + 4 * (2 : ℝ) ^ (-σ) := by\n have h2a : (2 : ℝ) ^ (-(σ - 2)) = 4 * (2 : ℝ) ^ (-σ) := by\n rw [show -(σ - 2) = -σ + 2 by ring, Real.rpow_add (by norm_num : (0:ℝ) < 2),\n show (2 : ℝ) ^ ((2 : ℝ)) = (4 : ℝ) by\n rw [show ((2 : ℝ)) = ((2 : ℕ) : ℝ) by norm_num, Real.rpow_natCast]; norm_num]\n ring\n rw [h2a]\n have h2b : (2 : ℝ) ^ (-σ) = Real.exp (-(Real.log 2) * σ) := by\n rw [Real.rpow_def_of_pos (by norm_num : (0 : ℝ) < 2)]\n congr 1\n ring\n rw [h2b]\n have h4 : Real.exp ((4 / 9) * σ) * (4 * Real.exp (-(Real.log 2) * σ)) =\n 4 * Real.exp (-(Real.log 2 - 4 / 9) * σ) := by\n rw [← Real.exp_add]\n congr 1\n have h8 : Real.exp ((Real.log 2) * 2) = 4 := by\n rw [← Real.exp_nat_mul, Real.exp_log (by norm_num : (0:ℝ) < 2)]\n norm_num\n ... \n```\nGetting messy. Alternative cleaner: prove halg by showing both sides equal via exp-of-sum:\nLHS = (e^{(4/9)σ}+1)·4·2^{−σ} = 4·[e^{(4/9)σ}·2^{−σ} + 2^{−σ}]\n4·e^{−cσ} = 4·e^{(4/9)σ−σ log2}·... : e^{(4/9)σ}·2^{−σ} = e^{(4/9)σ}·e^{−σ log2} = e^{(4/9)σ−σ log2} = e^{−(log2−4/9)σ} = e^{−cσ} ✓.\nSo LHS = 4·(e^{−cσ} + 2^{−σ}) = RHS ✓ (4·e^{−cσ} + 4·2^{−σ}).\n\nCleanest derivation:\n```\n have h2b : (2 : ℝ) ^ (-σ) = Real.exp (-(Real.log 2) * σ) := by\n rw [Real.rpow_def_of_pos (by norm_num : (0 : ℝ) < 2)]\n congr 1\n ring\n have h2a : (2 : ℝ) ^ (-(σ - 2)) = 4 * (2 : ℝ) ^ (-σ) := by\n rw [show (-(σ - 2)) = -σ + 2 by ring, Real.rpow_add (by norm_num : (0 : ℝ) < 2)]\n have h22 : (2 : ℝ) ^ ((2 : ℕ) : ℝ) = 4 := by\n rw [Real.rpow_natCast]\n norm_num\n rw [show ((2 : ℕ) : ℝ) = (2 : ℝ) by norm_num] at h22 -- hmm circular\n ...\n```\nThe (2:ℝ)^(2:ℝ) = 4: ((2:ℝ))^((2:ℕ):ℝ) = (2:ℝ)^(2:ℕ) via rpow_natCast = 4 by norm_num: \n```\n have h22 : (2 : ℝ) ^ ((2 : ℕ) : ℝ) = (4 : ℝ) := by\n rw [Real.rpow_natCast]\n norm_num\n```\nReal.rpow_natCast (x : ℝ) (n : ℕ) : x ^ ((n : ℝ)) = x ^ n ✓ — so rw [Real.rpow_natCast] turns (2:ℝ)^((2:ℕ):ℝ) into (2:ℝ)^(2:ℕ) = 4 by norm_num ✓. But the goal's exponent after rpow_add is (2 : ℝ) (the numeral-real) not ((2:ℕ):ℝ) — need the cast bridge: (2:ℝ) = ((2:ℕ):ℝ) by norm_num (Nat.cast_ofNat ✓ — actually (2:ℕ):ℝ as a term: `(2 : ℕ) : ℝ` and `(2 : ℝ)` — norm_num proves equal ✓).\n\nSo h2a:\n```\n have h2a : (2 : ℝ) ^ (-(σ - 2)) = 4 * (2 : ℝ) ^ (-σ) := by\n rw [show (-(σ - 2)) = -σ + 2 by ring, Real.rpow_add (by norm_num : (0 : ℝ) < 2)]\n have h22 : (2 : ℝ) ^ (2 : ℝ) = (4 : ℝ) := by\n rw [show ((2 : ℝ)) = (((2 : ℕ) : ℝ)) by norm_num, Real.rpow_natCast]\n norm_num\n rw [h22]\n ring\n```\nHmm the h22's rw [show (2:ℝ) = ((2:ℕ):ℝ) ...] rewrites the GOAL's (2:ℝ)^? — risky (rewrites all (2:ℝ) occurrences incl the base!). The base is (2:ℝ) too — rewriting base (2:ℝ) → ((2:ℕ):ℝ) gives ((2:ℕ):ℝ)^((2:ℕ):ℝ)?? then rpow_natCast needs the EXPONENT as ((2:ℕ):ℝ) ✓ then → ((2:ℕ):ℝ)^(2:ℕ) = 4 by norm_num ✓ — but rw [show (2:ℝ) = ((2:ℕ):ℝ)] rewrites EVERYWHERE (base too) — fine, the final norm_num closes ((2:ℕ):ℝ)^(2:ℕ) = 4 ✓. But the \"rewrites everywhere\" gotcha — within h22's tiny goal it's harmless (all occurrences become the cast form ✓).\n\nCleaner alternative for h22: `have h22 : (2 : ℝ) ^ (2 : ℝ) = (4 : ℝ) := by norm_num [show ((2 : ℝ)) = ((2 : ℕ) : ℝ) by norm_num, Real.rpow_natCast]`?? — norm_num with the cast bridge inline... or simply:\n```\n have h22 : (2 : ℝ) ^ ((2 : ℕ) : ℝ) = (4 : ℝ) := by\n rw [Real.rpow_natCast]\n norm_num\n```\nand then use it via: the exponent after rpow_add is (2:ℝ) — convert with `show ((2 : ℕ) : ℝ) = (2 : ℝ) from by norm_num` used as a rewrite in the right direction: rw [← this_show]... I'll just do:\n```\n rw [show (-(σ - 2)) = -σ + 2 by ring, Real.rpow_add (by norm_num : (0 : ℝ) < 2),\n show ((2 : ℝ)) = (((2 : ℕ) : ℝ)) by norm_num, Real.rpow_natCast]\n```\nwait — the `show ((2:ℝ)) = ((2:ℕ):ℝ)` rewrites (2:ℝ) → ((2:ℕ):ℝ) EVERYWHERE in the goal — goal at that point: (2:ℝ)^(-σ+2) = 4·(2:ℝ)^(-σ): rewriting all (2:ℝ): ((2:ℕ):ℝ)^(-σ+2) = 4·((2:ℕ):ℝ)^(-σ)?? hmm no — rw [show ((2:ℝ)) = (((2:ℕ):ℝ)) by norm_num] rewrites occurrences of the PATTERN (2:ℝ) — both bases AND the exponent position... wait the goal at that point is `(2:ℝ) ^ (-σ + 2) = 4 * (2 : ℝ) ^ (-σ)`?? No wait — after rpow_add, the LHS became (2:ℝ)^(-σ)·(2:ℝ)^(2:ℝ) — hmm no: rpow_add : x^(y+z) = x^y·x^z: (2:ℝ)^(-σ+2) → (2:ℝ)^(-σ)·(2:ℝ)^(2:ℝ). So goal: (2:ℝ)^(-σ)·(2:ℝ)^(2:ℝ) = 4·(2:ℝ)^(-σ). rw [show (2:ℝ) = ((2:ℕ):ℝ)]: rewrites ALL (2:ℝ) atoms INCLUDING the (2:ℝ)^(-σ) bases and the (2:ℝ)^(2:ℝ) base and exponent — everything becomes ((2:ℕ):ℝ) ✓ then rw [Real.rpow_natCast] — rewrites ((2:ℕ):ℝ)^((2:ℕ):ℝ)?? — rpow_natCast pattern is x ^ (↑n) with x := ?, n := ? — it will match the FIRST rpow with a nat-cast exponent — the ((2:ℕ):ℝ)^(-σ) has exponent −σ (not a cast) ✓ skip; the ((2:ℕ):ℝ)^((2:ℕ):ℝ) has exponent ((2:ℕ):ℝ) = ↑(2:ℕ) ✓ matches → ((2:ℕ):ℝ)^(2:ℕ). Then norm_num : ((2:ℕ):ℝ)^(2:ℕ) = 4 and the goal becomes 4·(2:ℝ)^(-σ) = 4·(2:ℝ)^(-σ) — wait the casts changed everywhere — the RHS's (2:ℝ)^(-σ) also became ((2:ℕ):ℝ)^(-σ) and LHS's matching ✓ then the goal is ((2:ℕ):ℝ)^(-σ)·4 = 4·((2:ℕ):ℝ)^(-σ) ✓ `ring` closes (mul comm) ✓. But norm_num was supposed to close after rpow_natCast... the rw chain ends with Real.rpow_natCast and then I need a final norm_num/ring — sequence: rw [show, rpow_add, show, rpow_natCast]; ring?? after rpow_natCast the goal: ((2:ℕ):ℝ)^(-σ)·((2:ℕ):ℝ)^(2:ℕ) = 4·((2:ℕ):ℝ)^(-σ): ((2:ℕ):ℝ)^(2:ℕ) — norm_num can evaluate ((2:ℕ):ℝ)^(2:ℕ) = 4? It's (2:ℝ)^2 = 4 — but the term is ((2:ℕ):ℝ) — norm_num normalizes casts ✓ probably computes it. If not, `norm_num [Real.rpow_natCast]`... I'm overcomplicating. Alternative SIMPLE route for 2^(2:ℝ) = 4: `Real.rpow_two (x : ℝ) : x ^ (2 : ℝ) = x ^ 2`!! There's `Real.rpow_two : x ^ (2 : ℝ) = x ^ 2` — exists? Hmm — I recall `Real.rpow_two (x : ℝ) : x ^ (2 : ℝ) = x * x` or x^2 — let me just use the npow bridge once for the whole goal:\n\nSimplest robust overall approach for halg: avoid rpow_add entirely by working with the exponent arithmetic at the EXP level only:\n```\n have h2b : (2 : ℝ) ^ (-σ) = Real.exp (-(Real.log 2) * σ) := by\n rw [Real.rpow_def_of_pos (by norm_num : (0 : ℝ) < 2)]\n congr 1\n ring\n have h2a : (2 : ℝ) ^ (-(σ - 2)) = 4 * (2 : ℝ) ^ (-σ) := by\n rw [h2b]\n have e : (-(σ - 2)) = -σ + 2 := by ring\n rw [e, Real.rpow_add (by norm_num : (0 : ℝ) < 2), h2b]\n have h22 : (2 : ℝ) ^ (2 : ℝ) = 4 := by\n rw [Real.rpow_def_of_pos (by norm_num : (0 : ℝ) < 2)]\n calc Real.exp ((2 : ℝ) * Real.log 2)\n = Real.exp (Real.log 2 * 2) := by congr 1; ring\n _ = (Real.exp (Real.log 2)) ^ 2 := by rw [← Real.exp_nat_mul]\n _ = 4 := by rw [Real.exp_log (by norm_num : (0 : ℝ) < 2)]; norm_num\n rw [h22]\n ring\n```\nHmm — Real.exp_nat_mul : exp (↑n * x) = (exp x)^n — for (exp (log 2))^2: rw [← Real.exp_nat_mul] turns exp(log 2 * 2)... exp(log2·2) with 2 a REAL literal — exp_nat_mul needs ↑n * x with n : ℕ: log 2 * 2 — is `log 2 * 2` of the form ↑n * x? log2·2 = 2·log2 (comm): the exponent after `congr 1; ring` — I made it `Real.log 2 * 2` — hmm the ← Real.exp_nat_mul pattern is exp (↑n * x) — with n = 2, x = log 2: exp (↑2 * log 2) — the term is exp (Real.log 2 * 2) — mul_comm issue: ↑2 * log 2 vs log 2 * 2 — rw [← Real.exp_nat_mul] might not match due to comm. Use `Real.exp_two_mul`?? or just: exp (2 * log 2) = (exp (log 2))^2 via Real.exp_nat_mul directly: Real.exp_nat_mul (Real.log 2) 2 : exp (↑2 * log 2) = (exp (log 2))^2 — so write the exponent as ↑2 * log 2: `(2 : ℝ) * Real.log 2 = ((2 : ℕ) : ℝ) * Real.log 2`?? — ugh the cast.\n\nSIMPLEST: bypass: (2:ℝ)^(2:ℝ) = 4 — prove by:\n```\n have h22 : (2 : ℝ) ^ (2 : ℝ) = 4 := by\n rw [Real.rpow_two]\n norm_num\n```\nDoes Real.rpow_two exist? In Mathlib: `Real.rpow_two (x : ℝ) : x ^ (2 : ℝ) = x ^ 2` — I'm fairly confident this exists (there's Real.rpow_one : x ^ (1 : ℝ) = x, Real.rpow_zero, Real.rpow_natCast, Real.rpow_two...). Let me check quickly with grep. If it exists, h22 is 2 lines.\n\nFor halg's final assembly:\n```\n rw [h2a, h2b]\n have hexp_alg : Real.exp ((4 / 9) * σ) * Real.exp (-(Real.log 2) * σ) =\n Real.exp (-(Real.log 2 - 4 / 9) * σ) := by\n rw [← Real.exp_add]\n congr 1\n ring\n calc (Real.exp ((4 / 9) * σ) + 1) * (4 * Real.exp (-(Real.log 2) * σ))\n = 4 * (Real.exp ((4 / 9) * σ) * Real.exp (-(Real.log 2) * σ)) +\n 4 * Real.exp (-(Real.log 2) * σ) := by ring\n _ = 4 * Real.exp (-(Real.log 2 - 4 / 9) * σ) + 4 * Real.exp (-(Real.log 2) * σ) := by\n rw [hexp_alg]\n _ = 4 * Real.exp (-(Real.log 2 - 4 / 9) * σ) + 4 * (2 : ℝ) ^ (-σ) := by rw [h2b]\n```\n✓ clean.\n\nThen the certified constants for the capstone:\n- c := Real.log 2 − 4/9; hc : 0.2487 ≤ c (log_two_gt_d9 : 0.6931471803 ≤ log 2: c ≥ 0.6931471803 − 0.4444444444... — 4/9 ≤ 0.4444444445: c ≥ 0.2487027358 ≥ 0.2487 ✓).\n- e^{4/3} ≤ 3.8073: e^{4/3} = e·e^{1/3}: e^{1/3} ≤ 1.4006 (the (1−x/16)⁻¹⁶ trick at x = 1/3: (1−(1/3)/16)⁻¹⁶ = (1−1/48)⁻¹⁶ = (48/47)¹⁶: need (48/47)¹⁶ ≤ 1.4006 — a rational power bound — norm_num-able: (48/47)¹⁶ ≤ 1.4006 ⟺ 48¹⁶ ≤ 1.4006·47¹⁶ — huge integers — norm_num might choke but it's a single closed rational inequality (48^16 = 2.9e26, 47^16 = 2.1e26·1.4006 — computable by decide/norm_num with big numbers... risky. Alternative: e^{1/3} ≤ 1.3957 (tighter, true 1.39561): via e^{1/3} = 1/e^{−1/3} ≥ ... — for UPPER: e^{1/3} ≤ (Σ₀ᴷ (1/3)^i/i!)⁻¹?? no — the standard route in the project: exp_le_inv_sub_sixteen (exp x ≤ (1−x/16)⁻¹⁶) exists in LiBasePoints ✓ REUSE IT: exp (1/3) ≤ (1−(1/3)/16)⁻¹⁶ = (47/48)⁻¹⁶ = (48/47)¹⁶. Then need (48/47)¹⁶ ≤ 1.4006 — via norm_num: (48/47)¹⁶ as a rational: 48^16/47^16 — norm_num evaluates powers of numerals: (48/47)^16 = 48^16/47^16 and compares to 1.4006 = 7003/5000: cross-multiplied integer inequality: 48^16·5000 ≤ 7003·47^16 — norm_num can do it (big numbers but norm_num handles ~30-digit integers routinely). So:\n```\n have he13 : Real.exp (1 / 3) ≤ (1.4006 : ℝ) :=\n le_trans (exp_le_inv_sub_sixteen (by norm_num) (by norm_num)) (by norm_num)\n```\nexp_le_inv_sub_sixteen {x} (hx0 : 0 ≤ x) (hx1 : x < 16) : exp x ≤ (1 − x/16)⁻¹ ^ 16 ✓ — with x = 1/3: (1 − (1/3)/16)⁻¹^16 = (1−1/48)⁻¹^16 = (47/48)⁻¹^16 = (48/47)^16 — the le_trans needs (47/48)⁻¹^16 ≤ 1.4006 by norm_num — the ⁻¹^16: ((47/48)⁻¹)^16 = (48/47)^16 ✓ norm_num should evaluate.\nThen e^{4/3} = e·e^{1/3} ≤ 2.7182818286·1.4006 = 3.80720... → charge 3.8073:\n```\n have he43 : Real.exp (4 / 3) ≤ (3.8073 : ℝ) := by\n rw [show (4 / 3 : ℝ) = 1 + 1 / 3 by norm_num, Real.exp_add]\n calc Real.exp 1 * Real.exp (1 / 3) ≤ 2.7182818286 * 1.4006 :=\n mul_le_mul Real.exp_one_lt_d9.le he13 (Real.exp_pos _).le (by norm_num)\n _ ≤ 3.8073 := by norm_num\n```\n2.7182818286·1.4006 = 3.80718 ≤ 3.8073 ✓.\n\n- e^{−3c} = e^{4/3}/8: e^{−3c} = e^{−3(log2−4/9)} = e^{−3log2+4/3} = e^{4/3}·e^{−3log2}; e^{−3log2} = (e^{log2})^{−3} = 2^{−3} = 1/8 ✓.\n- log 2 for the 1/(2 log 2) term: 1/(2·0.6931471803) = 0.72134 → charge 0.7214.\n\nThe R_DL assembly: e^{4/3}/(2c) + 1/(2 log2) ≤ 3.8073/(2·0.2487) + 0.7214 = 3.8073/0.4974 + 0.7214 = 7.6544+0.7214 = 8.3758 → charge 8.38.\n\nDL-3d (the integrals + capstone):\n```lean\n/-- ∫₃^XR 4·e^{−cσ}dσ ≤ e^{4/3}/(2c) and ∫₃^XR 4·2^{−σ}dσ ≤ 1/(2 log 2),\nthe capstone: ‖HIntegral (Jlag n) 3 XR U‖ ≤ 8.38. -/\n```\nThe integral bound: ‖HIntegral (Jlag n) 3 XR U‖ = ‖∫_3^XR Jlag(σ+iU)dσ‖ ≤ ∫_3^XR ‖Jlag‖ dσ ≤ ∫_3^XR (4e^{−cσ}+4·2^{−σ})·dirichletC2 dσ = dirichletC2·[4∫e^{−cσ} + 4∫2^{−σ}] ≤ dirichletC2·[e^{4/3}/(2c)+1/(2 log2)] ≤ 8.38 (dirichletC2 ≤ 1).\n\nThe route: intervalIntegral.norm_integral_le_of_norm_le (the Basic.lean:755 version: (hab : a ≤ b) (h : ∀ᵐ t, t ∈ Ioc a b → ‖f t‖ ≤ g t) (hbound : IntervalIntegrable g μ a b) : ‖∫ f‖ ≤ ∫ g) with g = the envelope (integrable: continuous exp/rpow ✓). Then ∫ g = the FTC evaluations.\n\nFTC: ∫_{3}^{XR} Real.exp (−cσ) dσ = (−e^{−c·XR}/c) − (−e^{−3c}/c) = (e^{−3c}−e^{−cXR})/c ≤ e^{−3c}/c. Via `intervalIntegral.integral_eq_sub_of_hasDerivAt (hf : ∀ x ∈ Icc, HasDerivAt F (f x) x) (hcont : ContinuousOn f ...)`: ∫ f = F(XR)−F(3) with F = fun σ => −exp(−cσ)/c: HasDerivAt F (exp(−cσ)) σ ✓ (chain: d/dσ[−exp(−cσ)/c] = −exp(−cσ)·(−c)/c = exp(−cσ) ✓). \n\nHmm — check the exact FTC lemma name in this Mathlib: `intervalIntegral.integral_eq_sub_of_hasDerivAt (h : ∀ x ∈ uIcc a b, HasDerivAt f' (f x) x) (hcont : ContinuousOn f (uIcc a b)) : ∫ x in a..b, f' x ∂μ = f b - f a`?? — something like that. There are several variants (integral_eq_sub_of_hasDerivAt, integral_eq_sub_of_hasDerivAt_of_le...). Let me check when I get there.\n\nThis DL-3d is another ~200 lines. Given the length already, let me get DL-3c (envelope + constants) written and compiling first, then DL-3d.","signature":""},{"type":"text","text":"DL-3a/3b green. Now DL-3c — the product envelope + algebra + certified constants. Checking `Real.rpow_two` exists for the 2^(2:ℝ) = 4 step."},{"type":"tool_use","id":"Bash_252","name":"Bash","input":{"command":"cd D:/Python/Quantum/zeta-23-lean && grep -rn \"theorem rpow_two\\|lemma rpow_two\" .lake/packages/mathlib/Mathlib/Analysis/SpecialFunctions/Pow/*.lean 2>/dev/null | head -3; grep -rn \"theorem integral_eq_sub_of_hasDerivAt\\b\" .lake/packages/mathlib/Mathlib/MeasureTheory/Integral/IntervalIntegral/*.lean 2>/dev/null | head -4","description":"Check Real.rpow_two and FTC lemma names"},"extra_content":null}]