/teal-sea
teal-sea / zeta-labstate of record · compiled 28 Sep 2026 · revision e4945c4 · source

Library · hunts/r_3c1cbb/RESULTS-second.md

Hunt R-3C1CBB continuation results: Mertens's second theorem

1,044 words · 148 lines · source

Continuation run 05c755d3-1e75-4596-98b3-34ca2c084175, building on run ed50af7f (Hunt #30), which landed the first theorem and route-mapped the second. This run built exactly the block that route map named, and nothing else.

What compiles

One new file, lean/ZetaLean/MertensSecond.lean (351 lines), importing ZetaLean.Mertensstheorems, plus its import line in lean/ZetaLean.lean. It builds against the pinned Mathlib v4.33.0-rc2 with zero sorrys (grep -c sorry on the file: 0). No existing Lean file was edited.

The full-package build after adding the file printed:

✔ [8744/8745] Built ZetaLean (4.1s)
Build completed successfully (8745 jobs).

The targeted build of the new module alone printed:

✔ [2763/2763] Built ZetaLean.MertensSecond (19s)
Build completed successfully (2763 jobs).

The statement that landed

In namespace ZetaLean.Mertens, sums over Finset.Ioc 0 N filtered on Nat.Prime:

This is the second theorem in the log log x + O(1) form that the mission targeted, with an explicit constant. It is not the sharper log log x + M + o(1) form: the Mertens constant M is untouched, exactly as scoped. The constant 76 is explicit and far from optimal (Mertens's own error bound is below 4 for the classical argument); it inherits the deliberately slack log 4 + 16 band from mertens_first_theorem twice, each time through a factor 1/log 2 < 2, plus 1 + |log log 2| + 4·Σ 1/n² for the termwise comparison. A numerical spot check (sieve to 10^6): the true deviation |Σ 1/p − log log N| decreases toward the Mertens constant ≈ 0.2615 from ≈ 0.87 at N = 2, so the slack is a factor of roughly 88 against the worst case, all of it inherited from named local steps.

How the block was closed

The predecessor's route was followed as written, with one deviation worth recording:

  1. sum_inv_primes_eq: the discrete Abel identity Σ_{p ≤ N} 1/p = A(N)/log N + Σ_{n=2}^{N−1} A(n)(1/log n − 1/log(n+1)) with A(n) = Σ_{p ≤ n} log p / p. The deviation: rather than reindexing Mathlib's range-indexed Finset.sum_range_by_parts to Ioc/Icc (the predecessor's plan, estimated as the main labor), the identity is proved directly by induction from N = 2 using Finset.sum_Ioc_succ_top / Finset.sum_Ico_succ_top: the increment of both sides at N + 1 is 1/(N+1) when N + 1 is prime and 0 otherwise, one field_simp; ring per case. That killed the reindexing labor entirely.
  2. The drift band |A(n) − log n| ≤ log 4 + 16 is mertens_first_theorem from the predecessor's file, consumed as-is.
  3. The termwise comparison runs through the elementary bracket (v−u)/v ≤ log v − log u ≤ (v−u)/u (log_sub_log_le, sub_div_le_log_sub_log, from Real.log_le_sub_one_of_pos and Real.one_sub_inv_le_log_of_pos), applied at u = log n, v = log(n+1). The lower application telescopes to log log N − log log 2 exactly; the upper application overshoots by (log(n+1) − log n)²/(log n · log(n+1)) ≤ 4/n² (log_sub_log_le_mul_add, using log n ≥ log 2 > 1/2 via Real.log_two_gt_d9).
  4. The error sums close by telescoping (sum_Ico_telescope) and Mathlib's sum_Ioc_inv_sq_le_sub at k = 1 (sum_inv_sq_Ico_le_one, Σ_{n=2}^{N−1} 1/n² ≤ 1), exactly as the route predicted.
  5. Final assembly is interval arithmetic in linarith with Real.log_two_gt_d9 / log_two_lt_d9 discharging the numerics: |Σ 1/p − log log N| ≤ 1 + |log log 2| + 4 + 2(log 4 + 16)/log 2 < 76.

The route map's estimate was 150 to 250 lines; the block came in at 351 lines including doc comments, or about 300 lines of proof text, at the top of that band but inside one session as predicted. No new mathematics was needed, as predicted.

Mathlib declarations relied on

New to this file (the first theorem's inputs are listed in RESULTS.md):

Looked for and not needed after the route deviation: Finset.sum_range_by_parts (the reindexing it would have required was the predecessor's 150-to-250-line estimate; direct induction replaced it).

What was checked

Loose threads

Nothing here is evidence for or against RH.