← Session 35 — ii′-6-R: Lagarias 6.1 right-tail re-proof (E-032/D-073)
thinking (35027 chars)
Now I have the complete picture of LiBasePoints. The full inventory of what breaks and needs rebuilding:
**LiBasePoints.lean:**
- Bn_FAlt_80000_le (247) — rebuild at new Bn
- Bn_FAlt_80000_ge (394) — rebuild
- Bn_FAlt_100000_le (483) — rebuild
- (no Bn_FAlt_100000_ge exists — the old margin(1e5) lower used only sInftyLower_100000_lo − Bn_FAlt_100000_le ✓ so I need Bn_FAlt_100000_le only; and margin(8e4) upper needs Bn_FAlt_80000_ge ✓)
- marginTilde_FAlt_80000_pos (630) — reassemble (proof: rw + linarith with the two bounds — same skeleton, works once the Bn bounds exist)
- marginTilde_FAlt_80000_lt_100000 (640) — same skeleton ✓
- lambda_pos_finite_height_verified (655) — endpoint change.
The marginTilde theorems' PROOFS don't reference the Bn internals — they just combine sInftyLower_* and Bn_FAlt_* — so they survive verbatim once the Bn bounds are re-established.
The Bn_FAlt_* proofs: rewrite with new T/log/kernel/R/IIMaj constants. The skeletons are reusable; the T-arguments become 1.5·√n+1.
Note the old theorems reference `Real.sqrt 80000 + 1` EVERYWHERE (that's T). The new T = 1.5·√80000+1. New certified constants:
At 8e4: T ∈ [1.5·282+1, 1.5·283+1] = [424, 425.5]:
- hT_up : 1.5·√80000+1 ≤ 425.5; hT_lo : 424 ≤ 1.5·√80000+1
- log T ≤ 6.06: e^{6.06} = e⁶·e^{0.06}: e⁶ = e⁵·e: [148.413·2.71828 bounds]: e⁵ ≤ 148.414 (existing h5up), e¹ ≤ 2.7182818286: e⁶ ≤ 148.414·2.7182818286 = 403.433. e^{0.06} ≤ 1.0619 (partial sums... for an UPPER bound on e^{0.06} use the (1−x/16)⁻¹⁶ trick: (1−0.06/16)⁻¹⁶ = (0.99625)⁻¹⁶ — compute (1/0.99625)^16 = 1.003765^16 ≈ e^{16·0.003758} = e^{0.06013} = 1.06197 — so e^{0.06} ≤ 1.0620). e^{6.06} ≤ 403.433·1.0620 = 428.45 ≥ 425.5 ✓.
- log T ≥ 6.04: e^{6.04} = e⁶·e^{0.04}: e⁶ ≥ 403.42 (e⁵ ≥ 148.328 ×e ≥ 2.7182818283: 148.328·2.7182818283 = 403.197? let me compute: 148.328·2.71828 = 403.19... hmm: 148.328·2.71828 = 403.188. Hmm the true e⁶ = 403.4288. The d9 bounds on e¹: [2.7182818283, 2.7182818286]; e⁵ bounds [148.328, 148.414] — the true e⁵ = 148.4132. So e⁶ ∈ [148.328·2.7182818283, 148.414·2.7182818286] = [403.19, 403.43] — the LOWER bound 403.19 is loose by 0.06%. Fine for certification. e^{0.04} ≥ 1.0408 (partial sums Σ₀⁶ 0.04^i/i! = 1+0.04+0.0008+0.00001067+... = 1.04081). e^{6.04} ≥ 403.19·1.0408 = 419.64 ≤ 424 ✓ (slack 1%). Actually cleaner: e^{6.04} ≥ e⁶·1 ≥ 403.19 — is 403.19 ≤ 424 ✓ trivially — even simpler: log T ≥ 6 via e⁶ ≥ 403.19... hmm 403.19 < 424 ✓ so log T ≥ 6.04 needs e^{6.04} ≤ 424: use e^{6.04} = e⁶·e^{0.04} ≥ 403.19·1.0408 = 419.6 ✓ ≤ 424 ✓. Or just use log T ≥ 6 (e⁶ ≥ 403.19... no wait — need e^6.04 ≤ 424 ⟺ 6.04 ≤ log 424. Simpler: log 424 ≥ log 403.19 ≥ 6 ✓ so log T ≥ 6. Use ≥ 6 for simplicity (the lower bounds feed the Bn lower bound where slack is comfortable).
- loglog T ≤ 1.81: e^{1.81} = e·e^{0.81}: e^{0.81} ≤ (1−0.81/16)⁻¹⁶ = (0.949375)⁻¹⁶ = (1.05332...)^16: ln(1.05332) = 0.05194; ×16 = 0.8311; e^{0.8311} = 2.2960. Hmm that's too loose (true e^{0.81} = 2.2479). 2.71828·2.2960 = 6.2412 ≥ 6.06 ✓ — so loglog T ≤ 1.81 via e^{1.81} ≥ 6.2412 ≥ 6.06 ✓ (the bound direction: log T ≤ 6.06 ≤ e^{1.81} ⟹ loglog T ≤ 1.81 ✓). ✓ works.
- loglog T ≥ 1.79: e^{1.79} ≤ log T-lower... : need e^{1.79} ≤ 6.04-ish. e^{1.79} = e·e^{0.79}: e^{0.79} ≥ Σ₀⁷(0.79^i/i!) = 1+0.79+0.312+0.0822+0.0162+0.00256+0.000337+0.0000380 = 2.2033. e^{1.79} ≥ 2.71828·2.2033 = 5.9892. Hmm — I need loglog T ≥ 1.79 ⟺ log T ≥ e^{1.79}: is log T ≥ 6.04 ≥ e^{1.79}? e^{1.79} ≤ 5.9893·(upper via trick: (1−0.79/16)⁻¹⁶ = (0.950625)⁻¹⁶: ln = −16·ln(0.950625) = 16·0.050640 = 0.8102; e^{0.8102} = 2.2484; ×2.71828... wait that's for upper. e^{1.79} ≤ 2.7182818286·2.2484 = 6.1118. So e^{1.79} ∈ [5.9892, 6.1118] — and log T ≥ 6.04 might be LESS than e^{1.79} = up to 6.1118 — the chain log T ≥ 6.04 ≥ e^{1.79} FAILS since e^{1.79} could be 6.11 > 6.04. Use loglog T ≥ 1.7: e^{1.7} ≤ 5.474 (e·e^{0.7}: e^{0.7} ≤ 2.0138 (trick: (1−0.7/16)⁻¹⁶ = (0.95625)⁻¹⁶: −16 ln(0.95625) = 16·0.044741 = 0.71586; e^{0.71586} = 2.0461 — too loose again; partial sums give lower 2.0136; upper 2.0461; true 2.01375). e^{1.7} ≤ 2.7182818286·2.0461 = 5.5619. Then loglog T ≥ 1.7 ⟸ log T ≥ 6.04 ≥ 5.5619 ✓. So loglog T ≥ 1.7 (loose but fine — the lower bounds have slack).
Hmm wait — actually for Bn_FAlt_80000_ge (LOWER bound on Bn), I need lower bounds on the bracket: (2/3)Z2 + 10.5·log(T+2)+48 with Z2 = 0.6·log(T+2)+0.886·loglog(T+2)+2.7. Lower: log(T+2) ≥ 6.04 (T+2 ≥ 426 ≥ e^{6.04}... e^{6.04} ≥ 419.6 ≤ 426 ✓); loglog(T+2) ≥ 1.7 (log(T+2) ≥ 6.04 ≥ 5.5619 ✓). Z2 ≥ 0.6·6.04+0.886·1.7+2.7 = 3.624+1.506+2.7 = 7.83. bracket ≥ (2/3)·7.83+10.5·6.04+48 = 5.22+63.42+48 = 116.64. term2 ≥ 4·424·116.64 = 1696·116.64 = 197,821. Bn ≥ 197821 + 0(bridge, drop) + 53.4 + 0(term4≥0) + 0(IIMaj) + 1 = 197,875. Certify Bn ≥ 197,000 ✓ (margin(8e4) ≤ 339000−197000+1 = 142,001).
At 1e5: T ∈ [1.5·316+1, 1.5·317+1] = [475, 476.5]:
- log T ≤ 6.17: e^{6.17} = e⁶·e^{0.17}: e^{0.17} ≤ (1−0.17/16)⁻¹⁶ = (0.989375)⁻¹⁶: −16·ln(0.989375) = 16·0.010682 = 0.17091; e^{0.17091} = 1.18636. e^{6.17} ≤ 403.43·1.18636 = 478.58 ≥ 476.5 ✓ (slack 0.4% — a bit tight but OK; could use 6.18: e^{6.18} = e⁶·e^{0.18}: e^{0.18} ≤ 1.1973: 403.43·1.1973 = 483.03 — more slack; use log T ≤ 6.17 with the 0.4% slack, or 6.18 for comfort — use 6.18: log T ≤ 6.18, log(T+2) ≤ 6.18 (T+2 ≤ 478.5 ≤ 483.03 ✓)).
- log T ≥ 6.15: e^{6.15} ≥ 403.19·e^{0.15}: e^{0.15} ≥ Σ₀⁶ = 1+0.15+0.01125+0.0005625+0.0000211+... = 1.16184. e^{6.15} ≥ 403.19·1.16184 = 468.44 ≤ 475 ✓. So log T ≥ 6.15, log(T+2) ≥ 6.15 ✓ (477 ≥ 468.44 ✓).
- loglog ≤ 1.83: e^{1.83} ≥ ...: need log T ≤ 6.18 ≤ e^{1.83}: e^{1.83} = e·e^{0.83}: e^{0.83} ≥ 2.2932 (partial sums: 1+0.83+0.34445+0.095297+0.019774+0.003283+0.000454+0.0000539 = 2.29331). e^{1.83} ≥ 2.7182818283·2.29331 = 6.2336 ≥ 6.18 ✓.
- loglog ≥ 1.8: e^{1.8} ≤ log T: e^{1.8} = e·e^{0.8}: e^{0.8} ≤ 2.2254 (existing h08!) → e^{1.8} ≤ 2.7182818286·2.2254 = 6.0493. Hmm — need e^{1.8} ≤ 6.15: 6.0493 ≤ 6.15 ✓. So loglog T ≥ 1.8 ✓ (log T ≥ 6.15 ≥ e^{1.8}-upper 6.0493 ✓).
- FAlt ≤ (1/6)·476.5·6.18 + 0.137·6.18 + 0.443·1.83 + 2.463 = 490.79+0.847+0.811+2.463 = 494.91. 4F ≤ 1980.
- Ĉ₀ ≤ 0.433·6.18+0.886·1.83+2.9 = 2.676+1.621+2.9 = 7.197 → ≤ 7.20.
- Ĥ ≤ 3·7.20²+10.5·6.18+48 = 155.52+64.89+48 = 268.41 → ≤ 268.5.
- Z2 ≤ 0.6·6.18+0.886·1.83+2.7 = 3.708+1.621+2.7 = 8.029 → ≤ 8.03.
- bracket ≤ (2/3)·8.03+10.5·6.18+48 = 5.3533+64.89+48 = 118.2433 → ≤ 118.25.
- term2 ≤ 4·476.5·118.25 = 1906·118.25 = 225,384.5.
- e^{16/9}+1 ≤ 6.934 (certified below).
- term4 ≤ 2·6.934·(7·268.5+5.94) = 13.868·1885.44 = 26,145.9.
- IIMaj: 1.5·IIMaj ≤ 1.5·4.56·318·2 = 4354.56 — wait IIMaj_le_two_mul gives IIMaj ≤ 4.56(√n+1)·2; √100000+1 ≤ 318: ≤ 4.56·318·2 = 2900.16; ×1.5 = 4350.24.
- Bn ≤ 1980+225384.5+53.41+26145.9+4350.24+1 = 257,915. Certify ≤ 258,000 ✓.
- margin(1e5) ≥ 432500−258000+1 = 174,501 ✓.
And at 8e4 upper Bn:
- log T ≤ 6.06, log(T+2) ≤ 6.06 (T+2 ≤ 427.5 ≤ 428.45 ✓), loglog ≤ 1.81.
- FAlt ≤ (1/6)·425.5·6.06+0.137·6.06+0.443·1.81+2.463 = 429.755+0.830+0.802+2.463 = 433.85 → ≤ 433.9. 4F ≤ 1735.6.
- Ĉ₀ ≤ 0.433·6.06+0.886·1.81+2.9 = 2.624+1.6037+2.9 = 7.1277 → ≤ 7.13.
- Ĥ ≤ 3·7.13²+10.5·6.06+48 = 152.57+63.63+48 = 264.2 → ≤ 264.2.
- Z2 ≤ 0.6·6.06+0.886·1.81+2.7 = 3.636+1.6037+2.7 = 7.9397 → ≤ 7.94.
- bracket ≤ (2/3)·7.94+10.5·6.06+48 = 5.2933+63.63+48 = 116.9233 → ≤ 116.93.
- term2 ≤ 4·425.5·116.93 = 1702·116.93 = 199,014.86.
- term4 ≤ 2·6.934·(7·264.2+5.94) = 13.868·1855.34 = 25,726.9.
- IIMaj: 1.5·4.56·284·2 = 3885.12.
- Bn ≤ 1735.6+199014.86+53.41+25726.9+3885.12+1 = 230,416.9. Certify ≤ 231,000 ✓.
- margin(8e4) ≥ 336000−231000+1 = 105,001 > 0 ✓.
e^{16/9} certification: e^{16/9} = e^{1.5}·e^{5/18}?? 16/9 = 1.7778 = 1.5+0.2778 (= 1.5 + 5/18). Cleaner: 16/9 = 1 + 7/9: e^{16/9} = e·e^{7/9}, 7/9 = 0.7778. e^{0.7778}: upper via the (1−x/16)⁻¹⁶ trick: (1−0.7778/16)⁻¹⁶ = (0.95139)⁻¹⁶: −16·ln(0.95139) = 16·0.049836 = 0.79737; e^{0.79737} = 2.21765. Hmm true e^{0.7778} = 2.17680 — the trick overshoots by 1.9% (it's (1/(1−y))^16 vs e^{16y}: 1/(1−y) = e^{y+y²/2+...} — overshoot e^{16y²/2} = e^{8·0.0395} = e^{0.316}?? no wait: y = 0.7778/16 = 0.04861; 1/(1−y) = e^{y+y²/2+y³/3...} = e^{0.04861+0.001181+0.0000383} = e^{0.04983}; ×16 = e^{0.7973} vs e^{16y} = e^{0.7778}: overshoot factor e^{0.0195} = 1.0197 ✓ 2%). So e^{16/9} ≤ 2.7182818286·2.21765 = 6.0285?? That gives e^{16/9}+1 ≤ 7.03 — vs true 6.92249. The 2% overshoot costs 0.1 in the kernel charge — the horizontal term4: 2·7.03·1855 = 26,078 vs 25,727 with 6.934 — Bn up by ~350. Still ≤ 231,000 ✓ plenty. But tighter is easy: e^{0.7778} = e^{0.5}·e^{0.2778}: e^{0.5} ≤ 1.6488 (partial sums upper? For upper on e^{0.5}: (1−0.5/16)⁻¹⁶ = (0.96875)⁻¹⁶: −16 ln(0.96875) = 16·0.031749 = 0.50798; e^{0.50798} = 1.6621 — overshoot 0.8%; hmm. Alternative: use the existing pattern with more exact arithmetic — honestly, 7.03 is fine (Bn slack 583). Let me simplify: certify e^{16/9} ≤ 6.03 via e·2.21765; e^{16/9}+1 ≤ 7.03. Then term4 ≤ 2·7.03·(7·264.2+5.94) = 14.06·1855.34 = 26,078 (8e4) and 14.06·1885.44 = 26,509 (1e5). Bn(8e4) ≤ 1735.6+199014.86+53.41+26078+3885.12+1 = 230,768 ✓ ≤ 231,000 (slack 232 — hmm getting tight-ish; use 232,000: slack 1,232 ✓). Bn(1e5) ≤ 1980+225384.5+53.41+26509+4350.24+1 = 258,278 → certify ≤ 259,000 (margin(1e5) ≥ 432500−259000+1 = 173,501 ✓ still way above 142,001 ✓).
Hmm, actually — better idea for the e^{16/9} bounds: e^{16/9} = (e^{4/9})⁴: e^{4/9} = e^{0.4444}: trick: (1−0.4444/16)⁻¹⁶ = (0.972222)⁻¹⁶ = ... −16 ln(0.972222) = 16·0.028172 = 0.45075; e^{0.45075} = 1.56952; overshoot e^{0.45075−0.4444} = 1.0064 (0.6%). e^{0.4444} ≤ 1.56952 → e^{16/9} ≤ 1.56952⁴ = 6.0687?? 1.56952² = 2.46339; squared: 6.06829. So e^{16/9} ≤ 6.0683 → +1 ≤ 7.0683 — worse than 7.03? 7.0683 > 7.03 — the e·e^{7/9} route (7.03) is better. Or: e^{16/9} = e²/e^{2/9}: e² ≤ 7.3891 (e·e: 2.7182818286² = 7.389056); e^{2/9} = e^{0.2222} ≥ Σ₀⁷(0.2222^i/i!) = 1+0.2222+0.02469+0.001829+0.0001016+0.00000452 = 1.24886. e^{16/9} = e²/e^{2/9} ≤ 7.389056/1.24886 = 5.91665. OH nice — that's much tighter (true 5.92249; overshoot −0.1%... wait 5.91665 < 5.92249?! That's BELOW the true value — because e^{0.2222} ≥ 1.24886 means 1/e^{0.2222} ≤ 1/1.24886 — and e²/e^{2/9} ≤ 7.389056/1.24886 = 5.91665 < 5.92249 = true — CONTRADICTION?? Let me recompute: 16/9 = 1.7778; 2 − 2/9 = 16/9 ✓. e^{16/9} = e²/e^{2/9} = 7.389056/1.248853 = 5.91666?? But true e^{1.7778} = 5.92249. And e^{2/9} = e^{0.22222} = 1.248853. 7.389056/1.248853 = 5.91666. Hmm — 7.389056/5.92249 = 1.24761 ≠ 1.248853?? Let me recompute e^{0.2222}: 1+0.22222+0.22222²/2+0.22222³/6+0.22222⁴/24: 0.22222² = 0.049383; /2 = 0.024691; 0.22222³ = 0.010974; /6 = 0.001829; 0.22222⁴ = 0.0024387; /24 = 0.0001016; 0.22222⁵/120 = 0.0000045. Sum: 1+0.22222+0.024691+0.001829+0.0001016+0.0000045 = 1.248846. So e^{0.2222} = 1.248846. e² = 7.389056. 7.389056/1.248846 = ? 1.248846·5.92 = 7.39317 — that's > 7.389056! So e²/e^{2/9} < 5.92. But e^{16/9} should equal e²/e^{2/9} EXACTLY, and e^{16/9} = e^{1.7778}. Let me recompute e^{1.7778}: e^{1.7778} = e·e^{0.7778}: e^{0.7778} = ? 0.7778: e^{0.7} = 2.01375; e^{0.0778} = 1.08091; product = 2.17669. e^{1.7778} = 2.71828·2.17669 = 5.91659!! NOT 5.92249. Hmm!! Let me recheck E-033: kernel_charge(1.5) = e^{4/c²}+1 with c = 1.5: 4/2.25 = 1.77778: e^{1.77778} — mpmath said 6.91669 for the +1 form. So e^{1.77778} = 5.91669 ✓✓ — matches 5.91659 (my hand-arith). So e^{16/9} = 5.91669, NOT 5.92249. Where did I get 5.92249? Earlier I wrote "e^{16/9} = e^{1.7778} = 5.922487" — that was WRONG (probably e^{1.7788} or a typo carried through §4/§5 of D-073!). Let me check what I wrote in D-073: "kernel charge e^{4/c²}+1: c=1.5: e^{1.7778}+1 = 6.92249" — and E-033 CSV says kernel_1.5 = 6.91669. DISCREPANCY: D-073 §4/§5 tables say 6.922/6.92 — E-033 (the authoritative computation) says 6.91669. My D-073 text value 6.92249 was a hand-computation error (I computed e^{1.7778} wrong). The D-073 tables' "6.922" should be 6.9167. GRR — an erratum to fix in D-073 (the tables in §4 and §5, and the NGUYEN.md checklist quote "e^{16/9}+1" — that one has no numeric). Also my STATE.md NEXT ACTION wrote "e^{16/9}+1 = 6.9167" ✓ correct there.
Let me verify once more: 4/c² at c = 1.5: c² = 2.25; 4/2.25 = 1.77777…. e^{1.77778} = 5.9167 (per mpmath, twice). ✓. So D-073's "5.922487"/"6.92249"/"6.922" values are wrong; correct is 5.9167/6.9167. Impact: none on substance (the kernel charge is 6.92-ish either way; R(1.5) used e^{4/c²} = 5.922487 in the R formula?? R(1.5) = Z₀·[e^{4/c²}/(4(1−q)log 2) + 1/(2 log 2)] — E-033 computed R(1.5) = 5.93924 using the CORRECT e^{16/9} = 5.91669 — wait no: E-033's Rc(c) uses e ** (4 / c ** 2) computed by mpmath = 5.91669 ✓. And my HAND computation of R(1.5) earlier gave 9.703810 for the first term using 5.922487/(4·0.2202·0.6931) — with the correct 5.91669: 5.91669/0.610325 = 9.6944; +0.7213 = 10.4157; ×0.56996 = 5.9362. E-033 says 5.93924 ✓ (with Z₀_hi = 0.5703661: 10.4157·0.5703661/0.56996 = 5.93924/5.9362 ✓ consistent). So R(1.5) = 5.94 is FINE (charged upper). Only the D-073 hand-values "e^{16/9} = 5.922487" and "kernel 6.92249/6.922" are wrong (should be 5.9167/6.9167) — cosmetic but must be errata'd for honesty. The V4 check (kernel max 5.65 ≤ 6.92) used 6.91669 ✓. NGUYEN.md checklist: I wrote "2(e^{16/9}+1)(7Ĥ + 5.94)" — no numeric value ✓ fine. STATE.md: "e^{16/9}+1 = 6.9167" ✓ correct.
So: D-073 erratum (two table cells in §4 and one in §5 + the "1.9×" comment): "6.922" → "6.9167", "5.922487" → "5.91669". Also §4's "R(1.5) = 5.94" stays ✓. The "1.9× worse kernel charge" comment: 6.9167/3.7183 = 1.86× ✓ fine.
I'll fix those as part of this session's errata handling (D-073 is not a frozen file — it's the thread's own file; fixing is allowed and required by honesty).
OK — back to planning. The Lean Bn charges e^{16/9}+1; certified: e^{16/9} ∈ [5.916, 5.917]?? For the upper bound on Bn: need e^{16/9}+1 ≤ some certified value: e^{16/9} ≤ 5.92 via e²/e^{2/9}: e² ≤ 7.3891 (2.7182818286² = 7.389056 → certify ≤ 7.3891), e^{2/9} ≥ 1.2488 (partial sums ≥ 1.24884 → certify ≥ 1.2488): e^{16/9} ≤ 7.3891/1.2488 = 5.9170. So e^{16/9}+1 ≤ 6.9170. For the LOWER (Bn_ge): e^{16/9} ≥ e²-lo/e^{2/9}-up: e² ≥ 7.3890, e^{2/9} ≤ 1.2489: ≥ 7.3890/1.2489 = 5.9165 → e^{16/9}+1 ≥ 6.9165. These are TIGHT (0.01%) — but the lower-bound side only needs e^{16/9}+1 ≥ 0 (or ≥ 6.9 for comfort; the old file used e⁴ ≥ 54.5978 for the lower — I'll use ≥ 6.9: from e^{16/9} ≥ 5.9: 7.3890/1.2489 ≥ 5.9165 ≥ 5.9 ✓ → e^{16/9}+1 ≥ 6.9 ✓ simple).
Division bounds in Lean: e^{16/9} ≤ 7.3891/1.2488 needs div_le_iff₀ or one_div manipulation — manageable (a/b ≤ c ⟺ a ≤ c·b).
Now — final targets for LiBasePoints rebuild:
- e^{16/9}+1 ≤ 6.917 (used in Bn_*_le); ≥ 6.9 (used in Bn_80000_ge).
- 8e4: T ∈ [424, 425.5]; log T ≤ 6.06, log(T+2) ≤ 6.06; loglog ≤ 1.81; log T ≥ 6.04 (for _ge), log(T+2) ≥ 6.04, loglog ≥ 1.7.
- FAlt ≤ 433.9; Ĉ₀ ≤ 7.13; Ĥ ≤ 264.2; Z2 ≤ 7.94; bracket ≤ 116.93; term2 ≤ 4·425.5·116.93 = 199,014.9; term4 ≤ 2·6.917·(7·264.2+5.94) = 13.834·1855.34 = 25,662.4; IIMaj ≤ 1.5·2590.08 = 3885.12; 4F ≤ 1735.6; Bn ≤ 1735.6+199014.9+53.41+25662.4+3885.12+1 = 230,352.4 → certify ≤ 231,000.
- _ge: bracket ≥ 116.64 (Z2 ≥ 7.83, log(T+2) ≥ 6.04); term2 ≥ 4·424·116.64 = 197,821.4; Bn ≥ 197,821.4+53.41+1 = 197,875.8 → ≥ 197,000.
- 1e5: T ∈ [475, 476.5]; log T ≤ 6.18, log(T+2) ≤ 6.18; loglog ≤ 1.83.
- FAlt ≤ 494.91 → 4F ≤ 1979.7; Ĉ₀ ≤ 7.20; Ĥ ≤ 268.5; Z2 ≤ 8.03; bracket ≤ 118.25; term2 ≤ 4·476.5·118.25 = 225,384.5; term4 ≤ 2·6.917·(7·268.5+5.94) = 13.834·1885.44 = 26,078.2; IIMaj ≤ 1.5·2900.16 = 4350.24; Bn ≤ 1979.7+225384.5+53.41+26078.2+4350.24+1 = 257,847 → ≤ 258,000.
- margins: pos: 336000−231000+1 = 105,001 > 0 ✓; lt: margin(8e4) ≤ 339000−197000+1 = 142,001 < 432500−258000+1 = 174,501 ✓.
Note: do I need Bn_FAlt_100000_ge? No (not consumed). Skip it (the old file didn't have it either).
Wait — also check: the old file's Bn_FAlt_80000_ge was consumed by marginTilde_FAlt_80000_lt_100000 ✓ — keep.
Now, one important check on the new T in Bn: the Lean Bn def will be `let T := 1.5 * Real.sqrt n + 1`. In the evaluation proofs, all the `Real.sqrt 80000 + 1` occurrences become `1.5 * Real.sqrt 80000 + 1`. The hT bounds: 1.5·√80000+1 ≤ 425.5 from sqrt80000_le (≤ 283): 1.5·283+1 = 425.5 ✓; ≥ 424 from sqrt80000_ge (≥ 282): 1.5·282+1 = 424 ✓.
Also — LiSkeleton's SfBoundProp/lambda endpoints and doc comments. And check nothing else references Bn/marginTilde internals: grep Bn across the package — LiBasePoints + LiSkeleton only? Let me check LiAssembly/LiContour for Bn/marginTilde references... SfBoundProp is consumed by lambda_pos_finite_height(_verified) only ✓. Bn by SfBoundProp + LiBasePoints ✓. marginTilde by convexity/basepoints/lambda_pos ✓. marginExpanded/mK by the convexity machinery ✓ (internal). IIMaj by Bn/marginTilde/mIIM/basepoints ✓.
Also — hmm, `Z2hat` is referenced in LiAssembly? grep earlier showed Z2hat used in Bn/marginTilde; D-071 mentions LiSkeleton:2396 region. Fine.
One more: `exists_zero_avoiding_T_wide` and the LiAssembly line-77 hypotheses — 6-c territory, NOT now. ✓
Sub-stage split for session 040:
- **040-i (LiSkeleton core)**: k-shift infra (5 lemmas + chain rule + psiOf rel), bracket strengthening, IIMaj_deriv2_lt_three, Bn/marginTilde/blocks/mK/equations redefinition, contDiffOn/continuousOn adaptations, marginTilde_convex re-proof, SfBoundProp + lambda_pos_finite_height endpoints. Build LiSkeleton + fix errors.
- **040-ii (LiBasePoints)**: rebuild the 3 Bn evaluations + reassemble margins + verified endpoint. Build + audit + commit.
- **040-iii**: E-030-style re-validation? No — E-033 already validated the fold at c = 1.5. The 8-step protocol's step 5 (endpoint margins re-run): E-033 V6 has margin(N₁) = 1.08e26 at c = 1.5 ✓ — done numerically. The Lean base points are 040-ii. So after 040-ii: full build + axiom audit + D-073 errata fix (6.922 → 6.9167) + journal-040 + commit.
Wait — the D-073 errata: should fix NOW (it's quick). Add to the plan.
Also the NGUYEN.md/STATE.md updates at the end (ii′-6-a redo complete → next ii′-6-c). And STATE's NEXT ACTION.
Let me start with 040-i. The k-shift infra goes right after the existing sqrt-shift lemmas (~1746). The chain_rule_sqrt_kshift_on goes after chain_rule_sqrt_shift_on (2027). The bracket strengthening at 1678. IIMaj_deriv2_lt_three after IIMaj_deriv2_lt (2157). Bn/marginTilde/blocks/mK edits. Then convexity.
Order of operations (to keep the build broken for as short as possible — actually it will be broken mid-way regardless; do it in one careful pass, then iterate on build errors):
Actually — smarter: add the NEW infra FIRST (k-shift lemmas, IIMaj_lt_three, bracket strengthening) — these are ADDITIONS that don't break anything (the bracket bound strengthening changes the statement < 2 → < 4/3 — its consumer is IIMaj_deriv2_lt which uses `exact div_lt_div_of_pos_right hb h4n` with hb : ... < 2... let me check: IIMaj_deriv2_lt: `have hb := iimaj_bracket_bound ...; rw [e]; exact div_lt_div_of_pos_right hb h4n` where e : 1/(2n) = 2/(4n) — hb : bracket < 2 → bracket/(4n) < 2/(4n) ✓. If I strengthen the bracket to < 4/3, IIMaj_deriv2_lt's proof: hb : bracket < 4/3; goal bracket/(4n) < 2/(4n) = 1/(2n): div_lt_div_of_pos_right hb gives bracket/(4n) < (4/3)/(4n) ≠ 2/(4n) — BREAKS. So IIMaj_deriv2_lt needs adapting: either restate to < 1/(3n) (with e : 1/(3n) = (4/3)/(4n)) or keep the < 1/(2n) form via (4/3)/(4n) < 2/(4n) linarith. Plan: change iimaj_bracket_bound to < 4/3 AND change IIMaj_deriv2_lt to < 1/(3n) — its consumers: marginTilde_convex's hIIM (which I'm rewriting anyway) — grep IIMaj_deriv2_lt uses: only line 2388 (marginTilde_convex). ✓ Safe to change its form to < 1/(3n).
Then the definition changes (Bn etc.), then the machinery adaptations, then build.
Let me also prepare the exact new definitions text.
**New infra (insert after line 1745, before psiOf_sqrt_rel):**
```lean
/-- [PROVED session 040] T(m) = k·√m + 1 is C² on (20, ∞) (k > 0). -/
theorem contDiffOn_ksqrt_shift (k : ℝ) (_hk : 0 < k) :
ContDiffOn ℝ 2 (fun m => k * Real.sqrt m + 1) (Set.Ioi 20) :=
(contDiffOn_const.mul (contDiffOn_id.sqrt (fun x hx => by
have h : 20 < x := hx
exact ne_of_gt (by linarith : (0 : ℝ) < x)))).add contDiffOn_const
theorem mapsTo_ksqrt_shift (k : ℝ) (hk : 0 < k) :
Set.MapsTo (fun m => k * Real.sqrt m + 1) (Set.Ioi 20) (Set.Ioi (-1)) := by
intro x hx
have h : 20 < x := hx
have hnn := Real.sqrt_nonneg x
exact Set.mem_Ioi.mpr (by linarith [mul_pos hk (Real.sqrt_pos.mpr (by linarith : (0:ℝ) < x))])
/-- k·√m + 1 maps (20, ∞) into (1, ∞) (k > 0). -/
theorem mapsTo_ksqrt_shift_Ioi1 (k : ℝ) (hk : 0 < k) :
Set.MapsTo (fun m => k * Real.sqrt m + 1) (Set.Ioi 20) (Set.Ioi 1) := by
intro x hx
have h : 20 < x := hx
have hpos := Real.sqrt_pos.mpr (by linarith : (0 : ℝ) < x)
exact Set.mem_Ioi.mpr (by linarith [mul_pos hk hpos])
/-- k·√m + 1 maps [20, ∞) into (1, ∞) (k > 0). -/
theorem mapsTo_ksqrt_shift_Ici_Ioi1 (k : ℝ) (hk : 0 < k) :
Set.MapsTo (fun m => k * Real.sqrt m + 1) (Set.Ici 20) (Set.Ioi 1) := by
intro x hx
have h : 20 ≤ x := hx
have hpos := Real.sqrt_pos.mpr (by linarith : (0 : ℝ) < x)
exact Set.mem_Ioi.mpr (by linarith [mul_pos hk hpos])
/-- [PROVED session 040] psiOf at T = k·√n + 1 in the chain-rule form
(with T − 1 = k·√n). -/
theorem psiOf_sqrt_krel (φ : ℝ → ℝ) (k n : ℝ) :
psiOf φ (k * Real.sqrt n + 1) =
deriv (deriv φ) (k * Real.sqrt n + 1) -
deriv φ (k * Real.sqrt n + 1) / (k * Real.sqrt n) := by
unfold psiOf
rw [show k * Real.sqrt n + 1 - 1 = k * Real.sqrt n by ring]
```
And chain_rule_sqrt_kshift_on — the clone. Let me write it carefully, cloning the 1956–2026 proof:
```lean
/-- [PROVED session 040] Scaled-shift chain rule: for the c-shifted
T(n) = k·√n + 1 (k > 0), d²/dn² φ(k·√n+1) = k²·[φ″(T) − φ′(T)/(k√n)]/(4n)
= k²·ψ[φ](T)/(4n). The c = 1.5 F-D repair (D-073 §4) changes every
margin composition to this form. -/
theorem chain_rule_sqrt_kshift_on (φ : ℝ → ℝ) {k : ℝ} (hk : 0 < k) {c : ℝ}
(hc : c ≤ 1) (hφ : ContDiffOn ℝ 2 φ (Set.Ioi c)) (n : ℝ) (hn : 0 < n) :
deriv (deriv fun n => φ (k * Real.sqrt n + 1)) n =
(k ^ 2) * (deriv (deriv φ) (k * Real.sqrt n + 1) -
deriv φ (k * Real.sqrt n + 1) / (k * Real.sqrt n)) / (4 * n) := by
have hφd : DifferentiableOn ℝ φ (Set.Ioi c) := hφ.differentiableOn (by norm_num)
have hφdd : DifferentiableOn ℝ (deriv φ) (Set.Ioi c) :=
(hφ.deriv_of_isOpen (m := 1) isOpen_Ioi (by norm_num)).differentiableOn one_ne_zero
have hmem : ∀ m : ℝ, 0 < m → Set.Ioi c ∈ 𝓝 (k * Real.sqrt m + 1) := by
intro m hm
have h1 : (1 : ℝ) < k * Real.sqrt m + 1 := by
have h := mul_pos hk (Real.sqrt_pos.mpr hm)
linarith
exact Ioi_mem_nhds (lt_of_le_of_lt hc h1)
have hφ1 : ∀ m : ℝ, 0 < m → DifferentiableAt ℝ φ (k * Real.sqrt m + 1) :=
fun m hm => hφd.differentiableAt (hmem m hm)
have hφ2 : DifferentiableAt ℝ (deriv φ) (k * Real.sqrt n + 1) :=
hφdd.differentiableAt (hmem n hn)
have hsqrt : HasDerivAt Real.sqrt (1 / (2 * Real.sqrt n)) n :=
Real.hasDerivAt_sqrt hn.ne'
have hdiff_sqrt : DifferentiableAt ℝ Real.sqrt n := hsqrt.differentiableAt
have hdiff_h : DifferentiableAt ℝ (fun n => k * Real.sqrt n + 1) n :=
(hdiff_sqrt.const_mul k).add (differentiableAt_const 1)
have hpos : Set.Ioi (0 : ℝ) ∈ 𝓝 n := Ioi_mem_nhds hn
have hg1 : deriv (fun n => φ (k * Real.sqrt n + 1)) =ᶠ[𝓝 n]
fun n => deriv φ (k * Real.sqrt n + 1) * (k * (2 * Real.sqrt n)⁻¹) := by
filter_upwards [hpos] with m hm
have hsm : HasDerivAt Real.sqrt (1 / (2 * Real.sqrt m)) m :=
Real.hasDerivAt_sqrt (ne_of_gt hm)
have hhm : DifferentiableAt ℝ (fun x => k * Real.sqrt x + 1) m :=
(hsm.differentiableAt.const_mul k).add (differentiableAt_const 1)
have h1 : deriv (fun x => k * Real.sqrt x + 1) m = k * (1 / (2 * Real.sqrt m)) := by
rw [deriv_add_const, deriv_const_mul k hsm.differentiableAt, hsm.deriv]
rw [show (fun x => φ (k * Real.sqrt x + 1)) = φ ∘ (fun x => k * Real.sqrt x + 1)
from rfl,
deriv_comp m (hφ1 m hm) hhm, h1]
ring
have hA : HasDerivAt (fun n => deriv φ (k * Real.sqrt n + 1))
(deriv (deriv φ) (k * Real.sqrt n + 1) * (k * (1 / (2 * Real.sqrt n)))) n := by
have h1 : HasDerivAt (fun x => k * Real.sqrt x + 1) (k * (1 / (2 * Real.sqrt n))) n := by
have h2 := hsqrt.const_mul k
rwa [deriv_add_const] -- hmm, h2 : HasDerivAt (fun x => k * Real.sqrt x) (k * (1/(2√n))) n; need +1
...
```
Hmm — HasDerivAt (fun x => k·√x + 1) (k·(1/(2√n))): HasDerivAt.add_const: (hf : HasDerivAt f f' x) : HasDerivAt (fun x => f x + c) f' x ✓ so `(hsqrt.const_mul k).add_const 1` — wait the function form: hsqrt.const_mul k : HasDerivAt (fun x => k * Real.sqrt x) (k * (1/(2√n))) n — then .add_const 1 gives HasDerivAt (fun x => k·√x + 1) (same deriv) ✓.
Careful with the h1 inside hg1: deriv (fun x => k·√x + 1) m = k·(1/(2√m)): `rw [deriv_add_const, deriv_const_mul k hsm.differentiableAt, hsm.deriv]` — deriv_add_const : deriv (fun x => f x + c) x = deriv f x ✓; deriv_const_mul k (hd : DifferentiableAt ℝ f x) : deriv (fun x => k * f x) x = k * deriv f x ✓; hsm.deriv : deriv Real.sqrt m = 1/(2√m) ✓.
hA: HasDerivAt (fun n => deriv φ (k√n+1)) (φ″(T)·k·(1/(2√n))): via (hφ2.hasDerivAt).comp n h1 where h1 : HasDerivAt (fun x => k√x+1) (k/(2√n)) n. Then the comp gives φ″(T)·(k/(2√n)) — the mul form deriv (deriv φ) (k√n+1) * (k*(1/(2√n))) ✓ (comp's HasDerivAt mul writes f' * g' order — HasDerivAt.comp: derivative is (f' ∘ g) * g'? For real composition: HasDerivAt (f ∘ g) (f' * g') — f' first. So φ″(T)·(k·(1/(2√n))) ✓ matches.
hB: HasDerivAt (fun n => k * (2√n)⁻¹) (k * (−(2*(1/(2√n)))/(2√n)²)) n := (hBold).const_mul k where hBold is the old hB — inline:
```
have hB : HasDerivAt (fun n => k * (2 * Real.sqrt n)⁻¹)
(k * (-(2 * (1 / (2 * Real.sqrt n))) / (2 * Real.sqrt n) ^ 2)) n := by
have h1 : HasDerivAt (fun n => 2 * Real.sqrt n) (2 * (1 / (2 * Real.sqrt n))) n :=
hsqrt.const_mul 2
have h2 : (2 * Real.sqrt n) ≠ 0 := mul_ne_zero two_ne_zero (Real.sqrt_ne_zero'.2 hn)
exact (h1.inv h2).const_mul k
```
hmul := hA.mul hB. hder := (hmul.congr_of_eventuallyEq hg1).deriv — wait: hmul : HasDerivAt (fun n => φ′(T n)·(k(2√n)⁻¹)) (…) n; hg1 : deriv (fun n => φ(T n)) =ᶠ φ′(T n)·(k(2√n)⁻¹) — congr_of_eventuallyEq: (h : f =ᶠ[𝓝 x] g) (hf : HasDerivAt f f' x) : HasDerivAt g f' x — so need hmul.congr_of_eventuallyEq hg1 with hmul first arg matching the LHS of hg1's function ✓ (hg1 : deriv G =ᶠ H where G = fun n => φ(k√n+1), H = the product; hmul is about H ✓ — then hmul.congr_of_eventuallyEq hg1 : HasDerivAt (fun n => deriv G n) (...) n ✓; .deriv gives deriv (deriv G) n = (...) ✓).
Then the algebra:
```
rw [hder]
set s := Real.sqrt n with hsdef
have hs0 : s ≠ 0 := Real.sqrt_ne_zero'.2 hn
have hk0 : k ≠ 0 := hk.ne'
have hn_eq : n = s ^ 2 := by rw [hsdef]; exact (Real.sq_sqrt hn.le).symm
rw [hn_eq]
field_simp [hs0, hk0]
ring
```
The goal after rw [hder, hn_eq]: φ″(k s+1)·(k·(1/(2s)))·(k·(2s)⁻¹) + φ′(k s+1)·(k·(−2(1/(2s))/(2s)²)) = k²·(φ″(k s+1) − φ′(k s+1)/(k s))/(4·s²). field_simp + ring should close (the old proof ended the same way; with k it's messier but field_simp [hs0, hk0] clears denominators, ring checks the polynomial identity ✓ hopefully).
One concern: `set s` then `rw [hn_eq]` — same as old. OK.
**Order of file edits (LiSkeleton):**
E1. iimaj_bracket_bound: `_ < 2 := by norm_num` → `_ < 4 / 3 := by norm_num` (line 1678) + doc comment tweak (1.316 < 4/3).
E2. IIMaj_deriv2_lt → IIMaj_deriv2_lt_three: statement `deriv (deriv IIMaj) n < 1 / (3 * n)`, proof: e : 1/(3n) = (4/3)/(4n): `have e : (1 : ℝ)/(3*n) = (4/3)/(4*n) := by field_simp [hn0.ne']; ring` — check: (4/3)/(4n) = 4/(12n) = 1/(3n) ✓. Then `exact div_lt_div_of_pos_right hb h4n` with hb : bracket < 4/3 ✓. Rename or keep name? The name IIMaj_deriv2_lt is used once (2388). I'll rename to IIMaj_deriv2_lt_three (clearer) and update the consumer. Also update the doc comment.
E3. Insert k-shift infra (contDiffOn_ksqrt_shift, mapsTo×3, psiOf_sqrt_krel) after line 1745 (after mapsTo_sqrt_shift_Ici_Ioi1), and chain_rule_sqrt_kshift_on after chain_rule_sqrt_shift_on (line 2026).
E4. marginTilde def: new form + doc comment.
E5. Blocks + mK: new forms.
E6. marginTilde_eq_expanded: same proof (simp only list + ring) — should still work (definitions changed consistently). ✓ no text change needed unless ring fails.
E7. contDiffOn_mFblock/mTL1b/.../mL2b: replace contDiffOn_sqrt_shift/mapsTo_sqrt_shift with the k-versions: each proof is one line: `contDiffOn_const.mul (contDiffOn_TL1.comp (contDiffOn_ksqrt_shift 1.5 (by norm_num)) (mapsTo_ksqrt_shift 1.5 (by norm_num)))` etc.
- contDiffOn_mIdb: `contDiffOn_const.mul (contDiffOn_ksqrt_shift 1.5 ...)`
- contDiffOn_mFblock: `contDiffOn_const.mul (hF.comp (contDiffOn_ksqrt_shift 1.5 ...) (mapsTo_ksqrt_shift_Ioi1 1.5 ...))`
E8. continuousOn_marginExpanded: hT : ContinuousOn (fun m => 1.5·√m+1) := (hsqrt.const_mul 1.5).add continuousOn_const; hmaps : MapsTo (fun m => 1.5√m+1) (Ici 20) (Ioi (−1)) — need an Ici version to (−1)! The old used mapsTo into Ioi (−1) — the old line 1906: `Set.MapsTo (fun m => Real.sqrt m + 1) (Set.Ici 20) (Set.Ioi (-1))` — inline proved. New: inline prove the 1.5 version. And the F composition used mapsTo_sqrt_shift_Ici_Ioi1 (line 1927) → mapsTo_ksqrt_shift_Ici_Ioi1 1.5.
Let me re-read 1901–1938 fully to patch precisely (I only saw 1901–1914 + 1927 fragment + 1940–1947).
E9. marginTilde_convex: the big one — hTn, composition bundles, v-blocks, hnn*, vIIM, final linarith.
E10. Bn def + doc; SfBoundProp endpoint + doc; lambda_pos_finite_height endpoint + doc.
E11. LiBasePoints: rebuild §4 (Bn evaluations), patch §5 margins + verified endpoint.
Also the header comments of the files mentioning the old constants — update where they make claims (LiSkeleton's file header mentions? The §3 header at 732 "The margin and its convexity (D-057)" — fine; the doc comments on marginTilde/Bn — update).
Let me also double-check the mK value: mK = −40·1.3352 − 2·(Real.exp (16/9) + 1)·(7·(3·2.9^2 + 48) + 5.94) − 1 + 1. In the old: −40*1.3352 - 2*(Real.exp 4 + 1)*(7*(3*2.9^2 + 48) + 3.3) - 1 + 1. ✓ pattern.
And marginExpanded's mIIM: (−1.5) * IIMaj m — the def was `fun m => (-1) * IIMaj m` → `fun m => (-1.5) * IIMaj m`.
And vIIM: `deriv (deriv mIIM) n = (-1.5) * deriv (deriv IIMaj) n := by unfold mIIM; rw [deriv2_const_mul (-1.5) (hdd hCDIIM) (hev hCDIIM)]`.
And the final linarith: goal `0 ≤ 1/(2n) + [9 nonneg terms] + (−1.5)·IIMaj″` — with hIIM3 : IIMaj″ < 1/(3n): linarith should close: it needs 1/(2n) − 1.5·IIMaj″ > 0: 1.5·IIMaj″ < 1.5·(1/(3n)) = 1/(2n) — linarith handles 1.5·x vs 1/(3n) with hn4 : 0 < 4n in scope? The forms: hIIM3 : deriv (deriv IIMaj) n < 1/(3*n). The goal contains 1/(2*n) and (−1.5)·deriv(deriv IIMaj) n. linarith: needs 1/(2n) + (−1.5)·d ≥ 0 given d < 1/(3n): multiply hIIM3 by 1.5: 1.5d < 1.5/(3n) = 1/(2n) ✓ linarith can do this with rational coefficients ✓ (1/(2n) appears as an atom; 1.5/(3n) = 1/(2n) requires field simplification — linarith treats 1/(2*n) and 1/(3*n) as ATOMS (reciprocals) — can it see 1.5·(1/(3n)) = 1/(2n)? NO — linarith can't equate distinct rational expressions of reciprocal atoms! (Banked gotcha from session 032: "linarith can't relate distinct reciprocal atoms".) So I need to bridge: have hbridge : (1.5 : ℝ) * (1/(3*n)) = 1/(2*n) := by field_simp [hn0.ne']; then linarith [hIIM3, hbridge, ...]. ✓ Add that.
Also the vF form: (−4)·(1.5^2·(psiOf F T/(4n))) — hmm wait, deriv2_const_mul (−4) gives (−4)·[composition's deriv deriv] = (−4)·(1.5²·(ψ-ish)/(4n)). The chain rule outputs (1.5^2)·(deriv(deriv φ)T − deriv φ T/(1.5√n))/(4n) — then ← psiOf_sqrt_krel rewrites the parenthesis to psiOf. Note the chain-rule statement has the form `k^2 * (A - B/(k*√n)) / (4*n)` — parses as ((k^2)·(A − B/(k√n)))/(4n). The psiOf_sqrt_krel rewrite: `← psiOf_sqrt_krel` rewrites `deriv (deriv φ) (1.5√n+1) − deriv φ (1.5√n+1)/(1.5√n)` → `psiOf φ (1.5√n+1)` ✓ (the krel LHS is psiOf ... = RHS, so ← direction rewrites RHS→LHS ✓).
The vF statement: `deriv (deriv (mFblock F)) n = (-4) * (1.5^2 * (psiOf F (1.5*Real.sqrt n + 1) / (4 * n)))` — hmm, associativity: 1.5^2·(X)/(4n) from the chain rule is (1.5^2·X)/(4n) — I'll state vF's value as (−4)·((1.5^2·psiOf F T)/(4n)) and handle the form in the hnn lemmas. Actually — cleaner to normalize the v-block values to `(−w) * (1.5^2 * psiOf φ T / (4 * n))` — the chain rule gives `1.5^2 * (psiOf ...) / (4*n)` which is defeq to `1.5^2 * psiOf ... / (4*n)`... The rw produces the chain-rule's exact RHS form; I'll state the v-goals in exactly that form with ← psiOf_sqrt_krel applied. Then hnn: 0 ≤ (−w)·(1.5^2·psiOf φ T/(4n)): prove: hψT : psiOf φ T < 0; h1 : 1.5^2·psiOf φ T/(4n) < 0 := mul_neg_of_pos_of_neg (by norm_num) (div_neg_of_neg_of_pos hψT hn4); exact mul_nonneg_of_nonpos_of_nonpos (by norm_num/nlinarith for −w ≤ 0) h1.le. ✓ (the −w coefficients with e^{16/9} inside: (−(42·0.433^2·(Real.exp (16/9) + 1))) ≤ 0 via Real.exp_pos — the old proofs did nlinarith [Real.exp_pos 4]; now Real.exp_pos (16/9) ✓.)
OK — one more piece: hTn in the convexity: `Real.sqrt 20 + 1 ≤ Real.sqrt n + 1` becomes `Real.sqrt 20 + 1 ≤ 1.5 * Real.sqrt n + 1`: proof: have h := Real.sqrt_le_sqrt (show (20:ℝ) ≤ n); then 1.5·√n ≥ √n ≥ √20 (since 1.5·√n ≥ 1·√n — need √n ≥ 0): linarith [Real.sqrt_nonneg n, h]. ✓ — used for the ψ-neg lemmas (need T ≥ √20+1) and hψ.
Also `psiOf_id` needs 1 < T: 1 < 1.5√n+1 ✓ trivially.
Alright — also `hCDIIM` uses IIMaj (unchanged) ✓; contDiffOn_mIIM unchanged (mIIM = const·IIMaj — the contDiffOn_mIIM proof: `unfold mIIM; rw [hId]; exact contDiffOn_const.mul hcomp` — the hId : IIMaj = fun m => psiTilde (√m) — unchanged ✓; mIIM's new constant (−1.5) — the unfold + contDiffOn_const.mul works for any constant ✓ no change needed... wait the old proof: `unfold mIIM; rw [hId]; exact contDiffOn_const.mul hcomp` — contDiffOn_const.mul hcomp : ContDiffOn (fun m => C·(psiTilde∘√) m)?? — the form: contDiffOn_const.mul : ContDiffOn ℝ n (fun x => c) s → ContDiffOn ℝ n f s → ContDiffOn ℝ n (fun x => c * f x) s — mIIM = fun m => (−1.5)·IIMaj m — after rw [hId], goal is ContDiffOn (fun m => (−1.5)·psiTilde(√m)) — contDiffOn_const.mul hcomp has type ContDiffOn (fun x => c·(psiTilde∘√) x)... the ∘ form vs application — the old proof worked; same shape with −1.5 instead of −1 — should work identically (the constant is inferred). ✓ Probably no change needed in contDiffOn_mIIM's proof body (unfold mIIM exposes the new constant; the proof is constant-agnostic). Hmm — `contDiffOn_const.mul hcomp` — contDiffOn_const : ContDiffOn ℝ n (fun _ => c) s — the c is inferred from the goal ✓. Fine.
Similarly continuousOn_marginExpanded's IIMaj part — let me look at the full proof (1901–1938) before editing.
Also deriv2_const_val for mK: mK is a different constant now but still constant ✓.
Let me now read 1899–1940 to have continuousOn_marginExpanded exact text.
Now reading `continuousOn_marginExpanded` in full to plan its k-shift adaptation.
tool: Read
input
{
"file_path": "D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\NguyenRH1\\LiSkeleton.lean",
"offset": 1899,
"limit": 42
}
raw content_json (database row)
[{"type":"thinking","thinking":"Now I have the complete picture of LiBasePoints. The full inventory of what breaks and needs rebuilding:\n\n**LiBasePoints.lean:**\n- Bn_FAlt_80000_le (247) — rebuild at new Bn\n- Bn_FAlt_80000_ge (394) — rebuild\n- Bn_FAlt_100000_le (483) — rebuild\n- (no Bn_FAlt_100000_ge exists — the old margin(1e5) lower used only sInftyLower_100000_lo − Bn_FAlt_100000_le ✓ so I need Bn_FAlt_100000_le only; and margin(8e4) upper needs Bn_FAlt_80000_ge ✓)\n- marginTilde_FAlt_80000_pos (630) — reassemble (proof: rw + linarith with the two bounds — same skeleton, works once the Bn bounds exist)\n- marginTilde_FAlt_80000_lt_100000 (640) — same skeleton ✓\n- lambda_pos_finite_height_verified (655) — endpoint change.\n\nThe marginTilde theorems' PROOFS don't reference the Bn internals — they just combine sInftyLower_* and Bn_FAlt_* — so they survive verbatim once the Bn bounds are re-established. \n\nThe Bn_FAlt_* proofs: rewrite with new T/log/kernel/R/IIMaj constants. The skeletons are reusable; the T-arguments become 1.5·√n+1.\n\nNote the old theorems reference `Real.sqrt 80000 + 1` EVERYWHERE (that's T). The new T = 1.5·√80000+1. New certified constants:\n\nAt 8e4: T ∈ [1.5·282+1, 1.5·283+1] = [424, 425.5]:\n- hT_up : 1.5·√80000+1 ≤ 425.5; hT_lo : 424 ≤ 1.5·√80000+1\n- log T ≤ 6.06: e^{6.06} = e⁶·e^{0.06}: e⁶ = e⁵·e: [148.413·2.71828 bounds]: e⁵ ≤ 148.414 (existing h5up), e¹ ≤ 2.7182818286: e⁶ ≤ 148.414·2.7182818286 = 403.433. e^{0.06} ≤ 1.0619 (partial sums... for an UPPER bound on e^{0.06} use the (1−x/16)⁻¹⁶ trick: (1−0.06/16)⁻¹⁶ = (0.99625)⁻¹⁶ — compute (1/0.99625)^16 = 1.003765^16 ≈ e^{16·0.003758} = e^{0.06013} = 1.06197 — so e^{0.06} ≤ 1.0620). e^{6.06} ≤ 403.433·1.0620 = 428.45 ≥ 425.5 ✓.\n- log T ≥ 6.04: e^{6.04} = e⁶·e^{0.04}: e⁶ ≥ 403.42 (e⁵ ≥ 148.328 ×e ≥ 2.7182818283: 148.328·2.7182818283 = 403.197? let me compute: 148.328·2.71828 = 403.19... hmm: 148.328·2.71828 = 403.188. Hmm the true e⁶ = 403.4288. The d9 bounds on e¹: [2.7182818283, 2.7182818286]; e⁵ bounds [148.328, 148.414] — the true e⁵ = 148.4132. So e⁶ ∈ [148.328·2.7182818283, 148.414·2.7182818286] = [403.19, 403.43] — the LOWER bound 403.19 is loose by 0.06%. Fine for certification. e^{0.04} ≥ 1.0408 (partial sums Σ₀⁶ 0.04^i/i! = 1+0.04+0.0008+0.00001067+... = 1.04081). e^{6.04} ≥ 403.19·1.0408 = 419.64 ≤ 424 ✓ (slack 1%). Actually cleaner: e^{6.04} ≥ e⁶·1 ≥ 403.19 — is 403.19 ≤ 424 ✓ trivially — even simpler: log T ≥ 6 via e⁶ ≥ 403.19... hmm 403.19 < 424 ✓ so log T ≥ 6.04 needs e^{6.04} ≤ 424: use e^{6.04} = e⁶·e^{0.04} ≥ 403.19·1.0408 = 419.6 ✓ ≤ 424 ✓. Or just use log T ≥ 6 (e⁶ ≥ 403.19... no wait — need e^6.04 ≤ 424 ⟺ 6.04 ≤ log 424. Simpler: log 424 ≥ log 403.19 ≥ 6 ✓ so log T ≥ 6. Use ≥ 6 for simplicity (the lower bounds feed the Bn lower bound where slack is comfortable).\n- loglog T ≤ 1.81: e^{1.81} = e·e^{0.81}: e^{0.81} ≤ (1−0.81/16)⁻¹⁶ = (0.949375)⁻¹⁶ = (1.05332...)^16: ln(1.05332) = 0.05194; ×16 = 0.8311; e^{0.8311} = 2.2960. Hmm that's too loose (true e^{0.81} = 2.2479). 2.71828·2.2960 = 6.2412 ≥ 6.06 ✓ — so loglog T ≤ 1.81 via e^{1.81} ≥ 6.2412 ≥ 6.06 ✓ (the bound direction: log T ≤ 6.06 ≤ e^{1.81} ⟹ loglog T ≤ 1.81 ✓). ✓ works.\n- loglog T ≥ 1.79: e^{1.79} ≤ log T-lower... : need e^{1.79} ≤ 6.04-ish. e^{1.79} = e·e^{0.79}: e^{0.79} ≥ Σ₀⁷(0.79^i/i!) = 1+0.79+0.312+0.0822+0.0162+0.00256+0.000337+0.0000380 = 2.2033. e^{1.79} ≥ 2.71828·2.2033 = 5.9892. Hmm — I need loglog T ≥ 1.79 ⟺ log T ≥ e^{1.79}: is log T ≥ 6.04 ≥ e^{1.79}? e^{1.79} ≤ 5.9893·(upper via trick: (1−0.79/16)⁻¹⁶ = (0.950625)⁻¹⁶: ln = −16·ln(0.950625) = 16·0.050640 = 0.8102; e^{0.8102} = 2.2484; ×2.71828... wait that's for upper. e^{1.79} ≤ 2.7182818286·2.2484 = 6.1118. So e^{1.79} ∈ [5.9892, 6.1118] — and log T ≥ 6.04 might be LESS than e^{1.79} = up to 6.1118 — the chain log T ≥ 6.04 ≥ e^{1.79} FAILS since e^{1.79} could be 6.11 > 6.04. Use loglog T ≥ 1.7: e^{1.7} ≤ 5.474 (e·e^{0.7}: e^{0.7} ≤ 2.0138 (trick: (1−0.7/16)⁻¹⁶ = (0.95625)⁻¹⁶: −16 ln(0.95625) = 16·0.044741 = 0.71586; e^{0.71586} = 2.0461 — too loose again; partial sums give lower 2.0136; upper 2.0461; true 2.01375). e^{1.7} ≤ 2.7182818286·2.0461 = 5.5619. Then loglog T ≥ 1.7 ⟸ log T ≥ 6.04 ≥ 5.5619 ✓. So loglog T ≥ 1.7 (loose but fine — the lower bounds have slack).\n\nHmm wait — actually for Bn_FAlt_80000_ge (LOWER bound on Bn), I need lower bounds on the bracket: (2/3)Z2 + 10.5·log(T+2)+48 with Z2 = 0.6·log(T+2)+0.886·loglog(T+2)+2.7. Lower: log(T+2) ≥ 6.04 (T+2 ≥ 426 ≥ e^{6.04}... e^{6.04} ≥ 419.6 ≤ 426 ✓); loglog(T+2) ≥ 1.7 (log(T+2) ≥ 6.04 ≥ 5.5619 ✓). Z2 ≥ 0.6·6.04+0.886·1.7+2.7 = 3.624+1.506+2.7 = 7.83. bracket ≥ (2/3)·7.83+10.5·6.04+48 = 5.22+63.42+48 = 116.64. term2 ≥ 4·424·116.64 = 1696·116.64 = 197,821. Bn ≥ 197821 + 0(bridge, drop) + 53.4 + 0(term4≥0) + 0(IIMaj) + 1 = 197,875. Certify Bn ≥ 197,000 ✓ (margin(8e4) ≤ 339000−197000+1 = 142,001).\n\nAt 1e5: T ∈ [1.5·316+1, 1.5·317+1] = [475, 476.5]:\n- log T ≤ 6.17: e^{6.17} = e⁶·e^{0.17}: e^{0.17} ≤ (1−0.17/16)⁻¹⁶ = (0.989375)⁻¹⁶: −16·ln(0.989375) = 16·0.010682 = 0.17091; e^{0.17091} = 1.18636. e^{6.17} ≤ 403.43·1.18636 = 478.58 ≥ 476.5 ✓ (slack 0.4% — a bit tight but OK; could use 6.18: e^{6.18} = e⁶·e^{0.18}: e^{0.18} ≤ 1.1973: 403.43·1.1973 = 483.03 — more slack; use log T ≤ 6.17 with the 0.4% slack, or 6.18 for comfort — use 6.18: log T ≤ 6.18, log(T+2) ≤ 6.18 (T+2 ≤ 478.5 ≤ 483.03 ✓)).\n- log T ≥ 6.15: e^{6.15} ≥ 403.19·e^{0.15}: e^{0.15} ≥ Σ₀⁶ = 1+0.15+0.01125+0.0005625+0.0000211+... = 1.16184. e^{6.15} ≥ 403.19·1.16184 = 468.44 ≤ 475 ✓. So log T ≥ 6.15, log(T+2) ≥ 6.15 ✓ (477 ≥ 468.44 ✓).\n- loglog ≤ 1.83: e^{1.83} ≥ ...: need log T ≤ 6.18 ≤ e^{1.83}: e^{1.83} = e·e^{0.83}: e^{0.83} ≥ 2.2932 (partial sums: 1+0.83+0.34445+0.095297+0.019774+0.003283+0.000454+0.0000539 = 2.29331). e^{1.83} ≥ 2.7182818283·2.29331 = 6.2336 ≥ 6.18 ✓.\n- loglog ≥ 1.8: e^{1.8} ≤ log T: e^{1.8} = e·e^{0.8}: e^{0.8} ≤ 2.2254 (existing h08!) → e^{1.8} ≤ 2.7182818286·2.2254 = 6.0493. Hmm — need e^{1.8} ≤ 6.15: 6.0493 ≤ 6.15 ✓. So loglog T ≥ 1.8 ✓ (log T ≥ 6.15 ≥ e^{1.8}-upper 6.0493 ✓).\n- FAlt ≤ (1/6)·476.5·6.18 + 0.137·6.18 + 0.443·1.83 + 2.463 = 490.79+0.847+0.811+2.463 = 494.91. 4F ≤ 1980.\n- Ĉ₀ ≤ 0.433·6.18+0.886·1.83+2.9 = 2.676+1.621+2.9 = 7.197 → ≤ 7.20.\n- Ĥ ≤ 3·7.20²+10.5·6.18+48 = 155.52+64.89+48 = 268.41 → ≤ 268.5.\n- Z2 ≤ 0.6·6.18+0.886·1.83+2.7 = 3.708+1.621+2.7 = 8.029 → ≤ 8.03.\n- bracket ≤ (2/3)·8.03+10.5·6.18+48 = 5.3533+64.89+48 = 118.2433 → ≤ 118.25.\n- term2 ≤ 4·476.5·118.25 = 1906·118.25 = 225,384.5.\n- e^{16/9}+1 ≤ 6.934 (certified below).\n- term4 ≤ 2·6.934·(7·268.5+5.94) = 13.868·1885.44 = 26,145.9.\n- IIMaj: 1.5·IIMaj ≤ 1.5·4.56·318·2 = 4354.56 — wait IIMaj_le_two_mul gives IIMaj ≤ 4.56(√n+1)·2; √100000+1 ≤ 318: ≤ 4.56·318·2 = 2900.16; ×1.5 = 4350.24.\n- Bn ≤ 1980+225384.5+53.41+26145.9+4350.24+1 = 257,915. Certify ≤ 258,000 ✓.\n- margin(1e5) ≥ 432500−258000+1 = 174,501 ✓.\n\nAnd at 8e4 upper Bn: \n- log T ≤ 6.06, log(T+2) ≤ 6.06 (T+2 ≤ 427.5 ≤ 428.45 ✓), loglog ≤ 1.81.\n- FAlt ≤ (1/6)·425.5·6.06+0.137·6.06+0.443·1.81+2.463 = 429.755+0.830+0.802+2.463 = 433.85 → ≤ 433.9. 4F ≤ 1735.6.\n- Ĉ₀ ≤ 0.433·6.06+0.886·1.81+2.9 = 2.624+1.6037+2.9 = 7.1277 → ≤ 7.13.\n- Ĥ ≤ 3·7.13²+10.5·6.06+48 = 152.57+63.63+48 = 264.2 → ≤ 264.2.\n- Z2 ≤ 0.6·6.06+0.886·1.81+2.7 = 3.636+1.6037+2.7 = 7.9397 → ≤ 7.94.\n- bracket ≤ (2/3)·7.94+10.5·6.06+48 = 5.2933+63.63+48 = 116.9233 → ≤ 116.93.\n- term2 ≤ 4·425.5·116.93 = 1702·116.93 = 199,014.86.\n- term4 ≤ 2·6.934·(7·264.2+5.94) = 13.868·1855.34 = 25,726.9.\n- IIMaj: 1.5·4.56·284·2 = 3885.12.\n- Bn ≤ 1735.6+199014.86+53.41+25726.9+3885.12+1 = 230,416.9. Certify ≤ 231,000 ✓.\n- margin(8e4) ≥ 336000−231000+1 = 105,001 > 0 ✓.\n\ne^{16/9} certification: e^{16/9} = e^{1.5}·e^{5/18}?? 16/9 = 1.7778 = 1.5+0.2778 (= 1.5 + 5/18). Cleaner: 16/9 = 1 + 7/9: e^{16/9} = e·e^{7/9}, 7/9 = 0.7778. e^{0.7778}: upper via the (1−x/16)⁻¹⁶ trick: (1−0.7778/16)⁻¹⁶ = (0.95139)⁻¹⁶: −16·ln(0.95139) = 16·0.049836 = 0.79737; e^{0.79737} = 2.21765. Hmm true e^{0.7778} = 2.17680 — the trick overshoots by 1.9% (it's (1/(1−y))^16 vs e^{16y}: 1/(1−y) = e^{y+y²/2+...} — overshoot e^{16y²/2} = e^{8·0.0395} = e^{0.316}?? no wait: y = 0.7778/16 = 0.04861; 1/(1−y) = e^{y+y²/2+y³/3...} = e^{0.04861+0.001181+0.0000383} = e^{0.04983}; ×16 = e^{0.7973} vs e^{16y} = e^{0.7778}: overshoot factor e^{0.0195} = 1.0197 ✓ 2%). So e^{16/9} ≤ 2.7182818286·2.21765 = 6.0285?? That gives e^{16/9}+1 ≤ 7.03 — vs true 6.92249. The 2% overshoot costs 0.1 in the kernel charge — the horizontal term4: 2·7.03·1855 = 26,078 vs 25,727 with 6.934 — Bn up by ~350. Still ≤ 231,000 ✓ plenty. But tighter is easy: e^{0.7778} = e^{0.5}·e^{0.2778}: e^{0.5} ≤ 1.6488 (partial sums upper? For upper on e^{0.5}: (1−0.5/16)⁻¹⁶ = (0.96875)⁻¹⁶: −16 ln(0.96875) = 16·0.031749 = 0.50798; e^{0.50798} = 1.6621 — overshoot 0.8%; hmm. Alternative: use the existing pattern with more exact arithmetic — honestly, 7.03 is fine (Bn slack 583). Let me simplify: certify e^{16/9} ≤ 6.03 via e·2.21765; e^{16/9}+1 ≤ 7.03. Then term4 ≤ 2·7.03·(7·264.2+5.94) = 14.06·1855.34 = 26,078 (8e4) and 14.06·1885.44 = 26,509 (1e5). Bn(8e4) ≤ 1735.6+199014.86+53.41+26078+3885.12+1 = 230,768 ✓ ≤ 231,000 (slack 232 — hmm getting tight-ish; use 232,000: slack 1,232 ✓). Bn(1e5) ≤ 1980+225384.5+53.41+26509+4350.24+1 = 258,278 → certify ≤ 259,000 (margin(1e5) ≥ 432500−259000+1 = 173,501 ✓ still way above 142,001 ✓).\n\nHmm, actually — better idea for the e^{16/9} bounds: e^{16/9} = (e^{4/9})⁴: e^{4/9} = e^{0.4444}: trick: (1−0.4444/16)⁻¹⁶ = (0.972222)⁻¹⁶ = ... −16 ln(0.972222) = 16·0.028172 = 0.45075; e^{0.45075} = 1.56952; overshoot e^{0.45075−0.4444} = 1.0064 (0.6%). e^{0.4444} ≤ 1.56952 → e^{16/9} ≤ 1.56952⁴ = 6.0687?? 1.56952² = 2.46339; squared: 6.06829. So e^{16/9} ≤ 6.0683 → +1 ≤ 7.0683 — worse than 7.03? 7.0683 > 7.03 — the e·e^{7/9} route (7.03) is better. Or: e^{16/9} = e²/e^{2/9}: e² ≤ 7.3891 (e·e: 2.7182818286² = 7.389056); e^{2/9} = e^{0.2222} ≥ Σ₀⁷(0.2222^i/i!) = 1+0.2222+0.02469+0.001829+0.0001016+0.00000452 = 1.24886. e^{16/9} = e²/e^{2/9} ≤ 7.389056/1.24886 = 5.91665. OH nice — that's much tighter (true 5.92249; overshoot −0.1%... wait 5.91665 < 5.92249?! That's BELOW the true value — because e^{0.2222} ≥ 1.24886 means 1/e^{0.2222} ≤ 1/1.24886 — and e²/e^{2/9} ≤ 7.389056/1.24886 = 5.91665 < 5.92249 = true — CONTRADICTION?? Let me recompute: 16/9 = 1.7778; 2 − 2/9 = 16/9 ✓. e^{16/9} = e²/e^{2/9} = 7.389056/1.248853 = 5.91666?? But true e^{1.7778} = 5.92249. And e^{2/9} = e^{0.22222} = 1.248853. 7.389056/1.248853 = 5.91666. Hmm — 7.389056/5.92249 = 1.24761 ≠ 1.248853?? Let me recompute e^{0.2222}: 1+0.22222+0.22222²/2+0.22222³/6+0.22222⁴/24: 0.22222² = 0.049383; /2 = 0.024691; 0.22222³ = 0.010974; /6 = 0.001829; 0.22222⁴ = 0.0024387; /24 = 0.0001016; 0.22222⁵/120 = 0.0000045. Sum: 1+0.22222+0.024691+0.001829+0.0001016+0.0000045 = 1.248846. So e^{0.2222} = 1.248846. e² = 7.389056. 7.389056/1.248846 = ? 1.248846·5.92 = 7.39317 — that's > 7.389056! So e²/e^{2/9} < 5.92. But e^{16/9} should equal e²/e^{2/9} EXACTLY, and e^{16/9} = e^{1.7778}. Let me recompute e^{1.7778}: e^{1.7778} = e·e^{0.7778}: e^{0.7778} = ? 0.7778: e^{0.7} = 2.01375; e^{0.0778} = 1.08091; product = 2.17669. e^{1.7778} = 2.71828·2.17669 = 5.91659!! NOT 5.92249. Hmm!! Let me recheck E-033: kernel_charge(1.5) = e^{4/c²}+1 with c = 1.5: 4/2.25 = 1.77778: e^{1.77778} — mpmath said 6.91669 for the +1 form. So e^{1.77778} = 5.91669 ✓✓ — matches 5.91659 (my hand-arith). So e^{16/9} = 5.91669, NOT 5.92249. Where did I get 5.92249? Earlier I wrote \"e^{16/9} = e^{1.7778} = 5.922487\" — that was WRONG (probably e^{1.7788} or a typo carried through §4/§5 of D-073!). Let me check what I wrote in D-073: \"kernel charge e^{4/c²}+1: c=1.5: e^{1.7778}+1 = 6.92249\" — and E-033 CSV says kernel_1.5 = 6.91669. DISCREPANCY: D-073 §4/§5 tables say 6.922/6.92 — E-033 (the authoritative computation) says 6.91669. My D-073 text value 6.92249 was a hand-computation error (I computed e^{1.7778} wrong). The D-073 tables' \"6.922\" should be 6.9167. GRR — an erratum to fix in D-073 (the tables in §4 and §5, and the NGUYEN.md checklist quote \"e^{16/9}+1\" — that one has no numeric). Also my STATE.md NEXT ACTION wrote \"e^{16/9}+1 = 6.9167\" ✓ correct there.\n\nLet me verify once more: 4/c² at c = 1.5: c² = 2.25; 4/2.25 = 1.77777…. e^{1.77778} = 5.9167 (per mpmath, twice). ✓. So D-073's \"5.922487\"/\"6.92249\"/\"6.922\" values are wrong; correct is 5.9167/6.9167. Impact: none on substance (the kernel charge is 6.92-ish either way; R(1.5) used e^{4/c²} = 5.922487 in the R formula?? R(1.5) = Z₀·[e^{4/c²}/(4(1−q)log 2) + 1/(2 log 2)] — E-033 computed R(1.5) = 5.93924 using the CORRECT e^{16/9} = 5.91669 — wait no: E-033's Rc(c) uses e ** (4 / c ** 2) computed by mpmath = 5.91669 ✓. And my HAND computation of R(1.5) earlier gave 9.703810 for the first term using 5.922487/(4·0.2202·0.6931) — with the correct 5.91669: 5.91669/0.610325 = 9.6944; +0.7213 = 10.4157; ×0.56996 = 5.9362. E-033 says 5.93924 ✓ (with Z₀_hi = 0.5703661: 10.4157·0.5703661/0.56996 = 5.93924/5.9362 ✓ consistent). So R(1.5) = 5.94 is FINE (charged upper). Only the D-073 hand-values \"e^{16/9} = 5.922487\" and \"kernel 6.92249/6.922\" are wrong (should be 5.9167/6.9167) — cosmetic but must be errata'd for honesty. The V4 check (kernel max 5.65 ≤ 6.92) used 6.91669 ✓. NGUYEN.md checklist: I wrote \"2(e^{16/9}+1)(7Ĥ + 5.94)\" — no numeric value ✓ fine. STATE.md: \"e^{16/9}+1 = 6.9167\" ✓ correct.\n\nSo: D-073 erratum (two table cells in §4 and one in §5 + the \"1.9×\" comment): \"6.922\" → \"6.9167\", \"5.922487\" → \"5.91669\". Also §4's \"R(1.5) = 5.94\" stays ✓. The \"1.9× worse kernel charge\" comment: 6.9167/3.7183 = 1.86× ✓ fine.\n\nI'll fix those as part of this session's errata handling (D-073 is not a frozen file — it's the thread's own file; fixing is allowed and required by honesty).\n\nOK — back to planning. The Lean Bn charges e^{16/9}+1; certified: e^{16/9} ∈ [5.916, 5.917]?? For the upper bound on Bn: need e^{16/9}+1 ≤ some certified value: e^{16/9} ≤ 5.92 via e²/e^{2/9}: e² ≤ 7.3891 (2.7182818286² = 7.389056 → certify ≤ 7.3891), e^{2/9} ≥ 1.2488 (partial sums ≥ 1.24884 → certify ≥ 1.2488): e^{16/9} ≤ 7.3891/1.2488 = 5.9170. So e^{16/9}+1 ≤ 6.9170. For the LOWER (Bn_ge): e^{16/9} ≥ e²-lo/e^{2/9}-up: e² ≥ 7.3890, e^{2/9} ≤ 1.2489: ≥ 7.3890/1.2489 = 5.9165 → e^{16/9}+1 ≥ 6.9165. These are TIGHT (0.01%) — but the lower-bound side only needs e^{16/9}+1 ≥ 0 (or ≥ 6.9 for comfort; the old file used e⁴ ≥ 54.5978 for the lower — I'll use ≥ 6.9: from e^{16/9} ≥ 5.9: 7.3890/1.2489 ≥ 5.9165 ≥ 5.9 ✓ → e^{16/9}+1 ≥ 6.9 ✓ simple).\n\nDivision bounds in Lean: e^{16/9} ≤ 7.3891/1.2488 needs div_le_iff₀ or one_div manipulation — manageable (a/b ≤ c ⟺ a ≤ c·b). \n\nNow — final targets for LiBasePoints rebuild:\n- e^{16/9}+1 ≤ 6.917 (used in Bn_*_le); ≥ 6.9 (used in Bn_80000_ge).\n- 8e4: T ∈ [424, 425.5]; log T ≤ 6.06, log(T+2) ≤ 6.06; loglog ≤ 1.81; log T ≥ 6.04 (for _ge), log(T+2) ≥ 6.04, loglog ≥ 1.7.\n - FAlt ≤ 433.9; Ĉ₀ ≤ 7.13; Ĥ ≤ 264.2; Z2 ≤ 7.94; bracket ≤ 116.93; term2 ≤ 4·425.5·116.93 = 199,014.9; term4 ≤ 2·6.917·(7·264.2+5.94) = 13.834·1855.34 = 25,662.4; IIMaj ≤ 1.5·2590.08 = 3885.12; 4F ≤ 1735.6; Bn ≤ 1735.6+199014.9+53.41+25662.4+3885.12+1 = 230,352.4 → certify ≤ 231,000.\n - _ge: bracket ≥ 116.64 (Z2 ≥ 7.83, log(T+2) ≥ 6.04); term2 ≥ 4·424·116.64 = 197,821.4; Bn ≥ 197,821.4+53.41+1 = 197,875.8 → ≥ 197,000.\n- 1e5: T ∈ [475, 476.5]; log T ≤ 6.18, log(T+2) ≤ 6.18; loglog ≤ 1.83.\n - FAlt ≤ 494.91 → 4F ≤ 1979.7; Ĉ₀ ≤ 7.20; Ĥ ≤ 268.5; Z2 ≤ 8.03; bracket ≤ 118.25; term2 ≤ 4·476.5·118.25 = 225,384.5; term4 ≤ 2·6.917·(7·268.5+5.94) = 13.834·1885.44 = 26,078.2; IIMaj ≤ 1.5·2900.16 = 4350.24; Bn ≤ 1979.7+225384.5+53.41+26078.2+4350.24+1 = 257,847 → ≤ 258,000.\n- margins: pos: 336000−231000+1 = 105,001 > 0 ✓; lt: margin(8e4) ≤ 339000−197000+1 = 142,001 < 432500−258000+1 = 174,501 ✓.\n\nNote: do I need Bn_FAlt_100000_ge? No (not consumed). Skip it (the old file didn't have it either).\n\nWait — also check: the old file's Bn_FAlt_80000_ge was consumed by marginTilde_FAlt_80000_lt_100000 ✓ — keep.\n\nNow, one important check on the new T in Bn: the Lean Bn def will be `let T := 1.5 * Real.sqrt n + 1`. In the evaluation proofs, all the `Real.sqrt 80000 + 1` occurrences become `1.5 * Real.sqrt 80000 + 1`. The hT bounds: 1.5·√80000+1 ≤ 425.5 from sqrt80000_le (≤ 283): 1.5·283+1 = 425.5 ✓; ≥ 424 from sqrt80000_ge (≥ 282): 1.5·282+1 = 424 ✓.\n\nAlso — LiSkeleton's SfBoundProp/lambda endpoints and doc comments. And check nothing else references Bn/marginTilde internals: grep Bn across the package — LiBasePoints + LiSkeleton only? Let me check LiAssembly/LiContour for Bn/marginTilde references... SfBoundProp is consumed by lambda_pos_finite_height(_verified) only ✓. Bn by SfBoundProp + LiBasePoints ✓. marginTilde by convexity/basepoints/lambda_pos ✓. marginExpanded/mK by the convexity machinery ✓ (internal). IIMaj by Bn/marginTilde/mIIM/basepoints ✓.\n\nAlso — hmm, `Z2hat` is referenced in LiAssembly? grep earlier showed Z2hat used in Bn/marginTilde; D-071 mentions LiSkeleton:2396 region. Fine.\n\nOne more: `exists_zero_avoiding_T_wide` and the LiAssembly line-77 hypotheses — 6-c territory, NOT now. ✓\n\nSub-stage split for session 040:\n- **040-i (LiSkeleton core)**: k-shift infra (5 lemmas + chain rule + psiOf rel), bracket strengthening, IIMaj_deriv2_lt_three, Bn/marginTilde/blocks/mK/equations redefinition, contDiffOn/continuousOn adaptations, marginTilde_convex re-proof, SfBoundProp + lambda_pos_finite_height endpoints. Build LiSkeleton + fix errors.\n- **040-ii (LiBasePoints)**: rebuild the 3 Bn evaluations + reassemble margins + verified endpoint. Build + audit + commit.\n- **040-iii**: E-030-style re-validation? No — E-033 already validated the fold at c = 1.5. The 8-step protocol's step 5 (endpoint margins re-run): E-033 V6 has margin(N₁) = 1.08e26 at c = 1.5 ✓ — done numerically. The Lean base points are 040-ii. So after 040-ii: full build + axiom audit + D-073 errata fix (6.922 → 6.9167) + journal-040 + commit.\n\nWait — the D-073 errata: should fix NOW (it's quick). Add to the plan.\n\nAlso the NGUYEN.md/STATE.md updates at the end (ii′-6-a redo complete → next ii′-6-c). And STATE's NEXT ACTION.\n\nLet me start with 040-i. The k-shift infra goes right after the existing sqrt-shift lemmas (~1746). The chain_rule_sqrt_kshift_on goes after chain_rule_sqrt_shift_on (2027). The bracket strengthening at 1678. IIMaj_deriv2_lt_three after IIMaj_deriv2_lt (2157). Bn/marginTilde/blocks/mK edits. Then convexity.\n\nOrder of operations (to keep the build broken for as short as possible — actually it will be broken mid-way regardless; do it in one careful pass, then iterate on build errors):\n\nActually — smarter: add the NEW infra FIRST (k-shift lemmas, IIMaj_lt_three, bracket strengthening) — these are ADDITIONS that don't break anything (the bracket bound strengthening changes the statement < 2 → < 4/3 — its consumer is IIMaj_deriv2_lt which uses `exact div_lt_div_of_pos_right hb h4n` with hb : ... < 2... let me check: IIMaj_deriv2_lt: `have hb := iimaj_bracket_bound ...; rw [e]; exact div_lt_div_of_pos_right hb h4n` where e : 1/(2n) = 2/(4n) — hb : bracket < 2 → bracket/(4n) < 2/(4n) ✓. If I strengthen the bracket to < 4/3, IIMaj_deriv2_lt's proof: hb : bracket < 4/3; goal bracket/(4n) < 2/(4n) = 1/(2n): div_lt_div_of_pos_right hb gives bracket/(4n) < (4/3)/(4n) ≠ 2/(4n) — BREAKS. So IIMaj_deriv2_lt needs adapting: either restate to < 1/(3n) (with e : 1/(3n) = (4/3)/(4n)) or keep the < 1/(2n) form via (4/3)/(4n) < 2/(4n) linarith. Plan: change iimaj_bracket_bound to < 4/3 AND change IIMaj_deriv2_lt to < 1/(3n) — its consumers: marginTilde_convex's hIIM (which I'm rewriting anyway) — grep IIMaj_deriv2_lt uses: only line 2388 (marginTilde_convex). ✓ Safe to change its form to < 1/(3n).\n\nThen the definition changes (Bn etc.), then the machinery adaptations, then build.\n\nLet me also prepare the exact new definitions text.\n\n**New infra (insert after line 1745, before psiOf_sqrt_rel):**\n\n```lean\n/-- [PROVED session 040] T(m) = k·√m + 1 is C² on (20, ∞) (k > 0). -/\ntheorem contDiffOn_ksqrt_shift (k : ℝ) (_hk : 0 < k) :\n ContDiffOn ℝ 2 (fun m => k * Real.sqrt m + 1) (Set.Ioi 20) :=\n (contDiffOn_const.mul (contDiffOn_id.sqrt (fun x hx => by\n have h : 20 < x := hx\n exact ne_of_gt (by linarith : (0 : ℝ) < x)))).add contDiffOn_const\n\ntheorem mapsTo_ksqrt_shift (k : ℝ) (hk : 0 < k) :\n Set.MapsTo (fun m => k * Real.sqrt m + 1) (Set.Ioi 20) (Set.Ioi (-1)) := by\n intro x hx\n have h : 20 < x := hx\n have hnn := Real.sqrt_nonneg x\n exact Set.mem_Ioi.mpr (by linarith [mul_pos hk (Real.sqrt_pos.mpr (by linarith : (0:ℝ) < x))])\n\n/-- k·√m + 1 maps (20, ∞) into (1, ∞) (k > 0). -/\ntheorem mapsTo_ksqrt_shift_Ioi1 (k : ℝ) (hk : 0 < k) :\n Set.MapsTo (fun m => k * Real.sqrt m + 1) (Set.Ioi 20) (Set.Ioi 1) := by\n intro x hx\n have h : 20 < x := hx\n have hpos := Real.sqrt_pos.mpr (by linarith : (0 : ℝ) < x)\n exact Set.mem_Ioi.mpr (by linarith [mul_pos hk hpos])\n\n/-- k·√m + 1 maps [20, ∞) into (1, ∞) (k > 0). -/\ntheorem mapsTo_ksqrt_shift_Ici_Ioi1 (k : ℝ) (hk : 0 < k) :\n Set.MapsTo (fun m => k * Real.sqrt m + 1) (Set.Ici 20) (Set.Ioi 1) := by\n intro x hx\n have h : 20 ≤ x := hx\n have hpos := Real.sqrt_pos.mpr (by linarith : (0 : ℝ) < x)\n exact Set.mem_Ioi.mpr (by linarith [mul_pos hk hpos])\n\n/-- [PROVED session 040] psiOf at T = k·√n + 1 in the chain-rule form\n(with T − 1 = k·√n). -/\ntheorem psiOf_sqrt_krel (φ : ℝ → ℝ) (k n : ℝ) :\n psiOf φ (k * Real.sqrt n + 1) =\n deriv (deriv φ) (k * Real.sqrt n + 1) -\n deriv φ (k * Real.sqrt n + 1) / (k * Real.sqrt n) := by\n unfold psiOf\n rw [show k * Real.sqrt n + 1 - 1 = k * Real.sqrt n by ring]\n```\n\nAnd chain_rule_sqrt_kshift_on — the clone. Let me write it carefully, cloning the 1956–2026 proof:\n\n```lean\n/-- [PROVED session 040] Scaled-shift chain rule: for the c-shifted\nT(n) = k·√n + 1 (k > 0), d²/dn² φ(k·√n+1) = k²·[φ″(T) − φ′(T)/(k√n)]/(4n)\n= k²·ψ[φ](T)/(4n). The c = 1.5 F-D repair (D-073 §4) changes every\nmargin composition to this form. -/\ntheorem chain_rule_sqrt_kshift_on (φ : ℝ → ℝ) {k : ℝ} (hk : 0 < k) {c : ℝ}\n (hc : c ≤ 1) (hφ : ContDiffOn ℝ 2 φ (Set.Ioi c)) (n : ℝ) (hn : 0 < n) :\n deriv (deriv fun n => φ (k * Real.sqrt n + 1)) n =\n (k ^ 2) * (deriv (deriv φ) (k * Real.sqrt n + 1) -\n deriv φ (k * Real.sqrt n + 1) / (k * Real.sqrt n)) / (4 * n) := by\n have hφd : DifferentiableOn ℝ φ (Set.Ioi c) := hφ.differentiableOn (by norm_num)\n have hφdd : DifferentiableOn ℝ (deriv φ) (Set.Ioi c) :=\n (hφ.deriv_of_isOpen (m := 1) isOpen_Ioi (by norm_num)).differentiableOn one_ne_zero\n have hmem : ∀ m : ℝ, 0 < m → Set.Ioi c ∈ 𝓝 (k * Real.sqrt m + 1) := by\n intro m hm\n have h1 : (1 : ℝ) < k * Real.sqrt m + 1 := by\n have h := mul_pos hk (Real.sqrt_pos.mpr hm)\n linarith\n exact Ioi_mem_nhds (lt_of_le_of_lt hc h1)\n have hφ1 : ∀ m : ℝ, 0 < m → DifferentiableAt ℝ φ (k * Real.sqrt m + 1) :=\n fun m hm => hφd.differentiableAt (hmem m hm)\n have hφ2 : DifferentiableAt ℝ (deriv φ) (k * Real.sqrt n + 1) :=\n hφdd.differentiableAt (hmem n hn)\n have hsqrt : HasDerivAt Real.sqrt (1 / (2 * Real.sqrt n)) n :=\n Real.hasDerivAt_sqrt hn.ne'\n have hdiff_sqrt : DifferentiableAt ℝ Real.sqrt n := hsqrt.differentiableAt\n have hdiff_h : DifferentiableAt ℝ (fun n => k * Real.sqrt n + 1) n :=\n (hdiff_sqrt.const_mul k).add (differentiableAt_const 1)\n have hpos : Set.Ioi (0 : ℝ) ∈ 𝓝 n := Ioi_mem_nhds hn\n have hg1 : deriv (fun n => φ (k * Real.sqrt n + 1)) =ᶠ[𝓝 n]\n fun n => deriv φ (k * Real.sqrt n + 1) * (k * (2 * Real.sqrt n)⁻¹) := by\n filter_upwards [hpos] with m hm\n have hsm : HasDerivAt Real.sqrt (1 / (2 * Real.sqrt m)) m :=\n Real.hasDerivAt_sqrt (ne_of_gt hm)\n have hhm : DifferentiableAt ℝ (fun x => k * Real.sqrt x + 1) m :=\n (hsm.differentiableAt.const_mul k).add (differentiableAt_const 1)\n have h1 : deriv (fun x => k * Real.sqrt x + 1) m = k * (1 / (2 * Real.sqrt m)) := by\n rw [deriv_add_const, deriv_const_mul k hsm.differentiableAt, hsm.deriv]\n rw [show (fun x => φ (k * Real.sqrt x + 1)) = φ ∘ (fun x => k * Real.sqrt x + 1)\n from rfl,\n deriv_comp m (hφ1 m hm) hhm, h1]\n ring\n have hA : HasDerivAt (fun n => deriv φ (k * Real.sqrt n + 1))\n (deriv (deriv φ) (k * Real.sqrt n + 1) * (k * (1 / (2 * Real.sqrt n)))) n := by\n have h1 : HasDerivAt (fun x => k * Real.sqrt x + 1) (k * (1 / (2 * Real.sqrt n))) n := by\n have h2 := hsqrt.const_mul k\n rwa [deriv_add_const] -- hmm, h2 : HasDerivAt (fun x => k * Real.sqrt x) (k * (1/(2√n))) n; need +1\n ...\n```\n\nHmm — HasDerivAt (fun x => k·√x + 1) (k·(1/(2√n))): HasDerivAt.add_const: (hf : HasDerivAt f f' x) : HasDerivAt (fun x => f x + c) f' x ✓ so `(hsqrt.const_mul k).add_const 1` — wait the function form: hsqrt.const_mul k : HasDerivAt (fun x => k * Real.sqrt x) (k * (1/(2√n))) n — then .add_const 1 gives HasDerivAt (fun x => k·√x + 1) (same deriv) ✓.\n\nCareful with the h1 inside hg1: deriv (fun x => k·√x + 1) m = k·(1/(2√m)): `rw [deriv_add_const, deriv_const_mul k hsm.differentiableAt, hsm.deriv]` — deriv_add_const : deriv (fun x => f x + c) x = deriv f x ✓; deriv_const_mul k (hd : DifferentiableAt ℝ f x) : deriv (fun x => k * f x) x = k * deriv f x ✓; hsm.deriv : deriv Real.sqrt m = 1/(2√m) ✓.\n\nhA: HasDerivAt (fun n => deriv φ (k√n+1)) (φ″(T)·k·(1/(2√n))): via (hφ2.hasDerivAt).comp n h1 where h1 : HasDerivAt (fun x => k√x+1) (k/(2√n)) n. Then the comp gives φ″(T)·(k/(2√n)) — the mul form deriv (deriv φ) (k√n+1) * (k*(1/(2√n))) ✓ (comp's HasDerivAt mul writes f' * g' order — HasDerivAt.comp: derivative is (f' ∘ g) * g'? For real composition: HasDerivAt (f ∘ g) (f' * g') — f' first. So φ″(T)·(k·(1/(2√n))) ✓ matches.\n\nhB: HasDerivAt (fun n => k * (2√n)⁻¹) (k * (−(2*(1/(2√n)))/(2√n)²)) n := (hBold).const_mul k where hBold is the old hB — inline: \n```\n have hB : HasDerivAt (fun n => k * (2 * Real.sqrt n)⁻¹)\n (k * (-(2 * (1 / (2 * Real.sqrt n))) / (2 * Real.sqrt n) ^ 2)) n := by\n have h1 : HasDerivAt (fun n => 2 * Real.sqrt n) (2 * (1 / (2 * Real.sqrt n))) n :=\n hsqrt.const_mul 2\n have h2 : (2 * Real.sqrt n) ≠ 0 := mul_ne_zero two_ne_zero (Real.sqrt_ne_zero'.2 hn)\n exact (h1.inv h2).const_mul k\n```\nhmul := hA.mul hB. hder := (hmul.congr_of_eventuallyEq hg1).deriv — wait: hmul : HasDerivAt (fun n => φ′(T n)·(k(2√n)⁻¹)) (…) n; hg1 : deriv (fun n => φ(T n)) =ᶠ φ′(T n)·(k(2√n)⁻¹) — congr_of_eventuallyEq: (h : f =ᶠ[𝓝 x] g) (hf : HasDerivAt f f' x) : HasDerivAt g f' x — so need hmul.congr_of_eventuallyEq hg1 with hmul first arg matching the LHS of hg1's function ✓ (hg1 : deriv G =ᶠ H where G = fun n => φ(k√n+1), H = the product; hmul is about H ✓ — then hmul.congr_of_eventuallyEq hg1 : HasDerivAt (fun n => deriv G n) (...) n ✓; .deriv gives deriv (deriv G) n = (...) ✓).\n\nThen the algebra:\n```\n rw [hder]\n set s := Real.sqrt n with hsdef\n have hs0 : s ≠ 0 := Real.sqrt_ne_zero'.2 hn\n have hk0 : k ≠ 0 := hk.ne'\n have hn_eq : n = s ^ 2 := by rw [hsdef]; exact (Real.sq_sqrt hn.le).symm\n rw [hn_eq]\n field_simp [hs0, hk0]\n ring\n```\nThe goal after rw [hder, hn_eq]: φ″(k s+1)·(k·(1/(2s)))·(k·(2s)⁻¹) + φ′(k s+1)·(k·(−2(1/(2s))/(2s)²)) = k²·(φ″(k s+1) − φ′(k s+1)/(k s))/(4·s²). field_simp + ring should close (the old proof ended the same way; with k it's messier but field_simp [hs0, hk0] clears denominators, ring checks the polynomial identity ✓ hopefully).\n\nOne concern: `set s` then `rw [hn_eq]` — same as old. OK.\n\n**Order of file edits (LiSkeleton):**\n\nE1. iimaj_bracket_bound: `_ < 2 := by norm_num` → `_ < 4 / 3 := by norm_num` (line 1678) + doc comment tweak (1.316 < 4/3).\nE2. IIMaj_deriv2_lt → IIMaj_deriv2_lt_three: statement `deriv (deriv IIMaj) n < 1 / (3 * n)`, proof: e : 1/(3n) = (4/3)/(4n): `have e : (1 : ℝ)/(3*n) = (4/3)/(4*n) := by field_simp [hn0.ne']; ring` — check: (4/3)/(4n) = 4/(12n) = 1/(3n) ✓. Then `exact div_lt_div_of_pos_right hb h4n` with hb : bracket < 4/3 ✓. Rename or keep name? The name IIMaj_deriv2_lt is used once (2388). I'll rename to IIMaj_deriv2_lt_three (clearer) and update the consumer. Also update the doc comment.\nE3. Insert k-shift infra (contDiffOn_ksqrt_shift, mapsTo×3, psiOf_sqrt_krel) after line 1745 (after mapsTo_sqrt_shift_Ici_Ioi1), and chain_rule_sqrt_kshift_on after chain_rule_sqrt_shift_on (line 2026).\nE4. marginTilde def: new form + doc comment.\nE5. Blocks + mK: new forms.\nE6. marginTilde_eq_expanded: same proof (simp only list + ring) — should still work (definitions changed consistently). ✓ no text change needed unless ring fails.\nE7. contDiffOn_mFblock/mTL1b/.../mL2b: replace contDiffOn_sqrt_shift/mapsTo_sqrt_shift with the k-versions: each proof is one line: `contDiffOn_const.mul (contDiffOn_TL1.comp (contDiffOn_ksqrt_shift 1.5 (by norm_num)) (mapsTo_ksqrt_shift 1.5 (by norm_num)))` etc.\n - contDiffOn_mIdb: `contDiffOn_const.mul (contDiffOn_ksqrt_shift 1.5 ...)`\n - contDiffOn_mFblock: `contDiffOn_const.mul (hF.comp (contDiffOn_ksqrt_shift 1.5 ...) (mapsTo_ksqrt_shift_Ioi1 1.5 ...))`\nE8. continuousOn_marginExpanded: hT : ContinuousOn (fun m => 1.5·√m+1) := (hsqrt.const_mul 1.5).add continuousOn_const; hmaps : MapsTo (fun m => 1.5√m+1) (Ici 20) (Ioi (−1)) — need an Ici version to (−1)! The old used mapsTo into Ioi (−1) — the old line 1906: `Set.MapsTo (fun m => Real.sqrt m + 1) (Set.Ici 20) (Set.Ioi (-1))` — inline proved. New: inline prove the 1.5 version. And the F composition used mapsTo_sqrt_shift_Ici_Ioi1 (line 1927) → mapsTo_ksqrt_shift_Ici_Ioi1 1.5.\n Let me re-read 1901–1938 fully to patch precisely (I only saw 1901–1914 + 1927 fragment + 1940–1947).\nE9. marginTilde_convex: the big one — hTn, composition bundles, v-blocks, hnn*, vIIM, final linarith.\nE10. Bn def + doc; SfBoundProp endpoint + doc; lambda_pos_finite_height endpoint + doc.\nE11. LiBasePoints: rebuild §4 (Bn evaluations), patch §5 margins + verified endpoint.\n\nAlso the header comments of the files mentioning the old constants — update where they make claims (LiSkeleton's file header mentions? The §3 header at 732 \"The margin and its convexity (D-057)\" — fine; the doc comments on marginTilde/Bn — update).\n\nLet me also double-check the mK value: mK = −40·1.3352 − 2·(Real.exp (16/9) + 1)·(7·(3·2.9^2 + 48) + 5.94) − 1 + 1. In the old: −40*1.3352 - 2*(Real.exp 4 + 1)*(7*(3*2.9^2 + 48) + 3.3) - 1 + 1. ✓ pattern.\n\nAnd marginExpanded's mIIM: (−1.5) * IIMaj m — the def was `fun m => (-1) * IIMaj m` → `fun m => (-1.5) * IIMaj m`.\n\nAnd vIIM: `deriv (deriv mIIM) n = (-1.5) * deriv (deriv IIMaj) n := by unfold mIIM; rw [deriv2_const_mul (-1.5) (hdd hCDIIM) (hev hCDIIM)]`.\n\nAnd the final linarith: goal `0 ≤ 1/(2n) + [9 nonneg terms] + (−1.5)·IIMaj″` — with hIIM3 : IIMaj″ < 1/(3n): linarith should close: it needs 1/(2n) − 1.5·IIMaj″ > 0: 1.5·IIMaj″ < 1.5·(1/(3n)) = 1/(2n) — linarith handles 1.5·x vs 1/(3n) with hn4 : 0 < 4n in scope? The forms: hIIM3 : deriv (deriv IIMaj) n < 1/(3*n). The goal contains 1/(2*n) and (−1.5)·deriv(deriv IIMaj) n. linarith: needs 1/(2n) + (−1.5)·d ≥ 0 given d < 1/(3n): multiply hIIM3 by 1.5: 1.5d < 1.5/(3n) = 1/(2n) ✓ linarith can do this with rational coefficients ✓ (1/(2n) appears as an atom; 1.5/(3n) = 1/(2n) requires field simplification — linarith treats 1/(2*n) and 1/(3*n) as ATOMS (reciprocals) — can it see 1.5·(1/(3n)) = 1/(2n)? NO — linarith can't equate distinct rational expressions of reciprocal atoms! (Banked gotcha from session 032: \"linarith can't relate distinct reciprocal atoms\".) So I need to bridge: have hbridge : (1.5 : ℝ) * (1/(3*n)) = 1/(2*n) := by field_simp [hn0.ne']; then linarith [hIIM3, hbridge, ...]. ✓ Add that.\n\nAlso the vF form: (−4)·(1.5^2·(psiOf F T/(4n))) — hmm wait, deriv2_const_mul (−4) gives (−4)·[composition's deriv deriv] = (−4)·(1.5²·(ψ-ish)/(4n)). The chain rule outputs (1.5^2)·(deriv(deriv φ)T − deriv φ T/(1.5√n))/(4n) — then ← psiOf_sqrt_krel rewrites the parenthesis to psiOf. Note the chain-rule statement has the form `k^2 * (A - B/(k*√n)) / (4*n)` — parses as ((k^2)·(A − B/(k√n)))/(4n). The psiOf_sqrt_krel rewrite: `← psiOf_sqrt_krel` rewrites `deriv (deriv φ) (1.5√n+1) − deriv φ (1.5√n+1)/(1.5√n)` → `psiOf φ (1.5√n+1)` ✓ (the krel LHS is psiOf ... = RHS, so ← direction rewrites RHS→LHS ✓).\n\nThe vF statement: `deriv (deriv (mFblock F)) n = (-4) * (1.5^2 * (psiOf F (1.5*Real.sqrt n + 1) / (4 * n)))` — hmm, associativity: 1.5^2·(X)/(4n) from the chain rule is (1.5^2·X)/(4n) — I'll state vF's value as (−4)·((1.5^2·psiOf F T)/(4n)) and handle the form in the hnn lemmas. Actually — cleaner to normalize the v-block values to `(−w) * (1.5^2 * psiOf φ T / (4 * n))` — the chain rule gives `1.5^2 * (psiOf ...) / (4*n)` which is defeq to `1.5^2 * psiOf ... / (4*n)`... The rw produces the chain-rule's exact RHS form; I'll state the v-goals in exactly that form with ← psiOf_sqrt_krel applied. Then hnn: 0 ≤ (−w)·(1.5^2·psiOf φ T/(4n)): prove: hψT : psiOf φ T < 0; h1 : 1.5^2·psiOf φ T/(4n) < 0 := mul_neg_of_pos_of_neg (by norm_num) (div_neg_of_neg_of_pos hψT hn4); exact mul_nonneg_of_nonpos_of_nonpos (by norm_num/nlinarith for −w ≤ 0) h1.le. ✓ (the −w coefficients with e^{16/9} inside: (−(42·0.433^2·(Real.exp (16/9) + 1))) ≤ 0 via Real.exp_pos — the old proofs did nlinarith [Real.exp_pos 4]; now Real.exp_pos (16/9) ✓.)\n\nOK — one more piece: hTn in the convexity: `Real.sqrt 20 + 1 ≤ Real.sqrt n + 1` becomes `Real.sqrt 20 + 1 ≤ 1.5 * Real.sqrt n + 1`: proof: have h := Real.sqrt_le_sqrt (show (20:ℝ) ≤ n); then 1.5·√n ≥ √n ≥ √20 (since 1.5·√n ≥ 1·√n — need √n ≥ 0): linarith [Real.sqrt_nonneg n, h]. ✓ — used for the ψ-neg lemmas (need T ≥ √20+1) and hψ.\n\nAlso `psiOf_id` needs 1 < T: 1 < 1.5√n+1 ✓ trivially.\n\nAlright — also `hCDIIM` uses IIMaj (unchanged) ✓; contDiffOn_mIIM unchanged (mIIM = const·IIMaj — the contDiffOn_mIIM proof: `unfold mIIM; rw [hId]; exact contDiffOn_const.mul hcomp` — the hId : IIMaj = fun m => psiTilde (√m) — unchanged ✓; mIIM's new constant (−1.5) — the unfold + contDiffOn_const.mul works for any constant ✓ no change needed... wait the old proof: `unfold mIIM; rw [hId]; exact contDiffOn_const.mul hcomp` — contDiffOn_const.mul hcomp : ContDiffOn (fun m => C·(psiTilde∘√) m)?? — the form: contDiffOn_const.mul : ContDiffOn ℝ n (fun x => c) s → ContDiffOn ℝ n f s → ContDiffOn ℝ n (fun x => c * f x) s — mIIM = fun m => (−1.5)·IIMaj m — after rw [hId], goal is ContDiffOn (fun m => (−1.5)·psiTilde(√m)) — contDiffOn_const.mul hcomp has type ContDiffOn (fun x => c·(psiTilde∘√) x)... the ∘ form vs application — the old proof worked; same shape with −1.5 instead of −1 — should work identically (the constant is inferred). ✓ Probably no change needed in contDiffOn_mIIM's proof body (unfold mIIM exposes the new constant; the proof is constant-agnostic). Hmm — `contDiffOn_const.mul hcomp` — contDiffOn_const : ContDiffOn ℝ n (fun _ => c) s — the c is inferred from the goal ✓. Fine.\n\nSimilarly continuousOn_marginExpanded's IIMaj part — let me look at the full proof (1901–1938) before editing.\n\nAlso deriv2_const_val for mK: mK is a different constant now but still constant ✓.\n\nLet me now read 1899–1940 to have continuousOn_marginExpanded exact text.","signature":""},{"type":"text","text":"Now reading `continuousOn_marginExpanded` in full to plan its k-shift adaptation."},{"type":"tool_use","id":"Read_78","name":"Read","input":{"file_path":"D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\NguyenRH1\\LiSkeleton.lean","offset":1899,"limit":42},"extra_content":null}]