← Session 18 — Lean tier (ii): finite-height proof + certified base points
thinking (14076 chars)
Committed. Now 12.3: the triage document D-062 — the notes' step-2 design decision. This is the intellectually important piece: decompose what's inside SfBoundProp into Mathlib-tractable vs Trudgian-class, and make the deliberate perimeter decision.
Let me draft D-062 content:
# D-062 — Tier (ii) design: SfBoundProp decomposition and the perimeter decision
Structure: what's inside SfBoundProp (the proof obligation |Sf n| ≤ Bn FAlt n for 10⁵ ≤ n ≤ N₁):
The eventual proof of SfBoundProp (per D-036/D-037/D-056) decomposes:
**Layer 0 — definitions/bridges (bookkeeping, Mathlib-tractable):**
- Sf defined via BL Thm 2 rearranged. The honest content: BL Thm 2's identity λ_n = S_∞ − S_f + 1 with S_f the prime-side sum. Our Lean Sf is DEFINED as SInfty n + 1 − (liCoeff n).re, so the contour bound must be proved for THAT object. Two routes: (a) formalize BL Thm 2 (explicit formula — big); (b) prove the contour bound directly for the zero-side object: S_f(n) = S_∞(n) + 1 − λ_n... hmm wait. Actually the contour derivation of D-036 derives an identity for S_f (prime side) and bounds it. If Sf is defined via liCoeff, then to use D-036's bound we need BL Thm 2's identity anyway (to know the contour integral equals our Sf). So inside SfBoundProp's proof: BL Thm 2 (P1) is a genuine sub-obligation. Hmm — OR redefine the hypothesis to avoid BL: the contour identity in D-036 actually computes... let me think. D-036's contour: k_n(w−1)(−ζ′/ζ(w)) over the rectangle; the residue at zeros gives Σ_{|γ|≤T} [1−(ρ/(ρ−1))ⁿ]·(−1) — a ZERO-side sum, and the identity relates it to S_f(n) (prime side). The prime side is what BL Thm 2 connects to λ_n. Alternatively the zero-side sum Σ′[1−(1−1/ρ)ⁿ] relates to liCoeff DIRECTLY: liCoeff n = Σ′_ρ [1−(1−1/ρ)ⁿ]. And (ρ/(ρ−1))ⁿ = (1−1/ρ)^{−n}... note 1−(1−1/ρ)ⁿ vs 1−(ρ/(ρ−1))ⁿ: under ρ ↦ 1−ρ symmetry (functional equation), Σ′_ρ [1−(ρ/(ρ−1))ⁿ] = Σ′_ρ [1−(1−1/ρ)ⁿ] = liCoeff n (pairing ρ ↔ 1−ρ: (1−ρ)/(1−ρ−1)... (1−ρ)/(−ρ) = (ρ−1)/ρ: so [1−(ρ/(ρ−1))ⁿ] at 1−ρ becomes... this is Lagarias's symmetry. So the zero-sum piece IS liCoeff-like. The full identity chain: liCoeff n (truncated to |γ| ≤ T) = contour integrals + corrections. So actually the direct object the contour bounds is Σ_{|γ|≤T}′[1−(1−1/ρ)ⁿ] — the TRUNCATED liCoeff! And SfBoundProp could be restated as a truncated-zero-sum bound, bypassing BL Thm 2 entirely!
Hmm wait, is that right? D-037's S_f(n) appears in BL Thm 2: λ_n = S_∞ − S_f + 1. The contour bound bounds |S_f(n)|. The contour identity (D-036): S_f(n) = Σ_{|γ|≤T}′[1 − (ρ/(ρ−1))ⁿ]·(−1) + integrals + triv. So S_f = (zero-side truncated sum) + (integrals). The bound B(n) bounds the whole RHS. For the Lean Sf := S_∞ + 1 − λ.re, we have Sf = S_∞ + 1 − λ_n (real). By BL Thm 2 this equals the prime-side S_f. To bound our Sf via the contour, we need: our Sf = the contour-computed object. That equality IS BL Thm 2 (or the D-036 contour identity + BL).
Alternatively restate the hypothesis to avoid the equality: note the assembly only needs |Sf n| ≤ Bn. We could define the hypothesis directly about the contour-derived object... but then the assembly needs the equality to use it. No escape: SfBoundProp's proof needs BL Thm 2 (P1, [PROVED] literature) OR a direct zero-side route: λ_n = Σ′_ρ[1−(1−1/ρ)ⁿ] split into |γ| ≤ T (bounded via RH: |1−(1−1/ρ)ⁿ| ≤ 2 each... on the line 1−1/ρ = −conj(ρ)/|ρ|²... |1−1/ρ| = 1 on the line? ρ = 1/2+iγ: 1−1/ρ = (ρ−1)/ρ; |ρ−1| = |1/2−iγ... |−1/2+iγ| = |ρ|... wait |ρ−1| for ρ = 1/2+iγ: ρ−1 = −1/2+iγ, |ρ−1| = √(1/4+γ²) = |ρ|. So |1−1/ρ| = |ρ−1|/|ρ| = 1 ✓. So each term |1−(1−1/ρ)ⁿ| ≤ 2 — and the TAIL |γ| > T: |1−(1−1/ρ)ⁿ| ≤ n·C/|ρ|·... the tail bound (|1−(1−1/ρ)ⁿ| ≤ 2n/|ρ| for |ρ| large, via |1−(1−x)ⁿ| ≤ n|x|·... for |x| ≤ 1: |1−(1−x)ⁿ| = |x||Σ_{j<n}(1−x)^j| ≤ n|x| hmm ≤ n/|ρ|; Σ n/|ρ| over |γ| > T converges? Σ 1/|ρ| over |γ| > T diverges! (zeros density ~ log T; Σ 1/γ diverges). Need the symmetric version: |1−(1−1/ρ)ⁿ| for PAIRED zeros ρ, 1−ρ̄... the pairing gives convergence. This is exactly why the contour route exists. So the direct zero-side tail handling is the contour content anyway.
So the triage: SfBoundProp contains:
1. **BL Thm 2 identity** (λ_n = S_∞ − S_f + 1, prime side) — needed to equate our Sf with the contour-bounded object. Literature [PROVED]; formalization = PNT-class? No — BL Thm 2 is absolute-convergence bookkeeping of the completed-zeta Hadamard product; formalizing is real work but "standard complex analysis". Hmm. Alternatively: define Sf as the PRIME-SIDE sum directly and take the identity λ = S_∞ − S_f + 1 as the hypothesis?? That just relocates. The notes' design chose SfBound as THE single hypothesis; the identity question is a design decision INSIDE the triage. Options for D-062 to present:
(a) keep Sf := S_∞ + 1 − λ.re (identity definitional); SfBoundProp's proof must then connect to the contour — needs BL Thm 2 formalized or the D-036 contour identity proved directly for the truncated zero sum + tail pairing.
(b) Add the BL identity as a second named hypothesis (BLIdentity : ∀ n, (liCoeff n).re = SInfty n − SfPrime n + 1) with SfPrime the prime-side def; then SfBound := ∀ n ∈ range, |SfPrime n| ≤ Bn n. Two named hypotheses, each cleaner individually. The notes preferred ONE — but the triage can legitimately present the split as the honest outcome: "one named analytic hypothesis" was the target; the triage reveals the natural decomposition is identity + bound. Present both, recommend (a) with the identity treated as part of the contour-identity formalization (since the D-036 contour IS the proof of both simultaneously: the contour identity produces λ_n = S_∞ − S_f + 1 AND the bound in one stroke — that's what Lagarias Thm 6.1's proof does). Actually YES — that's the insight: D-036's contour computation directly yields the identity AND the bound together (variant B of Lagarias Thm 6.1's proof). So SfBoundProp as stated (with Sf := S_∞ + 1 − λ.re) is exactly what the contour argument proves directly, no separate BL Thm 2 needed. Document this.
2. **Contour identity + residue bookkeeping** (Mathlib-tractable, big): rectangle integral of k_n(w−1)(−ζ′/ζ), residue theorem. Mathlib HAS residue theorem infrastructure? Mathlib has some (ResidueTheorem? there is `Complex.integral_boundary_rect...`? Mathlib's residue theorem support is limited but growing; rectangle integrals of meromorphic functions: there IS `Complex.rectangleIntegral...`? Hmm. This is a real formalization lift — flag honestly as "Mathlib-partial, needs meromorphic residue machinery on rectangles".
3. **Kernel bounds** (|k_n| ≤ 2, e⁴+1, e^{√n/2}+1; stepping (6.12); triv residue ≤ 1) — elementary, Mathlib-tractable (real analysis only). P4.
4. **R-bound** (D-056 Theorem R: |R(s)| ≤ 10.5 log(|t|+2) + 48) — complex analysis: partial fractions for ζ′/ζ (needs Hadamard product for ξ — Mathlib? zeta-23-lean may have some), zero-count input C₀ (needs Trudgian N(T)!). So R-bound = Mathlib-tractable modulo the N(T) input.
5. **Trudgian N(T)/S(T) explicit bounds** (P2) — the perimeter candidate. Trudgian 2014 (arXiv) — [PROVED] literature. Formalizing = PNT-class (Backlund-Rosser machinery). RECOMMENDATION: perimeter (literature hypothesis, exactly like Zeta23's hEF/hRvM and our RHUpTo). This is the deliberate decision the notes ask for. Justification: (i) published, refereed, machine-verified constants; (ii) zeta-23-lean precedent treats verified literature as hypotheses; (iii) the theorem's tag already says PROVED-CONDITIONAL(computational...); adding "explicit N(T) bounds (Trudgian 2014, published)" to the trusted base is honest and declared.
6. **Platt–Trudgian RH to T₀** (H1) — already perimeter (RHUpTo hypothesis). ✓ nothing to do.
7. **M₀ ≤ 1.3352** (H3) — grid-verified (E-023); upgrade path E-023b (acb box cover) → becomes computational perimeter of the same class as Platt–Trudgian (interval-arithmetic fact). Recommend: treat as computational perimeter after E-023b; until then it's a grid-verified sub-claim (honest tag).
8. **Finite Li verification to 5×10⁵** (H4) — already perimeter (LiVerifiedUpTo). ✓
9. **Zero-avoiding T choice** (pigeonhole gap center, D-036 §2) — elementary combinatorics given C₀; Mathlib-tractable modulo N(T) input.
10. **liCoeff summability honesty note** — the tsum summability (Σ|ρ|⁻² < ∞ etc.) — needed for liCoeff to be the right object; part of the contour identity layer effectively. Flag.
So the triage output: SfBoundProp = [contour identity & residues: formalizable, months-scale?] + [kernel bounds: tractable] + [R-bound: tractable modulo N(T)] + [Trudgian N(T)/S(T): PERIMETER (recommended)] + [M₀: computational perimeter after E-023b] + [RH bridge: perimeter already].
Perimeter decision (deliberate, per notes): Trudgian 2014 explicit N(T)/S(T) bounds → trusted perimeter, same class as Platt–Trudgian. The paper's claim becomes: "verified modulo the D-036/D-056 contour estimate (Mathlib-tractable complex analysis, formalization in progress), with Trudgian 2014 + Platt–Trudgian 2021 + finite Li verification as declared perimeter."
Hmm wait — but the contour identity/residue layer is still inside SfBoundProp as a hypothesis. So the paper claim after step 1: "Lean-verified modulo SfBoundProp (one named hypothesis) + perimeter". After future tiers discharge the contour layers, SfBoundProp shrinks to just Trudgian + M₀ + perimeter. Document the roadmap.
Also record in D-062: the base-point sizing computations (for the next sub-stage 12.2 numerics): the exact bound plan (log 80000 ∈ [11.263, 11.3], etc.) — actually I worked out the full bounding plan above; record the KEY constants so the next session doesn't redo the sizing:
- margin(80000) ≥ 337000 − 327037 + 1 ≈ 9964 (crude certified bounds; true 15764)
- margin(100000) ≥ 433102 − 346893 + 1 ≈ 86210 (true ~93000)
- margin(80000) ≤ 338670 − 276251 + 1 = 62420 (for hbase2)
- So hbase: margin(80000) > 0 via slower ≥ 337000 (log 80000 ≥ 11.263, (1+log2+logπ)/2 ≤ 1.41894) and Bn ≤ 327037 (T ≤ 284, log T ≤ 5.7, log log T ≤ 1.75, e⁴ ≤ 54.6015, 1/(2π) ≤ 0.159155, IIMaj ≤ 2600).
- hbase2: margin(80000) ≤ 62420 < 86210 ≤ margin(100000) via the two-sided bounds listed.
Wait, I should double-check a couple of the sizing numbers before writing them into D-062 (they'll guide the next session): let me recompute the Bn(80000) upper and margin(100000) lower in Python quickly with the exact certified constants I proposed, to make sure the plan is consistent. Actually my hand arithmetic above: Bn(80000) ≤ 523.4 + 127757.2 + 53.408 + 196101.6 + 2600 + 1 = 327036.6 ✓; margin ≥ 337000.9 − 327036.6 + 1 = 9965.3 ✓. margin(100000) ≥ 433102 − 346892.2 + 1 = 86210.8 ✓; margin(80000) ≤ 338670.1 − 276251 + 1 = 62420.1 < 86210.8 ✓. The plan is consistent with ~1000+ slack everywhere except a few tight exp/log point bounds (e^5.65 ≥ 285 → 284.1 — 0.3%; e^1.1447 vs π — 0.005%!). The π one is scary-tight; relax: log π ≥ 1.144 only needs e^1.144 ≤ π: e^1.144 = e·e^0.144: e^0.144 ≤ 1/(1−0.144/16)^16 = (1/0.991)^16: ln(1/0.991) = 0.0090407... ×16 = 0.14465; e^0.14465 = 1.15566. So (1/0.991)^16 ≈ 1.15566; e^1.144 ≤ 2.7182818·1.15566 = 3.14127 ≤ 3.1415926 ✓ margin 0.01%. Still tight. Alternative: log π ≥ 1.14 (computed above, 0.4% margin) — and absorb: (1+log2+logπ)/2 ≥ (1+0.6931471+1.14)/2 = 1.4165736 (vs 1.4189386 with 1.1447298) — cost 0.002365·80000/... slower(80000) upper changes by 0.002365·40000... wait (1+log2+logπ)/2 multiplies n=80000 with coefficient... slower = (1/2)n log n − ((1+log2+logπ)/2)n − 4. Using 1.14 instead of 1.1447: the upper bound on slower increases by ((1.1447−1.14)/2)·80000 = 188. margin(80000) upper: 62420 + 188 = 62608 < 86210 ✓ still fine. Good — use log π ≥ 1.14 (comfortable) for the hbase2 upper bound on slower(80000); the hbase lower bound on slower(80000) uses (1+log2+logπ)/2 ≤ (1+0.6931472+1.1448)/2 = 1.4189 with log π ≤ 1.1448 (π ≤ e^1.1448: e^1.1448 = e·e^0.1448: e^0.1448 ≥ 1.15579 (partial sums: 1+.1448+.010493+.000506+.0000183+.00000053 = 1.155818); 2.7182818·1.155818 = 3.14183 ≥ π ✓ margin 0.008% — tight again but this side only needs... hmm. log π upper bound tightness: true log π = 1.1447299. Any upper bound ≥ 1.14473 needs e^1.14473 ≥ π to 0.001% — partial sums give LOWER bounds on e^0.1448, so e^1.1448 ≥ e·1.155818 = 3.141834 ≥ 3.1415927 ✓ margin 0.008% — exact-rational arithmetic, fine but tight. Relax via more partial-sum terms (9 terms of e^0.1448: +x⁷/5040 = 0.1447^7/5040 ≈ 1.36e-7/... let me not fuss — the next session can tune exponents. Record the tight points with warnings.)
OK — also for D-062, record the design decisions:
1. FAlt swap (dropped negative-weight term) — rationale + margin cost.
2. Two-point base (secant) instead of derivative.
3. Sf via BL-identity-rearranged definition; the contour argument proves identity+bound in one stroke (Lagarias Thm 6.1 variant B), so no separate BL Thm 2 formalization is needed.
4. N₀-split at 10⁵ (finite verification overlap).
5. Perimeter recommendation: Trudgian 2014 N(T)/S(T) → trusted perimeter; M₀ → computational perimeter after E-023b.
Also the paper claim update (draft.tex Formal verification appendix line): the appendix currently says tier (i) done; add tier (ii) step 1. That's the "paper appendix line" todo. Let me check what draft.tex's formal verification appendix says — read the relevant part. And D-061 status update (the Lean tracking derivation).
Order of work now:
1. Write D-062 (triage + sizing plan).
2. Update D-061 (Lean status) — brief.
3. Paper appendix: one paragraph update (audit rule: edits re-open audit for edited lines — keep it precise).
4. journal/session-012.md.
5. STATE.md update (NEXT ACTION: tier (ii) step 2 — base-point numerics, with pointer to D-062 sizing).
6. NGUYEN.md: 5.1 status line update.
7. db registration (D-062, session 012).
8. Commit.
Let me first quickly check draft.tex's formal verification section and D-061's structure to update accurately. Also verify a couple of sizing numbers numerically to make D-062's plan solid (quick python check of the certified bound chains).
Committed. Now the triage document (notes' step 2). First a quick numerical validation of the bound chains I plan to record in D-062 for the next sub-stage (base-point discharge), so the sizing plan is pre-verified.
tool: Bash
input
{
"command": "cd D:/Python/Quantum && .venv/Scripts/python.exe -c \"\nimport mpmath\nmpmath.mp.dps = 40\nfrom mpmath import mpf, log, exp, sqrt, pi, euler\n# Certified bound plan for Lean base-point discharge \u2014 verify each inequality\n# exp helper: e^x >= partial sum (x>=0); e^x <= (1/(1-x/k))^k for x<k\ndef exp_lo(x, terms=8):\n return sum(mpf(x)**i/mpmath.factorial(i) for i in range(terms))\ndef exp_hi(x, k=16):\n return (1/(1-mpf(x)/k))**k\ne1lo, e1hi = mpf('2.7182818283'), mpf('2.7182818286')\npi_lo, pi_hi = mpf('3.1415926535'), mpf('3.1415926536')\nlog2_lo, log2_hi = mpf('0.6931471803'), mpf('0.6931471808')\nchecks = []\n# log 80000 >= 11.263: e^11.263 <= 80000\ne11_hi = e1hi**11; e0263_hi = exp_hi(mpf('0.263'))\nchecks.append(('e^11.263 <= 80000', e11_hi*e0263_hi, 80000, e11_hi*e0263_hi <= 80000))\n# log 80000 <= 11.3: e^11.3 >= 80000\ne03_lo = exp_lo(mpf('0.3'))\nchecks.append(('e^11.3 >= 80000', e1lo**11*e03_lo, 80000, e1lo**11*e03_lo >= 80000))\n# log 100000 >= 11.5: e^11.5 <= 100000\ne05_hi = exp_hi(mpf('0.5'))\nchecks.append(('e^11.5 <= 100000', e11_hi*e05_hi, 100000, e11_hi*e05_hi <= 100000))\n# log T <= 5.7 for T<=284/286: e^5.7 >= 286\ne07_lo = exp_lo(mpf('0.7')); e5_lo = e1lo**5\nchecks.append(('e^5.7 >= 286', e5_lo*e07_lo, 286, e5_lo*e07_lo >= 286))\n# log T <= 5.8 for T<=318/320: e^5.8 >= 320\ne08_lo = exp_lo(mpf('0.8'))\nchecks.append(('e^5.8 >= 320', e5_lo*e08_lo, 320, e5_lo*e08_lo >= 320))\n# log log T <= 1.75: e^1.75 >= 5.7 (need log(T+2)<=5.7 <= e^1.75)\ne075_lo = exp_lo(mpf('0.75'))\nchecks.append(('e^1.75 >= 5.7', e1lo*e075_lo, 5.7, e1lo*e075_lo >= 5.7))\n# log log <= 1.77 for 5.8: e^1.77 >= 5.8\ne077_lo = exp_lo(mpf('0.77'))\nchecks.append(('e^1.77 >= 5.8', e1lo*e077_lo, 5.8, e1lo*e077_lo >= 5.8))\n# log 285 >= 5.65: e^5.65 <= 285\ne065_hi = exp_hi(mpf('0.65'))\nchecks.append(('e^5.65 <= 285', (e1hi**5)*e065_hi, 285, (e1hi**5)*e065_hi <= 285))\n# log pi >= 1.14: e^1.14 <= pi_lo\ne014_hi = exp_hi(mpf('0.14'))\nchecks.append(('e^1.14 <= pi', e1hi*e014_hi, pi_lo, e1hi*e014_hi <= pi_lo))\n# log pi <= 1.1448: e^1.1448 >= pi_hi\ne01448_lo = exp_lo(mpf('0.1448'), 9)\nchecks.append(('e^1.1448 >= pi', e1lo*e01448_lo, pi_hi, e1lo*e01448_lo >= pi_hi))\n# e^4 in [54.5978, 54.6015]\nchecks.append(('e^4 >= 54.5978', e1lo**4, mpf('54.5978'), e1lo**4 >= mpf('54.5978')))\nchecks.append(('e^4 <= 54.6015', e1hi**4, mpf('54.6015'), e1hi**4 <= mpf('54.6015')))\nfor name, val, target, ok in checks:\n print(f'{\\\"OK \\\" if ok else \\\"FAIL\\\"} {name}: bound={mpmath.nstr(val,8)} target={target} margin={mpmath.nstr(abs(val-target)/target*100,4)}%')\n\"\n",
"description": "Verify all certified bound chains for D-062 sizing plan"
}
raw content_json (database row)
[{"type":"thinking","thinking":"Committed. Now 12.3: the triage document D-062 — the notes' step-2 design decision. This is the intellectually important piece: decompose what's inside SfBoundProp into Mathlib-tractable vs Trudgian-class, and make the deliberate perimeter decision.\n\nLet me draft D-062 content:\n\n# D-062 — Tier (ii) design: SfBoundProp decomposition and the perimeter decision\n\nStructure: what's inside SfBoundProp (the proof obligation |Sf n| ≤ Bn FAlt n for 10⁵ ≤ n ≤ N₁):\n\nThe eventual proof of SfBoundProp (per D-036/D-037/D-056) decomposes:\n\n**Layer 0 — definitions/bridges (bookkeeping, Mathlib-tractable):**\n- Sf defined via BL Thm 2 rearranged. The honest content: BL Thm 2's identity λ_n = S_∞ − S_f + 1 with S_f the prime-side sum. Our Lean Sf is DEFINED as SInfty n + 1 − (liCoeff n).re, so the contour bound must be proved for THAT object. Two routes: (a) formalize BL Thm 2 (explicit formula — big); (b) prove the contour bound directly for the zero-side object: S_f(n) = S_∞(n) + 1 − λ_n... hmm wait. Actually the contour derivation of D-036 derives an identity for S_f (prime side) and bounds it. If Sf is defined via liCoeff, then to use D-036's bound we need BL Thm 2's identity anyway (to know the contour integral equals our Sf). So inside SfBoundProp's proof: BL Thm 2 (P1) is a genuine sub-obligation. Hmm — OR redefine the hypothesis to avoid BL: the contour identity in D-036 actually computes... let me think. D-036's contour: k_n(w−1)(−ζ′/ζ(w)) over the rectangle; the residue at zeros gives Σ_{|γ|≤T} [1−(ρ/(ρ−1))ⁿ]·(−1) — a ZERO-side sum, and the identity relates it to S_f(n) (prime side). The prime side is what BL Thm 2 connects to λ_n. Alternatively the zero-side sum Σ′[1−(1−1/ρ)ⁿ] relates to liCoeff DIRECTLY: liCoeff n = Σ′_ρ [1−(1−1/ρ)ⁿ]. And (ρ/(ρ−1))ⁿ = (1−1/ρ)^{−n}... note 1−(1−1/ρ)ⁿ vs 1−(ρ/(ρ−1))ⁿ: under ρ ↦ 1−ρ symmetry (functional equation), Σ′_ρ [1−(ρ/(ρ−1))ⁿ] = Σ′_ρ [1−(1−1/ρ)ⁿ] = liCoeff n (pairing ρ ↔ 1−ρ: (1−ρ)/(1−ρ−1)... (1−ρ)/(−ρ) = (ρ−1)/ρ: so [1−(ρ/(ρ−1))ⁿ] at 1−ρ becomes... this is Lagarias's symmetry. So the zero-sum piece IS liCoeff-like. The full identity chain: liCoeff n (truncated to |γ| ≤ T) = contour integrals + corrections. So actually the direct object the contour bounds is Σ_{|γ|≤T}′[1−(1−1/ρ)ⁿ] — the TRUNCATED liCoeff! And SfBoundProp could be restated as a truncated-zero-sum bound, bypassing BL Thm 2 entirely!\n\nHmm wait, is that right? D-037's S_f(n) appears in BL Thm 2: λ_n = S_∞ − S_f + 1. The contour bound bounds |S_f(n)|. The contour identity (D-036): S_f(n) = Σ_{|γ|≤T}′[1 − (ρ/(ρ−1))ⁿ]·(−1) + integrals + triv. So S_f = (zero-side truncated sum) + (integrals). The bound B(n) bounds the whole RHS. For the Lean Sf := S_∞ + 1 − λ.re, we have Sf = S_∞ + 1 − λ_n (real). By BL Thm 2 this equals the prime-side S_f. To bound our Sf via the contour, we need: our Sf = the contour-computed object. That equality IS BL Thm 2 (or the D-036 contour identity + BL). \n\nAlternatively restate the hypothesis to avoid the equality: note the assembly only needs |Sf n| ≤ Bn. We could define the hypothesis directly about the contour-derived object... but then the assembly needs the equality to use it. No escape: SfBoundProp's proof needs BL Thm 2 (P1, [PROVED] literature) OR a direct zero-side route: λ_n = Σ′_ρ[1−(1−1/ρ)ⁿ] split into |γ| ≤ T (bounded via RH: |1−(1−1/ρ)ⁿ| ≤ 2 each... on the line 1−1/ρ = −conj(ρ)/|ρ|²... |1−1/ρ| = 1 on the line? ρ = 1/2+iγ: 1−1/ρ = (ρ−1)/ρ; |ρ−1| = |1/2−iγ... |−1/2+iγ| = |ρ|... wait |ρ−1| for ρ = 1/2+iγ: ρ−1 = −1/2+iγ, |ρ−1| = √(1/4+γ²) = |ρ|. So |1−1/ρ| = |ρ−1|/|ρ| = 1 ✓. So each term |1−(1−1/ρ)ⁿ| ≤ 2 — and the TAIL |γ| > T: |1−(1−1/ρ)ⁿ| ≤ n·C/|ρ|·... the tail bound (|1−(1−1/ρ)ⁿ| ≤ 2n/|ρ| for |ρ| large, via |1−(1−x)ⁿ| ≤ n|x|·... for |x| ≤ 1: |1−(1−x)ⁿ| = |x||Σ_{j<n}(1−x)^j| ≤ n|x| hmm ≤ n/|ρ|; Σ n/|ρ| over |γ| > T converges? Σ 1/|ρ| over |γ| > T diverges! (zeros density ~ log T; Σ 1/γ diverges). Need the symmetric version: |1−(1−1/ρ)ⁿ| for PAIRED zeros ρ, 1−ρ̄... the pairing gives convergence. This is exactly why the contour route exists. So the direct zero-side tail handling is the contour content anyway.\n\nSo the triage: SfBoundProp contains:\n1. **BL Thm 2 identity** (λ_n = S_∞ − S_f + 1, prime side) — needed to equate our Sf with the contour-bounded object. Literature [PROVED]; formalization = PNT-class? No — BL Thm 2 is absolute-convergence bookkeeping of the completed-zeta Hadamard product; formalizing is real work but \"standard complex analysis\". Hmm. Alternatively: define Sf as the PRIME-SIDE sum directly and take the identity λ = S_∞ − S_f + 1 as the hypothesis?? That just relocates. The notes' design chose SfBound as THE single hypothesis; the identity question is a design decision INSIDE the triage. Options for D-062 to present:\n (a) keep Sf := S_∞ + 1 − λ.re (identity definitional); SfBoundProp's proof must then connect to the contour — needs BL Thm 2 formalized or the D-036 contour identity proved directly for the truncated zero sum + tail pairing. \n (b) Add the BL identity as a second named hypothesis (BLIdentity : ∀ n, (liCoeff n).re = SInfty n − SfPrime n + 1) with SfPrime the prime-side def; then SfBound := ∀ n ∈ range, |SfPrime n| ≤ Bn n. Two named hypotheses, each cleaner individually. The notes preferred ONE — but the triage can legitimately present the split as the honest outcome: \"one named analytic hypothesis\" was the target; the triage reveals the natural decomposition is identity + bound. Present both, recommend (a) with the identity treated as part of the contour-identity formalization (since the D-036 contour IS the proof of both simultaneously: the contour identity produces λ_n = S_∞ − S_f + 1 AND the bound in one stroke — that's what Lagarias Thm 6.1's proof does). Actually YES — that's the insight: D-036's contour computation directly yields the identity AND the bound together (variant B of Lagarias Thm 6.1's proof). So SfBoundProp as stated (with Sf := S_∞ + 1 − λ.re) is exactly what the contour argument proves directly, no separate BL Thm 2 needed. Document this.\n\n2. **Contour identity + residue bookkeeping** (Mathlib-tractable, big): rectangle integral of k_n(w−1)(−ζ′/ζ), residue theorem. Mathlib HAS residue theorem infrastructure? Mathlib has some (ResidueTheorem? there is `Complex.integral_boundary_rect...`? Mathlib's residue theorem support is limited but growing; rectangle integrals of meromorphic functions: there IS `Complex.rectangleIntegral...`? Hmm. This is a real formalization lift — flag honestly as \"Mathlib-partial, needs meromorphic residue machinery on rectangles\".\n\n3. **Kernel bounds** (|k_n| ≤ 2, e⁴+1, e^{√n/2}+1; stepping (6.12); triv residue ≤ 1) — elementary, Mathlib-tractable (real analysis only). P4.\n\n4. **R-bound** (D-056 Theorem R: |R(s)| ≤ 10.5 log(|t|+2) + 48) — complex analysis: partial fractions for ζ′/ζ (needs Hadamard product for ξ — Mathlib? zeta-23-lean may have some), zero-count input C₀ (needs Trudgian N(T)!). So R-bound = Mathlib-tractable modulo the N(T) input.\n\n5. **Trudgian N(T)/S(T) explicit bounds** (P2) — the perimeter candidate. Trudgian 2014 (arXiv) — [PROVED] literature. Formalizing = PNT-class (Backlund-Rosser machinery). RECOMMENDATION: perimeter (literature hypothesis, exactly like Zeta23's hEF/hRvM and our RHUpTo). This is the deliberate decision the notes ask for. Justification: (i) published, refereed, machine-verified constants; (ii) zeta-23-lean precedent treats verified literature as hypotheses; (iii) the theorem's tag already says PROVED-CONDITIONAL(computational...); adding \"explicit N(T) bounds (Trudgian 2014, published)\" to the trusted base is honest and declared.\n\n6. **Platt–Trudgian RH to T₀** (H1) — already perimeter (RHUpTo hypothesis). ✓ nothing to do.\n\n7. **M₀ ≤ 1.3352** (H3) — grid-verified (E-023); upgrade path E-023b (acb box cover) → becomes computational perimeter of the same class as Platt–Trudgian (interval-arithmetic fact). Recommend: treat as computational perimeter after E-023b; until then it's a grid-verified sub-claim (honest tag).\n\n8. **Finite Li verification to 5×10⁵** (H4) — already perimeter (LiVerifiedUpTo). ✓\n\n9. **Zero-avoiding T choice** (pigeonhole gap center, D-036 §2) — elementary combinatorics given C₀; Mathlib-tractable modulo N(T) input.\n\n10. **liCoeff summability honesty note** — the tsum summability (Σ|ρ|⁻² < ∞ etc.) — needed for liCoeff to be the right object; part of the contour identity layer effectively. Flag.\n\nSo the triage output: SfBoundProp = [contour identity & residues: formalizable, months-scale?] + [kernel bounds: tractable] + [R-bound: tractable modulo N(T)] + [Trudgian N(T)/S(T): PERIMETER (recommended)] + [M₀: computational perimeter after E-023b] + [RH bridge: perimeter already].\n\nPerimeter decision (deliberate, per notes): Trudgian 2014 explicit N(T)/S(T) bounds → trusted perimeter, same class as Platt–Trudgian. The paper's claim becomes: \"verified modulo the D-036/D-056 contour estimate (Mathlib-tractable complex analysis, formalization in progress), with Trudgian 2014 + Platt–Trudgian 2021 + finite Li verification as declared perimeter.\"\n\nHmm wait — but the contour identity/residue layer is still inside SfBoundProp as a hypothesis. So the paper claim after step 1: \"Lean-verified modulo SfBoundProp (one named hypothesis) + perimeter\". After future tiers discharge the contour layers, SfBoundProp shrinks to just Trudgian + M₀ + perimeter. Document the roadmap.\n\nAlso record in D-062: the base-point sizing computations (for the next sub-stage 12.2 numerics): the exact bound plan (log 80000 ∈ [11.263, 11.3], etc.) — actually I worked out the full bounding plan above; record the KEY constants so the next session doesn't redo the sizing:\n- margin(80000) ≥ 337000 − 327037 + 1 ≈ 9964 (crude certified bounds; true 15764)\n- margin(100000) ≥ 433102 − 346893 + 1 ≈ 86210 (true ~93000)\n- margin(80000) ≤ 338670 − 276251 + 1 = 62420 (for hbase2)\n- So hbase: margin(80000) > 0 via slower ≥ 337000 (log 80000 ≥ 11.263, (1+log2+logπ)/2 ≤ 1.41894) and Bn ≤ 327037 (T ≤ 284, log T ≤ 5.7, log log T ≤ 1.75, e⁴ ≤ 54.6015, 1/(2π) ≤ 0.159155, IIMaj ≤ 2600).\n- hbase2: margin(80000) ≤ 62420 < 86210 ≤ margin(100000) via the two-sided bounds listed.\n\nWait, I should double-check a couple of the sizing numbers before writing them into D-062 (they'll guide the next session): let me recompute the Bn(80000) upper and margin(100000) lower in Python quickly with the exact certified constants I proposed, to make sure the plan is consistent. Actually my hand arithmetic above: Bn(80000) ≤ 523.4 + 127757.2 + 53.408 + 196101.6 + 2600 + 1 = 327036.6 ✓; margin ≥ 337000.9 − 327036.6 + 1 = 9965.3 ✓. margin(100000) ≥ 433102 − 346892.2 + 1 = 86210.8 ✓; margin(80000) ≤ 338670.1 − 276251 + 1 = 62420.1 < 86210.8 ✓. The plan is consistent with ~1000+ slack everywhere except a few tight exp/log point bounds (e^5.65 ≥ 285 → 284.1 — 0.3%; e^1.1447 vs π — 0.005%!). The π one is scary-tight; relax: log π ≥ 1.144 only needs e^1.144 ≤ π: e^1.144 = e·e^0.144: e^0.144 ≤ 1/(1−0.144/16)^16 = (1/0.991)^16: ln(1/0.991) = 0.0090407... ×16 = 0.14465; e^0.14465 = 1.15566. So (1/0.991)^16 ≈ 1.15566; e^1.144 ≤ 2.7182818·1.15566 = 3.14127 ≤ 3.1415926 ✓ margin 0.01%. Still tight. Alternative: log π ≥ 1.14 (computed above, 0.4% margin) — and absorb: (1+log2+logπ)/2 ≥ (1+0.6931471+1.14)/2 = 1.4165736 (vs 1.4189386 with 1.1447298) — cost 0.002365·80000/... slower(80000) upper changes by 0.002365·40000... wait (1+log2+logπ)/2 multiplies n=80000 with coefficient... slower = (1/2)n log n − ((1+log2+logπ)/2)n − 4. Using 1.14 instead of 1.1447: the upper bound on slower increases by ((1.1447−1.14)/2)·80000 = 188. margin(80000) upper: 62420 + 188 = 62608 < 86210 ✓ still fine. Good — use log π ≥ 1.14 (comfortable) for the hbase2 upper bound on slower(80000); the hbase lower bound on slower(80000) uses (1+log2+logπ)/2 ≤ (1+0.6931472+1.1448)/2 = 1.4189 with log π ≤ 1.1448 (π ≤ e^1.1448: e^1.1448 = e·e^0.1448: e^0.1448 ≥ 1.15579 (partial sums: 1+.1448+.010493+.000506+.0000183+.00000053 = 1.155818); 2.7182818·1.155818 = 3.14183 ≥ π ✓ margin 0.008% — tight again but this side only needs... hmm. log π upper bound tightness: true log π = 1.1447299. Any upper bound ≥ 1.14473 needs e^1.14473 ≥ π to 0.001% — partial sums give LOWER bounds on e^0.1448, so e^1.1448 ≥ e·1.155818 = 3.141834 ≥ 3.1415927 ✓ margin 0.008% — exact-rational arithmetic, fine but tight. Relax via more partial-sum terms (9 terms of e^0.1448: +x⁷/5040 = 0.1447^7/5040 ≈ 1.36e-7/... let me not fuss — the next session can tune exponents. Record the tight points with warnings.)\n\nOK — also for D-062, record the design decisions:\n1. FAlt swap (dropped negative-weight term) — rationale + margin cost.\n2. Two-point base (secant) instead of derivative.\n3. Sf via BL-identity-rearranged definition; the contour argument proves identity+bound in one stroke (Lagarias Thm 6.1 variant B), so no separate BL Thm 2 formalization is needed.\n4. N₀-split at 10⁵ (finite verification overlap).\n5. Perimeter recommendation: Trudgian 2014 N(T)/S(T) → trusted perimeter; M₀ → computational perimeter after E-023b.\n\nAlso the paper claim update (draft.tex Formal verification appendix line): the appendix currently says tier (i) done; add tier (ii) step 1. That's the \"paper appendix line\" todo. Let me check what draft.tex's formal verification appendix says — read the relevant part. And D-061 status update (the Lean tracking derivation).\n\nOrder of work now:\n1. Write D-062 (triage + sizing plan).\n2. Update D-061 (Lean status) — brief.\n3. Paper appendix: one paragraph update (audit rule: edits re-open audit for edited lines — keep it precise).\n4. journal/session-012.md.\n5. STATE.md update (NEXT ACTION: tier (ii) step 2 — base-point numerics, with pointer to D-062 sizing).\n6. NGUYEN.md: 5.1 status line update.\n7. db registration (D-062, session 012).\n8. Commit.\n\nLet me first quickly check draft.tex's formal verification section and D-061's structure to update accurately. Also verify a couple of sizing numbers numerically to make D-062's plan solid (quick python check of the certified bound chains).","signature":""},{"type":"text","text":"Committed. Now the triage document (notes' step 2). First a quick numerical validation of the bound chains I plan to record in D-062 for the next sub-stage (base-point discharge), so the sizing plan is pre-verified."},{"type":"tool_use","id":"Bash_92","name":"Bash","input":{"command":"cd D:/Python/Quantum && .venv/Scripts/python.exe -c \"\nimport mpmath\nmpmath.mp.dps = 40\nfrom mpmath import mpf, log, exp, sqrt, pi, euler\n# Certified bound plan for Lean base-point discharge — verify each inequality\n# exp helper: e^x >= partial sum (x>=0); e^x <= (1/(1-x/k))^k for x<k\ndef exp_lo(x, terms=8):\n return sum(mpf(x)**i/mpmath.factorial(i) for i in range(terms))\ndef exp_hi(x, k=16):\n return (1/(1-mpf(x)/k))**k\ne1lo, e1hi = mpf('2.7182818283'), mpf('2.7182818286')\npi_lo, pi_hi = mpf('3.1415926535'), mpf('3.1415926536')\nlog2_lo, log2_hi = mpf('0.6931471803'), mpf('0.6931471808')\nchecks = []\n# log 80000 >= 11.263: e^11.263 <= 80000\ne11_hi = e1hi**11; e0263_hi = exp_hi(mpf('0.263'))\nchecks.append(('e^11.263 <= 80000', e11_hi*e0263_hi, 80000, e11_hi*e0263_hi <= 80000))\n# log 80000 <= 11.3: e^11.3 >= 80000\ne03_lo = exp_lo(mpf('0.3'))\nchecks.append(('e^11.3 >= 80000', e1lo**11*e03_lo, 80000, e1lo**11*e03_lo >= 80000))\n# log 100000 >= 11.5: e^11.5 <= 100000\ne05_hi = exp_hi(mpf('0.5'))\nchecks.append(('e^11.5 <= 100000', e11_hi*e05_hi, 100000, e11_hi*e05_hi <= 100000))\n# log T <= 5.7 for T<=284/286: e^5.7 >= 286\ne07_lo = exp_lo(mpf('0.7')); e5_lo = e1lo**5\nchecks.append(('e^5.7 >= 286', e5_lo*e07_lo, 286, e5_lo*e07_lo >= 286))\n# log T <= 5.8 for T<=318/320: e^5.8 >= 320\ne08_lo = exp_lo(mpf('0.8'))\nchecks.append(('e^5.8 >= 320', e5_lo*e08_lo, 320, e5_lo*e08_lo >= 320))\n# log log T <= 1.75: e^1.75 >= 5.7 (need log(T+2)<=5.7 <= e^1.75)\ne075_lo = exp_lo(mpf('0.75'))\nchecks.append(('e^1.75 >= 5.7', e1lo*e075_lo, 5.7, e1lo*e075_lo >= 5.7))\n# log log <= 1.77 for 5.8: e^1.77 >= 5.8\ne077_lo = exp_lo(mpf('0.77'))\nchecks.append(('e^1.77 >= 5.8', e1lo*e077_lo, 5.8, e1lo*e077_lo >= 5.8))\n# log 285 >= 5.65: e^5.65 <= 285\ne065_hi = exp_hi(mpf('0.65'))\nchecks.append(('e^5.65 <= 285', (e1hi**5)*e065_hi, 285, (e1hi**5)*e065_hi <= 285))\n# log pi >= 1.14: e^1.14 <= pi_lo\ne014_hi = exp_hi(mpf('0.14'))\nchecks.append(('e^1.14 <= pi', e1hi*e014_hi, pi_lo, e1hi*e014_hi <= pi_lo))\n# log pi <= 1.1448: e^1.1448 >= pi_hi\ne01448_lo = exp_lo(mpf('0.1448'), 9)\nchecks.append(('e^1.1448 >= pi', e1lo*e01448_lo, pi_hi, e1lo*e01448_lo >= pi_hi))\n# e^4 in [54.5978, 54.6015]\nchecks.append(('e^4 >= 54.5978', e1lo**4, mpf('54.5978'), e1lo**4 >= mpf('54.5978')))\nchecks.append(('e^4 <= 54.6015', e1hi**4, mpf('54.6015'), e1hi**4 <= mpf('54.6015')))\nfor name, val, target, ok in checks:\n print(f'{\\\"OK \\\" if ok else \\\"FAIL\\\"} {name}: bound={mpmath.nstr(val,8)} target={target} margin={mpmath.nstr(abs(val-target)/target*100,4)}%')\n\"\n","description":"Verify all certified bound chains for D-062 sizing plan"},"extra_content":null}]