← Session 31 — ii′-5f: tight R-bound 10.5/48 (piece 3 + pinch)
thinking (13211 chars)
§18 compiles clean. Now the final piece: §19 (the piece-3 assembly). Commit §18 first, then write the assembly:
```
theorem far_series_le (hZC : ZeroCountProp) (hNLZ : NoLowZeros) {t : ℝ} (ht : 10 ≤ t)
{s : ℂ} (hσlo : -5/2 ≤ s.re) (hσhi : s.re ≤ 3) (him : s.im = t)
(hζ : riemannZeta s ≠ 0) :
‖∑' ρ, if ρ ∈ nearZerosSub t then (0:ℂ) else seriesDiffTerm s (2+tI) ρ‖
≤ 12.1284 * C0hat (t+1) + 7.2425
```
Proof structure:
1. norm ≤ ∑' farG (far_series_norm_le_farG_tsum).
2. ∑' farG = ∑_{mainFinset} farG + ∑' (if ∉ mainFinset then farG else 0) (tsum_split_finset — the LiCircleBound ℝ version).
3. ∑' (if ∉ mainFinset then farG else 0) = ∑' farGRight + ∑' farGLeft (pointwise split with hNLZ).
4. main ≤ farG_main_le = 4.5·(2C₀+0.55)·1.3476; right ≤ farGRight_le; left ≤ farGLeft_le.
5. Fold: 4.5·(2C₀+0.55)·1.3476 + Tail_R + Tail_L ≤ 12.1284·C₀ + 7.2425.
For step 3, the pointwise identity: for every ρ:
(if ρ ∉ mainFinset then farG t ρ else 0) = farGRight t ρ + farGLeft t ρ
- ρ ∈ mainFinset: LHS = 0. RHS: farGRight (x-cond fails since x < ⌊t⌋₊+1) + farGLeft (γ<0 impossible by hNLZ: γ < 0 ⟹ |γ| ≥ 14 ⟹ x = t+|γ| ≥ t+14 ⟹ ⌊x⌋₊ ≥ ⌊t⌋₊+14 > ⌊t⌋₊ ⟹ x ≥ ⌊t⌋₊+14 > ⌊t⌋₊+1 ⟹ ¬main — contradiction ⟹ γ ≥ 0 ⟹ farGLeft = 0). So RHS = 0 ✓.
Formalize farGLeft_mainFinset_eq_zero (hNLZ) (hmem : ρ ∈ mainFinset t) : farGLeft t ρ = 0.
- ρ ∉ mainFinset:
- near (x < 1): LHS = farG = 0 (farG if_pos near? — near means ρ ∈ nearZerosSub ⟹ farG = 0 ✓); RHS: farGRight (x < 1 < ⌊t⌋₊+1 ⟹ x-cond fails ⟹ 0) + farGLeft (γ < 0 ⟹ farG = 0 ✓ near; γ ≥ 0 ⟹ 0) = 0 ✓.
- far, x ≥ ⌊t⌋₊+1: LHS = farG. RHS: γ ≥ t ⟹ farGRight = farG (x-cond ✓ t-cond ✓), farGLeft = 0 (γ ≥ t ≥ 10 > 0 ⟹ ¬γ<0 ⟹ 0); γ < t ⟹ x = t−γ > t ⟹ γ < 0 ⟹ farGRight = 0 (t ≤ γ fails), farGLeft = farG (γ < 0 ✓). ✓
- far, x < ⌊t⌋₊+1: ρ far with x < ⌊t⌋₊+1 ⟹ ρ ∈ mainFinset (contradiction with ∉). ✓ (mainFinset's filter is exactly 1 ≤ x ∧ x < ⌊t⌋₊+1 ⟹ far + this ⟹ mem ✓).
So the identity holds. Formalize:
```
lemma farG_tail_eq (hNLZ : NoLowZeros) {t : ℝ} (ht : 10 ≤ t) (ρ : {ρ : ℂ // IsNontrivialZero ρ}) :
(if ρ ∈ mainFinset t then (0 : ℝ) else farG t ρ) = farGRight t ρ + farGLeft t ρ := by
classical
by_cases hmem : ρ ∈ mainFinset t
· rw [if_pos hmem]
-- farGRight = 0 (x-cond fails), farGLeft = 0 (NoLowZeros)
have hright : farGRight t ρ = 0 := by
rw [farGRight, if_neg (fun h => by
have hx := (mem_mainFinset (by linarith : (0:ℝ) ≤ t)).mp hmem
exact absurd h.1 (by
have h1 : ((Nat.floor t : ℝ) + 1 ≤ |ρ.1.im - t|) := by exact_mod_cast h.1
linarith [hx.2, h1] : ¬ Nat.floor t + 1 ≤ |ρ.1.im - t|))]
have hleft : farGLeft t ρ = 0 := by
rw [farGLeft, if_neg (by
intro hγ
have h1 : 14 ≤ |ρ.1.im| := hNLZ ρ.1 ρ.2
have hx := (mem_mainFinset (by linarith : (0:ℝ) ≤ t)).mp hmem
-- x = t + |γ| ≥ t + 14 ⟹ x ≥ ⌊t⌋₊+14 > ⌊t⌋₊+1 contradiction with hx.2
have h2 : |ρ.1.im - t| = t + |ρ.1.im| := by
rw [abs_of_neg (by linarith [hγ, ht] : ρ.1.im - t < 0)]
have h3 : |ρ.1.im| = -ρ.1.im := abs_of_neg hγ
rw [h3]
ring
have h4 : t + 14 ≤ |ρ.1.im - t| := by rw [h2]; linarith [h1, ht]
-- ⌊x⌋₊ ≥ ⌊t+14⌋ ≥ ⌊t⌋₊+14: x ≥ t+14 ⟹ ⌊x⌋₊ ≥ ⌊t⌋₊+14 (floor_mono with the +14 shift)
have h5 : Nat.floor t + 14 ≤ Nat.floor |ρ.1.im - t| := by
have h6 : Nat.floor (t + 14) ≤ Nat.floor |ρ.1.im - t| := Nat.floor_mono h4
have h7 : Nat.floor (t + 14) = Nat.floor t + 14 := by
rw [show (14 : ℝ) = ((14 : ℕ) : ℝ) from by norm_num, Nat.floor_add_natCast]
rwa [h7] at h6
-- ⌊x⌋₊ ≥ ⌊t⌋₊+14 ⟹ x ≥ ⌊t⌋₊+14 > ⌊t⌋₊+1 ⟹ contradicts hx.2
have h8 : ((Nat.floor t + 14 : ℕ) : ℝ) ≤ |ρ.1.im - t| :=
(Nat.floor_le (abs_nonneg _)).trans (by exact_mod_cast h5)
have h9 : ((Nat.floor t + 14 : ℕ) : ℝ) = (Nat.floor t : ℝ) + 14 := by push_cast; ring
rw [h9] at h8
linarith [hx.2, h8] : ¬ ρ.1.im < 0)]
rw [hright, hleft, add_zero]
· rw [if_neg hmem]
-- case analysis on γ vs t and the near condition
by_cases hγ : t ≤ ρ.1.im
· -- γ ≥ t: x = γ − t
by_cases hx1 : ρ ∈ nearZerosSub t
· rw [farG, if_pos hx1]
rw [farGRight, if_neg (fun h => by
have h2 := mem_nearZerosSub.mp hx1
have h3 : |ρ.1.im - t| < 1 := h2
have h4 : (Nat.floor t : ℝ) + 1 ≤ |ρ.1.im - t| := by exact_mod_cast h.1
linarith [h3, h4] : ¬ (Nat.floor t + 1 ≤ |ρ.1.im - t| ∧ t ≤ ρ.1.im))]
rw [farGLeft, if_neg (by linarith [hγ, ht] : ¬ ρ.1.im < 0)]
· rw [farGRight, if_pos ⟨?_, hγ⟩]
· rw [farGLeft, if_neg (by linarith [hγ, ht] : ¬ ρ.1.im < 0)]
· -- x ≥ ⌊t⌋₊+1: ρ far (∉ nearZerosSub) and ∉ mainFinset
have hnotmain := hmem
by_contra hsmall
apply hnotmain
-- x < ⌊t⌋₊+1 and far ⟹ mem mainFinset
rw [mem_mainFinset (by linarith : (0:ℝ) ≤ t)]
refine ⟨?_, ?_⟩
· -- x ≥ 1 (far)
have h1 := hx1
rw [mem_nearZerosSub] at h1
push Not at h1
exact h1
· exact hsmall
· -- γ < t: x = t − γ
push Not at hγ
by_cases hx1 : ρ ∈ nearZerosSub t
· rw [farG, if_pos hx1]
rw [farGRight, if_neg (fun h => by
have h2 := mem_nearZerosSub.mp hx1
have h3 : |ρ.1.im - t| < 1 := h2
have h4 : (Nat.floor t : ℝ) + 1 ≤ |ρ.1.im - t| := by exact_mod_cast h.1
linarith [h3, h4] : ¬ (Nat.floor t + 1 ≤ |ρ.1.im - t| ∧ t ≤ ρ.1.im))]
rw [farGLeft, if_neg (by
-- γ < 0 possible: farGLeft = farG if γ < 0; near ⟹ farG = 0 anyway
by_cases hγ0 : ρ.1.im < 0
· rw [farG, if_pos hx1] at *
-- goal is to show ¬(γ < 0)?? no — farGLeft's if is (γ < 0): if TRUE, farGLeft = farG = 0 (near)
-- so I should NOT negate here — restructure below
...)]
...
```
Hmm — the γ < t case with near: farG = 0 (near) so LHS = 0; farGLeft = farG if γ < 0 — farG = 0 (near ✓) so farGLeft = 0 either way ✓. Actually — for the near case BOTH sides are 0 trivially regardless of γ:
- near: LHS = if ∉ main then farG = farG = 0 (near ✓). Wait — LHS is `(if ρ ∈ mainFinset then 0 else farG t ρ)` — for ρ ∉ mainFinset (we're in the ¬mem branch): LHS = farG t ρ = 0 (near ✓). RHS: farGRight + farGLeft: farGRight = if (x-cond ∧ t≤γ) then farG: x-cond fails (x < 1 < ⌊t⌋₊+1) ⟹ 0; farGLeft = if γ<0 then farG = 0 (near ✓) else 0 ✓. Sum = 0 ✓. So near case: all three are 0. ✓
Restructure the ¬mem branch:
```
· rw [if_neg hmem]
by_cases hnear : ρ ∈ nearZerosSub t
· have hz : farG t ρ = 0 := farG, if_pos hnear — via: rw [farG, if_pos hnear]
rw [hz]
rw [farGRight, if_neg (fun h => by
have h2 := mem_nearZerosSub.mp hnear
have h4 : (Nat.floor t : ℝ) + 1 ≤ |ρ.1.im - t| := by exact_mod_cast h.1
linarith [h2, h4] : ¬ (Nat.floor t + 1 ≤ |ρ.1.im - t| ∧ t ≤ ρ.1.im))]
rw [farGLeft]
by_cases hγ0 : ρ.1.im < 0
· rw [if_pos hγ0, hz]
· rw [if_neg hγ0]
· -- far (∉ nearZerosSub): x ≥ 1; ∉ main ⟹ x ≥ ⌊t⌋₊+1
have hbig : (Nat.floor t : ℝ) + 1 ≤ |ρ.1.im - t| := by
by_contra hsmall
apply hmem
rw [mem_mainFinset (by linarith : (0:ℝ) ≤ t)]
refine ⟨?_, ?_⟩
· have h1 := hnear
rw [mem_nearZerosSub] at h1
push Not at h1
exact h1
· -- x < ⌊t⌋₊+1 from hsmall: hsmall : ¬(⌊t⌋₊+1 ≤ x): x < ⌊t⌋₊+1
have h2 : |ρ.1.im - t| < (Nat.floor t : ℝ) + 1 := by
have h3 : ¬((Nat.floor t : ℝ) + 1 ≤ |ρ.1.im - t|) := by
intro h4
apply hsmall
have h5 : ((Nat.floor t + 1 : ℕ) : ℝ) ≤ |ρ.1.im - t| := by exact_mod_cast h4
have h6 : ((Nat.floor t + 1 : ℕ) : ℝ) = (Nat.floor t : ℝ) + 1 := by push_cast; ring
rwa [h6] at h5
exact (not_le).mp h3
exact h2
by_cases hγ : t ≤ ρ.1.im
· rw [farGRight, if_pos ⟨by exact_mod_cast (by
have h6 : ((Nat.floor t : ℕ) : ℝ) + 1 ≤ |ρ.1.im - t| := by
have h7 : ((Nat.floor t + 1 : ℕ) : ℝ) ≤ |ρ.1.im - t| := by exact_mod_cast hbig
... — hbig is already (⌊t⌋₊:ℝ)+1 ≤ x ✓ just use it
exact hbig), hγ⟩]
rw [farGLeft, if_neg (by linarith [hγ, ht] : ¬ ρ.1.im < 0)]
· push Not at hγ
-- γ < t: x = t−γ > t ⟹ γ < 0 ⟹ farGLeft = farG; farGRight = 0
have hγ0 : ρ.1.im < 0 := by
have h2 : |ρ.1.im - t| = t - ρ.1.im := by
rw [abs_of_neg (by linarith [hγ] : ρ.1.im - t < 0)]
ring
have h3 : t < t - ρ.1.im := by
have h4 : t ≤ |ρ.1.im - t| := by linarith [hbig, ht]
rw [h2] at h4
linarith [h4, ht]
linarith [h3]
rw [farGRight, if_neg (fun h => hγ h.2), farGLeft, if_pos hγ0]
```
Hmm wait — hbig : (⌊t⌋₊:ℝ)+1 ≤ x — the farGRight's if-condition is `Nat.floor t + 1 ≤ |ρ.1.im − t|` — as a ℕ-inequality? I defined farGRight's if as `(Nat.floor t + 1 ≤ |ρ.1.im - t| ∧ t ≤ ρ.1.im)` — hmm — `Nat.floor t + 1 ≤ |...|` — the LHS `Nat.floor t + 1` is ℕ + ℕ = ℕ, and ≤ |...| : ℝ — mixed ≤ with a cast: `↑(Nat.floor t + 1) ≤ |...|` — so the condition is `(↑(Nat.floor t + 1) : ℝ) ≤ |...|`. And hbig : (Nat.floor t : ℝ) + 1 ≤ |...| — the bridge: ↑(⌊t⌋₊+1) = (⌊t⌋₊:ℝ)+1 (push_cast). For the if_pos ⟨xcond, hγ⟩: xcond : ↑(⌊t⌋₊+1) ≤ |...| := by exact_mod_cast-or-bridge from hbig: have : ((Nat.floor t + 1 : ℕ) : ℝ) ≤ |...| := by rw [show ((Nat.floor t + 1 : ℕ) : ℝ) = (Nat.floor t : ℝ) + 1 from by push_cast; ring]; exact hbig.
OK — this pointwise split is fiddly but mechanical. Also `Nat.floor_add_natCast` — check name: Nat.floor_add_natCast (n : ℕ) : ⌊a + n⌋₊ = ⌊a⌋₊ + n ✓ probably exists (used for the t+14 shift).
Now the main assembly:
```
theorem far_series_le (hZC : ZeroCountProp) (hNLZ : NoLowZeros) {t : ℝ} (ht : 10 ≤ t)
{s : ℂ} (hσlo : -5 / 2 ≤ s.re) (hσhi : s.re ≤ 3) (him : s.im = t)
(hζ : riemannZeta s ≠ 0) :
‖∑' ρ : {ρ : ℂ // IsNontrivialZero ρ},
if ρ ∈ nearZerosSub t then (0 : ℂ) else seriesDiffTerm s (2 + t * Complex.I) ρ‖
≤ 12.1284 * C0hat (t + 1) + 7.2425 := by
classical
have hnorm := far_series_norm_le_farG_tsum ht hσlo hσhi him hζ
have hsplit := tsum_split_finset (farG_summable (by linarith : (0 : ℝ) ≤ t)) (mainFinset t)
have htail : (∑' ρ : {ρ : ℂ // IsNontrivialZero ρ},
if ρ ∈ mainFinset t then (0 : ℝ) else farG t ρ)
= (∑' ρ : {ρ : ℂ // IsNontrivialZero ρ}, farGRight t ρ)
+ ∑' ρ : {ρ : ℂ // IsNontrivialZero ρ}, farGLeft t ρ := by
rw [← Summable.tsum_add (farGRight_summable (by linarith : (0 : ℝ) ≤ t))
(farGLeft_summable (by linarith : (0 : ℝ) ≤ t))]
apply tsum_congr
intro ρ
rw [farG_tail_eq hNLZ ht ρ]
have hmain := farG_main_le hZC hNLZ ht
have hright := farGRight_le hZC ht
have hleft := farGLeft_le hZC hNLZ ht
calc ‖∑' ρ, if ρ ∈ nearZerosSub t then (0:ℂ) else seriesDiffTerm s (2+tI) ρ‖
≤ ∑' ρ, farG t ρ := hnorm
_ = ∑ ρ ∈ mainFinset t, farG t ρ + ∑' ρ, (if ρ ∈ mainFinset t then (0:ℝ) else farG t ρ) := hsplit
_ = ∑ ρ ∈ mainFinset t, farG t ρ
+ ((∑' ρ, farGRight t ρ) + ∑' ρ, farGLeft t ρ) := by rw [htail]
_ ≤ (4.5 * (2 * C0hat (t + 1) + 0.55) * 1.3476)
+ (4.5 * (0.433 * (0.833 * 0.1 + 0.3303) + 0.886 * (0.3475 * 0.1 + 0.1216) + 2.9 * 0.1)
+ 4.5 * (0.433 * (0.1942 * (1/23) + 0.1687) + 0.886 * (0.0736 * (1/23) + 0.0621) + 2.9 * (1/23))) := by
apply add_le_add hmain (add_le_add hright hleft)
_ ≤ 12.1284 * C0hat (t + 1) + 7.2425 := by
-- the numeric fold
have hC0nn : (0 : ℝ) ≤ C0hat (t + 1) := by
have h1 := two_le_C0hat (by linarith [ht] : (1 : ℝ) ≤ t + 1)
linarith
nlinarith [hC0nn]
```
The final fold: 4.5·(2C₀+0.55)·1.3476 = 12.1284·C₀ + 3.33531; Tail_R = 4.5·(0.433·(0.0833+0.3303)+0.886·(0.03475+0.1216)+0.29) = 4.5·(0.433·0.4136+0.886·0.15635+0.29) = 4.5·(0.179088+0.138526+0.29) = 4.5·0.607614 = 2.734263; Tail_L = 4.5·(0.433·(0.0084435+0.1687)+0.886·(0.0032+0.0621)+0.126087) = 4.5·(0.433·0.1771435+0.886·0.0653+0.126087) = 4.5·(0.0767032+0.0578558+0.126087) = 4.5·0.260646 = 1.172907. Sum: 3.33531+2.734263+1.172907 = 7.24248 ≤ 7.2425 ✓ (margin 2e-5 — TIGHT!). Hmm — let me recompute precisely:
- 4.5·0.55·1.3476 = 2.475·1.3476 = 3.33531.
- Tail_R: 0.433·0.4136 = 0.1790888; 0.886·0.15635 = 0.13852610; +0.29 = 0.6076149; ×4.5 = 2.7342671.
- Tail_L: 0.1942/23 = 0.0084434783; +0.1687 = 0.1771434783; ×0.433 = 0.0767031262; 0.0736/23 = 0.0032; +0.0621 = 0.0653; ×0.886 = 0.0578558; 2.9/23 = 0.1260869565; sum = 0.2606458827; ×4.5 = 1.1729064722.
- Total: 3.33531 + 2.7342671 + 1.1729065 = 7.2424836 ≤ 7.2425 ✓ margin 1.6e-5.
Ugh — that's thin (1.6e-5). nlinarith should verify exactly (rational arithmetic ✓ no approximations). OK.
Let me also double-check 4.5·2·1.3476 = 12.1284 ✓ (9·1.3476 = 12.1284 ✓).
Now — the farG_tail_eq formalization is the fiddly part. Let me also confirm `tsum_split_finset` is the LiCircleBound ℝ version (exists ✓ line 249).
For the mainFinset's mem in the neg-branch: `mem_mainFinset (by linarith : (0:ℝ) ≤ t)` ✓.
Also `Nat.floor_add_natCast` — verify it exists: grep.
§18 compiles. Committing, then writing the piece-3 assembly (§19).
tool: Bash
input
{
"command": "cd D:/Python/Quantum && git add research/lean/NguyenRH1/NguyenRH1/LiTightR.lean && git -c user.name=\"NGUYEN-RH-1\" -c user.email=\"research@local\" commit -m \"$(cat <<'EOF'\nSession 036 (5f-ii piece 3e-ii): the right-tail machine\n\nLiTightR.lean section 18 (~430 lines): farGRight (farG restricted to\ntail buckets k >= floor(t)+1 on the right side), farGRight_term_le\n(via farG_le_farW_mul), farGRight_fiber_finite/count (zeroWindow(t+k)\n+ C0hat(t+k+1) <= C0hat(2k+1)), farGRight_fiber_le, loglog_ge_neg_point37\n+ farGRightBridge_nonneg, farGRightMaj(+combo, nonnegs, le_combo, the\nshifted brick summables), farGRightMaj_series_le\n(4.5[0.433(0.833*0.1+0.3303)+0.886(0.3475*0.1+0.1216)+2.9*0.1]), and\nfarGRight_le (the ENNReal fiberwise assembly). Full file elaborates\nclean, zero warnings.\nEOF\n)\"",
"description": "Commit piece-3e-ii sub-stage"
}
raw content_json (database row)
[{"type":"thinking","thinking":"§18 compiles clean. Now the final piece: §19 (the piece-3 assembly). Commit §18 first, then write the assembly:\n\n```\ntheorem far_series_le (hZC : ZeroCountProp) (hNLZ : NoLowZeros) {t : ℝ} (ht : 10 ≤ t)\n {s : ℂ} (hσlo : -5/2 ≤ s.re) (hσhi : s.re ≤ 3) (him : s.im = t)\n (hζ : riemannZeta s ≠ 0) :\n ‖∑' ρ, if ρ ∈ nearZerosSub t then (0:ℂ) else seriesDiffTerm s (2+tI) ρ‖\n ≤ 12.1284 * C0hat (t+1) + 7.2425\n```\n\nProof structure:\n1. norm ≤ ∑' farG (far_series_norm_le_farG_tsum).\n2. ∑' farG = ∑_{mainFinset} farG + ∑' (if ∉ mainFinset then farG else 0) (tsum_split_finset — the LiCircleBound ℝ version).\n3. ∑' (if ∉ mainFinset then farG else 0) = ∑' farGRight + ∑' farGLeft (pointwise split with hNLZ).\n4. main ≤ farG_main_le = 4.5·(2C₀+0.55)·1.3476; right ≤ farGRight_le; left ≤ farGLeft_le.\n5. Fold: 4.5·(2C₀+0.55)·1.3476 + Tail_R + Tail_L ≤ 12.1284·C₀ + 7.2425.\n\nFor step 3, the pointwise identity: for every ρ:\n(if ρ ∉ mainFinset then farG t ρ else 0) = farGRight t ρ + farGLeft t ρ\n- ρ ∈ mainFinset: LHS = 0. RHS: farGRight (x-cond fails since x < ⌊t⌋₊+1) + farGLeft (γ<0 impossible by hNLZ: γ < 0 ⟹ |γ| ≥ 14 ⟹ x = t+|γ| ≥ t+14 ⟹ ⌊x⌋₊ ≥ ⌊t⌋₊+14 > ⌊t⌋₊ ⟹ x ≥ ⌊t⌋₊+14 > ⌊t⌋₊+1 ⟹ ¬main — contradiction ⟹ γ ≥ 0 ⟹ farGLeft = 0). So RHS = 0 ✓.\n Formalize farGLeft_mainFinset_eq_zero (hNLZ) (hmem : ρ ∈ mainFinset t) : farGLeft t ρ = 0.\n- ρ ∉ mainFinset:\n - near (x < 1): LHS = farG = 0 (farG if_pos near? — near means ρ ∈ nearZerosSub ⟹ farG = 0 ✓); RHS: farGRight (x < 1 < ⌊t⌋₊+1 ⟹ x-cond fails ⟹ 0) + farGLeft (γ < 0 ⟹ farG = 0 ✓ near; γ ≥ 0 ⟹ 0) = 0 ✓.\n - far, x ≥ ⌊t⌋₊+1: LHS = farG. RHS: γ ≥ t ⟹ farGRight = farG (x-cond ✓ t-cond ✓), farGLeft = 0 (γ ≥ t ≥ 10 > 0 ⟹ ¬γ<0 ⟹ 0); γ < t ⟹ x = t−γ > t ⟹ γ < 0 ⟹ farGRight = 0 (t ≤ γ fails), farGLeft = farG (γ < 0 ✓). ✓\n - far, x < ⌊t⌋₊+1: ρ far with x < ⌊t⌋₊+1 ⟹ ρ ∈ mainFinset (contradiction with ∉). ✓ (mainFinset's filter is exactly 1 ≤ x ∧ x < ⌊t⌋₊+1 ⟹ far + this ⟹ mem ✓).\n\nSo the identity holds. Formalize:\n```\nlemma farG_tail_eq (hNLZ : NoLowZeros) {t : ℝ} (ht : 10 ≤ t) (ρ : {ρ : ℂ // IsNontrivialZero ρ}) :\n (if ρ ∈ mainFinset t then (0 : ℝ) else farG t ρ) = farGRight t ρ + farGLeft t ρ := by\n classical\n by_cases hmem : ρ ∈ mainFinset t\n · rw [if_pos hmem]\n -- farGRight = 0 (x-cond fails), farGLeft = 0 (NoLowZeros)\n have hright : farGRight t ρ = 0 := by\n rw [farGRight, if_neg (fun h => by\n have hx := (mem_mainFinset (by linarith : (0:ℝ) ≤ t)).mp hmem\n exact absurd h.1 (by\n have h1 : ((Nat.floor t : ℝ) + 1 ≤ |ρ.1.im - t|) := by exact_mod_cast h.1\n linarith [hx.2, h1] : ¬ Nat.floor t + 1 ≤ |ρ.1.im - t|))]\n have hleft : farGLeft t ρ = 0 := by\n rw [farGLeft, if_neg (by\n intro hγ\n have h1 : 14 ≤ |ρ.1.im| := hNLZ ρ.1 ρ.2\n have hx := (mem_mainFinset (by linarith : (0:ℝ) ≤ t)).mp hmem\n -- x = t + |γ| ≥ t + 14 ⟹ x ≥ ⌊t⌋₊+14 > ⌊t⌋₊+1 contradiction with hx.2\n have h2 : |ρ.1.im - t| = t + |ρ.1.im| := by\n rw [abs_of_neg (by linarith [hγ, ht] : ρ.1.im - t < 0)]\n have h3 : |ρ.1.im| = -ρ.1.im := abs_of_neg hγ\n rw [h3]\n ring\n have h4 : t + 14 ≤ |ρ.1.im - t| := by rw [h2]; linarith [h1, ht]\n -- ⌊x⌋₊ ≥ ⌊t+14⌋ ≥ ⌊t⌋₊+14: x ≥ t+14 ⟹ ⌊x⌋₊ ≥ ⌊t⌋₊+14 (floor_mono with the +14 shift)\n have h5 : Nat.floor t + 14 ≤ Nat.floor |ρ.1.im - t| := by\n have h6 : Nat.floor (t + 14) ≤ Nat.floor |ρ.1.im - t| := Nat.floor_mono h4\n have h7 : Nat.floor (t + 14) = Nat.floor t + 14 := by\n rw [show (14 : ℝ) = ((14 : ℕ) : ℝ) from by norm_num, Nat.floor_add_natCast]\n rwa [h7] at h6\n -- ⌊x⌋₊ ≥ ⌊t⌋₊+14 ⟹ x ≥ ⌊t⌋₊+14 > ⌊t⌋₊+1 ⟹ contradicts hx.2\n have h8 : ((Nat.floor t + 14 : ℕ) : ℝ) ≤ |ρ.1.im - t| :=\n (Nat.floor_le (abs_nonneg _)).trans (by exact_mod_cast h5)\n have h9 : ((Nat.floor t + 14 : ℕ) : ℝ) = (Nat.floor t : ℝ) + 14 := by push_cast; ring\n rw [h9] at h8\n linarith [hx.2, h8] : ¬ ρ.1.im < 0)]\n rw [hright, hleft, add_zero]\n · rw [if_neg hmem]\n -- case analysis on γ vs t and the near condition\n by_cases hγ : t ≤ ρ.1.im\n · -- γ ≥ t: x = γ − t\n by_cases hx1 : ρ ∈ nearZerosSub t\n · rw [farG, if_pos hx1]\n rw [farGRight, if_neg (fun h => by\n have h2 := mem_nearZerosSub.mp hx1\n have h3 : |ρ.1.im - t| < 1 := h2\n have h4 : (Nat.floor t : ℝ) + 1 ≤ |ρ.1.im - t| := by exact_mod_cast h.1\n linarith [h3, h4] : ¬ (Nat.floor t + 1 ≤ |ρ.1.im - t| ∧ t ≤ ρ.1.im))]\n rw [farGLeft, if_neg (by linarith [hγ, ht] : ¬ ρ.1.im < 0)]\n · rw [farGRight, if_pos ⟨?_, hγ⟩]\n · rw [farGLeft, if_neg (by linarith [hγ, ht] : ¬ ρ.1.im < 0)]\n · -- x ≥ ⌊t⌋₊+1: ρ far (∉ nearZerosSub) and ∉ mainFinset\n have hnotmain := hmem\n by_contra hsmall\n apply hnotmain\n -- x < ⌊t⌋₊+1 and far ⟹ mem mainFinset\n rw [mem_mainFinset (by linarith : (0:ℝ) ≤ t)]\n refine ⟨?_, ?_⟩\n · -- x ≥ 1 (far)\n have h1 := hx1\n rw [mem_nearZerosSub] at h1\n push Not at h1\n exact h1\n · exact hsmall\n · -- γ < t: x = t − γ\n push Not at hγ\n by_cases hx1 : ρ ∈ nearZerosSub t\n · rw [farG, if_pos hx1]\n rw [farGRight, if_neg (fun h => by\n have h2 := mem_nearZerosSub.mp hx1\n have h3 : |ρ.1.im - t| < 1 := h2\n have h4 : (Nat.floor t : ℝ) + 1 ≤ |ρ.1.im - t| := by exact_mod_cast h.1\n linarith [h3, h4] : ¬ (Nat.floor t + 1 ≤ |ρ.1.im - t| ∧ t ≤ ρ.1.im))]\n rw [farGLeft, if_neg (by\n -- γ < 0 possible: farGLeft = farG if γ < 0; near ⟹ farG = 0 anyway\n by_cases hγ0 : ρ.1.im < 0\n · rw [farG, if_pos hx1] at *\n -- goal is to show ¬(γ < 0)?? no — farGLeft's if is (γ < 0): if TRUE, farGLeft = farG = 0 (near)\n -- so I should NOT negate here — restructure below\n ...)]\n ...\n```\nHmm — the γ < t case with near: farG = 0 (near) so LHS = 0; farGLeft = farG if γ < 0 — farG = 0 (near ✓) so farGLeft = 0 either way ✓. Actually — for the near case BOTH sides are 0 trivially regardless of γ:\n- near: LHS = if ∉ main then farG = farG = 0 (near ✓). Wait — LHS is `(if ρ ∈ mainFinset then 0 else farG t ρ)` — for ρ ∉ mainFinset (we're in the ¬mem branch): LHS = farG t ρ = 0 (near ✓). RHS: farGRight + farGLeft: farGRight = if (x-cond ∧ t≤γ) then farG: x-cond fails (x < 1 < ⌊t⌋₊+1) ⟹ 0; farGLeft = if γ<0 then farG = 0 (near ✓) else 0 ✓. Sum = 0 ✓. So near case: all three are 0. ✓\n\nRestructure the ¬mem branch:\n```\n · rw [if_neg hmem]\n by_cases hnear : ρ ∈ nearZerosSub t\n · have hz : farG t ρ = 0 := farG, if_pos hnear — via: rw [farG, if_pos hnear]\n rw [hz]\n rw [farGRight, if_neg (fun h => by\n have h2 := mem_nearZerosSub.mp hnear\n have h4 : (Nat.floor t : ℝ) + 1 ≤ |ρ.1.im - t| := by exact_mod_cast h.1\n linarith [h2, h4] : ¬ (Nat.floor t + 1 ≤ |ρ.1.im - t| ∧ t ≤ ρ.1.im))]\n rw [farGLeft]\n by_cases hγ0 : ρ.1.im < 0\n · rw [if_pos hγ0, hz]\n · rw [if_neg hγ0]\n · -- far (∉ nearZerosSub): x ≥ 1; ∉ main ⟹ x ≥ ⌊t⌋₊+1\n have hbig : (Nat.floor t : ℝ) + 1 ≤ |ρ.1.im - t| := by\n by_contra hsmall\n apply hmem\n rw [mem_mainFinset (by linarith : (0:ℝ) ≤ t)]\n refine ⟨?_, ?_⟩\n · have h1 := hnear\n rw [mem_nearZerosSub] at h1\n push Not at h1\n exact h1\n · -- x < ⌊t⌋₊+1 from hsmall: hsmall : ¬(⌊t⌋₊+1 ≤ x): x < ⌊t⌋₊+1\n have h2 : |ρ.1.im - t| < (Nat.floor t : ℝ) + 1 := by\n have h3 : ¬((Nat.floor t : ℝ) + 1 ≤ |ρ.1.im - t|) := by\n intro h4\n apply hsmall\n have h5 : ((Nat.floor t + 1 : ℕ) : ℝ) ≤ |ρ.1.im - t| := by exact_mod_cast h4\n have h6 : ((Nat.floor t + 1 : ℕ) : ℝ) = (Nat.floor t : ℝ) + 1 := by push_cast; ring\n rwa [h6] at h5\n exact (not_le).mp h3\n exact h2\n by_cases hγ : t ≤ ρ.1.im\n · rw [farGRight, if_pos ⟨by exact_mod_cast (by\n have h6 : ((Nat.floor t : ℕ) : ℝ) + 1 ≤ |ρ.1.im - t| := by\n have h7 : ((Nat.floor t + 1 : ℕ) : ℝ) ≤ |ρ.1.im - t| := by exact_mod_cast hbig\n ... — hbig is already (⌊t⌋₊:ℝ)+1 ≤ x ✓ just use it\n exact hbig), hγ⟩]\n rw [farGLeft, if_neg (by linarith [hγ, ht] : ¬ ρ.1.im < 0)]\n · push Not at hγ\n -- γ < t: x = t−γ > t ⟹ γ < 0 ⟹ farGLeft = farG; farGRight = 0\n have hγ0 : ρ.1.im < 0 := by\n have h2 : |ρ.1.im - t| = t - ρ.1.im := by\n rw [abs_of_neg (by linarith [hγ] : ρ.1.im - t < 0)]\n ring\n have h3 : t < t - ρ.1.im := by\n have h4 : t ≤ |ρ.1.im - t| := by linarith [hbig, ht]\n rw [h2] at h4\n linarith [h4, ht]\n linarith [h3]\n rw [farGRight, if_neg (fun h => hγ h.2), farGLeft, if_pos hγ0]\n```\nHmm wait — hbig : (⌊t⌋₊:ℝ)+1 ≤ x — the farGRight's if-condition is `Nat.floor t + 1 ≤ |ρ.1.im − t|` — as a ℕ-inequality? I defined farGRight's if as `(Nat.floor t + 1 ≤ |ρ.1.im - t| ∧ t ≤ ρ.1.im)` — hmm — `Nat.floor t + 1 ≤ |...|` — the LHS `Nat.floor t + 1` is ℕ + ℕ = ℕ, and ≤ |...| : ℝ — mixed ≤ with a cast: `↑(Nat.floor t + 1) ≤ |...|` — so the condition is `(↑(Nat.floor t + 1) : ℝ) ≤ |...|`. And hbig : (Nat.floor t : ℝ) + 1 ≤ |...| — the bridge: ↑(⌊t⌋₊+1) = (⌊t⌋₊:ℝ)+1 (push_cast). For the if_pos ⟨xcond, hγ⟩: xcond : ↑(⌊t⌋₊+1) ≤ |...| := by exact_mod_cast-or-bridge from hbig: have : ((Nat.floor t + 1 : ℕ) : ℝ) ≤ |...| := by rw [show ((Nat.floor t + 1 : ℕ) : ℝ) = (Nat.floor t : ℝ) + 1 from by push_cast; ring]; exact hbig.\n\nOK — this pointwise split is fiddly but mechanical. Also `Nat.floor_add_natCast` — check name: Nat.floor_add_natCast (n : ℕ) : ⌊a + n⌋₊ = ⌊a⌋₊ + n ✓ probably exists (used for the t+14 shift).\n\nNow the main assembly:\n```\ntheorem far_series_le (hZC : ZeroCountProp) (hNLZ : NoLowZeros) {t : ℝ} (ht : 10 ≤ t)\n {s : ℂ} (hσlo : -5 / 2 ≤ s.re) (hσhi : s.re ≤ 3) (him : s.im = t)\n (hζ : riemannZeta s ≠ 0) :\n ‖∑' ρ : {ρ : ℂ // IsNontrivialZero ρ},\n if ρ ∈ nearZerosSub t then (0 : ℂ) else seriesDiffTerm s (2 + t * Complex.I) ρ‖\n ≤ 12.1284 * C0hat (t + 1) + 7.2425 := by\n classical\n have hnorm := far_series_norm_le_farG_tsum ht hσlo hσhi him hζ\n have hsplit := tsum_split_finset (farG_summable (by linarith : (0 : ℝ) ≤ t)) (mainFinset t)\n have htail : (∑' ρ : {ρ : ℂ // IsNontrivialZero ρ},\n if ρ ∈ mainFinset t then (0 : ℝ) else farG t ρ)\n = (∑' ρ : {ρ : ℂ // IsNontrivialZero ρ}, farGRight t ρ)\n + ∑' ρ : {ρ : ℂ // IsNontrivialZero ρ}, farGLeft t ρ := by\n rw [← Summable.tsum_add (farGRight_summable (by linarith : (0 : ℝ) ≤ t))\n (farGLeft_summable (by linarith : (0 : ℝ) ≤ t))]\n apply tsum_congr\n intro ρ\n rw [farG_tail_eq hNLZ ht ρ]\n have hmain := farG_main_le hZC hNLZ ht\n have hright := farGRight_le hZC ht\n have hleft := farGLeft_le hZC hNLZ ht\n calc ‖∑' ρ, if ρ ∈ nearZerosSub t then (0:ℂ) else seriesDiffTerm s (2+tI) ρ‖\n ≤ ∑' ρ, farG t ρ := hnorm\n _ = ∑ ρ ∈ mainFinset t, farG t ρ + ∑' ρ, (if ρ ∈ mainFinset t then (0:ℝ) else farG t ρ) := hsplit\n _ = ∑ ρ ∈ mainFinset t, farG t ρ\n + ((∑' ρ, farGRight t ρ) + ∑' ρ, farGLeft t ρ) := by rw [htail]\n _ ≤ (4.5 * (2 * C0hat (t + 1) + 0.55) * 1.3476)\n + (4.5 * (0.433 * (0.833 * 0.1 + 0.3303) + 0.886 * (0.3475 * 0.1 + 0.1216) + 2.9 * 0.1)\n + 4.5 * (0.433 * (0.1942 * (1/23) + 0.1687) + 0.886 * (0.0736 * (1/23) + 0.0621) + 2.9 * (1/23))) := by\n apply add_le_add hmain (add_le_add hright hleft)\n _ ≤ 12.1284 * C0hat (t + 1) + 7.2425 := by\n -- the numeric fold\n have hC0nn : (0 : ℝ) ≤ C0hat (t + 1) := by\n have h1 := two_le_C0hat (by linarith [ht] : (1 : ℝ) ≤ t + 1)\n linarith\n nlinarith [hC0nn]\n```\nThe final fold: 4.5·(2C₀+0.55)·1.3476 = 12.1284·C₀ + 3.33531; Tail_R = 4.5·(0.433·(0.0833+0.3303)+0.886·(0.03475+0.1216)+0.29) = 4.5·(0.433·0.4136+0.886·0.15635+0.29) = 4.5·(0.179088+0.138526+0.29) = 4.5·0.607614 = 2.734263; Tail_L = 4.5·(0.433·(0.0084435+0.1687)+0.886·(0.0032+0.0621)+0.126087) = 4.5·(0.433·0.1771435+0.886·0.0653+0.126087) = 4.5·(0.0767032+0.0578558+0.126087) = 4.5·0.260646 = 1.172907. Sum: 3.33531+2.734263+1.172907 = 7.24248 ≤ 7.2425 ✓ (margin 2e-5 — TIGHT!). Hmm — let me recompute precisely:\n- 4.5·0.55·1.3476 = 2.475·1.3476 = 3.33531.\n- Tail_R: 0.433·0.4136 = 0.1790888; 0.886·0.15635 = 0.13852610; +0.29 = 0.6076149; ×4.5 = 2.7342671.\n- Tail_L: 0.1942/23 = 0.0084434783; +0.1687 = 0.1771434783; ×0.433 = 0.0767031262; 0.0736/23 = 0.0032; +0.0621 = 0.0653; ×0.886 = 0.0578558; 2.9/23 = 0.1260869565; sum = 0.2606458827; ×4.5 = 1.1729064722.\n- Total: 3.33531 + 2.7342671 + 1.1729065 = 7.2424836 ≤ 7.2425 ✓ margin 1.6e-5.\n\nUgh — that's thin (1.6e-5). nlinarith should verify exactly (rational arithmetic ✓ no approximations). OK.\n\nLet me also double-check 4.5·2·1.3476 = 12.1284 ✓ (9·1.3476 = 12.1284 ✓).\n\nNow — the farG_tail_eq formalization is the fiddly part. Let me also confirm `tsum_split_finset` is the LiCircleBound ℝ version (exists ✓ line 249).\n\nFor the mainFinset's mem in the neg-branch: `mem_mainFinset (by linarith : (0:ℝ) ≤ t)` ✓.\n\nAlso `Nat.floor_add_natCast` — verify it exists: grep.","signature":""},{"type":"text","text":"§18 compiles. Committing, then writing the piece-3 assembly (§19)."},{"type":"tool_use","id":"Bash_251","name":"Bash","input":{"command":"cd D:/Python/Quantum && git add research/lean/NguyenRH1/NguyenRH1/LiTightR.lean && git -c user.name=\"NGUYEN-RH-1\" -c user.email=\"research@local\" commit -m \"$(cat <<'EOF'\nSession 036 (5f-ii piece 3e-ii): the right-tail machine\n\nLiTightR.lean section 18 (~430 lines): farGRight (farG restricted to\ntail buckets k >= floor(t)+1 on the right side), farGRight_term_le\n(via farG_le_farW_mul), farGRight_fiber_finite/count (zeroWindow(t+k)\n+ C0hat(t+k+1) <= C0hat(2k+1)), farGRight_fiber_le, loglog_ge_neg_point37\n+ farGRightBridge_nonneg, farGRightMaj(+combo, nonnegs, le_combo, the\nshifted brick summables), farGRightMaj_series_le\n(4.5[0.433(0.833*0.1+0.3303)+0.886(0.3475*0.1+0.1216)+2.9*0.1]), and\nfarGRight_le (the ENNReal fiberwise assembly). Full file elaborates\nclean, zero warnings.\nEOF\n)\"","description":"Commit piece-3e-ii sub-stage"},"extra_content":null}]