← Session 30 — ii′-5e squeeze capstone + 5f perimeter repair
thinking (6483 chars)
`unfold C0hat` is the pattern used. `Real.log_pow (x : ℝ) (n : ℕ) : log (x ^ n) = n * log x` ✓.
Now writing LiSqueeze.lean. Full file:
```lean
/-
NguyenRH1/LiSqueeze.lean — tier ii′ sub-stage ii′-5e-v-d (D-068 §5):
the Schwarz squeeze ⟹ the partial-fraction capstone.
§1: the Ĉ₀ growth bound `C0hat_add_two_le` (Ĉ₀(R+2) ≤ 5·log R).
§2: `not_badPoint_on_gapCircle` — every point of a γ-gap circle is good.
§3: `gentire_circle_le` — the Fexpr circle bound transferred to Gentire.
§4: `gentire_const` — max-modulus + Schwarz on the gap-circle sequence
⟹ Gentire ≡ Gentire 0 (the (log R)³/R → 0 squeeze).
§5: the capstone `partialFraction_identity` (hZC : ZeroCountProp).
Archive references: D-068 §5, STATE.md session-034 next-action design.
-/
import Mathlib
import NguyenRH1.LiCircleBound
open Zeta23 Complex Filter Topology
noncomputable section
namespace NguyenRH1
```
Then the content. Let me carefully write out each proof.
§1:
```lean
/-! ## 1. The Ĉ₀ growth bound -/
/-- Ĉ₀(R+2) ≤ 5·log R for R ≥ 16002 (log R ≥ 9): log(R+4) ≤ 2·log R,
log log(R+4) ≤ 2·log R, 2.9 ≤ (1/3)·log R. -/
lemma C0hat_add_two_le {R : ℝ} (hR : 16002 ≤ R) : C0hat (R + 2) ≤ 5 * Real.log R := by
have hRpos : (0 : ℝ) < R := by linarith
have hlogR : (9 : ℝ) ≤ Real.log R := nine_le_log_of_16002_le hR
have h1 : Real.log (R + 2 + 2) ≤ 2 * Real.log R := by
have hle : R + 2 + 2 ≤ R ^ 2 := by nlinarith [hR]
have h2 : Real.log (R + 2 + 2) ≤ Real.log (R ^ 2) :=
Real.log_le_log (by linarith : (0 : ℝ) < R + 2 + 2) hle
rwa [Real.log_pow, Nat.cast_two] at h2
have h2 : Real.log (Real.log (R + 2 + 2)) ≤ 2 * Real.log R := by
have hpos1 : (0 : ℝ) < Real.log (R + 2 + 2) := by
have hle : Real.log R ≤ Real.log (R + 2 + 2) :=
Real.log_le_log hRpos (by linarith)
linarith [hlogR]
have h3 : Real.log (Real.log (R + 2 + 2)) ≤ Real.log (2 * Real.log R) :=
Real.log_le_log hpos1 h1
have h4 : Real.log (2 * Real.log R) = Real.log 2 + Real.log (Real.log R) := by
rw [Real.log_mul (by norm_num) (by linarith [hlogR] : Real.log R ≠ 0)]
have h5 : Real.log 2 ≤ 1 := by
have h := Real.log_le_sub_one_of_pos (by norm_num : (0 : ℝ) < 2)
linarith
have h6 : Real.log (Real.log R) ≤ Real.log R := by
have h := Real.log_le_sub_one_of_pos (by linarith [hlogR] : (0 : ℝ) < Real.log R)
linarith
linarith [h3, h4, h5, h6, hlogR]
unfold C0hat
linarith [h1, h2, hlogR]
```
Check `Real.log_mul (hx : x ≠ 0) (hy : y ≠ 0) : log (x*y) = log x + log y` ✓ standard.
nlinarith [hR] for R+4 ≤ R²: R ≥ 16002 ⟹ R² ≥ R·R ≥ 16002·R ≥ R + 4? nlinarith needs: R² − (R+4) = R(R−1) − 4 ≥ 16002·16001 − 4 > 0. nlinarith [hR] should multiply hR by itself: (R − 16002) ≥ 0 squared-terms... R² ≥ 16002² and needs R² − R − 4 ≥ 0: nlinarith [hR] with products hR*hR gives R² ≥ 16002R... hmm hR : 16002 ≤ R. nlinarith considers pairwise products of hypotheses: hR*hR : (R−16002)² ≥ 0; hR*goal-negation: (R−16002)(R+4−R²) ≤ 0... nlinarith should find: R² − R − 4 = (R−16002)·R + 16001·R − 4 ≥ 0 + 16001·16002 − 4 > 0 — uses hR*R? nlinarith multiplies hypotheses by each other and by the negated goal: product (R − 16002) * (R − 16002) ≥ 0 gives R² ≥ 32004R − 16002²; then need 32004R − 16002² − R − 4 ≥ 0 ⟸ 32003R ≥ 16002² + 4 ⟸ R ≥ 16002·(32003/16002)... 32003·16002 = 16002²·2 − 16002 = hmm: 32003·16002 = 2·16002² − 16002 ≥ 16002² + 4 ⟺ 16002² ≥ 16006 ✓ (256064004 ≥ 16006). So linarith-after-products works: nlinarith [hR] should close it. To be extra safe: nlinarith [hR, hRpos]. OK.
Also `nine_le_log_of_16002_le` — verify exact name (used at LiCircleBound line 3826 ✓ same name).
§2:
```lean
/-! ## 2. Every γ-gap-circle point is good -/
lemma not_badPoint_on_gapCircle {k : ℕ} (hk : 4000 ≤ k) {R : ℝ}
(hRlo : 4 * (k : ℝ) + 5 / 2 ≤ R)
(hgap : ∀ ρ : ℂ, IsNontrivialZero ρ →
1 / (16 * C0hat (4 * (k : ℝ) + 9 / 2)) ≤ |ρ.im - R| ∨ 1 ≤ |ρ.im - R|)
(hgapInt : ∀ m : ℤ, 1 / 4 ≤ |R / 2 - (m : ℝ)|)
{s : ℂ} (hs : ‖s‖ = R) : ¬ badPoint s := by
have hR16002 : (16002 : ℝ) ≤ R := by
have h1 : (4000 : ℝ) ≤ (k : ℝ) := by exact_mod_cast hk
linarith [hRlo]
have hRpos : (0 : ℝ) < R := by linarith [hR16002]
rintro (h | h | h | ⟨n, -, h⟩)
· exact not_isNontrivialZero_on_gapCircle hk hRlo hgap hs h
· rw [h, norm_zero] at hs
linarith [hRpos]
· rw [h, norm_one] at hs
linarith [hR16002]
· have hR2 : R = 2 * (n : ℝ) := by
rw [← hs, h, norm_mul]
have h1 : ‖(-2 : ℂ)‖ = 2 := by
rw [show (-2 : ℂ) = ((-2 : ℝ) : ℂ) by push_cast; ring, Complex.norm_real]
norm_num
rw [h1, Complex.norm_natCast]
have hcon := hgapInt (n : ℤ)
rw [Int.cast_natCast] at hcon
have h0 : R / 2 - (n : ℝ) = 0 := by rw [hR2]; ring
rw [h0, abs_zero] at hcon
linarith [hcon]
```
Wait — rintro fourth case: ⟨n, hn, h⟩ where hn : 1 ≤ n is unused → use ⟨n, -, h⟩ ✓ (anonymous). Actually rintro's `-` clears it ✓ fine (no warning for unused if cleared? `-` clears the hypothesis ✓).
norm_zero at hs: hs : ‖(0:ℂ)‖ = R → rw [norm_zero] at hs : (0:ℝ) = R ✓ wait — rw [h] at hs first: hs : ‖(0 : ℂ)‖ = R. Then norm_zero : ‖(0:α)‖ = 0: rw at hs: hs : (0:ℝ) = R ✓.
Case 3: rw [h] at hs : ‖(1:ℂ)‖ = R; norm_one: hs : (1:ℝ) = R; linarith [hR16002] gives 16002 ≤ 1 false ✓.
Case 4: rw [← hs, h, norm_mul]: goal R = 2*(n:ℝ). rw [← hs]: R ↦ ‖s‖: goal ‖s‖ = 2*(n:ℝ). rw [h]: s ↦ -2*(n:ℂ): goal ‖-2*(n:ℂ)‖ = 2*(n:ℝ). rw [norm_mul]: ‖-2‖*‖(n:ℂ)‖ = 2*(n:ℝ). rw [h1]: 2*‖(n:ℂ)‖ = 2*(n:ℝ). rw [Complex.norm_natCast]: 2*(n:ℝ) = 2*(n:ℝ) ✓ closed by rfl (rw auto-closes). Complex.norm_natCast : ‖(n:ℂ)‖ = (n:ℝ)? — used at LiCircleBound:3410 `rw [h1, Complex.norm_natCast]` — similar context ✓ trust. But wait — is there a coercion match: ‖((n:ℕ):ℂ)‖ — Complex.norm_natCast (n : ℕ) : ‖(↑n : ℂ)‖ = ↑n ✓.
hcon : 1/4 ≤ |R/2 − ((n:ℤ):ℝ)|; rw [Int.cast_natCast] at hcon: |R/2 − (n:ℝ)| ✓. h0 : R/2 − (n:ℝ) = 0: rw [hR2] changes goal R/2 − n = 0 with R ↦ 2*n: 2*n/2 − n = 0 by ring ✓. rw [h0] at hcon: |0| ; rw [abs_zero]: 1/4 ≤ (0:ℝ) — linarith ✓ (norm_num at hcon also fine; linarith [hcon] with hcon : 1/4 ≤ 0 — linarith closes any goal from a false hypothesis ✓; actually after rw the goal is False (rintro case goal) ✓ linarith closes).
Hmm wait — after rintro, each case's goal is False ✓ (since we're proving ¬ badPoint s, i.e. badPoint s → False).
§3 as sketched. ✓
§4 gentire_const — full assembly. Let me also double check `div_le_div_of_nonneg_right` signature in this Mathlib to be safe:
One more name check (`div_le_div_of_nonneg_right`, `Nat.le_ceil`, `div_mul_cancel₀`), then writing the file.
tool: Bash
input
{
"command": "M=D:/Python/Quantum/zeta-23-lean/.lake/packages/mathlib/Mathlib; grep -rn \"theorem div_le_div_of_nonneg_right\\|lemma div_le_div_of_nonneg_right\" $M --include=\"*.lean\" | head -2; grep -rn \"theorem le_ceil \" $M/Algebra/Order/Floor.lean | head -2; grep -rn \"theorem div_mul_cancel\u2080\" $M/Algebra/GroupWithZero/Basic.lean $M/Algebra/GroupWithZero/*.lean 2>/dev/null | head -3; grep -rn \"div_mul_cancel\u2080\" D:/Python/Quantum/research/lean/NguyenRH1/NguyenRH1/*.lean | head -3",
"description": "Verify division lemma signatures"
}
raw content_json (database row)
[{"type":"thinking","thinking":"`unfold C0hat` is the pattern used. `Real.log_pow (x : ℝ) (n : ℕ) : log (x ^ n) = n * log x` ✓.\n\nNow writing LiSqueeze.lean. Full file:\n\n```lean\n/-\nNguyenRH1/LiSqueeze.lean — tier ii′ sub-stage ii′-5e-v-d (D-068 §5):\nthe Schwarz squeeze ⟹ the partial-fraction capstone.\n\n§1: the Ĉ₀ growth bound `C0hat_add_two_le` (Ĉ₀(R+2) ≤ 5·log R).\n§2: `not_badPoint_on_gapCircle` — every point of a γ-gap circle is good.\n§3: `gentire_circle_le` — the Fexpr circle bound transferred to Gentire.\n§4: `gentire_const` — max-modulus + Schwarz on the gap-circle sequence\n ⟹ Gentire ≡ Gentire 0 (the (log R)³/R → 0 squeeze).\n§5: the capstone `partialFraction_identity` (hZC : ZeroCountProp).\n\nArchive references: D-068 §5, STATE.md session-034 next-action design.\n-/\nimport Mathlib\nimport NguyenRH1.LiCircleBound\n\nopen Zeta23 Complex Filter Topology\n\nnoncomputable section\n\nnamespace NguyenRH1\n```\n\nThen the content. Let me carefully write out each proof.\n\n§1:\n```lean\n/-! ## 1. The Ĉ₀ growth bound -/\n\n/-- Ĉ₀(R+2) ≤ 5·log R for R ≥ 16002 (log R ≥ 9): log(R+4) ≤ 2·log R,\nlog log(R+4) ≤ 2·log R, 2.9 ≤ (1/3)·log R. -/\nlemma C0hat_add_two_le {R : ℝ} (hR : 16002 ≤ R) : C0hat (R + 2) ≤ 5 * Real.log R := by\n have hRpos : (0 : ℝ) < R := by linarith\n have hlogR : (9 : ℝ) ≤ Real.log R := nine_le_log_of_16002_le hR\n have h1 : Real.log (R + 2 + 2) ≤ 2 * Real.log R := by\n have hle : R + 2 + 2 ≤ R ^ 2 := by nlinarith [hR]\n have h2 : Real.log (R + 2 + 2) ≤ Real.log (R ^ 2) :=\n Real.log_le_log (by linarith : (0 : ℝ) < R + 2 + 2) hle\n rwa [Real.log_pow, Nat.cast_two] at h2\n have h2 : Real.log (Real.log (R + 2 + 2)) ≤ 2 * Real.log R := by\n have hpos1 : (0 : ℝ) < Real.log (R + 2 + 2) := by\n have hle : Real.log R ≤ Real.log (R + 2 + 2) :=\n Real.log_le_log hRpos (by linarith)\n linarith [hlogR]\n have h3 : Real.log (Real.log (R + 2 + 2)) ≤ Real.log (2 * Real.log R) :=\n Real.log_le_log hpos1 h1\n have h4 : Real.log (2 * Real.log R) = Real.log 2 + Real.log (Real.log R) := by\n rw [Real.log_mul (by norm_num) (by linarith [hlogR] : Real.log R ≠ 0)]\n have h5 : Real.log 2 ≤ 1 := by\n have h := Real.log_le_sub_one_of_pos (by norm_num : (0 : ℝ) < 2)\n linarith\n have h6 : Real.log (Real.log R) ≤ Real.log R := by\n have h := Real.log_le_sub_one_of_pos (by linarith [hlogR] : (0 : ℝ) < Real.log R)\n linarith\n linarith [h3, h4, h5, h6, hlogR]\n unfold C0hat\n linarith [h1, h2, hlogR]\n```\nCheck `Real.log_mul (hx : x ≠ 0) (hy : y ≠ 0) : log (x*y) = log x + log y` ✓ standard.\n\nnlinarith [hR] for R+4 ≤ R²: R ≥ 16002 ⟹ R² ≥ R·R ≥ 16002·R ≥ R + 4? nlinarith needs: R² − (R+4) = R(R−1) − 4 ≥ 16002·16001 − 4 > 0. nlinarith [hR] should multiply hR by itself: (R − 16002) ≥ 0 squared-terms... R² ≥ 16002² and needs R² − R − 4 ≥ 0: nlinarith [hR] with products hR*hR gives R² ≥ 16002R... hmm hR : 16002 ≤ R. nlinarith considers pairwise products of hypotheses: hR*hR : (R−16002)² ≥ 0; hR*goal-negation: (R−16002)(R+4−R²) ≤ 0... nlinarith should find: R² − R − 4 = (R−16002)·R + 16001·R − 4 ≥ 0 + 16001·16002 − 4 > 0 — uses hR*R? nlinarith multiplies hypotheses by each other and by the negated goal: product (R − 16002) * (R − 16002) ≥ 0 gives R² ≥ 32004R − 16002²; then need 32004R − 16002² − R − 4 ≥ 0 ⟸ 32003R ≥ 16002² + 4 ⟸ R ≥ 16002·(32003/16002)... 32003·16002 = 16002²·2 − 16002 = hmm: 32003·16002 = 2·16002² − 16002 ≥ 16002² + 4 ⟺ 16002² ≥ 16006 ✓ (256064004 ≥ 16006). So linarith-after-products works: nlinarith [hR] should close it. To be extra safe: nlinarith [hR, hRpos]. OK.\n\nAlso `nine_le_log_of_16002_le` — verify exact name (used at LiCircleBound line 3826 ✓ same name).\n\n§2:\n```lean\n/-! ## 2. Every γ-gap-circle point is good -/\n\nlemma not_badPoint_on_gapCircle {k : ℕ} (hk : 4000 ≤ k) {R : ℝ}\n (hRlo : 4 * (k : ℝ) + 5 / 2 ≤ R)\n (hgap : ∀ ρ : ℂ, IsNontrivialZero ρ →\n 1 / (16 * C0hat (4 * (k : ℝ) + 9 / 2)) ≤ |ρ.im - R| ∨ 1 ≤ |ρ.im - R|)\n (hgapInt : ∀ m : ℤ, 1 / 4 ≤ |R / 2 - (m : ℝ)|)\n {s : ℂ} (hs : ‖s‖ = R) : ¬ badPoint s := by\n have hR16002 : (16002 : ℝ) ≤ R := by\n have h1 : (4000 : ℝ) ≤ (k : ℝ) := by exact_mod_cast hk\n linarith [hRlo]\n have hRpos : (0 : ℝ) < R := by linarith [hR16002]\n rintro (h | h | h | ⟨n, -, h⟩)\n · exact not_isNontrivialZero_on_gapCircle hk hRlo hgap hs h\n · rw [h, norm_zero] at hs\n linarith [hRpos]\n · rw [h, norm_one] at hs\n linarith [hR16002]\n · have hR2 : R = 2 * (n : ℝ) := by\n rw [← hs, h, norm_mul]\n have h1 : ‖(-2 : ℂ)‖ = 2 := by\n rw [show (-2 : ℂ) = ((-2 : ℝ) : ℂ) by push_cast; ring, Complex.norm_real]\n norm_num\n rw [h1, Complex.norm_natCast]\n have hcon := hgapInt (n : ℤ)\n rw [Int.cast_natCast] at hcon\n have h0 : R / 2 - (n : ℝ) = 0 := by rw [hR2]; ring\n rw [h0, abs_zero] at hcon\n linarith [hcon]\n```\nWait — rintro fourth case: ⟨n, hn, h⟩ where hn : 1 ≤ n is unused → use ⟨n, -, h⟩ ✓ (anonymous). Actually rintro's `-` clears it ✓ fine (no warning for unused if cleared? `-` clears the hypothesis ✓).\n\nnorm_zero at hs: hs : ‖(0:ℂ)‖ = R → rw [norm_zero] at hs : (0:ℝ) = R ✓ wait — rw [h] at hs first: hs : ‖(0 : ℂ)‖ = R. Then norm_zero : ‖(0:α)‖ = 0: rw at hs: hs : (0:ℝ) = R ✓.\n\nCase 3: rw [h] at hs : ‖(1:ℂ)‖ = R; norm_one: hs : (1:ℝ) = R; linarith [hR16002] gives 16002 ≤ 1 false ✓.\n\nCase 4: rw [← hs, h, norm_mul]: goal R = 2*(n:ℝ). rw [← hs]: R ↦ ‖s‖: goal ‖s‖ = 2*(n:ℝ). rw [h]: s ↦ -2*(n:ℂ): goal ‖-2*(n:ℂ)‖ = 2*(n:ℝ). rw [norm_mul]: ‖-2‖*‖(n:ℂ)‖ = 2*(n:ℝ). rw [h1]: 2*‖(n:ℂ)‖ = 2*(n:ℝ). rw [Complex.norm_natCast]: 2*(n:ℝ) = 2*(n:ℝ) ✓ closed by rfl (rw auto-closes). Complex.norm_natCast : ‖(n:ℂ)‖ = (n:ℝ)? — used at LiCircleBound:3410 `rw [h1, Complex.norm_natCast]` — similar context ✓ trust. But wait — is there a coercion match: ‖((n:ℕ):ℂ)‖ — Complex.norm_natCast (n : ℕ) : ‖(↑n : ℂ)‖ = ↑n ✓.\n\nhcon : 1/4 ≤ |R/2 − ((n:ℤ):ℝ)|; rw [Int.cast_natCast] at hcon: |R/2 − (n:ℝ)| ✓. h0 : R/2 − (n:ℝ) = 0: rw [hR2] changes goal R/2 − n = 0 with R ↦ 2*n: 2*n/2 − n = 0 by ring ✓. rw [h0] at hcon: |0| ; rw [abs_zero]: 1/4 ≤ (0:ℝ) — linarith ✓ (norm_num at hcon also fine; linarith [hcon] with hcon : 1/4 ≤ 0 — linarith closes any goal from a false hypothesis ✓; actually after rw the goal is False (rintro case goal) ✓ linarith closes).\n\nHmm wait — after rintro, each case's goal is False ✓ (since we're proving ¬ badPoint s, i.e. badPoint s → False).\n\n§3 as sketched. ✓\n\n§4 gentire_const — full assembly. Let me also double check `div_le_div_of_nonneg_right` signature in this Mathlib to be safe:","signature":""},{"type":"text","text":"One more name check (`div_le_div_of_nonneg_right`, `Nat.le_ceil`, `div_mul_cancel₀`), then writing the file."},{"type":"tool_use","id":"Bash_32","name":"Bash","input":{"command":"M=D:/Python/Quantum/zeta-23-lean/.lake/packages/mathlib/Mathlib; grep -rn \"theorem div_le_div_of_nonneg_right\\|lemma div_le_div_of_nonneg_right\" $M --include=\"*.lean\" | head -2; grep -rn \"theorem le_ceil \" $M/Algebra/Order/Floor.lean | head -2; grep -rn \"theorem div_mul_cancel₀\" $M/Algebra/GroupWithZero/Basic.lean $M/Algebra/GroupWithZero/*.lean 2>/dev/null | head -3; grep -rn \"div_mul_cancel₀\" D:/Python/Quantum/research/lean/NguyenRH1/NguyenRH1/*.lean | head -3","description":"Verify division lemma signatures"},"extra_content":null}]