← Session 17 — Lean tier (i): elementary proofs (after crash)
thinking (24365 chars)
IIMaj machinery compiles: IIMaj_eq_psiTilde_sqrt, psiTilde_contDiff, hasDerivAt_psiTilde, deriv_psiTilde, deriv2_psiTilde. Commit, then the IIMaj bound (the last big piece before assembly).
The bound lemma:
```lean
theorem IIMaj_deriv2_lt (n : ℝ) (hn : 20 ≤ n) :
deriv (deriv IIMaj) n < 1 / (2 * n)
```
Proof:
1. rw [show IIMaj = fun m => psiTilde (√m) from funext IIMaj_eq_psiTilde_sqrt] — function-level: funext fun m => IIMaj_eq_psiTilde_sqrt m ✓.
2. chain_rule_sqrt psiTilde psiTilde_contDiff n (by linarith) : deriv (deriv fun m => psiTilde (√m)) n = (ψ″(√n) − ψ′(√n)/√n)/(4n). rw [deriv_psiTilde, deriv2_psiTilde] to get the closed forms.
3. Set s := √n. Facts: s ≥ √20 (sqrt monotone: Real.sqrt_le_sqrt hn ✓), s ≥ 4.4721 (from block-range style bound), s > 0, n = s².
4. Need: (D2(s) − D1(s)/s)/(4n) < 1/(2n) ⟺ D2(s) − D1(s)/s < 2 (n > 0: multiply both sides by 4n > 0: (div_lt_div_iff... or: (X)/(4n) < 1/(2n) ⟺ 2n·X < 4n·1 ⟺ X < 2 via field). Formal: (lt_div_iff₀ (by positivity : (0:ℝ) < 4*n)).mpr? goal X/(4n) < 1/(2n): rewrite 1/(2n) = 2/(4n): then div_lt_div_iff_of_pos_right? or mul: suffices X < 2: X/(4n) < 2/(4n) = 1/(2n) via div_lt_div_of_pos_right?? div_lt_div_right (unknown earlier!) — gcongr worked for ≤; for <: `div_lt_div_of_lt_left`? hmm — use: X/(4n) < 2/(4n) by gcongr (needs X < 2 and 0 < 4n) — gcongr for strict: `gcongr` proves a/c < b/c from a < b ✓ (side 0 < 4n via positivity... with hypothesis n > 0 in context positivity might still fail — provide have h4n : (0:ℝ) < 4*n := by positivity?? positivity needs n > 0 — from hn : 20 ≤ n: `by linarith` ✓ then gcongr uses it? gcongr side conditions discharged by assumption ✓ h4n in context... gcongr looks for 0 < 4*n in context? It tries positivity which doesn't use context... but assumption IS tried. Provide and hope; else explicit: (div_lt_div_iff_of_pos_right?? — or mul_lt_mul_of_nonneg... Alternative deterministic: have h4n : (0:ℝ) < 4*n := by linarith; have e : (1:ℝ)/(2*n) = 2/(4*n) := by field_simp [show (n:ℝ) ≠ 0 by linarith]; ring?? field_simp might close; rw [e]; exact (div_lt_div_right h4n)?? unknown name — grr. Use: by gcongr with the explicit have h4n — gcongr discharges via assumption/positivity — try.
5. The main inequality: D2(s) − D1(s)/s < 2 where:
D2(s) = 4.56*(2*(−a eA − b eB) + (s+1)*(a²eA + b²eB))
D1(s)/s = 4.56*((eA+eB) + (s+1)*(−a eA − b eB))/s
with eA = exp(−a s), eB = exp(−b s), a = 2log2−1/2, b = 2log2.
D2 − D1/s = 4.56*[2*(−a eA − b eB) + (s+1)(a²eA+b²eB) − (eA+eB)/s − (s+1)(−a eA − b eB)/s].
Step A (drop negatives): 2*(−a eA − b eB) ≤ 0 (a,b,eA,eB > 0) and −(eA+eB)/s ≤ 0; and −(s+1)(−a eA − b eB)/s = (s+1)(a eA + b eB)/s > 0 keep.
So D2 − D1/s ≤ 4.56*[(s+1)(a²eA+b²eB) + (s+1)(a eA + b eB)/s].
Step B: a²eA + b²eB ≤ b²(eA+eB); a eA + b eB ≤ b(eA+eB) (0 < a ≤ b; eA,eB ≥ 0):
sum ≤ (s+1)(b² + b/s)(eA+eB).
So D2 − D1/s ≤ 4.56(s+1)(b²+b/s)(eA+eB).
Step C: eA+eB = eA(1 + exp(−(b−a)s)) with b−a = 1/2: eB = exp(−b s) = exp(−a s − (b−a)s) = eA·exp(−(b−a)s): exp_add ✓ b−a = 1/2: iimB − iimA = 1/2: unfold: 2log2 − (2log2−1/2) = 1/2 ✓ ring.
(s+1)(b²+b/s) = ((s+1)/s)·(b²s+b) [field].
So bound = 4.56·u₁·u₂·u₃ where u₁ = (s+1)/s, u₂ = (b²s+b)·eA, u₃ = 1+exp(−s/2).
Step D: each factor antitone on [√20,∞); so ≤ value at √20:
u₁(s) ≤ u₁(√20) = (√20+1)/√20.
u₂(s) ≤ u₂(√20) = (b²√20+b)·exp(−a√20).
u₃(s) ≤ u₃(√20) = 1+exp(−√20/2).
Step E: numerics:
- √20 bounds: 4.4721 ≤ √20 ≤ 4.4722 (4.4721² ≤ 20 ≤ 4.4722²: norm_num-able? 4.4721² = 19.999678... ✓; 4.4722² = 20.00057... hmm 4.4722² = 20.000573 ✓ ≥ 20 ✓).
- u₁(√20) = 1 + 1/√20 ≤ 1 + 1/4.4721 ≤ 1.2236 (norm_num: 1/4.4721 ≤ 0.22361... ✓: 4.4721·0.22361 = 0.99999...? careful — 1/4.4721 ≤ 0.2237: 4.4721·0.2237 = 1.00040... ✓ so 1/4.4721 ≤ 0.2237 ✓ provable by rw [div_le_iff₀] + norm_num).
- a ≥ 0.8862943606, b ≤ 1.3862943616, b ≥ 1.3862943606 (log_two bounds).
- b² ≤ 1.92182 (1.3862943616² = 1.921812...: norm_num).
- b²√20 + b ≤ 1.92182·4.4722 + 1.3862943616 = 8.5961 + 1.3863 = 9.9824 ≤ 9.9824.
- a√20 ≥ 0.8862943606·4.4721 = 3.96366... ≥ 3.9636.
- exp(−a√20) ≤ exp(−3.9636) ≤ 1/46.86: exp(3.9636) ≥ Σ₇?? sum_le_exp_of_nonneg with n=7: Σ_{i<7} 3.9636^i/i! = 1 + 3.9636 + 7.855 + 10.378 + 10.284 + 8.1527 + 5.3872 ≈ 46.92: compute: 3.9636² = 15.7101/2 = 7.8551; ³ = 62.266/6 = 10.3777; ⁴ = 246.76/24 = 10.2818; ⁵ = 978.06/120 = 8.1505; ⁶ = 3877.2/720 = 5.385. Sum: 1+3.9636+7.8551+10.3777+10.2818+8.1505+5.385 = 47.0136. So exp(−a√20) ≤ 1/47.01 ≈ 0.021272. For Lean: exp(−a√20) = (exp(a√20))⁻¹: a√20 ≥ 3.9636 → exp(a√20) ≥ exp(3.9636) ≥ Σ₇(3.9636) ≥ 46.9 (norm_num on the polynomial? Σ₇ with x = 3.9636: Finset.sum range 7 of x^i/i! — computable by norm_num? The sum is over Finset.range 7 — `Finset.sum_range_succ` ×7 then norm_num — or `norm_num [Finset.sum_range_succ]` handles ✓. Then exp(−a√20) = 1/exp(a√20) ≤ 1/46.9 via one_div_le_one_div_of_le (exp > 0) ✓ and exp_neg: exp(−t) = (exp t)⁻¹: Real.exp_neg ✓.
- u₂(√20) ≤ 9.9824·0.021272 ≈ 0.21239 ≤ 0.2124.
- u₁(√20) ≤ 1.2237.
- u₃(√20): √20/2 ≥ 2.23605: exp(−√20/2) ≤ exp(−2.23605) ≤ 1/Σ₅(2.23605)?? exp(2.23605) ≥ 1+2.23605+2.49997+1.86324+1.0417+0.46582 (i<6) ≈ 9.10678 → ≤ 1/9.1067 ≈ 0.10981. u₃ ≤ 1.1099.
- product: 4.56·1.2237·0.2124·1.1099 = 4.56·0.28827 ≈ 1.3145... ✗✗ TOO BIG! Need < 2: 1.3145 < 2 ✓ OK fine! (The margin needs D2−D1/s < 2, not < 1.) 1.32 < 2 ✓ slack 34%.
Let me double check step D application: 4.56·u₁(s)·u₂(s)·u₃(s) ≤ 4.56·u₁(√20)·u₂(√20)·u₃(√20) needs nonneg factors ✓ all positive.
Hmm wait — but in step C, the expression was 4.56·[(s+1)/s]·[(b²s+b)eA]·[1+exp(−s/2)] — but u₂ contains eA = exp(−a s) — monotonicity of u₂ = (b²s+b)·exp(−a s): NOT obviously antitone — the poly grows, exp decays. D-057-measured behavior decays. The antitone proof via derivative ≤ 0 (as planned): deriv u₂ = exp(−a s)(b² − a(b²s+b)) ≤ 0 ⟺ b² ≤ a(b²s+b) ⟸ at s ≥ √20: a(b²s+b) ≥ 0.8862943606·(b²·4.4721+b) ≥ 0.8862943606·(1.9217·4.4721+1.3862) = 0.8862943606·9.9795 ≈ 8.845 ≥ 1.92182 ≥ b² ✓ — but for ANTITONE ON THE WHOLE RANGE need deriv ≤ 0 for ALL s > √20: a(b²s+b) increasing in s ⟹ b² − a(b²s+b) decreasing ⟹ ≤ value at √20 < 0 ✓ — so deriv u₂ (s) = exp(−as)(b² − a(b²s+b)) with second factor < 0 throughout (decreasing, negative at left end) ✓.
antitoneOn_of_deriv_nonpos — verify name. In Mathlib: `antitoneOn_of_deriv_nonpos (hD : Convex ℝ D) (hf : ContinuousOn f D) (hf' : DifferentiableOn ℝ f (interior D)) (h : ∀ x ∈ interior D, deriv f x ≤ 0) : AntitoneOn f D` ✓ I'm fairly sure (Mathlib.Analysis.Convex.Deriv).
For u₁ and u₃, avoid deriv machinery:
u₁(s) = (s+1)/s = 1 + 1/s: for s ≥ √20: 1/s ≤ 1/√20: one_div_le_one_div_of_le (0 < √20) h ✓ direct.
u₃(s) = 1 + exp(−s/2): exp(−s/2) ≤ exp(−√20/2): exp_le_exp.mpr (neg_le_neg (div_le_div_of_nonneg... s/2 ≥ √20/2 ✓ linarith; −s/2 ≤ −√20/2 ✓) ✓ direct.
So only u₂ needs the deriv-antitone argument. deriv u₂: u₂ = fun s => (b²*s + b) * exp(−a*s): deriv via deriv_mul (differentiable) — or HasDerivAt: (poly: hasDerivAt (b²s+b) b²: (hasDerivAt_id' s).const_mul b² → b²*1?? const_mul: (fun t => b²*t) (b²*1); .add_const b → b² — massage mul_one; exp part hva-style) → HasDerivAt u₂ (b²*eA + (b²s+b)*(eA*(−a))) s — then deriv u₂ s = that (h.deriv) — for the antitoneOn lemma I need deriv f x ≤ 0 as a function of x in interior — via the same HasDerivAt at each x: have hder : ∀ x ∈ interior (Ici √20), deriv u₂ x = exp(−a x)*(b² − a*(b²*x+b)) := fun x hx => (u₂-hasDerivAt x).deriv with algebra massage. Then ≤ 0.
Also ContinuousOn/DifferentiableOn u₂: products of smooth ✓.
OK — this is the plan. Given the size, split into two lemmas:
(i) `iim_factor_bound`: for s ≥ √20: 4.56·u₁(s)·u₂(s)·u₃(s) ≤ 4.56·1.2237·0.2124·1.1099 ≤ 1.32 < 2 — the numeric/monotone part, stated as: D2(s) − D1(s)/s-form bound... hmm actually cleaner: state the final lemma directly with the pieces inline.
Actually — let me restructure to minimize risk: prove ONE lemma `iimaj_bracket_bound (s) (hs : √20 ≤ s) : D2expr(s) − D1expr(s)/s < 2` where D1expr/D2expr are the closed forms, then the main IIMaj_deriv2_lt glues chain_rule_sqrt + formulas.
Write it. The numeric constants: use explicit decimals: 1.2237, 0.2124, 1.1099 and final 4.56*1.2237*0.2124*1.1099 < 2 by norm_num (4.56*1.2237 = 5.5801; *0.2124 = 1.18521; *1.1099 = 1.31546 < 2 ✓).
Careful with step B term: 4.56*[(s+1)(a²eA+b²eB) + (s+1)(aeA+beB)/s] = 4.56*(s+1)*[(a²eA+b²eB) + (aeA+beB)/s] — the /s: [(a eA + b eB)/s] ≤ (b/s)(eA+eB) needs s > 0 ✓. Then (b² + b/s)(eA+eB) ✓.
And step C: (s+1)(b²+b/s) = ((s+1)/s)(b²s+b): field_simp ✓ s≠0.
Let me also double check the b−a factoring: eA + eB = eA + eA*exp(−(b−a)s) = eA*(1 + exp(−(b−a)s)) with b−a = 1/2: exp(−b s) = exp(−a s)·exp(−(b−a)s)?: −b s = −a s + (−(b−a)s) ✓ ring (b−a = 1/2 used only in u₃'s exponent: exp(−(b−a)s) = exp(−(1/2)s) = exp(−s/2) ✓).
So: bound_expr = 4.56*(s+1)*(b²+b/s)*(eA+eB) = 4.56*((s+1)/s)*(b²*s+b)*eA*(1+exp(−s/2)):
via: (s+1)*(b²+b/s) = ((s+1)/s)*(b²s+b) [field] and eA+eB = eA*(1+exp(−s/2)) [via exp_add]. ✓
Now write the two lemmas. To keep the proof manageable, sequence of `have`s with a final linarith/nlinarith chain. Most delicate: the product monotonicity 4.56·u₁u₂u₃ ≤ 4.56·u₁₀u₂₀u₃₀: u₁,u₂,u₃ ≥ 0: mul_le_mul chains: u₁u₂u₃ ≤ u₁₀u₂u₃ (mul_le_mul_of_nonneg_right ... u₂u₃ ≥ 0)... three-step via mul_le_mul with nonneg: mul_le_mul (u₁ ≤ u₁₀) (u₂ ≤ u₂₀) (u₂ ≥ 0) (u₁₀ ≥ 0) : u₁*u₂ ≤ u₁₀*u₂₀; then mul_le_mul (that) (u₃ ≤ u₃₀) (u₃ ≥ 0) (mul_nonneg u₁₀ u₂₀) : ≤ u₁₀u₂₀u₃₀ ✓ then const 4.56.
Numeric haves:
hV1 : u₁(√20) ≤ 1.2237: (√20+1)/√20 ≤ 1.2237: rw [div_le_iff₀ h√20pos]: √20+1 ≤ 1.2237*√20 ⟺ 1 ≤ 0.2237*√20 ⟺ √20 ≥ 1/0.2237 = 4.47027...: from √20 ≥ 4.4721: 0.2237*4.4721 = 1.00040... ≥ 1 ✓ linarith [h√20lo].
hV2 : u₂(√20) ≤ 0.2124: (b²√20+b)*exp(−a√20) ≤ 9.9824*0.021272: two-factor bound: b²√20+b ≤ 9.9824 (b² ≤ 1.92182, √20 ≤ 4.4722, b ≤ 1.3862943616: 1.92182*4.4722 = 8.59632 + 1.3862943616 = 9.98261 — hmm exceeds 9.9824! recompute: 1.92182*4.4722 = 8.59636...: 1.92182*4.4722: 1.92182*4 = 7.68728; 1.92182*0.4722 = 0.907484; total 8.594764. +1.3862943616 = 9.981059. ≤ 9.9811 ✓. And exp ≤ 0.021272: 9.9811*0.021272 = 0.212338 ≤ 0.2124 ✓.
exp(−a√20) ≤ 0.021272: from exp(a√20) ≥ 47.02: Σ₇(3.9636): computed 47.0136 ≥ 47.01: 1/47.01 = 0.021271... ≤ 0.021272 ✓.
hV3 : u₃(√20) ≤ 1.1099: exp(−√20/2) ≤ 0.1098: exp(√20/2) ≥ exp(2.23605) ≥ Σ₆(2.23605) ≥ 9.1067: compute: x = 2.23605: x² = 4.99992/2 = 2.49996; x³ = 11.1790/6 = 1.86317; x⁴ = 24.9967/24 = 1.04153; x⁵ = 55.8926/120 = 0.46577. Sum: 1+2.23605+2.49996+1.86317+1.04153+0.46577 = 9.10648 ≥ 9.1064. 1/9.1064 = 0.10981 ≤ 0.10982. u₃ = 1 + that ≤ 1.10982 ≤ 1.1099 ✓.
final: 4.56*1.2237*0.2124*1.1099 = 1.3155 < 2 ✓ norm_num.
For Σ bounds: Real.sum_le_exp_of_nonneg (hx : 0 ≤ x) (n : ℕ) : ∑ i ∈ range n, x^i/i! ≤ exp x. Evaluate ∑ i ∈ range 7, (3.9636)^i/i!: norm_num [Finset.sum_range_succ] ✓ hopefully.
Wait — I need exp(a√20) ≥ Σ(3.9636) — the lemma gives Σ(3.9636) ≤ exp(3.9636) and exp(3.9636) ≤ exp(a√20) (exp_le_exp of 3.9636 ≤ a√20 ✓).
3.9636 ≤ a√20: a = 2log2−1/2 ≥ 2*0.6931471803 − 0.5 = 0.8862943606; a√20 ≥ 0.8862943606*4.4721 = 3.96366...: norm_num: 0.8862943606*4.4721 = 3.963657...: ≥ 3.9636 ✓ linarith [hlog2lo, h√20lo] with mul_le_mul.
2.23605 ≤ √20/2: √20 ≥ 4.4721 ✓ linarith.
OK. Also for step A/B algebra: rather than deriving D2−D1/s ≤ ... by manipulating the actual expression — I'll write:
have hAB : D2x − D1x/s ≤ 4.56*(s+1)*(b²+b/s)*(eA+eB) := by
have e1 : D2x − D1x/s = 4.56*(2*(−a*eA − b*eB) + (s+1)*(a²*eA+b²*eB) − ((eA+eB) + (s+1)*(−a*eA−b*eB))/s) := by
rw [hD2, hD1]; field_simp [hs0]; ring — hmm D1x/s: field_simp needs care: (4.56*X)/s = 4.56*X/s ✓ field_simp [hs0]; ring.
rw [e1]
-- drop negative terms
have hd1 : 2*(-a*eA - b*eB) ≤ 0 := by nlinarith [ha, hb, heA, heB]?? 2*(−a eA − b eB) = −(2a eA + 2b eB) ≤ 0 ⟸ a eA ≥ 0: mul_nonneg ha.le heA.le — have: 2*(-a*eA - b*eB) = -(2*(a*eA) + 2*(b*eB)) := by ring; rw; linarith [mul_nonneg ...]... or nlinarith directly with products: nlinarith [mul_nonneg ha.le heA.le, mul_nonneg hb.le heB.le].
have hd2 : -((eA+eB))/s ≤ 0 := by ... (−(pos/pos)): have : (eA+eB)/s ≥ 0 := div_nonneg (add_nonneg heA.le heB.le) hs0.le; linarith.
nlinarith [...]
Actually the target: E ≤ 4.56*(s+1)*(b²+b/s)*(eA+eB) where E = 4.56*(neg + (s+1)*(a²eA+b²eB) + (s+1)*(a eA + b eB)/s − (eA+eB)/s): note −(s+1)*(−a eA−b eB)/s = +(s+1)*(a eA+b eB)/s ✓. The RHS − E = 4.56*(−neg1 + (s+1)[(b²+b/s)(eA+eB) − (a²eA+b²eB) − (aeA+beB)/s] + (eA+eB)/s) — with (b²+b/s)(eA+eB) − (a²eA+b²eB) − (aeA+beB)/s = (b²−a²)eA + (b/s − a/s)eA + ... = (b²−a²)eA + 0·eB?? check: (b²+b/s)(eA+eB) = b²eA + b²eB + (b/s)eA + (b/s)eB; subtract (a²eA+b²eB) + (aeA+beB)/s: = (b²−a²)eA + 0 + ((b−a)/s)eA + ((b−b)/s)eB = (b²−a² + (b−a)/s)eA ≥ 0 ✓ (b ≥ a, s > 0). So nlinarith with facts: 0 ≤ a, a ≤ b, 0 < s, 0 ≤ eA, 0 ≤ eB, and the product nonnegs... nlinarith should manage given (b−a) ≥ 0, (b²−a²) ≥ 0 (from 0 ≤ a ≤ b: nlinarith [hab]... b²−a² = (b−a)(b+a) ≥ 0: nlinarith can derive).
Given the delicacy, write it with explicit intermediate haves rather than one nlinarith. Let me draft the Lean:
```lean
theorem iimaj_bracket_bound {s : ℝ} (hs : Real.sqrt 20 ≤ s) :
4.56 * (2 * (-iimA * Real.exp (-iimA * s) - iimB * Real.exp (-iimB * s)) +
(s + 1) * (iimA ^ 2 * Real.exp (-iimA * s) + iimB ^ 2 * Real.exp (-iimB * s))) -
(4.56 * ((Real.exp (-iimA * s) + Real.exp (-iimB * s)) +
(s + 1) * (-iimA * Real.exp (-iimA * s) - iimB * Real.exp (-iimB * s)))) / s < 2 := by
...
```
Hmm — cleaner to set eA, eB, a, b via `set` after unfolding iimA/iimB. Then proceed. This is a huge lemma; write carefully. Sub-haves:
- hlog2lo := Real.log_two_gt_d9 (0.6931471803 < log 2), hlog2hi := Real.log_two_lt_d9 (log 2 < 0.6931471808).
- ha : 0.8862943606 ≤ a := by unfold; linarith. ha_up : a ≤ 0.8862943616 := by linarith.
- hb_lo : 1.3862943606 ≤ b, hb : b ≤ 1.3862943616 := by unfold; linarith.
- hab : a ≤ b (linarith).
- hs0 : 0 < s (from hs: √20 ≤ s, √20 > 0 ✓).
- h√lo : 4.4721 ≤ Real.sqrt 20 (le_sqrt, norm_num), h√hi : Real.sqrt 20 ≤ 4.4722 (sqrt_le: 4.4722² ≥ 20: Real.sqrt_le_sqrt (by norm_num : (20:ℝ) ≤ 4.4722^2)?? — Real.sqrt_le_sqrt : x ≤ y → √x ≤ √y ✓ and √4.4722² = 4.4722: Real.sqrt_sq (by norm_num) ✓. So h√hi : Real.sqrt 20 ≤ 4.4722 := by rw [show (4.4722:ℝ) = Real.sqrt (4.4722^2) by rw [Real.sqrt_sq (by norm_num)]]; exact Real.sqrt_le_sqrt (by norm_num).
- heA : 0 < eA, heB : 0 < eB (Real.exp_pos).
Main chain as haves:
h1 (drop): D2 − D1/s ≤ 4.56*((s+1)*(a²eA+b²eB) + (s+1)*(a*eA+b*eB)/s)
h2 (factor b): ≤ 4.56*(s+1)*(b²+b/s)*(eA+eB)
h3 (split): = 4.56*((s+1)/s)*((b²*s+b)*eA)*(1+Real.exp(-s/2))
h4 (monotone): ≤ 4.56*1.2237*0.2124*1.1099
h5 (numeric): < 2.
h4 needs the sub-facts:
hu1 : (s+1)/s ≤ 1.2237 (s ≥ √20 ≥ 4.4721: (s+1)/s = 1+1/s ≤ 1+1/4.4721 ≤ 1.2237: one_div_le_one_div_of_le (by norm_num : (0:ℝ)<4.4721) (s ≥ 4.4721) : 1/s ≤ 1/4.4721; 1/4.4721 ≤ 0.2237: rw [div_le_iff₀ (by norm_num)]; norm_num: 1 ≤ 0.2237*4.4721 = 1.00040... ✓).
hu2 : (b²*s+b)*eA ≤ 0.2124 — via u₂ antitone OR direct?? Direct bound without antitone: (b²s+b)*eA for s ≥ 4.4721: eA ≤ exp(−a·4.4721) ≤ 0.021272; b²s+b UNBOUNDED in s!! Can't bound directly — NEED the antitone argument (the poly grows but exp decays — the product is decreasing, so ≤ value at √20). So antitoneOn u₂ (Ici √20) required. OK.
u₂ := fun s => (b²*s + b) * Real.exp (−a*s) — but b, a here are the iimA/iimB or unfolded? For the antitone lemma I'll keep a, b as set-variables (reals) — antitone proof needs deriv u₂ = eA*(b² − a*(b²*s+b)):
deriv at x (x > 0): HasDerivAt u₂ (b²*eAx + (b²*x+b)*(eAx*(−a))) x:
hp : HasDerivAt (fun t => b²*t + b) (b²) x := ((hasDerivAt_id' x).const_mul b²)... const_mul gives (b² * 1): massage mul_one; .add_const b: (hasDerivAt (b²*t) (b²*1)).add_const b : fun t => b²*t + b, deriv b²*1 ✓ rwa [mul_one].
he : HasDerivAt (fun t => Real.exp (−a*t)) (eAx*(−a)) x := ((hasDerivAt_id' x).const_mul (−a)).exp with mul_one massage.
hp.mul he : deriv-value b²*eAx + (b²*x+b)*(eAx*(−a)) ✓ = eAx*(b² − a*(b²*x+b)) (ring).
Then antitoneOn_of_deriv_nonpos (convex_Ici _) (continuousOn) (differentiableOn) (fun x hx => ≤0):
continuousOn u₂: (continuousOn_const.mul continuousOn_id)... or via ContDiff: (contDiff continuous). ContinuousOn... u₂ continuous: Continuous.mul (continuous_const.mul continuous_id?) hmm b²*t: continuous_const.mul continuous_id? (continuous_const.mul continuous_id).add continuous_const for poly; exp: continuous_exp.comp (continuous_const.mul continuous_id)... a is a free var here (set): continuous_const.mul continuous_id : Continuous fun t => −a*t ✓ .exp? Real.continuous_exp.comp ✓. Or simpler: since u₂ is differentiable everywhere → continuous: use the ContDiff path: u₂ is ContDiff: contDiff_const.mul... then .continuousOn / .differentiableOn. contDiff: (contDiff_const.mul contDiff_id).add contDiff_const for the poly? b²*t + b: (contDiff_const.mul contDiff_id).add contDiff_const ✓; exp: (contDiff_const.mul contDiff_id).exp ✓; .mul ✓. Then hcont.continuousOn, hcont.differentiableOn (by norm_num).
interior (Ici √20) = Ioi √20: interior_Ici ✓.
≤ 0: for x > √20: eAx*(b² − a*(b²*x+b)) ≤ 0 ⟸ b² − a*(b²*x+b) ≤ 0: a*(b²*x+b) ≥ a*(b²*√20+b) (x ≥ √20, mul_le_mul) ≥ 0.8862943606*(b²*4.4721+b): b² ≥ 1.3862943606² = 1.9217...: ≥ 0.8862943606*(1.92170...*4.4721 + 1.3862943606): compute inner: b² ≥ 1.3862943606²: 1.3862943606² = 1.92181...: 1.3862943606² = 1.921812...: *4.4721 = 8.59473; +1.3862943606 = 9.98103; *0.8862943606 = 8.84622 ≥ 1.92182 ≥ b² ✓. Chain: b² ≤ 1.92182 (from hb²) and a*(b²*x+b) ≥ 8.8462: so b² − a*(...) ≤ 1.92182 − 8.8462 < 0 ✓ nlinarith [hb2, hbig] where hbig : 8.8462 ≤ a*(b²*x+b): from a ≥ 0.8862943606 and (b²*x+b) ≥ 1.921812*4.4721+1.3862943606 = 9.98103 (b² ≥ 1.921812: 1.3862943606² = ? compute precisely: 1.3862943606² = 1.9218122...: 1.3862943606^2: 1.3862943606*1.3862943606: ≈ 1.92181219. Let me use 1.9218: b² ≥ 1.9218 (norm_num from hlog2lo: (2*0.6931471803)² = 1.3862943606² = 1.92181... ≥ 1.9218 ✓). Then b²*x+b ≥ 1.9218*4.4721 + 1.3862943606 = 8.59462+1.38629 = 9.98091 ≥ 9.9809. a*(...) ≥ 0.8862943606*9.9809 = 8.84616 ≥ 8.8461. And b² ≤ 1.3862943616² = 1.92182: b² − a(...) ≤ 1.92182 − 8.8461 < 0 ✓.
nlinarith [hb2up, hbig, ...] — the product a*(b²*x+b) expansion: nlinarith needs the product facts — provide hbig as a single hypothesis: hbig : (8.8461:ℝ) ≤ a * (b^2 * x + b): from mul_le_mul ha (b²x+b ≥ 9.9809) (by positivity? 9.9809 ≥ 0 ✓) (a nonneg ✓): a*(b²x+b) ≥ 0.8862943606*9.9809 ≥ 8.8461 (norm_num). Provide hb2x : 9.9809 ≤ b^2*x+b: from b² ≥ 1.9218, x ≥ 4.4721, b ≥ 1.3862943606: mul_le_mul hb2lo (x≥) ... b²*x ≥ 1.9218*4.4721 = 8.59462: then + b: ≥ 8.59462 + 1.3862943606 = 9.98092 ≥ 9.9809 ✓ linarith [mul_le_mul ...].
Then antitoneOn_of_deriv_nonpos gives AntitoneOn u₂ (Ici √20) → u₂ s ≤ u₂ √20 (√20 ≤ s ✓, √20 ∈ Ici √20 ✓).
u₂ √20 = (b²*√20+b)*exp(−a*√20) ≤ 9.9811*0.021272 ≤ 0.2124:
b²*√20+b ≤ 9.9811: b² ≤ 1.92182, √20 ≤ 4.4722, b ≤ 1.3862943616: b²*√20 ≤ 1.92182*4.4722 = 8.59477: +b ≤ 8.59477+1.3862943616 = 9.98106 ≤ 9.9811 ✓.
exp(−a√20) ≤ 0.021272: exp(a√20) ≥ 47.02: a√20 ≥ 3.9636 (ha, h√lo: a*√20 ≥ 0.8862943606*4.4721 = 3.96366 ≥ 3.9636 ✓ mul_le_mul); exp(a√20) ≥ exp(3.9636) ≥ Σ₇(3.9636) ≥ 47.02 (Real.sum_le_exp_of_nonneg (by norm_num) 7 + norm_num [Finset.sum_range_succ] to evaluate the sum ≥ 47.02: Σ₇(3.9636) ≈ 47.0136 ✓ 47.0136 ≥ 47.02?? 47.0136 < 47.02!! Use 47.01: 1/47.01 = 0.0212714...: 9.9811*0.0212714 = 0.212339 ≤ 0.2124 ✓. So exp ≥ 47.01 → exp(−a√20) = (exp(a√20))⁻¹ ≤ 1/47.01 ≤ 0.021272 (rw [Real.exp_neg]; one_div_le_one_div_of_le (by positivity? exp > 0: (by norm_num : (0:ℝ)<47.01) hExp) : 1/(exp) ≤ 1/47.01; 1/47.01 ≤ 0.021272: rw [div_le_iff₀]; norm_num: 1 ≤ 0.021272*47.01 = 0.99999...: 0.021272*47.01 = 0.99999672 < 1!! ✗. Hmm: 1/47.01 = 0.02127164...: so 1/47.01 ≤ 0.021272 ⟺ 1 ≤ 0.021272*47.01 = 0.9999967 — FALSE. Need 0.0212717: 0.0212717*47.01 = 0.999982... also <1?? 1/47.01 = 0.021271644: so need ≥ 0.0212717: 0.0212717*47.01 = 0.99998... wait 0.0212717*47.01 = 0.99998..? compute: 47.01*0.0212717 = 47*0.0212717 + 0.01*0.0212717 = 0.999770 + 0.000213 = 0.999983 < 1 ✗. Something's off: 1/47.01 = 0.0212716...: 47.01*0.0212716 = 0.99998...?? 47.01 * 0.0212716 = 47.01*0.02 = 0.9402; 47.01*0.0012716 = 0.059777; total 0.99998. That's wrong — 47.01 * (1/47.01) = 1 exactly, so 1/47.01 ≈ 0.021271... and 47.01*0.0212716 = ? 47.01*0.0212716: 47*0.0212716 = 0.999765; .01*0.0212716 = 0.0002127; total 0.999978 — but 1/47.01 = 0.02127164 vs 0.0212716 — the digit: 1/47.01 = 0.0212716443... so 47.01*0.0212716443 = 1.0 ✓. My decimal 0.0212716 is short at the 7th digit. Use 0.021272: 47.01*0.021272 = 47.01*0.0212716443 + 47.01*0.0000003557 = 1.0 + 0.0000167 = 1.0000167 ≥ 1 ✓ GOOD — my arithmetic before was sloppy; 0.021272*47.01: 47*0.021272 = 0.999784; 0.01*0.021272 = 0.00021272; total 0.99999672?? Hmm contradiction with the split calc. Recompute 47*0.021272: 0.021272*47 = 0.021272*40 + 0.021272*7 = 0.85088 + 0.148904 = 0.999784. +0.00021272 = 0.99999672. But via the other method: 0.021272 − 0.0212716443 = 0.0000003557; ×47.01 = 0.00001672; so 47.01*0.021272 = 1.00001672. These disagree!! One is wrong: 0.0212716443*47.01: 47.01*0.0212716 = 0.999978 (computed above) — but 47.01*0.0212716443 should = 1 EXACTLY if 0.0212716443 = 1/47.01. Is 1/47.01 = 0.0212716443? 47.01*0.0212716443: 47*0.0212716443 = 0.99976728; wait 0.0212716443*47 = 0.99976...? 0.0212716443*47 = 0.0212716443*50 − 0.0212716443*3 = 1.063582215 − 0.0638149329 = 0.99976728. Plus 0.01*0.0212716443 = 0.00021272. Total = 0.99998000. NOT 1! So 1/47.01 ≠ 0.0212716443. Compute 1/47.01 correctly: 1/47 = 0.0212766; 1/47.01 ≈ 0.0212721...: 47.01*0.0212721 = ? 47*0.0212721 = 0.9997887; +0.000212721 = 1.0000014 — slightly over. So 1/47.01 ≈ 0.02127207. My "0.0212716443" was wrong (that's 1/47.011 or something). So: 1/47.01 ≈ 0.02127207 ≤ 0.0212721: check 0.0212721*47.01 = 1.0000014 ≥ 1 ✓. Then u₂ ≤ 9.9811*0.0212721 = 0.212339 ≤ 0.2124 ✓.
Similarly u₃: exp(√20/2) ≥ Σ₆(2.23605) ≥ 9.1064: 1/9.1064 = 0.109812...: 9.1064*0.10982 = 1.00006...: 9.1064*0.10982 = 9.1064*0.11 − 9.1064*0.00018 = 1.001704 − 0.001639 = 1.000065 ≥ 1 ✓ so ≤ 0.10982 ✓. u₃ ≤ 1.10982 ≤ 1.1099 ✓.
Final: 4.56*1.2237*0.2124*1.1099: 1.2237*0.2124 = 0.259914; *1.1099 = 0.288477; *4.56 = 1.315456 < 2 ✓ norm_num.
hu1 recheck: 1/4.4721 ≤ 0.2237: 0.2237*4.4721 = ?: 4.4721*0.2237 = 4.4721*0.2 = 0.89442; 4.4721*0.0237 = 0.105989; total 1.000409 ≥ 1 ✓.
OK — also step h3's algebra: 4.56*(s+1)*(b²+b/s)*(eA+eB) = 4.56*((s+1)/s)*((b²*s+b)*eA)*(1+exp(−s/2)):
(s+1)*(b²+b/s) = ((s+1)/s)*(b²*s+b): field_simp [hs0]; ring ✓.
eA+eB = eA*(1+exp(−s/2)): eB = exp(−b*s) = exp(−a*s − s/2) = eA*exp(−s/2): need −b*s = −a*s − s/2 ⟺ (b−a)s = s/2 ⟺ b−a = 1/2 ✓ (unfold iimA iimB: 2log2 − (2log2−1/2) = 1/2 ✓): heB' : eB = eA * Real.exp (−s/2): rw [show eB = exp(−a*s + −(s/2)) by congr 1; unfold a b?? — a, b are set vars equal to the iimA/iimB... if I unfold at the start and set a := 2*log2−1/2, b := 2*log2, then b − a = 1/2 by ring ✓; exp(−b*s) = exp(−a*s − s/2): exponents: −b*s = −a*s + −(s/2): from b = a + 1/2: ring ✓ then Real.exp_add.
Alright — writing this monster now. To bound risk, I'll write it with explicit haves and iterate. Also note `set a := ...`/`set b := ...` after unfolding — or simpler: DON'T unfold; keep iimA/iimB and prove facts about them via have-unfolds. I'll `unfold iimA iimB` first then `set a := 2*Real.log 2 − 1/2`... `set` after unfold: set a := (2*Real.log 2 − 1/2) with ha_def — folds occurrences ✓.
Actually simpler: keep iimA/iimB folded in the statement and early in the proof do:
have hab2 : iimB = iimA + 1/2 := by unfold iimA iimB; ring
have ha_eq : iimA = 2*Real.log 2 − 1/2 := rfl
have hb_eq : iimB = 2*Real.log 2 := rfl
and use ha_eq/hb_eq rewrites when needed for numerics. Hmm — mixing folded/unfolded invites mismatch hell. DECISION: unfold iimA iimB at the START of the proof (the goal then has 2*log2−1/2 and 2*log2 inline), then `set L := Real.log 2 with hL` — one atom! a-expr = 2L−1/2, b-expr = 2L. All numerics via hlog2lo/hi. This is cleanest.
Let me now write it. One more consideration — the statement of iimaj_bracket_bound with iimA/iimB folded; unfold in proof.
Also needed at the end for assembly: IIMaj_deriv2_lt = chain_rule_sqrt + deriv_psiTilde/deriv2_psiTilde rw + iimaj_bracket_bound.
IIMaj machinery compiles. Committing, then the final bound lemma.
tool: Bash
input
{
"command": "cd /d/Python/Quantum && git add research/lean/NguyenRH1/NguyenRH1/LiSkeleton.lean && git -c user.name=\"NGUYEN-RH-1\" -c user.email=\"research@local\" commit -m \"Session 011: IIMaj machinery \u2014 psiTilde rewrite (IIMaj n = 4.56(s+1)(e^{-as}+e^{-bs})), global C\u00b2, closed-form D1/D2 derivatives\" && git log --oneline -1",
"description": "Commit IIMaj machinery"
}
raw content_json (database row)
[{"type":"thinking","thinking":"IIMaj machinery compiles: IIMaj_eq_psiTilde_sqrt, psiTilde_contDiff, hasDerivAt_psiTilde, deriv_psiTilde, deriv2_psiTilde. Commit, then the IIMaj bound (the last big piece before assembly).\n\nThe bound lemma:\n```lean\ntheorem IIMaj_deriv2_lt (n : ℝ) (hn : 20 ≤ n) :\n deriv (deriv IIMaj) n < 1 / (2 * n)\n```\n\nProof:\n1. rw [show IIMaj = fun m => psiTilde (√m) from funext IIMaj_eq_psiTilde_sqrt] — function-level: funext fun m => IIMaj_eq_psiTilde_sqrt m ✓.\n2. chain_rule_sqrt psiTilde psiTilde_contDiff n (by linarith) : deriv (deriv fun m => psiTilde (√m)) n = (ψ″(√n) − ψ′(√n)/√n)/(4n). rw [deriv_psiTilde, deriv2_psiTilde] to get the closed forms.\n3. Set s := √n. Facts: s ≥ √20 (sqrt monotone: Real.sqrt_le_sqrt hn ✓), s ≥ 4.4721 (from block-range style bound), s > 0, n = s².\n4. Need: (D2(s) − D1(s)/s)/(4n) < 1/(2n) ⟺ D2(s) − D1(s)/s < 2 (n > 0: multiply both sides by 4n > 0: (div_lt_div_iff... or: (X)/(4n) < 1/(2n) ⟺ 2n·X < 4n·1 ⟺ X < 2 via field). Formal: (lt_div_iff₀ (by positivity : (0:ℝ) < 4*n)).mpr? goal X/(4n) < 1/(2n): rewrite 1/(2n) = 2/(4n): then div_lt_div_iff_of_pos_right? or mul: suffices X < 2: X/(4n) < 2/(4n) = 1/(2n) via div_lt_div_of_pos_right?? div_lt_div_right (unknown earlier!) — gcongr worked for ≤; for <: `div_lt_div_of_lt_left`? hmm — use: X/(4n) < 2/(4n) by gcongr (needs X < 2 and 0 < 4n) — gcongr for strict: `gcongr` proves a/c < b/c from a < b ✓ (side 0 < 4n via positivity... with hypothesis n > 0 in context positivity might still fail — provide have h4n : (0:ℝ) < 4*n := by positivity?? positivity needs n > 0 — from hn : 20 ≤ n: `by linarith` ✓ then gcongr uses it? gcongr side conditions discharged by assumption ✓ h4n in context... gcongr looks for 0 < 4*n in context? It tries positivity which doesn't use context... but assumption IS tried. Provide and hope; else explicit: (div_lt_div_iff_of_pos_right?? — or mul_lt_mul_of_nonneg... Alternative deterministic: have h4n : (0:ℝ) < 4*n := by linarith; have e : (1:ℝ)/(2*n) = 2/(4*n) := by field_simp [show (n:ℝ) ≠ 0 by linarith]; ring?? field_simp might close; rw [e]; exact (div_lt_div_right h4n)?? unknown name — grr. Use: by gcongr with the explicit have h4n — gcongr discharges via assumption/positivity — try.\n\n5. The main inequality: D2(s) − D1(s)/s < 2 where:\nD2(s) = 4.56*(2*(−a eA − b eB) + (s+1)*(a²eA + b²eB))\nD1(s)/s = 4.56*((eA+eB) + (s+1)*(−a eA − b eB))/s\nwith eA = exp(−a s), eB = exp(−b s), a = 2log2−1/2, b = 2log2.\n\nD2 − D1/s = 4.56*[2*(−a eA − b eB) + (s+1)(a²eA+b²eB) − (eA+eB)/s − (s+1)(−a eA − b eB)/s].\n\nStep A (drop negatives): 2*(−a eA − b eB) ≤ 0 (a,b,eA,eB > 0) and −(eA+eB)/s ≤ 0; and −(s+1)(−a eA − b eB)/s = (s+1)(a eA + b eB)/s > 0 keep.\nSo D2 − D1/s ≤ 4.56*[(s+1)(a²eA+b²eB) + (s+1)(a eA + b eB)/s].\n\nStep B: a²eA + b²eB ≤ b²(eA+eB); a eA + b eB ≤ b(eA+eB) (0 < a ≤ b; eA,eB ≥ 0):\nsum ≤ (s+1)(b² + b/s)(eA+eB).\nSo D2 − D1/s ≤ 4.56(s+1)(b²+b/s)(eA+eB).\n\nStep C: eA+eB = eA(1 + exp(−(b−a)s)) with b−a = 1/2: eB = exp(−b s) = exp(−a s − (b−a)s) = eA·exp(−(b−a)s): exp_add ✓ b−a = 1/2: iimB − iimA = 1/2: unfold: 2log2 − (2log2−1/2) = 1/2 ✓ ring.\n(s+1)(b²+b/s) = ((s+1)/s)·(b²s+b) [field].\nSo bound = 4.56·u₁·u₂·u₃ where u₁ = (s+1)/s, u₂ = (b²s+b)·eA, u₃ = 1+exp(−s/2).\n\nStep D: each factor antitone on [√20,∞); so ≤ value at √20:\nu₁(s) ≤ u₁(√20) = (√20+1)/√20.\nu₂(s) ≤ u₂(√20) = (b²√20+b)·exp(−a√20).\nu₃(s) ≤ u₃(√20) = 1+exp(−√20/2).\n\nStep E: numerics:\n- √20 bounds: 4.4721 ≤ √20 ≤ 4.4722 (4.4721² ≤ 20 ≤ 4.4722²: norm_num-able? 4.4721² = 19.999678... ✓; 4.4722² = 20.00057... hmm 4.4722² = 20.000573 ✓ ≥ 20 ✓).\n- u₁(√20) = 1 + 1/√20 ≤ 1 + 1/4.4721 ≤ 1.2236 (norm_num: 1/4.4721 ≤ 0.22361... ✓: 4.4721·0.22361 = 0.99999...? careful — 1/4.4721 ≤ 0.2237: 4.4721·0.2237 = 1.00040... ✓ so 1/4.4721 ≤ 0.2237 ✓ provable by rw [div_le_iff₀] + norm_num).\n- a ≥ 0.8862943606, b ≤ 1.3862943616, b ≥ 1.3862943606 (log_two bounds).\n- b² ≤ 1.92182 (1.3862943616² = 1.921812...: norm_num).\n- b²√20 + b ≤ 1.92182·4.4722 + 1.3862943616 = 8.5961 + 1.3863 = 9.9824 ≤ 9.9824.\n- a√20 ≥ 0.8862943606·4.4721 = 3.96366... ≥ 3.9636.\n- exp(−a√20) ≤ exp(−3.9636) ≤ 1/46.86: exp(3.9636) ≥ Σ₇?? sum_le_exp_of_nonneg with n=7: Σ_{i<7} 3.9636^i/i! = 1 + 3.9636 + 7.855 + 10.378 + 10.284 + 8.1527 + 5.3872 ≈ 46.92: compute: 3.9636² = 15.7101/2 = 7.8551; ³ = 62.266/6 = 10.3777; ⁴ = 246.76/24 = 10.2818; ⁵ = 978.06/120 = 8.1505; ⁶ = 3877.2/720 = 5.385. Sum: 1+3.9636+7.8551+10.3777+10.2818+8.1505+5.385 = 47.0136. So exp(−a√20) ≤ 1/47.01 ≈ 0.021272. For Lean: exp(−a√20) = (exp(a√20))⁻¹: a√20 ≥ 3.9636 → exp(a√20) ≥ exp(3.9636) ≥ Σ₇(3.9636) ≥ 46.9 (norm_num on the polynomial? Σ₇ with x = 3.9636: Finset.sum range 7 of x^i/i! — computable by norm_num? The sum is over Finset.range 7 — `Finset.sum_range_succ` ×7 then norm_num — or `norm_num [Finset.sum_range_succ]` handles ✓. Then exp(−a√20) = 1/exp(a√20) ≤ 1/46.9 via one_div_le_one_div_of_le (exp > 0) ✓ and exp_neg: exp(−t) = (exp t)⁻¹: Real.exp_neg ✓.\n- u₂(√20) ≤ 9.9824·0.021272 ≈ 0.21239 ≤ 0.2124.\n- u₁(√20) ≤ 1.2237.\n- u₃(√20): √20/2 ≥ 2.23605: exp(−√20/2) ≤ exp(−2.23605) ≤ 1/Σ₅(2.23605)?? exp(2.23605) ≥ 1+2.23605+2.49997+1.86324+1.0417+0.46582 (i<6) ≈ 9.10678 → ≤ 1/9.1067 ≈ 0.10981. u₃ ≤ 1.1099.\n- product: 4.56·1.2237·0.2124·1.1099 = 4.56·0.28827 ≈ 1.3145... ✗✗ TOO BIG! Need < 2: 1.3145 < 2 ✓ OK fine! (The margin needs D2−D1/s < 2, not < 1.) 1.32 < 2 ✓ slack 34%.\n\nLet me double check step D application: 4.56·u₁(s)·u₂(s)·u₃(s) ≤ 4.56·u₁(√20)·u₂(√20)·u₃(√20) needs nonneg factors ✓ all positive.\n\nHmm wait — but in step C, the expression was 4.56·[(s+1)/s]·[(b²s+b)eA]·[1+exp(−s/2)] — but u₂ contains eA = exp(−a s) — monotonicity of u₂ = (b²s+b)·exp(−a s): NOT obviously antitone — the poly grows, exp decays. D-057-measured behavior decays. The antitone proof via derivative ≤ 0 (as planned): deriv u₂ = exp(−a s)(b² − a(b²s+b)) ≤ 0 ⟺ b² ≤ a(b²s+b) ⟸ at s ≥ √20: a(b²s+b) ≥ 0.8862943606·(b²·4.4721+b) ≥ 0.8862943606·(1.9217·4.4721+1.3862) = 0.8862943606·9.9795 ≈ 8.845 ≥ 1.92182 ≥ b² ✓ — but for ANTITONE ON THE WHOLE RANGE need deriv ≤ 0 for ALL s > √20: a(b²s+b) increasing in s ⟹ b² − a(b²s+b) decreasing ⟹ ≤ value at √20 < 0 ✓ — so deriv u₂ (s) = exp(−as)(b² − a(b²s+b)) with second factor < 0 throughout (decreasing, negative at left end) ✓.\n\nantitoneOn_of_deriv_nonpos — verify name. In Mathlib: `antitoneOn_of_deriv_nonpos (hD : Convex ℝ D) (hf : ContinuousOn f D) (hf' : DifferentiableOn ℝ f (interior D)) (h : ∀ x ∈ interior D, deriv f x ≤ 0) : AntitoneOn f D` ✓ I'm fairly sure (Mathlib.Analysis.Convex.Deriv).\n\nFor u₁ and u₃, avoid deriv machinery:\nu₁(s) = (s+1)/s = 1 + 1/s: for s ≥ √20: 1/s ≤ 1/√20: one_div_le_one_div_of_le (0 < √20) h ✓ direct.\nu₃(s) = 1 + exp(−s/2): exp(−s/2) ≤ exp(−√20/2): exp_le_exp.mpr (neg_le_neg (div_le_div_of_nonneg... s/2 ≥ √20/2 ✓ linarith; −s/2 ≤ −√20/2 ✓) ✓ direct.\n\nSo only u₂ needs the deriv-antitone argument. deriv u₂: u₂ = fun s => (b²*s + b) * exp(−a*s): deriv via deriv_mul (differentiable) — or HasDerivAt: (poly: hasDerivAt (b²s+b) b²: (hasDerivAt_id' s).const_mul b² → b²*1?? const_mul: (fun t => b²*t) (b²*1); .add_const b → b² — massage mul_one; exp part hva-style) → HasDerivAt u₂ (b²*eA + (b²s+b)*(eA*(−a))) s — then deriv u₂ s = that (h.deriv) — for the antitoneOn lemma I need deriv f x ≤ 0 as a function of x in interior — via the same HasDerivAt at each x: have hder : ∀ x ∈ interior (Ici √20), deriv u₂ x = exp(−a x)*(b² − a*(b²*x+b)) := fun x hx => (u₂-hasDerivAt x).deriv with algebra massage. Then ≤ 0.\n\nAlso ContinuousOn/DifferentiableOn u₂: products of smooth ✓.\n\nOK — this is the plan. Given the size, split into two lemmas:\n(i) `iim_factor_bound`: for s ≥ √20: 4.56·u₁(s)·u₂(s)·u₃(s) ≤ 4.56·1.2237·0.2124·1.1099 ≤ 1.32 < 2 — the numeric/monotone part, stated as: D2(s) − D1(s)/s-form bound... hmm actually cleaner: state the final lemma directly with the pieces inline.\n\nActually — let me restructure to minimize risk: prove ONE lemma `iimaj_bracket_bound (s) (hs : √20 ≤ s) : D2expr(s) − D1expr(s)/s < 2` where D1expr/D2expr are the closed forms, then the main IIMaj_deriv2_lt glues chain_rule_sqrt + formulas. \n\nWrite it. The numeric constants: use explicit decimals: 1.2237, 0.2124, 1.1099 and final 4.56*1.2237*0.2124*1.1099 < 2 by norm_num (4.56*1.2237 = 5.5801; *0.2124 = 1.18521; *1.1099 = 1.31546 < 2 ✓).\n\nCareful with step B term: 4.56*[(s+1)(a²eA+b²eB) + (s+1)(aeA+beB)/s] = 4.56*(s+1)*[(a²eA+b²eB) + (aeA+beB)/s] — the /s: [(a eA + b eB)/s] ≤ (b/s)(eA+eB) needs s > 0 ✓. Then (b² + b/s)(eA+eB) ✓.\n\nAnd step C: (s+1)(b²+b/s) = ((s+1)/s)(b²s+b): field_simp ✓ s≠0.\n\nLet me also double check the b−a factoring: eA + eB = eA + eA*exp(−(b−a)s) = eA*(1 + exp(−(b−a)s)) with b−a = 1/2: exp(−b s) = exp(−a s)·exp(−(b−a)s)?: −b s = −a s + (−(b−a)s) ✓ ring (b−a = 1/2 used only in u₃'s exponent: exp(−(b−a)s) = exp(−(1/2)s) = exp(−s/2) ✓).\n\nSo: bound_expr = 4.56*(s+1)*(b²+b/s)*(eA+eB) = 4.56*((s+1)/s)*(b²*s+b)*eA*(1+exp(−s/2)):\nvia: (s+1)*(b²+b/s) = ((s+1)/s)*(b²s+b) [field] and eA+eB = eA*(1+exp(−s/2)) [via exp_add]. ✓\n\nNow write the two lemmas. To keep the proof manageable, sequence of `have`s with a final linarith/nlinarith chain. Most delicate: the product monotonicity 4.56·u₁u₂u₃ ≤ 4.56·u₁₀u₂₀u₃₀: u₁,u₂,u₃ ≥ 0: mul_le_mul chains: u₁u₂u₃ ≤ u₁₀u₂u₃ (mul_le_mul_of_nonneg_right ... u₂u₃ ≥ 0)... three-step via mul_le_mul with nonneg: mul_le_mul (u₁ ≤ u₁₀) (u₂ ≤ u₂₀) (u₂ ≥ 0) (u₁₀ ≥ 0) : u₁*u₂ ≤ u₁₀*u₂₀; then mul_le_mul (that) (u₃ ≤ u₃₀) (u₃ ≥ 0) (mul_nonneg u₁₀ u₂₀) : ≤ u₁₀u₂₀u₃₀ ✓ then const 4.56.\n\nNumeric haves:\nhV1 : u₁(√20) ≤ 1.2237: (√20+1)/√20 ≤ 1.2237: rw [div_le_iff₀ h√20pos]: √20+1 ≤ 1.2237*√20 ⟺ 1 ≤ 0.2237*√20 ⟺ √20 ≥ 1/0.2237 = 4.47027...: from √20 ≥ 4.4721: 0.2237*4.4721 = 1.00040... ≥ 1 ✓ linarith [h√20lo].\nhV2 : u₂(√20) ≤ 0.2124: (b²√20+b)*exp(−a√20) ≤ 9.9824*0.021272: two-factor bound: b²√20+b ≤ 9.9824 (b² ≤ 1.92182, √20 ≤ 4.4722, b ≤ 1.3862943616: 1.92182*4.4722 = 8.59632 + 1.3862943616 = 9.98261 — hmm exceeds 9.9824! recompute: 1.92182*4.4722 = 8.59636...: 1.92182*4.4722: 1.92182*4 = 7.68728; 1.92182*0.4722 = 0.907484; total 8.594764. +1.3862943616 = 9.981059. ≤ 9.9811 ✓. And exp ≤ 0.021272: 9.9811*0.021272 = 0.212338 ≤ 0.2124 ✓.\n exp(−a√20) ≤ 0.021272: from exp(a√20) ≥ 47.02: Σ₇(3.9636): computed 47.0136 ≥ 47.01: 1/47.01 = 0.021271... ≤ 0.021272 ✓.\nhV3 : u₃(√20) ≤ 1.1099: exp(−√20/2) ≤ 0.1098: exp(√20/2) ≥ exp(2.23605) ≥ Σ₆(2.23605) ≥ 9.1067: compute: x = 2.23605: x² = 4.99992/2 = 2.49996; x³ = 11.1790/6 = 1.86317; x⁴ = 24.9967/24 = 1.04153; x⁵ = 55.8926/120 = 0.46577. Sum: 1+2.23605+2.49996+1.86317+1.04153+0.46577 = 9.10648 ≥ 9.1064. 1/9.1064 = 0.10981 ≤ 0.10982. u₃ = 1 + that ≤ 1.10982 ≤ 1.1099 ✓.\nfinal: 4.56*1.2237*0.2124*1.1099 = 1.3155 < 2 ✓ norm_num.\n\nFor Σ bounds: Real.sum_le_exp_of_nonneg (hx : 0 ≤ x) (n : ℕ) : ∑ i ∈ range n, x^i/i! ≤ exp x. Evaluate ∑ i ∈ range 7, (3.9636)^i/i!: norm_num [Finset.sum_range_succ] ✓ hopefully.\n\nWait — I need exp(a√20) ≥ Σ(3.9636) — the lemma gives Σ(3.9636) ≤ exp(3.9636) and exp(3.9636) ≤ exp(a√20) (exp_le_exp of 3.9636 ≤ a√20 ✓).\n\n3.9636 ≤ a√20: a = 2log2−1/2 ≥ 2*0.6931471803 − 0.5 = 0.8862943606; a√20 ≥ 0.8862943606*4.4721 = 3.96366...: norm_num: 0.8862943606*4.4721 = 3.963657...: ≥ 3.9636 ✓ linarith [hlog2lo, h√20lo] with mul_le_mul.\n\n2.23605 ≤ √20/2: √20 ≥ 4.4721 ✓ linarith.\n\nOK. Also for step A/B algebra: rather than deriving D2−D1/s ≤ ... by manipulating the actual expression — I'll write:\n\nhave hAB : D2x − D1x/s ≤ 4.56*(s+1)*(b²+b/s)*(eA+eB) := by\n have e1 : D2x − D1x/s = 4.56*(2*(−a*eA − b*eB) + (s+1)*(a²*eA+b²*eB) − ((eA+eB) + (s+1)*(−a*eA−b*eB))/s) := by\n rw [hD2, hD1]; field_simp [hs0]; ring — hmm D1x/s: field_simp needs care: (4.56*X)/s = 4.56*X/s ✓ field_simp [hs0]; ring.\n rw [e1]\n -- drop negative terms\n have hd1 : 2*(-a*eA - b*eB) ≤ 0 := by nlinarith [ha, hb, heA, heB]?? 2*(−a eA − b eB) = −(2a eA + 2b eB) ≤ 0 ⟸ a eA ≥ 0: mul_nonneg ha.le heA.le — have: 2*(-a*eA - b*eB) = -(2*(a*eA) + 2*(b*eB)) := by ring; rw; linarith [mul_nonneg ...]... or nlinarith directly with products: nlinarith [mul_nonneg ha.le heA.le, mul_nonneg hb.le heB.le].\n have hd2 : -((eA+eB))/s ≤ 0 := by ... (−(pos/pos)): have : (eA+eB)/s ≥ 0 := div_nonneg (add_nonneg heA.le heB.le) hs0.le; linarith.\n nlinarith [...]\n Actually the target: E ≤ 4.56*(s+1)*(b²+b/s)*(eA+eB) where E = 4.56*(neg + (s+1)*(a²eA+b²eB) + (s+1)*(a eA + b eB)/s − (eA+eB)/s): note −(s+1)*(−a eA−b eB)/s = +(s+1)*(a eA+b eB)/s ✓. The RHS − E = 4.56*(−neg1 + (s+1)[(b²+b/s)(eA+eB) − (a²eA+b²eB) − (aeA+beB)/s] + (eA+eB)/s) — with (b²+b/s)(eA+eB) − (a²eA+b²eB) − (aeA+beB)/s = (b²−a²)eA + (b/s − a/s)eA + ... = (b²−a²)eA + 0·eB?? check: (b²+b/s)(eA+eB) = b²eA + b²eB + (b/s)eA + (b/s)eB; subtract (a²eA+b²eB) + (aeA+beB)/s: = (b²−a²)eA + 0 + ((b−a)/s)eA + ((b−b)/s)eB = (b²−a² + (b−a)/s)eA ≥ 0 ✓ (b ≥ a, s > 0). So nlinarith with facts: 0 ≤ a, a ≤ b, 0 < s, 0 ≤ eA, 0 ≤ eB, and the product nonnegs... nlinarith should manage given (b−a) ≥ 0, (b²−a²) ≥ 0 (from 0 ≤ a ≤ b: nlinarith [hab]... b²−a² = (b−a)(b+a) ≥ 0: nlinarith can derive).\n\nGiven the delicacy, write it with explicit intermediate haves rather than one nlinarith. Let me draft the Lean:\n\n```lean\ntheorem iimaj_bracket_bound {s : ℝ} (hs : Real.sqrt 20 ≤ s) :\n 4.56 * (2 * (-iimA * Real.exp (-iimA * s) - iimB * Real.exp (-iimB * s)) +\n (s + 1) * (iimA ^ 2 * Real.exp (-iimA * s) + iimB ^ 2 * Real.exp (-iimB * s))) -\n (4.56 * ((Real.exp (-iimA * s) + Real.exp (-iimB * s)) +\n (s + 1) * (-iimA * Real.exp (-iimA * s) - iimB * Real.exp (-iimB * s)))) / s < 2 := by\n ...\n```\nHmm — cleaner to set eA, eB, a, b via `set` after unfolding iimA/iimB. Then proceed. This is a huge lemma; write carefully. Sub-haves:\n\n- hlog2lo := Real.log_two_gt_d9 (0.6931471803 < log 2), hlog2hi := Real.log_two_lt_d9 (log 2 < 0.6931471808).\n- ha : 0.8862943606 ≤ a := by unfold; linarith. ha_up : a ≤ 0.8862943616 := by linarith.\n- hb_lo : 1.3862943606 ≤ b, hb : b ≤ 1.3862943616 := by unfold; linarith.\n- hab : a ≤ b (linarith).\n- hs0 : 0 < s (from hs: √20 ≤ s, √20 > 0 ✓).\n- h√lo : 4.4721 ≤ Real.sqrt 20 (le_sqrt, norm_num), h√hi : Real.sqrt 20 ≤ 4.4722 (sqrt_le: 4.4722² ≥ 20: Real.sqrt_le_sqrt (by norm_num : (20:ℝ) ≤ 4.4722^2)?? — Real.sqrt_le_sqrt : x ≤ y → √x ≤ √y ✓ and √4.4722² = 4.4722: Real.sqrt_sq (by norm_num) ✓. So h√hi : Real.sqrt 20 ≤ 4.4722 := by rw [show (4.4722:ℝ) = Real.sqrt (4.4722^2) by rw [Real.sqrt_sq (by norm_num)]]; exact Real.sqrt_le_sqrt (by norm_num).\n- heA : 0 < eA, heB : 0 < eB (Real.exp_pos).\n\nMain chain as haves:\nh1 (drop): D2 − D1/s ≤ 4.56*((s+1)*(a²eA+b²eB) + (s+1)*(a*eA+b*eB)/s)\nh2 (factor b): ≤ 4.56*(s+1)*(b²+b/s)*(eA+eB)\nh3 (split): = 4.56*((s+1)/s)*((b²*s+b)*eA)*(1+Real.exp(-s/2))\nh4 (monotone): ≤ 4.56*1.2237*0.2124*1.1099\nh5 (numeric): < 2.\n\nh4 needs the sub-facts:\n hu1 : (s+1)/s ≤ 1.2237 (s ≥ √20 ≥ 4.4721: (s+1)/s = 1+1/s ≤ 1+1/4.4721 ≤ 1.2237: one_div_le_one_div_of_le (by norm_num : (0:ℝ)<4.4721) (s ≥ 4.4721) : 1/s ≤ 1/4.4721; 1/4.4721 ≤ 0.2237: rw [div_le_iff₀ (by norm_num)]; norm_num: 1 ≤ 0.2237*4.4721 = 1.00040... ✓).\n hu2 : (b²*s+b)*eA ≤ 0.2124 — via u₂ antitone OR direct?? Direct bound without antitone: (b²s+b)*eA for s ≥ 4.4721: eA ≤ exp(−a·4.4721) ≤ 0.021272; b²s+b UNBOUNDED in s!! Can't bound directly — NEED the antitone argument (the poly grows but exp decays — the product is decreasing, so ≤ value at √20). So antitoneOn u₂ (Ici √20) required. OK.\n\n u₂ := fun s => (b²*s + b) * Real.exp (−a*s) — but b, a here are the iimA/iimB or unfolded? For the antitone lemma I'll keep a, b as set-variables (reals) — antitone proof needs deriv u₂ = eA*(b² − a*(b²*s+b)):\n deriv at x (x > 0): HasDerivAt u₂ (b²*eAx + (b²*x+b)*(eAx*(−a))) x:\n hp : HasDerivAt (fun t => b²*t + b) (b²) x := ((hasDerivAt_id' x).const_mul b²)... const_mul gives (b² * 1): massage mul_one; .add_const b: (hasDerivAt (b²*t) (b²*1)).add_const b : fun t => b²*t + b, deriv b²*1 ✓ rwa [mul_one].\n he : HasDerivAt (fun t => Real.exp (−a*t)) (eAx*(−a)) x := ((hasDerivAt_id' x).const_mul (−a)).exp with mul_one massage.\n hp.mul he : deriv-value b²*eAx + (b²*x+b)*(eAx*(−a)) ✓ = eAx*(b² − a*(b²*x+b)) (ring).\n Then antitoneOn_of_deriv_nonpos (convex_Ici _) (continuousOn) (differentiableOn) (fun x hx => ≤0):\n continuousOn u₂: (continuousOn_const.mul continuousOn_id)... or via ContDiff: (contDiff continuous). ContinuousOn... u₂ continuous: Continuous.mul (continuous_const.mul continuous_id?) hmm b²*t: continuous_const.mul continuous_id? (continuous_const.mul continuous_id).add continuous_const for poly; exp: continuous_exp.comp (continuous_const.mul continuous_id)... a is a free var here (set): continuous_const.mul continuous_id : Continuous fun t => −a*t ✓ .exp? Real.continuous_exp.comp ✓. Or simpler: since u₂ is differentiable everywhere → continuous: use the ContDiff path: u₂ is ContDiff: contDiff_const.mul... then .continuousOn / .differentiableOn. contDiff: (contDiff_const.mul contDiff_id).add contDiff_const for the poly? b²*t + b: (contDiff_const.mul contDiff_id).add contDiff_const ✓; exp: (contDiff_const.mul contDiff_id).exp ✓; .mul ✓. Then hcont.continuousOn, hcont.differentiableOn (by norm_num).\n interior (Ici √20) = Ioi √20: interior_Ici ✓.\n ≤ 0: for x > √20: eAx*(b² − a*(b²*x+b)) ≤ 0 ⟸ b² − a*(b²*x+b) ≤ 0: a*(b²*x+b) ≥ a*(b²*√20+b) (x ≥ √20, mul_le_mul) ≥ 0.8862943606*(b²*4.4721+b): b² ≥ 1.3862943606² = 1.9217...: ≥ 0.8862943606*(1.92170...*4.4721 + 1.3862943606): compute inner: b² ≥ 1.3862943606²: 1.3862943606² = 1.92181...: 1.3862943606² = 1.921812...: *4.4721 = 8.59473; +1.3862943606 = 9.98103; *0.8862943606 = 8.84622 ≥ 1.92182 ≥ b² ✓. Chain: b² ≤ 1.92182 (from hb²) and a*(b²*x+b) ≥ 8.8462: so b² − a*(...) ≤ 1.92182 − 8.8462 < 0 ✓ nlinarith [hb2, hbig] where hbig : 8.8462 ≤ a*(b²*x+b): from a ≥ 0.8862943606 and (b²*x+b) ≥ 1.921812*4.4721+1.3862943606 = 9.98103 (b² ≥ 1.921812: 1.3862943606² = ? compute precisely: 1.3862943606² = 1.9218122...: 1.3862943606^2: 1.3862943606*1.3862943606: ≈ 1.92181219. Let me use 1.9218: b² ≥ 1.9218 (norm_num from hlog2lo: (2*0.6931471803)² = 1.3862943606² = 1.92181... ≥ 1.9218 ✓). Then b²*x+b ≥ 1.9218*4.4721 + 1.3862943606 = 8.59462+1.38629 = 9.98091 ≥ 9.9809. a*(...) ≥ 0.8862943606*9.9809 = 8.84616 ≥ 8.8461. And b² ≤ 1.3862943616² = 1.92182: b² − a(...) ≤ 1.92182 − 8.8461 < 0 ✓.\n nlinarith [hb2up, hbig, ...] — the product a*(b²*x+b) expansion: nlinarith needs the product facts — provide hbig as a single hypothesis: hbig : (8.8461:ℝ) ≤ a * (b^2 * x + b): from mul_le_mul ha (b²x+b ≥ 9.9809) (by positivity? 9.9809 ≥ 0 ✓) (a nonneg ✓): a*(b²x+b) ≥ 0.8862943606*9.9809 ≥ 8.8461 (norm_num). Provide hb2x : 9.9809 ≤ b^2*x+b: from b² ≥ 1.9218, x ≥ 4.4721, b ≥ 1.3862943606: mul_le_mul hb2lo (x≥) ... b²*x ≥ 1.9218*4.4721 = 8.59462: then + b: ≥ 8.59462 + 1.3862943606 = 9.98092 ≥ 9.9809 ✓ linarith [mul_le_mul ...].\n Then antitoneOn_of_deriv_nonpos gives AntitoneOn u₂ (Ici √20) → u₂ s ≤ u₂ √20 (√20 ≤ s ✓, √20 ∈ Ici √20 ✓).\n u₂ √20 = (b²*√20+b)*exp(−a*√20) ≤ 9.9811*0.021272 ≤ 0.2124:\n b²*√20+b ≤ 9.9811: b² ≤ 1.92182, √20 ≤ 4.4722, b ≤ 1.3862943616: b²*√20 ≤ 1.92182*4.4722 = 8.59477: +b ≤ 8.59477+1.3862943616 = 9.98106 ≤ 9.9811 ✓.\n exp(−a√20) ≤ 0.021272: exp(a√20) ≥ 47.02: a√20 ≥ 3.9636 (ha, h√lo: a*√20 ≥ 0.8862943606*4.4721 = 3.96366 ≥ 3.9636 ✓ mul_le_mul); exp(a√20) ≥ exp(3.9636) ≥ Σ₇(3.9636) ≥ 47.02 (Real.sum_le_exp_of_nonneg (by norm_num) 7 + norm_num [Finset.sum_range_succ] to evaluate the sum ≥ 47.02: Σ₇(3.9636) ≈ 47.0136 ✓ 47.0136 ≥ 47.02?? 47.0136 < 47.02!! Use 47.01: 1/47.01 = 0.0212714...: 9.9811*0.0212714 = 0.212339 ≤ 0.2124 ✓. So exp ≥ 47.01 → exp(−a√20) = (exp(a√20))⁻¹ ≤ 1/47.01 ≤ 0.021272 (rw [Real.exp_neg]; one_div_le_one_div_of_le (by positivity? exp > 0: (by norm_num : (0:ℝ)<47.01) hExp) : 1/(exp) ≤ 1/47.01; 1/47.01 ≤ 0.021272: rw [div_le_iff₀]; norm_num: 1 ≤ 0.021272*47.01 = 0.99999...: 0.021272*47.01 = 0.99999672 < 1!! ✗. Hmm: 1/47.01 = 0.02127164...: so 1/47.01 ≤ 0.021272 ⟺ 1 ≤ 0.021272*47.01 = 0.9999967 — FALSE. Need 0.0212717: 0.0212717*47.01 = 0.999982... also <1?? 1/47.01 = 0.021271644: so need ≥ 0.0212717: 0.0212717*47.01 = 0.99998... wait 0.0212717*47.01 = 0.99998..? compute: 47.01*0.0212717 = 47*0.0212717 + 0.01*0.0212717 = 0.999770 + 0.000213 = 0.999983 < 1 ✗. Something's off: 1/47.01 = 0.0212716...: 47.01*0.0212716 = 0.99998...?? 47.01 * 0.0212716 = 47.01*0.02 = 0.9402; 47.01*0.0012716 = 0.059777; total 0.99998. That's wrong — 47.01 * (1/47.01) = 1 exactly, so 1/47.01 ≈ 0.021271... and 47.01*0.0212716 = ? 47.01*0.0212716: 47*0.0212716 = 0.999765; .01*0.0212716 = 0.0002127; total 0.999978 — but 1/47.01 = 0.02127164 vs 0.0212716 — the digit: 1/47.01 = 0.0212716443... so 47.01*0.0212716443 = 1.0 ✓. My decimal 0.0212716 is short at the 7th digit. Use 0.021272: 47.01*0.021272 = 47.01*0.0212716443 + 47.01*0.0000003557 = 1.0 + 0.0000167 = 1.0000167 ≥ 1 ✓ GOOD — my arithmetic before was sloppy; 0.021272*47.01: 47*0.021272 = 0.999784; 0.01*0.021272 = 0.00021272; total 0.99999672?? Hmm contradiction with the split calc. Recompute 47*0.021272: 0.021272*47 = 0.021272*40 + 0.021272*7 = 0.85088 + 0.148904 = 0.999784. +0.00021272 = 0.99999672. But via the other method: 0.021272 − 0.0212716443 = 0.0000003557; ×47.01 = 0.00001672; so 47.01*0.021272 = 1.00001672. These disagree!! One is wrong: 0.0212716443*47.01: 47.01*0.0212716 = 0.999978 (computed above) — but 47.01*0.0212716443 should = 1 EXACTLY if 0.0212716443 = 1/47.01. Is 1/47.01 = 0.0212716443? 47.01*0.0212716443: 47*0.0212716443 = 0.99976728; wait 0.0212716443*47 = 0.99976...? 0.0212716443*47 = 0.0212716443*50 − 0.0212716443*3 = 1.063582215 − 0.0638149329 = 0.99976728. Plus 0.01*0.0212716443 = 0.00021272. Total = 0.99998000. NOT 1! So 1/47.01 ≠ 0.0212716443. Compute 1/47.01 correctly: 1/47 = 0.0212766; 1/47.01 ≈ 0.0212721...: 47.01*0.0212721 = ? 47*0.0212721 = 0.9997887; +0.000212721 = 1.0000014 — slightly over. So 1/47.01 ≈ 0.02127207. My \"0.0212716443\" was wrong (that's 1/47.011 or something). So: 1/47.01 ≈ 0.02127207 ≤ 0.0212721: check 0.0212721*47.01 = 1.0000014 ≥ 1 ✓. Then u₂ ≤ 9.9811*0.0212721 = 0.212339 ≤ 0.2124 ✓.\n\n Similarly u₃: exp(√20/2) ≥ Σ₆(2.23605) ≥ 9.1064: 1/9.1064 = 0.109812...: 9.1064*0.10982 = 1.00006...: 9.1064*0.10982 = 9.1064*0.11 − 9.1064*0.00018 = 1.001704 − 0.001639 = 1.000065 ≥ 1 ✓ so ≤ 0.10982 ✓. u₃ ≤ 1.10982 ≤ 1.1099 ✓.\n\n Final: 4.56*1.2237*0.2124*1.1099: 1.2237*0.2124 = 0.259914; *1.1099 = 0.288477; *4.56 = 1.315456 < 2 ✓ norm_num.\n\nhu1 recheck: 1/4.4721 ≤ 0.2237: 0.2237*4.4721 = ?: 4.4721*0.2237 = 4.4721*0.2 = 0.89442; 4.4721*0.0237 = 0.105989; total 1.000409 ≥ 1 ✓.\n\nOK — also step h3's algebra: 4.56*(s+1)*(b²+b/s)*(eA+eB) = 4.56*((s+1)/s)*((b²*s+b)*eA)*(1+exp(−s/2)):\n (s+1)*(b²+b/s) = ((s+1)/s)*(b²*s+b): field_simp [hs0]; ring ✓.\n eA+eB = eA*(1+exp(−s/2)): eB = exp(−b*s) = exp(−a*s − s/2) = eA*exp(−s/2): need −b*s = −a*s − s/2 ⟺ (b−a)s = s/2 ⟺ b−a = 1/2 ✓ (unfold iimA iimB: 2log2 − (2log2−1/2) = 1/2 ✓): heB' : eB = eA * Real.exp (−s/2): rw [show eB = exp(−a*s + −(s/2)) by congr 1; unfold a b?? — a, b are set vars equal to the iimA/iimB... if I unfold at the start and set a := 2*log2−1/2, b := 2*log2, then b − a = 1/2 by ring ✓; exp(−b*s) = exp(−a*s − s/2): exponents: −b*s = −a*s + −(s/2): from b = a + 1/2: ring ✓ then Real.exp_add.\n\nAlright — writing this monster now. To bound risk, I'll write it with explicit haves and iterate. Also note `set a := ...`/`set b := ...` after unfolding — or simpler: DON'T unfold; keep iimA/iimB and prove facts about them via have-unfolds. I'll `unfold iimA iimB` first then `set a := 2*Real.log 2 − 1/2`... `set` after unfold: set a := (2*Real.log 2 − 1/2) with ha_def — folds occurrences ✓.\n\nActually simpler: keep iimA/iimB folded in the statement and early in the proof do:\n have hab2 : iimB = iimA + 1/2 := by unfold iimA iimB; ring\n have ha_eq : iimA = 2*Real.log 2 − 1/2 := rfl\n have hb_eq : iimB = 2*Real.log 2 := rfl\nand use ha_eq/hb_eq rewrites when needed for numerics. Hmm — mixing folded/unfolded invites mismatch hell. DECISION: unfold iimA iimB at the START of the proof (the goal then has 2*log2−1/2 and 2*log2 inline), then `set L := Real.log 2 with hL` — one atom! a-expr = 2L−1/2, b-expr = 2L. All numerics via hlog2lo/hi. This is cleanest.\n\nLet me now write it. One more consideration — the statement of iimaj_bracket_bound with iimA/iimB folded; unfold in proof.\n\nAlso needed at the end for assembly: IIMaj_deriv2_lt = chain_rule_sqrt + deriv_psiTilde/deriv2_psiTilde rw + iimaj_bracket_bound.","signature":""},{"type":"text","text":"IIMaj machinery compiles. Committing, then the final bound lemma."},{"type":"tool_use","id":"Bash_182","name":"Bash","input":{"command":"cd /d/Python/Quantum && git add research/lean/NguyenRH1/NguyenRH1/LiSkeleton.lean && git -c user.name=\"NGUYEN-RH-1\" -c user.email=\"research@local\" commit -m \"Session 011: IIMaj machinery — psiTilde rewrite (IIMaj n = 4.56(s+1)(e^{-as}+e^{-bs})), global C², closed-form D1/D2 derivatives\" && git log --oneline -1","description":"Commit IIMaj machinery"},"extra_content":null}]