← Session 21 — Tier ii′ planning + launch: close SfBoundProp in Lean (D-064)
thinking (15800 chars)
Excellent — both inventories are in and they're extremely informative. Key findings beyond what I knew:
1. **Residue machinery**: `RectangleIntegral'_eq_sumResiduesIn` with `HasSimplePolesOn` hypothesis — confirmed. But ALSO: the private proof structure (principalPart decomposition, `toMeromorphicNFOn`) exists and could inspire the extension. No higher-order residue formula anywhere. Mathlib has `MeromorphicAt`/`meromorphicOrderAt`/`MeromorphicNFAt`/`toMeromorphicNFOn` + `meromorphicTrailingCoeffAt` (TrailingCoefficient.lean) — the trailing coefficient API! That's the natural handle for a general residue: for a pole of order −m, the residue is a Taylor coefficient of the NF analytic part, and `meromorphicTrailingCoeffAt` might be exactly the leading Laurent coefficient. For the residue we need the coefficient at order −1, not the leading one — but via NF f = (z−p)^n • g, the residue is the (m−1)-th Taylor coefficient of g divided by... For order n = −m (m > 0), residue = coeff of (z−p)^{m−1} in g. There's `iteratedDeriv` Taylor API (`AnalyticAt` gives `HasFPowerSeriesAt`, with `cauchyPowerSeries` / `iteratedDeriv` formulas). So the general residue can be DEFINED as `(iteratedDeriv (m-1) g p) / (m-1)!` — computable. Good.
2. **Zeta23 zero infrastructure is RICH**: `IsNontrivialZero`, `zeroMult`, `zerosIn`, `Ncount` with PROVED local count `zeta_local_zero_count` (∃ A₀, Ncount(t,t+1) ≤ A₀ log(|t|+3)) and full RvM! Plus `zeta_reflect_zero`, `zeta_mult_reflect`, window finiteness, and WeilEF zero-summability (`zero_sum_inv_sq`, `EF_zero_sum_summable`) — the Σ|ρ|⁻² convergence infrastructure ALREADY EXISTS and is proved! That's L7 essentially done (liCoeff summability needs Σ |1−(1−1/ρ)ⁿ| — summand ~ n/|ρ|² for large ρ, and `zero_sum_inv_sq` gives Σ 1/|ρ|² < ∞... need care with the exact form but the hard analytic fact is there).
Wait — is `zero_sum_inv_sq` proved sorry-free in zeta-23-lean? The audit said zeta-23-lean has sorries only in trusted challenge stubs. EF_lit_zeta etc. — need to check axiom status of what we'd reuse. Important for ii′-0: any Zeta23 theorem we import must be sorry-free (or its sorries acceptable). D-061 verified "all comparator PrintAxioms scripts match AUDIT.md" — the main theorems were checked. I'll need a per-dependency axiom check as part of ii′-0's skeleton phase.
3. **Borel–Carathéodory EXISTS in Mathlib** (`Complex.borelCaratheodory`) AND **Jensen's formula exists** (`MeromorphicOn.circleAverage_log_norm`, `AnalyticOnNhd.sum_divisor_le`) AND `StrongPNTPrefix.lean` has `BorelCaratheodoryDeriv`, `LogOfAnalyticFunction`, Blaschke factors, `ZerosBound` — the EXACT toolkit for the local route to the R-bound (L2)! This is the Davenport Ch. 15-style local argument: log ζ bounds via Borel–Carathéodory, zero extraction via Blaschke/Jensen, Cauchy estimate for the derivative. So L2's local route has its machinery vendored too. That avoids Hadamard factorization entirely!
Hmm wait — but the R-bound (D-056) is stated as |ζ′/ζ(s) − Σ_{|γ−t|<1} 1/(s−ρ)| ≤ A log(|t|+2) + B₀. The classical proof via partial fractions (Hadamard) — the local route: for σ near [−5/2, 4], |t| large, write log ζ on a disc around s₀ = 2 + it (radius ~ 9/2 to cover down to −5/2), bound Re log ζ = log|ζ| ≤ O(log t) (from ζ bounds — ZetaUpperBnd exists in ZetaBounds! `‖ζ‖ ≤ C log|t|` for σ ≥ 1−A/log|t|... but our region extends to σ = −5/2, far left of the zero-free strip — need ζ bounds in the CRITICAL STRIP and left: those come from the functional equation! ζ(s) for σ < 0 via FE: |ζ(s)| = |χ(s)|·|ζ(1−s)|, |χ(s)| ~ |t|^{1/2−σ}. So |ζ(−5/2+it)| ~ |t|³·|ζ(3.5−it)| ~ |t|³·bounded. log|ζ| ≤ 3 log t + O(1). Does Zeta23/Mathlib have ζ bounds in the strip/left half? There's `riemannZeta_one_sub` (FE) in Mathlib, and ζ bounds for σ ≥ 1−A/log|t| in ZetaBounds. For the strip: Phragmén–Lindelöf convexity bounds... StrongPNTPrefix has BorelCaratheodoryDeriv; is there a Phragmén–Lindelöf in Mathlib? Not sure. We may need to prove a crude polynomial bound |ζ(σ+it)| ≤ C|t|^A in the strip ourselves: route — Mathlib has `riemannZeta` for σ > 0 via Hurwitz; there might be a bound ‖ζ‖ ≤ C·(|t|^... ) somewhere in ZetaBounds for σ ≥ 1−A/log|t| only. For 0 < σ < 1: use the approximate functional equation? Not available. Alternative: the R-bound's proof via D-056 uses the reference-point trick: compare ζ′/ζ(s) at s vs at s₀ = reference point (on the 2-line?) — the reference point trick AVOIDS needing ζ bounds in the strip! D-056's proof: R(s) = ζ′/ζ(s) − Σ_{|γ−t|<1}1/(s−ρ); bound via comparing R(s) − R(s₀) where s₀ is a reference point with the same imaginary part at Re = 2 (or similar), where ζ′/ζ is bounded by Dirichlet series. The difference R(s) − R(s₀) is controlled by... the partial fraction series telescopes. Honestly I need to READ D-056 now to see the exact argument and what inputs it needs. That's my next step (todo #4).
4. **Mathlib zeta API**: `riemannZeta_residue_one`, `tendsto_riemannZeta_sub_one_div` (constant term γ!), `riemannZeta_neg_two_mul_nat_add_one` (trivial zeros), FE, nonvanishing Re ≥ 1, ZetaZeros discreteness/compact-finiteness. The constant term γ at s=1 exists — first Laurent coefficient! For the w=1 pole we need the full Laurent recursion, but having γ is the base case.
Also `digamma` exists with `digamma_apply_add_one` recurrence and `meromorphic_digamma`. D-056's Lemma D (digamma bound |r| ≤ 1.2/|w|²) would need more digamma API (bounds in half-planes) — to check later; or the local R-bound route avoids digamma entirely.
5. **liCoeff**: sums over the subtype `{ρ // IsNontrivialZero ρ}` weighted by zeroMult; NO summability lemma proved yet — but WeilEF.ZeroSummability has `zero_sum_inv_sq` and `EF_zero_sum_summable` — need to check their exact statements and whether they cover our summand (fun ρ ↦ zeroMult ρ * (1 − (1−1/ρ)^n)). For large ρ: 1−(1−1/ρ)ⁿ = −Σ_{j≥1} C(n,j)(−1/ρ)^j... |1−(1−1/ρ)ⁿ| ≤ C_n/|ρ| for |ρ| ≥ 2n-ish — first order n/|ρ| is NOT summable (Σ 1/|ρ| diverges)! Need pairing ρ ↔ 1−ρ̄ or the exact identity. Hmm: |1−(1−1/ρ)ⁿ| — is it O(1/|ρ|) or O(1/|ρ|²)? (1−1/ρ)ⁿ = exp(n log(1−1/ρ)) = exp(n(−1/ρ − 1/2ρ² − ...)) ≈ 1 − n/ρ + O(n²/|ρ|²). So the summand ≈ n/ρ — NOT absolutely summable over zeros (Σ_{ρ} 1/|ρ| = ∞). BUT the zeros come in symmetric pairs: ρ and ρ̄ (conjugate): 1/ρ + 1/ρ̄ = 2Re(1/ρ) = 2σ/|ρ|² — paired terms ARE O(1/|ρ|²). So the tsum over the subtype is only conditionally summable — tsum in Lean requires ABSOLUTE summability (Summable f ⟺ Σ‖f‖ < ∞ for tsum to be well-behaved). PROBLEM: liCoeff as DEFINED might not be summable in Lean's sense! Wait — how is liCoeff's summability handled? The honesty note says "tsum of a non-summable family is 0 in Lean; no liCoeff-specific summability lemma is proved". If the family is not absolutely summable, `tsum` gives a JUNK value (0), and `liCoeff` would be wrong/undefined-valued! Hmm — but wait: is Σ over the subtype absolutely summable after all? |1−(1−1/ρ)ⁿ| for zeros: if RH-to-T₀ covers |γ| ≤ T₀ and beyond T₀ zeros can be anywhere in the strip... |1−1/ρ| ≤ 1 + 1/|ρ| ≤ 2. So |1−(1−1/ρ)ⁿ| ≤ 1 + |1−1/ρ|ⁿ ≤ 1 + (1+1/|ρ|)ⁿ ≤ 1 + e^{n/|ρ|} ≤ 1 + e — BOUNDED. But bounded isn't summable over infinitely many zeros. The summand does NOT go to 0?? For large γ: (1−1/ρ)ⁿ → 1 as |ρ| → ∞ (for FIXED n), so 1−(1−1/ρ)ⁿ ≈ n/ρ → 0. |summand| ~ n/|ρ| — and Σ_zeros 1/|ρ| diverges (loglog growth). So indeed NOT absolutely summable. So liCoeff's tsum is conditionally convergent at best → in Lean, `tsum` of non-Summable = 0 → liCoeff n = 0?!? Then Sf n := SInfty n + 1 − (liCoeff n).re would be junk...
Hold on. Let me reconsider. Maybe with the zeroMult weight and the pairing... no, absolute summability is about ‖summand‖ and that's ~n/|ρ|. Σ 1/|ρ| over zeros ~ ∫ log t /t dt diverges. So liCoeff as defined via tsum over the subtype IS problematic unless the intended reading uses symmetric pairing baked into the enumeration... tsum over a subtype of ℂ is unordered — absolute summability is required for tsum to behave. UNLESS the actual mathematical truth is: the family IS absolutely summable because... let me recompute: for ρ with σ ∈ (0,1), |γ| large: 1/ρ ≈ 1/(iγ) ≈ −i/γ + σ/γ². (1−1/ρ)ⁿ: log(1−1/ρ) = −1/ρ − 1/(2ρ²) − ... ≈ i/γ − σ/γ² + 1/(2γ²) + O(γ⁻³) = i/γ + (1/2−σ)/γ² + O(γ⁻³). n·log(1−1/ρ) ≈ in/γ + n(1/2−σ)/γ². exp: ≈ e^{in/γ}(1 + n(1/2−σ)/γ²). So 1−(1−1/ρ)ⁿ ≈ 1 − e^{in/γ} − e^{in/γ}n(1/2−σ)/γ². Now |1 − e^{in/γ}| ≈ n/γ for γ ≫ n. So |summand| ≈ n/|γ| — yes, not absolutely summable. CONFIRMED PROBLEM (this is exactly L7 "liCoeff summability (the tsum honesty note)" from D-062 — it's not just honesty, it's DEFINITIONAL correctness: if not Summable, tsum = 0 and SfBoundProp is FALSE as stated! Because Sf n = SInfty n + 1 − 0 = SInfty n + 1 ~ ½n log n, and Bn ~ 4T·... ~ √n log n² — |Sf| ≤ Bn would FAIL for large n (½n log n vs √n log²n). So SfBoundProp with junk liCoeff=0 is FALSE!).
WAIT. That can't be right — session 012/013 proved things with liCoeff and the audit passed. The theorem lambda_pos_finite_height_verified is CONDITIONAL on hSf : SfBoundProp — a hypothesis. If SfBoundProp is FALSE (due to junk tsum), the theorem is vacuous/harmless but the paper's claim would be broken at the definitional level. Also hfinite : LiVerifiedUpTo (5×10⁵) — that presumably states liCoeff n > 0 for n ≤ 5×10⁵, which would be FALSE if liCoeff = 0... Let me check how liCoeff and LiVerifiedUpTo are actually defined — maybe liCoeff uses a PAIRED enumeration (e.g., sum over zeros in upper half-plane of paired summands) making it absolutely summable. The agent reported `liCoeff (n : ℕ) : ℂ := tsum fun ρ : {ρ // IsNontrivialZero ρ} => (zeroMult ρ : ℂ) * (1 - (1 - 1/(ρ:ℂ))^n)`. Hmm — but is the family actually non-summable? Let me recheck the asymptotics once more. Actually wait: maybe I should check |1−(1−1/ρ)ⁿ| more carefully for the ON-LINE zeros (the bulk, all of them up to T₀, and conjecturally all): ρ = 1/2+iγ: 1−1/ρ = (ρ−1)/ρ = (−1/2+iγ)/(1/2+iγ), modulus 1, argument θ_γ = π − 2arctan(2γ)... ≈ π − 2(π/2 − 1/(2γ)·2)... arctan(2γ) ≈ π/2 − 1/(2γ). θ ≈ π − 2(π/2 − 1/(2γ)) = 1/γ. So (1−1/ρ)ⁿ ≈ e^{in/γ}, and 1−(1−1/ρ)ⁿ ≈ 1−e^{in/γ} ≈ −in/γ for γ ≫ n. |·| ≈ n/γ. Σ over zeros n/γ ~ n·Σ1/γ = ∞. Yes, not absolutely summable. (Conditionally: paired with the conjugate zero ρ̄ = 1/2−iγ: summand ≈ 1−e^{−in/γ}; sum of pair ≈ 2(1−cos(n/γ)) ≈ n²/γ² — absolutely summable! λ_n = Σ_pairs 2(1−cos(nθ_γ)) ≥ 0 — the familiar positivity.)
So mathematically λ_n is the PAIRED sum (absolutely convergent), and the Lean def via unordered tsum is only correct if Summable — which it isn't. UNLESS Lean's tsum over the subtype still equals the right value via some miracle — no, tsum of non-summable is DEFINED as 0 in Lean (junk).
Hmm wait, actually — is that true? `tsum f = 0` if `¬ Summable f`. Yes, in Mathlib `tsum` is defined as 0 for non-summable families.
So this is a REAL DEFECT discovered by the inventory: **liCoeff as defined is (almost certainly) not Summable, making liCoeff n = 0 junk for all n, and SfBoundProp false (SInfty+1 vs Bn).**
Hold on, wait. Let me double-check Summable in the OTHER direction. Is Σ ‖(zeroMult)‖·|1−(1−1/ρ)ⁿ| really divergent? Need Σ_zeros 1/|γ| diverges — yes, N(T) ~ T log T implies Σ_{|γ|≤T} 1/|γ| ~ ∫₁^T dN(t)/t ~ ∫ log t dt/t ~ (log T)²/4π → ∞. Yes divergent.
But WAIT — maybe not all summands with γ ≫ n are ~n/γ. The bound needs |1−e^{iθ}| with θ = n·arg(1−1/ρ)... the exact argument: θ_γ = arg((ρ−1)/ρ). For ρ = σ+iγ: (ρ−1)/ρ = 1 − 1/ρ; 1/ρ = (σ−iγ)/(σ²+γ²) ≈ −i/γ + σ/γ². So 1−1/ρ ≈ 1 + i/γ − σ/γ²; arg ≈ 1/γ (for γ > 0 large). n·θ ≈ n/γ, |1−e^{in/γ}| ≈ n/γ when n/γ small. Yes. Divergent. Confirmed.
So the CORRECT definition of liCoeff must either:
(a) sum over pairs (e.g., over zeros with Im > 0 of the paired summand f(ρ) + f(ρ̄), absolutely summable since pair = O(n²/|ρ|²)·mult), or
(b) sum over an ordered enumeration (tsum over ℕ with a specific symmetric enumeration — tsum is order-independent, so same issue: needs absolute summability... tsum over ℕ also requires Summable (absolute). So (b) fails too unless paired), or
(c) keep the subtype but group: `∑' ρ : {ρ // IsNontrivialZero ρ ∧ 0 < ρ.im}, (f ρ + f (conj ρ))`-ish with mult — absolutely summable ✓.
Hmm — but actually WAIT. Is it possible the family IS summable because of cancellation in modulus? No — Summable is exactly Σ‖f‖ < ∞. Diverges. OK.
So how did session 012 not notice? Because liCoeff is only used INSIDE hypotheses (SfBoundProp, LiVerifiedUpTo) and in the DEFINITION of Sf — never evaluated. The perimeter hypothesis LiVerifiedUpTo (5×10⁵) says "liCoeff n > 0 for n ≤ 5×10⁵" — if liCoeff = 0 junk, that hypothesis is simply FALSE → the theorem lambda_pos_finite_height_verified, while LOGICALLY VALID (from false premises anything follows... no wait — the theorem is stated WITH hypotheses: hRH, hfinite, hSf → conclusion. If hfinite is unprovable/false, the theorem is just not applicable — it doesn't make the Lean development inconsistent, but it makes the theorem VACUOUS and the paper's claim broken: "λ_n > 0 for n ≤ 5×10⁵" is TRUE in reality but its Lean encoding via a junk liCoeff would be false).
Hmm wait — actually let me look at what LiVerifiedUpTo says exactly. Need to read it. Also RHUpTo. Let me not speculate — read LiSkeleton.lean's relevant sections.
THIS is a significant finding for ii′-0: fixing the liCoeff definition (paired/absolute-summability-correct) is a PREREQUISITE for SfBoundProp to even be true in Lean. And it touches the "frozen" LiSkeleton — hmm. But note: fixing the def would change what lambda_pos_finite_height_verified says at the encoding level. The frozen-file rule was to protect Paper A; but if there's a latent definitional defect, fixing it is exactly tier-ii′ work (L7!), and the paper claim stays the same (the mathematical content intended is the paired sum). The fix: redefine liCoeff as the paired tsum (absolutely summable, provable from zero_sum_inv_sq + pairing), prove the old junk def... no, replace the def. Since lambda_pos_finite_height_verified is stated from hypotheses about liCoeff, changing the def changes those hypotheses' meaning — the theorem proof still goes through (it only uses the hypotheses abstractly, presumably). And SfBoundProp becomes TRUE (provable). And LiVerifiedUpTo becomes the true statement about real λ_n. The change is semantically invisible at the paper level (paper means the real λ_n) but CRITICAL for honesty of the encoding.
Hmm, hold on, let me not jump the gun. Maybe the def is fine because... actually one more possibility: maybe IsNontrivialZero + zeroMult with the tsum over the SUBTYPE — the subtype could be empty if IsNontrivialZero is unproven... no, it's a real definition; zeros exist (provably, e.g., known first zero — actually proving existence of a nontrivial zero in Lean is itself nontrivial! Is there a proved existence? If the zero set were EMPTY, liCoeff = 0 trivially and hfinite "∀ n ≤ 5×10⁵, 0 < liCoeff n" would be false. But zeros DO exist mathematically; can Lean prove it? Via the WeilEF work or via ζ(1/2+14.134i) ≈ 0 numerics with interval arithmetic — probably NOT proved in zeta-23-lean! If not proved, then in the current development the subtype MIGHT be empty for all Lean knows — hfinite would be unprovable either way (it's a hypothesis, so fine), but for SfBoundProp's PROOF we need the actual zero set with all its structure.)
OK — so ii′-0 has found its first major design issue: the liCoeff encoding. This is exactly what the design sub-stage is for. Let me now read the actual LiSkeleton definitions (liCoeff, Sf, RHUpTo, LiVerifiedUpTo) and D-036/D-056 to nail everything down.
Let me read LiSkeleton.lean around lines 1-100 (defs) and the hypothesis defs (RHUpTo, LiVerifiedUpTo), then D-036 and D-056.
Both inventories are in, with two significant findings — one excellent, one that needs immediate verification. Updating todos and reading the core sources now.
tool: TodoWrite ok
input
{
"todos": [
{
"content": "Verify paper/Lean baseline is clean and frozen",
"status": "completed",
"activeForm": "Verifying paper/Lean baseline"
},
{
"content": "Inventory vendored residue/meromorphic API (agent)",
"status": "completed",
"activeForm": "Inventorying residue/meromorphic API"
},
{
"content": "Inventory Zeta23 zero-counting + Mathlib zeta API + liCoeff (agent)",
"status": "completed",
"activeForm": "Inventorying Zeta23/Mathlib zeta API"
},
{
"content": "Read liCoeff/Sf/perimeter defs + check summability encoding",
"status": "in_progress",
"activeForm": "Reading liCoeff/Sf/perimeter defs"
},
{
"content": "Read D-036 contour computation + D-056 R-bound proof",
"status": "pending",
"activeForm": "Reading D-036/D-056"
},
{
"content": "Write D-064 design doc (routes + lemma graph)",
"status": "pending",
"activeForm": "Writing D-064 design doc"
},
{
"content": "Create LiContour.lean sorry skeleton, compiles",
"status": "pending",
"activeForm": "Creating LiContour.lean skeleton"
},
{
"content": "Session-014 closure (journal, STATE, commit)",
"status": "pending",
"activeForm": "Closing session 014"
}
]
}
result 2026-08-21 17:59:39Z → 2026-08-21 17:59:39Z
{
"oldTodos": [
"content='Verify paper/Lean baseline is clean and frozen' status='in_progress' active_form='Verifying paper/Lean baseline'",
"content='Inventory vendored residue/meromorphic API (agent)' status='pending' active_form='Inventorying residue/meromorphic API'",
"content='Inventory Zeta23 zero-counting + Mathlib zeta API + liCoeff (agent)' status='pending' active_form='Inventorying Zeta23/Mathlib zeta API'",
"content='Read D-036, D-056, LiSkeleton tier-(ii) defs' status='pending' active_form='Reading D-036/D-056/LiSkeleton'",
"content='Write D-064 design doc (routes + lemma graph)' status='pending' active_form='Writing D-064 design doc'",
"content='Create LiContour.lean sorry skeleton, compiles' status='pending' active_form='Creating LiContour.lean skeleton'",
"content='Session-014 closure (journal, STATE, commit)' status='pending' active_form='Closing session 014'"
],
"newTodos": [
"content='Verify paper/Lean baseline is clean and frozen' status='completed' active_form='Verifying paper/Lean baseline'",
"content='Inventory vendored residue/meromorphic API (agent)' status='completed' active_form='Inventorying residue/meromorphic API'",
"content='Inventory Zeta23 zero-counting + Mathlib zeta API + liCoeff (agent)' status='completed' active_form='Inventorying Zeta23/Mathlib zeta API'",
"content='Read liCoeff/Sf/perimeter defs + check summability encoding' status='in_progress' active_form='Reading liCoeff/Sf/perimeter defs'",
"content='Read D-036 contour computation + D-056 R-bound proof' status='pending' active_form='Reading D-036/D-056'",
"content='Write D-064 design doc (routes + lemma graph)' status='pending' active_form='Writing D-064 design doc'",
"content='Create LiContour.lean sorry skeleton, compiles' status='pending' active_form='Creating LiContour.lean skeleton'",
"content='Session-014 closure (journal, STATE, commit)' status='pending' active_form='Closing session 014'"
],
"cleared": false
}
raw content_json (database row)
[{"type":"thinking","thinking":"Excellent — both inventories are in and they're extremely informative. Key findings beyond what I knew:\n\n1. **Residue machinery**: `RectangleIntegral'_eq_sumResiduesIn` with `HasSimplePolesOn` hypothesis — confirmed. But ALSO: the private proof structure (principalPart decomposition, `toMeromorphicNFOn`) exists and could inspire the extension. No higher-order residue formula anywhere. Mathlib has `MeromorphicAt`/`meromorphicOrderAt`/`MeromorphicNFAt`/`toMeromorphicNFOn` + `meromorphicTrailingCoeffAt` (TrailingCoefficient.lean) — the trailing coefficient API! That's the natural handle for a general residue: for a pole of order −m, the residue is a Taylor coefficient of the NF analytic part, and `meromorphicTrailingCoeffAt` might be exactly the leading Laurent coefficient. For the residue we need the coefficient at order −1, not the leading one — but via NF f = (z−p)^n • g, the residue is the (m−1)-th Taylor coefficient of g divided by... For order n = −m (m > 0), residue = coeff of (z−p)^{m−1} in g. There's `iteratedDeriv` Taylor API (`AnalyticAt` gives `HasFPowerSeriesAt`, with `cauchyPowerSeries` / `iteratedDeriv` formulas). So the general residue can be DEFINED as `(iteratedDeriv (m-1) g p) / (m-1)!` — computable. Good.\n\n2. **Zeta23 zero infrastructure is RICH**: `IsNontrivialZero`, `zeroMult`, `zerosIn`, `Ncount` with PROVED local count `zeta_local_zero_count` (∃ A₀, Ncount(t,t+1) ≤ A₀ log(|t|+3)) and full RvM! Plus `zeta_reflect_zero`, `zeta_mult_reflect`, window finiteness, and WeilEF zero-summability (`zero_sum_inv_sq`, `EF_zero_sum_summable`) — the Σ|ρ|⁻² convergence infrastructure ALREADY EXISTS and is proved! That's L7 essentially done (liCoeff summability needs Σ |1−(1−1/ρ)ⁿ| — summand ~ n/|ρ|² for large ρ, and `zero_sum_inv_sq` gives Σ 1/|ρ|² < ∞... need care with the exact form but the hard analytic fact is there).\n\nWait — is `zero_sum_inv_sq` proved sorry-free in zeta-23-lean? The audit said zeta-23-lean has sorries only in trusted challenge stubs. EF_lit_zeta etc. — need to check axiom status of what we'd reuse. Important for ii′-0: any Zeta23 theorem we import must be sorry-free (or its sorries acceptable). D-061 verified \"all comparator PrintAxioms scripts match AUDIT.md\" — the main theorems were checked. I'll need a per-dependency axiom check as part of ii′-0's skeleton phase.\n\n3. **Borel–Carathéodory EXISTS in Mathlib** (`Complex.borelCaratheodory`) AND **Jensen's formula exists** (`MeromorphicOn.circleAverage_log_norm`, `AnalyticOnNhd.sum_divisor_le`) AND `StrongPNTPrefix.lean` has `BorelCaratheodoryDeriv`, `LogOfAnalyticFunction`, Blaschke factors, `ZerosBound` — the EXACT toolkit for the local route to the R-bound (L2)! This is the Davenport Ch. 15-style local argument: log ζ bounds via Borel–Carathéodory, zero extraction via Blaschke/Jensen, Cauchy estimate for the derivative. So L2's local route has its machinery vendored too. That avoids Hadamard factorization entirely!\n\nHmm wait — but the R-bound (D-056) is stated as |ζ′/ζ(s) − Σ_{|γ−t|<1} 1/(s−ρ)| ≤ A log(|t|+2) + B₀. The classical proof via partial fractions (Hadamard) — the local route: for σ near [−5/2, 4], |t| large, write log ζ on a disc around s₀ = 2 + it (radius ~ 9/2 to cover down to −5/2), bound Re log ζ = log|ζ| ≤ O(log t) (from ζ bounds — ZetaUpperBnd exists in ZetaBounds! `‖ζ‖ ≤ C log|t|` for σ ≥ 1−A/log|t|... but our region extends to σ = −5/2, far left of the zero-free strip — need ζ bounds in the CRITICAL STRIP and left: those come from the functional equation! ζ(s) for σ < 0 via FE: |ζ(s)| = |χ(s)|·|ζ(1−s)|, |χ(s)| ~ |t|^{1/2−σ}. So |ζ(−5/2+it)| ~ |t|³·|ζ(3.5−it)| ~ |t|³·bounded. log|ζ| ≤ 3 log t + O(1). Does Zeta23/Mathlib have ζ bounds in the strip/left half? There's `riemannZeta_one_sub` (FE) in Mathlib, and ζ bounds for σ ≥ 1−A/log|t| in ZetaBounds. For the strip: Phragmén–Lindelöf convexity bounds... StrongPNTPrefix has BorelCaratheodoryDeriv; is there a Phragmén–Lindelöf in Mathlib? Not sure. We may need to prove a crude polynomial bound |ζ(σ+it)| ≤ C|t|^A in the strip ourselves: route — Mathlib has `riemannZeta` for σ > 0 via Hurwitz; there might be a bound ‖ζ‖ ≤ C·(|t|^... ) somewhere in ZetaBounds for σ ≥ 1−A/log|t| only. For 0 < σ < 1: use the approximate functional equation? Not available. Alternative: the R-bound's proof via D-056 uses the reference-point trick: compare ζ′/ζ(s) at s vs at s₀ = reference point (on the 2-line?) — the reference point trick AVOIDS needing ζ bounds in the strip! D-056's proof: R(s) = ζ′/ζ(s) − Σ_{|γ−t|<1}1/(s−ρ); bound via comparing R(s) − R(s₀) where s₀ is a reference point with the same imaginary part at Re = 2 (or similar), where ζ′/ζ is bounded by Dirichlet series. The difference R(s) − R(s₀) is controlled by... the partial fraction series telescopes. Honestly I need to READ D-056 now to see the exact argument and what inputs it needs. That's my next step (todo #4).\n\n4. **Mathlib zeta API**: `riemannZeta_residue_one`, `tendsto_riemannZeta_sub_one_div` (constant term γ!), `riemannZeta_neg_two_mul_nat_add_one` (trivial zeros), FE, nonvanishing Re ≥ 1, ZetaZeros discreteness/compact-finiteness. The constant term γ at s=1 exists — first Laurent coefficient! For the w=1 pole we need the full Laurent recursion, but having γ is the base case.\n\nAlso `digamma` exists with `digamma_apply_add_one` recurrence and `meromorphic_digamma`. D-056's Lemma D (digamma bound |r| ≤ 1.2/|w|²) would need more digamma API (bounds in half-planes) — to check later; or the local R-bound route avoids digamma entirely.\n\n5. **liCoeff**: sums over the subtype `{ρ // IsNontrivialZero ρ}` weighted by zeroMult; NO summability lemma proved yet — but WeilEF.ZeroSummability has `zero_sum_inv_sq` and `EF_zero_sum_summable` — need to check their exact statements and whether they cover our summand (fun ρ ↦ zeroMult ρ * (1 − (1−1/ρ)^n)). For large ρ: 1−(1−1/ρ)ⁿ = −Σ_{j≥1} C(n,j)(−1/ρ)^j... |1−(1−1/ρ)ⁿ| ≤ C_n/|ρ| for |ρ| ≥ 2n-ish — first order n/|ρ| is NOT summable (Σ 1/|ρ| diverges)! Need pairing ρ ↔ 1−ρ̄ or the exact identity. Hmm: |1−(1−1/ρ)ⁿ| — is it O(1/|ρ|) or O(1/|ρ|²)? (1−1/ρ)ⁿ = exp(n log(1−1/ρ)) = exp(n(−1/ρ − 1/2ρ² − ...)) ≈ 1 − n/ρ + O(n²/|ρ|²). So the summand ≈ n/ρ — NOT absolutely summable over zeros (Σ_{ρ} 1/|ρ| = ∞). BUT the zeros come in symmetric pairs: ρ and ρ̄ (conjugate): 1/ρ + 1/ρ̄ = 2Re(1/ρ) = 2σ/|ρ|² — paired terms ARE O(1/|ρ|²). So the tsum over the subtype is only conditionally summable — tsum in Lean requires ABSOLUTE summability (Summable f ⟺ Σ‖f‖ < ∞ for tsum to be well-behaved). PROBLEM: liCoeff as DEFINED might not be summable in Lean's sense! Wait — how is liCoeff's summability handled? The honesty note says \"tsum of a non-summable family is 0 in Lean; no liCoeff-specific summability lemma is proved\". If the family is not absolutely summable, `tsum` gives a JUNK value (0), and `liCoeff` would be wrong/undefined-valued! Hmm — but wait: is Σ over the subtype absolutely summable after all? |1−(1−1/ρ)ⁿ| for zeros: if RH-to-T₀ covers |γ| ≤ T₀ and beyond T₀ zeros can be anywhere in the strip... |1−1/ρ| ≤ 1 + 1/|ρ| ≤ 2. So |1−(1−1/ρ)ⁿ| ≤ 1 + |1−1/ρ|ⁿ ≤ 1 + (1+1/|ρ|)ⁿ ≤ 1 + e^{n/|ρ|} ≤ 1 + e — BOUNDED. But bounded isn't summable over infinitely many zeros. The summand does NOT go to 0?? For large γ: (1−1/ρ)ⁿ → 1 as |ρ| → ∞ (for FIXED n), so 1−(1−1/ρ)ⁿ ≈ n/ρ → 0. |summand| ~ n/|ρ| — and Σ_zeros 1/|ρ| diverges (loglog growth). So indeed NOT absolutely summable. So liCoeff's tsum is conditionally convergent at best → in Lean, `tsum` of non-Summable = 0 → liCoeff n = 0?!? Then Sf n := SInfty n + 1 − (liCoeff n).re would be junk... \n\nHold on. Let me reconsider. Maybe with the zeroMult weight and the pairing... no, absolute summability is about ‖summand‖ and that's ~n/|ρ|. Σ 1/|ρ| over zeros ~ ∫ log t /t dt diverges. So liCoeff as defined via tsum over the subtype IS problematic unless the intended reading uses symmetric pairing baked into the enumeration... tsum over a subtype of ℂ is unordered — absolute summability is required for tsum to behave. UNLESS the actual mathematical truth is: the family IS absolutely summable because... let me recompute: for ρ with σ ∈ (0,1), |γ| large: 1/ρ ≈ 1/(iγ) ≈ −i/γ + σ/γ². (1−1/ρ)ⁿ: log(1−1/ρ) = −1/ρ − 1/(2ρ²) − ... ≈ i/γ − σ/γ² + 1/(2γ²) + O(γ⁻³) = i/γ + (1/2−σ)/γ² + O(γ⁻³). n·log(1−1/ρ) ≈ in/γ + n(1/2−σ)/γ². exp: ≈ e^{in/γ}(1 + n(1/2−σ)/γ²). So 1−(1−1/ρ)ⁿ ≈ 1 − e^{in/γ} − e^{in/γ}n(1/2−σ)/γ². Now |1 − e^{in/γ}| ≈ n/γ for γ ≫ n. So |summand| ≈ n/|γ| — yes, not absolutely summable. CONFIRMED PROBLEM (this is exactly L7 \"liCoeff summability (the tsum honesty note)\" from D-062 — it's not just honesty, it's DEFINITIONAL correctness: if not Summable, tsum = 0 and SfBoundProp is FALSE as stated! Because Sf n = SInfty n + 1 − 0 = SInfty n + 1 ~ ½n log n, and Bn ~ 4T·... ~ √n log n² — |Sf| ≤ Bn would FAIL for large n (½n log n vs √n log²n). So SfBoundProp with junk liCoeff=0 is FALSE!).\n\nWAIT. That can't be right — session 012/013 proved things with liCoeff and the audit passed. The theorem lambda_pos_finite_height_verified is CONDITIONAL on hSf : SfBoundProp — a hypothesis. If SfBoundProp is FALSE (due to junk tsum), the theorem is vacuous/harmless but the paper's claim would be broken at the definitional level. Also hfinite : LiVerifiedUpTo (5×10⁵) — that presumably states liCoeff n > 0 for n ≤ 5×10⁵, which would be FALSE if liCoeff = 0... Let me check how liCoeff and LiVerifiedUpTo are actually defined — maybe liCoeff uses a PAIRED enumeration (e.g., sum over zeros in upper half-plane of paired summands) making it absolutely summable. The agent reported `liCoeff (n : ℕ) : ℂ := tsum fun ρ : {ρ // IsNontrivialZero ρ} => (zeroMult ρ : ℂ) * (1 - (1 - 1/(ρ:ℂ))^n)`. Hmm — but is the family actually non-summable? Let me recheck the asymptotics once more. Actually wait: maybe I should check |1−(1−1/ρ)ⁿ| more carefully for the ON-LINE zeros (the bulk, all of them up to T₀, and conjecturally all): ρ = 1/2+iγ: 1−1/ρ = (ρ−1)/ρ = (−1/2+iγ)/(1/2+iγ), modulus 1, argument θ_γ = π − 2arctan(2γ)... ≈ π − 2(π/2 − 1/(2γ)·2)... arctan(2γ) ≈ π/2 − 1/(2γ). θ ≈ π − 2(π/2 − 1/(2γ)) = 1/γ. So (1−1/ρ)ⁿ ≈ e^{in/γ}, and 1−(1−1/ρ)ⁿ ≈ 1−e^{in/γ} ≈ −in/γ for γ ≫ n. |·| ≈ n/γ. Σ over zeros n/γ ~ n·Σ1/γ = ∞. Yes, not absolutely summable. (Conditionally: paired with the conjugate zero ρ̄ = 1/2−iγ: summand ≈ 1−e^{−in/γ}; sum of pair ≈ 2(1−cos(n/γ)) ≈ n²/γ² — absolutely summable! λ_n = Σ_pairs 2(1−cos(nθ_γ)) ≥ 0 — the familiar positivity.)\n\nSo mathematically λ_n is the PAIRED sum (absolutely convergent), and the Lean def via unordered tsum is only correct if Summable — which it isn't. UNLESS Lean's tsum over the subtype still equals the right value via some miracle — no, tsum of non-summable is DEFINED as 0 in Lean (junk).\n\nHmm wait, actually — is that true? `tsum f = 0` if `¬ Summable f`. Yes, in Mathlib `tsum` is defined as 0 for non-summable families.\n\nSo this is a REAL DEFECT discovered by the inventory: **liCoeff as defined is (almost certainly) not Summable, making liCoeff n = 0 junk for all n, and SfBoundProp false (SInfty+1 vs Bn).** \n\nHold on, wait. Let me double-check Summable in the OTHER direction. Is Σ ‖(zeroMult)‖·|1−(1−1/ρ)ⁿ| really divergent? Need Σ_zeros 1/|γ| diverges — yes, N(T) ~ T log T implies Σ_{|γ|≤T} 1/|γ| ~ ∫₁^T dN(t)/t ~ ∫ log t dt/t ~ (log T)²/4π → ∞. Yes divergent.\n\nBut WAIT — maybe not all summands with γ ≫ n are ~n/γ. The bound needs |1−e^{iθ}| with θ = n·arg(1−1/ρ)... the exact argument: θ_γ = arg((ρ−1)/ρ). For ρ = σ+iγ: (ρ−1)/ρ = 1 − 1/ρ; 1/ρ = (σ−iγ)/(σ²+γ²) ≈ −i/γ + σ/γ². So 1−1/ρ ≈ 1 + i/γ − σ/γ²; arg ≈ 1/γ (for γ > 0 large). n·θ ≈ n/γ, |1−e^{in/γ}| ≈ n/γ when n/γ small. Yes. Divergent. Confirmed.\n\nSo the CORRECT definition of liCoeff must either:\n(a) sum over pairs (e.g., over zeros with Im > 0 of the paired summand f(ρ) + f(ρ̄), absolutely summable since pair = O(n²/|ρ|²)·mult), or\n(b) sum over an ordered enumeration (tsum over ℕ with a specific symmetric enumeration — tsum is order-independent, so same issue: needs absolute summability... tsum over ℕ also requires Summable (absolute). So (b) fails too unless paired), or\n(c) keep the subtype but group: `∑' ρ : {ρ // IsNontrivialZero ρ ∧ 0 < ρ.im}, (f ρ + f (conj ρ))`-ish with mult — absolutely summable ✓.\n\nHmm — but actually WAIT. Is it possible the family IS summable because of cancellation in modulus? No — Summable is exactly Σ‖f‖ < ∞. Diverges. OK.\n\nSo how did session 012 not notice? Because liCoeff is only used INSIDE hypotheses (SfBoundProp, LiVerifiedUpTo) and in the DEFINITION of Sf — never evaluated. The perimeter hypothesis LiVerifiedUpTo (5×10⁵) says \"liCoeff n > 0 for n ≤ 5×10⁵\" — if liCoeff = 0 junk, that hypothesis is simply FALSE → the theorem lambda_pos_finite_height_verified, while LOGICALLY VALID (from false premises anything follows... no wait — the theorem is stated WITH hypotheses: hRH, hfinite, hSf → conclusion. If hfinite is unprovable/false, the theorem is just not applicable — it doesn't make the Lean development inconsistent, but it makes the theorem VACUOUS and the paper's claim broken: \"λ_n > 0 for n ≤ 5×10⁵\" is TRUE in reality but its Lean encoding via a junk liCoeff would be false).\n\nHmm wait — actually let me look at what LiVerifiedUpTo says exactly. Need to read it. Also RHUpTo. Let me not speculate — read LiSkeleton.lean's relevant sections.\n\nTHIS is a significant finding for ii′-0: fixing the liCoeff definition (paired/absolute-summability-correct) is a PREREQUISITE for SfBoundProp to even be true in Lean. And it touches the \"frozen\" LiSkeleton — hmm. But note: fixing the def would change what lambda_pos_finite_height_verified says at the encoding level. The frozen-file rule was to protect Paper A; but if there's a latent definitional defect, fixing it is exactly tier-ii′ work (L7!), and the paper claim stays the same (the mathematical content intended is the paired sum). The fix: redefine liCoeff as the paired tsum (absolutely summable, provable from zero_sum_inv_sq + pairing), prove the old junk def... no, replace the def. Since lambda_pos_finite_height_verified is stated from hypotheses about liCoeff, changing the def changes those hypotheses' meaning — the theorem proof still goes through (it only uses the hypotheses abstractly, presumably). And SfBoundProp becomes TRUE (provable). And LiVerifiedUpTo becomes the true statement about real λ_n. The change is semantically invisible at the paper level (paper means the real λ_n) but CRITICAL for honesty of the encoding.\n\nHmm, hold on, let me not jump the gun. Maybe the def is fine because... actually one more possibility: maybe IsNontrivialZero + zeroMult with the tsum over the SUBTYPE — the subtype could be empty if IsNontrivialZero is unproven... no, it's a real definition; zeros exist (provably, e.g., known first zero — actually proving existence of a nontrivial zero in Lean is itself nontrivial! Is there a proved existence? If the zero set were EMPTY, liCoeff = 0 trivially and hfinite \"∀ n ≤ 5×10⁵, 0 < liCoeff n\" would be false. But zeros DO exist mathematically; can Lean prove it? Via the WeilEF work or via ζ(1/2+14.134i) ≈ 0 numerics with interval arithmetic — probably NOT proved in zeta-23-lean! If not proved, then in the current development the subtype MIGHT be empty for all Lean knows — hfinite would be unprovable either way (it's a hypothesis, so fine), but for SfBoundProp's PROOF we need the actual zero set with all its structure.)\n\nOK — so ii′-0 has found its first major design issue: the liCoeff encoding. This is exactly what the design sub-stage is for. Let me now read the actual LiSkeleton definitions (liCoeff, Sf, RHUpTo, LiVerifiedUpTo) and D-036/D-056 to nail everything down.\n\nLet me read LiSkeleton.lean around lines 1-100 (defs) and the hypothesis defs (RHUpTo, LiVerifiedUpTo), then D-036 and D-056.","signature":""},{"type":"text","text":"Both inventories are in, with two significant findings — one excellent, one that needs immediate verification. Updating todos and reading the core sources now."},{"type":"tool_use","id":"TodoWrite_27","name":"TodoWrite","input":{"todos":[{"content":"Verify paper/Lean baseline is clean and frozen","status":"completed","activeForm":"Verifying paper/Lean baseline"},{"content":"Inventory vendored residue/meromorphic API (agent)","status":"completed","activeForm":"Inventorying residue/meromorphic API"},{"content":"Inventory Zeta23 zero-counting + Mathlib zeta API + liCoeff (agent)","status":"completed","activeForm":"Inventorying Zeta23/Mathlib zeta API"},{"content":"Read liCoeff/Sf/perimeter defs + check summability encoding","status":"in_progress","activeForm":"Reading liCoeff/Sf/perimeter defs"},{"content":"Read D-036 contour computation + D-056 R-bound proof","status":"pending","activeForm":"Reading D-036/D-056"},{"content":"Write D-064 design doc (routes + lemma graph)","status":"pending","activeForm":"Writing D-064 design doc"},{"content":"Create LiContour.lean sorry skeleton, compiles","status":"pending","activeForm":"Creating LiContour.lean skeleton"},{"content":"Session-014 closure (journal, STATE, commit)","status":"pending","activeForm":"Closing session 014"}]},"extra_content":null}]