Current task: —

← Session 18 — Lean tier (ii): finite-height proof + certified base points

#761 assistant 2026-08-20 19:08:25.563 UTC · 6785→9680 tok open ⤢
thinking (20398 chars)
Two failures (my chosen intermediate decimals were too tight): - exp_hi(0.6) = 1.843267 → use ≤ 1.8433 - exp_lo(0.8) = 2.22549 → use ≥ 2.2254 All composites pass. Final intermediate table for the Lean file: - (2.7182818286)^11 ≤ 59874.31; (2.7182818283)^11 ≥ 59874.13 - (2.7182818286)^5 ≤ 148.414; (2.7182818283)^5 ≥ 148.328 - (2.7182818286)^4 ≤ 54.6015; (2.7182818283)^4 ≥ 54.5978 - (1−0.263/16)⁻¹^16 ≤ 1.3037 - Σ₇(0.3) ≥ 1.34985 - (1−0.14/16)⁻¹^16 ≤ 1.151 - Σ₇(0.15) ≥ 1.1618 - (1−0.6/16)⁻¹^16 ≤ 1.8433 - Σ₇(0.7) ≥ 2.0136 - Σ₇(0.75) ≥ 2.1169 - Σ₇(0.77) ≥ 2.1597 - Σ₇(0.8) ≥ 2.2254 - (1−0.5/16)⁻¹^16 ≤ 1.6644 Composites: - e^11.263 ≤ 59874.31·1.3037 = 78063.4 ≤ 80000 ✓ (need norm_num: 59874.31*1.3037 = 78063.40) - e^11.3 ≥ 59874.13·1.34985 = 80821.3 ≥ 80000 ✓ - e^11.5 ≤ 59874.31·1.6644 = 99660.7 ≤ 100000 ✓ - e^5.7 ≥ 148.328·2.0136 = 298.674 ≥ 286 ✓ - e^1.75 ≥ 2.7182818283·2.1169 = 5.75435 ≥ 5.7 ✓ - e^5.6 ≤ 148.414·1.8433 = 273.571 ≤ 285 ✓ - e^5.8 ≥ 148.328·2.2254 = 330.087 ≥ 320 ✓ - e^1.77 ≥ 2.7182818283·2.1597 = 5.87068 ≥ 5.8 ✓ - e^1.14 ≤ 2.7182818286·1.151 = 3.128751 ≤ 3.1415926535 ✓ - e^1.15 ≥ 2.7182818283·1.1618 = 3.158109 ≥ 3.1415926536 ✓ Now write everything. LiSkeleton additions first (IIMaj public bounds), then LiBasePoints.lean. For LiSkeleton, insert after IIMaj_eq_psiTilde_sqrt (line ~1006). Then LiBasePoints.lean full file. Let me draft the whole LiBasePoints carefully. Structure: ```lean /- NguyenRH1/LiBasePoints.lean — [PROVED] tier (ii) step 2: the two elementary margin evaluations, discharged by certified rational interval bounds (D-062 §5 plan, every link pre-verified at dps 40 / exact Fraction arithmetic). Contents: exp/log certified-bound machinery; sInftyLower and Bn bounds at n = 8×10⁴ (two-sided) and n = 10⁵ (one-sided each way); marginTilde_FAlt_80000_pos, marginTilde_FAlt_80000_lt_100000; and the final three-hypothesis form `lambda_pos_finite_height_verified` (perimeter + SfBoundProp only). Archive: D-062 §5 (plan + validation), E-028/E-029 (true values 15 763.79 / ≈ 93 000; the certified targets carry ≥ 7×10³ slack everywhere except the noted tight links). -/ import Mathlib import NguyenRH1.LiSkeleton open Zeta23 Complex Filter Topology noncomputable section namespace NguyenRH1 ``` Then machinery. Key lemma list: ```lean /-- exp x ≤ (1 − x/16)⁻¹ ^ 16 for 0 ≤ x < 16 (from 1 − y ≤ e^{−y}). -/ theorem exp_le_inv_sub_sixteen {x : ℝ} (hx0 : 0 ≤ x) (hx1 : x < 16) : Real.exp x ≤ (1 - x / 16)⁻¹ ^ 16 ``` ```lean theorem exp_one_pow_le (n : ℕ) : Real.exp 1 ^ n ≤ (2.7182818286 : ℝ) ^ n := pow_le_pow_left (Real.exp_pos 1).le Real.exp_one_lt_d9.le n theorem exp_one_pow_ge (n : ℕ) : (2.7182818283 : ℝ) ^ n ≤ Real.exp 1 ^ n := pow_le_pow_left (by norm_num) Real.exp_one_gt_d9.le n ``` expNat helpers: exp (11 : ℝ) = exp 1 ^ 11: ``` theorem exp_eleven : Real.exp 11 = Real.exp 1 ^ 11 := by rw [← Real.exp_nat_mul 1 11] congr 1 norm_num theorem exp_five : Real.exp 5 = Real.exp 1 ^ 5 := by ... theorem exp_four : Real.exp 4 = Real.exp 1 ^ 4 := by ... ``` congr 1: goal exp 11 = exp (↑11 * 1)?? wait rw ← Real.exp_nat_mul 1 11 on goal `Real.exp 11 = Real.exp 1 ^ 11`: the ← direction finds `Real.exp 1 ^ 11` (RHS) and replaces with `Real.exp (↑11 * 1)`: goal becomes `Real.exp 11 = Real.exp (↑11 * 1)`; congr 1 → `11 = ↑11 * 1` (or ↑11*1 = 11): norm_num closes (push_cast + ring built in) ✓ probably. If congr produces both sides with exp applied: `Real.exp 11 = Real.exp (↑11*1)` — congr 1 gives `11 = ↑11 * 1`. norm_num ✓. log bounds: ``` theorem log80000_ge : (11.263 : ℝ) ≤ Real.log 80000 := by have h1 : Real.exp 11 ≤ (59874.31 : ℝ) := by rw [exp_eleven] refine le_trans (exp_one_pow_le 11) (by norm_num) have h2 : Real.exp 0.263 ≤ (1.3037 : ℝ) := by refine le_trans (exp_le_inv_sub_sixteen (by norm_num) (by norm_num)) (by norm_num) have h3 : Real.exp 11.263 = Real.exp 11 * Real.exp 0.263 := by rw [show (11.263 : ℝ) = 11 + 0.263 by norm_num, Real.exp_add] have h4 : Real.exp 11 * Real.exp 0.263 ≤ 59874.31 * 1.3037 := mul_le_mul h1 h2 (Real.exp_pos _).le (by norm_num) have h5 : Real.exp 11.263 ≤ 80000 := by rw [h3] refine le_trans h4 (by norm_num) have h6 := Real.log_le_log (Real.exp_pos _) h5 rwa [Real.log_exp] at h6 ``` mul_le_mul h1 h2 (exp 0.263 ≥ 0) (59874.31 ≥ 0): signature mul_le_mul : a ≤ b → c ≤ d → 0 ≤ c → 0 ≤ b → a*c ≤ b*d ✓. log80000_le : Real.log 80000 ≤ 11.3: ``` h1 : (59874.13 : ℝ) ≤ Real.exp 11 := by rw [exp_eleven]; exact le_trans (by norm_num) (exp_one_pow_ge 11) h2 : (1.34985 : ℝ) ≤ Real.exp 0.3 := le_trans (by norm_num [Finset.sum_range_succ]) (Real.sum_le_exp_of_nonneg (by norm_num) 7) h3 : exp 11.3 = exp 11 * exp 0.3 h4 : (80000 : ℝ) ≤ exp 11 * exp 0.3 := le_trans (by norm_num : (80000:ℝ) ≤ 59874.13*1.34985) (mul_le_mul h1 h2 (by norm_num) (Real.exp_pos _).le) -- 59874.13*1.34985 = 80821.3 ≥ 80000 ✓ h5 : (80000:ℝ) ≤ Real.exp 11.3 := by rwa [h3]... direction: h4 : 80000 ≤ exp11*exp0.3; rw [← h3] at h4 : 80000 ≤ exp 11.3 ✓ h6 := Real.log_le_log (by norm_num : (0:ℝ) < 80000) h5 : log 80000 ≤ log (exp 11.3); rw [Real.log_exp] at h6 ✓ ``` Careful with sum_le_exp_of_nonneg: ∑ i ∈ range 7, 0.3^i / i! ≤ exp 0.3. norm_num [Finset.sum_range_succ] should evaluate ∑ to 1.3498587625 ≥ 1.34985. The norm_num target: `(1.34985 : ℝ) ≤ ∑ i ∈ Finset.range 7, (0.3:ℝ)^i / i!` — with Finset.sum_range_succ unfolding + norm_num computing. In iimaj_bracket_bound they did `norm_num [Finset.sum_range_succ]` for `(47 : ℝ) ≤ ∑ i ∈ Finset.range 7, (3.9635 : ℝ) ^ i / (Nat.factorial i : ℝ)` ✓ same pattern. log100000_ge : 11.5 ≤ log 100000: exp 11.5 ≤ 59874.31·1.6644 = 99660.7 ≤ 100000 ✓ same pattern with exp_le_inv_sub_sixteen 0.5. logpi_le : Real.log Real.pi ≤ 1.15: π ≤ exp 1.15: exp 1.15 = exp 1·exp 0.15 ≥ 2.7182818283·1.1618 = 3.158109 ≥ π (pi_lt_d20 : π < 3.14159265358979323847 — need π ≤ 3.1415926536: from d20 .le then norm_num). Chain: exp 1 ≥ 2.7182818283 (exp_one_gt_d9.le); exp 0.15 ≥ Σ₇ ≥ 1.1618; product ≥ 3.158109; π ≤ 3.1415926536 ≤ 3.158109... wait direction: π < 3.1415926536 (d20 gives π < 3.14159265358979323847 ≤ 3.1415926536 ✓); 3.1415926536 ≤ 3.158109 ≤ exp 1.15 ⟹ π ≤ exp 1.15 ⟹ log π ≤ 1.15 ✓. logpi_ge : 1.14 ≤ log π: exp 1.14 ≤ π: exp 1.14 = exp 1·exp 0.14 ≤ 2.7182818286·1.151 = 3.128751 ≤ 3.1415926535 ≤ π (pi_gt_d20 : 3.14159265358979323846 < π ⟹ π ≥ 3.1415926535 ✓). sqrt bounds: ``` theorem sqrt80000_le : Real.sqrt 80000 ≤ 283 := (Real.sqrt_le_left (by norm_num)).mpr (by norm_num) theorem sqrt80000_ge : (282 : ℝ) ≤ Real.sqrt 80000 := (Real.le_sqrt (by norm_num) (by norm_num)).mpr (by norm_num) theorem sqrt100000_le : Real.sqrt 100000 ≤ 317 := (Real.sqrt_le_left (by norm_num)).mpr (by norm_num) ``` Real.sqrt_le_left (hy : 0 ≤ y) : √x ≤ y ↔ x ≤ y^2 — mpr needs 80000 ≤ 283^2 = 80089 norm_num ✓. Note: in this Mathlib the lemma is `sqrt_le_left` under namespace Real? It was in Mathlib/Analysis/Real/Sqrt.lean without namespace Real? The file used `Real.sqrt_le_sqrt`, `Real.le_sqrt` — the Sqrt.lean lemmas are in namespace Real presumably (Real.sqrt_le_sqrt used in file ✓). sqrt_le_left: Real.sqrt_le_left ✓ hopefully; verify at compile. T-point log bounds: ``` theorem logT8_le : Real.log (Real.sqrt 80000 + 1) ≤ 5.7 -- T8 ≤ 284 ≤ exp 5.7: exp 5.7 = exp 5 · exp 0.7 ≥ 148.328·2.0136 = 298.674 T8 ≤ 284: from sqrt80000_le linarith h5 : Real.exp 5 ≥ 148.328: rw [exp_five]; le_trans (by norm_num) (exp_one_pow_ge 5) h07 : Real.exp 0.7 ≥ 2.0136 := le_trans (by norm_num [Finset.sum_range_succ]) (sum_le_exp...) exp 5.7 = exp(5+0.7) = ... ≥ 148.328·2.0136 = 298.674: mul_le_mul h5 h07 (by norm_num) (exp_pos _).le T8 ≤ 284 ≤ 298.674 ≤ exp 5.7; Real.log_le_log (T8 > 0) ... log_exp. ``` Similarly: - logT82_le : Real.log (Real.sqrt 80000 + 1 + 2) ≤ 5.7 — note Bn/C0hat use log (T+2) where T = √n+1: so the argument is (√80000+1)+2 = √80000+3 ≤ 286. Written form in C0hat T: Real.log (T + 2) with T = √80000 + 1 — so the term is Real.log ((√80000+1) + 2). When I unfold C0hat/Hhat at T := √80000+1 the expression is Real.log (√80000 + 1 + 2) after let-substitution... The exact syntactic form matters for rw. I'll set T8 := Real.sqrt 80000 + 1 as a `set` in the proof and state the log lemmas about `(Real.sqrt 80000 + 1) + 2`. Simplest: state the log lemmas with the literal expressions: logT82_le : Real.log (Real.sqrt 80000 + 1 + 2) ≤ 5.7 (√80000+1+2 = √80000+3 ≤ 283+3 = 286 ✓) - loglogT8_le : Real.log (Real.log (Real.sqrt 80000 + 1)) ≤ 1.75: log T8 ≤ 5.7 ≤ exp 1.75 (5.75435): log(log T8) ≤ log 5.7 ≤ 1.75; needs 0 < log T8 (T8 > 1 ✓) for log_le_log; exp 1.75 = exp 1·exp 0.75 ≥ 2.7182818283·2.1169 = 5.75435 ≥ 5.7 ✓. - loglogT82_le : Real.log (Real.log (Real.sqrt 80000 + 1 + 2)) ≤ 1.75: log(T8+2) ≤ 5.7 same ✓ (0 < log(T8+2) ✓). - logT82_ge : 5.6 ≤ Real.log (Real.sqrt 80000 + 1 + 2): T8+2 ≥ 285 ≥ exp 5.6: exp 5.6 = exp 5·exp 0.6 ≤ 148.414·1.8433 = 273.571 ≤ 285 ✓. - logT8_ge? For FAlt ≥ 0 need log T8 ≥ 0 (T8 ≥ 1 ✓ Real.log_nonneg (le: 1 ≤ T8)) and log log T8 ≥ 0 (log T8 ≥ 1 ⟸ T8 ≥ e: T8 ≥ 283 ≥ exp 1 (2.7182818286): Real.log_le_log (exp_pos 1) (283 ≥ exp 1 via exp_one_lt_d9) : 1 = log (exp 1) ≤ log 283 ≤ log T8 ✓). For 100000: - T10 ≤ 318; logT10_le : log (√100000+1) ≤ 5.8 (exp 5.8 = exp 5·exp 0.8 ≥ 148.328·2.2254 = 330.087 ≥ 318 ✓) - logT102_le : log (√100000+1+2) ≤ 5.8 (T10+2 ≤ 320 ≤ 330.087 ✓) - loglogT10_le : log log ≤ 1.77 (5.8 ≤ exp 1.77 = exp 1·exp 0.77 ≥ 2.7182818283·2.1597 = 5.87068 ✓) - loglogT102_le : ≤ 1.77 ✓ sInftyLower bounds: ``` 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 theorem sInftyLower_80000_lo : (336000 : ℝ) ≤ sInftyLower 80000 := by rw [sInftyLower_eq'] have h1 := log80000_ge have h2 := Real.log_two_lt_d9.le -- log 2 < 0.6931471808 have h3 := logpi_le -- log π ≤ 1.15 have hcoef : 1 + Real.log 2 + Real.log Real.pi ≤ (2.8431472 : ℝ) := by linarith -- (1/2)·80000·log ≥ 40000·11.263; coef·80000 ≤ 2.8431472·80000/2... -- form: (1/2)*80000*log 80000 - ((1+log2+logπ)/2)*80000 - 4 -- ≥ (1/2)*80000*11.263 - (2.8431472/2)*80000 - 4 = 450520 - 113725.888 - 4 = 336790.1 ≥ 336000 have g1 : (1/2 : ℝ)*80000*11.263 ≤ (1/2)*80000*Real.log 80000 := mul_le_mul_of_nonneg_left h1 (by norm_num) have g2 : ((1 + Real.log 2 + Real.log Real.pi)/2)*80000 ≤ (2.8431472/2)*80000 := by apply mul_le_mul_of_nonneg_right _ (by norm_num : (0:ℝ) ≤ 80000) exact div_le_div_of_nonneg_left?? -- x/2 ≤ y/2 from x ≤ y: div_le_div_right (0 < 2): a/c ≤ b/c ↔ a ≤ b — name: div_le_div_right (hc : 0 < c) : a / c ≤ b / c ↔ a ≤ b? I think `div_le_div_right (hc : 0 < c) : a / c ≤ b / c ↔ a ≤ b` exists. .mpr hcoef. linarith [g1, g2] -- hmm: goal 336000 ≤ (1/2)*80000*log − ((...)/2)*80000 − 4; from g1, g2: linarith needs the numeric evaluation: (1/2)*80000*11.263 = 450520; (2.8431472/2)*80000 = 113725.888 — linarith can compute these? linarith normalizes numerals ✓ should close: 336000 ≤ 450520 − 113725.888 − 4 = 336790.112 ✓. ``` div_le_div_right: in current Mathlib `div_le_div_right (hc : 0 < c) : a / c ≤ b / c ↔ a ≤ b` ✓ exists. sInftyLower_80000_up : sInftyLower 80000 ≤ 339000: ``` h1 := log80000_le (≤ 11.3); h2 := Real.log_two_gt_d9.le (0.6931471803 ≤ log 2); h3 := logpi_ge (1.14 ≤ log π) hcoef : (2.8331471 : ℝ) ≤ 1 + log 2 + log π := by linarith -- 1+0.6931471803+1.14 = 2.8331471803 g1 : (1/2)*80000*log 80000 ≤ (1/2)*80000*11.3 := mul_le_mul_of_nonneg_left h1 (by norm_num) g2 : (2.8331471/2)*80000 ≤ ((1+log2+logπ)/2)*80000 := mul_le_mul_of_nonneg_right (div_le_div_right ...mpr hcoef) ... -- sInftyLower ≤ 40000·11.3 − (2.8331471/2)·80000 − 4 = 452000 − 113325.884 − 4 = 338670.1 ≤ 339000 linarith ``` Wait — sign: sInftyLower = A − B − 4 where B = ((1+log2+logπ)/2)·80000 ≥ (2.8331471/2)·80000 (LOWER bound on B gives UPPER on −B) ✓. sInftyLower_100000_lo : 432500 ≤ sInftyLower 100000: ``` h1 := log100000_ge (11.5); hcoef : 1+log2+logπ ≤ 2.8431472 g1 : (1/2)*100000*11.5 ≤ ...; g2 : coef/2*100000 ≤ 2.8431472/2*100000 -- ≥ 50000·11.5 − 50000·2.8431472 − 4 = 575000 − 142157.36 − 4 = 432838.6 ≥ 432500 ✓ slack 338 linarith ``` Bn bounds — the monsters. Structure: ``` theorem Bn_FAlt_80000_le : Bn FAlt 80000 ≤ (328000 : ℝ) := by unfold Bn C0hat Hhat FAlt -- expression: 2 * FAlt(T8) + 4*T8*((2/3)*C0hat(T8) + 10.5*log(T8+2) + 48) + 40*1.3352 + 2*(exp 4 + 1)*(7*Hhat(T8) + 3.3) + IIMaj 80000 + 1 -- with T8 = √80000 + 1 (let-bound — unfold Bn exposes the let; simp only [Bn] does zeta-reduce? `unfold Bn` should substitute the let... `let T := ...` in the def: after unfold, the term is `let T := √80000+1; ...`. Use `show` with the substituted form? or `simp only [Bn]` (unfolds + beta/zeta?). Safer: `rw [show Bn FAlt 80000 = ... from rfl]`? The let SHOULD be defeq to the substitution — so `show <expanded> ≤ 328000` might work by rfl-defeq. Try `simp only [Bn, C0hat, Hhat, FAlt]` then `dsimp only` to zeta-reduce... ``` Hmm — how did marginTilde_eq_expanded handle the let? `simp only [marginTilde, marginExpanded, ...]` then ring — simp only [marginTilde] unfolds the def and its let gets zeta-reduced by simp's dsimp component ✓. So `simp only [Bn, C0hat, Hhat, FAlt]` produces the fully expanded numeral-laden expression. Then bound. Actually — maybe cleaner NOT to unfold FAlt/C0hat/Hhat; instead prove per-function bounds: - hF : FAlt T8 ≤ 273.82: unfold FAlt; pieces: (1/(2π)) ≤ 1/6; T8·log T8 ≤ 284·5.7 = 1618.8 (mul_le_mul sqrt80000_le-derived T8 ≤ 284, logT8_le, log T8 ≥ 0, T8 ≥ 0); 0.137·log T8 ≤ 0.137·5.7; 0.443·log log ≤ 0.443·1.75; const. Sum: (1/6)·1618.8 + 0.7809 + 0.77525 + 2.463 = 269.8 + 4.01915 = 273.82. - hC0 : C0hat T8 ≤ 6.9186: unfold C0hat; 0.433·5.7 + 0.886·1.75 + 2.9. - hH : Hhat T8 ≤ 251.45: unfold Hhat; 3·C0hat² ≤ 3·6.9186² (pow_le_pow_left (C0hat ≥ 0) hC0 2); 10.5·log(T8+2) ≤ 10.5·5.7; +48. = 3·47.867 + 59.85 + 48 = 143.6+107.85 = 251.45. - hII : IIMaj 80000 ≤ 2590.08: IIMaj_le_two_mul 80000 (by norm_num) gives ≤ 4.56·(√80000+1)·2 ≤ 4.56·284·2 = 2590.08 (mul_le_mul with sqrt80000_le: √80000+1 ≤ 284). - he4 : Real.exp 4 ≤ 54.6015: rw [exp_four]; le_trans (exp_one_pow_le 4) (by norm_num). - Assembly: Bn FAlt 80000 = 2·FAlt T8 + 4·T8·((2/3)·C0hat T8 + 10.5·log(T8+2) + 48) + 40·1.3352 + 2·(exp 4 + 1)·(7·Hhat T8 + 3.3) + IIMaj 80000 + 1 — to get this form without unfolding FAlt etc.: `simp only [Bn]` only (zeta-reduce the let). Then: bracket_up : (2/3)*C0hat T8 + 10.5*log(T8+2) + 48 ≤ (2/3)*6.9186 + 10.5*5.7 + 48 = 112.4624 (needs C0hat ≥ 0 for mul_le (2/3)·hC0: mul_le_mul_of_nonneg_left hC0 (by norm_num : 0 ≤ (2/3:ℝ)); and 10.5·log ≤ 10.5·5.7 needs log ≥ 0: log(T8+2) ≥ 0 ✓ log_nonneg (T8+2 ≥ 1)) term2 ≤ 4·284·112.4624 = 127757.3: mul_le_mul (4·T8 ≤ 4·284 via T8 ≤ 284) (bracket ≤ 112.4624) (bracket ≥ 0 — C0hat ≥ 0? need C0hat T8 ≥ 0: 0.433·log + 0.886·loglog + 2.9 ≥ 0+0+2.9: log(T8+2) ≥ 0 ✓, log log(T8+2) ≥ 0 ⟸ log(T8+2) ≥ 1 ⟸ T8+2 ≥ e ⟸ 285 ≥ 2.7182818286... prove log(T8+2) ≥ 1: Real.log_le_log (exp_pos 1) (h : exp 1 ≤ T8+2): exp 1 ≤ 2.7182818286 ≤ 285 ≤ T8+2 ✓ then log_exp at... Real.log_le_log gives log (exp 1) ≤ log(T8+2); Real.log_exp: log(exp 1) = 1 ✓) (0 ≤ 4·284 ✓) term4 ≤ 2·(54.6015+1)·(7·251.45+3.3) = 111.203·1763.45 = 196103.6: mul_le_mul (2·(exp4+1) ≤ 2·55.6015) (7·Hhat+3.3 ≤ 1763.45) (7Ĥ+3.3 ≥ 0 — Hhat ≥ 0? Hhat = 3C0² + 10.5 log + 48 ≥ 0+0+48... need 10.5·log(T8+2) ≥ 0 ✓ and 3·C0² ≥ 0 ✓ so Hhat ≥ 48 > 0... just need 7Ĥ+3.3 ≥ 0 ✓) (0 ≤ 2·55.6015 ✓) Sum: 2·273.82 + 127757.3 + 53.408 + 196103.6 + 2590.08 + 1 = 547.64 + 127757.3 + 53.408 + 196103.6 + 2590.08 + 1 = 327053.0 ≤ 328000 ✓ slack 947. Bn_FAlt_80000_ge : 274000 ≤ Bn FAlt 80000: - hF0 : 0 ≤ FAlt T8: unfold FAlt; all terms ≥ 0: (1/(2π))·(T8·log T8) ≥ 0: 1/(2π) > 0 (positivity with pi_pos), T8·log T8 ≥ 0 (T8 ≥ 0, log T8 ≥ 0 ⟸ T8 ≥ 1); 0.137·log T8 ≥ 0; 0.443·log log T8 ≥ 0 (log T8 ≥ 1 ⟸ T8 ≥ e: 283 ≥ 2.7182818286 ✓ log_le_log); const > 0. linarith/positivity assembly. - C0hat T8 ≥ 5.3248: 0.433·log(T8+2) ≥ 0.433·5.6 (logT82_ge), 0.886·loglog ≥ 0 (log(T8+2) ≥ 1 ✓), +2.9: 0.433·5.6 = 2.4248; +2.9 = 5.3248 ✓. - term2 ≥ 4·283·[(2/3)·5.3248 + 10.5·5.6 + 48] = 1132·[3.54987+58.8+48] = 1132·110.34987 = 124916.25: mul_le_mul (4·T8 ≥ 4·283) (bracket ≥ 110.34987) (0 ≤ 110.34987) (0 ≤ 4·283). Hmm mul_le_mul : a≤b → c≤d → 0≤c → 0≤b → ac ≤ bd — for LOWER bounds I need it flipped: b ≤ a → d ≤ c → ... i.e. use mul_le_mul with (a := 4·283) (b := 4·T8) (c := 110.34987) (d := bracket): needs 110.34987 ≤ bracket ✓, 4·283 ≤ 4·T8 ✓, 0 ≤ 110.34987 ✓, 0 ≤ 4·T8 ✓ → (4·283)·110.34987 ≤ (4·T8)·bracket ✓. - Hhat T8 ≥ 191.87: 3·C0hat² ≥ 3·5.3248² (pow_le_pow_left (5.3248 ≥ 0) hC0lo 2): 3·28.3535 = 85.06; 10.5·log ≥ 10.5·5.6 = 58.8; +48: 85.06+58.8+48 = 191.86. compute: 5.3248² = 28.35352... ×3 = 85.0606; +58.8+48 = 191.8606. - term4 ≥ 2·(54.5978+1)·(7·191.86+3.3) = 111.1956·1346.32 = 149715.4: mul_le_mul (2·55.5978 ≤ 2·(exp4+1)) (1346.32 ≤ 7Ĥ+3.3) (by norm_num) (2·(exp4+1) ≥ 0: exp_pos). e4lo : 54.5978 ≤ Real.exp 4: rw [exp_four]; le_trans (by norm_num) (exp_one_pow_ge 4). 2.7182818283^4 = 54.59815 ≥ 54.5978 ✓. - IIMaj ≥ 0 (IIMaj_nonneg). - Assemble: 0 + 124916.25 + 53.408 + 149715.4 + 0 + 1 = 274686.1 ≥ 274000 ✓ slack 686. Note: 2·FAlt ≥ 0 so 2·FAlt term dropped; fine. Bn_FAlt_100000_le : ≤ 347000: - T10 ≤ 318; log T10 ≤ 5.8; loglog ≤ 1.77; log(T10+2) ≤ 5.8; loglog ≤ 1.77. - FAlt T10 ≤ (1/6)·318·5.8 + 0.137·5.8 + 0.443·1.77 + 2.463 = (1/6)·1844.4 = 307.4 + 0.7946 + 0.7841 + 2.463 = 311.44 - C0hat ≤ 0.433·5.8 + 0.886·1.77 + 2.9 = 2.5114+1.56822+2.9 = 6.9796 - Hhat ≤ 3·6.9796² + 10.5·5.8 + 48 = 3·48.7148 + 60.9 + 48 = 146.144+108.9 = 255.04 - bracket ≤ (2/3)·6.9796 + 60.9 + 48 = 4.65307+108.9 = 113.553 - term2 ≤ 4·318·113.553 = 1272·113.553 = 144439.4 - term4 ≤ 111.203·(7·255.04+3.3) = 111.203·1788.58 = 198875.7 - IIMaj ≤ 4.56·318·2 = 2900.16 - Sum: 2·311.44 + 144439.4 + 53.408 + 198875.7 + 2900.16 + 1 = 622.88+144439.4+53.408+198875.7+2900.16+1 = 346892.5 ≤ 347000 ✓ slack 107. All good. Now — one more detail: in the Bn expression after `simp only [Bn]`, the T is `Real.sqrt 80000 + 1` (substituted). The pieces C0hat (√80000+1), Hhat (√80000+1), log((√80000+1)+2). I'll `set T8 : ℝ := Real.sqrt 80000 + 1 with hT8` after the simp to fold occurrences? `set` replaces occurrences in goal ✓. Then my log lemmas should be stated about Real.log T8... but their proofs unfold T8. State log lemmas as: `theorem logT8_le : Real.log (Real.sqrt 80000 + 1) ≤ 5.7` and after `set T8 := Real.sqrt 80000 + 1`, the goal's Real.log (T8 + 2) vs lemma's Real.log (Real.sqrt 80000 + 1 + 2)... set rewrites goal occurrences of √80000+1 → T8, giving Real.log (T8 + 2); my lemma logT82_le stated as Real.log (Real.sqrt 80000 + 1 + 2) ≤ 5.7 — after set, I can rw ← hT8 in the lemma... messy. SIMPLER: state the +2 lemmas directly with the T8-form by taking haves INSIDE proofs with `set` first, then the have statements use T8. I'll inline everything in the big proofs with local haves referencing T8 after set. To avoid an explosion of tiny standalone theorems, keep the exp/log primitive bounds as standalone theorems (log80000_ge etc.) and do T-point logs as local haves. Alright — also the two theorems marginTilde_FAlt_80000_pos etc. and the final wrapper. And PrintAxioms additions. And NguyenRH1.lean root import. One risk: `simp only [Bn]` — will it unfold the `let`? simp only with a def name uses the definitional unfolding lemma; the resulting term has `let`; simp only's built-in dsimp zeta-reduces lets by default (zeta := true default in simp only? simp only uses simp's default config: zeta reduction is ON by default in simp). In marginTilde_eq_expanded the same pattern worked (marginTilde has the let) ✓ precedent — good. Also Bn's expression: 2 * F T + 4 * T * (...) + ... — after simp only [Bn], F is the parameter — with F := FAlt concrete. I will NOT unfold FAlt at the Bn level; handle hF separately with unfold FAlt there. Let me now write the LiSkeleton IIMaj additions + the full LiBasePoints.lean file. Also check: does `Real.log_two_lt_d9` give `Real.log 2 < 0.6931471808`? The file used Real.log_two_gt_d9/lt_d9 in iimaj (hlog2lo := Real.log_two_gt_d9) ✓ exists. Values: gt_d9 : 0.6931471803 < log 2; lt_d9 : log 2 < 0.6931471808 presumably. Write LiSkeleton additions first.
Two intermediates were too tight (`exp_hi(0.6)`, `exp_lo(0.8)`) — retuned; all composites pass. Now writing. First the two public IIMaj bounds in LiSkeleton (psiTilde is private there).
tool: Edit
input
{
  "file_path": "D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\NguyenRH1\\LiSkeleton.lean",
  "old_string": "/-- [PROVED session 011] \u03c8\u0303 is globally C\u00b2 (polynomial \u00d7 exponentials). -/\ntheorem psiTilde_contDiff : ContDiff \u211d 2 psiTilde := by",
  "new_string": "/-- [PROVED session 012] Crude global upper bound on the I_I majorant:\nIIMaj n \u2264 4.56\u00b7(\u221an+1)\u00b72 for n \u2265 0 (both exponentials \u2264 1). Consumed by\nthe base-point numerics (LiBasePoints); the slack is absorbed by the\nmargin. -/\ntheorem IIMaj_le_two_mul (n : \u211d) (hn : 0 \u2264 n) :\n    IIMaj n \u2264 4.56 * (Real.sqrt n + 1) * 2 := by\n  rw [IIMaj_eq_psiTilde_sqrt]\n  unfold psiTilde\n  have hlog2 := Real.log_two_gt_d9\n  have ha : (0 : \u211d) < iimA := by unfold iimA; linarith\n  have hb : (0 : \u211d) < iimB := by unfold iimB; linarith\n  have hs : (0 : \u211d) \u2264 Real.sqrt n := Real.sqrt_nonneg n\n  have heA : Real.exp (-iimA * Real.sqrt n) \u2264 1 := by\n    rw [Real.exp_le_one_iff]\n    exact mul_nonpos_of_nonpos_of_nonneg (by linarith) hs\n  have heB : Real.exp (-iimB * Real.sqrt n) \u2264 1 := by\n    rw [Real.exp_le_one_iff]\n    exact mul_nonpos_of_nonpos_of_nonneg (by linarith) hs\n  have hpos : (0 : \u211d) \u2264 Real.sqrt n + 1 := by linarith\n  calc 4.56 * ((Real.sqrt n + 1) *\n          (Real.exp (-iimA * Real.sqrt n) + Real.exp (-iimB * Real.sqrt n)))\n      \u2264 4.56 * ((Real.sqrt n + 1) * (1 + 1)) := by\n        apply mul_le_mul_of_nonneg_left _ (by norm_num : (0 : \u211d) \u2264 4.56)\n        apply mul_le_mul_of_nonneg_left _ hpos\n        linarith [heA, heB]\n    _ = 4.56 * (Real.sqrt n + 1) * 2 := by ring\n\n/-- [PROVED session 012] IIMaj is nonnegative. -/\ntheorem IIMaj_nonneg (n : \u211d) : 0 \u2264 IIMaj n := by\n  unfold IIMaj\n  apply mul_nonneg; apply mul_nonneg; apply mul_nonneg; apply mul_nonneg\n  \u00b7 norm_num\n  \u00b7 linarith [Real.sqrt_nonneg n]\n  \u00b7 have h := Real.exp_pos (Real.sqrt n / 2)\n    linarith\n  \u00b7 norm_num\n  \u00b7 exact Real.rpow_nonneg (by norm_num) _\n\n/-- [PROVED session 011] \u03c8\u0303 is globally C\u00b2 (polynomial \u00d7 exponentials). -/\ntheorem psiTilde_contDiff : ContDiff \u211d 2 psiTilde := by"
}
raw content_json (database row)
[{"type":"thinking","thinking":"Two failures (my chosen intermediate decimals were too tight): - exp_hi(0.6) = 1.843267 → use ≤ 1.8433\n- exp_lo(0.8) = 2.22549 → use ≥ 2.2254\n\nAll composites pass. Final intermediate table for the Lean file:\n- (2.7182818286)^11 ≤ 59874.31; (2.7182818283)^11 ≥ 59874.13\n- (2.7182818286)^5 ≤ 148.414; (2.7182818283)^5 ≥ 148.328\n- (2.7182818286)^4 ≤ 54.6015; (2.7182818283)^4 ≥ 54.5978\n- (1−0.263/16)⁻¹^16 ≤ 1.3037\n- Σ₇(0.3) ≥ 1.34985\n- (1−0.14/16)⁻¹^16 ≤ 1.151\n- Σ₇(0.15) ≥ 1.1618\n- (1−0.6/16)⁻¹^16 ≤ 1.8433\n- Σ₇(0.7) ≥ 2.0136\n- Σ₇(0.75) ≥ 2.1169\n- Σ₇(0.77) ≥ 2.1597\n- Σ₇(0.8) ≥ 2.2254\n- (1−0.5/16)⁻¹^16 ≤ 1.6644\n\nComposites:\n- e^11.263 ≤ 59874.31·1.3037 = 78063.4 ≤ 80000 ✓ (need norm_num: 59874.31*1.3037 = 78063.40)\n- e^11.3 ≥ 59874.13·1.34985 = 80821.3 ≥ 80000 ✓\n- e^11.5 ≤ 59874.31·1.6644 = 99660.7 ≤ 100000 ✓\n- e^5.7 ≥ 148.328·2.0136 = 298.674 ≥ 286 ✓\n- e^1.75 ≥ 2.7182818283·2.1169 = 5.75435 ≥ 5.7 ✓\n- e^5.6 ≤ 148.414·1.8433 = 273.571 ≤ 285 ✓\n- e^5.8 ≥ 148.328·2.2254 = 330.087 ≥ 320 ✓\n- e^1.77 ≥ 2.7182818283·2.1597 = 5.87068 ≥ 5.8 ✓\n- e^1.14 ≤ 2.7182818286·1.151 = 3.128751 ≤ 3.1415926535 ✓\n- e^1.15 ≥ 2.7182818283·1.1618 = 3.158109 ≥ 3.1415926536 ✓\n\nNow write everything. LiSkeleton additions first (IIMaj public bounds), then LiBasePoints.lean.\n\nFor LiSkeleton, insert after IIMaj_eq_psiTilde_sqrt (line ~1006). Then LiBasePoints.lean full file. Let me draft the whole LiBasePoints carefully.\n\nStructure:\n\n```lean\n/-\nNguyenRH1/LiBasePoints.lean — [PROVED] tier (ii) step 2: the two\nelementary margin evaluations, discharged by certified rational interval\nbounds (D-062 §5 plan, every link pre-verified at dps 40 / exact\nFraction arithmetic).\n\nContents: exp/log certified-bound machinery; sInftyLower and Bn bounds\nat n = 8×10⁴ (two-sided) and n = 10⁵ (one-sided each way);\nmarginTilde_FAlt_80000_pos, marginTilde_FAlt_80000_lt_100000; and the\nfinal three-hypothesis form `lambda_pos_finite_height_verified`\n(perimeter + SfBoundProp only).\n\nArchive: D-062 §5 (plan + validation), E-028/E-029 (true values\n15 763.79 / ≈ 93 000; the certified targets carry ≥ 7×10³ slack\neverywhere except the noted tight links).\n-/\nimport Mathlib\nimport NguyenRH1.LiSkeleton\n\nopen Zeta23 Complex Filter Topology\n\nnoncomputable section\n\nnamespace NguyenRH1\n```\n\nThen machinery. Key lemma list:\n\n```lean\n/-- exp x ≤ (1 − x/16)⁻¹ ^ 16 for 0 ≤ x < 16 (from 1 − y ≤ e^{−y}). -/\ntheorem exp_le_inv_sub_sixteen {x : ℝ} (hx0 : 0 ≤ x) (hx1 : x < 16) :\n    Real.exp x ≤ (1 - x / 16)⁻¹ ^ 16\n```\n\n```lean\ntheorem exp_one_pow_le (n : ℕ) : Real.exp 1 ^ n ≤ (2.7182818286 : ℝ) ^ n :=\n  pow_le_pow_left (Real.exp_pos 1).le Real.exp_one_lt_d9.le n\ntheorem exp_one_pow_ge (n : ℕ) : (2.7182818283 : ℝ) ^ n ≤ Real.exp 1 ^ n :=\n  pow_le_pow_left (by norm_num) Real.exp_one_gt_d9.le n\n```\n\nexpNat helpers: exp (11 : ℝ) = exp 1 ^ 11:\n```\ntheorem exp_eleven : Real.exp 11 = Real.exp 1 ^ 11 := by\n  rw [← Real.exp_nat_mul 1 11]\n  congr 1\n  norm_num\ntheorem exp_five : Real.exp 5 = Real.exp 1 ^ 5 := by ...\ntheorem exp_four : Real.exp 4 = Real.exp 1 ^ 4 := by ...\n```\ncongr 1: goal exp 11 = exp (↑11 * 1)?? wait rw ← Real.exp_nat_mul 1 11 on goal `Real.exp 11 = Real.exp 1 ^ 11`: the ← direction finds `Real.exp 1 ^ 11` (RHS) and replaces with `Real.exp (↑11 * 1)`: goal becomes `Real.exp 11 = Real.exp (↑11 * 1)`; congr 1 → `11 = ↑11 * 1` (or ↑11*1 = 11): norm_num closes (push_cast + ring built in) ✓ probably. If congr produces both sides with exp applied: `Real.exp 11 = Real.exp (↑11*1)` — congr 1 gives `11 = ↑11 * 1`. norm_num ✓.\n\nlog bounds:\n```\ntheorem log80000_ge : (11.263 : ℝ) ≤ Real.log 80000 := by\n  have h1 : Real.exp 11 ≤ (59874.31 : ℝ) := by\n    rw [exp_eleven]\n    refine le_trans (exp_one_pow_le 11) (by norm_num)\n  have h2 : Real.exp 0.263 ≤ (1.3037 : ℝ) := by\n    refine le_trans (exp_le_inv_sub_sixteen (by norm_num) (by norm_num)) (by norm_num)\n  have h3 : Real.exp 11.263 = Real.exp 11 * Real.exp 0.263 := by\n    rw [show (11.263 : ℝ) = 11 + 0.263 by norm_num, Real.exp_add]\n  have h4 : Real.exp 11 * Real.exp 0.263 ≤ 59874.31 * 1.3037 :=\n    mul_le_mul h1 h2 (Real.exp_pos _).le (by norm_num)\n  have h5 : Real.exp 11.263 ≤ 80000 := by\n    rw [h3]\n    refine le_trans h4 (by norm_num)\n  have h6 := Real.log_le_log (Real.exp_pos _) h5\n  rwa [Real.log_exp] at h6\n```\nmul_le_mul h1 h2 (exp 0.263 ≥ 0) (59874.31 ≥ 0): signature mul_le_mul : a ≤ b → c ≤ d → 0 ≤ c → 0 ≤ b → a*c ≤ b*d ✓.\n\nlog80000_le : Real.log 80000 ≤ 11.3:\n```\n  h1 : (59874.13 : ℝ) ≤ Real.exp 11 := by rw [exp_eleven]; exact le_trans (by norm_num) (exp_one_pow_ge 11)\n  h2 : (1.34985 : ℝ) ≤ Real.exp 0.3 := le_trans (by norm_num [Finset.sum_range_succ]) (Real.sum_le_exp_of_nonneg (by norm_num) 7)\n  h3 : exp 11.3 = exp 11 * exp 0.3\n  h4 : (80000 : ℝ) ≤ exp 11 * exp 0.3 := le_trans (by norm_num : (80000:ℝ) ≤ 59874.13*1.34985) (mul_le_mul h1 h2 (by norm_num) (Real.exp_pos _).le)\n  -- 59874.13*1.34985 = 80821.3 ≥ 80000 ✓\n  h5 : (80000:ℝ) ≤ Real.exp 11.3 := by rwa [h3]... direction: h4 : 80000 ≤ exp11*exp0.3; rw [← h3] at h4 : 80000 ≤ exp 11.3 ✓\n  h6 := Real.log_le_log (by norm_num : (0:ℝ) < 80000) h5 : log 80000 ≤ log (exp 11.3); rw [Real.log_exp] at h6 ✓\n```\nCareful with sum_le_exp_of_nonneg: ∑ i ∈ range 7, 0.3^i / i! ≤ exp 0.3. norm_num [Finset.sum_range_succ] should evaluate ∑ to 1.3498587625 ≥ 1.34985. The norm_num target: `(1.34985 : ℝ) ≤ ∑ i ∈ Finset.range 7, (0.3:ℝ)^i / i!` — with Finset.sum_range_succ unfolding + norm_num computing. In iimaj_bracket_bound they did `norm_num [Finset.sum_range_succ]` for `(47 : ℝ) ≤ ∑ i ∈ Finset.range 7, (3.9635 : ℝ) ^ i / (Nat.factorial i : ℝ)` ✓ same pattern.\n\nlog100000_ge : 11.5 ≤ log 100000: exp 11.5 ≤ 59874.31·1.6644 = 99660.7 ≤ 100000 ✓ same pattern with exp_le_inv_sub_sixteen 0.5.\n\nlogpi_le : Real.log Real.pi ≤ 1.15: π ≤ exp 1.15: exp 1.15 = exp 1·exp 0.15 ≥ 2.7182818283·1.1618 = 3.158109 ≥ π (pi_lt_d20 : π < 3.14159265358979323847 — need π ≤ 3.1415926536: from d20 .le then norm_num). Chain: exp 1 ≥ 2.7182818283 (exp_one_gt_d9.le); exp 0.15 ≥ Σ₇ ≥ 1.1618; product ≥ 3.158109; π ≤ 3.1415926536 ≤ 3.158109... wait direction: π < 3.1415926536 (d20 gives π < 3.14159265358979323847 ≤ 3.1415926536 ✓); 3.1415926536 ≤ 3.158109 ≤ exp 1.15 ⟹ π ≤ exp 1.15 ⟹ log π ≤ 1.15 ✓.\n\nlogpi_ge : 1.14 ≤ log π: exp 1.14 ≤ π: exp 1.14 = exp 1·exp 0.14 ≤ 2.7182818286·1.151 = 3.128751 ≤ 3.1415926535 ≤ π (pi_gt_d20 : 3.14159265358979323846 < π ⟹ π ≥ 3.1415926535 ✓).\n\nsqrt bounds:\n```\ntheorem sqrt80000_le : Real.sqrt 80000 ≤ 283 :=\n  (Real.sqrt_le_left (by norm_num)).mpr (by norm_num)\ntheorem sqrt80000_ge : (282 : ℝ) ≤ Real.sqrt 80000 :=\n  (Real.le_sqrt (by norm_num) (by norm_num)).mpr (by norm_num)\ntheorem sqrt100000_le : Real.sqrt 100000 ≤ 317 := (Real.sqrt_le_left (by norm_num)).mpr (by norm_num)\n```\nReal.sqrt_le_left (hy : 0 ≤ y) : √x ≤ y ↔ x ≤ y^2 — mpr needs 80000 ≤ 283^2 = 80089 norm_num ✓. Note: in this Mathlib the lemma is `sqrt_le_left` under namespace Real? It was in Mathlib/Analysis/Real/Sqrt.lean without namespace Real? The file used `Real.sqrt_le_sqrt`, `Real.le_sqrt` — the Sqrt.lean lemmas are in namespace Real presumably (Real.sqrt_le_sqrt used in file ✓). sqrt_le_left: Real.sqrt_le_left ✓ hopefully; verify at compile.\n\nT-point log bounds:\n```\ntheorem logT8_le : Real.log (Real.sqrt 80000 + 1) ≤ 5.7\n  -- T8 ≤ 284 ≤ exp 5.7: exp 5.7 = exp 5 · exp 0.7 ≥ 148.328·2.0136 = 298.674\n  T8 ≤ 284: from sqrt80000_le linarith\n  h5 : Real.exp 5 ≥ 148.328: rw [exp_five]; le_trans (by norm_num) (exp_one_pow_ge 5)\n  h07 : Real.exp 0.7 ≥ 2.0136 := le_trans (by norm_num [Finset.sum_range_succ]) (sum_le_exp...)\n  exp 5.7 = exp(5+0.7) = ... ≥ 148.328·2.0136 = 298.674: mul_le_mul h5 h07 (by norm_num) (exp_pos _).le\n  T8 ≤ 284 ≤ 298.674 ≤ exp 5.7; Real.log_le_log (T8 > 0) ... log_exp.\n```\nSimilarly:\n- logT82_le : Real.log (Real.sqrt 80000 + 1 + 2) ≤ 5.7 — note Bn/C0hat use log (T+2) where T = √n+1: so the argument is (√80000+1)+2 = √80000+3 ≤ 286. Written form in C0hat T: Real.log (T + 2) with T = √80000 + 1 — so the term is Real.log ((√80000+1) + 2). When I unfold C0hat/Hhat at T := √80000+1 the expression is Real.log (√80000 + 1 + 2) after let-substitution... The exact syntactic form matters for rw. I'll set T8 := Real.sqrt 80000 + 1 as a `set` in the proof and state the log lemmas about `(Real.sqrt 80000 + 1) + 2`. Simplest: state the log lemmas with the literal expressions:\n  logT82_le : Real.log (Real.sqrt 80000 + 1 + 2) ≤ 5.7 (√80000+1+2 = √80000+3 ≤ 283+3 = 286 ✓)\n- loglogT8_le : Real.log (Real.log (Real.sqrt 80000 + 1)) ≤ 1.75: log T8 ≤ 5.7 ≤ exp 1.75 (5.75435): log(log T8) ≤ log 5.7 ≤ 1.75; needs 0 < log T8 (T8 > 1 ✓) for log_le_log; exp 1.75 = exp 1·exp 0.75 ≥ 2.7182818283·2.1169 = 5.75435 ≥ 5.7 ✓.\n- loglogT82_le : Real.log (Real.log (Real.sqrt 80000 + 1 + 2)) ≤ 1.75: log(T8+2) ≤ 5.7 same ✓ (0 < log(T8+2) ✓).\n- logT82_ge : 5.6 ≤ Real.log (Real.sqrt 80000 + 1 + 2): T8+2 ≥ 285 ≥ exp 5.6: exp 5.6 = exp 5·exp 0.6 ≤ 148.414·1.8433 = 273.571 ≤ 285 ✓.\n- logT8_ge? For FAlt ≥ 0 need log T8 ≥ 0 (T8 ≥ 1 ✓ Real.log_nonneg (le: 1 ≤ T8)) and log log T8 ≥ 0 (log T8 ≥ 1 ⟸ T8 ≥ e: T8 ≥ 283 ≥ exp 1 (2.7182818286): Real.log_le_log (exp_pos 1) (283 ≥ exp 1 via exp_one_lt_d9) : 1 = log (exp 1) ≤ log 283 ≤ log T8 ✓).\n\nFor 100000:\n- T10 ≤ 318; logT10_le : log (√100000+1) ≤ 5.8 (exp 5.8 = exp 5·exp 0.8 ≥ 148.328·2.2254 = 330.087 ≥ 318 ✓)\n- logT102_le : log (√100000+1+2) ≤ 5.8 (T10+2 ≤ 320 ≤ 330.087 ✓)\n- loglogT10_le : log log ≤ 1.77 (5.8 ≤ exp 1.77 = exp 1·exp 0.77 ≥ 2.7182818283·2.1597 = 5.87068 ✓)\n- loglogT102_le : ≤ 1.77 ✓\n\nsInftyLower bounds:\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\ntheorem sInftyLower_80000_lo : (336000 : ℝ) ≤ sInftyLower 80000 := by\n  rw [sInftyLower_eq']\n  have h1 := log80000_ge\n  have h2 := Real.log_two_lt_d9.le   -- log 2 < 0.6931471808\n  have h3 := logpi_le                -- log π ≤ 1.15\n  have hcoef : 1 + Real.log 2 + Real.log Real.pi ≤ (2.8431472 : ℝ) := by linarith\n  -- (1/2)·80000·log ≥ 40000·11.263; coef·80000 ≤ 2.8431472·80000/2...\n  -- form: (1/2)*80000*log 80000 - ((1+log2+logπ)/2)*80000 - 4\n  --     ≥ (1/2)*80000*11.263 - (2.8431472/2)*80000 - 4 = 450520 - 113725.888 - 4 = 336790.1 ≥ 336000\n  have g1 : (1/2 : ℝ)*80000*11.263 ≤ (1/2)*80000*Real.log 80000 :=\n    mul_le_mul_of_nonneg_left h1 (by norm_num)\n  have g2 : ((1 + Real.log 2 + Real.log Real.pi)/2)*80000 ≤ (2.8431472/2)*80000 := by\n    apply mul_le_mul_of_nonneg_right _ (by norm_num : (0:ℝ) ≤ 80000)\n    exact div_le_div_of_nonneg_left?? -- x/2 ≤ y/2 from x ≤ y: div_le_div_right (0 < 2): a/c ≤ b/c ↔ a ≤ b — name: div_le_div_right (hc : 0 < c) : a / c ≤ b / c ↔ a ≤ b? I think `div_le_div_right (hc : 0 < c) : a / c ≤ b / c ↔ a ≤ b` exists. .mpr hcoef.\n  linarith [g1, g2]  -- hmm: goal 336000 ≤ (1/2)*80000*log − ((...)/2)*80000 − 4; from g1, g2: linarith needs the numeric evaluation: (1/2)*80000*11.263 = 450520; (2.8431472/2)*80000 = 113725.888 — linarith can compute these? linarith normalizes numerals ✓ should close: 336000 ≤ 450520 − 113725.888 − 4 = 336790.112 ✓.\n```\ndiv_le_div_right: in current Mathlib `div_le_div_right (hc : 0 < c) : a / c ≤ b / c ↔ a ≤ b` ✓ exists.\n\nsInftyLower_80000_up : sInftyLower 80000 ≤ 339000:\n```\n  h1 := log80000_le (≤ 11.3); h2 := Real.log_two_gt_d9.le (0.6931471803 ≤ log 2); h3 := logpi_ge (1.14 ≤ log π)\n  hcoef : (2.8331471 : ℝ) ≤ 1 + log 2 + log π := by linarith  -- 1+0.6931471803+1.14 = 2.8331471803\n  g1 : (1/2)*80000*log 80000 ≤ (1/2)*80000*11.3 := mul_le_mul_of_nonneg_left h1 (by norm_num)\n  g2 : (2.8331471/2)*80000 ≤ ((1+log2+logπ)/2)*80000 := mul_le_mul_of_nonneg_right (div_le_div_right ...mpr hcoef) ...\n  -- sInftyLower ≤ 40000·11.3 − (2.8331471/2)·80000 − 4 = 452000 − 113325.884 − 4 = 338670.1 ≤ 339000\n  linarith\n```\nWait — sign: sInftyLower = A − B − 4 where B = ((1+log2+logπ)/2)·80000 ≥ (2.8331471/2)·80000 (LOWER bound on B gives UPPER on −B) ✓.\n\nsInftyLower_100000_lo : 432500 ≤ sInftyLower 100000:\n```\n  h1 := log100000_ge (11.5); hcoef : 1+log2+logπ ≤ 2.8431472\n  g1 : (1/2)*100000*11.5 ≤ ...; g2 : coef/2*100000 ≤ 2.8431472/2*100000\n  -- ≥ 50000·11.5 − 50000·2.8431472 − 4 = 575000 − 142157.36 − 4 = 432838.6 ≥ 432500 ✓ slack 338\n  linarith\n```\n\nBn bounds — the monsters. Structure:\n\n```\ntheorem Bn_FAlt_80000_le : Bn FAlt 80000 ≤ (328000 : ℝ) := by\n  unfold Bn C0hat Hhat FAlt\n  -- expression: 2 * FAlt(T8) + 4*T8*((2/3)*C0hat(T8) + 10.5*log(T8+2) + 48) + 40*1.3352 + 2*(exp 4 + 1)*(7*Hhat(T8) + 3.3) + IIMaj 80000 + 1\n  -- with T8 = √80000 + 1 (let-bound — unfold Bn exposes the let; simp only [Bn] does zeta-reduce? `unfold Bn` should substitute the let... `let T := ...` in the def: after unfold, the term is `let T := √80000+1; ...`. Use `show` with the substituted form? or `simp only [Bn]` (unfolds + beta/zeta?). Safer: `rw [show Bn FAlt 80000 = ... from rfl]`? The let SHOULD be defeq to the substitution — so `show <expanded> ≤ 328000` might work by rfl-defeq. Try `simp only [Bn, C0hat, Hhat, FAlt]` then `dsimp only` to zeta-reduce... \n```\nHmm — how did marginTilde_eq_expanded handle the let? `simp only [marginTilde, marginExpanded, ...]` then ring — simp only [marginTilde] unfolds the def and its let gets zeta-reduced by simp's dsimp component ✓. So `simp only [Bn, C0hat, Hhat, FAlt]` produces the fully expanded numeral-laden expression. Then bound.\n\nActually — maybe cleaner NOT to unfold FAlt/C0hat/Hhat; instead prove per-function bounds:\n- hF : FAlt T8 ≤ 273.82: unfold FAlt; pieces: (1/(2π)) ≤ 1/6; T8·log T8 ≤ 284·5.7 = 1618.8 (mul_le_mul sqrt80000_le-derived T8 ≤ 284, logT8_le, log T8 ≥ 0, T8 ≥ 0); 0.137·log T8 ≤ 0.137·5.7; 0.443·log log ≤ 0.443·1.75; const. Sum: (1/6)·1618.8 + 0.7809 + 0.77525 + 2.463 = 269.8 + 4.01915 = 273.82.\n- hC0 : C0hat T8 ≤ 6.9186: unfold C0hat; 0.433·5.7 + 0.886·1.75 + 2.9.\n- hH : Hhat T8 ≤ 251.45: unfold Hhat; 3·C0hat² ≤ 3·6.9186² (pow_le_pow_left (C0hat ≥ 0) hC0 2); 10.5·log(T8+2) ≤ 10.5·5.7; +48. = 3·47.867 + 59.85 + 48 = 143.6+107.85 = 251.45.\n- hII : IIMaj 80000 ≤ 2590.08: IIMaj_le_two_mul 80000 (by norm_num) gives ≤ 4.56·(√80000+1)·2 ≤ 4.56·284·2 = 2590.08 (mul_le_mul with sqrt80000_le: √80000+1 ≤ 284).\n- he4 : Real.exp 4 ≤ 54.6015: rw [exp_four]; le_trans (exp_one_pow_le 4) (by norm_num).\n- Assembly: Bn FAlt 80000 = 2·FAlt T8 + 4·T8·((2/3)·C0hat T8 + 10.5·log(T8+2) + 48) + 40·1.3352 + 2·(exp 4 + 1)·(7·Hhat T8 + 3.3) + IIMaj 80000 + 1 — to get this form without unfolding FAlt etc.: `simp only [Bn]` only (zeta-reduce the let). Then:\n  bracket_up : (2/3)*C0hat T8 + 10.5*log(T8+2) + 48 ≤ (2/3)*6.9186 + 10.5*5.7 + 48 = 112.4624 (needs C0hat ≥ 0 for mul_le (2/3)·hC0: mul_le_mul_of_nonneg_left hC0 (by norm_num : 0 ≤ (2/3:ℝ)); and 10.5·log ≤ 10.5·5.7 needs log ≥ 0: log(T8+2) ≥ 0 ✓ log_nonneg (T8+2 ≥ 1))\n  term2 ≤ 4·284·112.4624 = 127757.3: mul_le_mul (4·T8 ≤ 4·284 via T8 ≤ 284) (bracket ≤ 112.4624) (bracket ≥ 0 — C0hat ≥ 0? need C0hat T8 ≥ 0: 0.433·log + 0.886·loglog + 2.9 ≥ 0+0+2.9: log(T8+2) ≥ 0 ✓, log log(T8+2) ≥ 0 ⟸ log(T8+2) ≥ 1 ⟸ T8+2 ≥ e ⟸ 285 ≥ 2.7182818286... prove log(T8+2) ≥ 1: Real.log_le_log (exp_pos 1) (h : exp 1 ≤ T8+2): exp 1 ≤ 2.7182818286 ≤ 285 ≤ T8+2 ✓ then log_exp at... Real.log_le_log gives log (exp 1) ≤ log(T8+2); Real.log_exp: log(exp 1) = 1 ✓) (0 ≤ 4·284 ✓)\n  term4 ≤ 2·(54.6015+1)·(7·251.45+3.3) = 111.203·1763.45 = 196103.6: mul_le_mul (2·(exp4+1) ≤ 2·55.6015) (7·Hhat+3.3 ≤ 1763.45) (7Ĥ+3.3 ≥ 0 — Hhat ≥ 0? Hhat = 3C0² + 10.5 log + 48 ≥ 0+0+48... need 10.5·log(T8+2) ≥ 0 ✓ and 3·C0² ≥ 0 ✓ so Hhat ≥ 48 > 0... just need 7Ĥ+3.3 ≥ 0 ✓) (0 ≤ 2·55.6015 ✓)\n  Sum: 2·273.82 + 127757.3 + 53.408 + 196103.6 + 2590.08 + 1 = 547.64 + 127757.3 + 53.408 + 196103.6 + 2590.08 + 1 = 327053.0 ≤ 328000 ✓ slack 947.\n\nBn_FAlt_80000_ge : 274000 ≤ Bn FAlt 80000:\n- hF0 : 0 ≤ FAlt T8: unfold FAlt; all terms ≥ 0: (1/(2π))·(T8·log T8) ≥ 0: 1/(2π) > 0 (positivity with pi_pos), T8·log T8 ≥ 0 (T8 ≥ 0, log T8 ≥ 0 ⟸ T8 ≥ 1); 0.137·log T8 ≥ 0; 0.443·log log T8 ≥ 0 (log T8 ≥ 1 ⟸ T8 ≥ e: 283 ≥ 2.7182818286 ✓ log_le_log); const > 0. linarith/positivity assembly.\n- C0hat T8 ≥ 5.3248: 0.433·log(T8+2) ≥ 0.433·5.6 (logT82_ge), 0.886·loglog ≥ 0 (log(T8+2) ≥ 1 ✓), +2.9: 0.433·5.6 = 2.4248; +2.9 = 5.3248 ✓.\n- term2 ≥ 4·283·[(2/3)·5.3248 + 10.5·5.6 + 48] = 1132·[3.54987+58.8+48] = 1132·110.34987 = 124916.25: mul_le_mul (4·T8 ≥ 4·283) (bracket ≥ 110.34987) (0 ≤ 110.34987) (0 ≤ 4·283). Hmm mul_le_mul : a≤b → c≤d → 0≤c → 0≤b → ac ≤ bd — for LOWER bounds I need it flipped: b ≤ a → d ≤ c → ... i.e. use mul_le_mul with (a := 4·283) (b := 4·T8) (c := 110.34987) (d := bracket): needs 110.34987 ≤ bracket ✓, 4·283 ≤ 4·T8 ✓, 0 ≤ 110.34987 ✓, 0 ≤ 4·T8 ✓ → (4·283)·110.34987 ≤ (4·T8)·bracket ✓.\n- Hhat T8 ≥ 191.87: 3·C0hat² ≥ 3·5.3248² (pow_le_pow_left (5.3248 ≥ 0) hC0lo 2): 3·28.3535 = 85.06; 10.5·log ≥ 10.5·5.6 = 58.8; +48: 85.06+58.8+48 = 191.86. \n  compute: 5.3248² = 28.35352... ×3 = 85.0606; +58.8+48 = 191.8606.\n- term4 ≥ 2·(54.5978+1)·(7·191.86+3.3) = 111.1956·1346.32 = 149715.4: mul_le_mul (2·55.5978 ≤ 2·(exp4+1)) (1346.32 ≤ 7Ĥ+3.3) (by norm_num) (2·(exp4+1) ≥ 0: exp_pos).\n  e4lo : 54.5978 ≤ Real.exp 4: rw [exp_four]; le_trans (by norm_num) (exp_one_pow_ge 4). 2.7182818283^4 = 54.59815 ≥ 54.5978 ✓.\n- IIMaj ≥ 0 (IIMaj_nonneg).\n- Assemble: 0 + 124916.25 + 53.408 + 149715.4 + 0 + 1 = 274686.1 ≥ 274000 ✓ slack 686.\n  Note: 2·FAlt ≥ 0 so 2·FAlt term dropped; fine.\n\nBn_FAlt_100000_le : ≤ 347000:\n- T10 ≤ 318; log T10 ≤ 5.8; loglog ≤ 1.77; log(T10+2) ≤ 5.8; loglog ≤ 1.77.\n- FAlt T10 ≤ (1/6)·318·5.8 + 0.137·5.8 + 0.443·1.77 + 2.463 = (1/6)·1844.4 = 307.4 + 0.7946 + 0.7841 + 2.463 = 311.44\n- C0hat ≤ 0.433·5.8 + 0.886·1.77 + 2.9 = 2.5114+1.56822+2.9 = 6.9796\n- Hhat ≤ 3·6.9796² + 10.5·5.8 + 48 = 3·48.7148 + 60.9 + 48 = 146.144+108.9 = 255.04\n- bracket ≤ (2/3)·6.9796 + 60.9 + 48 = 4.65307+108.9 = 113.553\n- term2 ≤ 4·318·113.553 = 1272·113.553 = 144439.4\n- term4 ≤ 111.203·(7·255.04+3.3) = 111.203·1788.58 = 198875.7\n- IIMaj ≤ 4.56·318·2 = 2900.16\n- Sum: 2·311.44 + 144439.4 + 53.408 + 198875.7 + 2900.16 + 1 = 622.88+144439.4+53.408+198875.7+2900.16+1 = 346892.5 ≤ 347000 ✓ slack 107.\n\nAll good. Now — one more detail: in the Bn expression after `simp only [Bn]`, the T is `Real.sqrt 80000 + 1` (substituted). The pieces C0hat (√80000+1), Hhat (√80000+1), log((√80000+1)+2). I'll `set T8 : ℝ := Real.sqrt 80000 + 1 with hT8` after the simp to fold occurrences? `set` replaces occurrences in goal ✓. Then my log lemmas should be stated about Real.log T8... but their proofs unfold T8. State log lemmas as:\n`theorem logT8_le : Real.log (Real.sqrt 80000 + 1) ≤ 5.7` and after `set T8 := Real.sqrt 80000 + 1`, the goal's Real.log (T8 + 2) vs lemma's Real.log (Real.sqrt 80000 + 1 + 2)... set rewrites goal occurrences of √80000+1 → T8, giving Real.log (T8 + 2); my lemma logT82_le stated as Real.log (Real.sqrt 80000 + 1 + 2) ≤ 5.7 — after set, I can rw ← hT8 in the lemma... messy. SIMPLER: state the +2 lemmas directly with the T8-form by taking haves INSIDE proofs with `set` first, then the have statements use T8. I'll inline everything in the big proofs with local haves referencing T8 after set. To avoid an explosion of tiny standalone theorems, keep the exp/log primitive bounds as standalone theorems (log80000_ge etc.) and do T-point logs as local haves. \n\nAlright — also the two theorems marginTilde_FAlt_80000_pos etc. and the final wrapper. And PrintAxioms additions. And NguyenRH1.lean root import.\n\nOne risk: `simp only [Bn]` — will it unfold the `let`? simp only with a def name uses the definitional unfolding lemma; the resulting term has `let`; simp only's built-in dsimp zeta-reduces lets by default (zeta := true default in simp only? simp only uses simp's default config: zeta reduction is ON by default in simp). In marginTilde_eq_expanded the same pattern worked (marginTilde has the let) ✓ precedent — good.\n\nAlso Bn's expression: 2 * F T + 4 * T * (...) + ... — after simp only [Bn], F is the parameter — with F := FAlt concrete. I will NOT unfold FAlt at the Bn level; handle hF separately with unfold FAlt there.\n\nLet me now write the LiSkeleton IIMaj additions + the full LiBasePoints.lean file. Also check: does `Real.log_two_lt_d9` give `Real.log 2 < 0.6931471808`? The file used Real.log_two_gt_d9/lt_d9 in iimaj (hlog2lo := Real.log_two_gt_d9) ✓ exists. Values: gt_d9 : 0.6931471803 < log 2; lt_d9 : log 2 < 0.6931471808 presumably.\n\nWrite LiSkeleton additions first.","signature":""},{"type":"text","text":"Two intermediates were too tight (`exp_hi(0.6)`, `exp_lo(0.8)`) — retuned; all composites pass. Now writing. First the two public IIMaj bounds in LiSkeleton (psiTilde is private there)."},{"type":"tool_use","id":"Edit_138","name":"Edit","input":{"file_path":"D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\NguyenRH1\\LiSkeleton.lean","old_string":"/-- [PROVED session 011] ψ̃ is globally C² (polynomial × exponentials). -/\ntheorem psiTilde_contDiff : ContDiff ℝ 2 psiTilde := by","new_string":"/-- [PROVED session 012] Crude global upper bound on the I_I majorant:\nIIMaj n ≤ 4.56·(√n+1)·2 for n ≥ 0 (both exponentials ≤ 1). Consumed by\nthe base-point numerics (LiBasePoints); the slack is absorbed by the\nmargin. -/\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  have hlog2 := Real.log_two_gt_d9\n  have ha : (0 : ℝ) < iimA := by unfold iimA; linarith\n  have hb : (0 : ℝ) < iimB := by unfold iimB; linarith\n  have hs : (0 : ℝ) ≤ Real.sqrt n := Real.sqrt_nonneg n\n  have heA : Real.exp (-iimA * Real.sqrt n) ≤ 1 := by\n    rw [Real.exp_le_one_iff]\n    exact mul_nonpos_of_nonpos_of_nonneg (by linarith) hs\n  have heB : Real.exp (-iimB * Real.sqrt n) ≤ 1 := by\n    rw [Real.exp_le_one_iff]\n    exact mul_nonpos_of_nonpos_of_nonneg (by linarith) hs\n  have hpos : (0 : ℝ) ≤ Real.sqrt n + 1 := by linarith\n  calc 4.56 * ((Real.sqrt n + 1) *\n          (Real.exp (-iimA * Real.sqrt n) + Real.exp (-iimB * Real.sqrt n)))\n      ≤ 4.56 * ((Real.sqrt n + 1) * (1 + 1)) := by\n        apply mul_le_mul_of_nonneg_left _ (by norm_num : (0 : ℝ) ≤ 4.56)\n        apply mul_le_mul_of_nonneg_left _ hpos\n        linarith [heA, heB]\n    _ = 4.56 * (Real.sqrt n + 1) * 2 := by ring\n\n/-- [PROVED session 012] IIMaj is nonnegative. -/\ntheorem IIMaj_nonneg (n : ℝ) : 0 ≤ IIMaj n := by\n  unfold IIMaj\n  apply mul_nonneg; apply mul_nonneg; apply mul_nonneg; apply mul_nonneg\n  · norm_num\n  · linarith [Real.sqrt_nonneg n]\n  · have h := Real.exp_pos (Real.sqrt n / 2)\n    linarith\n  · norm_num\n  · exact Real.rpow_nonneg (by norm_num) _\n\n/-- [PROVED session 011] ψ̃ is globally C² (polynomial × exponentials). -/\ntheorem psiTilde_contDiff : ContDiff ℝ 2 psiTilde := by"},"extra_content":null}]