The Mertens correction tail is at most : for
ProvedTaoFivePrimes.mertens_tail_upperWrite, for ,
the finite and the infinite Mertens correction sums (the second converges absolutely, and is the Meissel--Mertens constant). For every real this node asserts
It is the companion of the already-Proved TaoFivePrimes.mertens_tail_le_partial_sum, which is the opposite inequality . Read together they say the correction sum overshoots its limit by a nonnegative amount of size at most .
Why this is the missing piece. The Mawia reciprocal-prime estimates go through the exact identity . The lower half only needs , i.e. the node that already exists. The upper half needs bounded above, which nothing on the platform supplied. That asymmetry is the whole reason the upper halves are still open.
Proof (elementary; no PNT, no numerics, no external citation). Put . For the two standard logarithm inequalities
(Real.one_sub_inv_le_log_of_pos and Real.log_le_sub_one_of_pos) give on the one hand -- every correction term is nonpositive, so the partial sums decrease -- and on the other
Since telescopes, the tail over all integers above sums to exactly , and the prime-supported tail is dominated by it:
Remark on the constant (a factor of 2 is being left on the table). The sharp constant is . It follows from the second-order estimate , which after the substitution is the classical : the derivative of the difference is and both sides vanish at . That gives . Its formalisation needs a monotonicity/derivative argument, so this node states the derivative-free form, which is already sufficient for the intended applications.
Role / measured coverage. Combined with the already-Proved product bounds it closes the upper half of mawia_reciprocal_sum_upper_bound_small on : with the (3.29)-form node rosser_schoenfeld_product_log_bound_mid suffices for and the (4.10)-form node rosser_schoenfeld_product_bound_to_1e8 for . The residue is NOT covered: a sieve check shows the (4.10) form is too weak there (it fails already at and only recovers at ), and the (3.29) form is false below -- at it would require while the product is , which is why Rosser and Schoenfeld themselves state (3.29) only for .
import Mathlib
namespace TaoFivePrimes
theorem mertens_tail_upper (x : ℝ) (hx : 2 ≤ x) :
(∑ p ∈ Nat.primesLE ⌊x⌋₊, (Real.log (1 - 1 / (p : ℝ)) + 1 / (p : ℝ))) ≤
(∑' p : Nat.Primes, (Real.log (1 - 1 / (p : ℝ)) + 1 / (p : ℝ))) +
1 / (⌊x⌋₊ : ℝ) := by
sorry
end TaoFivePrimes