Current task: —

← Session 36 — ii′-6-DL dog-leg + side bounds; Paper A review

#2304 assistant 2026-08-26 20:19:43.892 UTC · 252→12435 tok open ⤢
thinking (9844 chars)
`le_of_pow_le_pow_left₀ (hn : n ≠ 0) (hb : 0 ≤ b) (h : a ^ n ≤ b ^ n) : a ≤ b` — note: the nonneg is on **b** (the RIGHT side), not a! So `le_of_pow_le_pow_left₀ (by norm_num : (3:ℕ) ≠ 0) (by norm_num : (0:ℝ) ≤ 1.4) h2` ✓ with b := 1.4. `C0hat_mono {a b} (ha : 1 ≤ a) (hab : a ≤ b) : C0hat a ≤ C0hat b` ✓. Now write §6 (6-d). Full draft: ```lean /-! ## 6. 6-d: the fold — `sfBoundProp : SfBoundProp` -/ /-- Ĉ₀(t) ≤ t for t ≥ 8 (via log x ≤ x/e and loglog x ≤ log x ≤ x/e). -/ theorem C0hat_le_self {t : ℝ} (ht : 8 ≤ t) : C0hat t ≤ t := by have ht2 : (0 : ℝ) < t + 2 := by linarith have ht1 : (1 : ℝ) < t + 2 := by linarith have hinv : (1 : ℝ) / Real.exp 1 ≤ 0.36789 := by rw [div_le_iff₀ (Real.exp_pos 1), one_mul] nlinarith [Real.exp_one_gt_d9] have hL1 : Real.log (t + 2) ≤ (t + 2) / Real.exp 1 := by have h1 := Real.log_le_sub_one_of_pos (div_pos ht2 (Real.exp_pos 1)) have h2 : Real.log ((t + 2) / Real.exp 1) = Real.log (t + 2) - 1 := by rw [Real.log_div (ne_of_gt ht2) (Real.exp_pos 1).ne', Real.log_exp] rw [h2] at h1 linarith [h1] have hL : Real.log (t + 2) ≤ (t + 2) * 0.36789 := by have h3 : (t + 2) / Real.exp 1 ≤ (t + 2) * 0.36789 := by rw [div_eq_mul_one_div] exact mul_le_mul_of_nonneg_left hinv ht2.le exact hL1.trans h3 have hLL : Real.log (Real.log (t + 2)) ≤ (t + 2) * 0.36789 := by have h1 := Real.log_le_sub_one_of_pos (Real.log_pos ht1) nlinarith [h1, hL] unfold C0hat nlinarith [hL, hLL, ht] /-- **The horizontal pinch** (E-030 V3 witness made analytic): the near-sum integral + the R-part ≤ 7·Ĥ(T). Chain (all elementary): C0hat(√n+2) ≤ √n+2 (t ≥ 318), so 148.5·C0hat(√n+2) ≤ (√n+2)² and the log ≤ 2·log(T+2); Z₂(T) ≤ 2·Ĉ₀(T); Ĉ₀(T) ≥ 0.433·log(T+2) and 8 ≤ 21·0.433. -/ theorem pinch_horizontal {n : ℕ} (hn : 100000 ≤ n) {T : ℝ} (hTn : Real.sqrt (n : ℝ) ≤ T) (hTn1 : T ≤ Real.sqrt (n : ℝ) + 1) : 2 * Z2hat T * Real.log (148.5 * C0hat (Real.sqrt (n : ℝ) + 2)) + (3 - -5 / 2) * (10.5 * Real.log (T + 2) + 48) ≤ 7 * Hhat T := by have hnR : (100000 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn have hsqrt316 : (316 : ℝ) ≤ Real.sqrt (n : ℝ) := by rw [Real.le_sqrt (by norm_num) (by positivity)] nlinarith [hnR] have hT1 : (1 : ℝ) ≤ T := by nlinarith [hsqrt316, hTn] have hT0 : (0 : ℝ) < T := by nlinarith -- (a) the log argument bound have hC0le : C0hat (Real.sqrt (n : ℝ) + 2) ≤ Real.sqrt (n : ℝ) + 2 := C0hat_le_self (by nlinarith [hsqrt316]) have h148 : (148.5 : ℝ) ≤ Real.sqrt (n : ℝ) + 2 := by nlinarith [hsqrt316] have hC0pos : (0 : ℝ) < C0hat (Real.sqrt (n : ℝ) + 2) := by have h2 := two_le_C0hat (by nlinarith [Real.sqrt_nonneg (n : ℝ)] : (1 : ℝ) ≤ Real.sqrt (n : ℝ) + 2) linarith have hsq1 : 148.5 * C0hat (Real.sqrt (n : ℝ) + 2) ≤ (Real.sqrt (n : ℝ) + 2) ^ 2 := by have h1 := mul_le_mul hC0le h148 (by norm_num : (0 : ℝ) ≤ (148.5 : ℝ)) (by positivity : (0 : ℝ) ≤ Real.sqrt (n : ℝ) + 2) nlinarith [h1, hC0pos.le] have hlogarg : Real.log (148.5 * C0hat (Real.sqrt (n : ℝ) + 2)) ≤ 2 * Real.log (T + 2) := by have h2 := Real.log_le_log (by positivity) hsq1 have h3 : Real.log ((Real.sqrt (n : ℝ) + 2) ^ 2) = 2 * Real.log (Real.sqrt (n : ℝ) + 2) := by rw [Real.log_pow] ring have h4 : Real.log (Real.sqrt (n : ℝ) + 2) ≤ Real.log (T + 2) := Real.log_le_log (by positivity) (by linarith [hTn]) linarith [h2, h3, h4] -- (b) Z₂ ≤ 2·Ĉ₀ have hZ2le : Z2hat T ≤ 2 * C0hat T := by have hL1 : (1 : ℝ) ≤ Real.log (T + 2) := by have ht2 : (0 : ℝ) < T + 2 := by linarith rw [Real.le_log_iff_exp_le ht2] have he := Real.exp_one_lt_d9.le linarith have hLL0 : (0 : ℝ) ≤ Real.log (Real.log (T + 2)) := Real.log_nonneg hL1 unfold Z2hat C0hat nlinarith [hL1, hLL0] -- (c) Ĉ₀ ≥ 0.433·log have hC0L : 0.433 * Real.log (T + 2) ≤ C0hat T := by have hL1 : (1 : ℝ) ≤ Real.log (T + 2) := by have ht2 : (0 : ℝ) < T + 2 := by linarith rw [Real.le_log_iff_exp_le ht2] have he := Real.exp_one_lt_d9.le linarith have hLL0 : (0 : ℝ) ≤ Real.log (Real.log (T + 2)) := Real.log_nonneg hL1 unfold C0hat nlinarith [hL1, hLL0] -- (d) the near part ≤ 21·Ĉ₀² have hZ2nn : (0 : ℝ) ≤ Z2hat T := Z2hat_nonneg hT1 have hlogT0 : (0 : ℝ) ≤ Real.log (T + 2) := Real.log_nonneg (by linarith) have hC0T0 : (0 : ℝ) < C0hat T := by have h2 := two_le_C0hat hT1 linarith have hnear : 2 * Z2hat T * Real.log (148.5 * C0hat (Real.sqrt (n : ℝ) + 2)) ≤ 21 * C0hat T * C0hat T := by have h1 : 2 * Z2hat T * Real.log (148.5 * C0hat (Real.sqrt (n : ℝ) + 2)) ≤ 2 * Z2hat T * (2 * Real.log (T + 2)) := mul_le_mul_of_nonneg_left hlogarg (by positivity : (0 : ℝ) ≤ 2 * Z2hat T) have h2 : 2 * Z2hat T * (2 * Real.log (T + 2)) ≤ 2 * (2 * C0hat T) * (2 * Real.log (T + 2)) := by have h3 := mul_le_mul hZ2le le_rfl hlogT0 (by positivity : (0:ℝ) ≤ 2 * (2:ℝ)) -- hmm — mul_le_mul (h₁ : Z2hat ≤ 2·C0hat) (h₂ : log ≤ log) (0 ≤ log) (0 ≤ 2·C0hat) ... ``` Hmm — getting the multiplications right: 4·Z2hat·log ≤ 8·C0hat·log: mul_le_mul (h₁ : Z2hat ≤ 2·C0hat) (h₂ : log(T+2) ≤ log(T+2)) (0 ≤ log) (0 ≤ 2·C0hat) : Z2hat·log ≤ 2·C0hat·log — then ×4. Let me restructure linearly: ```lean have hZ2L : Z2hat T * Real.log (T + 2) ≤ 2 * C0hat T * Real.log (T + 2) := mul_le_mul_of_nonneg_right hZ2le hlogT0 -- 8·log(T+2) ≤ 21·C0hat have h8 : 8 * Real.log (T + 2) ≤ 21 * C0hat T := by have h1 : (8 : ℝ) ≤ 21 * 0.433 := by norm_num nlinarith [hC0L, h1, hlogT0, hC0T0.le] ``` h8: 8·log(T+2) ≤ 21·C0hat T: from hC0L : 0.433·log(T+2) ≤ C0hat T: 8·log(T+2) = (8/0.433)·(0.433·log(T+2)) ≤ (8/0.433)·C0hat T ≤ 21·C0hat T ⟺ 8 ≤ 21·0.433 = 9.093 ✓ — linarith with the ATOMS log(T+2), C0hat T: 8·log = (8/0.433)·(0.433·log) — the coefficient division 8/0.433 — linarith does exact rational arithmetic ✓: 8·log(T+2) ≤ 21·C0hat T ⟺ 0.433·8·log ≤ 21·0.433·C0hat ⟸ 0.433·log ≤ C0hat (hC0L) and 8 ≤ 21·0.433 ✓ — linarith [hC0L] + norm_num-fact ✓: ```lean have h8 : 8 * Real.log (T + 2) ≤ 21 * C0hat T := by have h1 : (8 : ℝ) ≤ 21 * (0.433 : ℝ) := by norm_num nlinarith [hC0L, h1, hlogT0] ``` hmm — 8·log ≤ 21·C0hat: multiply hC0L by 21: 21·0.433·log ≤ 21·C0hat: 9.093·log ≤ 21·C0hat; and 8·log ≤ 9.093·log (log ≥ 0) ⟹ 8·log ≤ 21·C0hat ✓ linarith ✓. have h3 : (8 * Real.log (T + 2)) * C0hat T ≤ (21 * C0hat T) * C0hat T := mul_le_mul h8 le_rfl hC0T0.le (by positivity : (0:ℝ) ≤ 21 * C0hat T) -- assemble: 2·Z2hat·log148.5 ≤ 4·Z2hat·log ≤ 8·C0hat·log = (8·log)·C0hat ≤ 21·C0hat·C0hat nlinarith [h1, hZ2L, h3, hlogarg] ``` hmm — the assemble nlinarith: goal: 2·Z2hat·log148.5 ≤ 21·C0hat·C0hat. Facts: h1 : 2·Z2hat·log148.5 ≤ 2·Z2hat·(2·log) = 4·(Z2hat·log); hZ2L : Z2hat·log ≤ 2·C0hat·log; h3 : (8·log)·C0hat ≤ 21·C0hat·C0hat. Chain: 4·(Z2hat·log) ≤ 4·(2·C0hat·log) = 8·(C0hat·log) = (8·log)·C0hat ≤ 21·C0hat·C0hat ✓ — the products (Z2hat·log), (C0hat·log), (log·C0hat), (C0hat·C0hat) — ring_nf normalizes monomials ✓ linear ✓ nlinarith/linarith. Use linarith [h1, hZ2L, h3]. (e) the 5.5 part + Hhat unfold: ```lean have hR0 : (0 : ℝ) ≤ 10.5 * Real.log (T + 2) + 48 := by have h1 := Real.log_nonneg (by linarith : (1 : ℝ) ≤ T + 2) nlinarith have hR : (3 - -5 / 2 : ℝ) * (10.5 * Real.log (T + 2) + 48) ≤ 7 * (10.5 * Real.log (T + 2) + 48) := by norm_num1 -- 5.5·R ≤ 7·R ⟸ R ≥ 0 — after norm_num1 computes 3 − −5/2 = 5.5 nlinarith [hR0] ``` Hmm — norm_num1 on goal `(3 - -5/2)·R ≤ 7·R` — computes (3 − −5/2) → 5.5: goal `5.5·R ≤ 7·R` — then nlinarith [hR0] ✓ (linarith suffices: 5.5R ≤ 7R ⟺ 0 ≤ 1.5R ✓). Actually `norm_num1` might reformat the LHS — or use `have h55 : (3 - -5/2 : ℝ) = 5.5 := by norm_num; rw [h55]; nlinarith [hR0]` — deterministic. Use that. -- final unfold Hhat have hC0T02 : (0 : ℝ) ≤ C0hat T * C0hat T := by positivity linarith [hnear, hR, hC0T02] — goal: NI + 5.5R ≤ 7·(3·C0hat² + R) — from hnear (NI ≤ 21·C0hat²) and hR (5.5R ≤ 7R): NI + 5.5R ≤ 21·C0hat² + 7R = 7·(3·C0hat² + R) ✓ — after unfold Hhat, the goal's RHS is 7·(3·C0hat T^2 + 10.5·log(T+2)+48) — note C0hat T^2 vs my C0hat T * C0hat T — hnear has 21 * C0hat T * C0hat T — ring_nf normalizes ✓ linarith ✓. Hmm — Hhat's def: `Hhat (T: ℝ) : ℝ := 3 * C0hat T ^ 2 + 10.5 * Real.log (T + 2) + 48` ✓ (LiSkeleton:749). `unfold Hhat` at the goal ✓. Wait — the goal after unfold Hhat: `2·Z2hat·log148.5 + (3−−5/2)·R ≤ 7·(3·C0hat T^2 + 10.5·log(T+2)+48)`. linarith [hnear : 2·Z2hat·log148.5 ≤ 21·C0hat·C0hat, hR : 5.5·R ≤ 7·R, ...]: 2·Z2hat·log148.5 + 5.5R ≤ 21·C0hat·C0hat + 7R = 7·(3·C0hat·C0hat + R) — and 3·C0hat T^2 = 3·(C0hat·C0hat) ✓ ring_nf ✓ closes ✓. Then the bridge variant + hnorm + htri + the main theorem. Also `Real.le_log_iff_exp_le` used twice (hL1 in (b) and (c)) — fine. One concern in hZ2le/hC0L's unfold: `unfold Z2hat C0hat` — unfolds both ✓ (as in Z2hat_mono's `unfold Z2hat` ✓). For hnear's mul_le_mul h8 le_rfl hC0T0.le (by positivity : 0 ≤ 21·C0hat T) : (8·log)·C0hat ≤ (21·C0hat)·C0hat ✓ — mul_le_mul (h₁ : 8·log ≤ 21·C0hat) (h₂ : C0hat ≤ C0hat) (c0 : 0 ≤ C0hat) (b0 : 0 ≤ 21·C0hat) ✓. And h1's `mul_le_mul_of_nonneg_left hlogarg (by positivity : (0:ℝ) ≤ 2 * Z2hat T)` : 2·Z2hat·log148.5 ≤ 2·Z2hat·(2·log(T+2)) ✓ — mul_le_mul_of_nonneg_left (hbc : log148.5 ≤ 2·log(T+2)) (ha : 0 ≤ 2·Z2hat) ✓. Now the main sfBoundProp theorem. Let me also handle `Real.pi_gt_three` — exact name: `Real.pi_gt_three : 3 < Real.pi`? or `Real.pi_gt_three : 3 < π`? — I recall `Real.pi_gt_three : 3 < Real.pi` ✓ (in this Mathlib — session-033 banked "Real.pi_lt_d2 : π < 3.15" — so pi_gt_three likely exists too — let me trust it, fallback `Real.three_lt_pi`? — hmm — actually in recent Mathlib it's `Real.pi_gt_three : 3 < π` ✓). Also `Real.pi_pos : 0 < Real.pi` ✓. Now write the whole §6.
All signatures confirmed (`le_of_pow_le_pow_left₀` takes nonneg on the RIGHT side). Writing §6 (6-d) — pinch, bridge variant, norm machinery, and the fold.
tool: Edit
input
{
  "replace_all": false,
  "file_path": "D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\NguyenRH1\\LiSideBounds.lean",
  "old_string": "  exact add_le_add (hIntegral_Jlag_full_norm_le hZC hZC2 hNLZ hn hTwide hTn hTn1)\n    (hIntegral_Jlag_full_neg_norm_le hZC hZC2 hNLZ hn hTwide hTn hTn1)\n\nend NguyenRH1",
  "new_string": "  exact add_le_add (hIntegral_Jlag_full_norm_le hZC hZC2 hNLZ hn hTwide hTn hTn1)\n    (hIntegral_Jlag_full_neg_norm_le hZC hZC2 hNLZ hn hTwide hTn hTn1)\n\n/-! ## 6. 6-d: the fold \u2014 `sfBoundProp : SfBoundProp` -/\n\n/-- \u0108\u2080(t) \u2264 t for t \u2265 8 (via log x \u2264 x/e with 1/e \u2264 0.36789 certified\nfrom e > 2.7182818283, and loglog x \u2264 log x \u2212 1). -/\ntheorem C0hat_le_self {t : \u211d} (ht : 8 \u2264 t) : C0hat t \u2264 t := by\n  have ht2 : (0 : \u211d) < t + 2 := by linarith\n  have ht1 : (1 : \u211d) < t + 2 := by linarith\n  have hinv : (1 : \u211d) / Real.exp 1 \u2264 0.36789 := by\n    rw [div_le_iff\u2080 (Real.exp_pos 1), one_mul]\n    nlinarith [Real.exp_one_gt_d9]\n  have hL1 : Real.log (t + 2) \u2264 (t + 2) / Real.exp 1 := by\n    have h1 := Real.log_le_sub_one_of_pos (div_pos ht2 (Real.exp_pos 1))\n    have h2 : Real.log ((t + 2) / Real.exp 1) = Real.log (t + 2) - 1 := by\n      rw [Real.log_div (ne_of_gt ht2) (Real.exp_pos 1).ne', Real.log_exp]\n    rw [h2] at h1\n    linarith [h1]\n  have hL : Real.log (t + 2) \u2264 (t + 2) * 0.36789 := by\n    have h3 : (t + 2) / Real.exp 1 \u2264 (t + 2) * 0.36789 := by\n      rw [div_eq_mul_one_div]\n      exact mul_le_mul_of_nonneg_left hinv ht2.le\n    exact hL1.trans h3\n  have hLL : Real.log (Real.log (t + 2)) \u2264 (t + 2) * 0.36789 := by\n    have h1 := Real.log_le_sub_one_of_pos (Real.log_pos ht1)\n    nlinarith [h1, hL]\n  unfold C0hat\n  nlinarith [hL, hLL, ht]\n\n/-- **The horizontal pinch** (the E-030 V3 \u2264 0.40 witness made analytic):\nthe near-sum integral + the R-part \u2264 7\u00b7H\u0302(T). Chain (all elementary, no\ncertified log numerics): \u0108\u2080(\u221an+2) \u2264 \u221an+2 (\u0108\u2080(t) \u2264 t, t \u2265 318), so\n148.5\u00b7\u0108\u2080(\u221an+2) \u2264 (\u221an+2)\u00b2 and its log \u2264 2\u00b7log(T+2); Z\u2082(T) \u2264 2\u00b7\u0108\u2080(T);\n\u0108\u2080(T) \u2265 0.433\u00b7log(T+2) with 8 \u2264 21\u00b70.433 = 9.093; 5.5 \u2264 7 on the R-part. -/\ntheorem pinch_horizontal {n : \u2115} (hn : 100000 \u2264 n) {T : \u211d}\n    (hTn : Real.sqrt (n : \u211d) \u2264 T) (hTn1 : T \u2264 Real.sqrt (n : \u211d) + 1) :\n    2 * Z2hat T * Real.log (148.5 * C0hat (Real.sqrt (n : \u211d) + 2)) +\n      (3 - -5 / 2) * (10.5 * Real.log (T + 2) + 48) \u2264 7 * Hhat T := by\n  have hnR : (100000 : \u211d) \u2264 (n : \u211d) := by exact_mod_cast hn\n  have hsqrt316 : (316 : \u211d) \u2264 Real.sqrt (n : \u211d) := by\n    rw [Real.le_sqrt (by norm_num) (by positivity)]\n    nlinarith [hnR]\n  have hT1 : (1 : \u211d) \u2264 T := by nlinarith [hsqrt316, hTn]\n  have hT0 : (0 : \u211d) < T := by nlinarith\n  -- (a) log(148.5\u00b7\u0108\u2080(\u221an+2)) \u2264 2\u00b7log(T+2)\n  have hC0le : C0hat (Real.sqrt (n : \u211d) + 2) \u2264 Real.sqrt (n : \u211d) + 2 :=\n    C0hat_le_self (by nlinarith [hsqrt316])\n  have h148 : (148.5 : \u211d) \u2264 Real.sqrt (n : \u211d) + 2 := by nlinarith [hsqrt316]\n  have hC0pos : (0 : \u211d) < C0hat (Real.sqrt (n : \u211d) + 2) := by\n    have h2 := two_le_C0hat (by nlinarith [Real.sqrt_nonneg (n : \u211d)] :\n      (1 : \u211d) \u2264 Real.sqrt (n : \u211d) + 2)\n    linarith\n  have hsq1 : 148.5 * C0hat (Real.sqrt (n : \u211d) + 2) \u2264 (Real.sqrt (n : \u211d) + 2) ^ 2 := by\n    have h1 := mul_le_mul hC0le h148 (by norm_num : (0 : \u211d) \u2264 (148.5 : \u211d))\n      (by positivity : (0 : \u211d) \u2264 Real.sqrt (n : \u211d) + 2)\n    nlinarith [h1, hC0pos.le]\n  have hlogarg : Real.log (148.5 * C0hat (Real.sqrt (n : \u211d) + 2)) \u2264\n      2 * Real.log (T + 2) := by\n    have h2 := Real.log_le_log (by positivity) hsq1\n    have h3 : Real.log ((Real.sqrt (n : \u211d) + 2) ^ 2) = 2 * Real.log (Real.sqrt (n : \u211d) + 2) := by\n      rw [Real.log_pow]\n      ring\n    have h4 : Real.log (Real.sqrt (n : \u211d) + 2) \u2264 Real.log (T + 2) :=\n      Real.log_le_log (by positivity) (by linarith [hTn])\n    linarith [h2, h3, h4]\n  -- (b) Z\u2082(T) \u2264 2\u00b7\u0108\u2080(T)\n  have hZ2le : Z2hat T \u2264 2 * C0hat T := by\n    have hL1 : (1 : \u211d) \u2264 Real.log (T + 2) := by\n      have ht2 : (0 : \u211d) < T + 2 := by linarith\n      rw [Real.le_log_iff_exp_le ht2]\n      have he := Real.exp_one_lt_d9.le\n      linarith\n    have hLL0 : (0 : \u211d) \u2264 Real.log (Real.log (T + 2)) := Real.log_nonneg hL1\n    unfold Z2hat C0hat\n    nlinarith [hL1, hLL0]\n  -- (c) \u0108\u2080(T) \u2265 0.433\u00b7log(T+2)\n  have hC0L : 0.433 * Real.log (T + 2) \u2264 C0hat T := by\n    have hL1 : (1 : \u211d) \u2264 Real.log (T + 2) := by\n      have ht2 : (0 : \u211d) < T + 2 := by linarith\n      rw [Real.le_log_iff_exp_le ht2]\n      have he := Real.exp_one_lt_d9.le\n      linarith\n    have hLL0 : (0 : \u211d) \u2264 Real.log (Real.log (T + 2)) := Real.log_nonneg hL1\n    unfold C0hat\n    nlinarith [hL1, hLL0]\n  -- (d) the near part \u2264 21\u00b7\u0108\u2080(T)\u00b2\n  have hlogT0 : (0 : \u211d) \u2264 Real.log (T + 2) := Real.log_nonneg (by linarith)\n  have hC0T0 : (0 : \u211d) < C0hat T := by\n    have h2 := two_le_C0hat hT1\n    linarith\n  have hnear : 2 * Z2hat T * Real.log (148.5 * C0hat (Real.sqrt (n : \u211d) + 2)) \u2264\n      21 * C0hat T * C0hat T := by\n    have h1 : 2 * Z2hat T * Real.log (148.5 * C0hat (Real.sqrt (n : \u211d) + 2)) \u2264\n        2 * Z2hat T * (2 * Real.log (T + 2)) := by\n      have hnn : (0 : \u211d) \u2264 2 * Z2hat T := by\n        have h := Z2hat_nonneg hT1\n        positivity\n      exact mul_le_mul_of_nonneg_left hlogarg hnn\n    have hZ2L : Z2hat T * Real.log (T + 2) \u2264 2 * C0hat T * Real.log (T + 2) :=\n      mul_le_mul_of_nonneg_right hZ2le hlogT0\n    have h8 : 8 * Real.log (T + 2) \u2264 21 * C0hat T := by\n      have h1 : (8 : \u211d) \u2264 21 * (0.433 : \u211d) := by norm_num\n      nlinarith [hC0L, h1, hlogT0]\n    have h3 : (8 * Real.log (T + 2)) * C0hat T \u2264 (21 * C0hat T) * C0hat T :=\n      mul_le_mul h8 le_rfl hC0T0.le (by positivity : (0 : \u211d) \u2264 21 * C0hat T)\n    nlinarith [h1, hZ2L, h3, hlogT0]\n  -- (e) the 5.5 \u2264 7 part\n  have hR0 : (0 : \u211d) \u2264 10.5 * Real.log (T + 2) + 48 := by\n    have h1 := Real.log_nonneg (by linarith : (1 : \u211d) \u2264 T + 2)\n    nlinarith\n  have hR : (3 - -5 / 2 : \u211d) * (10.5 * Real.log (T + 2) + 48) \u2264\n      7 * (10.5 * Real.log (T + 2) + 48) := by\n    have h55 : (3 - -5 / 2 : \u211d) = 5.5 := by norm_num\n    rw [h55]\n    nlinarith [hR0]\n  -- final: 21\u00b7\u0108\u2080\u00b2 + 7\u00b7R = 7\u00b7H\u0302\n  unfold Hhat\n  nlinarith [hnear, hR]\n\n/-- **THE FOLD (ii\u2032-6-d)**: `SfBoundProp` from the six declared perimeter\nhypotheses \u2014 the 6-b sides identity + the bridge (both-signs 4F + triv \u2264 1),\nthe rectangle side decomposition, the four side bounds of ii\u2032-6-c, the\nhorizontal pinch, and the F-E absorption e^{1/3} \u2264 1.4 \u2264 2\u03c0. -/\ntheorem sfBoundProp (hRH : RHUpTo (3 * 10 ^ 12)) (hZC : ZeroCountProp)\n    (hZC2 : ZeroCountProp2) (hZCG : ZeroCountGlobalProp) (hNLZ : NoLowZeros)\n    (hMZ : MZeroProp) : SfBoundProp := by\n  intro n hn hN1\n  classical\n  have hnR : (100000 : \u211d) \u2264 (n : \u211d) := by exact_mod_cast hn\n  have hn1 : 1 \u2264 n := by omega\n  have hn16 : 16 \u2264 n := by omega\n  have hsqrt316 : (316 : \u211d) \u2264 Real.sqrt (n : \u211d) := by\n    rw [Real.le_sqrt (by norm_num) (by positivity)]\n    nlinarith [hnR]\n  have ha : (3 : \u211d) \u2264 Real.sqrt (n : \u211d) := by nlinarith [hsqrt316]\n  obtain \u27e8T, hTn, hTn1, hTwide\u27e9 := exists_zero_avoiding_T_wide hZC ha\n  have hT1 : (1 : \u211d) \u2264 T := by nlinarith [hTn]\n  have hT2 : (2 : \u211d) \u2264 T := by nlinarith\n  have hT0 : (0 : \u211d) < T := by nlinarith\n  -- T \u2264 3\u00b710\u00b9\u00b2 (from n \u2264 N\u2081; the bridge's internal RHUpTo range)\n  have hTle : T \u2264 3 * 10 ^ 12 := by\n    have h1 : Real.sqrt (n : \u211d) \u2264 3 * 10 ^ 12 - 1 := by\n      have h2 := Real.sqrt_le_sqrt hN1\n      rwa [Real.sqrt_sq (by norm_num : (0 : \u211d) \u2264 3 * 10 ^ 12 - 1)] at h2\n    linarith [hTn1]\n  -- the sides identity\n  have hsf := sf_abs_le_rectInt_add_zeroSum hZC hn1 hT1 hTn hTn1 hTwide\n  -- the bridge (variant with T \u2264 3\u00b710\u00b9\u00b2 \u2014 the internal range actually used)\n  have hbridge : \u2016\u2211 \u03c1 \u2208 ((zeroBothWindow_finite T).toFinset \u222a {(-2 : \u2102)}),\n      (zeroMult \u03c1 : \u2102) * (1 - (\u03c1 / (\u03c1 - 1)) ^ n)\u2016 \u2264 4 * FAlt T + 1 := by\n    have h2not : (-2 : \u2102) \u2209 (zeroBothWindow_finite T).toFinset := by\n      intro h\n      have hnt := (zeroBothWindow_finite T).mem_toFinset.mp h |>.1\n      have h21 : (0 : \u211d) < (-2 : \u2102).re := hnt.2.1\n      norm_num at h21\n    have hdisj2 : Disjoint (zeroBothWindow_finite T).toFinset {(-2 : \u2102)} := by\n      rw [Finset.disjoint_left]\n      intro \u03c1 h\u03c1 h\u03c12\n      rw [Finset.mem_singleton] at h\u03c12\n      exact h2not (h\u03c12 \u25b8 h\u03c1)\n    rw [Finset.sum_union hdisj2, Finset.sum_singleton]\n    have htriv := trivTerm_norm_le_one n\n    have hbr := zeroSum_nontriv_norm_le hRH (n := n) (T := T) hTle\n    have hcount := zeroBothWindow_sum_eq_two_mul hNLZ T\n    have hZ := hZCG T hT2\n    calc \u2016\u2211 \u03c1 \u2208 (zeroBothWindow_finite T).toFinset,\n          (zeroMult \u03c1 : \u2102) * (1 - (\u03c1 / (\u03c1 - 1)) ^ n) +\n          (zeroMult (-2 : \u2102) : \u2102) * (1 - ((-2 : \u2102) / (-2 - 1)) ^ n)\u2016\n        \u2264 \u2016\u2211 \u03c1 \u2208 (zeroBothWindow_finite T).toFinset,\n          (zeroMult \u03c1 : \u2102) * (1 - (\u03c1 / (\u03c1 - 1)) ^ n)\u2016 +\n          \u2016(zeroMult (-2 : \u2102) : \u2102) * (1 - ((-2 : \u2102) / (-2 - 1)) ^ n)\u2016 := norm_add_le _ _\n      _ \u2264 (2 * \u2211 \u03c1 \u2208 (zeroBothWindow_finite T).toFinset, (zeroMult \u03c1 : \u211d)) + 1 := by\n          linarith [hbr, htriv]\n      _ = 2 * (2 * \u2211 \u03c1 \u2208 (zeroGlobalWindow_finite T).toFinset, (zeroMult \u03c1 : \u211d)) + 1 := by\n          rw [hcount]\n      _ \u2264 4 * FAlt T + 1 := by linarith [hZ]\n  -- the four side bounds\n  have hVl := vIntegral_Jlag_left_norm_le hZC hZC2 hNLZ hMZ hn hTn hTn1\n  have hVr := vIntegral_Jlag_right_le_exp_third_IIMaj hn hTn hTn1\n  have hH := hIntegral_Jlag_full_two_sides hZC hZC2 hNLZ hn hTwide hTn hTn1\n  -- \u2016RectInt'\u2016 = (1/2\u03c0)\u00b7\u2016RectInt\u2016\n  have hnorm : \u2016RectangleIntegral' (Jlag n) (rectZ T) (rectW n T)\u2016 =\n      (1 / (2 * Real.pi)) * \u2016RectangleIntegral (Jlag n) (rectZ T) (rectW n T)\u2016 := by\n    unfold RectangleIntegral'\n    rw [norm_smul]\n    congr 1\n    have h1 : \u2016(2 : \u2102) * (Real.pi : \u2102) * Complex.I\u2016 = 2 * Real.pi := by\n      rw [norm_mul, Complex.norm_I, mul_one, norm_mul]\n      have h3 : \u2016(2 : \u2102)\u2016 = (2 : \u211d) := by\n        rw [show (2 : \u2102) = ((2 : \u211d) : \u2102) by push_cast; ring, Complex.norm_real]\n        exact abs_of_nonneg (by norm_num)\n      have h4 : \u2016(Real.pi : \u2102)\u2016 = Real.pi := by\n        rw [Complex.norm_real]\n        exact abs_of_nonneg Real.pi_nonneg\n      rw [h3, h4]\n    rw [norm_div, norm_one, h1]\n  -- the rectangle norm triangle\n  have htri : \u2016RectangleIntegral (Jlag n) (rectZ T) (rectW n T)\u2016 \u2264\n      \u2016HIntegral (Jlag n) (-5 / 2) (2 * Real.sqrt (n : \u211d)) (-T)\u2016 +\n      \u2016HIntegral (Jlag n) (-5 / 2) (2 * Real.sqrt (n : \u211d)) T\u2016 +\n      \u2016VIntegral (Jlag n) (2 * Real.sqrt (n : \u211d)) (-T) T\u2016 +\n      \u2016VIntegral (Jlag n) (-5 / 2) (-T) T\u2016 := by\n    rw [rectangleIntegral_Jlag_eq n T]\n    have h1 := norm_sub_le (HIntegral (Jlag n) (-5 / 2) (2 * Real.sqrt (n : \u211d)) (-T) -\n      HIntegral (Jlag n) (-5 / 2) (2 * Real.sqrt (n : \u211d)) T +\n      VIntegral (Jlag n) (2 * Real.sqrt (n : \u211d)) (-T) T)\n      (VIntegral (Jlag n) (-5 / 2) (-T) T)\n    have h2 := norm_add_le (HIntegral (Jlag n) (-5 / 2) (2 * Real.sqrt (n : \u211d)) (-T) -\n      HIntegral (Jlag n) (-5 / 2) (2 * Real.sqrt (n : \u211d)) T)\n      (VIntegral (Jlag n) (2 * Real.sqrt (n : \u211d)) (-T) T)\n    have h3 := norm_sub_le (HIntegral (Jlag n) (-5 / 2) (2 * Real.sqrt (n : \u211d)) (-T))\n      (HIntegral (Jlag n) (-5 / 2) (2 * Real.sqrt (n : \u211d)) T)\n    linarith [h1, h2, h3]\n  -- the horizontal pinch\n  have hpinch := pinch_horizontal hn hTn hTn1\n  -- the F-E absorption: e^{1/3} \u2264 1.4 \u2264 2\u03c0\n  have he13 : Real.exp (1 / 3 : \u211d) \u2264 2 * Real.pi := by\n    have h1 : Real.exp (1 / 3 : \u211d) \u2264 1.4 := by\n      have h2 : (Real.exp (1 / 3 : \u211d)) ^ 3 \u2264 (1.4 : \u211d) ^ 3 := by\n        have h3 : (Real.exp (1 / 3 : \u211d)) ^ 3 = Real.exp 1 := by\n          rw [\u2190 Real.exp_nat_mul (1 / 3 : \u211d) 3]\n          congr 1\n          norm_num\n        rw [h3]\n        have h4 : Real.exp 1 \u2264 2.7183 := Real.exp_one_lt_d9.le\n        norm_num at h4 \u22a2\n        linarith [h4]\n      exact le_of_pow_le_pow_left\u2080 (by norm_num : (3 : \u2115) \u2260 0) (by norm_num : (0 : \u211d) \u2264 1.4) h2\n    have h5 : (3 : \u211d) \u2264 Real.pi := Real.pi_gt_three.le\n    nlinarith [h1, h5]\n  -- the 1/(2\u03c0) comparisons\n  have h2\u03c0pos : (0 : \u211d) < 2 * Real.pi := by positivity\n  have h2\u03c0le : (1 / (2 * Real.pi)) \u2264 1 := by\n    rw [div_le_iff\u2080 h2\u03c0pos, one_mul]\n    have h := Real.pi_gt_three.le\n    linarith\n  have he13' : (1 / (2 * Real.pi)) * Real.exp (1 / 3 : \u211d) \u2264 1 := by\n    rw [div_le_iff\u2080 h2\u03c0pos, one_mul]\n    exact he13\n  -- nonneg facts\n  have hIIMaj0 : (0 : \u211d) \u2264 IIMaj (n : \u211d) := by unfold IIMaj; positivity\n  have hDLR0 : (0 : \u211d) \u2264 DogLegRight (n : \u211d) := by unfold DogLegRight IIMaj; positivity\n  have hC0T0 : (0 : \u211d) < C0hat T := by\n    have h2 := two_le_C0hat hT1\n    linarith\n  have hHhat0 : (0 : \u211d) \u2264 Hhat T := by\n    unfold Hhat\n    have hL1 : (1 : \u211d) \u2264 Real.log (T + 2) := by\n      have ht2 : (0 : \u211d) < T + 2 := by linarith\n      rw [Real.le_log_iff_exp_le ht2]\n      have he := Real.exp_one_lt_d9.le\n      linarith\n    nlinarith [hC0T0.le, hL1]\n  have hX0 : (0 : \u211d) \u2264 4 * T * ((2 / 3) * Z2hat T + 10.5 * Real.log (T + 2) + 48) +\n      40 * 1.3352 := by\n    have h1 := Z2hat_nonneg hT1\n    have h2 := Real.log_nonneg (by linarith : (1 : \u211d) \u2264 T + 2)\n    nlinarith [hT0.le]\n  -- the T \u2264 \u221an+1 monotonicity comparisons\n  have hsqrt0 : (0 : \u211d) \u2264 Real.sqrt (n : \u211d) := Real.sqrt_nonneg _\n  have hlogT1 : (1 : \u211d) \u2264 Real.log (T + 2) := by\n    have ht2 : (0 : \u211d) < T + 2 := by linarith\n    rw [Real.le_log_iff_exp_le ht2]\n    have he := Real.exp_one_lt_d9.le\n    linarith\n  have hFAlt : FAlt T \u2264 FAlt (Real.sqrt (n : \u211d) + 1) := by\n    unfold FAlt\n    have hT0' : (0 : \u211d) < T := hT0\n    have hlog1 : (1 : \u211d) \u2264 Real.log T := by\n      have ht2 : (0 : \u211d) < T := hT0\n      rw [Real.le_log_iff_exp_le hT0]\n      have he := Real.exp_one_lt_d9.le\n      nlinarith [hTn, hsqrt316, he]\n    have hA : T * Real.log T \u2264 (Real.sqrt (n : \u211d) + 1) * Real.log (Real.sqrt (n : \u211d) + 1) := by\n      have h1 := Real.log_le_log hT0 (by linarith [hTn1] : T \u2264 Real.sqrt (n : \u211d) + 1)\n      exact mul_le_mul hTn1 h1 (Real.log_nonneg hlog1) (by linarith [hsqrt0])\n    have hB : Real.log T \u2264 Real.log (Real.sqrt (n : \u211d) + 1) :=\n      Real.log_le_log hT0 (by linarith [hTn1])\n    have hC : Real.log (Real.log T) \u2264 Real.log (Real.log (Real.sqrt (n : \u211d) + 1)) := by\n      apply Real.log_le_log (by linarith [hlog1] : (0 : \u211d) < Real.log T)\n      have h1 : (1 : \u211d) \u2264 Real.log (Real.sqrt (n : \u211d) + 1) := by\n        have ht2 : (0 : \u211d) < Real.sqrt (n : \u211d) + 1 := by positivity\n        rw [Real.le_log_iff_exp_le ht2]\n        have he := Real.exp_one_lt_d9.le\n        nlinarith [hsqrt316, he]\n      have h2 : Real.log T \u2264 Real.log (Real.sqrt (n : \u211d) + 1) := hB\n      linarith [h2, hlog1]\n    have hconst : (0 : \u211d) \u2264 1 / (2 * Real.pi) := by positivity\n    nlinarith [hA, hB, hC, hconst]\n  have hX : 4 * T * ((2 / 3) * Z2hat T + 10.5 * Real.log (T + 2) + 48) \u2264\n      4 * (Real.sqrt (n : \u211d) + 1) *\n        ((2 / 3) * Z2hat (Real.sqrt (n : \u211d) + 1) + 10.5 * Real.log (Real.sqrt (n : \u211d) + 1 + 2) + 48) := by\n    have hZ := Z2hat_mono hT1 hTn1\n    have hlog := Real.log_le_log (by linarith : (0 : \u211d) < T + 2)\n      (by linarith [hTn1] : T + 2 \u2264 Real.sqrt (n : \u211d) + 1 + 2)\n    have hXle : (2 / 3) * Z2hat T + 10.5 * Real.log (T + 2) + 48 \u2264\n        (2 / 3) * Z2hat (Real.sqrt (n : \u211d) + 1) + 10.5 * Real.log (Real.sqrt (n : \u211d) + 1 + 2) + 48 := by\n      nlinarith [hZ, hlog]\n    have hX0' : (0 : \u211d) \u2264 (2 / 3) * Z2hat T + 10.5 * Real.log (T + 2) + 48 := by\n      have h1 := Z2hat_nonneg hT1\n      nlinarith [hlogT1]\n    have h4 : T * ((2 / 3) * Z2hat T + 10.5 * Real.log (T + 2) + 48) \u2264\n        (Real.sqrt (n : \u211d) + 1) *\n          ((2 / 3) * Z2hat (Real.sqrt (n : \u211d) + 1) + 10.5 * Real.log (Real.sqrt (n : \u211d) + 1 + 2) + 48) :=\n      mul_le_mul hTn1 hXle hX0' (by linarith [hsqrt0])\n    nlinarith [h4]\n  have hHhat : Hhat T \u2264 Hhat (Real.sqrt (n : \u211d) + 1) := by\n    unfold Hhat\n    have hC := C0hat_mono hT1 hTn1\n    have hC2 : C0hat T ^ 2 \u2264 C0hat (Real.sqrt (n : \u211d) + 1) ^ 2 :=\n      pow_le_pow_left\u2080 hC0T0.le hC 2\n    have hlog := Real.log_le_log (by linarith : (0 : \u211d) < T + 2)\n      (by linarith [hTn1] : T + 2 \u2264 Real.sqrt (n : \u211d) + 1 + 2)\n    nlinarith [hC2, hlog]\n  -- the Bn unfold\n  have hBn : Bn FAlt (n : \u211d) = 4 * FAlt (Real.sqrt (n : \u211d) + 1) +\n      4 * (Real.sqrt (n : \u211d) + 1) *\n        ((2 / 3) * Z2hat (Real.sqrt (n : \u211d) + 1) + 10.5 * Real.log (Real.sqrt (n : \u211d) + 1 + 2) + 48) +\n      40 * 1.3352 + 2 * (Real.exp 4 + 1) * (7 * Hhat (Real.sqrt (n : \u211d) + 1)) +\n      2 * DogLegRight (n : \u211d) + IIMaj (n : \u211d) + 1 := by\n    unfold Bn\n    rfl\n  rw [hBn]\n  -- the IIMaj absorption: (1/2\u03c0)\u00b7e^{1/3}\u00b7IIMaj \u2264 IIMaj\n  have hIIMajAbs : (1 / (2 * Real.pi)) * (Real.exp (1 / 3 : \u211d) * IIMaj (n : \u211d)) \u2264\n      IIMaj (n : \u211d) := by\n    have h1 := mul_le_mul_of_nonneg_right he13' hIIMaj0\n    calc (1 / (2 * Real.pi)) * (Real.exp (1 / 3 : \u211d) * IIMaj (n : \u211d))\n        = ((1 / (2 * Real.pi)) * Real.exp (1 / 3 : \u211d)) * IIMaj (n : \u211d) := by ring\n      _ \u2264 1 * IIMaj (n : \u211d) := h1\n      _ = IIMaj (n : \u211d) := by ring\n  -- the Hhat absorption: (1/2\u03c0)\u00b7Y \u2264 Y for Y \u2265 0\n  have hHhatAbs : (1 / (2 * Real.pi)) * (2 * (Real.exp 4 + 1) * (7 * Hhat T)) \u2264\n      2 * (Real.exp 4 + 1) * (7 * Hhat T) := by\n    have hY : (0 : \u211d) \u2264 2 * (Real.exp 4 + 1) * (7 * Hhat T) := by\n      have h1 : (0 : \u211d) \u2264 7 * Hhat T := by nlinarith [hHhat0]\n      positivity\n    have h1 := mul_le_mul_of_nonneg_right h2\u03c0le hY\n    rwa [one_mul] at h1\n  have hDLRAbs : (1 / (2 * Real.pi)) * (2 * DogLegRight (n : \u211d)) \u2264 2 * DogLegRight (n : \u211d) := by\n    have h1 := mul_le_mul_of_nonneg_right h2\u03c0le hDLR0\n    rwa [one_mul] at h1\n  have hXAbs : (1 / (2 * Real.pi)) * (4 * T *\n        ((2 / 3) * Z2hat T + 10.5 * Real.log (T + 2) + 48) + 40 * 1.3352) \u2264\n      4 * T * ((2 / 3) * Z2hat T + 10.5 * Real.log (T + 2) + 48) + 40 * 1.3352 := by\n    have h1 := mul_le_mul_of_nonneg_right h2\u03c0le hX0\n    rwa [one_mul] at h1\n  -- the mid-bound pinch absorption: (1/2\u03c0)\u00b72(e\u2074+1)(NI+5.5R) \u2264 (1/2\u03c0)\u00b72(e\u2074+1)\u00b77\u00b7H\u0302\n  have hPinchAbs : (1 / (2 * Real.pi)) * (2 * (Real.exp 4 + 1) *\n        (2 * Z2hat T * Real.log (148.5 * C0hat (Real.sqrt (n : \u211d) + 2)) +\n          (3 - -5 / 2) * (10.5 * Real.log (T + 2) + 48))) \u2264\n      (1 / (2 * Real.pi)) * (2 * (Real.exp 4 + 1) * (7 * Hhat T)) := by\n    have h1 := mul_le_mul_of_nonneg_left hpinch (by positivity :\n      (0 : \u211d) \u2264 (1 / (2 * Real.pi)) * (2 * (Real.exp 4 + 1)))\n    convert h1 using 1\n    \u00b7 ring\n    \u00b7 ring\n  -- the giant assembly\n  have hnormRect : \u2016RectangleIntegral' (Jlag n) (rectZ T) (rectW n T)\u2016 \u2264\n      (1 / (2 * Real.pi)) *\n        (\u2016HIntegral (Jlag n) (-5 / 2) (2 * Real.sqrt (n : \u211d)) (-T)\u2016 +\n          \u2016HIntegral (Jlag n) (-5 / 2) (2 * Real.sqrt (n : \u211d)) T\u2016 +\n          \u2016VIntegral (Jlag n) (2 * Real.sqrt (n : \u211d)) (-T) T\u2016 +\n          \u2016VIntegral (Jlag n) (-5 / 2) (-T) T\u2016) := by\n    rw [hnorm]\n    have h1 := mul_le_mul_of_nonneg_left htri (by positivity : (0 : \u211d) \u2264 1 / (2 * Real.pi))\n    exact h1\n  -- |Sf n| \u2264 \u2016RectInt'\u2016 + \u2016\u03a3\u2016, now everything slots in\n  nlinarith [hsf, hnormRect, hVl, hVr, hH, hbridge, hIIMajAbs, hHhatAbs,\n    hDLRAbs, hXAbs, hPinchAbs, hFAlt, hX, hHhat, hIIMaj0, hDLR0, hHhat0, hX0]\n\nend NguyenRH1"
}
raw content_json (database row)
[{"type":"thinking","thinking":"`le_of_pow_le_pow_left₀ (hn : n ≠ 0) (hb : 0 ≤ b) (h : a ^ n ≤ b ^ n) : a ≤ b` — note: the nonneg is on **b** (the RIGHT side), not a! So `le_of_pow_le_pow_left₀ (by norm_num : (3:ℕ) ≠ 0) (by norm_num : (0:ℝ) ≤ 1.4) h2` ✓ with b := 1.4.\n\n`C0hat_mono {a b} (ha : 1 ≤ a) (hab : a ≤ b) : C0hat a ≤ C0hat b` ✓.\n\nNow write §6 (6-d). Full draft:\n\n```lean\n/-! ## 6. 6-d: the fold — `sfBoundProp : SfBoundProp` -/\n\n/-- Ĉ₀(t) ≤ t for t ≥ 8 (via log x ≤ x/e and loglog x ≤ log x ≤ x/e). -/\ntheorem C0hat_le_self {t : ℝ} (ht : 8 ≤ t) : C0hat t ≤ t := by\n  have ht2 : (0 : ℝ) < t + 2 := by linarith\n  have ht1 : (1 : ℝ) < t + 2 := by linarith\n  have hinv : (1 : ℝ) / Real.exp 1 ≤ 0.36789 := by\n    rw [div_le_iff₀ (Real.exp_pos 1), one_mul]\n    nlinarith [Real.exp_one_gt_d9]\n  have hL1 : Real.log (t + 2) ≤ (t + 2) / Real.exp 1 := by\n    have h1 := Real.log_le_sub_one_of_pos (div_pos ht2 (Real.exp_pos 1))\n    have h2 : Real.log ((t + 2) / Real.exp 1) = Real.log (t + 2) - 1 := by\n      rw [Real.log_div (ne_of_gt ht2) (Real.exp_pos 1).ne', Real.log_exp]\n    rw [h2] at h1\n    linarith [h1]\n  have hL : Real.log (t + 2) ≤ (t + 2) * 0.36789 := by\n    have h3 : (t + 2) / Real.exp 1 ≤ (t + 2) * 0.36789 := by\n      rw [div_eq_mul_one_div]\n      exact mul_le_mul_of_nonneg_left hinv ht2.le\n    exact hL1.trans h3\n  have hLL : Real.log (Real.log (t + 2)) ≤ (t + 2) * 0.36789 := by\n    have h1 := Real.log_le_sub_one_of_pos (Real.log_pos ht1)\n    nlinarith [h1, hL]\n  unfold C0hat\n  nlinarith [hL, hLL, ht]\n\n/-- **The horizontal pinch** (E-030 V3 witness made analytic): the near-sum\nintegral + the R-part ≤ 7·Ĥ(T). Chain (all elementary): C0hat(√n+2) ≤ √n+2\n(t ≥ 318), so 148.5·C0hat(√n+2) ≤ (√n+2)² and the log ≤ 2·log(T+2);\nZ₂(T) ≤ 2·Ĉ₀(T); Ĉ₀(T) ≥ 0.433·log(T+2) and 8 ≤ 21·0.433. -/\ntheorem pinch_horizontal {n : ℕ} (hn : 100000 ≤ n) {T : ℝ}\n    (hTn : Real.sqrt (n : ℝ) ≤ T) (hTn1 : T ≤ Real.sqrt (n : ℝ) + 1) :\n    2 * Z2hat T * Real.log (148.5 * C0hat (Real.sqrt (n : ℝ) + 2)) +\n      (3 - -5 / 2) * (10.5 * Real.log (T + 2) + 48) ≤ 7 * Hhat T := by\n  have hnR : (100000 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn\n  have hsqrt316 : (316 : ℝ) ≤ Real.sqrt (n : ℝ) := by\n    rw [Real.le_sqrt (by norm_num) (by positivity)]\n    nlinarith [hnR]\n  have hT1 : (1 : ℝ) ≤ T := by nlinarith [hsqrt316, hTn]\n  have hT0 : (0 : ℝ) < T := by nlinarith\n  -- (a) the log argument bound\n  have hC0le : C0hat (Real.sqrt (n : ℝ) + 2) ≤ Real.sqrt (n : ℝ) + 2 :=\n    C0hat_le_self (by nlinarith [hsqrt316])\n  have h148 : (148.5 : ℝ) ≤ Real.sqrt (n : ℝ) + 2 := by nlinarith [hsqrt316]\n  have hC0pos : (0 : ℝ) < C0hat (Real.sqrt (n : ℝ) + 2) := by\n    have h2 := two_le_C0hat (by nlinarith [Real.sqrt_nonneg (n : ℝ)] :\n      (1 : ℝ) ≤ Real.sqrt (n : ℝ) + 2)\n    linarith\n  have hsq1 : 148.5 * C0hat (Real.sqrt (n : ℝ) + 2) ≤ (Real.sqrt (n : ℝ) + 2) ^ 2 := by\n    have h1 := mul_le_mul hC0le h148 (by norm_num : (0 : ℝ) ≤ (148.5 : ℝ))\n      (by positivity : (0 : ℝ) ≤ Real.sqrt (n : ℝ) + 2)\n    nlinarith [h1, hC0pos.le]\n  have hlogarg : Real.log (148.5 * C0hat (Real.sqrt (n : ℝ) + 2)) ≤\n      2 * Real.log (T + 2) := by\n    have h2 := Real.log_le_log (by positivity) hsq1\n    have h3 : Real.log ((Real.sqrt (n : ℝ) + 2) ^ 2) = 2 * Real.log (Real.sqrt (n : ℝ) + 2) := by\n      rw [Real.log_pow]\n      ring\n    have h4 : Real.log (Real.sqrt (n : ℝ) + 2) ≤ Real.log (T + 2) :=\n      Real.log_le_log (by positivity) (by linarith [hTn])\n    linarith [h2, h3, h4]\n  -- (b) Z₂ ≤ 2·Ĉ₀\n  have hZ2le : Z2hat T ≤ 2 * C0hat T := by\n    have hL1 : (1 : ℝ) ≤ Real.log (T + 2) := by\n      have ht2 : (0 : ℝ) < T + 2 := by linarith\n      rw [Real.le_log_iff_exp_le ht2]\n      have he := Real.exp_one_lt_d9.le\n      linarith\n    have hLL0 : (0 : ℝ) ≤ Real.log (Real.log (T + 2)) := Real.log_nonneg hL1\n    unfold Z2hat C0hat\n    nlinarith [hL1, hLL0]\n  -- (c) Ĉ₀ ≥ 0.433·log\n  have hC0L : 0.433 * Real.log (T + 2) ≤ C0hat T := by\n    have hL1 : (1 : ℝ) ≤ Real.log (T + 2) := by\n      have ht2 : (0 : ℝ) < T + 2 := by linarith\n      rw [Real.le_log_iff_exp_le ht2]\n      have he := Real.exp_one_lt_d9.le\n      linarith\n    have hLL0 : (0 : ℝ) ≤ Real.log (Real.log (T + 2)) := Real.log_nonneg hL1\n    unfold C0hat\n    nlinarith [hL1, hLL0]\n  -- (d) the near part ≤ 21·Ĉ₀²\n  have hZ2nn : (0 : ℝ) ≤ Z2hat T := Z2hat_nonneg hT1\n  have hlogT0 : (0 : ℝ) ≤ Real.log (T + 2) := Real.log_nonneg (by linarith)\n  have hC0T0 : (0 : ℝ) < C0hat T := by\n    have h2 := two_le_C0hat hT1\n    linarith\n  have hnear : 2 * Z2hat T * Real.log (148.5 * C0hat (Real.sqrt (n : ℝ) + 2)) ≤\n      21 * C0hat T * C0hat T := by\n    have h1 : 2 * Z2hat T * Real.log (148.5 * C0hat (Real.sqrt (n : ℝ) + 2)) ≤\n        2 * Z2hat T * (2 * Real.log (T + 2)) :=\n      mul_le_mul_of_nonneg_left hlogarg (by positivity : (0 : ℝ) ≤ 2 * Z2hat T)\n    have h2 : 2 * Z2hat T * (2 * Real.log (T + 2)) ≤ 2 * (2 * C0hat T) * (2 * Real.log (T + 2)) := by\n      have h3 := mul_le_mul hZ2le le_rfl hlogT0 (by positivity : (0:ℝ) ≤ 2 * (2:ℝ))\n      -- hmm — mul_le_mul (h₁ : Z2hat ≤ 2·C0hat) (h₂ : log ≤ log) (0 ≤ log) (0 ≤ 2·C0hat)\n      ...\n```\n\nHmm — getting the multiplications right: 4·Z2hat·log ≤ 8·C0hat·log: mul_le_mul (h₁ : Z2hat ≤ 2·C0hat) (h₂ : log(T+2) ≤ log(T+2)) (0 ≤ log) (0 ≤ 2·C0hat) : Z2hat·log ≤ 2·C0hat·log — then ×4. Let me restructure linearly:\n```lean\n    have hZ2L : Z2hat T * Real.log (T + 2) ≤ 2 * C0hat T * Real.log (T + 2) :=\n      mul_le_mul_of_nonneg_right hZ2le hlogT0\n    -- 8·log(T+2) ≤ 21·C0hat\n    have h8 : 8 * Real.log (T + 2) ≤ 21 * C0hat T := by\n      have h1 : (8 : ℝ) ≤ 21 * 0.433 := by norm_num\n      nlinarith [hC0L, h1, hlogT0, hC0T0.le]\n```\nh8: 8·log(T+2) ≤ 21·C0hat T: from hC0L : 0.433·log(T+2) ≤ C0hat T: 8·log(T+2) = (8/0.433)·(0.433·log(T+2)) ≤ (8/0.433)·C0hat T ≤ 21·C0hat T ⟺ 8 ≤ 21·0.433 = 9.093 ✓ — linarith with the ATOMS log(T+2), C0hat T: 8·log = (8/0.433)·(0.433·log) — the coefficient division 8/0.433 — linarith does exact rational arithmetic ✓: 8·log(T+2) ≤ 21·C0hat T ⟺ 0.433·8·log ≤ 21·0.433·C0hat ⟸ 0.433·log ≤ C0hat (hC0L) and 8 ≤ 21·0.433 ✓ — linarith [hC0L] + norm_num-fact ✓:\n```lean\n    have h8 : 8 * Real.log (T + 2) ≤ 21 * C0hat T := by\n      have h1 : (8 : ℝ) ≤ 21 * (0.433 : ℝ) := by norm_num\n      nlinarith [hC0L, h1, hlogT0]\n```\nhmm — 8·log ≤ 21·C0hat: multiply hC0L by 21: 21·0.433·log ≤ 21·C0hat: 9.093·log ≤ 21·C0hat; and 8·log ≤ 9.093·log (log ≥ 0) ⟹ 8·log ≤ 21·C0hat ✓ linarith ✓.\n\n    have h3 : (8 * Real.log (T + 2)) * C0hat T ≤ (21 * C0hat T) * C0hat T :=\n      mul_le_mul h8 le_rfl hC0T0.le (by positivity : (0:ℝ) ≤ 21 * C0hat T)\n    -- assemble: 2·Z2hat·log148.5 ≤ 4·Z2hat·log ≤ 8·C0hat·log = (8·log)·C0hat ≤ 21·C0hat·C0hat\n    nlinarith [h1, hZ2L, h3, hlogarg]\n```\n\nhmm — the assemble nlinarith: goal: 2·Z2hat·log148.5 ≤ 21·C0hat·C0hat. Facts: h1 : 2·Z2hat·log148.5 ≤ 2·Z2hat·(2·log) = 4·(Z2hat·log); hZ2L : Z2hat·log ≤ 2·C0hat·log; h3 : (8·log)·C0hat ≤ 21·C0hat·C0hat. Chain: 4·(Z2hat·log) ≤ 4·(2·C0hat·log) = 8·(C0hat·log) = (8·log)·C0hat ≤ 21·C0hat·C0hat ✓ — the products (Z2hat·log), (C0hat·log), (log·C0hat), (C0hat·C0hat) — ring_nf normalizes monomials ✓ linear ✓ nlinarith/linarith. Use linarith [h1, hZ2L, h3].\n\n(e) the 5.5 part + Hhat unfold:\n```lean\n  have hR0 : (0 : ℝ) ≤ 10.5 * Real.log (T + 2) + 48 := by\n    have h1 := Real.log_nonneg (by linarith : (1 : ℝ) ≤ T + 2)\n    nlinarith\n  have hR : (3 - -5 / 2 : ℝ) * (10.5 * Real.log (T + 2) + 48) ≤\n      7 * (10.5 * Real.log (T + 2) + 48) := by\n    norm_num1\n    -- 5.5·R ≤ 7·R ⟸ R ≥ 0 — after norm_num1 computes 3 − −5/2 = 5.5\n    nlinarith [hR0]\n```\nHmm — norm_num1 on goal `(3 - -5/2)·R ≤ 7·R` — computes (3 − −5/2) → 5.5: goal `5.5·R ≤ 7·R` — then nlinarith [hR0] ✓ (linarith suffices: 5.5R ≤ 7R ⟺ 0 ≤ 1.5R ✓). Actually `norm_num1` might reformat the LHS — or use `have h55 : (3 - -5/2 : ℝ) = 5.5 := by norm_num; rw [h55]; nlinarith [hR0]` — deterministic. Use that.\n\n  -- final\n  unfold Hhat\n  have hC0T02 : (0 : ℝ) ≤ C0hat T * C0hat T := by positivity\n  linarith [hnear, hR, hC0T02] — goal: NI + 5.5R ≤ 7·(3·C0hat² + R) — from hnear (NI ≤ 21·C0hat²) and hR (5.5R ≤ 7R): NI + 5.5R ≤ 21·C0hat² + 7R = 7·(3·C0hat² + R) ✓ — after unfold Hhat, the goal's RHS is 7·(3·C0hat T^2 + 10.5·log(T+2)+48) — note C0hat T^2 vs my C0hat T * C0hat T — hnear has 21 * C0hat T * C0hat T — ring_nf normalizes ✓ linarith ✓.\n\nHmm — Hhat's def: `Hhat (T: ℝ) : ℝ := 3 * C0hat T ^ 2 + 10.5 * Real.log (T + 2) + 48` ✓ (LiSkeleton:749). `unfold Hhat` at the goal ✓.\n\nWait — the goal after unfold Hhat: `2·Z2hat·log148.5 + (3−−5/2)·R ≤ 7·(3·C0hat T^2 + 10.5·log(T+2)+48)`. linarith [hnear : 2·Z2hat·log148.5 ≤ 21·C0hat·C0hat, hR : 5.5·R ≤ 7·R, ...]: 2·Z2hat·log148.5 + 5.5R ≤ 21·C0hat·C0hat + 7R = 7·(3·C0hat·C0hat + R) — and 3·C0hat T^2 = 3·(C0hat·C0hat) ✓ ring_nf ✓ closes ✓.\n\nThen the bridge variant + hnorm + htri + the main theorem. Also `Real.le_log_iff_exp_le` used twice (hL1 in (b) and (c)) — fine.\n\nOne concern in hZ2le/hC0L's unfold: `unfold Z2hat C0hat` — unfolds both ✓ (as in Z2hat_mono's `unfold Z2hat` ✓).\n\nFor hnear's mul_le_mul h8 le_rfl hC0T0.le (by positivity : 0 ≤ 21·C0hat T) : (8·log)·C0hat ≤ (21·C0hat)·C0hat ✓ — mul_le_mul (h₁ : 8·log ≤ 21·C0hat) (h₂ : C0hat ≤ C0hat) (c0 : 0 ≤ C0hat) (b0 : 0 ≤ 21·C0hat) ✓.\n\nAnd h1's `mul_le_mul_of_nonneg_left hlogarg (by positivity : (0:ℝ) ≤ 2 * Z2hat T)` : 2·Z2hat·log148.5 ≤ 2·Z2hat·(2·log(T+2)) ✓ — mul_le_mul_of_nonneg_left (hbc : log148.5 ≤ 2·log(T+2)) (ha : 0 ≤ 2·Z2hat) ✓.\n\nNow the main sfBoundProp theorem. Let me also handle `Real.pi_gt_three` — exact name: `Real.pi_gt_three : 3 < Real.pi`? or `Real.pi_gt_three : 3 < π`? — I recall `Real.pi_gt_three : 3 < Real.pi` ✓ (in this Mathlib — session-033 banked \"Real.pi_lt_d2 : π < 3.15\" — so pi_gt_three likely exists too — let me trust it, fallback `Real.three_lt_pi`? — hmm — actually in recent Mathlib it's `Real.pi_gt_three : 3 < π` ✓).\n\nAlso `Real.pi_pos : 0 < Real.pi` ✓.\n\nNow write the whole §6.","signature":""},{"type":"text","text":"All signatures confirmed (`le_of_pow_le_pow_left₀` takes nonneg on the RIGHT side). Writing §6 (6-d) — pinch, bridge variant, norm machinery, and the fold."},{"type":"tool_use","id":"Edit_169","name":"Edit","input":{"replace_all":false,"file_path":"D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\NguyenRH1\\LiSideBounds.lean","old_string":"  exact add_le_add (hIntegral_Jlag_full_norm_le hZC hZC2 hNLZ hn hTwide hTn hTn1)\n    (hIntegral_Jlag_full_neg_norm_le hZC hZC2 hNLZ hn hTwide hTn hTn1)\n\nend NguyenRH1","new_string":"  exact add_le_add (hIntegral_Jlag_full_norm_le hZC hZC2 hNLZ hn hTwide hTn hTn1)\n    (hIntegral_Jlag_full_neg_norm_le hZC hZC2 hNLZ hn hTwide hTn hTn1)\n\n/-! ## 6. 6-d: the fold — `sfBoundProp : SfBoundProp` -/\n\n/-- Ĉ₀(t) ≤ t for t ≥ 8 (via log x ≤ x/e with 1/e ≤ 0.36789 certified\nfrom e > 2.7182818283, and loglog x ≤ log x − 1). -/\ntheorem C0hat_le_self {t : ℝ} (ht : 8 ≤ t) : C0hat t ≤ t := by\n  have ht2 : (0 : ℝ) < t + 2 := by linarith\n  have ht1 : (1 : ℝ) < t + 2 := by linarith\n  have hinv : (1 : ℝ) / Real.exp 1 ≤ 0.36789 := by\n    rw [div_le_iff₀ (Real.exp_pos 1), one_mul]\n    nlinarith [Real.exp_one_gt_d9]\n  have hL1 : Real.log (t + 2) ≤ (t + 2) / Real.exp 1 := by\n    have h1 := Real.log_le_sub_one_of_pos (div_pos ht2 (Real.exp_pos 1))\n    have h2 : Real.log ((t + 2) / Real.exp 1) = Real.log (t + 2) - 1 := by\n      rw [Real.log_div (ne_of_gt ht2) (Real.exp_pos 1).ne', Real.log_exp]\n    rw [h2] at h1\n    linarith [h1]\n  have hL : Real.log (t + 2) ≤ (t + 2) * 0.36789 := by\n    have h3 : (t + 2) / Real.exp 1 ≤ (t + 2) * 0.36789 := by\n      rw [div_eq_mul_one_div]\n      exact mul_le_mul_of_nonneg_left hinv ht2.le\n    exact hL1.trans h3\n  have hLL : Real.log (Real.log (t + 2)) ≤ (t + 2) * 0.36789 := by\n    have h1 := Real.log_le_sub_one_of_pos (Real.log_pos ht1)\n    nlinarith [h1, hL]\n  unfold C0hat\n  nlinarith [hL, hLL, ht]\n\n/-- **The horizontal pinch** (the E-030 V3 ≤ 0.40 witness made analytic):\nthe near-sum integral + the R-part ≤ 7·Ĥ(T). Chain (all elementary, no\ncertified log numerics): Ĉ₀(√n+2) ≤ √n+2 (Ĉ₀(t) ≤ t, t ≥ 318), so\n148.5·Ĉ₀(√n+2) ≤ (√n+2)² and its log ≤ 2·log(T+2); Z₂(T) ≤ 2·Ĉ₀(T);\nĈ₀(T) ≥ 0.433·log(T+2) with 8 ≤ 21·0.433 = 9.093; 5.5 ≤ 7 on the R-part. -/\ntheorem pinch_horizontal {n : ℕ} (hn : 100000 ≤ n) {T : ℝ}\n    (hTn : Real.sqrt (n : ℝ) ≤ T) (hTn1 : T ≤ Real.sqrt (n : ℝ) + 1) :\n    2 * Z2hat T * Real.log (148.5 * C0hat (Real.sqrt (n : ℝ) + 2)) +\n      (3 - -5 / 2) * (10.5 * Real.log (T + 2) + 48) ≤ 7 * Hhat T := by\n  have hnR : (100000 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn\n  have hsqrt316 : (316 : ℝ) ≤ Real.sqrt (n : ℝ) := by\n    rw [Real.le_sqrt (by norm_num) (by positivity)]\n    nlinarith [hnR]\n  have hT1 : (1 : ℝ) ≤ T := by nlinarith [hsqrt316, hTn]\n  have hT0 : (0 : ℝ) < T := by nlinarith\n  -- (a) log(148.5·Ĉ₀(√n+2)) ≤ 2·log(T+2)\n  have hC0le : C0hat (Real.sqrt (n : ℝ) + 2) ≤ Real.sqrt (n : ℝ) + 2 :=\n    C0hat_le_self (by nlinarith [hsqrt316])\n  have h148 : (148.5 : ℝ) ≤ Real.sqrt (n : ℝ) + 2 := by nlinarith [hsqrt316]\n  have hC0pos : (0 : ℝ) < C0hat (Real.sqrt (n : ℝ) + 2) := by\n    have h2 := two_le_C0hat (by nlinarith [Real.sqrt_nonneg (n : ℝ)] :\n      (1 : ℝ) ≤ Real.sqrt (n : ℝ) + 2)\n    linarith\n  have hsq1 : 148.5 * C0hat (Real.sqrt (n : ℝ) + 2) ≤ (Real.sqrt (n : ℝ) + 2) ^ 2 := by\n    have h1 := mul_le_mul hC0le h148 (by norm_num : (0 : ℝ) ≤ (148.5 : ℝ))\n      (by positivity : (0 : ℝ) ≤ Real.sqrt (n : ℝ) + 2)\n    nlinarith [h1, hC0pos.le]\n  have hlogarg : Real.log (148.5 * C0hat (Real.sqrt (n : ℝ) + 2)) ≤\n      2 * Real.log (T + 2) := by\n    have h2 := Real.log_le_log (by positivity) hsq1\n    have h3 : Real.log ((Real.sqrt (n : ℝ) + 2) ^ 2) = 2 * Real.log (Real.sqrt (n : ℝ) + 2) := by\n      rw [Real.log_pow]\n      ring\n    have h4 : Real.log (Real.sqrt (n : ℝ) + 2) ≤ Real.log (T + 2) :=\n      Real.log_le_log (by positivity) (by linarith [hTn])\n    linarith [h2, h3, h4]\n  -- (b) Z₂(T) ≤ 2·Ĉ₀(T)\n  have hZ2le : Z2hat T ≤ 2 * C0hat T := by\n    have hL1 : (1 : ℝ) ≤ Real.log (T + 2) := by\n      have ht2 : (0 : ℝ) < T + 2 := by linarith\n      rw [Real.le_log_iff_exp_le ht2]\n      have he := Real.exp_one_lt_d9.le\n      linarith\n    have hLL0 : (0 : ℝ) ≤ Real.log (Real.log (T + 2)) := Real.log_nonneg hL1\n    unfold Z2hat C0hat\n    nlinarith [hL1, hLL0]\n  -- (c) Ĉ₀(T) ≥ 0.433·log(T+2)\n  have hC0L : 0.433 * Real.log (T + 2) ≤ C0hat T := by\n    have hL1 : (1 : ℝ) ≤ Real.log (T + 2) := by\n      have ht2 : (0 : ℝ) < T + 2 := by linarith\n      rw [Real.le_log_iff_exp_le ht2]\n      have he := Real.exp_one_lt_d9.le\n      linarith\n    have hLL0 : (0 : ℝ) ≤ Real.log (Real.log (T + 2)) := Real.log_nonneg hL1\n    unfold C0hat\n    nlinarith [hL1, hLL0]\n  -- (d) the near part ≤ 21·Ĉ₀(T)²\n  have hlogT0 : (0 : ℝ) ≤ Real.log (T + 2) := Real.log_nonneg (by linarith)\n  have hC0T0 : (0 : ℝ) < C0hat T := by\n    have h2 := two_le_C0hat hT1\n    linarith\n  have hnear : 2 * Z2hat T * Real.log (148.5 * C0hat (Real.sqrt (n : ℝ) + 2)) ≤\n      21 * C0hat T * C0hat T := by\n    have h1 : 2 * Z2hat T * Real.log (148.5 * C0hat (Real.sqrt (n : ℝ) + 2)) ≤\n        2 * Z2hat T * (2 * Real.log (T + 2)) := by\n      have hnn : (0 : ℝ) ≤ 2 * Z2hat T := by\n        have h := Z2hat_nonneg hT1\n        positivity\n      exact mul_le_mul_of_nonneg_left hlogarg hnn\n    have hZ2L : Z2hat T * Real.log (T + 2) ≤ 2 * C0hat T * Real.log (T + 2) :=\n      mul_le_mul_of_nonneg_right hZ2le hlogT0\n    have h8 : 8 * Real.log (T + 2) ≤ 21 * C0hat T := by\n      have h1 : (8 : ℝ) ≤ 21 * (0.433 : ℝ) := by norm_num\n      nlinarith [hC0L, h1, hlogT0]\n    have h3 : (8 * Real.log (T + 2)) * C0hat T ≤ (21 * C0hat T) * C0hat T :=\n      mul_le_mul h8 le_rfl hC0T0.le (by positivity : (0 : ℝ) ≤ 21 * C0hat T)\n    nlinarith [h1, hZ2L, h3, hlogT0]\n  -- (e) the 5.5 ≤ 7 part\n  have hR0 : (0 : ℝ) ≤ 10.5 * Real.log (T + 2) + 48 := by\n    have h1 := Real.log_nonneg (by linarith : (1 : ℝ) ≤ T + 2)\n    nlinarith\n  have hR : (3 - -5 / 2 : ℝ) * (10.5 * Real.log (T + 2) + 48) ≤\n      7 * (10.5 * Real.log (T + 2) + 48) := by\n    have h55 : (3 - -5 / 2 : ℝ) = 5.5 := by norm_num\n    rw [h55]\n    nlinarith [hR0]\n  -- final: 21·Ĉ₀² + 7·R = 7·Ĥ\n  unfold Hhat\n  nlinarith [hnear, hR]\n\n/-- **THE FOLD (ii′-6-d)**: `SfBoundProp` from the six declared perimeter\nhypotheses — the 6-b sides identity + the bridge (both-signs 4F + triv ≤ 1),\nthe rectangle side decomposition, the four side bounds of ii′-6-c, the\nhorizontal pinch, and the F-E absorption e^{1/3} ≤ 1.4 ≤ 2π. -/\ntheorem sfBoundProp (hRH : RHUpTo (3 * 10 ^ 12)) (hZC : ZeroCountProp)\n    (hZC2 : ZeroCountProp2) (hZCG : ZeroCountGlobalProp) (hNLZ : NoLowZeros)\n    (hMZ : MZeroProp) : SfBoundProp := by\n  intro n hn hN1\n  classical\n  have hnR : (100000 : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn\n  have hn1 : 1 ≤ n := by omega\n  have hn16 : 16 ≤ n := by omega\n  have hsqrt316 : (316 : ℝ) ≤ Real.sqrt (n : ℝ) := by\n    rw [Real.le_sqrt (by norm_num) (by positivity)]\n    nlinarith [hnR]\n  have ha : (3 : ℝ) ≤ Real.sqrt (n : ℝ) := by nlinarith [hsqrt316]\n  obtain ⟨T, hTn, hTn1, hTwide⟩ := exists_zero_avoiding_T_wide hZC ha\n  have hT1 : (1 : ℝ) ≤ T := by nlinarith [hTn]\n  have hT2 : (2 : ℝ) ≤ T := by nlinarith\n  have hT0 : (0 : ℝ) < T := by nlinarith\n  -- T ≤ 3·10¹² (from n ≤ N₁; the bridge's internal RHUpTo range)\n  have hTle : T ≤ 3 * 10 ^ 12 := by\n    have h1 : Real.sqrt (n : ℝ) ≤ 3 * 10 ^ 12 - 1 := by\n      have h2 := Real.sqrt_le_sqrt hN1\n      rwa [Real.sqrt_sq (by norm_num : (0 : ℝ) ≤ 3 * 10 ^ 12 - 1)] at h2\n    linarith [hTn1]\n  -- the sides identity\n  have hsf := sf_abs_le_rectInt_add_zeroSum hZC hn1 hT1 hTn hTn1 hTwide\n  -- the bridge (variant with T ≤ 3·10¹² — the internal range actually used)\n  have hbridge : ‖∑ ρ ∈ ((zeroBothWindow_finite T).toFinset ∪ {(-2 : ℂ)}),\n      (zeroMult ρ : ℂ) * (1 - (ρ / (ρ - 1)) ^ n)‖ ≤ 4 * FAlt T + 1 := by\n    have h2not : (-2 : ℂ) ∉ (zeroBothWindow_finite T).toFinset := by\n      intro h\n      have hnt := (zeroBothWindow_finite T).mem_toFinset.mp h |>.1\n      have h21 : (0 : ℝ) < (-2 : ℂ).re := hnt.2.1\n      norm_num at h21\n    have hdisj2 : Disjoint (zeroBothWindow_finite T).toFinset {(-2 : ℂ)} := by\n      rw [Finset.disjoint_left]\n      intro ρ hρ hρ2\n      rw [Finset.mem_singleton] at hρ2\n      exact h2not (hρ2 ▸ hρ)\n    rw [Finset.sum_union hdisj2, Finset.sum_singleton]\n    have htriv := trivTerm_norm_le_one n\n    have hbr := zeroSum_nontriv_norm_le hRH (n := n) (T := T) hTle\n    have hcount := zeroBothWindow_sum_eq_two_mul hNLZ T\n    have hZ := hZCG T hT2\n    calc ‖∑ ρ ∈ (zeroBothWindow_finite T).toFinset,\n          (zeroMult ρ : ℂ) * (1 - (ρ / (ρ - 1)) ^ n) +\n          (zeroMult (-2 : ℂ) : ℂ) * (1 - ((-2 : ℂ) / (-2 - 1)) ^ n)‖\n        ≤ ‖∑ ρ ∈ (zeroBothWindow_finite T).toFinset,\n          (zeroMult ρ : ℂ) * (1 - (ρ / (ρ - 1)) ^ n)‖ +\n          ‖(zeroMult (-2 : ℂ) : ℂ) * (1 - ((-2 : ℂ) / (-2 - 1)) ^ n)‖ := norm_add_le _ _\n      _ ≤ (2 * ∑ ρ ∈ (zeroBothWindow_finite T).toFinset, (zeroMult ρ : ℝ)) + 1 := by\n          linarith [hbr, htriv]\n      _ = 2 * (2 * ∑ ρ ∈ (zeroGlobalWindow_finite T).toFinset, (zeroMult ρ : ℝ)) + 1 := by\n          rw [hcount]\n      _ ≤ 4 * FAlt T + 1 := by linarith [hZ]\n  -- the four side bounds\n  have hVl := vIntegral_Jlag_left_norm_le hZC hZC2 hNLZ hMZ hn hTn hTn1\n  have hVr := vIntegral_Jlag_right_le_exp_third_IIMaj hn hTn hTn1\n  have hH := hIntegral_Jlag_full_two_sides hZC hZC2 hNLZ hn hTwide hTn hTn1\n  -- ‖RectInt'‖ = (1/2π)·‖RectInt‖\n  have hnorm : ‖RectangleIntegral' (Jlag n) (rectZ T) (rectW n T)‖ =\n      (1 / (2 * Real.pi)) * ‖RectangleIntegral (Jlag n) (rectZ T) (rectW n T)‖ := by\n    unfold RectangleIntegral'\n    rw [norm_smul]\n    congr 1\n    have h1 : ‖(2 : ℂ) * (Real.pi : ℂ) * Complex.I‖ = 2 * Real.pi := by\n      rw [norm_mul, Complex.norm_I, mul_one, norm_mul]\n      have h3 : ‖(2 : ℂ)‖ = (2 : ℝ) := by\n        rw [show (2 : ℂ) = ((2 : ℝ) : ℂ) by push_cast; ring, Complex.norm_real]\n        exact abs_of_nonneg (by norm_num)\n      have h4 : ‖(Real.pi : ℂ)‖ = Real.pi := by\n        rw [Complex.norm_real]\n        exact abs_of_nonneg Real.pi_nonneg\n      rw [h3, h4]\n    rw [norm_div, norm_one, h1]\n  -- the rectangle norm triangle\n  have htri : ‖RectangleIntegral (Jlag n) (rectZ T) (rectW n T)‖ ≤\n      ‖HIntegral (Jlag n) (-5 / 2) (2 * Real.sqrt (n : ℝ)) (-T)‖ +\n      ‖HIntegral (Jlag n) (-5 / 2) (2 * Real.sqrt (n : ℝ)) T‖ +\n      ‖VIntegral (Jlag n) (2 * Real.sqrt (n : ℝ)) (-T) T‖ +\n      ‖VIntegral (Jlag n) (-5 / 2) (-T) T‖ := by\n    rw [rectangleIntegral_Jlag_eq n T]\n    have h1 := norm_sub_le (HIntegral (Jlag n) (-5 / 2) (2 * Real.sqrt (n : ℝ)) (-T) -\n      HIntegral (Jlag n) (-5 / 2) (2 * Real.sqrt (n : ℝ)) T +\n      VIntegral (Jlag n) (2 * Real.sqrt (n : ℝ)) (-T) T)\n      (VIntegral (Jlag n) (-5 / 2) (-T) T)\n    have h2 := norm_add_le (HIntegral (Jlag n) (-5 / 2) (2 * Real.sqrt (n : ℝ)) (-T) -\n      HIntegral (Jlag n) (-5 / 2) (2 * Real.sqrt (n : ℝ)) T)\n      (VIntegral (Jlag n) (2 * Real.sqrt (n : ℝ)) (-T) T)\n    have h3 := norm_sub_le (HIntegral (Jlag n) (-5 / 2) (2 * Real.sqrt (n : ℝ)) (-T))\n      (HIntegral (Jlag n) (-5 / 2) (2 * Real.sqrt (n : ℝ)) T)\n    linarith [h1, h2, h3]\n  -- the horizontal pinch\n  have hpinch := pinch_horizontal hn hTn hTn1\n  -- the F-E absorption: e^{1/3} ≤ 1.4 ≤ 2π\n  have he13 : Real.exp (1 / 3 : ℝ) ≤ 2 * Real.pi := by\n    have h1 : Real.exp (1 / 3 : ℝ) ≤ 1.4 := by\n      have h2 : (Real.exp (1 / 3 : ℝ)) ^ 3 ≤ (1.4 : ℝ) ^ 3 := by\n        have h3 : (Real.exp (1 / 3 : ℝ)) ^ 3 = Real.exp 1 := by\n          rw [← Real.exp_nat_mul (1 / 3 : ℝ) 3]\n          congr 1\n          norm_num\n        rw [h3]\n        have h4 : Real.exp 1 ≤ 2.7183 := Real.exp_one_lt_d9.le\n        norm_num at h4 ⊢\n        linarith [h4]\n      exact le_of_pow_le_pow_left₀ (by norm_num : (3 : ℕ) ≠ 0) (by norm_num : (0 : ℝ) ≤ 1.4) h2\n    have h5 : (3 : ℝ) ≤ Real.pi := Real.pi_gt_three.le\n    nlinarith [h1, h5]\n  -- the 1/(2π) comparisons\n  have h2πpos : (0 : ℝ) < 2 * Real.pi := by positivity\n  have h2πle : (1 / (2 * Real.pi)) ≤ 1 := by\n    rw [div_le_iff₀ h2πpos, one_mul]\n    have h := Real.pi_gt_three.le\n    linarith\n  have he13' : (1 / (2 * Real.pi)) * Real.exp (1 / 3 : ℝ) ≤ 1 := by\n    rw [div_le_iff₀ h2πpos, one_mul]\n    exact he13\n  -- nonneg facts\n  have hIIMaj0 : (0 : ℝ) ≤ IIMaj (n : ℝ) := by unfold IIMaj; positivity\n  have hDLR0 : (0 : ℝ) ≤ DogLegRight (n : ℝ) := by unfold DogLegRight IIMaj; positivity\n  have hC0T0 : (0 : ℝ) < C0hat T := by\n    have h2 := two_le_C0hat hT1\n    linarith\n  have hHhat0 : (0 : ℝ) ≤ Hhat T := by\n    unfold Hhat\n    have hL1 : (1 : ℝ) ≤ Real.log (T + 2) := by\n      have ht2 : (0 : ℝ) < T + 2 := by linarith\n      rw [Real.le_log_iff_exp_le ht2]\n      have he := Real.exp_one_lt_d9.le\n      linarith\n    nlinarith [hC0T0.le, hL1]\n  have hX0 : (0 : ℝ) ≤ 4 * T * ((2 / 3) * Z2hat T + 10.5 * Real.log (T + 2) + 48) +\n      40 * 1.3352 := by\n    have h1 := Z2hat_nonneg hT1\n    have h2 := Real.log_nonneg (by linarith : (1 : ℝ) ≤ T + 2)\n    nlinarith [hT0.le]\n  -- the T ≤ √n+1 monotonicity comparisons\n  have hsqrt0 : (0 : ℝ) ≤ Real.sqrt (n : ℝ) := Real.sqrt_nonneg _\n  have hlogT1 : (1 : ℝ) ≤ Real.log (T + 2) := by\n    have ht2 : (0 : ℝ) < T + 2 := by linarith\n    rw [Real.le_log_iff_exp_le ht2]\n    have he := Real.exp_one_lt_d9.le\n    linarith\n  have hFAlt : FAlt T ≤ FAlt (Real.sqrt (n : ℝ) + 1) := by\n    unfold FAlt\n    have hT0' : (0 : ℝ) < T := hT0\n    have hlog1 : (1 : ℝ) ≤ Real.log T := by\n      have ht2 : (0 : ℝ) < T := hT0\n      rw [Real.le_log_iff_exp_le hT0]\n      have he := Real.exp_one_lt_d9.le\n      nlinarith [hTn, hsqrt316, he]\n    have hA : T * Real.log T ≤ (Real.sqrt (n : ℝ) + 1) * Real.log (Real.sqrt (n : ℝ) + 1) := by\n      have h1 := Real.log_le_log hT0 (by linarith [hTn1] : T ≤ Real.sqrt (n : ℝ) + 1)\n      exact mul_le_mul hTn1 h1 (Real.log_nonneg hlog1) (by linarith [hsqrt0])\n    have hB : Real.log T ≤ Real.log (Real.sqrt (n : ℝ) + 1) :=\n      Real.log_le_log hT0 (by linarith [hTn1])\n    have hC : Real.log (Real.log T) ≤ Real.log (Real.log (Real.sqrt (n : ℝ) + 1)) := by\n      apply Real.log_le_log (by linarith [hlog1] : (0 : ℝ) < Real.log T)\n      have h1 : (1 : ℝ) ≤ Real.log (Real.sqrt (n : ℝ) + 1) := by\n        have ht2 : (0 : ℝ) < Real.sqrt (n : ℝ) + 1 := by positivity\n        rw [Real.le_log_iff_exp_le ht2]\n        have he := Real.exp_one_lt_d9.le\n        nlinarith [hsqrt316, he]\n      have h2 : Real.log T ≤ Real.log (Real.sqrt (n : ℝ) + 1) := hB\n      linarith [h2, hlog1]\n    have hconst : (0 : ℝ) ≤ 1 / (2 * Real.pi) := by positivity\n    nlinarith [hA, hB, hC, hconst]\n  have hX : 4 * T * ((2 / 3) * Z2hat T + 10.5 * Real.log (T + 2) + 48) ≤\n      4 * (Real.sqrt (n : ℝ) + 1) *\n        ((2 / 3) * Z2hat (Real.sqrt (n : ℝ) + 1) + 10.5 * Real.log (Real.sqrt (n : ℝ) + 1 + 2) + 48) := by\n    have hZ := Z2hat_mono hT1 hTn1\n    have hlog := Real.log_le_log (by linarith : (0 : ℝ) < T + 2)\n      (by linarith [hTn1] : T + 2 ≤ Real.sqrt (n : ℝ) + 1 + 2)\n    have hXle : (2 / 3) * Z2hat T + 10.5 * Real.log (T + 2) + 48 ≤\n        (2 / 3) * Z2hat (Real.sqrt (n : ℝ) + 1) + 10.5 * Real.log (Real.sqrt (n : ℝ) + 1 + 2) + 48 := by\n      nlinarith [hZ, hlog]\n    have hX0' : (0 : ℝ) ≤ (2 / 3) * Z2hat T + 10.5 * Real.log (T + 2) + 48 := by\n      have h1 := Z2hat_nonneg hT1\n      nlinarith [hlogT1]\n    have h4 : T * ((2 / 3) * Z2hat T + 10.5 * Real.log (T + 2) + 48) ≤\n        (Real.sqrt (n : ℝ) + 1) *\n          ((2 / 3) * Z2hat (Real.sqrt (n : ℝ) + 1) + 10.5 * Real.log (Real.sqrt (n : ℝ) + 1 + 2) + 48) :=\n      mul_le_mul hTn1 hXle hX0' (by linarith [hsqrt0])\n    nlinarith [h4]\n  have hHhat : Hhat T ≤ Hhat (Real.sqrt (n : ℝ) + 1) := by\n    unfold Hhat\n    have hC := C0hat_mono hT1 hTn1\n    have hC2 : C0hat T ^ 2 ≤ C0hat (Real.sqrt (n : ℝ) + 1) ^ 2 :=\n      pow_le_pow_left₀ hC0T0.le hC 2\n    have hlog := Real.log_le_log (by linarith : (0 : ℝ) < T + 2)\n      (by linarith [hTn1] : T + 2 ≤ Real.sqrt (n : ℝ) + 1 + 2)\n    nlinarith [hC2, hlog]\n  -- the Bn unfold\n  have hBn : Bn FAlt (n : ℝ) = 4 * FAlt (Real.sqrt (n : ℝ) + 1) +\n      4 * (Real.sqrt (n : ℝ) + 1) *\n        ((2 / 3) * Z2hat (Real.sqrt (n : ℝ) + 1) + 10.5 * Real.log (Real.sqrt (n : ℝ) + 1 + 2) + 48) +\n      40 * 1.3352 + 2 * (Real.exp 4 + 1) * (7 * Hhat (Real.sqrt (n : ℝ) + 1)) +\n      2 * DogLegRight (n : ℝ) + IIMaj (n : ℝ) + 1 := by\n    unfold Bn\n    rfl\n  rw [hBn]\n  -- the IIMaj absorption: (1/2π)·e^{1/3}·IIMaj ≤ IIMaj\n  have hIIMajAbs : (1 / (2 * Real.pi)) * (Real.exp (1 / 3 : ℝ) * IIMaj (n : ℝ)) ≤\n      IIMaj (n : ℝ) := by\n    have h1 := mul_le_mul_of_nonneg_right he13' hIIMaj0\n    calc (1 / (2 * Real.pi)) * (Real.exp (1 / 3 : ℝ) * IIMaj (n : ℝ))\n        = ((1 / (2 * Real.pi)) * Real.exp (1 / 3 : ℝ)) * IIMaj (n : ℝ) := by ring\n      _ ≤ 1 * IIMaj (n : ℝ) := h1\n      _ = IIMaj (n : ℝ) := by ring\n  -- the Hhat absorption: (1/2π)·Y ≤ Y for Y ≥ 0\n  have hHhatAbs : (1 / (2 * Real.pi)) * (2 * (Real.exp 4 + 1) * (7 * Hhat T)) ≤\n      2 * (Real.exp 4 + 1) * (7 * Hhat T) := by\n    have hY : (0 : ℝ) ≤ 2 * (Real.exp 4 + 1) * (7 * Hhat T) := by\n      have h1 : (0 : ℝ) ≤ 7 * Hhat T := by nlinarith [hHhat0]\n      positivity\n    have h1 := mul_le_mul_of_nonneg_right h2πle hY\n    rwa [one_mul] at h1\n  have hDLRAbs : (1 / (2 * Real.pi)) * (2 * DogLegRight (n : ℝ)) ≤ 2 * DogLegRight (n : ℝ) := by\n    have h1 := mul_le_mul_of_nonneg_right h2πle hDLR0\n    rwa [one_mul] at h1\n  have hXAbs : (1 / (2 * Real.pi)) * (4 * T *\n        ((2 / 3) * Z2hat T + 10.5 * Real.log (T + 2) + 48) + 40 * 1.3352) ≤\n      4 * T * ((2 / 3) * Z2hat T + 10.5 * Real.log (T + 2) + 48) + 40 * 1.3352 := by\n    have h1 := mul_le_mul_of_nonneg_right h2πle hX0\n    rwa [one_mul] at h1\n  -- the mid-bound pinch absorption: (1/2π)·2(e⁴+1)(NI+5.5R) ≤ (1/2π)·2(e⁴+1)·7·Ĥ\n  have hPinchAbs : (1 / (2 * Real.pi)) * (2 * (Real.exp 4 + 1) *\n        (2 * Z2hat T * Real.log (148.5 * C0hat (Real.sqrt (n : ℝ) + 2)) +\n          (3 - -5 / 2) * (10.5 * Real.log (T + 2) + 48))) ≤\n      (1 / (2 * Real.pi)) * (2 * (Real.exp 4 + 1) * (7 * Hhat T)) := by\n    have h1 := mul_le_mul_of_nonneg_left hpinch (by positivity :\n      (0 : ℝ) ≤ (1 / (2 * Real.pi)) * (2 * (Real.exp 4 + 1)))\n    convert h1 using 1\n    · ring\n    · ring\n  -- the giant assembly\n  have hnormRect : ‖RectangleIntegral' (Jlag n) (rectZ T) (rectW n T)‖ ≤\n      (1 / (2 * Real.pi)) *\n        (‖HIntegral (Jlag n) (-5 / 2) (2 * Real.sqrt (n : ℝ)) (-T)‖ +\n          ‖HIntegral (Jlag n) (-5 / 2) (2 * Real.sqrt (n : ℝ)) T‖ +\n          ‖VIntegral (Jlag n) (2 * Real.sqrt (n : ℝ)) (-T) T‖ +\n          ‖VIntegral (Jlag n) (-5 / 2) (-T) T‖) := by\n    rw [hnorm]\n    have h1 := mul_le_mul_of_nonneg_left htri (by positivity : (0 : ℝ) ≤ 1 / (2 * Real.pi))\n    exact h1\n  -- |Sf n| ≤ ‖RectInt'‖ + ‖Σ‖, now everything slots in\n  nlinarith [hsf, hnormRect, hVl, hVr, hH, hbridge, hIIMajAbs, hHhatAbs,\n    hDLRAbs, hXAbs, hPinchAbs, hFAlt, hX, hHhat, hIIMaj0, hDLR0, hHhat0, hX0]\n\nend NguyenRH1"},"extra_content":null}]