← Session 28 — ii′-5e: partial-fraction identity (zero series + F entire)
thinking (10158 chars)
`fiber_mult_count` compiles clean. Now the main tail lemma `zero_tail_inv_sq_le`. The remaining assembly:
```lean
/-- **The far-tail bound**: for X ≥ 200, the zeros with |γ| > X
contribute Σ m/(1+γ²) ≤ 16·A₀·log X / X. -/
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 hC0 : (0 : ℝ) ≤ 16 * A0count * Real.log X / X := by
have hlog : (0 : ℝ) ≤ Real.log X := Real.log_nonneg (by linarith)
positivity -- positivity can't see A0count! explicit:
...
```
hC0: 16·A₀·log X/X ≥ 0: div_nonneg (mul_nonneg (mul_nonneg (by norm_num) A0count_pos.le) (Real.log_nonneg (by linarith))) hX0.le.
Then:
```lean
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)]
```
Wait — tsum_fiberwise : ∑' x, ∑' b : g⁻¹'{x}, f b = ∑' i, f i — I have ∑' i, f i (the ofReal-sum) and want to bound it via the fiber sum: rw [← ENNReal.tsum_fiberwise ...] turns ∑' i, f i into ∑' j, ∑'_{fiber j} f ✓. Goal: ∑' j, ∑'_{fiber j} ofReal(tailTerm) ≤ ofReal(16A₀logX/X).
Then:
```lean
set F : ℕ → ℝ := fun j => (4 * A0count / X) *
(Real.log (3 * (2 : ℝ) ^ (j + 1) * X + 5) / (2 : ℝ) ^ j) with hFdef
-- F_j nonneg, summable, and ∑' F ≤ 16 A₀ log X/X
have hFnn : ∀ j, 0 ≤ F j := by
intro j
rw [hFdef]
positivity?? — A0count again — explicit: mul_nonneg (div_nonneg (mul_nonneg (by norm_num) A0count_pos.le) hX0.le) (div_nonneg (Real.log_nonneg (by ...log(3·2^{j+1}X+5) ≥ 0 ⟸ 3·...+5 ≥ 1 ✓ positivity for the arg? log_nonneg needs 1 ≤ 3·2^{j+1}X+5: have : (0:ℝ) ≤ 2^(j+1)*X := by positivity... linarith) (by positivity : (0:ℝ) ≤ 2^j))
have hFsum : Summable F := by
-- F j ≤ (4A₀/X)·G_j with G = the dyadicLog family
apply Summable.of_norm_bounded ((dyadicLog_summable X).mul_left (4 * A0count / X))
intro j
rw [hFdef, Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (F-nn), abs_of_nonneg (G-nn)]
-- F_j ≤ (4A₀/X)·G_j ⟺ log(3·2^{j+1}X+5) ≤ (j+4)log2 + logX
apply mul_le_mul_of_nonneg_left _ (div_nonneg (mul_nonneg (by norm_num) A0count_pos.le) hX0.le)
apply div_le_div_of_nonneg_right?? hmm the 1/2^j factors: F_j = (4A₀/X)·(log(...)/2^j) and (4A₀/X)·G_j = (4A₀/X)·(((j+4)log2+logX)/2^j): cancel (4A₀/X) ≥ 0: need log(...)/2^j ≤ ((j+4)log2+logX)/2^j: 2^j > 0: need log(3·2^{j+1}X+5) ≤ (j+4)log2 + logX:
-- 3·2^{j+1}X + 5 ≤ 2^{j+4}·X: 6·2^jX + 5 ≤ 16·2^jX ⟺ 5 ≤ 10·2^jX ⟸ 10·1·200: 2^jX ≥ 200 (h2jX1-style) ⟹ 10·2^jX ≥ 2000 ≥ 5 ✓
-- then log(2^{j+4}X) = (j+4)log2 + logX: Real.log_mul (2^{j+4} ≠ 0) (X ≠ 0) + Real.log_pow: log(2^{j+4}) = (j+4)·log 2 ✓
...
-- the sum bound: ∑' F ≤ 16A₀ logX/X
have hFtotal : ∑' j : ℕ, F j ≤ 16 * A0count * Real.log X / X := by
calc ∑' j, F j ≤ ∑' j, (4 * A0count / X) * (((j + 4) * Real.log 2 + Real.log X) / (2:ℝ)^j) :=
Summable.tsum_le_tsum (per-term) hFsum ((dyadicLog_summable X).mul_left _)
_ = (4 * A0count / X) * ∑' j, (((j+4)·log2 + logX)/2^j) := tsum_mul_left
_ = (4 * A0count / X) * (10·log2 + 2·logX) := by rw [tsum_dyadic_log]
_ ≤ 16·A₀·logX/X := dyadic_tail_constant hX
-- the fiberwise comparison
calc ∑' j : ℕ, ∑' b : (dyadClass X) ⁻¹' {j}, ENNReal.ofReal (tailTerm X ↑b)
≤ ∑' j : ℕ, ENNReal.ofReal (F j) := by
apply ENNReal.tsum_le_tsum
intro j
-- the fiber bound
...
_ = ENNReal.ofReal (∑' j : ℕ, F j) := (ENNReal.ofReal_tsum_of_nonneg hFnn hFsum).symm
_ ≤ ENNReal.ofReal (16 * A0count * Real.log X / X) := ENNReal.ofReal_le_ofReal hFtotal
```
The fiber bound: ∑'_{b : fiber j} ofReal(tailTerm X b) ≤ ofReal(F j):
```lean
-- the fiber as a finset
set FJS := (dyadClass_fiber_finite hX0 j).toFinset with hFJS
-- the fiber subtype (dyadClass X)⁻¹'{j} = ↥{ρ | dyadClass X ρ = j} vs FJS:
have htsum : ∑' b : (dyadClass X) ⁻¹' {j}, ENNReal.ofReal (tailTerm X ↑b)
≤ ENNReal.ofReal (F j) := by
-- rewrite the fiber tsum as the FJS-finset sum
rw [show ((dyadClass X) ⁻¹' {j} : Set _) = ↑FJS from by
ext ρ
rw [hFJS, Set.Finite.mem_toFinset]
-- ρ ∈ fiber ↔ dyadClass X ρ = j ↔ ρ ∈ FJS's set {dyadClass = j ∧ X < |im|}??
```
PROBLEM: the fiber (dyadClass)⁻¹'{j} includes members with |γ| ≤ X (tailTerm = 0 there) but FJS = toFinset of {dyadClass = j ∧ X < |γ|}. NOT equal. Handle: ∑'_{full-fiber} ofReal(tailTerm) = ∑'_{full-fiber} ofReal(if-form) — the members with |γ| ≤ X contribute ofReal(0) = 0: so the full-fiber sum = the (|γ|>X)-part sum: via the fiber tsum splitting... OR define FJS' as the FULL fiber finset {dyadClass = j} (no X < |γ| condition) and bound its sum directly: the full fiber is finite (same ball argument: members have |γ| < 2^{j+1}X ✓ — dyadClass_upper applies to ALL ✓). Then ∑'_{full-fiber} ofReal(tailTerm) = ∑_{full-fiber} ofReal(tailTerm) = ∑ over {dyadClass = j ∧ X < |γ|}-part (others 0) ≤ (1/(4^jX²))·(count over the X<|γ| part = fiber_mult_count ✓). So I need fiber_mult_count over the {class = j ∧ X < |γ|} set ✓ (as built ✓) AND a full-fiber finiteness lemma {dyadClass = j} (no X<|γ| condition):
Adjust dyadClass_fiber_finite to drop the X < |im| condition? Its subset argument used only dyadClass_upper ✓ (no X<|im| needed) — so the finiteness of the FULL fiber {dyadClass = j} holds by the same proof. Let me state dyadClass_fiber_finite for the full fiber AND derive fiber_mult_count's set as a subset:
- `dyadClass_fiber_finite (hX) (j) : {ρ | dyadClass X ρ = j}.Finite` — drop the ∧ part.
- fiber_mult_count's set {dyadClass = j ∧ X < |im|} = the full fiber ∩ {X < |im|} — finite via .subset (mem inter left). Its toFinset sum ≤ via fiber_mult_count ✓ (keep as is, with the finiteness from the full-fiber finite + subset).
Then the fiber tsum: ∑'_{b : (dyadClass)⁻¹'{j}} ofReal(tailTerm X b): the subtype (dyadClass)⁻¹'{j} = ↥{ρ | dyadClass X ρ = j} (set-builder vs preimage — defeq? (dyadClass X)⁻¹' {j} = {ρ | dyadClass X ρ ∈ {j}} = {ρ | dyadClass X ρ = j} ✓ defeq (singleton membership = eq ✓ Set.mem_singleton_iff)). So the fiber tsum = ∑'_{↥{full fiber set}} — and via Finset.tsum_subtype: ∑'_{↥(fullFiber.toFinset)} ofReal(tailTerm) = ∑_{ρ ∈ toFinset} ofReal(tailTerm ρ) — hmm Finset.tsum_subtype (s : Finset) (f) : ∑' x : ↥s, f x = ∑ x ∈ s, f x ✓ — need the subtype ↥{set} vs ↥toFinset: coe_toFinset : ↥(hs.toFinset) = ↥s?? `(hs.toFinset : Set _) = s` — Set.Finite.coe_toFinset : ↑(hs.toFinset) = s ✓ — so the subtypes are equal-sets ⟹ same tsum — via rw [Set.Finite.coe_toFinset]?? the tsum's domain is the TYPE ↥(toFinset) vs ↥s — equal as types via the coe lemma (a Set equality ⟹ the coerced TYPES are equal ✓ can rw).
Then: ∑_{ρ ∈ fullFiber.toFinset} ofReal(tailTerm X ρ) ≤ ofReal(∑ F-terms): ofReal_sum_of_nonneg backwards + the pointwise bounds:
each term: ofReal(tailTerm X ρ) ≤ ofReal((1/(4^jX²))·(zeroMult ρ:ℝ)): for ρ with X < |im|: tailTerm = m/(1+γ²) ≤ m/(4^jX²) (the per-term bound: 1/(1+γ²) ≤ 1/(4^jX²) ⟸ 4^jX² ≤ 1+γ² ⟸ 2^jX ≤ |γ| (dyadClass_lower needs X ≤ |im| ✓ from X < |im|) and the class = j ✓); for ¬(X < |im|): tailTerm = 0 ≤ (1/(4^jX²))·m ✓ (nonneg). So ∑ ≤ ofReal(∑ (1/(4^jX²))·m) = ofReal((1/(4^jX²))·∑ m) — and ∑_{full-fiber} m ≤ ??? — the full fiber includes |γ| ≤ X members — count them?? For j = 0: full fiber has |γ| < 2X (any): count ≍ 2X·A₀·log — but fiber_mult_count covers only X < |γ| part... For the sum ∑_{full-fiber} tailTerm: the |γ| ≤ X members contribute 0 — so I should split the full-fiber finset sum by (X < |im|): ∑_{full} = ∑_{full.filter (X < |im|)} tailTerm (others 0: Finset.sum_filter) — and the filtered finset = the fiber_mult_count finset (same set!) — so ∑_{full} tailTerm = ∑_{filtered} tailTerm ≤ (1/(4^jX²))·∑_{filtered} m ≤ (1/(4^jX²))·(fiber_mult_count bound) ✓.
So the chain: ∑'_{fiber-subtype} ofReal(tailTerm)
= ∑_{fullFiber.toFinset} ofReal(tailTerm) [tsum_subtype + coe]
= ofReal(∑_{fullFiber.toFinset} tailTerm) [ofReal_sum_of_nonneg]
= ofReal(∑_{fullFiber.toFinset.filter (X < |·|)} tailTerm) [Finset.sum_filter: others are 0: `Finset.sum_filter_add...`: ∑_s = ∑_{s.filter p} + ∑_{s.filter ¬p}; the ¬p part = 0 (tailTerm = 0 there: `Finset.sum_eq_zero`)]
≤ ofReal((1/(4^jX²))·∑_{filtered} m) [pointwise + ofReal_le_ofReal]
≤ ofReal((1/(4^jX²))·(A₀(2^{j+1}X+3)·log(3·2^{j+1}X+5))) [fiber_mult_count]
= ofReal(F_j·X-scaled)... wait F_j = (4A₀/X)·log(...)/2^j and the count-form: (1/(4^jX²))·A₀(2^{j+1}X+3)·log(...): is that ≤ F_j = 4A₀·log(...)/(X·2^j)? (1/(4^jX²))·A₀(2^{j+1}X+3) vs 4A₀/(X·2^j): ⟺ (2^{j+1}X+3)/(4^jX²) ≤ 4/(X·2^j) ⟺ (2^{j+1}X+3)·2^j ≤ 4·4^j·X ⟺ 2·4^jX + 3·2^j ≤ 4·4^j·X ⟺ 3·2^j ≤ 2·4^jX ⟸ 3·2^j ≤ 2·4^j·200 = 400·4^j ⟸ 3 ≤ 400·2^j ✓ (4^j·2 = 2·4^j... let me redo: 3·2^j ≤ 2·4^j·X ⟸ 3·2^j ≤ 400·4^j ⟺ 3 ≤ 400·2^j ✓ (2^j ≥ 1)). ✓ but this needs the count ≤ ... and the final inequality F-form — let me just define F_j := (1/(4^j·X²))·A₀(2^{j+1}X+3)·log(3·2^{j+1}X+5) EXACTLY (avoid the extra comparison): and prove ∑' F_j ≤ 16A₀logX/X via the per-term F_j ≤ (4A₀/X)·G_j: (1/(4^jX²))·A₀(2^{j+1}X+3)·log(...) ≤ (4A₀/X)·((j+4)log2+logX)/2^j: from the pieces: log(...) ≤ (j+4)log2+logX ✓ and (2^{j+1}X+3)/(4^jX²) ≤ 4/(X·2^j)·... (2^{j+1}X+3)/(4^jX²) = (2^{j+1}X+3)/(4^jX²): vs 4/(X2^j): cross: (2^{j+1}X+3)·X·2^j ≤ 4·4^jX² ⟺ 2^{j+1}X²2^j + 3X2^j ≤ 4·4^jX² ⟺ 2·4^jX² + 3·2^jX ≤ 4·4^jX² ⟺ 3·2^jX ≤ 2·4^jX² ⟺ 3 ≤ 2·2^j·X ✓ (2^jX ≥ 200). ✓. So F_j ≤ (4A₀/X)·((j+4)log2+logX)/2^j via mul_le_mul of the two piece-bounds ✓ (nonneg parts ✓).
OK. Let me write zero_tail_inv_sq_le now in full. Also need to RESTATE dyadClass_fiber_finite to the full fiber + adapt fiber_mult_count's finiteness.
Changes:
1. dyadClass_fiber_finite: drop `∧ X < |(ρ:ℂ).im|` from the set (the proof's subset works unchanged since it only used dyadClass_upper ✓ — the hρ.1/hρ.2 split: hρ : ρ ∈ {full fiber}: hρ : dyadClass X ρ = j directly (not .1)).
2. fiber_mult_count's finiteness: from the full-fiber finite + subset (the ∧-set ⊆ full fiber ✓ inter_left).
Let me apply.
`fiber_mult_count` compiles. Now restructuring the finiteness (full fiber) and writing the main tail lemma.
tool: Edit
input
{
"file_path": "D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\NguyenRH1\\LiCircleBound.lean",
"old_string": "/-- The dyadic fiber {dyadClass X \u03c1 = j} is finite. -/\nlemma dyadClass_fiber_finite {X : \u211d} (hX : 0 < X) (j : \u2115) :\n {\u03c1 : {\u03c1 // IsNontrivialZero \u03c1} | dyadClass X \u03c1 = j \u2227 X < |(\u03c1 : \u2102).im|}.Finite := by\n apply (finite_subtype_norm_lt (1 + (2 : \u211d) ^ (j + 1) * X + 1)).subset\n intro \u03c1 h\u03c1\n have h\u03c1j : dyadClass X \u03c1 = j := h\u03c1.1\n have hup := dyadClass_upper hX \u03c1\n rw [h\u03c1j] at hup\n have hnorm : \u2016(\u03c1 : \u2102)\u2016 \u2264 |(\u03c1 : \u2102).re| + |(\u03c1 : \u2102).im| :=\n Complex.norm_le_abs_re_add_abs_im _\n have hre : |(\u03c1 : \u2102).re| \u2264 1 := by\n rw [abs_le]\n exact \u27e8by linarith [\u03c1.2.2.1], by linarith [\u03c1.2.2.2]\u27e9\n have h2pow : (0 : \u211d) \u2264 (2 : \u211d) ^ (j + 1) * X := by positivity\n show \u2016(\u03c1 : \u2102)\u2016 < 1 + (2 : \u211d) ^ (j + 1) * X + 1\n linarith",
"new_string": "/-- The dyadic fiber {dyadClass X \u03c1 = j} is finite. -/\nlemma dyadClass_fiber_finite {X : \u211d} (hX : 0 < X) (j : \u2115) :\n {\u03c1 : {\u03c1 // IsNontrivialZero \u03c1} | dyadClass X \u03c1 = j}.Finite := by\n apply (finite_subtype_norm_lt (1 + (2 : \u211d) ^ (j + 1) * X + 1)).subset\n intro \u03c1 h\u03c1\n have h\u03c1j : dyadClass X \u03c1 = j := h\u03c1\n have hup := dyadClass_upper hX \u03c1\n rw [h\u03c1j] at hup\n have hnorm : \u2016(\u03c1 : \u2102)\u2016 \u2264 |(\u03c1 : \u2102).re| + |(\u03c1 : \u2102).im| :=\n Complex.norm_le_abs_re_add_abs_im _\n have hre : |(\u03c1 : \u2102).re| \u2264 1 := by\n rw [abs_le]\n exact \u27e8by linarith [\u03c1.2.2.1], by linarith [\u03c1.2.2.2]\u27e9\n have h2pow : (0 : \u211d) \u2264 (2 : \u211d) ^ (j + 1) * X := by positivity\n show \u2016(\u03c1 : \u2102)\u2016 < 1 + (2 : \u211d) ^ (j + 1) * X + 1\n linarith"
}
raw content_json (database row)
[{"type":"thinking","thinking":"`fiber_mult_count` compiles clean. Now the main tail lemma `zero_tail_inv_sq_le`. The remaining assembly:\n\n```lean\n/-- **The far-tail bound**: for X ≥ 200, the zeros with |γ| > X\ncontribute Σ m/(1+γ²) ≤ 16·A₀·log X / X. -/\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 hC0 : (0 : ℝ) ≤ 16 * A0count * Real.log X / X := by\n have hlog : (0 : ℝ) ≤ Real.log X := Real.log_nonneg (by linarith)\n positivity -- positivity can't see A0count! explicit:\n ...\n```\nhC0: 16·A₀·log X/X ≥ 0: div_nonneg (mul_nonneg (mul_nonneg (by norm_num) A0count_pos.le) (Real.log_nonneg (by linarith))) hX0.le.\n\nThen:\n```lean\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```\nWait — tsum_fiberwise : ∑' x, ∑' b : g⁻¹'{x}, f b = ∑' i, f i — I have ∑' i, f i (the ofReal-sum) and want to bound it via the fiber sum: rw [← ENNReal.tsum_fiberwise ...] turns ∑' i, f i into ∑' j, ∑'_{fiber j} f ✓. Goal: ∑' j, ∑'_{fiber j} ofReal(tailTerm) ≤ ofReal(16A₀logX/X).\n\nThen:\n```lean\n set F : ℕ → ℝ := fun j => (4 * A0count / X) *\n (Real.log (3 * (2 : ℝ) ^ (j + 1) * X + 5) / (2 : ℝ) ^ j) with hFdef\n -- F_j nonneg, summable, and ∑' F ≤ 16 A₀ log X/X\n have hFnn : ∀ j, 0 ≤ F j := by\n intro j\n rw [hFdef]\n positivity?? — A0count again — explicit: mul_nonneg (div_nonneg (mul_nonneg (by norm_num) A0count_pos.le) hX0.le) (div_nonneg (Real.log_nonneg (by ...log(3·2^{j+1}X+5) ≥ 0 ⟸ 3·...+5 ≥ 1 ✓ positivity for the arg? log_nonneg needs 1 ≤ 3·2^{j+1}X+5: have : (0:ℝ) ≤ 2^(j+1)*X := by positivity... linarith) (by positivity : (0:ℝ) ≤ 2^j))\n have hFsum : Summable F := by\n -- F j ≤ (4A₀/X)·G_j with G = the dyadicLog family\n apply Summable.of_norm_bounded ((dyadicLog_summable X).mul_left (4 * A0count / X))\n intro j\n rw [hFdef, Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg (F-nn), abs_of_nonneg (G-nn)]\n -- F_j ≤ (4A₀/X)·G_j ⟺ log(3·2^{j+1}X+5) ≤ (j+4)log2 + logX\n apply mul_le_mul_of_nonneg_left _ (div_nonneg (mul_nonneg (by norm_num) A0count_pos.le) hX0.le)\n apply div_le_div_of_nonneg_right?? hmm the 1/2^j factors: F_j = (4A₀/X)·(log(...)/2^j) and (4A₀/X)·G_j = (4A₀/X)·(((j+4)log2+logX)/2^j): cancel (4A₀/X) ≥ 0: need log(...)/2^j ≤ ((j+4)log2+logX)/2^j: 2^j > 0: need log(3·2^{j+1}X+5) ≤ (j+4)log2 + logX:\n -- 3·2^{j+1}X + 5 ≤ 2^{j+4}·X: 6·2^jX + 5 ≤ 16·2^jX ⟺ 5 ≤ 10·2^jX ⟸ 10·1·200: 2^jX ≥ 200 (h2jX1-style) ⟹ 10·2^jX ≥ 2000 ≥ 5 ✓\n -- then log(2^{j+4}X) = (j+4)log2 + logX: Real.log_mul (2^{j+4} ≠ 0) (X ≠ 0) + Real.log_pow: log(2^{j+4}) = (j+4)·log 2 ✓\n ...\n -- the sum bound: ∑' F ≤ 16A₀ logX/X\n have hFtotal : ∑' j : ℕ, F j ≤ 16 * A0count * Real.log X / X := by\n calc ∑' j, F j ≤ ∑' j, (4 * A0count / X) * (((j + 4) * Real.log 2 + Real.log X) / (2:ℝ)^j) :=\n Summable.tsum_le_tsum (per-term) hFsum ((dyadicLog_summable X).mul_left _)\n _ = (4 * A0count / X) * ∑' j, (((j+4)·log2 + logX)/2^j) := tsum_mul_left\n _ = (4 * A0count / X) * (10·log2 + 2·logX) := by rw [tsum_dyadic_log]\n _ ≤ 16·A₀·logX/X := dyadic_tail_constant hX\n -- the fiberwise comparison\n calc ∑' j : ℕ, ∑' b : (dyadClass X) ⁻¹' {j}, ENNReal.ofReal (tailTerm X ↑b)\n ≤ ∑' j : ℕ, ENNReal.ofReal (F j) := by\n apply ENNReal.tsum_le_tsum\n intro j\n -- the fiber bound\n ...\n _ = ENNReal.ofReal (∑' j : ℕ, F j) := (ENNReal.ofReal_tsum_of_nonneg hFnn hFsum).symm\n _ ≤ ENNReal.ofReal (16 * A0count * Real.log X / X) := ENNReal.ofReal_le_ofReal hFtotal\n```\n\nThe fiber bound: ∑'_{b : fiber j} ofReal(tailTerm X b) ≤ ofReal(F j):\n```lean\n -- the fiber as a finset\n set FJS := (dyadClass_fiber_finite hX0 j).toFinset with hFJS\n -- the fiber subtype (dyadClass X)⁻¹'{j} = ↥{ρ | dyadClass X ρ = j} vs FJS:\n have htsum : ∑' b : (dyadClass X) ⁻¹' {j}, ENNReal.ofReal (tailTerm X ↑b)\n ≤ ENNReal.ofReal (F j) := by\n -- rewrite the fiber tsum as the FJS-finset sum\n rw [show ((dyadClass X) ⁻¹' {j} : Set _) = ↑FJS from by\n ext ρ\n rw [hFJS, Set.Finite.mem_toFinset]\n -- ρ ∈ fiber ↔ dyadClass X ρ = j ↔ ρ ∈ FJS's set {dyadClass = j ∧ X < |im|}?? \n```\nPROBLEM: the fiber (dyadClass)⁻¹'{j} includes members with |γ| ≤ X (tailTerm = 0 there) but FJS = toFinset of {dyadClass = j ∧ X < |γ|}. NOT equal. Handle: ∑'_{full-fiber} ofReal(tailTerm) = ∑'_{full-fiber} ofReal(if-form) — the members with |γ| ≤ X contribute ofReal(0) = 0: so the full-fiber sum = the (|γ|>X)-part sum: via the fiber tsum splitting... OR define FJS' as the FULL fiber finset {dyadClass = j} (no X < |γ| condition) and bound its sum directly: the full fiber is finite (same ball argument: members have |γ| < 2^{j+1}X ✓ — dyadClass_upper applies to ALL ✓). Then ∑'_{full-fiber} ofReal(tailTerm) = ∑_{full-fiber} ofReal(tailTerm) = ∑ over {dyadClass = j ∧ X < |γ|}-part (others 0) ≤ (1/(4^jX²))·(count over the X<|γ| part = fiber_mult_count ✓). So I need fiber_mult_count over the {class = j ∧ X < |γ|} set ✓ (as built ✓) AND a full-fiber finiteness lemma {dyadClass = j} (no X<|γ| condition):\n\nAdjust dyadClass_fiber_finite to drop the X < |im| condition? Its subset argument used only dyadClass_upper ✓ (no X<|im| needed) — so the finiteness of the FULL fiber {dyadClass = j} holds by the same proof. Let me state dyadClass_fiber_finite for the full fiber AND derive fiber_mult_count's set as a subset:\n\n- `dyadClass_fiber_finite (hX) (j) : {ρ | dyadClass X ρ = j}.Finite` — drop the ∧ part.\n- fiber_mult_count's set {dyadClass = j ∧ X < |im|} = the full fiber ∩ {X < |im|} — finite via .subset (mem inter left). Its toFinset sum ≤ via fiber_mult_count ✓ (keep as is, with the finiteness from the full-fiber finite + subset).\n\nThen the fiber tsum: ∑'_{b : (dyadClass)⁻¹'{j}} ofReal(tailTerm X b): the subtype (dyadClass)⁻¹'{j} = ↥{ρ | dyadClass X ρ = j} (set-builder vs preimage — defeq? (dyadClass X)⁻¹' {j} = {ρ | dyadClass X ρ ∈ {j}} = {ρ | dyadClass X ρ = j} ✓ defeq (singleton membership = eq ✓ Set.mem_singleton_iff)). So the fiber tsum = ∑'_{↥{full fiber set}} — and via Finset.tsum_subtype: ∑'_{↥(fullFiber.toFinset)} ofReal(tailTerm) = ∑_{ρ ∈ toFinset} ofReal(tailTerm ρ) — hmm Finset.tsum_subtype (s : Finset) (f) : ∑' x : ↥s, f x = ∑ x ∈ s, f x ✓ — need the subtype ↥{set} vs ↥toFinset: coe_toFinset : ↥(hs.toFinset) = ↥s?? `(hs.toFinset : Set _) = s` — Set.Finite.coe_toFinset : ↑(hs.toFinset) = s ✓ — so the subtypes are equal-sets ⟹ same tsum — via rw [Set.Finite.coe_toFinset]?? the tsum's domain is the TYPE ↥(toFinset) vs ↥s — equal as types via the coe lemma (a Set equality ⟹ the coerced TYPES are equal ✓ can rw).\n\nThen: ∑_{ρ ∈ fullFiber.toFinset} ofReal(tailTerm X ρ) ≤ ofReal(∑ F-terms): ofReal_sum_of_nonneg backwards + the pointwise bounds:\neach term: ofReal(tailTerm X ρ) ≤ ofReal((1/(4^jX²))·(zeroMult ρ:ℝ)): for ρ with X < |im|: tailTerm = m/(1+γ²) ≤ m/(4^jX²) (the per-term bound: 1/(1+γ²) ≤ 1/(4^jX²) ⟸ 4^jX² ≤ 1+γ² ⟸ 2^jX ≤ |γ| (dyadClass_lower needs X ≤ |im| ✓ from X < |im|) and the class = j ✓); for ¬(X < |im|): tailTerm = 0 ≤ (1/(4^jX²))·m ✓ (nonneg). So ∑ ≤ ofReal(∑ (1/(4^jX²))·m) = ofReal((1/(4^jX²))·∑ m) — and ∑_{full-fiber} m ≤ ??? — the full fiber includes |γ| ≤ X members — count them?? For j = 0: full fiber has |γ| < 2X (any): count ≍ 2X·A₀·log — but fiber_mult_count covers only X < |γ| part... For the sum ∑_{full-fiber} tailTerm: the |γ| ≤ X members contribute 0 — so I should split the full-fiber finset sum by (X < |im|): ∑_{full} = ∑_{full.filter (X < |im|)} tailTerm (others 0: Finset.sum_filter) — and the filtered finset = the fiber_mult_count finset (same set!) — so ∑_{full} tailTerm = ∑_{filtered} tailTerm ≤ (1/(4^jX²))·∑_{filtered} m ≤ (1/(4^jX²))·(fiber_mult_count bound) ✓.\n\nSo the chain: ∑'_{fiber-subtype} ofReal(tailTerm) \n= ∑_{fullFiber.toFinset} ofReal(tailTerm) [tsum_subtype + coe]\n= ofReal(∑_{fullFiber.toFinset} tailTerm) [ofReal_sum_of_nonneg]\n= ofReal(∑_{fullFiber.toFinset.filter (X < |·|)} tailTerm) [Finset.sum_filter: others are 0: `Finset.sum_filter_add...`: ∑_s = ∑_{s.filter p} + ∑_{s.filter ¬p}; the ¬p part = 0 (tailTerm = 0 there: `Finset.sum_eq_zero`)]\n≤ ofReal((1/(4^jX²))·∑_{filtered} m) [pointwise + ofReal_le_ofReal]\n≤ ofReal((1/(4^jX²))·(A₀(2^{j+1}X+3)·log(3·2^{j+1}X+5))) [fiber_mult_count]\n= ofReal(F_j·X-scaled)... wait F_j = (4A₀/X)·log(...)/2^j and the count-form: (1/(4^jX²))·A₀(2^{j+1}X+3)·log(...): is that ≤ F_j = 4A₀·log(...)/(X·2^j)? (1/(4^jX²))·A₀(2^{j+1}X+3) vs 4A₀/(X·2^j): ⟺ (2^{j+1}X+3)/(4^jX²) ≤ 4/(X·2^j) ⟺ (2^{j+1}X+3)·2^j ≤ 4·4^j·X ⟺ 2·4^jX + 3·2^j ≤ 4·4^j·X ⟺ 3·2^j ≤ 2·4^jX ⟸ 3·2^j ≤ 2·4^j·200 = 400·4^j ⟸ 3 ≤ 400·2^j ✓ (4^j·2 = 2·4^j... let me redo: 3·2^j ≤ 2·4^j·X ⟸ 3·2^j ≤ 400·4^j ⟺ 3 ≤ 400·2^j ✓ (2^j ≥ 1)). ✓ but this needs the count ≤ ... and the final inequality F-form — let me just define F_j := (1/(4^j·X²))·A₀(2^{j+1}X+3)·log(3·2^{j+1}X+5) EXACTLY (avoid the extra comparison): and prove ∑' F_j ≤ 16A₀logX/X via the per-term F_j ≤ (4A₀/X)·G_j: (1/(4^jX²))·A₀(2^{j+1}X+3)·log(...) ≤ (4A₀/X)·((j+4)log2+logX)/2^j: from the pieces: log(...) ≤ (j+4)log2+logX ✓ and (2^{j+1}X+3)/(4^jX²) ≤ 4/(X·2^j)·... (2^{j+1}X+3)/(4^jX²) = (2^{j+1}X+3)/(4^jX²): vs 4/(X2^j): cross: (2^{j+1}X+3)·X·2^j ≤ 4·4^jX² ⟺ 2^{j+1}X²2^j + 3X2^j ≤ 4·4^jX² ⟺ 2·4^jX² + 3·2^jX ≤ 4·4^jX² ⟺ 3·2^jX ≤ 2·4^jX² ⟺ 3 ≤ 2·2^j·X ✓ (2^jX ≥ 200). ✓. So F_j ≤ (4A₀/X)·((j+4)log2+logX)/2^j via mul_le_mul of the two piece-bounds ✓ (nonneg parts ✓).\n\nOK. Let me write zero_tail_inv_sq_le now in full. Also need to RESTATE dyadClass_fiber_finite to the full fiber + adapt fiber_mult_count's finiteness.\n\nChanges:\n1. dyadClass_fiber_finite: drop `∧ X < |(ρ:ℂ).im|` from the set (the proof's subset works unchanged since it only used dyadClass_upper ✓ — the hρ.1/hρ.2 split: hρ : ρ ∈ {full fiber}: hρ : dyadClass X ρ = j directly (not .1)).\n2. fiber_mult_count's finiteness: from the full-fiber finite + subset (the ∧-set ⊆ full fiber ✓ inter_left).\n\nLet me apply.","signature":""},{"type":"text","text":"`fiber_mult_count` compiles. Now restructuring the finiteness (full fiber) and writing the main tail lemma."},{"type":"tool_use","id":"Edit_408","name":"Edit","input":{"file_path":"D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\NguyenRH1\\LiCircleBound.lean","old_string":"/-- The dyadic fiber {dyadClass X ρ = j} is finite. -/\nlemma dyadClass_fiber_finite {X : ℝ} (hX : 0 < X) (j : ℕ) :\n {ρ : {ρ // IsNontrivialZero ρ} | dyadClass X ρ = j ∧ X < |(ρ : ℂ).im|}.Finite := by\n apply (finite_subtype_norm_lt (1 + (2 : ℝ) ^ (j + 1) * X + 1)).subset\n intro ρ hρ\n have hρj : dyadClass X ρ = j := hρ.1\n have hup := dyadClass_upper hX ρ\n rw [hρj] at hup\n have hnorm : ‖(ρ : ℂ)‖ ≤ |(ρ : ℂ).re| + |(ρ : ℂ).im| :=\n Complex.norm_le_abs_re_add_abs_im _\n have hre : |(ρ : ℂ).re| ≤ 1 := by\n rw [abs_le]\n exact ⟨by linarith [ρ.2.2.1], by linarith [ρ.2.2.2]⟩\n have h2pow : (0 : ℝ) ≤ (2 : ℝ) ^ (j + 1) * X := by positivity\n show ‖(ρ : ℂ)‖ < 1 + (2 : ℝ) ^ (j + 1) * X + 1\n linarith","new_string":"/-- The dyadic fiber {dyadClass X ρ = j} is finite. -/\nlemma dyadClass_fiber_finite {X : ℝ} (hX : 0 < X) (j : ℕ) :\n {ρ : {ρ // IsNontrivialZero ρ} | dyadClass X ρ = j}.Finite := by\n apply (finite_subtype_norm_lt (1 + (2 : ℝ) ^ (j + 1) * X + 1)).subset\n intro ρ hρ\n have hρj : dyadClass X ρ = j := hρ\n have hup := dyadClass_upper hX ρ\n rw [hρj] at hup\n have hnorm : ‖(ρ : ℂ)‖ ≤ |(ρ : ℂ).re| + |(ρ : ℂ).im| :=\n Complex.norm_le_abs_re_add_abs_im _\n have hre : |(ρ : ℂ).re| ≤ 1 := by\n rw [abs_le]\n exact ⟨by linarith [ρ.2.2.1], by linarith [ρ.2.2.2]⟩\n have h2pow : (0 : ℝ) ≤ (2 : ℝ) ^ (j + 1) * X := by positivity\n show ‖(ρ : ℂ)‖ < 1 + (2 : ℝ) ^ (j + 1) * X + 1\n linarith"},"extra_content":null}]