Current task: —

← Session 35 — ii′-6-R: Lagarias 6.1 right-tail re-proof (E-032/D-073)

#2134 assistant 2026-08-26 06:12:19.464 UTC · 778→2538 tok open ⤢
thinking (6348 chars)
`integral_eq_sub_of_hasDerivAt (hderiv : ∀ x ∈ uIcc a b, HasDerivAt f (f' x) x) (hint : IntervalIntegrable f' volume a b) : ∫ y in a..b, f' y = f b - f a` — needs the derivative at every point of uIcc + integrability of f'. For e^{−cσ} and 2^{−σ} both are smooth, integrable (continuous). Now write DL-3c + DL-3d. Plan the declarations: 1. `Jlag_dogleg_norm_le_envelope` — the product envelope (pointwise). 2. `dirichlet_exp_int_bound` — ∫₃^XR 4·e^{−cσ}dσ ≤ e^{4/3}/(2c) as a real integral fact (with c = log2−4/9). 3. `two_pow_neg_int_bound` — ∫₃^XR 4·2^{−σ}dσ ≤ 1/(2 log 2). 4. Certified constants: c_ge, e43_le, R_DL assembly. 5. Capstone `hIntegral_Jlag_dogleg_norm_le` : ‖HIntegral (Jlag n) 3 XR U‖ ≤ 8.38. Details for 2 (∫ e^{−cσ}): F(σ) = −exp(−cσ)/c: HasDerivAt F (exp(−cσ)) σ: ``` have hF : ∀ x ∈ Set.uIcc 3 XR, HasDerivAt (fun σ => -Real.exp (-c * σ) / c) (Real.exp (-c * x)) x := by intro x hx have h1 : HasDerivAt (fun σ => -c * σ) (-c) x := hasDerivAt_const_mul _ -- hmm: (fun σ => -c * σ) deriv = -c have h2 := h1.exp -- HasDerivAt (fun σ => Real.exp (-c * σ)) (Real.exp (-c * x) * (-c)) x -- want: HasDerivAt (fun σ => -exp(-cσ)/c) (exp(-cσ)) x have h3 := h2.neg.div_const c -- (-exp(-cσ))/c has deriv (-(exp(-c x)·(-c)))/c = exp(-c x)·c/c = exp(-c x) convert h3 using 2 field_simp [hc.ne'] ``` hasDerivAt_const_mul : HasDerivAt (fun x => c * x) c x — Mathlib: `HasDerivAt.const_mul (c : ℝ) (h : HasDerivAt f f' x) : HasDerivAt (fun x => c * f x) (c * f') x` — for (fun σ => -c·σ): that's (fun σ => -c * σ) = const_mul of id: HasDerivAt.const_mul (-c) (hasDerivAt_id' x) : HasDerivAt (fun σ => -c * σ) (-c * 1) x = (-c) x ✓. Or `(hasDerivAt_id' x).const_mul (-c)`. Then .exp : HasDerivAt (fun σ => exp (-c·σ)) (exp (-c·x)·(-c)) — wait: HasDerivAt.exp (h : HasDerivAt f f' x) : HasDerivAt (fun x => Real.exp (f x)) (Real.exp (f x) * f') x ✓. Then the antiderivative: (fun σ => -exp(-cσ)/c) with derivative exp(-cσ): from h2 : HasDerivAt (fun σ => exp(-cσ)) (exp(-c x)·(-c)) x: (h2.neg.div_const c)?? — HasDerivAt.neg.div_const? or: HasDerivAt (fun σ => (-1/c)·exp(-cσ)) ((-1/c)·(exp(-c x)·(-c))) x via .const_mul (-1/c) — then the derivative value (−1/c)·(−c·exp) = exp ✓. Cleaner: ``` have h2 := (h1.exp).const_mul (-1 / c) -- HasDerivAt (fun σ => (-1/c)·exp(-cσ)) ((-1/c)·(exp(-c x)·(-c))) x convert h2 using 2 · ext σ; field_simp [hc.ne'] -- (-1/c)·exp = -exp/c · field_simp [hc.ne'] -- (-1/c)·(exp·(-c)) = exp ``` Hmm — convert ... using 2 with two subgoals (function pointwise + derivative value). The function form: (fun σ => -Real.exp (-c * σ) / c) vs (fun σ => (-1/c)·exp(-cσ)): pointwise equal via field_simp. The derivative: (-1/c)·(exp(-c x)·(-c)) = exp(-c x) via field_simp (c ≠ 0). FTC: ∫_3^XR exp(−cσ) dσ = F(XR) − F(3) = −e^{−c·XR}/c + e^{−3c}/c ≤ e^{−3c}/c (e^{−c·XR}/c ≥ 0 ✓). hint (integrability of exp(−cσ)): ContinuousOn ✓ → intervalIntegrable_of_Icc? `ContinuousOn.intervalIntegrable` : ContinuousOn f (Icc a b) → IntervalIntegrable f μ a b ✓ exists. Similarly for 2^{−σ}: 2^{−σ} = exp(−σ log 2): antiderivative −2^{−σ}/log 2: HasDerivAt (fun σ => -(2:ℝ)^(-σ)/Real.log 2) ((2:ℝ)^(-σ)) σ: ``` have h1 : HasDerivAt (fun σ => Real.exp (-(Real.log 2) * σ)) (Real.exp (-(Real.log 2) * x) * (-(Real.log 2))) x := ... -- 2^{−σ} = exp(−σ log 2) via rpow_def_of_pos ``` Or directly with rpow: deriv of (2:ℝ)^(-σ) = −log 2·2^{−σ} — via rpow: HasDerivAt.rpow? — cleaner via the exp form: write 2^{−σ} = exp(−(log 2)·σ) once and reuse the exp machine with c := log 2. So generalize: a helper lemma `int_exp_neg_mul_le` : for c > 0, ∫_3^XR exp(−cσ) dσ ≤ exp(−3c)/c (~40 lines with the FTC), used twice (c and log 2). Then: - ∫_3^XR 4·exp(−cσ) ≤ 4·exp(−3c)/c = e^{4/3}/(2c)·... wait — the algebra: 4·exp(−3c)/c with exp(−3c) = e^{4/3}/8: = e^{4/3}/(2c) ✓. - ∫_3^XR 4·2^{−σ} ≤ 4·2^{−3}/log 2 = 1/(2 log 2) ✓. The envelope integral: ∫_3^XR (4e^{−cσ}+4·2^{−σ})·dirichletC2 = dirichletC2·[4∫e^{−cσ} + 4∫2^{−σ}] via integral_add (needs both integrable) + integral_const_mul. The norm comparison: ‖HIntegral (Jlag n) 3 XR U‖ = ‖∫_{3}^{XR} Jlag(σ+iU)dσ‖ ≤ ∫_3^XR ‖Jlag‖ dσ — via intervalIntegral.norm_integral_le_of_norm_le (hab, the a.e. bound, g-integrable) with g(σ) = (4e^{−cσ}+4·2^{−σ})·dirichletC2 — the pointwise envelope (from Jlag_dogleg_norm_le_envelope) ✓ and then ∫‖Jlag‖ ≤ ∫g by the same lemma again? No — norm_integral_le_of_norm_le directly compares ‖∫f‖ ≤ ∫g when ‖f‖ ≤ g a.e. ✓ one step. Then ∫g ≤ dirichletC2·[e^{4/3}/(2c) + 1/(2 log 2)] ≤ 8.38 (dirichletC2 ≤ 1 + the certified constants). Let me also handle: U's role — the envelope needs hnU : n ≤ (4/9)·U² — the capstone's hypothesis: U² ≥ (9/4)n ⟺ n ≤ (4/9)U² ✓ pass through. Let me write the whole DL-3c/d block now (~250 lines). Careful with: Real.exp_nat_mul forms, the 2^{−σ} = exp(−(log2)σ) conversion, FTC, integral_add/const_mul, intervalIntegrable, the certified constants. One more check — `Real.exp_one_lt_d9` and `Real.log_two_gt_d9`/`lt_d9` — used in LiBasePoints ✓ exist. `exp_le_inv_sub_sixteen` — in LiBasePoints.lean ✓ (imported via LiTightR → LiSkeleton → LiBasePoints? LiDogLeg imports LiTightR which imports LiReflect... does it pull LiBasePoints? LiBasePoints imports LiSkeleton; LiTightR imports LiReflect/LiCircleBound/LiTrivialZeros... — the import chain of LiDogLeg: LiSides + LiTightR. exp_le_inv_sub_sixteen is in LiBasePoints — is LiBasePoints in the transitive closure? LiTightR imports... let me check: LiTightR.lean's imports — probably NguyenRH1.LiReflect, LiCircleBound, LiTrivialZeros, LiGapCircles, LiDigammaLeft, LiSeries, LiFEntire, LiSqueeze... and LiSkeleton? The exp_le_inv_sub_sixteen is in LiBasePoints.lean which imports LiSkeleton. LiSkeleton is imported by LiTightR? Let me check — the tight R file needs C0hat/Hhat etc. from LiSkeleton presumably ✓ so LiBasePoints... no — LiBasePoints is separate (imports LiSkeleton, not the other way). Is LiBasePoints imported by anything LiDogLeg sees? LiSides ← LiPrincipal ← ... hmm. Let me just add `import NguyenRH1.LiBasePoints` to LiDogLeg — wait, LiBasePoints imports LiSkeleton which is fine; the root NguyenRH1.lean imports everything anyway. To be safe, I'll import NguyenRH1.LiBasePoints in LiDogLeg.lean if exp_le_inv_sub_sixteen isn't reachable. Let me check LiTightR's imports.
Both names confirmed. Checking whether `exp_le_inv_sub_sixteen` (LiBasePoints) is reachable from LiDogLeg's imports.
tool: Bash
input
{
  "command": "cd D:/Python/Quantum/research/lean/NguyenRH1 && head -12 NguyenRH1/LiTightR.lean | grep import; head -12 NguyenRH1/LiSides.lean | grep import",
  "description": "Check LiTightR/LiSides import chains"
}
raw content_json (database row)
[{"type":"thinking","thinking":"`integral_eq_sub_of_hasDerivAt (hderiv : ∀ x ∈ uIcc a b, HasDerivAt f (f' x) x) (hint : IntervalIntegrable f' volume a b) : ∫ y in a..b, f' y = f b - f a` — needs the derivative at every point of uIcc + integrability of f'. For e^{−cσ} and 2^{−σ} both are smooth, integrable (continuous).\n\nNow write DL-3c + DL-3d. Plan the declarations:\n\n1. `Jlag_dogleg_norm_le_envelope` — the product envelope (pointwise).\n2. `dirichlet_exp_int_bound` — ∫₃^XR 4·e^{−cσ}dσ ≤ e^{4/3}/(2c) as a real integral fact (with c = log2−4/9).\n3. `two_pow_neg_int_bound` — ∫₃^XR 4·2^{−σ}dσ ≤ 1/(2 log 2).\n4. Certified constants: c_ge, e43_le, R_DL assembly.\n5. Capstone `hIntegral_Jlag_dogleg_norm_le` : ‖HIntegral (Jlag n) 3 XR U‖ ≤ 8.38.\n\nDetails for 2 (∫ e^{−cσ}): F(σ) = −exp(−cσ)/c: HasDerivAt F (exp(−cσ)) σ:\n```\n  have hF : ∀ x ∈ Set.uIcc 3 XR, HasDerivAt (fun σ => -Real.exp (-c * σ) / c)\n      (Real.exp (-c * x)) x := by\n    intro x hx\n    have h1 : HasDerivAt (fun σ => -c * σ) (-c) x := hasDerivAt_const_mul _  -- hmm: (fun σ => -c * σ) deriv = -c\n    have h2 := h1.exp  -- HasDerivAt (fun σ => Real.exp (-c * σ)) (Real.exp (-c * x) * (-c)) x\n    -- want: HasDerivAt (fun σ => -exp(-cσ)/c) (exp(-cσ)) x\n    have h3 := h2.neg.div_const c\n    -- (-exp(-cσ))/c has deriv (-(exp(-c x)·(-c)))/c = exp(-c x)·c/c = exp(-c x)\n    convert h3 using 2\n    field_simp [hc.ne']\n```\nhasDerivAt_const_mul : HasDerivAt (fun x => c * x) c x — Mathlib: `HasDerivAt.const_mul (c : ℝ) (h : HasDerivAt f f' x) : HasDerivAt (fun x => c * f x) (c * f') x` — for (fun σ => -c·σ): that's (fun σ => -c * σ) = const_mul of id: HasDerivAt.const_mul (-c) (hasDerivAt_id' x) : HasDerivAt (fun σ => -c * σ) (-c * 1) x = (-c) x ✓. Or `(hasDerivAt_id' x).const_mul (-c)`.\n\nThen .exp : HasDerivAt (fun σ => exp (-c·σ)) (exp (-c·x)·(-c)) — wait: HasDerivAt.exp (h : HasDerivAt f f' x) : HasDerivAt (fun x => Real.exp (f x)) (Real.exp (f x) * f') x ✓.\n\nThen the antiderivative: (fun σ => -exp(-cσ)/c) with derivative exp(-cσ): from h2 : HasDerivAt (fun σ => exp(-cσ)) (exp(-c x)·(-c)) x: (h2.neg.div_const c)?? — HasDerivAt.neg.div_const? or: HasDerivAt (fun σ => (-1/c)·exp(-cσ)) ((-1/c)·(exp(-c x)·(-c))) x via .const_mul (-1/c) — then the derivative value (−1/c)·(−c·exp) = exp ✓. Cleaner:\n```\n    have h2 := (h1.exp).const_mul (-1 / c)\n    -- HasDerivAt (fun σ => (-1/c)·exp(-cσ)) ((-1/c)·(exp(-c x)·(-c))) x\n    convert h2 using 2\n    · ext σ; field_simp [hc.ne']  -- (-1/c)·exp = -exp/c\n    · field_simp [hc.ne']  -- (-1/c)·(exp·(-c)) = exp\n```\nHmm — convert ... using 2 with two subgoals (function pointwise + derivative value). The function form: (fun σ => -Real.exp (-c * σ) / c) vs (fun σ => (-1/c)·exp(-cσ)): pointwise equal via field_simp. The derivative: (-1/c)·(exp(-c x)·(-c)) = exp(-c x) via field_simp (c ≠ 0).\n\nFTC: ∫_3^XR exp(−cσ) dσ = F(XR) − F(3) = −e^{−c·XR}/c + e^{−3c}/c ≤ e^{−3c}/c (e^{−c·XR}/c ≥ 0 ✓).\n\nhint (integrability of exp(−cσ)): ContinuousOn ✓ → intervalIntegrable_of_Icc? `ContinuousOn.intervalIntegrable` : ContinuousOn f (Icc a b) → IntervalIntegrable f μ a b ✓ exists.\n\nSimilarly for 2^{−σ}: 2^{−σ} = exp(−σ log 2): antiderivative −2^{−σ}/log 2: HasDerivAt (fun σ => -(2:ℝ)^(-σ)/Real.log 2) ((2:ℝ)^(-σ)) σ:\n```\n    have h1 : HasDerivAt (fun σ => Real.exp (-(Real.log 2) * σ)) (Real.exp (-(Real.log 2) * x) * (-(Real.log 2))) x := ...\n    -- 2^{−σ} = exp(−σ log 2) via rpow_def_of_pos\n```\nOr directly with rpow: deriv of (2:ℝ)^(-σ) = −log 2·2^{−σ} — via rpow: HasDerivAt.rpow? — cleaner via the exp form: write 2^{−σ} = exp(−(log 2)·σ) once and reuse the exp machine with c := log 2.\n\nSo generalize: a helper lemma `int_exp_neg_mul_le` : for c > 0, ∫_3^XR exp(−cσ) dσ ≤ exp(−3c)/c (~40 lines with the FTC), used twice (c and log 2).\n\nThen:\n- ∫_3^XR 4·exp(−cσ) ≤ 4·exp(−3c)/c = e^{4/3}/(2c)·... wait — the algebra: 4·exp(−3c)/c with exp(−3c) = e^{4/3}/8: = e^{4/3}/(2c) ✓.\n- ∫_3^XR 4·2^{−σ} ≤ 4·2^{−3}/log 2 = 1/(2 log 2) ✓.\n\nThe envelope integral: ∫_3^XR (4e^{−cσ}+4·2^{−σ})·dirichletC2 = dirichletC2·[4∫e^{−cσ} + 4∫2^{−σ}] via integral_add (needs both integrable) + integral_const_mul.\n\nThe norm comparison: ‖HIntegral (Jlag n) 3 XR U‖ = ‖∫_{3}^{XR} Jlag(σ+iU)dσ‖ ≤ ∫_3^XR ‖Jlag‖ dσ — via intervalIntegral.norm_integral_le_of_norm_le (hab, the a.e. bound, g-integrable) with g(σ) = (4e^{−cσ}+4·2^{−σ})·dirichletC2 — the pointwise envelope (from Jlag_dogleg_norm_le_envelope) ✓ and then ∫‖Jlag‖ ≤ ∫g by the same lemma again? No — norm_integral_le_of_norm_le directly compares ‖∫f‖ ≤ ∫g when ‖f‖ ≤ g a.e. ✓ one step.\n\nThen ∫g ≤ dirichletC2·[e^{4/3}/(2c) + 1/(2 log 2)] ≤ 8.38 (dirichletC2 ≤ 1 + the certified constants).\n\nLet me also handle: U's role — the envelope needs hnU : n ≤ (4/9)·U² — the capstone's hypothesis: U² ≥ (9/4)n ⟺ n ≤ (4/9)U² ✓ pass through.\n\nLet me write the whole DL-3c/d block now (~250 lines). Careful with: Real.exp_nat_mul forms, the 2^{−σ} = exp(−(log2)σ) conversion, FTC, integral_add/const_mul, intervalIntegrable, the certified constants.\n\nOne more check — `Real.exp_one_lt_d9` and `Real.log_two_gt_d9`/`lt_d9` — used in LiBasePoints ✓ exist. `exp_le_inv_sub_sixteen` — in LiBasePoints.lean ✓ (imported via LiTightR → LiSkeleton → LiBasePoints? LiDogLeg imports LiTightR which imports LiReflect... does it pull LiBasePoints? LiBasePoints imports LiSkeleton; LiTightR imports LiReflect/LiCircleBound/LiTrivialZeros... — the import chain of LiDogLeg: LiSides + LiTightR. exp_le_inv_sub_sixteen is in LiBasePoints — is LiBasePoints in the transitive closure? LiTightR imports... let me check: LiTightR.lean's imports — probably NguyenRH1.LiReflect, LiCircleBound, LiTrivialZeros, LiGapCircles, LiDigammaLeft, LiSeries, LiFEntire, LiSqueeze... and LiSkeleton? The exp_le_inv_sub_sixteen is in LiBasePoints.lean which imports LiSkeleton. LiSkeleton is imported by LiTightR? Let me check — the tight R file needs C0hat/Hhat etc. from LiSkeleton presumably ✓ so LiBasePoints... no — LiBasePoints is separate (imports LiSkeleton, not the other way). Is LiBasePoints imported by anything LiDogLeg sees? LiSides ← LiPrincipal ← ... hmm. Let me just add `import NguyenRH1.LiBasePoints` to LiDogLeg — wait, LiBasePoints imports LiSkeleton which is fine; the root NguyenRH1.lean imports everything anyway. To be safe, I'll import NguyenRH1.LiBasePoints in LiDogLeg.lean if exp_le_inv_sub_sixteen isn't reachable. Let me check LiTightR's imports.","signature":""},{"type":"text","text":"Both names confirmed. Checking whether `exp_le_inv_sub_sixteen` (LiBasePoints) is reachable from LiDogLeg's imports."},{"type":"tool_use","id":"Bash_254","name":"Bash","input":{"command":"cd D:/Python/Quantum/research/lean/NguyenRH1 && head -12 NguyenRH1/LiTightR.lean | grep import; head -12 NguyenRH1/LiSides.lean | grep import","description":"Check LiTightR/LiSides import chains"},"extra_content":null}]