← Session 18 — Lean tier (ii): finite-height proof + certified base points
thinking (17433 chars)
Plan: new file `NguyenRH1/LiBasePoints.lean` with:
- exp/log machinery
- certified log bounds
- sInftyLower and Bn bounds at both points
- hbase, hbase2 theorems
- final `lambda_pos_finite_height_verified` (3 hypotheses)
Then update NguyenRH1.lean root import + header, PrintAxioms additions.
Let me write the file. Careful points:
1. The `sInftyLower` γ-cancellation: sInftyLower n = (1/2)*n*log n + (lagariasC1 − γ/2)*n − 4. Prove a normalization lemma:
```
theorem sInftyLower_eq (n : ℝ) :
sInftyLower n = (1/2)*n*Real.log n − ((1 + Real.log 2 + Real.log Real.pi)/2)*n − 4 := by
unfold sInftyLower lagariasC1
rw [Real.log_mul (by norm_num : (2:ℝ) ≠ 0) Real.pi_ne_zero]
ring
```
(γ cancels in the ring.)
2. log 80000 ≥ 11.263: 80000 ≥ exp 11.263. exp 11.263 = exp(11 + 0.263) = exp 11 · exp 0.263. exp 11 = (exp 1)^11 ≤ 2.7182818286^11 (pow_le_pow_left (exp_pos).le (Real.exp_one_lt_d9.le) 11 — need Real.exp_one_lt_d9 : exp 1 < 2.7182818286 ✓ used in file). exp 0.263 ≤ (1/(1−0.263/16))^16 via my exp-upper lemma. Product ≤ 59874.3·1.3076 = 78287... hold on, D-062 plan used e^11.263 ≤ 78056 (2.43% margin) — with exp_hi(0.263, 16) = (1/(1−0.0164375))^16 = (1/0.9835625)^16: ln(1/0.9835625) = 0.0165737×16 = 0.265179, e^0.265179 = 1.30364. So e^0.263 ≤ 1.30364; e^11 ≤ 2.7182818286^11: compute exact: 2.7182818286^11 — earlier python: e11_hi = 59874.30 (with e1hi^11). 59874.30·1.30364 = 78057.9. ≤ 80000 ✓ margin 2.4%.
The Lean form: 80000 ≥ exp(11.263) ⟸ exp(11.263) ≤ 78058: exp(11.263) = exp(11)·exp(0.263): 11.263 = 11+0.263 by norm_num... The rpow/literal: 11.263 as ℝ literal. exp(11.263) = exp(11 + 0.263)? 11 + 0.263 = 11.263 ✓ norm_num. exp 11 = exp(11·1) = (exp 1)^11 via Real.exp_nat_mul 1 11 : exp (↑11 * 1) = (exp 1)^11; need ↑11 * 1 = (11 : ℝ) by norm_num. Hmm — Real.exp_nat_mul x n : exp (↑n * x) = exp x ^ n. With x = 1, n = 11: exp (↑11 * 1) = exp 1 ^ 11. So exp 11 = (exp 1)^11 after rewriting ↑11*1 = 11 — messy casts. Alternative: exp(11 : ℝ) — write 11 as (11 : ℕ): there's `Real.exp_natCast`? Simpler: build via repeated exp_add? Ugly. Or: norm_num handles ↑11 * 1 = 11? The have: h11 : Real.exp 11 = Real.exp 1 ^ 11 := by rw [← Real.exp_nat_mul 1 11]; norm_num — rw ← turns goal into exp (↑11 * 1) = ... hmm `Real.exp_nat_mul 1 11 : Real.exp (↑11 * 1) = Real.exp 1 ^ 11`. So `rw [← Real.exp_nat_mul]` on goal `Real.exp 11 = Real.exp 1 ^ 11` — ← direction rewrites `Real.exp 1 ^ 11` to `Real.exp (↑11 * 1)` giving `Real.exp 11 = Real.exp (↑11 * 1)`; then `norm_num` proves? norm_num can show ↑11 * 1 = 11 then congruence... `norm_num` might not close exp 11 = exp (↑11*1) directly — use `congr 1; norm_num`? push_cast: ↑11 * 1 = 11: `by push_cast; ring`? So:
h11 : Real.exp 11 = Real.exp 1 ^ 11 := by
rw [← Real.exp_nat_mul 1 11]
congr 1
push_cast
ring
✓
3. exp upper lemma:
```
theorem Real.exp_le_inv_one_sub_sixteen {x : ℝ} (hx0 : 0 ≤ x) (hx1 : x < 16) :
Real.exp x ≤ (1 - x / 16)⁻¹ ^ 16 := by
have hx16 : 0 ≤ x / 16 := by positivity
have hx16' : x / 16 < 1 := by linarith
have h1 : (1 : ℝ) - x / 16 ≤ Real.exp (-(x / 16)) := by
have := Real.add_one_le_exp (-(x / 16))
linarith
rw [Real.exp_neg] at h1
have hpos : (0 : ℝ) < 1 - x / 16 := by linarith
have h2 : Real.exp (x / 16) ≤ (1 - x / 16)⁻¹ := by
have h3 := one_div_le_one_div_of_le hpos h1
rwa [one_div, one_div, inv_inv] at h3
have h4 : (Real.exp (x / 16)) ^ 16 ≤ ((1 - x / 16)⁻¹) ^ 16 :=
pow_le_pow_left (Real.exp_nonneg _) h2 16
have h5 : Real.exp x = (Real.exp (x / 16)) ^ 16 := by
rw [← Real.exp_nat_mul (x / 16) 16]
congr 1
field_simp -- 16 * (x/16) = x... (↑16 * (x/16)) = x: by field_simp? or ring: norm_num [mul_div_assoc]? (16:ℝ) * (x/16) = x by field_simp? simply: have : (16:ℝ) ≠ 0 := by norm_num; field_simp — or: rw [mul_div_cancel₀ x (by norm_num : (16:ℝ) ≠ 0)] — (↑16 * (x/16)): rw [mul_div_cancel₀]? mul_div_cancel₀ : a ≠ 0 → b * a / b = b... form mismatch. (16:ℝ) * (x/16) = x: `mul_div_cancel_left₀`? There are several; safest: field_simp then ring? field_simp on equation (↑16 * (x/16)) = x: multiply out: ↑16 * x / 16... let me just: have : ((16:ℕ) : ℝ) * (x / 16) = x := by field_simp — might close directly; or `by norm_num [mul_div_assoc]`... The robust:
have h16 : ((16:ℕ) : ℝ) ≠ 0 := by norm_num
rw [show ((16:ℕ) : ℝ) * (x / 16) = x by field_simp]
rw [h5]
exact h4
```
Hmm — cast subtleties: Real.exp_nat_mul (x/16) 16 : exp (↑16 * (x/16)) = exp (x/16) ^ 16. rw ← on goal exp x = (exp (x/16))^16: RHS exp(x/16)^16 → exp(↑16*(x/16)); goal becomes exp x = exp (↑16 * (x/16)); congr 1 → x = ↑16 * (x/16) or ↑16*(x/16) = x depending on congr orientation; field_simp with h16. I'll write `congr 1; field_simp` and fix at compile.
4. log80000_lo : (11.263 : ℝ) ≤ Real.log 80000:
```
have h1 : Real.exp 11.263 ≤ 80000 := ... (chain above)
have h2 := Real.log_le_log (Real.exp_pos _) h1 -- log (exp 11.263) ≤ log 80000
rwa [Real.log_exp] at h2
```
Wait direction: exp 11.263 ≤ 80000 ⟹ 11.263 = log(exp 11.263) ≤ log 80000 ✓.
5. For log80000_up : log 80000 ≤ 11.3 ⟸ 80000 ≤ exp 11.3: exp 11.3 = exp 11 · exp 0.3 ≥ 2.7182818283^11 · Σ_{i<7}(0.3^i/i!): Real.exp_one_gt_d9 : 2.7182818283 < exp 1? The file used Real.exp_one_lt_d9 (exp 1 < 2.7182818286). The gt variant: Real.exp_one_gt_d9 : 2.7182818283 < Real.exp 1 ✓ (iimaj used log_two_gt_d9; block_range_bounds used exp_one_lt_d9). Assume exp_one_gt_d9 exists — grep later.
pow_le_pow_left (by norm_num : 0 ≤ 2.7182818283) (Real.exp_one_gt_d9.le) 11 : 2.7182818283^11 ≤ (exp 1)^11 = exp 11 ✓.
exp 0.3 ≥ Σ_{i<7} 0.3^i/i! = 1.3498588... : Real.sum_le_exp_of_nonneg (x := 0.3) (by norm_num) 7.
product: 59874.13·1.3498588 = 80820.9 ≥ 80000 ✓ (norm_num [Finset.sum_range_succ]).
6. logpi_up : Real.log Real.pi ≤ 1.1448 ⟸ π ≤ exp 1.1448: exp 1.1448 = exp 1 · exp 0.1448 ≥ 2.7182818283 · Σ_{i<9}(0.1448^i/i!) ≥ 3.1415926536 ≥ π (pi_lt_d20). Sum Σ_{i<9} 0.1448^i/i!: compute: terms i=0..8: 1, 0.1448, 0.01048(0.1448²/2 = 0.01048352), 0.1448³/6 = 0.000506084, /24 = 0.0000183225, /120 = 5.306e-7, /720 = 1.2804e-8, /5040 = 2.6485e-10, /40320 = 4.794e-12. Sum: 1+0.1448+0.01048352+0.000506084+0.0000183225+0.0000005306+0.0000000128+0.00000000026+0.0000000000048 ≈ 1.15580847. ×2.7182818283 = 3.1418134 ≥ 3.1415926536 ✓ margin 0.007%. norm_num [Finset.sum_range_succ] then mul_le_mul then Real.log_le_log (pi_pos) ... ✓.
7. logpi_lo : 1.14 ≤ Real.log Real.pi ⟸ exp 1.14 ≤ π: exp 1.14 = exp 1·exp 0.14 ≤ 2.7182818286·(1/(1−0.14/16))^16: (1/(1−0.00875))^16 = (1/0.99125)^16: ln(1/0.99125) = 0.00878854; ×16 = 0.1406166; e^0.1406166 = 1.15098. So ≤ 2.7182818286·1.15098 = 3.12839 ≤ 3.1415926535 ≤ π (pi_gt_d20) ✓ margin 0.42%.
8. Assembly of slower bounds via sInftyLower_eq + log80000 bounds + log2/logπ bounds:
```
theorem sInftyLower_80000_lo : (336000 : ℝ) ≤ sInftyLower 80000 := by
rw [sInftyLower_eq]
-- 40000·log 80000 − 40000·(1 + log 2 + log π) − 4...
-- wait: (1/2)·80000·log 80000 − ((1+log2+logπ)/2)·80000 − 4
have h1 : (11.263 : ℝ) ≤ Real.log 80000 := log80000_lo
have h2 : Real.log 2 ≤ 0.6931472 := le_of_lt Real.log_two_lt_d9 — check the d9 constant: log_two_lt_d9 : log 2 < 0.6931471808; so log 2 ≤ 0.6931471808 ≤ 0.6931472 ✓
have h3 : Real.log Real.pi ≤ 1.1448 := logpi_up
-- 1 + log2 + logπ ≤ 1 + 0.6931472 + 1.1448 = 2.8379472
-- (1/2)·80000·11.263 = 450520; (2.8379472/2)·80000 = 113517.888
-- 450520 − 113517.888 − 4 = 336998.112 ≥ 336000
nlinarith? or: have hcoef : 1 + Real.log 2 + Real.log Real.pi ≤ 2.8379472 := by linarith
then nlinarith [h1, hcoef] — the product terms: (1/2)*80000*log 80000 ≥ (1/2)*80000*11.263 needs monotonicity — nlinarith with hints or manual mul_le_mul. Manual:
have e1 : (0:ℝ) ≤ 80000 := by norm_num
have g1 : (1/2 : ℝ)*80000*11.263 ≤ (1/2)*80000*Real.log 80000 := by
have := mul_le_mul_of_nonneg_left h1 (by norm_num : (0:ℝ) ≤ (1/2)*80000)
-- this : (1/2)*80000*11.263 ≤ (1/2)*80000*log 80000 — mul_le_mul_of_nonneg_left gives c*x ≤ c*y form: c·11.263 ≤ c·log80000 ✓ but written as c * 11.263 vs (1/2)*80000*11.263 — same by assoc ✓ linarith [this]
have g2 : ((1 + Real.log 2 + Real.log Real.pi)/2)*80000 ≤ (2.8379472/2)*80000 := by
apply mul_le_mul_of_nonneg_right _ e1' — div_le_div... : (x/2)*80000 ≤ (y/2)*80000 ⟸ x ≤ y: mul_le_mul_of_nonneg_right (div_le_div_of_nonneg_left? no — div by 2 monotone: div_le_div_right (by norm_num : 0 < 2)... `div_le_div_right : 0 < c → a/c ≤ b/c ↔ a ≤ b`? something like that. Then ·80000.
linarith [g1, g2] — combine with the explicit form.
```
This is all routine but voluminous. Total estimate checks out (~500 lines).
Actually, let me simplify by NORMALIZING with explicit numerals early: prove
`sInftyLower 80000 = 40000 * Real.log 80000 - 40000 * (1 + Real.log 2 + Real.log Real.pi) - 4` via sInftyLower_eq + ring? (1/2)*80000*log = 40000·log ✓; ((1+log2+logπ)/2)*80000 = (1+log2+logπ)*40000 ✓ ring handles. Then the bound:
40000·11.263 − 40000·2.8379472 − 4 = 40000·(11.263 − 2.8379472) − 4 = 40000·8.4250528 − 4 = 337002.1 − 4 = 336998.1.
Hmm 40000·8.4250528 = 337002.11; −4 = 336998.11 ≥ 336000 ✓.
With h1 : log 80000 ≥ 11.263 and hcoef : 1+log2+logπ ≤ 2.8379472:
40000·log80000 − 40000·(1+log2+logπ) − 4 ≥ 40000·11.263 − 40000·2.8379472 − 4:
- mul_le_mul_of_nonneg_left h1 (40000 ≥ 0): 40000·11.263 ≤ 40000·log80000
- mul_le_mul_of_nonneg_left hcoef: 40000·(1+log2+logπ) ≤ 40000·2.8379472
- linarith. ✓ clean.
9. Bn bounds — the biggest piece. Structure as separate lemmas per n:
```
theorem Bn_FAlt_80000_le : Bn FAlt 80000 ≤ (328000 : ℝ)
theorem Bn_FAlt_80000_ge : (274000 : ℝ) ≤ Bn FAlt 80000
theorem Bn_FAlt_100000_le : Bn FAlt 100000 ≤ (347000 : ℝ)
```
Each needs T-bounds, log bounds at T, etc. The T for 80000: T = √80000 + 1. Bn's `let T := ...`. Unfold: simp only [Bn] or show the expanded form.
Shared per-point facts:
- sqrt80000_le : Real.sqrt 80000 ≤ 283 (Real.sqrt_le_left (by norm_num) : √80000 ≤ 283 ↔ 80000 ≤ 283²; mpr norm_num)
- sqrt80000_ge : 282 ≤ Real.sqrt 80000 (Real.le_sqrt (by norm_num) (by norm_num): 282 ≤ √80000 ↔ 282² ≤ 80000 ✓)
- T8 := √80000+1 ∈ [283, 284].
- logT8_up : log T8 ≤ 5.7: T8 ≤ 284 ≤ exp 5.7: exp5.7 = exp 5·exp 0.7: exp 5 = (exp 1)^5 ≥ 2.7182818283^5 = 148.328...; exp 0.7 ≥ Σ_{i<7} = 2.0136...; product ≥ 298.86 ≥ 284 ✓.
- loglogT8_up : log (log T8) ≤ 1.75: log T8 ≤ 5.7 ≤ exp 1.75 (5.7546): log(log T8) ≤ log 5.7 ≤ 1.75 — need 0 < log T8 for log_le_log: log T8 > 0 ⟸ T8 > 1 ✓.
- logT28_up : log (T8+2) ≤ 5.7: T8+2 ≤ 286 ≤ 298.86 ✓.
- loglogT28_up : log (log (T8+2)) ≤ 1.75 ✓.
- logT28_lo : log (T8+2) ≥ 5.6: T8+2 ≥ 285 ≥ exp 5.6 (273.56 via upper-trick) — wait: log 285 ≥ 5.6 ⟸ 285 ≥ exp 5.6 ⟸ 285 ≥ 273.57 ≥ exp 5.6. exp 5.6 ≤ 273.57: exp 5.6 = exp 5·exp 0.6 ≤ 2.7182818286^5·(1/(1−0.6/16))^16: (1/0.9625)^16: ln(1/0.9625) = 0.0382208; ×16 = 0.611533; e^0.611533 = 1.84317. 2.7182818286^5 = 148.41357; ×1.84317 = 273.555 ≤ 285 ✓.
- loglogT28_lo : log (log (T8+2)) ≥ 0: log(T8+2) ≥ 1 ⟸ T8+2 ≥ e: 285 ≥ 2.7182818286 ✓ (Real.log_le_log with exp 1... log(T8+2) ≥ log 285 ≥ 5.6 ≥ 1 — simpler: from logT28_lo ≥ 5.6 ≥ 1 ✓ linarith). Then log(log(T8+2)) ≥ log 1 = 0? No — Real.log_nonneg: 1 ≤ x → 0 ≤ log x ✓.
Similarly for 100000:
- sqrt100000_le : √100000 ≤ 317 (317² = 100489)
- sqrt100000_ge : 316 ≤ √100000? Only need upper for Bn-le. T10 ∈ [·, 318].
- logT10_up : log T10 ≤ 5.8: T10 ≤ 318 ≤ exp 5.8 (330.1): exp 5.8 = exp 5·exp 0.8 ≥ 148.328·2.22554 = 330.09 ≥ 318 ✓ (Σ_{i<7} 0.8^i/i! = 2.22554...).
- loglogT10_up : ≤ 1.77: 5.8 ≤ exp 1.77 = e·exp 0.77 ≥ 2.7182818283·2.15972294 = 5.87071 ≥ 5.8 ✓ (Σ_{i<7} 0.77^i/i!: 1+0.77+0.29645+0.0760883+0.014647+0.0022496+0.000288 = 2.1597...).
- logT210_up : log (T10+2) ≤ 5.8 (T10+2 ≤ 320 ≤ 330.1 ✓).
- loglogT210_up : ≤ 1.77 ✓.
Lower pieces for Bn80000-ge also need: T8 ≥ 283 ✓; FAlt T8 ≥ 0: components: (1/(2π))·(T8·log T8) ≥ 0 (T8 ≥ 0, log T8 ≥ 0 ⟸ T8 ≥ 1 ✓ — Real.log_nonneg), 0.137·log T8 ≥ 0, 0.443·log log T8 ≥ 0 (log T8 ≥ 1 ⟸ T8 ≥ e: 283 ≥ 2.7182818286 ✓ — via Real.log_le_log: log e = 1 ≤ log T8 ⟸ e ≤ T8), const ≥ 0. So FAlt T8 ≥ 0 ✓.
- C0hat T8 ≥ 0.433·5.6 + 0.886·0 + 2.9 = 5.3248: from log(T8+2) ≥ 5.6 (0.433·5.6 ≤ 0.433·log(T8+2) ✓), log log ≥ 0 ✓.
- Hhat T8 ≥ 3·5.3248² + 10.5·5.6 + 48: C0hat² ≥ 5.3248² (C0hat ≥ 5.3248 ≥ 0, pow_le_pow_left).
- IIMaj ≥ 0: psiTilde s ≥ 0 — 4.56·((s+1)·(e^..+e^..)): exp_pos, s+1 > 0 ✓.
- 40·1.3352 = 53.408 ✓ norm_num.
- 2(e⁴+1)(7Ĥ+3.3) ≥ 2·(54.5978+1)·(7·191.87+3.3): e⁴ ≥ 54.5978 ((exp 1)^4 ≥ 2.7182818283^4 = 54.5981500...); 7Ĥ+3.3 ≥ 7·191.87+3.3 = 1346.39; product ≥ 111.1956·1346.39 = 149717.2. Then assemble: 0 + 124916.2 + 53.408 + 149717.2 + 0 + 1 = 274687.8 ≥ 274000 ✓.
For the upper bounds mul_le_mul chains need nonnegativity of lower factors: e.g. 4T8·[...] ≤ 4·284·[...]: T8 ≤ 284 with bracket ≥ 0: bracket = (2/3)C0hat + 10.5 log(T+2) + 48 ≥ 0+0+48 > 0 ✓. And 4·T8 ≤ 4·284. Then 4T8·br ≤ 4·284·br_up: two-step mul_le_mul (4T8 ≤ 4·284, br ≤ br_up, 0 ≤ br (for first mul: need 0 ≤ br... mul_le_mul : a ≤ b → c ≤ d → 0 ≤ c → 0 ≤ b → a·c ≤ b·d. With a = 4T8, b = 1136, c = br, d = br_up: need 0 ≤ br and 0 ≤ 4T8 → wait form: a·c ≤ b·d needs 0 ≤ c (lower factor nonneg) and 0 ≤ b. 0 ≤ br ✓ (br ≥ 48), 0 ≤ 4·284 ✓. So 4T8·br ≤ 1136·br_up ✓.)
And 2(e⁴+1)(7Ĥ+3.3) ≤ 2·55.6015·(7·251.45+3.3): nested mul_le_mul ✓.
Also the psiTilde bound for IIMaj: IIMaj n = psiTilde (√n) (IIMaj_eq_psiTilde_sqrt) and psiTilde s = 4.56·((s+1)·(Real.exp(-iimA·s)+Real.exp(-iimB·s))). But iimA/iimB/psiTilde are PRIVATE defs in LiSkeleton! `private def psiTilde`, `private def iimA/iimB` — private means NOT accessible from LiBasePoints.lean! Hmm. IIMaj_eq_psiTilde_sqrt is public (theorem) but mentions psiTilde (private) in its statement — private defs can't appear in another file's... actually private declarations in Lean 4 get name-mangled but the THEOREM IIMaj_eq_psiTilde_sqrt is public and its statement references the private psiTilde — using it from another file: the statement displays with the mangled name; I can still `rw [IIMaj_eq_psiTilde_sqrt]` — rewriting works (the LHS pattern IIMaj n is public). After the rewrite, the goal contains psiTilde (√80000) — then I need to unfold psiTilde to bound it — CAN'T from another file (private).
Solutions: (a) bound IIMaj in LiSkeleton.lean and export a public lemma `IIMaj_le (n : ℝ) (hn : 20 ≤ n) : IIMaj n ≤ 4.56 * (Real.sqrt n + 1) * 2` proved in LiSkeleton (where psiTilde is visible). Add to LiSkeleton:
```
theorem IIMaj_le_two_mul (n : ℝ) (hn : 0 ≤ n) :
IIMaj n ≤ 4.56 * (Real.sqrt n + 1) * 2 := by
rw [IIMaj_eq_psiTilde_sqrt]
unfold psiTilde
-- e^{-as}, e^{-bs} ≤ 1 (a, b > 0, s ≥ 0)
...
```
needs iimA/iimB positivity (from log2 bounds) — in-file ✓. Then LiBasePoints uses IIMaj_le_two_mul + sqrt bound. Also need IIMaj ≥ 0 for the lower bound side: public lemma IIMaj_nonneg (n : ℝ) : 0 ≤ IIMaj n — direct from def (all factors nonneg: 2^(...) rpow nonneg via Real.rpow_nonneg, exp pos...). In LiSkeleton:
```
theorem IIMaj_nonneg (n : ℝ) : 0 ≤ IIMaj n := by
unfold IIMaj
positivity -- 2 ^ (...) via rpow: positivity handles Real.rpow_nonneg? Real.rpow of positive base is positive: positivity should know rpow_pos_of_pos...
```
If positivity fails, manual: mul_nonneg chains with Real.rpow_nonneg (by norm_num : 0 ≤ 2) _, Real.exp_nonneg _, sqrt_nonneg.
Also FAlt/C0hat/Hhat/Bn/sInftyLower/marginTilde/FAlt are all public ✓. psiOf public ✓.
OK — also I realize marginTilde_eq_sub rewrites marginTilde in terms of Bn; and Bn unfolds publicly (its def uses C0hat/Hhat/IIMaj public ✓ and the let). Fine.
10. Final assembly:
```
theorem marginTilde_FAlt_80000_pos : 0 < marginTilde FAlt 80000 := by
rw [marginTilde_eq_sub]
have hS := sInftyLower_80000_lo
have hB := Bn_FAlt_80000_le
linarith
theorem marginTilde_FAlt_80000_lt_100000 :
marginTilde FAlt 80000 < marginTilde FAlt 100000 := by
rw [marginTilde_eq_sub, marginTilde_eq_sub]
have h1 := sInftyLower_80000_up -- ≤ 339000
have h2 := Bn_FAlt_80000_ge -- ≥ 274000
have h3 := sInftyLower_100000_lo -- ≥ 433000
have h4 := Bn_FAlt_100000_le -- ≤ 347000
-- margin80000 ≤ 339000 − 274000 + 1 = 65001; margin100000 ≥ 433000 − 347000 + 1 = 86001
linarith -- 65001 < 86001 ✓
theorem lambda_pos_finite_height_verified
(hRH : RHUpTo (3 * 10 ^ 12)) (hfinite : LiVerifiedUpTo (5 * 10 ^ 5))
(hSf : SfBoundProp) :
∀ n : ℕ, 1 ≤ n → (n : ℝ) ≤ (3 * 10 ^ 12 - 1 : ℝ) ^ 2 → 0 < (liCoeff n).re :=
fun n hn1 hnN => lambda_pos_finite_height hRH hfinite
marginTilde_FAlt_80000_pos marginTilde_FAlt_80000_lt_100000 hSf n hn1 hnN
```
Wait — marginTilde_eq_sub is stated as `marginTilde F n = sInftyLower n - Bn F n + 1` — rw works.
One more: the n : ℝ literals — marginTilde FAlt 80000 has 80000 : ℝ ✓ matches the hypotheses hbase : 0 < marginTilde FAlt 80000 — the hbase in lambda_pos_finite_height is `0 < marginTilde FAlt 80000` with 80000 elaborated as ℝ ✓ same term.
Now write it all. Order in LiBasePoints.lean:
1. exp machinery: exp_le_inv_one_sub_sixteen; exp_one bounds re-export? Just use Real.exp_one_gt_d9/lt_d9 — verify gt exists! grep. Also log_two names used in file: Real.log_two_gt_d9 / Real.log_two_lt_d9 ✓.
2. log/pi/sqrt certified bounds.
3. T-point log bounds.
4. sInftyLower bounds (3).
5. IIMaj bounds (need LiSkeleton additions: IIMaj_le_two_mul + IIMaj_nonneg — add to LiSkeleton first).
6. Bn bounds (3).
7. hbase/hbase2/final theorem.
Verify Real.exp_one_gt_d9 exists.
Verifying the last name (`Real.exp_one_gt_d9`) before writing.
tool: Bash
input
{
"command": "cd D:/Python/Quantum/zeta-23-lean/.lake/packages/mathlib && grep -rn \"exp_one_gt_d9\\|exp_one_lt_d9\" Mathlib/Analysis/SpecialFunctions/Exp*.lean Mathlib/Analysis/Complex/Exponential.lean Mathlib/Analysis/SpecialFunctions/Log/*.lean 2>/dev/null | head -4; grep -rn \"theorem.*sum_le_exp_of_nonneg\" Mathlib/Analysis/ | head -2",
"description": "Verify exp_one_gt_d9 and sum_le_exp_of_nonneg"
}
raw content_json (database row)
[{"type":"thinking","thinking":"Plan: new file `NguyenRH1/LiBasePoints.lean` with:\n- exp/log machinery\n- certified log bounds\n- sInftyLower and Bn bounds at both points\n- hbase, hbase2 theorems\n- final `lambda_pos_finite_height_verified` (3 hypotheses)\n\nThen update NguyenRH1.lean root import + header, PrintAxioms additions.\n\nLet me write the file. Careful points:\n1. The `sInftyLower` γ-cancellation: sInftyLower n = (1/2)*n*log n + (lagariasC1 − γ/2)*n − 4. Prove a normalization lemma:\n```\ntheorem sInftyLower_eq (n : ℝ) :\n sInftyLower n = (1/2)*n*Real.log n − ((1 + Real.log 2 + Real.log Real.pi)/2)*n − 4 := by\n unfold sInftyLower lagariasC1\n rw [Real.log_mul (by norm_num : (2:ℝ) ≠ 0) Real.pi_ne_zero]\n ring\n```\n(γ cancels in the ring.)\n\n2. log 80000 ≥ 11.263: 80000 ≥ exp 11.263. exp 11.263 = exp(11 + 0.263) = exp 11 · exp 0.263. exp 11 = (exp 1)^11 ≤ 2.7182818286^11 (pow_le_pow_left (exp_pos).le (Real.exp_one_lt_d9.le) 11 — need Real.exp_one_lt_d9 : exp 1 < 2.7182818286 ✓ used in file). exp 0.263 ≤ (1/(1−0.263/16))^16 via my exp-upper lemma. Product ≤ 59874.3·1.3076 = 78287... hold on, D-062 plan used e^11.263 ≤ 78056 (2.43% margin) — with exp_hi(0.263, 16) = (1/(1−0.0164375))^16 = (1/0.9835625)^16: ln(1/0.9835625) = 0.0165737×16 = 0.265179, e^0.265179 = 1.30364. So e^0.263 ≤ 1.30364; e^11 ≤ 2.7182818286^11: compute exact: 2.7182818286^11 — earlier python: e11_hi = 59874.30 (with e1hi^11). 59874.30·1.30364 = 78057.9. ≤ 80000 ✓ margin 2.4%.\n The Lean form: 80000 ≥ exp(11.263) ⟸ exp(11.263) ≤ 78058: exp(11.263) = exp(11)·exp(0.263): 11.263 = 11+0.263 by norm_num... The rpow/literal: 11.263 as ℝ literal. exp(11.263) = exp(11 + 0.263)? 11 + 0.263 = 11.263 ✓ norm_num. exp 11 = exp(11·1) = (exp 1)^11 via Real.exp_nat_mul 1 11 : exp (↑11 * 1) = (exp 1)^11; need ↑11 * 1 = (11 : ℝ) by norm_num. Hmm — Real.exp_nat_mul x n : exp (↑n * x) = exp x ^ n. With x = 1, n = 11: exp (↑11 * 1) = exp 1 ^ 11. So exp 11 = (exp 1)^11 after rewriting ↑11*1 = 11 — messy casts. Alternative: exp(11 : ℝ) — write 11 as (11 : ℕ): there's `Real.exp_natCast`? Simpler: build via repeated exp_add? Ugly. Or: norm_num handles ↑11 * 1 = 11? The have: h11 : Real.exp 11 = Real.exp 1 ^ 11 := by rw [← Real.exp_nat_mul 1 11]; norm_num — rw ← turns goal into exp (↑11 * 1) = ... hmm `Real.exp_nat_mul 1 11 : Real.exp (↑11 * 1) = Real.exp 1 ^ 11`. So `rw [← Real.exp_nat_mul]` on goal `Real.exp 11 = Real.exp 1 ^ 11` — ← direction rewrites `Real.exp 1 ^ 11` to `Real.exp (↑11 * 1)` giving `Real.exp 11 = Real.exp (↑11 * 1)`; then `norm_num` proves? norm_num can show ↑11 * 1 = 11 then congruence... `norm_num` might not close exp 11 = exp (↑11*1) directly — use `congr 1; norm_num`? push_cast: ↑11 * 1 = 11: `by push_cast; ring`? So:\n h11 : Real.exp 11 = Real.exp 1 ^ 11 := by\n rw [← Real.exp_nat_mul 1 11]\n congr 1\n push_cast\n ring\n ✓\n\n3. exp upper lemma:\n```\ntheorem Real.exp_le_inv_one_sub_sixteen {x : ℝ} (hx0 : 0 ≤ x) (hx1 : x < 16) :\n Real.exp x ≤ (1 - x / 16)⁻¹ ^ 16 := by\n have hx16 : 0 ≤ x / 16 := by positivity\n have hx16' : x / 16 < 1 := by linarith\n have h1 : (1 : ℝ) - x / 16 ≤ Real.exp (-(x / 16)) := by\n have := Real.add_one_le_exp (-(x / 16))\n linarith\n rw [Real.exp_neg] at h1\n have hpos : (0 : ℝ) < 1 - x / 16 := by linarith\n have h2 : Real.exp (x / 16) ≤ (1 - x / 16)⁻¹ := by\n have h3 := one_div_le_one_div_of_le hpos h1\n rwa [one_div, one_div, inv_inv] at h3\n have h4 : (Real.exp (x / 16)) ^ 16 ≤ ((1 - x / 16)⁻¹) ^ 16 :=\n pow_le_pow_left (Real.exp_nonneg _) h2 16\n have h5 : Real.exp x = (Real.exp (x / 16)) ^ 16 := by\n rw [← Real.exp_nat_mul (x / 16) 16]\n congr 1\n field_simp -- 16 * (x/16) = x... (↑16 * (x/16)) = x: by field_simp? or ring: norm_num [mul_div_assoc]? (16:ℝ) * (x/16) = x by field_simp? simply: have : (16:ℝ) ≠ 0 := by norm_num; field_simp — or: rw [mul_div_cancel₀ x (by norm_num : (16:ℝ) ≠ 0)] — (↑16 * (x/16)): rw [mul_div_cancel₀]? mul_div_cancel₀ : a ≠ 0 → b * a / b = b... form mismatch. (16:ℝ) * (x/16) = x: `mul_div_cancel_left₀`? There are several; safest: field_simp then ring? field_simp on equation (↑16 * (x/16)) = x: multiply out: ↑16 * x / 16... let me just: have : ((16:ℕ) : ℝ) * (x / 16) = x := by field_simp — might close directly; or `by norm_num [mul_div_assoc]`... The robust: \n have h16 : ((16:ℕ) : ℝ) ≠ 0 := by norm_num\n rw [show ((16:ℕ) : ℝ) * (x / 16) = x by field_simp]\n rw [h5]\n exact h4\n```\nHmm — cast subtleties: Real.exp_nat_mul (x/16) 16 : exp (↑16 * (x/16)) = exp (x/16) ^ 16. rw ← on goal exp x = (exp (x/16))^16: RHS exp(x/16)^16 → exp(↑16*(x/16)); goal becomes exp x = exp (↑16 * (x/16)); congr 1 → x = ↑16 * (x/16) or ↑16*(x/16) = x depending on congr orientation; field_simp with h16. I'll write `congr 1; field_simp` and fix at compile.\n\n4. log80000_lo : (11.263 : ℝ) ≤ Real.log 80000:\n```\n have h1 : Real.exp 11.263 ≤ 80000 := ... (chain above)\n have h2 := Real.log_le_log (Real.exp_pos _) h1 -- log (exp 11.263) ≤ log 80000\n rwa [Real.log_exp] at h2\n```\nWait direction: exp 11.263 ≤ 80000 ⟹ 11.263 = log(exp 11.263) ≤ log 80000 ✓.\n\n5. For log80000_up : log 80000 ≤ 11.3 ⟸ 80000 ≤ exp 11.3: exp 11.3 = exp 11 · exp 0.3 ≥ 2.7182818283^11 · Σ_{i<7}(0.3^i/i!): Real.exp_one_gt_d9 : 2.7182818283 < exp 1? The file used Real.exp_one_lt_d9 (exp 1 < 2.7182818286). The gt variant: Real.exp_one_gt_d9 : 2.7182818283 < Real.exp 1 ✓ (iimaj used log_two_gt_d9; block_range_bounds used exp_one_lt_d9). Assume exp_one_gt_d9 exists — grep later.\n pow_le_pow_left (by norm_num : 0 ≤ 2.7182818283) (Real.exp_one_gt_d9.le) 11 : 2.7182818283^11 ≤ (exp 1)^11 = exp 11 ✓.\n exp 0.3 ≥ Σ_{i<7} 0.3^i/i! = 1.3498588... : Real.sum_le_exp_of_nonneg (x := 0.3) (by norm_num) 7.\n product: 59874.13·1.3498588 = 80820.9 ≥ 80000 ✓ (norm_num [Finset.sum_range_succ]).\n\n6. logpi_up : Real.log Real.pi ≤ 1.1448 ⟸ π ≤ exp 1.1448: exp 1.1448 = exp 1 · exp 0.1448 ≥ 2.7182818283 · Σ_{i<9}(0.1448^i/i!) ≥ 3.1415926536 ≥ π (pi_lt_d20). Sum Σ_{i<9} 0.1448^i/i!: compute: terms i=0..8: 1, 0.1448, 0.01048(0.1448²/2 = 0.01048352), 0.1448³/6 = 0.000506084, /24 = 0.0000183225, /120 = 5.306e-7, /720 = 1.2804e-8, /5040 = 2.6485e-10, /40320 = 4.794e-12. Sum: 1+0.1448+0.01048352+0.000506084+0.0000183225+0.0000005306+0.0000000128+0.00000000026+0.0000000000048 ≈ 1.15580847. ×2.7182818283 = 3.1418134 ≥ 3.1415926536 ✓ margin 0.007%. norm_num [Finset.sum_range_succ] then mul_le_mul then Real.log_le_log (pi_pos) ... ✓.\n\n7. logpi_lo : 1.14 ≤ Real.log Real.pi ⟸ exp 1.14 ≤ π: exp 1.14 = exp 1·exp 0.14 ≤ 2.7182818286·(1/(1−0.14/16))^16: (1/(1−0.00875))^16 = (1/0.99125)^16: ln(1/0.99125) = 0.00878854; ×16 = 0.1406166; e^0.1406166 = 1.15098. So ≤ 2.7182818286·1.15098 = 3.12839 ≤ 3.1415926535 ≤ π (pi_gt_d20) ✓ margin 0.42%.\n\n8. Assembly of slower bounds via sInftyLower_eq + log80000 bounds + log2/logπ bounds:\n```\ntheorem sInftyLower_80000_lo : (336000 : ℝ) ≤ sInftyLower 80000 := by\n rw [sInftyLower_eq]\n -- 40000·log 80000 − 40000·(1 + log 2 + log π) − 4... \n -- wait: (1/2)·80000·log 80000 − ((1+log2+logπ)/2)·80000 − 4\n have h1 : (11.263 : ℝ) ≤ Real.log 80000 := log80000_lo\n have h2 : Real.log 2 ≤ 0.6931472 := le_of_lt Real.log_two_lt_d9 — check the d9 constant: log_two_lt_d9 : log 2 < 0.6931471808; so log 2 ≤ 0.6931471808 ≤ 0.6931472 ✓\n have h3 : Real.log Real.pi ≤ 1.1448 := logpi_up\n -- 1 + log2 + logπ ≤ 1 + 0.6931472 + 1.1448 = 2.8379472\n -- (1/2)·80000·11.263 = 450520; (2.8379472/2)·80000 = 113517.888\n -- 450520 − 113517.888 − 4 = 336998.112 ≥ 336000\n nlinarith? or: have hcoef : 1 + Real.log 2 + Real.log Real.pi ≤ 2.8379472 := by linarith\n then nlinarith [h1, hcoef] — the product terms: (1/2)*80000*log 80000 ≥ (1/2)*80000*11.263 needs monotonicity — nlinarith with hints or manual mul_le_mul. Manual:\n have e1 : (0:ℝ) ≤ 80000 := by norm_num\n have g1 : (1/2 : ℝ)*80000*11.263 ≤ (1/2)*80000*Real.log 80000 := by\n have := mul_le_mul_of_nonneg_left h1 (by norm_num : (0:ℝ) ≤ (1/2)*80000)\n -- this : (1/2)*80000*11.263 ≤ (1/2)*80000*log 80000 — mul_le_mul_of_nonneg_left gives c*x ≤ c*y form: c·11.263 ≤ c·log80000 ✓ but written as c * 11.263 vs (1/2)*80000*11.263 — same by assoc ✓ linarith [this]\n have g2 : ((1 + Real.log 2 + Real.log Real.pi)/2)*80000 ≤ (2.8379472/2)*80000 := by\n apply mul_le_mul_of_nonneg_right _ e1' — div_le_div... : (x/2)*80000 ≤ (y/2)*80000 ⟸ x ≤ y: mul_le_mul_of_nonneg_right (div_le_div_of_nonneg_left? no — div by 2 monotone: div_le_div_right (by norm_num : 0 < 2)... `div_le_div_right : 0 < c → a/c ≤ b/c ↔ a ≤ b`? something like that. Then ·80000.\n linarith [g1, g2] — combine with the explicit form.\n```\nThis is all routine but voluminous. Total estimate checks out (~500 lines).\n\nActually, let me simplify by NORMALIZING with explicit numerals early: prove\n`sInftyLower 80000 = 40000 * Real.log 80000 - 40000 * (1 + Real.log 2 + Real.log Real.pi) - 4` via sInftyLower_eq + ring? (1/2)*80000*log = 40000·log ✓; ((1+log2+logπ)/2)*80000 = (1+log2+logπ)*40000 ✓ ring handles. Then the bound:\n40000·11.263 − 40000·2.8379472 − 4 = 40000·(11.263 − 2.8379472) − 4 = 40000·8.4250528 − 4 = 337002.1 − 4 = 336998.1. \n\nHmm 40000·8.4250528 = 337002.11; −4 = 336998.11 ≥ 336000 ✓.\n\nWith h1 : log 80000 ≥ 11.263 and hcoef : 1+log2+logπ ≤ 2.8379472:\n40000·log80000 − 40000·(1+log2+logπ) − 4 ≥ 40000·11.263 − 40000·2.8379472 − 4:\n- mul_le_mul_of_nonneg_left h1 (40000 ≥ 0): 40000·11.263 ≤ 40000·log80000\n- mul_le_mul_of_nonneg_left hcoef: 40000·(1+log2+logπ) ≤ 40000·2.8379472\n- linarith. ✓ clean.\n\n9. Bn bounds — the biggest piece. Structure as separate lemmas per n:\n```\ntheorem Bn_FAlt_80000_le : Bn FAlt 80000 ≤ (328000 : ℝ)\ntheorem Bn_FAlt_80000_ge : (274000 : ℝ) ≤ Bn FAlt 80000\ntheorem Bn_FAlt_100000_le : Bn FAlt 100000 ≤ (347000 : ℝ)\n```\nEach needs T-bounds, log bounds at T, etc. The T for 80000: T = √80000 + 1. Bn's `let T := ...`. Unfold: simp only [Bn] or show the expanded form.\n\nShared per-point facts:\n- sqrt80000_le : Real.sqrt 80000 ≤ 283 (Real.sqrt_le_left (by norm_num) : √80000 ≤ 283 ↔ 80000 ≤ 283²; mpr norm_num)\n- sqrt80000_ge : 282 ≤ Real.sqrt 80000 (Real.le_sqrt (by norm_num) (by norm_num): 282 ≤ √80000 ↔ 282² ≤ 80000 ✓)\n- T8 := √80000+1 ∈ [283, 284].\n- logT8_up : log T8 ≤ 5.7: T8 ≤ 284 ≤ exp 5.7: exp5.7 = exp 5·exp 0.7: exp 5 = (exp 1)^5 ≥ 2.7182818283^5 = 148.328...; exp 0.7 ≥ Σ_{i<7} = 2.0136...; product ≥ 298.86 ≥ 284 ✓.\n- loglogT8_up : log (log T8) ≤ 1.75: log T8 ≤ 5.7 ≤ exp 1.75 (5.7546): log(log T8) ≤ log 5.7 ≤ 1.75 — need 0 < log T8 for log_le_log: log T8 > 0 ⟸ T8 > 1 ✓.\n- logT28_up : log (T8+2) ≤ 5.7: T8+2 ≤ 286 ≤ 298.86 ✓.\n- loglogT28_up : log (log (T8+2)) ≤ 1.75 ✓.\n- logT28_lo : log (T8+2) ≥ 5.6: T8+2 ≥ 285 ≥ exp 5.6 (273.56 via upper-trick) — wait: log 285 ≥ 5.6 ⟸ 285 ≥ exp 5.6 ⟸ 285 ≥ 273.57 ≥ exp 5.6. exp 5.6 ≤ 273.57: exp 5.6 = exp 5·exp 0.6 ≤ 2.7182818286^5·(1/(1−0.6/16))^16: (1/0.9625)^16: ln(1/0.9625) = 0.0382208; ×16 = 0.611533; e^0.611533 = 1.84317. 2.7182818286^5 = 148.41357; ×1.84317 = 273.555 ≤ 285 ✓.\n- loglogT28_lo : log (log (T8+2)) ≥ 0: log(T8+2) ≥ 1 ⟸ T8+2 ≥ e: 285 ≥ 2.7182818286 ✓ (Real.log_le_log with exp 1... log(T8+2) ≥ log 285 ≥ 5.6 ≥ 1 — simpler: from logT28_lo ≥ 5.6 ≥ 1 ✓ linarith). Then log(log(T8+2)) ≥ log 1 = 0? No — Real.log_nonneg: 1 ≤ x → 0 ≤ log x ✓.\n\nSimilarly for 100000:\n- sqrt100000_le : √100000 ≤ 317 (317² = 100489)\n- sqrt100000_ge : 316 ≤ √100000? Only need upper for Bn-le. T10 ∈ [·, 318].\n- logT10_up : log T10 ≤ 5.8: T10 ≤ 318 ≤ exp 5.8 (330.1): exp 5.8 = exp 5·exp 0.8 ≥ 148.328·2.22554 = 330.09 ≥ 318 ✓ (Σ_{i<7} 0.8^i/i! = 2.22554...).\n- loglogT10_up : ≤ 1.77: 5.8 ≤ exp 1.77 = e·exp 0.77 ≥ 2.7182818283·2.15972294 = 5.87071 ≥ 5.8 ✓ (Σ_{i<7} 0.77^i/i!: 1+0.77+0.29645+0.0760883+0.014647+0.0022496+0.000288 = 2.1597...).\n- logT210_up : log (T10+2) ≤ 5.8 (T10+2 ≤ 320 ≤ 330.1 ✓).\n- loglogT210_up : ≤ 1.77 ✓.\n\nLower pieces for Bn80000-ge also need: T8 ≥ 283 ✓; FAlt T8 ≥ 0: components: (1/(2π))·(T8·log T8) ≥ 0 (T8 ≥ 0, log T8 ≥ 0 ⟸ T8 ≥ 1 ✓ — Real.log_nonneg), 0.137·log T8 ≥ 0, 0.443·log log T8 ≥ 0 (log T8 ≥ 1 ⟸ T8 ≥ e: 283 ≥ 2.7182818286 ✓ — via Real.log_le_log: log e = 1 ≤ log T8 ⟸ e ≤ T8), const ≥ 0. So FAlt T8 ≥ 0 ✓.\n- C0hat T8 ≥ 0.433·5.6 + 0.886·0 + 2.9 = 5.3248: from log(T8+2) ≥ 5.6 (0.433·5.6 ≤ 0.433·log(T8+2) ✓), log log ≥ 0 ✓.\n- Hhat T8 ≥ 3·5.3248² + 10.5·5.6 + 48: C0hat² ≥ 5.3248² (C0hat ≥ 5.3248 ≥ 0, pow_le_pow_left).\n- IIMaj ≥ 0: psiTilde s ≥ 0 — 4.56·((s+1)·(e^..+e^..)): exp_pos, s+1 > 0 ✓.\n- 40·1.3352 = 53.408 ✓ norm_num.\n- 2(e⁴+1)(7Ĥ+3.3) ≥ 2·(54.5978+1)·(7·191.87+3.3): e⁴ ≥ 54.5978 ((exp 1)^4 ≥ 2.7182818283^4 = 54.5981500...); 7Ĥ+3.3 ≥ 7·191.87+3.3 = 1346.39; product ≥ 111.1956·1346.39 = 149717.2. Then assemble: 0 + 124916.2 + 53.408 + 149717.2 + 0 + 1 = 274687.8 ≥ 274000 ✓.\n\nFor the upper bounds mul_le_mul chains need nonnegativity of lower factors: e.g. 4T8·[...] ≤ 4·284·[...]: T8 ≤ 284 with bracket ≥ 0: bracket = (2/3)C0hat + 10.5 log(T+2) + 48 ≥ 0+0+48 > 0 ✓. And 4·T8 ≤ 4·284. Then 4T8·br ≤ 4·284·br_up: two-step mul_le_mul (4T8 ≤ 4·284, br ≤ br_up, 0 ≤ br (for first mul: need 0 ≤ br... mul_le_mul : a ≤ b → c ≤ d → 0 ≤ c → 0 ≤ b → a·c ≤ b·d. With a = 4T8, b = 1136, c = br, d = br_up: need 0 ≤ br and 0 ≤ 4T8 → wait form: a·c ≤ b·d needs 0 ≤ c (lower factor nonneg) and 0 ≤ b. 0 ≤ br ✓ (br ≥ 48), 0 ≤ 4·284 ✓. So 4T8·br ≤ 1136·br_up ✓.)\n\nAnd 2(e⁴+1)(7Ĥ+3.3) ≤ 2·55.6015·(7·251.45+3.3): nested mul_le_mul ✓.\n\nAlso the psiTilde bound for IIMaj: IIMaj n = psiTilde (√n) (IIMaj_eq_psiTilde_sqrt) and psiTilde s = 4.56·((s+1)·(Real.exp(-iimA·s)+Real.exp(-iimB·s))). But iimA/iimB/psiTilde are PRIVATE defs in LiSkeleton! `private def psiTilde`, `private def iimA/iimB` — private means NOT accessible from LiBasePoints.lean! Hmm. IIMaj_eq_psiTilde_sqrt is public (theorem) but mentions psiTilde (private) in its statement — private defs can't appear in another file's... actually private declarations in Lean 4 get name-mangled but the THEOREM IIMaj_eq_psiTilde_sqrt is public and its statement references the private psiTilde — using it from another file: the statement displays with the mangled name; I can still `rw [IIMaj_eq_psiTilde_sqrt]` — rewriting works (the LHS pattern IIMaj n is public). After the rewrite, the goal contains psiTilde (√80000) — then I need to unfold psiTilde to bound it — CAN'T from another file (private). \n\nSolutions: (a) bound IIMaj in LiSkeleton.lean and export a public lemma `IIMaj_le (n : ℝ) (hn : 20 ≤ n) : IIMaj n ≤ 4.56 * (Real.sqrt n + 1) * 2` proved in LiSkeleton (where psiTilde is visible). Add to LiSkeleton: \n```\ntheorem IIMaj_le_two_mul (n : ℝ) (hn : 0 ≤ n) :\n IIMaj n ≤ 4.56 * (Real.sqrt n + 1) * 2 := by\n rw [IIMaj_eq_psiTilde_sqrt]\n unfold psiTilde\n -- e^{-as}, e^{-bs} ≤ 1 (a, b > 0, s ≥ 0)\n ...\n```\nneeds iimA/iimB positivity (from log2 bounds) — in-file ✓. Then LiBasePoints uses IIMaj_le_two_mul + sqrt bound. Also need IIMaj ≥ 0 for the lower bound side: public lemma IIMaj_nonneg (n : ℝ) : 0 ≤ IIMaj n — direct from def (all factors nonneg: 2^(...) rpow nonneg via Real.rpow_nonneg, exp pos...). In LiSkeleton:\n```\ntheorem IIMaj_nonneg (n : ℝ) : 0 ≤ IIMaj n := by\n unfold IIMaj\n positivity -- 2 ^ (...) via rpow: positivity handles Real.rpow_nonneg? Real.rpow of positive base is positive: positivity should know rpow_pos_of_pos... \n```\nIf positivity fails, manual: mul_nonneg chains with Real.rpow_nonneg (by norm_num : 0 ≤ 2) _, Real.exp_nonneg _, sqrt_nonneg.\n\nAlso FAlt/C0hat/Hhat/Bn/sInftyLower/marginTilde/FAlt are all public ✓. psiOf public ✓.\n\nOK — also I realize marginTilde_eq_sub rewrites marginTilde in terms of Bn; and Bn unfolds publicly (its def uses C0hat/Hhat/IIMaj public ✓ and the let). Fine.\n\n10. Final assembly:\n```\ntheorem marginTilde_FAlt_80000_pos : 0 < marginTilde FAlt 80000 := by\n rw [marginTilde_eq_sub]\n have hS := sInftyLower_80000_lo\n have hB := Bn_FAlt_80000_le\n linarith\n\ntheorem marginTilde_FAlt_80000_lt_100000 :\n marginTilde FAlt 80000 < marginTilde FAlt 100000 := by\n rw [marginTilde_eq_sub, marginTilde_eq_sub]\n have h1 := sInftyLower_80000_up -- ≤ 339000\n have h2 := Bn_FAlt_80000_ge -- ≥ 274000\n have h3 := sInftyLower_100000_lo -- ≥ 433000\n have h4 := Bn_FAlt_100000_le -- ≤ 347000\n -- margin80000 ≤ 339000 − 274000 + 1 = 65001; margin100000 ≥ 433000 − 347000 + 1 = 86001\n linarith -- 65001 < 86001 ✓\n\ntheorem lambda_pos_finite_height_verified\n (hRH : RHUpTo (3 * 10 ^ 12)) (hfinite : LiVerifiedUpTo (5 * 10 ^ 5))\n (hSf : SfBoundProp) :\n ∀ n : ℕ, 1 ≤ n → (n : ℝ) ≤ (3 * 10 ^ 12 - 1 : ℝ) ^ 2 → 0 < (liCoeff n).re :=\n fun n hn1 hnN => lambda_pos_finite_height hRH hfinite\n marginTilde_FAlt_80000_pos marginTilde_FAlt_80000_lt_100000 hSf n hn1 hnN\n```\n\nWait — marginTilde_eq_sub is stated as `marginTilde F n = sInftyLower n - Bn F n + 1` — rw works.\n\nOne more: the n : ℝ literals — marginTilde FAlt 80000 has 80000 : ℝ ✓ matches the hypotheses hbase : 0 < marginTilde FAlt 80000 — the hbase in lambda_pos_finite_height is `0 < marginTilde FAlt 80000` with 80000 elaborated as ℝ ✓ same term.\n\nNow write it all. Order in LiBasePoints.lean:\n1. exp machinery: exp_le_inv_one_sub_sixteen; exp_one bounds re-export? Just use Real.exp_one_gt_d9/lt_d9 — verify gt exists! grep. Also log_two names used in file: Real.log_two_gt_d9 / Real.log_two_lt_d9 ✓.\n2. log/pi/sqrt certified bounds.\n3. T-point log bounds.\n4. sInftyLower bounds (3).\n5. IIMaj bounds (need LiSkeleton additions: IIMaj_le_two_mul + IIMaj_nonneg — add to LiSkeleton first).\n6. Bn bounds (3).\n7. hbase/hbase2/final theorem.\n\nVerify Real.exp_one_gt_d9 exists.","signature":""},{"type":"text","text":"Verifying the last name (`Real.exp_one_gt_d9`) before writing."},{"type":"tool_use","id":"Bash_135","name":"Bash","input":{"command":"cd D:/Python/Quantum/zeta-23-lean/.lake/packages/mathlib && grep -rn \"exp_one_gt_d9\\|exp_one_lt_d9\" Mathlib/Analysis/SpecialFunctions/Exp*.lean Mathlib/Analysis/Complex/Exponential.lean Mathlib/Analysis/SpecialFunctions/Log/*.lean 2>/dev/null | head -4; grep -rn \"theorem.*sum_le_exp_of_nonneg\" Mathlib/Analysis/ | head -2","description":"Verify exp_one_gt_d9 and sum_le_exp_of_nonneg"},"extra_content":null}]