← Session 14 — Phase 5 kickoff: paper draft + honesty audit
thinking (7073 chars)
Line 49: "Component expansion: 2F(T) → #1, #2" — so 2N(T) was majorized by 2F(T) where F involves T log T and T blocks — i.e., N(T) ≤ F(T) with F(T) = (T/2π)(log(T/2π)−1) + ... something producing T log T and T blocks. For the skeleton, faithful statement of margiñ convexity would need F's exact form. I don't have it precisely in context ("2F(T)" and "2S_b(T)" — S_b presumably the S(T) bound producing log T, log log T blocks).
Decision for skeleton v1: state margiñ convexity with F and S_b as explicit-function parameters? No — better: state the *chain-rule criterion* lemma (the reusable, fully explicit content):
```lean
/-- D-057 Step 2 (chain-rule reduction): for φ : ℝ → ℝ twice differentiable and
T(n) = √n + 1, d²/dn² φ(T(n)) = [φ″(T) − φ′(T)/(T−1)]/(4n). Statement skeleton. -/
theorem chain_rule_sqrt_shift (φ : ℝ → ℝ) (n : ℝ) (hn : 0 < n)
(hφ : ContDiff ℝ 2 φ) : -- statement shape
deriv (deriv (fun n => φ (Real.sqrt n + 1))) n =
(deriv (deriv φ) (Real.sqrt n + 1) - deriv φ (Real.sqrt n + 1) / Real.sqrt n) / (4 * n) := sorry
```
That's fully faithful and checkable. Plus the 11-block table could be stated as 11 sign lemmas... that's the actual formalization work (task for later); the skeleton can state the aggregate:
```lean
theorem margin_convex_skeleton : ConvexOn ℝ (Set.Ici 20) marginTilde := sorry
```
with marginTilde defined with F, S_b explicit... I'll define marginTilde taking the counting majorants as explicit named functions where I know them (Ĉ₀ closed form known; B̃₄ closed form known; S closed form known) and leave N's majorant F as a structure field with the defining property as hypothesis. Compromise:
```lean
/-- Margin ingredients with their proved majorants (D-056/D-057). The counting-function
majorant F ⊇ 2N and its closed form are part of the formalization content; the
skeleton records the dependence explicitly. -/
theorem margin_tilde_convex (F : ℝ → ℝ)
(hF : ∀ T, 0 ≤ T → (Ncount 0 T : ℝ) ≤ F T) -- wait Ncount counts zeros with T₁ < im ≤ T₂, ℕ-valued
(hFform : F = fun T => ...) -- unknown exact form
```
I don't know F's exact form → can't write hFform. So state:
```lean
theorem margin_tilde_convex (F : ℝ → ℝ) (hF : ContDiff ℝ 2 F)
(hN : ∀ T : ℝ, (Ncount 0 T : ℝ) ≤ F T)
(hblocks : ∀ T : ℝ, T ≥ Real.sqrt 20 + 1 → ψ F T < 0) :
ConvexOn ℝ (Set.Ici 20) (marginTilde F) := sorry
```
This is honest: "for any smooth majorant F of N whose ψ-block is negative, the margin is convex" — that's the D-057 mechanism exactly. marginTilde F defined with Ĉ₀, B̃₄, A=10.5, B₀=48, M₀=1.3352 explicit.
Hmm, but this is getting intricate to write correctly in Lean on the first pass without a compiler... The build will let me iterate. But I also must watch scope — the build itself may take an hour+. Let me write the skeletons at a slightly less ambitious but fully honest level:
LiSkeleton.lean:
- RHUpTo, LiVerifiedUpTo, liCoeff, lambda_pos_finite_height (sorry)
- SInfty, sInfty_lower_bound (sorry)
- marginTilde (explicit with Ĉ₀, B̃₄, constants; N via Ncount cast — note: statement uses the TRUE Ncount, matching D-037's B; convexity of the true margin is distributionally what D-057 proves via majorants; I'll state `margin_convex` for the closed-form marginTilde with Ncount replaced by parameter F with hypothesis) — implement the parameterized version.
SuzukiSkeleton.lean:
- Fskeleton (F function), suzukiW, R003_exact_factorization (sorry), Cor16 implication shape (sorry).
ValleySkeleton.lean:
- K diagonal as parameter with variational characterization hypothesis; plateau upper bound + floor bounds + profile statements conditional on RiemannHypothesis (sorry).
Keep each statement minimal-compilable. Write files now. Careful Lean 4 details:
- `import Mathlib` — v4.33: `import Mathlib` works (root module). Slow but fine.
- Zeta23 import: `import Zeta23.Statement` gives Zeta23.IsNontrivialZero etc. (namespace Zeta23).
- RiemannHypothesis: in root namespace? Mathlib's is `RiemannHypothesis` (root). Statement.lean used it unqualified inside namespace Zeta23 — resolves to root. ✓
- Ncount : Zeta23.Ncount (T₁ T₂ : ℝ) : ℕ.
- tsum: `∑' x, f x` needs `open scoped Topology`? In Lean4 Mathlib, ∑' notation is in `Topology` scope? It's available via `open scoped Topology` or BigOperators? In recent Mathlib, ∑' is in scope `Topology`. Safer: `open scoped Topology BigOperators`. Hmm, actually tsum notation: `∑'` is defined in Mathlib.Topology.Algebra.InfiniteSum... with notation in `Topology` scope? I believe in current Mathlib the ∑' notation doesn't need open scoped (it's global). It used to require `open scoped BigOperators` — no, that's ∑ (finsum/finset). ∑' is global notation. I'll write `tsum` explicitly to be safe? `tsum (fun ρ => ...)` — unambiguous, no notation issues. Use tsum.
- Real.eulerMascheroniConstant ✓ exists.
- Odd m : ℕ — Mathlib `Odd`. Subtype {m : ℕ // Odd m ∧ 3 ≤ m} ✓.
- Real.sqrt ✓. Real.log ✓. Complex.exp/sin: `Complex.exp`, `Complex.sin` ✓. I : ℂ is `Complex.I`.
- division on ℂ ✓. Coercions (n : ℂ) from ℕ ✓.
- ConvexOn: `ConvexOn ℝ s f` ✓ (root namespace).
- deriv: `deriv f x` for ℝ→ℝ ✓. iterated: `deriv (deriv f) n`? deriv f : ℝ → ℝ ✓.
- ContDiff ℝ 2 φ ✓.
For suzukiW integrals: `∫ x in -a..a, ...` interval integral notation needs `open scoped Interval`? The notation ∫ x in a..b is in Mathlib, scope `Interval`? It's available after `import Mathlib` without open I think (notation `∫ x in a..b, f x` is global since it uses `intervalIntegral`). Actually it's `∫ x in a..b, f x ∂μ` — plain version OK. To minimize risk, avoid integrals: state suzukiW via intervalIntegral.integral? Simpler: use `MeasureTheory.integral` over Set.Ioo? Overkill. Use the `∫ x in (-a)..a, f x` notation — I'm fairly confident it's available with `import Mathlib` (it's in `Mathlib.MeasureTheory.Integral.IntervalIntegral`, notation global). Risk acceptable; compiler will tell.
F function: F(z) = z²ξ(½−iz)/ξ′(½−iz). ξ from completedRiemannZeta: Mathlib has `completedRiemannZeta : ℂ → ℂ`? I believe Mathlib has `Complex.completedRiemannZeta`? Actually the completed zeta in Mathlib: `completedRiemannZeta` and `completedRiemannZeta₀` in Mathlib.NumberTheory.LSeries.Hurwitz? or RiemannZeta. I recall `completedRiemannZeta s` exists ("Λ(s)"). And its derivative: deriv completedRiemannZeta. So:
```lean
noncomputable def xiFun (s : ℂ) : ℂ := s * (s - 1) / 2 * completedRiemannZeta s
noncomputable def Ffun (z : ℂ) : ℂ :=
let s := 1/2 - Complex.I * z
z^2 * xiFun s / deriv xiFun s
```
If completedRiemannZeta is inside namespace... I'll write `completedRiemannZeta` unqualified; if compile fails, adjust. It's root-level in Mathlib (pretty sure: `completedRiemannZeta` is declared at root in Mathlib.NumberTheory.LSeries.RiemannZeta? Hmm, might be `Complex.completedRiemannZeta`). To be safe, write `Complex.completedRiemannZeta`? If it's root, `Complex.completedRiemannZeta` fails. Grep the mathlib sources locally — we have the full mathlib checkout in zeta-23-lean/.lake/packages/mathlib! Grep for "def completedRiemannZeta".
The Mathlib source is available locally — let me verify exact names before writing the skeletons.
tool: Bash
input
{
"command": "cd /d/Python/Quantum/zeta-23-lean/.lake/packages/mathlib && grep -rn \"def completedRiemannZeta \\|def RiemannHypothesis\" Mathlib/ | head -5; grep -rn \"eulerMascheroniConstant\" Mathlib/Analysis/SpecialFunctions/ 2>/dev/null | head -2; grep -rn \"noncomputable def completedRiemannZeta\" Mathlib/ | head -3",
"description": "Verify Mathlib declaration names"
}
raw content_json (database row)
[{"type":"thinking","thinking":"Line 49: \"Component expansion: 2F(T) → #1, #2\" — so 2N(T) was majorized by 2F(T) where F involves T log T and T blocks — i.e., N(T) ≤ F(T) with F(T) = (T/2π)(log(T/2π)−1) + ... something producing T log T and T blocks. For the skeleton, faithful statement of margiñ convexity would need F's exact form. I don't have it precisely in context (\"2F(T)\" and \"2S_b(T)\" — S_b presumably the S(T) bound producing log T, log log T blocks).\n\nDecision for skeleton v1: state margiñ convexity with F and S_b as explicit-function parameters? No — better: state the *chain-rule criterion* lemma (the reusable, fully explicit content):\n\n```lean\n/-- D-057 Step 2 (chain-rule reduction): for φ : ℝ → ℝ twice differentiable and\n T(n) = √n + 1, d²/dn² φ(T(n)) = [φ″(T) − φ′(T)/(T−1)]/(4n). Statement skeleton. -/\ntheorem chain_rule_sqrt_shift (φ : ℝ → ℝ) (n : ℝ) (hn : 0 < n)\n (hφ : ContDiff ℝ 2 φ) : -- statement shape\n deriv (deriv (fun n => φ (Real.sqrt n + 1))) n =\n (deriv (deriv φ) (Real.sqrt n + 1) - deriv φ (Real.sqrt n + 1) / Real.sqrt n) / (4 * n) := sorry\n```\nThat's fully faithful and checkable. Plus the 11-block table could be stated as 11 sign lemmas... that's the actual formalization work (task for later); the skeleton can state the aggregate:\n\n```lean\ntheorem margin_convex_skeleton : ConvexOn ℝ (Set.Ici 20) marginTilde := sorry\n```\nwith marginTilde defined with F, S_b explicit... I'll define marginTilde taking the counting majorants as explicit named functions where I know them (Ĉ₀ closed form known; B̃₄ closed form known; S closed form known) and leave N's majorant F as a structure field with the defining property as hypothesis. Compromise:\n\n```lean\n/-- Margin ingredients with their proved majorants (D-056/D-057). The counting-function\n majorant F ⊇ 2N and its closed form are part of the formalization content; the\n skeleton records the dependence explicitly. -/\ntheorem margin_tilde_convex (F : ℝ → ℝ)\n (hF : ∀ T, 0 ≤ T → (Ncount 0 T : ℝ) ≤ F T) -- wait Ncount counts zeros with T₁ < im ≤ T₂, ℕ-valued\n (hFform : F = fun T => ...) -- unknown exact form\n```\nI don't know F's exact form → can't write hFform. So state:\n\n```lean\ntheorem margin_tilde_convex (F : ℝ → ℝ) (hF : ContDiff ℝ 2 F)\n (hN : ∀ T : ℝ, (Ncount 0 T : ℝ) ≤ F T)\n (hblocks : ∀ T : ℝ, T ≥ Real.sqrt 20 + 1 → ψ F T < 0) :\n ConvexOn ℝ (Set.Ici 20) (marginTilde F) := sorry\n```\nThis is honest: \"for any smooth majorant F of N whose ψ-block is negative, the margin is convex\" — that's the D-057 mechanism exactly. marginTilde F defined with Ĉ₀, B̃₄, A=10.5, B₀=48, M₀=1.3352 explicit.\n\nHmm, but this is getting intricate to write correctly in Lean on the first pass without a compiler... The build will let me iterate. But I also must watch scope — the build itself may take an hour+. Let me write the skeletons at a slightly less ambitious but fully honest level:\n\nLiSkeleton.lean:\n- RHUpTo, LiVerifiedUpTo, liCoeff, lambda_pos_finite_height (sorry)\n- SInfty, sInfty_lower_bound (sorry)\n- marginTilde (explicit with Ĉ₀, B̃₄, constants; N via Ncount cast — note: statement uses the TRUE Ncount, matching D-037's B; convexity of the true margin is distributionally what D-057 proves via majorants; I'll state `margin_convex` for the closed-form marginTilde with Ncount replaced by parameter F with hypothesis) — implement the parameterized version.\n\nSuzukiSkeleton.lean:\n- Fskeleton (F function), suzukiW, R003_exact_factorization (sorry), Cor16 implication shape (sorry).\n\nValleySkeleton.lean:\n- K diagonal as parameter with variational characterization hypothesis; plateau upper bound + floor bounds + profile statements conditional on RiemannHypothesis (sorry).\n\nKeep each statement minimal-compilable. Write files now. Careful Lean 4 details:\n- `import Mathlib` — v4.33: `import Mathlib` works (root module). Slow but fine.\n- Zeta23 import: `import Zeta23.Statement` gives Zeta23.IsNontrivialZero etc. (namespace Zeta23).\n- RiemannHypothesis: in root namespace? Mathlib's is `RiemannHypothesis` (root). Statement.lean used it unqualified inside namespace Zeta23 — resolves to root. ✓\n- Ncount : Zeta23.Ncount (T₁ T₂ : ℝ) : ℕ.\n- tsum: `∑' x, f x` needs `open scoped Topology`? In Lean4 Mathlib, ∑' notation is in `Topology` scope? It's available via `open scoped Topology` or BigOperators? In recent Mathlib, ∑' is in scope `Topology`. Safer: `open scoped Topology BigOperators`. Hmm, actually tsum notation: `∑'` is defined in Mathlib.Topology.Algebra.InfiniteSum... with notation in `Topology` scope? I believe in current Mathlib the ∑' notation doesn't need open scoped (it's global). It used to require `open scoped BigOperators` — no, that's ∑ (finsum/finset). ∑' is global notation. I'll write `tsum` explicitly to be safe? `tsum (fun ρ => ...)` — unambiguous, no notation issues. Use tsum.\n- Real.eulerMascheroniConstant ✓ exists.\n- Odd m : ℕ — Mathlib `Odd`. Subtype {m : ℕ // Odd m ∧ 3 ≤ m} ✓.\n- Real.sqrt ✓. Real.log ✓. Complex.exp/sin: `Complex.exp`, `Complex.sin` ✓. I : ℂ is `Complex.I`.\n- division on ℂ ✓. Coercions (n : ℂ) from ℕ ✓.\n- ConvexOn: `ConvexOn ℝ s f` ✓ (root namespace).\n- deriv: `deriv f x` for ℝ→ℝ ✓. iterated: `deriv (deriv f) n`? deriv f : ℝ → ℝ ✓.\n- ContDiff ℝ 2 φ ✓.\n\nFor suzukiW integrals: `∫ x in -a..a, ...` interval integral notation needs `open scoped Interval`? The notation ∫ x in a..b is in Mathlib, scope `Interval`? It's available after `import Mathlib` without open I think (notation `∫ x in a..b, f x` is global since it uses `intervalIntegral`). Actually it's `∫ x in a..b, f x ∂μ` — plain version OK. To minimize risk, avoid integrals: state suzukiW via intervalIntegral.integral? Simpler: use `MeasureTheory.integral` over Set.Ioo? Overkill. Use the `∫ x in (-a)..a, f x` notation — I'm fairly confident it's available with `import Mathlib` (it's in `Mathlib.MeasureTheory.Integral.IntervalIntegral`, notation global). Risk acceptable; compiler will tell.\n\nF function: F(z) = z²ξ(½−iz)/ξ′(½−iz). ξ from completedRiemannZeta: Mathlib has `completedRiemannZeta : ℂ → ℂ`? I believe Mathlib has `Complex.completedRiemannZeta`? Actually the completed zeta in Mathlib: `completedRiemannZeta` and `completedRiemannZeta₀` in Mathlib.NumberTheory.LSeries.Hurwitz? or RiemannZeta. I recall `completedRiemannZeta s` exists (\"Λ(s)\"). And its derivative: deriv completedRiemannZeta. So:\n\n```lean\nnoncomputable def xiFun (s : ℂ) : ℂ := s * (s - 1) / 2 * completedRiemannZeta s\nnoncomputable def Ffun (z : ℂ) : ℂ :=\n let s := 1/2 - Complex.I * z\n z^2 * xiFun s / deriv xiFun s\n```\nIf completedRiemannZeta is inside namespace... I'll write `completedRiemannZeta` unqualified; if compile fails, adjust. It's root-level in Mathlib (pretty sure: `completedRiemannZeta` is declared at root in Mathlib.NumberTheory.LSeries.RiemannZeta? Hmm, might be `Complex.completedRiemannZeta`). To be safe, write `Complex.completedRiemannZeta`? If it's root, `Complex.completedRiemannZeta` fails. Grep the mathlib sources locally — we have the full mathlib checkout in zeta-23-lean/.lake/packages/mathlib! Grep for \"def completedRiemannZeta\".","signature":""},{"type":"text","text":"The Mathlib source is available locally — let me verify exact names before writing the skeletons."},{"type":"tool_use","id":"Bash_90","name":"Bash","input":{"command":"cd /d/Python/Quantum/zeta-23-lean/.lake/packages/mathlib && grep -rn \"def completedRiemannZeta \\|def RiemannHypothesis\" Mathlib/ | head -5; grep -rn \"eulerMascheroniConstant\" Mathlib/Analysis/SpecialFunctions/ 2>/dev/null | head -2; grep -rn \"noncomputable def completedRiemannZeta\" Mathlib/ | head -3","description":"Verify Mathlib declaration names"},"extra_content":null}]