← Session 28 — ii′-5e: partial-fraction identity (zero series + F entire)
thinking (7123 chars)
Committed. Now write fiber_tail_le + zero_tail_inv_sq_le properly. Let me think through the final per-factor bound once more and then write both lemmas in full.
For `zero_tail_inv_sq_le`, the assembly via fiberwise:
```lean
theorem zero_tail_inv_sq_le {X : ℝ} (hX : 200 ≤ X) :
∑' ρ : {ρ : ℂ // IsNontrivialZero ρ}, tailTerm X ρ
≤ 16 * A0count * Real.log X / X := by
have hX0 : (0 : ℝ) < X := by linarith
have hlogXnn : (0 : ℝ) ≤ Real.log X := Real.log_nonneg (by linarith)
have hC0 : (0 : ℝ) ≤ 16 * A0count * Real.log X / X :=
div_nonneg (mul_nonneg (mul_nonneg (by norm_num) A0count_pos.le) hlogXnn) hX0.le
rw [← ENNReal.ofReal_le_ofReal_iff hC0]
rw [ENNReal.ofReal_tsum_of_nonneg (fun ρ => tailTerm_nonneg ρ) (tailTerm_summable X)]
rw [← ENNReal.tsum_fiberwise (fun ρ => ENNReal.ofReal (tailTerm X ρ)) (dyadClass X)]
-- goal: ∑' j, ∑'_{fiber j} ofReal(tailTerm) ≤ ofReal(16A₀logX/X)
-- the real dyadic bound first:
have htotal : ∑' j : ℕ, (1 / ((2 : ℝ) ^ j * X) ^ 2) *
(A0count * ((2 : ℝ) ^ (j + 1) * X + 3) * Real.log (3 * (2 : ℝ) ^ (j + 1) * X + 5))
≤ 16 * A0count * Real.log X / X := by
-- per-term ≤ (4A₀/X)·G_j with G_j = ((j+4)log2 + logX)/2^j
have hG : Summable (fun j : ℕ => ((j : ℝ) + 4) * Real.log 2 + Real.log X) / (2:ℝ)^j ...
```
Let me carefully establish the per-term bound:
F_j := (1/(2^jX)²)·A₀·(2^{j+1}X+3)·L_j ≤ (4A₀/X)·((j+4)log2 + logX)/2^j
via mul_le_mul of:
(f1) A₀(2^{j+1}X+3)/(2^jX)² ≤ (4A₀/X)/2^j — the division comparison (above).
(f2) L_j := log(3·2^{j+1}X+5) ≤ (j+4)log2 + logX — from 3·2^{j+1}X+5 ≤ 2^{j+4}X: 6·2^jX + 5 ≤ 16·2^jX ⟺ 5 ≤ 10·2^jX ⟸ 10·200 = 2000 ✓; then log(2^{j+4}X) = (j+4)log2 + logX: Real.log (2^{j+4}·X) = log(2^{j+4}) + log X (Real.log_mul (2^{j+4}≠0) (X≠0) ✓) = (j+4)log2 + logX (Real.log_pow ✓).
But f1·f2 needs nonneg sides: A₀(2^{j+1}X+3)/(2^jX)² ≥ 0 ✓, (4A₀/X)/2^j ≥ 0 ✓, L_j ≥ 0 ✓, ((j+4)log2+logX)/2^j ≥ 0 ✓ — mul_le_mul f1 f2 (L_j ≥ 0) ((4A₀/X)/2^j ≥ 0) : F_j = [A₀(2^{j+1}X+3)/(2^jX)²]·L_j ≤ [(4A₀/X)/2^j]·[((j+4)log2+logX)/2^j]·... wait the RHS of f2 is ((j+4)log2+logX) not divided — let me restate: F_j = A₀(2^{j+1}X+3)·L_j/(4^jX²) and target RHS = (4A₀/X)·((j+4)log2+logX)/2^j. Write F_j = [A₀(2^{j+1}X+3)/(2^jX)²]·L_j and RHS = [(4A₀/X)·(1/2^j)]·[((j+4)log2+logX)]... (4A₀/X)·G_j with G_j = ((j+4)log2+logX)/2^j = [(4A₀/X)/2^j]·[(j+4)log2+logX] ✓ (same). So mul_le_mul f1 f2 with the nonnegs: mul_le_mul (f1 : a ≤ b) (f2 : c ≤ d) (hc : 0 ≤ c) (hb : 0 ≤ b) : a·c ≤ b·d ✓ where a·c = F_j (ring-form ✓) and b·d = (4A₀/X)·G_j (ring-form ✓).
Then ∑' F_j ≤ ∑' (4A₀/X)·G_j = (4A₀/X)·(10log2+2logX) (tsum_le_tsum + tsum_mul_left + tsum_dyadic_log) ≤ 16A₀logX/X (dyadic_tail_constant) ✓.
Summable F: of_norm_bounded by (4A₀/X)·G: ‖F_j‖ = F_j (nonneg) ≤ (4A₀/X)G_j ✓.
And the fiberwise comparison:
∑'_j ∑'_{fiber j} ofReal(tailTerm) ≤ ∑'_{j} ofReal(F_j) (ENNReal.tsum_le_tsum + fiber_tail_le) = ofReal(∑' F_j) (ofReal_tsum_of_nonneg hFnn hFsum.symm??) — ofReal_tsum_of_nonneg : ofReal(∑' f) = ∑' ofReal(f i) — I need ∑' ofReal(F_j) = ofReal(∑' F_j) — the .symm ✓. Then ofReal(∑' F_j) ≤ ofReal(16A₀logX/X) via ofReal_le_ofReal htotal ✓.
fiber_tail_le: as drafted. The Finset.sum_subtype bridge: `Finset.sum_subtype (s) (h : ∀ x, x ∈ s ↔ p x) (f) : ∑ a ∈ s, f a = ∑ a : Subtype-p-Fintype, f ↑a`? — the probe showed: `sum_subtype (s : Finset ι) (h : ∀ x, x ∈ s ↔ p x) → ∀ (f : ι → M), ∑ a ∈ s, f a = ∑ a, f ↑a` — note the RHS is `∑ a, f ↑a` over the Fintype of the subtype — and it needs [Fintype (Subtype p)] — from my haveI hfin.fintype ✓.
Hmm wait — sum_subtype's implicit {F : Fintype (Subtype p)} — it uses whatever instance — my haveI'd instance ✓ should unify.
And the tsum_fintype: `tsum_fintype (f) : ∑' b, f b = ∑ b, f b` — needs [Fintype (the fiber type)] — the fiber type is ↥((dyadClass X)⁻¹' {j}) — the instance from hfin.fintype where hfin : ((dyadClass X)⁻¹'{j}).Finite ✓ — but my dyadClass_fiber_finite is about {ρ | dyadClass X ρ = j} — the set-builder vs the preimage: defeq? (dyadClass X)⁻¹' {j} = {ρ | dyadClass X ρ ∈ {j}} — and {ρ | dyadClass X ρ = j}: dyadClass X ρ ∈ {j} ↔ dyadClass X ρ = j via Set.mem_singleton_iff — is `x ∈ {j}` DEFEQ to x = j? Set.singleton: {j} = insert j ∅: membership x ∈ {j} — the Membership for sets: x ∈ {j} unfolds to... `Set.mem_singleton_iff : a ∈ {b} ↔ a = b` — an iff, maybe not defeq. To be safe: prove hfin for the PREIMAGE directly via the set-equality:
```lean
have hfin : ((dyadClass X) ⁻¹' {j} : Set {ρ : ℂ // IsNontrivialZero ρ}).Finite := by
have h := dyadClass_fiber_finite hX0 j
rwa [Set.preimage_singleton_eq] at... -- hmm: is there Set.preimage_singleton_eq? f⁻¹'{j} = {x | f x = j}: `Set.preimage_singleton_eq`? or ext ρ; simp [Set.mem_preimage] — the set equality: (dyadClass)⁻¹'{j} = {ρ | dyadClass ρ = j}: ext ρ; simp [Set.mem_preimage, Set.mem_singleton_iff]?? — or just: show the finiteness via dyadClass_fiber_finite with the transport:
have h2 : ((dyadClass X) ⁻¹' {j} : Set _) = {ρ : {ρ // IsNontrivialZero ρ} | dyadClass X ρ = j} := by
ext ρ
simp only [Set.mem_preimage, Set.mem_singleton_iff, Set.mem_setOf_eq]
-- hmm mem_setOf_eq deprecated — use defeq: the iff is Iff.rfl
rw [h2]
exact h
```
the ext goal: ρ ∈ (dyadClass)⁻¹'{j} ↔ ρ ∈ {ρ | dyadClass X ρ = j}: simp only [Set.mem_preimage, Set.mem_singleton_iff] — mem_preimage : a ∈ f⁻¹' s ↔ f a ∈ s: then mem_singleton_iff: f a = j: and the RHS setOf-membership defeq: the simp should close via Iff.rfl or leave `dyadClass X ρ = j ↔ dyadClass X ρ = j` → Iff.rfl ✓. Hmm mem_setOf_eq deprecated — skip it (the RHS membership is defeq to the equation; after simp only [mem_preimage, mem_singleton_iff] the goal is `dyadClass X ρ = j ↔ dyadClass X ρ ∈ {j}-setbuilder`... just use `constructor <;> intro h <;> exact h`-style or `exact Iff.rfl` — the two sides: ρ ∈ preimage vs ρ ∈ setOf — both defeq to dyadClass X ρ = j ✓ Iff.rfl... the membership forms are defeq but Iff.rfl needs them syntactically after whnf — `exact Iff.rfl` works up to defeq ✓. So `ext ρ; exact Iff.rfl`.
Then the haveI := hfin.fintype — Set.Finite.fintype ✓.
Then tsum_fintype: ∑' b : ↥preimage, ofReal(tailTerm X ↑b) = ∑ b : ↥preimage, ... — hmm tsum_fintype gives ∑' b, f b = ∑ b, f b where the sum is over Finset.univ of the subtype ✓. Then I need the univ-sum = the toFinset-sum: `Finset.sum_subtype (hfin.toFinset) (fun ρ => by rw [Set.Finite.mem_toFinset]) (fun ρ => ofReal(tailTerm X ρ))` : ∑ ρ ∈ hfin.toFinset, ... = ∑ a : ↥preimage, ... — wait Finset.sum_subtype's form: ∑ a ∈ s, f a = ∑ a : ↥(subtype), f ↑a — with s := hfin.toFinset and p := (· ∈ preimage-set): the h : ∀ x, x ∈ hfin.toFinset ↔ x ∈ preimage: by rw [Set.Finite.mem_toFinset]: the goal becomes x ∈ preimage ↔ x ∈ preimage — rfl/Iff.rfl ✓. So the bridge: (Finset.sum_subtype ...).symm : ∑_{subtype} = ∑_{toFinset} ✓.
Then the rest as planned. Let me also double check `Finset.sum_filter_add_sum_filter_not` name: `Finset.sum_filter_add_sum_filter_not (s) (p) (f) : (∑ x ∈ s.filter p, f x) + (∑ x ∈ s.filter (¬p ·), f x) = ∑ x ∈ s, f x` ✓ standard.
Let me write the two lemmas now in full.
Now writing the final assembly (`fiber_tail_le` + `zero_tail_inv_sq_le`).
tool: Read
input
{
"file_path": "D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\NguyenRH1\\LiCircleBound.lean",
"offset": 644,
"limit": 8
}
raw content_json (database row)
[{"type":"thinking","thinking":"Committed. Now write fiber_tail_le + zero_tail_inv_sq_le properly. Let me think through the final per-factor bound once more and then write both lemmas in full.\n\nFor `zero_tail_inv_sq_le`, the assembly via fiberwise:\n\n```lean\ntheorem zero_tail_inv_sq_le {X : ℝ} (hX : 200 ≤ X) :\n ∑' ρ : {ρ : ℂ // IsNontrivialZero ρ}, tailTerm X ρ\n ≤ 16 * A0count * Real.log X / X := by\n have hX0 : (0 : ℝ) < X := by linarith\n have hlogXnn : (0 : ℝ) ≤ Real.log X := Real.log_nonneg (by linarith)\n have hC0 : (0 : ℝ) ≤ 16 * A0count * Real.log X / X :=\n div_nonneg (mul_nonneg (mul_nonneg (by norm_num) A0count_pos.le) hlogXnn) hX0.le\n rw [← ENNReal.ofReal_le_ofReal_iff hC0]\n rw [ENNReal.ofReal_tsum_of_nonneg (fun ρ => tailTerm_nonneg ρ) (tailTerm_summable X)]\n rw [← ENNReal.tsum_fiberwise (fun ρ => ENNReal.ofReal (tailTerm X ρ)) (dyadClass X)]\n -- goal: ∑' j, ∑'_{fiber j} ofReal(tailTerm) ≤ ofReal(16A₀logX/X)\n -- the real dyadic bound first:\n have htotal : ∑' j : ℕ, (1 / ((2 : ℝ) ^ j * X) ^ 2) *\n (A0count * ((2 : ℝ) ^ (j + 1) * X + 3) * Real.log (3 * (2 : ℝ) ^ (j + 1) * X + 5))\n ≤ 16 * A0count * Real.log X / X := by\n -- per-term ≤ (4A₀/X)·G_j with G_j = ((j+4)log2 + logX)/2^j\n have hG : Summable (fun j : ℕ => ((j : ℝ) + 4) * Real.log 2 + Real.log X) / (2:ℝ)^j ...\n```\n\nLet me carefully establish the per-term bound:\nF_j := (1/(2^jX)²)·A₀·(2^{j+1}X+3)·L_j ≤ (4A₀/X)·((j+4)log2 + logX)/2^j\nvia mul_le_mul of:\n(f1) A₀(2^{j+1}X+3)/(2^jX)² ≤ (4A₀/X)/2^j — the division comparison (above).\n(f2) L_j := log(3·2^{j+1}X+5) ≤ (j+4)log2 + logX — from 3·2^{j+1}X+5 ≤ 2^{j+4}X: 6·2^jX + 5 ≤ 16·2^jX ⟺ 5 ≤ 10·2^jX ⟸ 10·200 = 2000 ✓; then log(2^{j+4}X) = (j+4)log2 + logX: Real.log (2^{j+4}·X) = log(2^{j+4}) + log X (Real.log_mul (2^{j+4}≠0) (X≠0) ✓) = (j+4)log2 + logX (Real.log_pow ✓).\nBut f1·f2 needs nonneg sides: A₀(2^{j+1}X+3)/(2^jX)² ≥ 0 ✓, (4A₀/X)/2^j ≥ 0 ✓, L_j ≥ 0 ✓, ((j+4)log2+logX)/2^j ≥ 0 ✓ — mul_le_mul f1 f2 (L_j ≥ 0) ((4A₀/X)/2^j ≥ 0) : F_j = [A₀(2^{j+1}X+3)/(2^jX)²]·L_j ≤ [(4A₀/X)/2^j]·[((j+4)log2+logX)/2^j]·... wait the RHS of f2 is ((j+4)log2+logX) not divided — let me restate: F_j = A₀(2^{j+1}X+3)·L_j/(4^jX²) and target RHS = (4A₀/X)·((j+4)log2+logX)/2^j. Write F_j = [A₀(2^{j+1}X+3)/(2^jX)²]·L_j and RHS = [(4A₀/X)·(1/2^j)]·[((j+4)log2+logX)]... (4A₀/X)·G_j with G_j = ((j+4)log2+logX)/2^j = [(4A₀/X)/2^j]·[(j+4)log2+logX] ✓ (same). So mul_le_mul f1 f2 with the nonnegs: mul_le_mul (f1 : a ≤ b) (f2 : c ≤ d) (hc : 0 ≤ c) (hb : 0 ≤ b) : a·c ≤ b·d ✓ where a·c = F_j (ring-form ✓) and b·d = (4A₀/X)·G_j (ring-form ✓).\n\nThen ∑' F_j ≤ ∑' (4A₀/X)·G_j = (4A₀/X)·(10log2+2logX) (tsum_le_tsum + tsum_mul_left + tsum_dyadic_log) ≤ 16A₀logX/X (dyadic_tail_constant) ✓.\n\nSummable F: of_norm_bounded by (4A₀/X)·G: ‖F_j‖ = F_j (nonneg) ≤ (4A₀/X)G_j ✓.\n\nAnd the fiberwise comparison:\n∑'_j ∑'_{fiber j} ofReal(tailTerm) ≤ ∑'_{j} ofReal(F_j) (ENNReal.tsum_le_tsum + fiber_tail_le) = ofReal(∑' F_j) (ofReal_tsum_of_nonneg hFnn hFsum.symm??) — ofReal_tsum_of_nonneg : ofReal(∑' f) = ∑' ofReal(f i) — I need ∑' ofReal(F_j) = ofReal(∑' F_j) — the .symm ✓. Then ofReal(∑' F_j) ≤ ofReal(16A₀logX/X) via ofReal_le_ofReal htotal ✓.\n\nfiber_tail_le: as drafted. The Finset.sum_subtype bridge: `Finset.sum_subtype (s) (h : ∀ x, x ∈ s ↔ p x) (f) : ∑ a ∈ s, f a = ∑ a : Subtype-p-Fintype, f ↑a`? — the probe showed: `sum_subtype (s : Finset ι) (h : ∀ x, x ∈ s ↔ p x) → ∀ (f : ι → M), ∑ a ∈ s, f a = ∑ a, f ↑a` — note the RHS is `∑ a, f ↑a` over the Fintype of the subtype — and it needs [Fintype (Subtype p)] — from my haveI hfin.fintype ✓.\n\nHmm wait — sum_subtype's implicit {F : Fintype (Subtype p)} — it uses whatever instance — my haveI'd instance ✓ should unify.\n\nAnd the tsum_fintype: `tsum_fintype (f) : ∑' b, f b = ∑ b, f b` — needs [Fintype (the fiber type)] — the fiber type is ↥((dyadClass X)⁻¹' {j}) — the instance from hfin.fintype where hfin : ((dyadClass X)⁻¹'{j}).Finite ✓ — but my dyadClass_fiber_finite is about {ρ | dyadClass X ρ = j} — the set-builder vs the preimage: defeq? (dyadClass X)⁻¹' {j} = {ρ | dyadClass X ρ ∈ {j}} — and {ρ | dyadClass X ρ = j}: dyadClass X ρ ∈ {j} ↔ dyadClass X ρ = j via Set.mem_singleton_iff — is `x ∈ {j}` DEFEQ to x = j? Set.singleton: {j} = insert j ∅: membership x ∈ {j} — the Membership for sets: x ∈ {j} unfolds to... `Set.mem_singleton_iff : a ∈ {b} ↔ a = b` — an iff, maybe not defeq. To be safe: prove hfin for the PREIMAGE directly via the set-equality: \n```lean\n have hfin : ((dyadClass X) ⁻¹' {j} : Set {ρ : ℂ // IsNontrivialZero ρ}).Finite := by\n have h := dyadClass_fiber_finite hX0 j\n rwa [Set.preimage_singleton_eq] at... -- hmm: is there Set.preimage_singleton_eq? f⁻¹'{j} = {x | f x = j}: `Set.preimage_singleton_eq`? or ext ρ; simp [Set.mem_preimage] — the set equality: (dyadClass)⁻¹'{j} = {ρ | dyadClass ρ = j}: ext ρ; simp [Set.mem_preimage, Set.mem_singleton_iff]?? — or just: show the finiteness via dyadClass_fiber_finite with the transport:\n have h2 : ((dyadClass X) ⁻¹' {j} : Set _) = {ρ : {ρ // IsNontrivialZero ρ} | dyadClass X ρ = j} := by\n ext ρ\n simp only [Set.mem_preimage, Set.mem_singleton_iff, Set.mem_setOf_eq]\n -- hmm mem_setOf_eq deprecated — use defeq: the iff is Iff.rfl\n rw [h2]\n exact h\n```\nthe ext goal: ρ ∈ (dyadClass)⁻¹'{j} ↔ ρ ∈ {ρ | dyadClass X ρ = j}: simp only [Set.mem_preimage, Set.mem_singleton_iff] — mem_preimage : a ∈ f⁻¹' s ↔ f a ∈ s: then mem_singleton_iff: f a = j: and the RHS setOf-membership defeq: the simp should close via Iff.rfl or leave `dyadClass X ρ = j ↔ dyadClass X ρ = j` → Iff.rfl ✓. Hmm mem_setOf_eq deprecated — skip it (the RHS membership is defeq to the equation; after simp only [mem_preimage, mem_singleton_iff] the goal is `dyadClass X ρ = j ↔ dyadClass X ρ ∈ {j}-setbuilder`... just use `constructor <;> intro h <;> exact h`-style or `exact Iff.rfl` — the two sides: ρ ∈ preimage vs ρ ∈ setOf — both defeq to dyadClass X ρ = j ✓ Iff.rfl... the membership forms are defeq but Iff.rfl needs them syntactically after whnf — `exact Iff.rfl` works up to defeq ✓. So `ext ρ; exact Iff.rfl`.\n\nThen the haveI := hfin.fintype — Set.Finite.fintype ✓.\n\nThen tsum_fintype: ∑' b : ↥preimage, ofReal(tailTerm X ↑b) = ∑ b : ↥preimage, ... — hmm tsum_fintype gives ∑' b, f b = ∑ b, f b where the sum is over Finset.univ of the subtype ✓. Then I need the univ-sum = the toFinset-sum: `Finset.sum_subtype (hfin.toFinset) (fun ρ => by rw [Set.Finite.mem_toFinset]) (fun ρ => ofReal(tailTerm X ρ))` : ∑ ρ ∈ hfin.toFinset, ... = ∑ a : ↥preimage, ... — wait Finset.sum_subtype's form: ∑ a ∈ s, f a = ∑ a : ↥(subtype), f ↑a — with s := hfin.toFinset and p := (· ∈ preimage-set): the h : ∀ x, x ∈ hfin.toFinset ↔ x ∈ preimage: by rw [Set.Finite.mem_toFinset]: the goal becomes x ∈ preimage ↔ x ∈ preimage — rfl/Iff.rfl ✓. So the bridge: (Finset.sum_subtype ...).symm : ∑_{subtype} = ∑_{toFinset} ✓.\n\nThen the rest as planned. Let me also double check `Finset.sum_filter_add_sum_filter_not` name: `Finset.sum_filter_add_sum_filter_not (s) (p) (f) : (∑ x ∈ s.filter p, f x) + (∑ x ∈ s.filter (¬p ·), f x) = ∑ x ∈ s, f x` ✓ standard.\n\nLet me write the two lemmas now in full.","signature":""},{"type":"text","text":"Now writing the final assembly (`fiber_tail_le` + `zero_tail_inv_sq_le`)."},{"type":"tool_use","id":"Read_422","name":"Read","input":{"file_path":"D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\NguyenRH1\\LiCircleBound.lean","offset":644,"limit":8},"extra_content":null}]