Imports
/-
Copyright (c) 2026 Google LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
-/
module
public import Mathlib.NumberTheory.Harmonic.Defs
public import Cryptids.Semantics.Riemann.RegisterMachine
public import Mathlib.NumberTheory.Harmonic.Bounds
public import Mathlib.NumberTheory.Harmonic.Int
public import Mathlib.NumberTheory.Harmonic.EulerMascheroni
public import Mathlib.NumberTheory.Chebyshev
public import Mathlib.NumberTheory.LSeries.RiemannZeta
public import Cryptids.Semantics.Riemann.Schmidt
public import Cryptids.Semantics.Riemann.DigammaBinet
public import Cryptids.Semantics.Riemann.HorizontalBounds
public import Cryptids.Semantics.Riemann.WeightedStieltjes
public import Cryptids.Semantics.Riemann.VonMangoldtCount
public import Cryptids.Semantics.Riemann.ExplicitLarge
Part II: Number-Theoretic & Analytic Bridge for riemann_744
This file develops the number-theoretic and real-analytic bridge between the elementary
Matiyasevich–Aaronson counterexample predicate MatiyasevichRiemannCounterexample (computed by
riemann.nql) and Mathlib's RiemannHypothesis.
Mathematical Overview
For each integer $x > 253$ and $L_x = \operatorname{lcm}(1, \dots, x)$, the NQL program tests whether $$H_{L_x} > x \quad\text{and}\quad (H_{L_x} - x)^2 > x \cdot H_x^4.$$ We decompose the equivalence $$\left(\exists x : \mathbb{N},; \text{MatiyasevichRiemannCounterexample } x\right) \iff \neg \text{RiemannHypothesis}$$ into the following steps, proving all elementary, harmonic, Euler–Mascheroni, and Chebyshev-$\psi$ reductions completely in Lean 4 and isolating the classical complex-analytic number theory results of Schoenfeld (1976) and Schmidt (1903):
Rational and Real Reformulations:
matiyasevichRiemannCounterexample_iff_harmonic: equivalence with the $\mathbb{Q}$-inequality.
matiyasevichRiemannCounterexample_iff_real: equivalence with the $\mathbb{R}$-inequality.
matiyasevichRiemannCounterexample_iff_sqrt_lt: single real inequality
$253 < x ;\wedge; \sqrt{x} \cdot H_x^2 < H_{\operatorname{lcm}(1,\dots,x)} - x$.
matiyasevichRiemannCounterexample_iff_abs_and_sqrt_lt: formulation with
$|H_{\operatorname{lcm}(1,\dots,x)} - x| = H_{\operatorname{lcm}(1,\dots,x)} - x$.
Identity $\psi(x) = \log \operatorname{lcm}(1, \dots, x)$ and Positivity of lcmUpTo:
lcmUpTo_pos, one_le_lcmUpTo, dvd_lcmUpTo, self_le_lcmUpTo, lcmUpTo_mono.
psi_eq_log_lcmUpTo : Chebyshev.psi x = Real.log (lcmUpTo x) and
exp_psi_eq_lcmUpTo : Real.exp (Chebyshev.psi x) = lcmUpTo x.
Euler–Mascheroni & Harmonic-to-Chebyshev-$\psi$ Bounds:
$\psi(x) + \gamma < H_{\operatorname{lcm}(1,\dots,x)} \le \psi(x) + 1$
(psi_add_eulerMascheroniConstant_lt_harmonic_lcmUpTo, harmonic_lcmUpTo_le_psi_add_one).
$\log x \le H_x \le 1 + \log x$ and $(\log x)^2 \le H_x^2 \le (1 + \log x)^2$.
Elementary Reduction Between $\psi(x)$ Bounds and MatiyasevichRiemannCounterexample:
not_matiyasevichRiemannCounterexample_of_psi_sub_le: proves that Schoenfeld's explicit bound
$\psi(x) - x \le \frac{1}{8\pi}\sqrt{x}(\log x)^2$ implies
$\neg \text{MatiyasevichRiemannCounterexample } x$ (absorbing the $+1$ harmonic slack via
$\pi > 3$ and $x > 253$).
matiyasevichRiemannCounterexample_of_sqrt_mul_harmonic_sq_le_psi_sub and
matiyasevichRiemannCounterexample_of_sqrt_mul_one_add_log_sq_le_psi_sub: proves that a
sufficiently large positive excursion of $\psi(x) - x$ yields
MatiyasevichRiemannCounterexample x.
Classical Analytic Number Theory Ingredients (Schoenfeld 1976 & Schmidt 1903):
riemannHypothesis_imp_schoenfeld_psi_bound: under RiemannHypothesis,
$|\psi(x) - x| \le \frac{1}{8\pi} \sqrt{x} (\log x)^2$ for $x > 253$.
not_riemannHypothesis_imp_exists_psi_oscillation: under ¬ RiemannHypothesis,
there exists $x > 253$ with $\sqrt{x} H_x^2 \le \psi(x) - x + \gamma$.
@[expose] public sectionnamespace ConjectureMachines.Semantics.Riemann1. The Matiyasevich–Aaronson Elementary Counterexample Predicate
Over ℚ, harmNum n is n! * harmonic n.
theorem harmNum_eq_factorial_mul_harmonic (n : ℕ) :
(harmNum n : ℚ) = (n.factorial : ℚ) * harmonic n := n:ℕ⊢ ↑(harmNum n) = ↑n.factorial * harmonic n
induction n with
⊢ ↑(harmNum 0) = ↑(Nat.factorial 0) * harmonic 0 All goals completed! 🐙
n:ℕih:↑(harmNum n) = ↑n.factorial * harmonic n⊢ ↑(harmNum (n + 1)) = ↑(n + 1).factorial * harmonic (n + 1)
succ n:ℕih:↑(harmNum n) = ↑n.factorial * harmonic n⊢ ↑(harmNum n * (n + 1) + n.factorial) = ↑((n + 1) * n.factorial) * (harmonic n + (↑(n + 1))⁻¹)
push_cast succ n:ℕih:↑(harmNum n) = ↑n.factorial * harmonic n⊢ ↑(harmNum n) * (↑n + 1) + ↑n.factorial = (↑n + 1) * ↑n.factorial * (harmonic n + (↑n + 1)⁻¹)
rw [ih succ n:ℕih:↑(harmNum n) = ↑n.factorial * harmonic n⊢ ↑n.factorial * harmonic n * (↑n + 1) + ↑n.factorial = (↑n + 1) * ↑n.factorial * (harmonic n + (↑n + 1)⁻¹)] succ n:ℕih:↑(harmNum n) = ↑n.factorial * harmonic n⊢ ↑n.factorial * harmonic n * (↑n + 1) + ↑n.factorial = (↑n + 1) * ↑n.factorial * (harmonic n + (↑n + 1)⁻¹)
have hpos : (n + 1 : ℚ) ≠ 0 := by n:ℕ⊢ ↑(harmNum n) = ↑n.factorial * harmonic n positivity succ n:ℕih:↑(harmNum n) = ↑n.factorial * harmonic nhpos:↑n + 1 ≠ 0⊢ ↑n.factorial * harmonic n * (↑n + 1) + ↑n.factorial = (↑n + 1) * ↑n.factorial * (harmonic n + (↑n + 1)⁻¹)
linear_combination (n.factorial : ℚ) * (mul_inv_cancel₀ hpos).symm All goals completed! 🐙
Over ℚ, harmNum n / n! equals Mathlib's harmonic n.
theorem harmNum_div_factorial (n : ℕ) :
(harmNum n : ℚ) / (n.factorial : ℚ) = harmonic n := by n:ℕ⊢ ↑(harmNum n) / ↑n.factorial = harmonic n
rw [harmNum_eq_factorial_mul_harmonic, n:ℕ⊢ ↑n.factorial * harmonic n / ↑n.factorial = harmonic n mul_div_cancel_left₀ n:ℕ⊢ harmonic n = harmonic nha n:ℕ⊢ ↑n.factorial ≠ 0] ha n:ℕ⊢ ↑n.factorial ≠ 0
positivity All goals completed! 🐙
Equivalence between the integer cross-multiplied test in MatiyasevichRiemannCounterexample
and the rational harmonic number inequality $(H_{\operatorname{lcm}(1,\dots,x)} - x)^2 > x H_x^4$
with $H_{\operatorname{lcm}(1,\dots,x)} > x$.
theorem matiyasevichRiemannCounterexample_iff_harmonic (x : ℕ) :
MatiyasevichRiemannCounterexample x ↔
253 < x ∧
let lcm := (Finset.Icc 1 x).lcm id
(x : ℚ) < harmonic lcm ∧
(x : ℚ) * harmonic x ^ 4 < (harmonic lcm - x) ^ 2 := by x:ℕ⊢ MatiyasevichRiemannCounterexample x ↔
253 < x ∧
let lcm := (Finset.Icc 1 x).lcm id;
↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
unfold MatiyasevichRiemannCounterexample x:ℕ⊢ (253 < x ∧
have lcm := (Finset.Icc 1 x).lcm id;
have a := (harmNum lcm - lcm.factorial * x) ^ 2;
have b := lcm.factorial ^ 2;
have c := harmNum x ^ 4 * x;
have d := x.factorial ^ 4;
b * c < a * d) ↔
253 < x ∧
let lcm := (Finset.Icc 1 x).lcm id;
↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
dsimp only x:ℕ⊢ 253 < x ∧
((Finset.Icc 1 x).lcm id).factorial ^ 2 * (harmNum x ^ 4 * x) <
(harmNum ((Finset.Icc 1 x).lcm id) - ((Finset.Icc 1 x).lcm id).factorial * x) ^ 2 * x.factorial ^ 4 ↔
253 < x ∧
↑x < harmonic ((Finset.Icc 1 x).lcm id) ∧ ↑x * harmonic x ^ 4 < (harmonic ((Finset.Icc 1 x).lcm id) - ↑x) ^ 2
set lcm := (Finset.Icc 1 x).lcm id x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm id⊢ 253 < x ∧ lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4 ↔
253 < x ∧ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
have hlcm_fac_pos : (0 : ℚ) < lcm.factorial := by x:ℕ⊢ MatiyasevichRiemannCounterexample x ↔
253 < x ∧
let lcm := (Finset.Icc 1 x).lcm id;
↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2 positivity x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorial⊢ 253 < x ∧ lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4 ↔
253 < x ∧ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
have hx_fac_pos : (0 : ℚ) < x.factorial := by x:ℕ⊢ MatiyasevichRiemannCounterexample x ↔
253 < x ∧
let lcm := (Finset.Icc 1 x).lcm id;
↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2 positivity x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorial⊢ 253 < x ∧ lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4 ↔
253 < x ∧ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
have hden_pos : (0 : ℚ) < (lcm.factorial : ℚ) ^ 2 * (x.factorial : ℚ) ^ 4 := by x:ℕ⊢ MatiyasevichRiemannCounterexample x ↔
253 < x ∧
let lcm := (Finset.Icc 1 x).lcm id;
↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2 positivity x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4⊢ 253 < x ∧ lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4 ↔
253 < x ∧ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
constructor mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4⊢ 253 < x ∧ lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4 →
253 < x ∧ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2mpr x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4⊢ 253 < x ∧ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2 →
253 < x ∧ lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4
· mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4⊢ 253 < x ∧ lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4 →
253 < x ∧ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2 rintro ⟨hx, hlt⟩ mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4⊢ 253 < x ∧ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
refine ⟨hx, ?_⟩ mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4⊢ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
have hsub_pos : lcm.factorial * x < harmNum lcm := by x:ℕ⊢ MatiyasevichRiemannCounterexample x ↔
253 < x ∧
let lcm := (Finset.Icc 1 x).lcm id;
↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
by_contra hle x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hle:¬lcm.factorial * x < harmNum lcm⊢ False
rw [not_lt, x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hle:harmNum lcm ≤ lcm.factorial * x⊢ False ← Nat.sub_eq_zero_iff_le x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hle:harmNum lcm - lcm.factorial * x = 0⊢ False] at hle x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hle:harmNum lcm - lcm.factorial * x = 0⊢ False
simp [hle] at hlt mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcm⊢ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
have hlt_q :
((lcm.factorial ^ 2 * (harmNum x ^ 4 * x) : ℕ) : ℚ) <
(((harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4 : ℕ) : ℚ) := by x:ℕ⊢ MatiyasevichRiemannCounterexample x ↔
253 < x ∧
let lcm := (Finset.Icc 1 x).lcm id;
↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
exact_mod_cast hlt mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑(lcm.factorial ^ 2 * (harmNum x ^ 4 * x)) < ↑((harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4)⊢ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
rw [Nat.cast_mul, mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑(lcm.factorial ^ 2) * ↑(harmNum x ^ 4 * x) < ↑((harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4)⊢ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2 Nat.cast_pow, mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * ↑(harmNum x ^ 4 * x) < ↑((harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4)⊢ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2 Nat.cast_mul, mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * (↑(harmNum x ^ 4) * ↑x) < ↑((harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4)⊢ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2 Nat.cast_pow, mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * (↑(harmNum x) ^ 4 * ↑x) < ↑((harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4)⊢ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2 Nat.cast_mul, mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * (↑(harmNum x) ^ 4 * ↑x) < ↑((harmNum lcm - lcm.factorial * x) ^ 2) * ↑(x.factorial ^ 4)⊢ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2 Nat.cast_pow, mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * (↑(harmNum x) ^ 4 * ↑x) < ↑(harmNum lcm - lcm.factorial * x) ^ 2 * ↑(x.factorial ^ 4)⊢ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
Nat.cast_sub (le_of_lt hsub_pos), mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * (↑(harmNum x) ^ 4 * ↑x) < (↑(harmNum lcm) - ↑(lcm.factorial * x)) ^ 2 * ↑(x.factorial ^ 4)⊢ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2 Nat.cast_mul, mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * (↑(harmNum x) ^ 4 * ↑x) < (↑(harmNum lcm) - ↑lcm.factorial * ↑x) ^ 2 * ↑(x.factorial ^ 4)⊢ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2 Nat.cast_pow mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * (↑(harmNum x) ^ 4 * ↑x) < (↑(harmNum lcm) - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4⊢ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2] at hlt_q mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * (↑(harmNum x) ^ 4 * ↑x) < (↑(harmNum lcm) - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4⊢ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
rw [harmNum_eq_factorial_mul_harmonic lcm, mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * (↑(harmNum x) ^ 4 * ↑x) <
(↑lcm.factorial * harmonic lcm - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4⊢ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2 harmNum_eq_factorial_mul_harmonic x mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * ((↑x.factorial * harmonic x) ^ 4 * ↑x) <
(↑lcm.factorial * harmonic lcm - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4⊢ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2] at hlt_q mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * ((↑x.factorial * harmonic x) ^ 4 * ↑x) <
(↑lcm.factorial * harmonic lcm - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4⊢ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
have hsub_q : (lcm.factorial : ℚ) * (x : ℚ) < (lcm.factorial : ℚ) * harmonic lcm := by x:ℕ⊢ MatiyasevichRiemannCounterexample x ↔
253 < x ∧
let lcm := (Finset.Icc 1 x).lcm id;
↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
rw [← harmNum_eq_factorial_mul_harmonic lcm x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * ((↑x.factorial * harmonic x) ^ 4 * ↑x) <
(↑lcm.factorial * harmonic lcm - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4⊢ ↑lcm.factorial * ↑x < ↑(harmNum lcm)] x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * ((↑x.factorial * harmonic x) ^ 4 * ↑x) <
(↑lcm.factorial * harmonic lcm - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4⊢ ↑lcm.factorial * ↑x < ↑(harmNum lcm)
exact_mod_cast hsub_pos mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * ((↑x.factorial * harmonic x) ^ 4 * ↑x) <
(↑lcm.factorial * harmonic lcm - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4hsub_q:↑lcm.factorial * ↑x < ↑lcm.factorial * harmonic lcm⊢ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
refine ⟨lt_of_mul_lt_mul_left hsub_q (le_of_lt hlcm_fac_pos), ?_⟩ mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * ((↑x.factorial * harmonic x) ^ 4 * ↑x) <
(↑lcm.factorial * harmonic lcm - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4hsub_q:↑lcm.factorial * ↑x < ↑lcm.factorial * harmonic lcm⊢ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
have hring1 :
(lcm.factorial : ℚ) ^ 2 * (((x.factorial : ℚ) * harmonic x) ^ 4 * (x : ℚ)) =
((lcm.factorial : ℚ) ^ 2 * (x.factorial : ℚ) ^ 4) * ((x : ℚ) * harmonic x ^ 4) := by x:ℕ⊢ MatiyasevichRiemannCounterexample x ↔
253 < x ∧
let lcm := (Finset.Icc 1 x).lcm id;
↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
ring mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * ((↑x.factorial * harmonic x) ^ 4 * ↑x) <
(↑lcm.factorial * harmonic lcm - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4hsub_q:↑lcm.factorial * ↑x < ↑lcm.factorial * harmonic lcmhring1:↑lcm.factorial ^ 2 * ((↑x.factorial * harmonic x) ^ 4 * ↑x) =
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4)⊢ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
have hring2 :
((lcm.factorial : ℚ) * harmonic lcm - (lcm.factorial : ℚ) * (x : ℚ)) ^ 2 *
(x.factorial : ℚ) ^ 4 =
((lcm.factorial : ℚ) ^ 2 * (x.factorial : ℚ) ^ 4) * (harmonic lcm - (x : ℚ)) ^ 2 := by x:ℕ⊢ MatiyasevichRiemannCounterexample x ↔
253 < x ∧
let lcm := (Finset.Icc 1 x).lcm id;
↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
ring mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * ((↑x.factorial * harmonic x) ^ 4 * ↑x) <
(↑lcm.factorial * harmonic lcm - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4hsub_q:↑lcm.factorial * ↑x < ↑lcm.factorial * harmonic lcmhring1:↑lcm.factorial ^ 2 * ((↑x.factorial * harmonic x) ^ 4 * ↑x) =
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4)hring2:(↑lcm.factorial * harmonic lcm - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4 =
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2⊢ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
rw [hring1, mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4) <
(↑lcm.factorial * harmonic lcm - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4hsub_q:↑lcm.factorial * ↑x < ↑lcm.factorial * harmonic lcmhring1:↑lcm.factorial ^ 2 * ((↑x.factorial * harmonic x) ^ 4 * ↑x) =
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4)hring2:(↑lcm.factorial * harmonic lcm - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4 =
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2⊢ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2 hring2 mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4) <
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2hsub_q:↑lcm.factorial * ↑x < ↑lcm.factorial * harmonic lcmhring1:↑lcm.factorial ^ 2 * ((↑x.factorial * harmonic x) ^ 4 * ↑x) =
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4)hring2:(↑lcm.factorial * harmonic lcm - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4 =
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2⊢ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2] at hlt_q mp x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhlt:lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4hsub_pos:lcm.factorial * x < harmNum lcmhlt_q:↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4) <
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2hsub_q:↑lcm.factorial * ↑x < ↑lcm.factorial * harmonic lcmhring1:↑lcm.factorial ^ 2 * ((↑x.factorial * harmonic x) ^ 4 * ↑x) =
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4)hring2:(↑lcm.factorial * harmonic lcm - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4 =
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2⊢ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
exact lt_of_mul_lt_mul_left hlt_q (le_of_lt hden_pos) All goals completed! 🐙
· mpr x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4⊢ 253 < x ∧ ↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2 →
253 < x ∧ lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4 rintro ⟨hx, hxlcm, hineq⟩ mpr x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2⊢ 253 < x ∧ lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4
refine ⟨hx, ?_⟩ mpr x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2⊢ lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4
have hsub_q : (lcm.factorial : ℚ) * (x : ℚ) < (harmNum lcm : ℚ) := by x:ℕ⊢ MatiyasevichRiemannCounterexample x ↔
253 < x ∧
let lcm := (Finset.Icc 1 x).lcm id;
↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
rw [harmNum_eq_factorial_mul_harmonic lcm x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2⊢ ↑lcm.factorial * ↑x < ↑lcm.factorial * harmonic lcm] x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2⊢ ↑lcm.factorial * ↑x < ↑lcm.factorial * harmonic lcm
exact mul_lt_mul_of_pos_left hxlcm hlcm_fac_pos mpr x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2hsub_q:↑lcm.factorial * ↑x < ↑(harmNum lcm)⊢ lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4
have hsub_nat : lcm.factorial * x ≤ harmNum lcm := by x:ℕ⊢ MatiyasevichRiemannCounterexample x ↔
253 < x ∧
let lcm := (Finset.Icc 1 x).lcm id;
↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
exact_mod_cast le_of_lt hsub_q mpr x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2hsub_q:↑lcm.factorial * ↑x < ↑(harmNum lcm)hsub_nat:lcm.factorial * x ≤ harmNum lcm⊢ lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4
have hmul_q :
((lcm.factorial : ℚ) ^ 2 * (x.factorial : ℚ) ^ 4) * ((x : ℚ) * harmonic x ^ 4) <
((lcm.factorial : ℚ) ^ 2 * (x.factorial : ℚ) ^ 4) * (harmonic lcm - (x : ℚ)) ^ 2 :=
mul_lt_mul_of_pos_left hineq hden_pos mpr x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2hsub_q:↑lcm.factorial * ↑x < ↑(harmNum lcm)hsub_nat:lcm.factorial * x ≤ harmNum lcmhmul_q:↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4) <
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2⊢ lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4
have hlt_q :
((lcm.factorial ^ 2 * (harmNum x ^ 4 * x) : ℕ) : ℚ) <
(((harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4 : ℕ) : ℚ) := by x:ℕ⊢ MatiyasevichRiemannCounterexample x ↔
253 < x ∧
let lcm := (Finset.Icc 1 x).lcm id;
↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2
rw [Nat.cast_mul, x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2hsub_q:↑lcm.factorial * ↑x < ↑(harmNum lcm)hsub_nat:lcm.factorial * x ≤ harmNum lcmhmul_q:↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4) <
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2⊢ ↑(lcm.factorial ^ 2) * ↑(harmNum x ^ 4 * x) < ↑((harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4) Nat.cast_pow, x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2hsub_q:↑lcm.factorial * ↑x < ↑(harmNum lcm)hsub_nat:lcm.factorial * x ≤ harmNum lcmhmul_q:↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4) <
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2⊢ ↑lcm.factorial ^ 2 * ↑(harmNum x ^ 4 * x) < ↑((harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4) Nat.cast_mul, x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2hsub_q:↑lcm.factorial * ↑x < ↑(harmNum lcm)hsub_nat:lcm.factorial * x ≤ harmNum lcmhmul_q:↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4) <
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2⊢ ↑lcm.factorial ^ 2 * (↑(harmNum x ^ 4) * ↑x) < ↑((harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4) Nat.cast_pow, x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2hsub_q:↑lcm.factorial * ↑x < ↑(harmNum lcm)hsub_nat:lcm.factorial * x ≤ harmNum lcmhmul_q:↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4) <
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2⊢ ↑lcm.factorial ^ 2 * (↑(harmNum x) ^ 4 * ↑x) < ↑((harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4) Nat.cast_mul, x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2hsub_q:↑lcm.factorial * ↑x < ↑(harmNum lcm)hsub_nat:lcm.factorial * x ≤ harmNum lcmhmul_q:↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4) <
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2⊢ ↑lcm.factorial ^ 2 * (↑(harmNum x) ^ 4 * ↑x) < ↑((harmNum lcm - lcm.factorial * x) ^ 2) * ↑(x.factorial ^ 4) Nat.cast_pow, x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2hsub_q:↑lcm.factorial * ↑x < ↑(harmNum lcm)hsub_nat:lcm.factorial * x ≤ harmNum lcmhmul_q:↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4) <
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2⊢ ↑lcm.factorial ^ 2 * (↑(harmNum x) ^ 4 * ↑x) < ↑(harmNum lcm - lcm.factorial * x) ^ 2 * ↑(x.factorial ^ 4)
Nat.cast_sub hsub_nat, x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2hsub_q:↑lcm.factorial * ↑x < ↑(harmNum lcm)hsub_nat:lcm.factorial * x ≤ harmNum lcmhmul_q:↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4) <
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2⊢ ↑lcm.factorial ^ 2 * (↑(harmNum x) ^ 4 * ↑x) < (↑(harmNum lcm) - ↑(lcm.factorial * x)) ^ 2 * ↑(x.factorial ^ 4) Nat.cast_mul, x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2hsub_q:↑lcm.factorial * ↑x < ↑(harmNum lcm)hsub_nat:lcm.factorial * x ≤ harmNum lcmhmul_q:↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4) <
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2⊢ ↑lcm.factorial ^ 2 * (↑(harmNum x) ^ 4 * ↑x) < (↑(harmNum lcm) - ↑lcm.factorial * ↑x) ^ 2 * ↑(x.factorial ^ 4) Nat.cast_pow, x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2hsub_q:↑lcm.factorial * ↑x < ↑(harmNum lcm)hsub_nat:lcm.factorial * x ≤ harmNum lcmhmul_q:↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4) <
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2⊢ ↑lcm.factorial ^ 2 * (↑(harmNum x) ^ 4 * ↑x) < (↑(harmNum lcm) - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4
harmNum_eq_factorial_mul_harmonic lcm, x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2hsub_q:↑lcm.factorial * ↑x < ↑(harmNum lcm)hsub_nat:lcm.factorial * x ≤ harmNum lcmhmul_q:↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4) <
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2⊢ ↑lcm.factorial ^ 2 * (↑(harmNum x) ^ 4 * ↑x) <
(↑lcm.factorial * harmonic lcm - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4 harmNum_eq_factorial_mul_harmonic x x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2hsub_q:↑lcm.factorial * ↑x < ↑(harmNum lcm)hsub_nat:lcm.factorial * x ≤ harmNum lcmhmul_q:↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4) <
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2⊢ ↑lcm.factorial ^ 2 * ((↑x.factorial * harmonic x) ^ 4 * ↑x) <
(↑lcm.factorial * harmonic lcm - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4] x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2hsub_q:↑lcm.factorial * ↑x < ↑(harmNum lcm)hsub_nat:lcm.factorial * x ≤ harmNum lcmhmul_q:↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4) <
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2⊢ ↑lcm.factorial ^ 2 * ((↑x.factorial * harmonic x) ^ 4 * ↑x) <
(↑lcm.factorial * harmonic lcm - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4
calc
(lcm.factorial : ℚ) ^ 2 * (((x.factorial : ℚ) * harmonic x) ^ 4 * (x : ℚ))
= ((lcm.factorial : ℚ) ^ 2 * (x.factorial : ℚ) ^ 4) * ((x : ℚ) * harmonic x ^ 4) := by x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2hsub_q:↑lcm.factorial * ↑x < ↑(harmNum lcm)hsub_nat:lcm.factorial * x ≤ harmNum lcmhmul_q:↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4) <
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2⊢ ↑lcm.factorial ^ 2 * ((↑x.factorial * harmonic x) ^ 4 * ↑x) =
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4)
ring All goals completed! 🐙
_ < ((lcm.factorial : ℚ) ^ 2 * (x.factorial : ℚ) ^ 4) * (harmonic lcm - (x : ℚ)) ^ 2 :=
hmul_q
_ = ((lcm.factorial : ℚ) * harmonic lcm - (lcm.factorial : ℚ) * (x : ℚ)) ^ 2 *
(x.factorial : ℚ) ^ 4 := by x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2hsub_q:↑lcm.factorial * ↑x < ↑(harmNum lcm)hsub_nat:lcm.factorial * x ≤ harmNum lcmhmul_q:↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4) <
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2⊢ ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2 =
(↑lcm.factorial * harmonic lcm - ↑lcm.factorial * ↑x) ^ 2 * ↑x.factorial ^ 4
ring mpr x:ℕlcm:ℕ := (Finset.Icc 1 x).lcm idhlcm_fac_pos:0 < ↑lcm.factorialhx_fac_pos:0 < ↑x.factorialhden_pos:0 < ↑lcm.factorial ^ 2 * ↑x.factorial ^ 4hx:253 < xhxlcm:↑x < harmonic lcmhineq:↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2hsub_q:↑lcm.factorial * ↑x < ↑(harmNum lcm)hsub_nat:lcm.factorial * x ≤ harmNum lcmhmul_q:↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (↑x * harmonic x ^ 4) <
↑lcm.factorial ^ 2 * ↑x.factorial ^ 4 * (harmonic lcm - ↑x) ^ 2hlt_q:↑(lcm.factorial ^ 2 * (harmNum x ^ 4 * x)) < ↑((harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4)⊢ lcm.factorial ^ 2 * (harmNum x ^ 4 * x) < (harmNum lcm - lcm.factorial * x) ^ 2 * x.factorial ^ 4
exact_mod_cast hlt_q All goals completed! 🐙
2. Least Common Multiple lcmUpTo x and Chebyshev's $\psi(x)$
@[simp]
theorem lcmUpTo_eq_lcmUpto (x : ℕ) : lcmUpTo x = Nat.lcmUpto x := rfl@[simp]
theorem lcmUpTo_one : lcmUpTo 1 = 1 := rfltheorem lcmUpTo_ne_zero (x : ℕ) : lcmUpTo x ≠ 0 :=
Nat.lcmUpto_ne_zero xtheorem one_le_lcmUpTo (x : ℕ) : 1 ≤ lcmUpTo x :=
Nat.succ_le_of_lt (lcmUpTo_pos x)theorem dvd_lcmUpTo {x k : ℕ} (hk1 : 1 ≤ k) (hkx : k ≤ x) : k ∣ lcmUpTo x :=
Finset.dvd_lcm (Finset.mem_Icc.mpr ⟨hk1, hkx⟩)theorem self_le_lcmUpTo {x : ℕ} (hx : 1 ≤ x) : x ≤ lcmUpTo x :=
Nat.le_of_dvd (lcmUpTo_pos x) (dvd_lcmUpTo hx le_rfl)theorem lcmUpTo_dvd_of_le {x y : ℕ} (hxy : x ≤ y) : lcmUpTo x ∣ lcmUpTo y :=
Finset.lcm_dvd fun _ hk => Finset.dvd_lcm (Finset.Icc_subset_Icc_right hxy hk)theorem lcmUpTo_mono : Monotone lcmUpTo :=
fun _ _ hxy => Nat.le_of_dvd (lcmUpTo_pos _) (lcmUpTo_dvd_of_le hxy)theorem lcmUpTo_dvd_factorial (x : ℕ) : lcmUpTo x ∣ x.factorial :=
Nat.lcmUpto_dvd_factorial xtheorem two_pow_le_mul_lcmUpTo (x : ℕ) : 2 ^ x ≤ (x + 1) * lcmUpTo x :=
Chebyshev.two_pow_le_mul_lcmUpto xChebyshev's $\psi(x) = \sum_{n \le x} \Lambda(n)$ equals $\log \operatorname{lcm}(1, \dots, x)$ for every natural number $x$.
theorem psi_eq_log_lcmUpTo (x : ℕ) : Chebyshev.psi x = Real.log (lcmUpTo x) :=
Chebyshev.psi_eq_log_lcmUpto xExponentiating Chebyshev's $\psi(x)$ recovers $\operatorname{lcm}(1, \dots, x)$.
theorem exp_psi_eq_lcmUpTo (x : ℕ) : Real.exp (Chebyshev.psi x) = lcmUpTo x := by x:ℕ⊢ Real.exp (Chebyshev.psi ↑x) = ↑(lcmUpTo x)
rw [psi_eq_log_lcmUpTo, x:ℕ⊢ Real.exp (Real.log ↑(lcmUpTo x)) = ↑(lcmUpTo x) Real.exp_log (by x:ℕ⊢ 0 < ↑(lcmUpTo x) exact_mod_cast lcmUpTo_pos x All goals completed! 🐙)] All goals completed! 🐙3. Positivity and Monotonicity of Harmonic Numbers & Real-Analytic Reformulations
theorem harmonic_nonneg (n : ℕ) : (0 : ℚ) ≤ harmonic n := by n:ℕ⊢ 0 ≤ harmonic n
unfold harmonic n:ℕ⊢ 0 ≤ ∑ i ∈ Finset.range n, (↑(i + 1))⁻¹
positivity All goals completed! 🐙theorem harmonic_mono : Monotone harmonic := by ⊢ Monotone harmonic
refine monotone_nat_of_le_succ fun n => ?_ n:ℕ⊢ harmonic n ≤ harmonic (n + 1)
rw [harmonic_succ n:ℕ⊢ harmonic n ≤ harmonic n + (↑(n + 1))⁻¹] n:ℕ⊢ harmonic n ≤ harmonic n + (↑(n + 1))⁻¹
have : (0 : ℚ) ≤ ((n + 1 : ℕ) : ℚ)⁻¹ := by ⊢ Monotone harmonic positivity n:ℕthis:0 ≤ (↑(n + 1))⁻¹⊢ harmonic n ≤ harmonic n + (↑(n + 1))⁻¹
linarith All goals completed! 🐙@[simp]
theorem harmonic_one : harmonic 1 = 1 := by ⊢ harmonic 1 = 1
simp [harmonic] All goals completed! 🐙theorem one_le_harmonic {n : ℕ} (hn : 1 ≤ n) : (1 : ℚ) ≤ harmonic n := by n:ℕhn:1 ≤ n⊢ 1 ≤ harmonic n
simpa using harmonic_mono hn All goals completed! 🐙theorem one_le_harmonic_real {n : ℕ} (hn : 1 ≤ n) : (1 : ℝ) ≤ (harmonic n : ℝ) := by n:ℕhn:1 ≤ n⊢ 1 ≤ ↑(harmonic n)
exact_mod_cast one_le_harmonic hn All goals completed! 🐙theorem harmonic_real_nonneg (n : ℕ) : (0 : ℝ) ≤ (harmonic n : ℝ) := by n:ℕ⊢ 0 ≤ ↑(harmonic n)
exact_mod_cast harmonic_nonneg n All goals completed! 🐙
Real-analytic reformulation of MatiyasevichRiemannCounterexample x over ℝ.
theorem matiyasevichRiemannCounterexample_iff_real (x : ℕ) :
MatiyasevichRiemannCounterexample x ↔
253 < x ∧
(x : ℝ) < (harmonic (lcmUpTo x) : ℝ) ∧
(x : ℝ) * (harmonic x : ℝ) ^ 4 < ((harmonic (lcmUpTo x) : ℝ) - x) ^ 2 := by x:ℕ⊢ MatiyasevichRiemannCounterexample x ↔
253 < x ∧ ↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2
rw [matiyasevichRiemannCounterexample_iff_harmonic x:ℕ⊢ (253 < x ∧
have lcm := (Finset.Icc 1 x).lcm id;
↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2) ↔
253 < x ∧ ↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2] x:ℕ⊢ (253 < x ∧
have lcm := (Finset.Icc 1 x).lcm id;
↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2) ↔
253 < x ∧ ↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2
refine and_congr_right fun _ => ?_ x:ℕx✝:253 < x⊢ (have lcm := (Finset.Icc 1 x).lcm id;
↑x < harmonic lcm ∧ ↑x * harmonic x ^ 4 < (harmonic lcm - ↑x) ^ 2) ↔
↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2
dsimp only x:ℕx✝:253 < x⊢ ↑x < harmonic ((Finset.Icc 1 x).lcm id) ∧ ↑x * harmonic x ^ 4 < (harmonic ((Finset.Icc 1 x).lcm id) - ↑x) ^ 2 ↔
↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2
constructor mp x:ℕx✝:253 < x⊢ ↑x < harmonic ((Finset.Icc 1 x).lcm id) ∧ ↑x * harmonic x ^ 4 < (harmonic ((Finset.Icc 1 x).lcm id) - ↑x) ^ 2 →
↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2mpr x:ℕx✝:253 < x⊢ ↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2 →
↑x < harmonic ((Finset.Icc 1 x).lcm id) ∧ ↑x * harmonic x ^ 4 < (harmonic ((Finset.Icc 1 x).lcm id) - ↑x) ^ 2
· mp x:ℕx✝:253 < x⊢ ↑x < harmonic ((Finset.Icc 1 x).lcm id) ∧ ↑x * harmonic x ^ 4 < (harmonic ((Finset.Icc 1 x).lcm id) - ↑x) ^ 2 →
↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2 rintro ⟨h1, h2⟩ mp x:ℕx✝:253 < xh1:↑x < harmonic ((Finset.Icc 1 x).lcm id)h2:↑x * harmonic x ^ 4 < (harmonic ((Finset.Icc 1 x).lcm id) - ↑x) ^ 2⊢ ↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2
refine ⟨by x:ℕx✝:253 < xh1:↑x < harmonic ((Finset.Icc 1 x).lcm id)h2:↑x * harmonic x ^ 4 < (harmonic ((Finset.Icc 1 x).lcm id) - ↑x) ^ 2⊢ ↑x < ↑(harmonic (lcmUpTo x)) exact_mod_cast h1 All goals completed! 🐙, ?_⟩
exact_mod_cast h2 All goals completed! 🐙
· mpr x:ℕx✝:253 < x⊢ ↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2 →
↑x < harmonic ((Finset.Icc 1 x).lcm id) ∧ ↑x * harmonic x ^ 4 < (harmonic ((Finset.Icc 1 x).lcm id) - ↑x) ^ 2 rintro ⟨h1, h2⟩ mpr x:ℕx✝:253 < xh1:↑x < ↑(harmonic (lcmUpTo x))h2:↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2⊢ ↑x < harmonic ((Finset.Icc 1 x).lcm id) ∧ ↑x * harmonic x ^ 4 < (harmonic ((Finset.Icc 1 x).lcm id) - ↑x) ^ 2
refine ⟨by x:ℕx✝:253 < xh1:↑x < ↑(harmonic (lcmUpTo x))h2:↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2⊢ ↑x < harmonic ((Finset.Icc 1 x).lcm id) exact_mod_cast h1 All goals completed! 🐙, ?_⟩
exact_mod_cast h2 All goals completed! 🐙
Single-inequality real reformulation of MatiyasevichRiemannCounterexample x:
for $x > 253$, the cross-multiplied test holds if and only if
$$\sqrt{x} \cdot H_x^2 < H_{\operatorname{lcm}(1, \dots, x)} - x.$$
theorem matiyasevichRiemannCounterexample_iff_sqrt_lt (x : ℕ) :
MatiyasevichRiemannCounterexample x ↔
253 < x ∧
Real.sqrt x * (harmonic x : ℝ) ^ 2 < (harmonic (lcmUpTo x) : ℝ) - x := by x:ℕ⊢ MatiyasevichRiemannCounterexample x ↔ 253 < x ∧ √↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x
rw [matiyasevichRiemannCounterexample_iff_real x:ℕ⊢ 253 < x ∧ ↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2 ↔
253 < x ∧ √↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x] x:ℕ⊢ 253 < x ∧ ↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2 ↔
253 < x ∧ √↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x
refine and_congr_right fun _ => ?_ x:ℕx✝:253 < x⊢ ↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2 ↔
√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x
have hx_nonneg : (0 : ℝ) ≤ x := by x:ℕ⊢ MatiyasevichRiemannCounterexample x ↔ 253 < x ∧ √↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x positivity x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑x⊢ ↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2 ↔
√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x
have hlhs_nonneg : 0 ≤ Real.sqrt x * (harmonic x : ℝ) ^ 2 := by x:ℕ⊢ MatiyasevichRiemannCounterexample x ↔ 253 < x ∧ √↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x positivity x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑xhlhs_nonneg:0 ≤ √↑x * ↑(harmonic x) ^ 2⊢ ↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2 ↔
√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x
have hsq : (Real.sqrt x * (harmonic x : ℝ) ^ 2) ^ 2 = (x : ℝ) * (harmonic x : ℝ) ^ 4 := by x:ℕ⊢ MatiyasevichRiemannCounterexample x ↔ 253 < x ∧ √↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x
calc
(Real.sqrt x * (harmonic x : ℝ) ^ 2) ^ 2
= Real.sqrt x ^ 2 * ((harmonic x : ℝ) ^ 2) ^ 2 := by x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑xhlhs_nonneg:0 ≤ √↑x * ↑(harmonic x) ^ 2⊢ (√↑x * ↑(harmonic x) ^ 2) ^ 2 = √↑x ^ 2 * (↑(harmonic x) ^ 2) ^ 2 ring All goals completed! 🐙
_ = (x : ℝ) * (harmonic x : ℝ) ^ 4 := by x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑xhlhs_nonneg:0 ≤ √↑x * ↑(harmonic x) ^ 2⊢ √↑x ^ 2 * (↑(harmonic x) ^ 2) ^ 2 = ↑x * ↑(harmonic x) ^ 4
rw [Real.sq_sqrt hx_nonneg x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑xhlhs_nonneg:0 ≤ √↑x * ↑(harmonic x) ^ 2⊢ ↑x * (↑(harmonic x) ^ 2) ^ 2 = ↑x * ↑(harmonic x) ^ 4] x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑xhlhs_nonneg:0 ≤ √↑x * ↑(harmonic x) ^ 2⊢ ↑x * (↑(harmonic x) ^ 2) ^ 2 = ↑x * ↑(harmonic x) ^ 4
ring x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑xhlhs_nonneg:0 ≤ √↑x * ↑(harmonic x) ^ 2hsq:(√↑x * ↑(harmonic x) ^ 2) ^ 2 = ↑x * ↑(harmonic x) ^ 4⊢ ↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2 ↔
√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x
constructor mp x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑xhlhs_nonneg:0 ≤ √↑x * ↑(harmonic x) ^ 2hsq:(√↑x * ↑(harmonic x) ^ 2) ^ 2 = ↑x * ↑(harmonic x) ^ 4⊢ ↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2 →
√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑xmpr x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑xhlhs_nonneg:0 ≤ √↑x * ↑(harmonic x) ^ 2hsq:(√↑x * ↑(harmonic x) ^ 2) ^ 2 = ↑x * ↑(harmonic x) ^ 4⊢ √↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x →
↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2
· mp x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑xhlhs_nonneg:0 ≤ √↑x * ↑(harmonic x) ^ 2hsq:(√↑x * ↑(harmonic x) ^ 2) ^ 2 = ↑x * ↑(harmonic x) ^ 4⊢ ↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2 →
√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x rintro ⟨hxlcm, hineq⟩ mp x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑xhlhs_nonneg:0 ≤ √↑x * ↑(harmonic x) ^ 2hsq:(√↑x * ↑(harmonic x) ^ 2) ^ 2 = ↑x * ↑(harmonic x) ^ 4hxlcm:↑x < ↑(harmonic (lcmUpTo x))hineq:↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2⊢ √↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x
have hrhs_pos : 0 < (harmonic (lcmUpTo x) : ℝ) - x := sub_pos.mpr hxlcm mp x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑xhlhs_nonneg:0 ≤ √↑x * ↑(harmonic x) ^ 2hsq:(√↑x * ↑(harmonic x) ^ 2) ^ 2 = ↑x * ↑(harmonic x) ^ 4hxlcm:↑x < ↑(harmonic (lcmUpTo x))hineq:↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2hrhs_pos:0 < ↑(harmonic (lcmUpTo x)) - ↑x⊢ √↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x
rw [← hsq mp x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑xhlhs_nonneg:0 ≤ √↑x * ↑(harmonic x) ^ 2hsq:(√↑x * ↑(harmonic x) ^ 2) ^ 2 = ↑x * ↑(harmonic x) ^ 4hxlcm:↑x < ↑(harmonic (lcmUpTo x))hineq:(√↑x * ↑(harmonic x) ^ 2) ^ 2 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2hrhs_pos:0 < ↑(harmonic (lcmUpTo x)) - ↑x⊢ √↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x] at hineq mp x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑xhlhs_nonneg:0 ≤ √↑x * ↑(harmonic x) ^ 2hsq:(√↑x * ↑(harmonic x) ^ 2) ^ 2 = ↑x * ↑(harmonic x) ^ 4hxlcm:↑x < ↑(harmonic (lcmUpTo x))hineq:(√↑x * ↑(harmonic x) ^ 2) ^ 2 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2hrhs_pos:0 < ↑(harmonic (lcmUpTo x)) - ↑x⊢ √↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x
exact lt_of_pow_lt_pow_left₀ 2 hrhs_pos.le hineq All goals completed! 🐙
· mpr x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑xhlhs_nonneg:0 ≤ √↑x * ↑(harmonic x) ^ 2hsq:(√↑x * ↑(harmonic x) ^ 2) ^ 2 = ↑x * ↑(harmonic x) ^ 4⊢ √↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x →
↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2 intro hlt mpr x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑xhlhs_nonneg:0 ≤ √↑x * ↑(harmonic x) ^ 2hsq:(√↑x * ↑(harmonic x) ^ 2) ^ 2 = ↑x * ↑(harmonic x) ^ 4hlt:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x⊢ ↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2
have hrhs_pos : 0 < (harmonic (lcmUpTo x) : ℝ) - x := lt_of_le_of_lt hlhs_nonneg hlt mpr x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑xhlhs_nonneg:0 ≤ √↑x * ↑(harmonic x) ^ 2hsq:(√↑x * ↑(harmonic x) ^ 2) ^ 2 = ↑x * ↑(harmonic x) ^ 4hlt:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑xhrhs_pos:0 < ↑(harmonic (lcmUpTo x)) - ↑x⊢ ↑x < ↑(harmonic (lcmUpTo x)) ∧ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2
refine ⟨sub_pos.mp hrhs_pos, ?_⟩ mpr x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑xhlhs_nonneg:0 ≤ √↑x * ↑(harmonic x) ^ 2hsq:(√↑x * ↑(harmonic x) ^ 2) ^ 2 = ↑x * ↑(harmonic x) ^ 4hlt:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑xhrhs_pos:0 < ↑(harmonic (lcmUpTo x)) - ↑x⊢ ↑x * ↑(harmonic x) ^ 4 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2
rw [← hsq mpr x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑xhlhs_nonneg:0 ≤ √↑x * ↑(harmonic x) ^ 2hsq:(√↑x * ↑(harmonic x) ^ 2) ^ 2 = ↑x * ↑(harmonic x) ^ 4hlt:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑xhrhs_pos:0 < ↑(harmonic (lcmUpTo x)) - ↑x⊢ (√↑x * ↑(harmonic x) ^ 2) ^ 2 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2] mpr x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑xhlhs_nonneg:0 ≤ √↑x * ↑(harmonic x) ^ 2hsq:(√↑x * ↑(harmonic x) ^ 2) ^ 2 = ↑x * ↑(harmonic x) ^ 4hlt:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑xhrhs_pos:0 < ↑(harmonic (lcmUpTo x)) - ↑x⊢ (√↑x * ↑(harmonic x) ^ 2) ^ 2 < (↑(harmonic (lcmUpTo x)) - ↑x) ^ 2
exact pow_lt_pow_left₀ hlt hlhs_nonneg (by x:ℕx✝:253 < xhx_nonneg:0 ≤ ↑xhlhs_nonneg:0 ≤ √↑x * ↑(harmonic x) ^ 2hsq:(√↑x * ↑(harmonic x) ^ 2) ^ 2 = ↑x * ↑(harmonic x) ^ 4hlt:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑xhrhs_pos:0 < ↑(harmonic (lcmUpTo x)) - ↑x⊢ 2 ≠ 0 decide All goals completed! 🐙)
Formulation of MatiyasevichRiemannCounterexample x making explicit that
$H_{\operatorname{lcm}(1,\dots,x)} - x$ is positive and exceeds $\sqrt{x} H_x^2$.
theorem matiyasevichRiemannCounterexample_iff_abs_and_sqrt_lt (x : ℕ) :
MatiyasevichRiemannCounterexample x ↔
253 < x ∧
|(harmonic (lcmUpTo x) : ℝ) - x| = (harmonic (lcmUpTo x) : ℝ) - x ∧
Real.sqrt x * (harmonic x : ℝ) ^ 2 < (harmonic (lcmUpTo x) : ℝ) - x := by x:ℕ⊢ MatiyasevichRiemannCounterexample x ↔
253 < x ∧
|↑(harmonic (lcmUpTo x)) - ↑x| = ↑(harmonic (lcmUpTo x)) - ↑x ∧
√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x
rw [matiyasevichRiemannCounterexample_iff_sqrt_lt x:ℕ⊢ 253 < x ∧ √↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x ↔
253 < x ∧
|↑(harmonic (lcmUpTo x)) - ↑x| = ↑(harmonic (lcmUpTo x)) - ↑x ∧
√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x] x:ℕ⊢ 253 < x ∧ √↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x ↔
253 < x ∧
|↑(harmonic (lcmUpTo x)) - ↑x| = ↑(harmonic (lcmUpTo x)) - ↑x ∧
√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x
refine and_congr_right fun _ => ⟨fun h => ⟨abs_of_pos ?_, h⟩, fun h => h.2⟩ x:ℕx✝:253 < xh:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x⊢ 0 < ↑(harmonic (lcmUpTo x)) - ↑x
exact lt_of_le_of_lt (by x:ℕx✝:253 < xh:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x⊢ 0 ≤ √↑x * ↑(harmonic x) ^ 2 positivity All goals completed! 🐙) h4. Euler–Mascheroni and Harmonic-to-Logarithm Bounds
For every $n \ge 1$, $\log n + \gamma < H_n$.
theorem log_add_eulerMascheroniConstant_lt_harmonic {n : ℕ} (hn : n ≠ 0) :
Real.log n + Real.eulerMascheroniConstant < (harmonic n : ℝ) := by n:ℕhn:n ≠ 0⊢ Real.log ↑n + Real.eulerMascheroniConstant < ↑(harmonic n)
have h := Real.eulerMascheroniConstant_lt_eulerMascheroniSeq' n n:ℕhn:n ≠ 0h:Real.eulerMascheroniConstant < Real.eulerMascheroniSeq' n⊢ Real.log ↑n + Real.eulerMascheroniConstant < ↑(harmonic n)
simp only [Real.eulerMascheroniSeq', hn, ↓reduceIte] at h n:ℕhn:n ≠ 0h:Real.eulerMascheroniConstant < ↑(harmonic n) - Real.log ↑n⊢ Real.log ↑n + Real.eulerMascheroniConstant < ↑(harmonic n)
linarith All goals completed! 🐙For every $n \in \mathbb{N}$, $H_n < \log(n + 1) + \gamma$.
theorem harmonic_lt_log_add_one_add_eulerMascheroniConstant (n : ℕ) :
(harmonic n : ℝ) < Real.log (n + 1) + Real.eulerMascheroniConstant := by n:ℕ⊢ ↑(harmonic n) < Real.log (↑n + 1) + Real.eulerMascheroniConstant
have h := Real.eulerMascheroniSeq_lt_eulerMascheroniConstant n n:ℕh:Real.eulerMascheroniSeq n < Real.eulerMascheroniConstant⊢ ↑(harmonic n) < Real.log (↑n + 1) + Real.eulerMascheroniConstant
unfold Real.eulerMascheroniSeq at h n:ℕh:↑(harmonic n) - Real.log (↑n + 1) < Real.eulerMascheroniConstant⊢ ↑(harmonic n) < Real.log (↑n + 1) + Real.eulerMascheroniConstant
linarith All goals completed! 🐙For every $n \ge 6$, $H_n < \log n + 2 / 3$.
theorem harmonic_lt_log_add_two_thirds {n : ℕ} (hn : 6 ≤ n) :
(harmonic n : ℝ) < Real.log n + 2 / 3 := by n:ℕhn:6 ≤ n⊢ ↑(harmonic n) < Real.log ↑n + 2 / 3
have hn0 : n ≠ 0 := by omega n:ℕhn:6 ≤ nhn0:n ≠ 0⊢ ↑(harmonic n) < Real.log ↑n + 2 / 3
have h1 : Real.eulerMascheroniSeq' n < 2 / 3 :=
(Real.strictAnti_eulerMascheroniSeq'.antitone hn).trans_lt
Real.eulerMascheroniSeq'_six_lt_two_thirds n:ℕhn:6 ≤ nhn0:n ≠ 0h1:Real.eulerMascheroniSeq' n < 2 / 3⊢ ↑(harmonic n) < Real.log ↑n + 2 / 3
simp only [Real.eulerMascheroniSeq', hn0, ↓reduceIte] at h1 n:ℕhn:6 ≤ nhn0:n ≠ 0h1:↑(harmonic n) - Real.log ↑n < 2 / 3⊢ ↑(harmonic n) < Real.log ↑n + 2 / 3
linarith All goals completed! 🐙Lower bound connecting $H_{\operatorname{lcm}(1,\dots,x)}$ to Chebyshev's $\psi(x)$: $$\psi(x) + \gamma < H_{\operatorname{lcm}(1,\dots,x)}.$$
theorem psi_add_eulerMascheroniConstant_lt_harmonic_lcmUpTo (x : ℕ) :
Chebyshev.psi x + Real.eulerMascheroniConstant < (harmonic (lcmUpTo x) : ℝ) := by x:ℕ⊢ Chebyshev.psi ↑x + Real.eulerMascheroniConstant < ↑(harmonic (lcmUpTo x))
rw [psi_eq_log_lcmUpTo x:ℕ⊢ Real.log ↑(lcmUpTo x) + Real.eulerMascheroniConstant < ↑(harmonic (lcmUpTo x))] x:ℕ⊢ Real.log ↑(lcmUpTo x) + Real.eulerMascheroniConstant < ↑(harmonic (lcmUpTo x))
exact log_add_eulerMascheroniConstant_lt_harmonic (lcmUpTo_ne_zero x) All goals completed! 🐙Since $\gamma > 1/2 > 0$, Chebyshev's $\psi(x)$ is strictly bounded above by $H_{\operatorname{lcm}(1,\dots,x)} - 1/2$, so $\psi(x) < H_{\operatorname{lcm}(1,\dots,x)}$.
theorem psi_add_one_half_lt_harmonic_lcmUpTo (x : ℕ) :
Chebyshev.psi x + 1 / 2 < (harmonic (lcmUpTo x) : ℝ) := by x:ℕ⊢ Chebyshev.psi ↑x + 1 / 2 < ↑(harmonic (lcmUpTo x))
linarith [psi_add_eulerMascheroniConstant_lt_harmonic_lcmUpTo x,
Real.one_half_lt_eulerMascheroniConstant] All goals completed! 🐙theorem psi_lt_harmonic_lcmUpTo (x : ℕ) :
Chebyshev.psi x < (harmonic (lcmUpTo x) : ℝ) := by x:ℕ⊢ Chebyshev.psi ↑x < ↑(harmonic (lcmUpTo x))
linarith [psi_add_one_half_lt_harmonic_lcmUpTo x] All goals completed! 🐙Upper bound connecting $H_{\operatorname{lcm}(1,\dots,x)}$ to Chebyshev's $\psi(x)$: $$H_{\operatorname{lcm}(1,\dots,x)} \le \psi(x) + 1.$$
theorem harmonic_lcmUpTo_le_psi_add_one (x : ℕ) :
(harmonic (lcmUpTo x) : ℝ) ≤ Chebyshev.psi x + 1 := by x:ℕ⊢ ↑(harmonic (lcmUpTo x)) ≤ Chebyshev.psi ↑x + 1
rw [psi_eq_log_lcmUpTo, x:ℕ⊢ ↑(harmonic (lcmUpTo x)) ≤ Real.log ↑(lcmUpTo x) + 1 add_comm x:ℕ⊢ ↑(harmonic (lcmUpTo x)) ≤ 1 + Real.log ↑(lcmUpTo x)] x:ℕ⊢ ↑(harmonic (lcmUpTo x)) ≤ 1 + Real.log ↑(lcmUpTo x)
exact harmonic_le_one_add_log (lcmUpTo x) All goals completed! 🐙Sharper upper bound for $x \ge 6$: $$H_{\operatorname{lcm}(1,\dots,x)} < \psi(x) + \frac{2}{3}.$$
theorem harmonic_lcmUpTo_lt_psi_add_two_thirds {x : ℕ} (hx : 6 ≤ x) :
(harmonic (lcmUpTo x) : ℝ) < Chebyshev.psi x + 2 / 3 := by x:ℕhx:6 ≤ x⊢ ↑(harmonic (lcmUpTo x)) < Chebyshev.psi ↑x + 2 / 3
rw [psi_eq_log_lcmUpTo x:ℕhx:6 ≤ x⊢ ↑(harmonic (lcmUpTo x)) < Real.log ↑(lcmUpTo x) + 2 / 3] x:ℕhx:6 ≤ x⊢ ↑(harmonic (lcmUpTo x)) < Real.log ↑(lcmUpTo x) + 2 / 3
have h6 : 6 ≤ lcmUpTo x := hx.trans (self_le_lcmUpTo (by x:ℕhx:6 ≤ x⊢ 1 ≤ x omega All goals completed! 🐙)) x:ℕhx:6 ≤ xh6:6 ≤ lcmUpTo x⊢ ↑(harmonic (lcmUpTo x)) < Real.log ↑(lcmUpTo x) + 2 / 3
exact harmonic_lt_log_add_two_thirds h6 All goals completed! 🐙For every natural number $x$, $\log x \le H_x$.
theorem log_le_harmonic (x : ℕ) : Real.log x ≤ (harmonic x : ℝ) := by x:ℕ⊢ Real.log ↑x ≤ ↑(harmonic x)
rcases eq_or_ne x 0 with rfl | hx inl ⊢ Real.log ↑0 ≤ ↑(harmonic 0)inr x:ℕhx:x ≠ 0⊢ Real.log ↑x ≤ ↑(harmonic x)
· inl ⊢ Real.log ↑0 ≤ ↑(harmonic 0) simp All goals completed! 🐙
· inr x:ℕhx:x ≠ 0⊢ Real.log ↑x ≤ ↑(harmonic x) have hx_pos : (0 : ℝ) < x := by positivity inr x:ℕhx:x ≠ 0hx_pos:0 < ↑x⊢ Real.log ↑x ≤ ↑(harmonic x)
have h1 : Real.log x ≤ Real.log (x + 1 : ℕ) := by
push_cast x:ℕhx:x ≠ 0hx_pos:0 < ↑x⊢ Real.log ↑x ≤ Real.log (↑x + 1)
exact Real.log_le_log hx_pos (by x:ℕhx:x ≠ 0hx_pos:0 < ↑x⊢ ↑x ≤ ↑x + 1 linarith All goals completed! 🐙) inr x:ℕhx:x ≠ 0hx_pos:0 < ↑xh1:Real.log ↑x ≤ Real.log ↑(x + 1)⊢ Real.log ↑x ≤ ↑(harmonic x)
exact h1.trans (log_add_one_le_harmonic x) All goals completed! 🐙theorem log_sq_le_harmonic_sq (x : ℕ) :
(Real.log x) ^ 2 ≤ (harmonic x : ℝ) ^ 2 := by x:ℕ⊢ Real.log ↑x ^ 2 ≤ ↑(harmonic x) ^ 2
have hlog : 0 ≤ Real.log x := Real.log_natCast_nonneg x x:ℕhlog:0 ≤ Real.log ↑x⊢ Real.log ↑x ^ 2 ≤ ↑(harmonic x) ^ 2
exact pow_le_pow_left₀ hlog (log_le_harmonic x) 2 All goals completed! 🐙theorem harmonic_sq_le_one_add_log_sq (x : ℕ) :
(harmonic x : ℝ) ^ 2 ≤ (1 + Real.log x) ^ 2 := by x:ℕ⊢ ↑(harmonic x) ^ 2 ≤ (1 + Real.log ↑x) ^ 2
exact pow_le_pow_left₀ (harmonic_real_nonneg x) (harmonic_le_one_add_log x) 2 All goals completed! 🐙
5. Elementary Reductions Between $\psi(x)$ Inequalities and MatiyasevichRiemannCounterexample
Upper bound Real.log 4 - 1 ≤ 3863 / 10000 from Real.log_two_lt_d9.
theorem log_four_sub_one_le : Real.log 4 - 1 ≤ 3863 / 10000 := by ⊢ Real.log 4 - 1 ≤ 3863 / 10000
have h4 : (4 : ℝ) = 2 ^ 2 := by norm_num h4:4 = 2 ^ 2⊢ Real.log 4 - 1 ≤ 3863 / 10000
rw [h4, h4:4 = 2 ^ 2⊢ Real.log (2 ^ 2) - 1 ≤ 3863 / 10000 Real.log_pow, h4:4 = 2 ^ 2⊢ ↑2 * Real.log 2 - 1 ≤ 3863 / 10000 Nat.cast_ofNat h4:4 = 2 ^ 2⊢ 2 * Real.log 2 - 1 ≤ 3863 / 10000] h4:4 = 2 ^ 2⊢ 2 * Real.log 2 - 1 ≤ 3863 / 10000
linarith [Real.log_two_lt_d9] All goals completed! 🐙
Upper bound 1 - Real.log 2 ≤ 3863 / 10000 from Real.log_two_gt_d9.
theorem one_sub_log_two_le : 1 - Real.log 2 ≤ 3863 / 10000 := by ⊢ 1 - Real.log 2 ≤ 3863 / 10000
linarith [Real.log_two_gt_d9] All goals completed! 🐙
For all y ≥ 254, 519 / 100 ≤ Real.log y (since 254 ^ 2 = 64516 ≥ 32768 = 2 ^ 15).
theorem log_ge_of_ge_254 {y : ℝ} (hy : 254 ≤ y) : 519 / 100 ≤ Real.log y := by y:ℝhy:254 ≤ y⊢ 519 / 100 ≤ Real.log y
have hy_pos : 0 < y := by linarith y:ℝhy:254 ≤ yhy_pos:0 < y⊢ 519 / 100 ≤ Real.log y
have h_pow : (2 : ℝ) ^ 15 ≤ y ^ 2 := by nlinarith y:ℝhy:254 ≤ yhy_pos:0 < yh_pow:2 ^ 15 ≤ y ^ 2⊢ 519 / 100 ≤ Real.log y
have h_log : Real.log ((2 : ℝ) ^ 15) ≤ Real.log (y ^ 2) :=
Real.log_le_log (by y:ℝhy:254 ≤ yhy_pos:0 < yh_pow:2 ^ 15 ≤ y ^ 2⊢ 0 < 2 ^ 15 positivity All goals completed! 🐙) h_pow y:ℝhy:254 ≤ yhy_pos:0 < yh_pow:2 ^ 15 ≤ y ^ 2h_log:Real.log (2 ^ 15) ≤ Real.log (y ^ 2)⊢ 519 / 100 ≤ Real.log y
rw [Real.log_pow, y:ℝhy:254 ≤ yhy_pos:0 < yh_pow:2 ^ 15 ≤ y ^ 2h_log:↑15 * Real.log 2 ≤ Real.log (y ^ 2)⊢ 519 / 100 ≤ Real.log y Real.log_pow, y:ℝhy:254 ≤ yhy_pos:0 < yh_pow:2 ^ 15 ≤ y ^ 2h_log:↑15 * Real.log 2 ≤ ↑2 * Real.log y⊢ 519 / 100 ≤ Real.log y Nat.cast_ofNat, y:ℝhy:254 ≤ yhy_pos:0 < yh_pow:2 ^ 15 ≤ y ^ 2h_log:15 * Real.log 2 ≤ ↑2 * Real.log y⊢ 519 / 100 ≤ Real.log y Nat.cast_ofNat y:ℝhy:254 ≤ yhy_pos:0 < yh_pow:2 ^ 15 ≤ y ^ 2h_log:15 * Real.log 2 ≤ 2 * Real.log y⊢ 519 / 100 ≤ Real.log y] at h_log y:ℝhy:254 ≤ yhy_pos:0 < yh_pow:2 ^ 15 ≤ y ^ 2h_log:15 * Real.log 2 ≤ 2 * Real.log y⊢ 519 / 100 ≤ Real.log y
linarith [Real.log_two_gt_d9] All goals completed! 🐙
For all y ≥ 900, 623 / 100 ≤ Real.log y (since 900 ≥ 512 = 2 ^ 9).
theorem log_ge_of_ge_900 {y : ℝ} (hy : 900 ≤ y) : 623 / 100 ≤ Real.log y := by y:ℝhy:900 ≤ y⊢ 623 / 100 ≤ Real.log y
have h_pow : (2 : ℝ) ^ 9 ≤ y := by linarith y:ℝhy:900 ≤ yh_pow:2 ^ 9 ≤ y⊢ 623 / 100 ≤ Real.log y
have h_log : Real.log ((2 : ℝ) ^ 9) ≤ Real.log y :=
Real.log_le_log (by y:ℝhy:900 ≤ yh_pow:2 ^ 9 ≤ y⊢ 0 < 2 ^ 9 positivity All goals completed! 🐙) h_pow y:ℝhy:900 ≤ yh_pow:2 ^ 9 ≤ yh_log:Real.log (2 ^ 9) ≤ Real.log y⊢ 623 / 100 ≤ Real.log y
rw [Real.log_pow, y:ℝhy:900 ≤ yh_pow:2 ^ 9 ≤ yh_log:↑9 * Real.log 2 ≤ Real.log y⊢ 623 / 100 ≤ Real.log y Nat.cast_ofNat y:ℝhy:900 ≤ yh_pow:2 ^ 9 ≤ yh_log:9 * Real.log 2 ≤ Real.log y⊢ 623 / 100 ≤ Real.log y] at h_log y:ℝhy:900 ≤ yh_pow:2 ^ 9 ≤ yh_log:9 * Real.log 2 ≤ Real.log y⊢ 623 / 100 ≤ Real.log y
linarith [Real.log_two_gt_d9] All goals completed! 🐙
For all y ≥ 2500, 762 / 100 ≤ Real.log y (since 2500 ≥ 2048 = 2 ^ 11).
theorem log_ge_of_ge_2500 {y : ℝ} (hy : 2500 ≤ y) : 762 / 100 ≤ Real.log y := by y:ℝhy:2500 ≤ y⊢ 762 / 100 ≤ Real.log y
have h_pow : (2 : ℝ) ^ 11 ≤ y := by linarith y:ℝhy:2500 ≤ yh_pow:2 ^ 11 ≤ y⊢ 762 / 100 ≤ Real.log y
have h_log : Real.log ((2 : ℝ) ^ 11) ≤ Real.log y :=
Real.log_le_log (by y:ℝhy:2500 ≤ yh_pow:2 ^ 11 ≤ y⊢ 0 < 2 ^ 11 positivity All goals completed! 🐙) h_pow y:ℝhy:2500 ≤ yh_pow:2 ^ 11 ≤ yh_log:Real.log (2 ^ 11) ≤ Real.log y⊢ 762 / 100 ≤ Real.log y
rw [Real.log_pow, y:ℝhy:2500 ≤ yh_pow:2 ^ 11 ≤ yh_log:↑11 * Real.log 2 ≤ Real.log y⊢ 762 / 100 ≤ Real.log y Nat.cast_ofNat y:ℝhy:2500 ≤ yh_pow:2 ^ 11 ≤ yh_log:11 * Real.log 2 ≤ Real.log y⊢ 762 / 100 ≤ Real.log y] at h_log y:ℝhy:2500 ≤ yh_pow:2 ^ 11 ≤ yh_log:11 * Real.log 2 ≤ Real.log y⊢ 762 / 100 ≤ Real.log y
linarith [Real.log_two_gt_d9] All goals completed! 🐙
Monotonicity of t ↦ (7 / 8) * t ^ 2 - 2 * t = t * ((7 / 8) * t - 2) for t ≥ c ≥ 16 / 7.
theorem seven_eighths_sq_sub_two_mul_ge {c t : ℝ} (hc : 16 / 7 ≤ c) (hct : c ≤ t) :
c * ((7 / 8 : ℝ) * c - 2) ≤ (7 / 8 : ℝ) * t ^ 2 - 2 * t := by c:ℝt:ℝhc:16 / 7 ≤ chct:c ≤ t⊢ c * (7 / 8 * c - 2) ≤ 7 / 8 * t ^ 2 - 2 * t
have h_eq : (7 / 8 : ℝ) * t ^ 2 - 2 * t = t * ((7 / 8 : ℝ) * t - 2) := by ring c:ℝt:ℝhc:16 / 7 ≤ chct:c ≤ th_eq:7 / 8 * t ^ 2 - 2 * t = t * (7 / 8 * t - 2)⊢ c * (7 / 8 * c - 2) ≤ 7 / 8 * t ^ 2 - 2 * t
rw [h_eq c:ℝt:ℝhc:16 / 7 ≤ chct:c ≤ th_eq:7 / 8 * t ^ 2 - 2 * t = t * (7 / 8 * t - 2)⊢ c * (7 / 8 * c - 2) ≤ t * (7 / 8 * t - 2)] c:ℝt:ℝhc:16 / 7 ≤ chct:c ≤ th_eq:7 / 8 * t ^ 2 - 2 * t = t * (7 / 8 * t - 2)⊢ c * (7 / 8 * c - 2) ≤ t * (7 / 8 * t - 2)
exact mul_le_mul hct (by c:ℝt:ℝhc:16 / 7 ≤ chct:c ≤ th_eq:7 / 8 * t ^ 2 - 2 * t = t * (7 / 8 * t - 2)⊢ 7 / 8 * c - 2 ≤ 7 / 8 * t - 2 linarith All goals completed! 🐙) (by c:ℝt:ℝhc:16 / 7 ≤ chct:c ≤ th_eq:7 / 8 * t ^ 2 - 2 * t = t * (7 / 8 * t - 2)⊢ 0 ≤ 7 / 8 * c - 2 linarith All goals completed! 🐙) (by c:ℝt:ℝhc:16 / 7 ≤ chct:c ≤ th_eq:7 / 8 * t ^ 2 - 2 * t = t * (7 / 8 * t - 2)⊢ 0 ≤ t linarith All goals completed! 🐙)
For all y ∈ [254, 6000],
(3863 / 10000) * Real.sqrt y + 2 * Real.log y ≤ (7 / 8) * (Real.log y) ^ 2.
theorem chebyshev_factor_le_seven_eighths_log_sq {y : ℝ} (hy_low : 254 ≤ y) (hy_high : y ≤ 6000) :
(3863 / 10000 : ℝ) * Real.sqrt y + 2 * Real.log y ≤ (7 / 8 : ℝ) * (Real.log y) ^ 2 := by y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000⊢ 3863 / 10000 * √y + 2 * Real.log y ≤ 7 / 8 * Real.log y ^ 2
rcases le_total y 900 with hy900 | hy900 inl y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:y ≤ 900⊢ 3863 / 10000 * √y + 2 * Real.log y ≤ 7 / 8 * Real.log y ^ 2inr y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:900 ≤ y⊢ 3863 / 10000 * √y + 2 * Real.log y ≤ 7 / 8 * Real.log y ^ 2
· inl y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:y ≤ 900⊢ 3863 / 10000 * √y + 2 * Real.log y ≤ 7 / 8 * Real.log y ^ 2 have h_sqrt : Real.sqrt y ≤ 30 := by
rw [Real.sqrt_le_left (by y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:y ≤ 900⊢ 0 ≤ 30 norm_num All goals completed! 🐙)] y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:y ≤ 900⊢ y ≤ 30 ^ 2
linarith inl y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:y ≤ 900h_sqrt:√y ≤ 30⊢ 3863 / 10000 * √y + 2 * Real.log y ≤ 7 / 8 * Real.log y ^ 2
have h_log : 519 / 100 ≤ Real.log y := log_ge_of_ge_254 hy_low inl y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:y ≤ 900h_sqrt:√y ≤ 30h_log:519 / 100 ≤ Real.log y⊢ 3863 / 10000 * √y + 2 * Real.log y ≤ 7 / 8 * Real.log y ^ 2
have h_quad := seven_eighths_sq_sub_two_mul_ge (by y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:y ≤ 900h_sqrt:√y ≤ 30h_log:519 / 100 ≤ Real.log y⊢ 16 / 7 ≤ 519 / 100 norm_num All goals completed! 🐙 : (16 / 7 : ℝ) ≤ 519 / 100) h_log inl y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:y ≤ 900h_sqrt:√y ≤ 30h_log:519 / 100 ≤ Real.log yh_quad:519 / 100 * (7 / 8 * (519 / 100) - 2) ≤ 7 / 8 * Real.log y ^ 2 - 2 * Real.log y⊢ 3863 / 10000 * √y + 2 * Real.log y ≤ 7 / 8 * Real.log y ^ 2
linarith All goals completed! 🐙
· inr y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:900 ≤ y⊢ 3863 / 10000 * √y + 2 * Real.log y ≤ 7 / 8 * Real.log y ^ 2 rcases le_total y 2500 with hy2500 | hy2500 inr.inl y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:900 ≤ yhy2500:y ≤ 2500⊢ 3863 / 10000 * √y + 2 * Real.log y ≤ 7 / 8 * Real.log y ^ 2inr.inr y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:900 ≤ yhy2500:2500 ≤ y⊢ 3863 / 10000 * √y + 2 * Real.log y ≤ 7 / 8 * Real.log y ^ 2
· inr.inl y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:900 ≤ yhy2500:y ≤ 2500⊢ 3863 / 10000 * √y + 2 * Real.log y ≤ 7 / 8 * Real.log y ^ 2 have h_sqrt : Real.sqrt y ≤ 50 := by
rw [Real.sqrt_le_left (by y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:900 ≤ yhy2500:y ≤ 2500⊢ 0 ≤ 50 norm_num All goals completed! 🐙)] y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:900 ≤ yhy2500:y ≤ 2500⊢ y ≤ 50 ^ 2
linarith inr.inl y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:900 ≤ yhy2500:y ≤ 2500h_sqrt:√y ≤ 50⊢ 3863 / 10000 * √y + 2 * Real.log y ≤ 7 / 8 * Real.log y ^ 2
have h_log : 623 / 100 ≤ Real.log y := log_ge_of_ge_900 hy900 inr.inl y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:900 ≤ yhy2500:y ≤ 2500h_sqrt:√y ≤ 50h_log:623 / 100 ≤ Real.log y⊢ 3863 / 10000 * √y + 2 * Real.log y ≤ 7 / 8 * Real.log y ^ 2
have h_quad := seven_eighths_sq_sub_two_mul_ge (by y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:900 ≤ yhy2500:y ≤ 2500h_sqrt:√y ≤ 50h_log:623 / 100 ≤ Real.log y⊢ 16 / 7 ≤ 623 / 100 norm_num All goals completed! 🐙 : (16 / 7 : ℝ) ≤ 623 / 100) h_log inr.inl y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:900 ≤ yhy2500:y ≤ 2500h_sqrt:√y ≤ 50h_log:623 / 100 ≤ Real.log yh_quad:623 / 100 * (7 / 8 * (623 / 100) - 2) ≤ 7 / 8 * Real.log y ^ 2 - 2 * Real.log y⊢ 3863 / 10000 * √y + 2 * Real.log y ≤ 7 / 8 * Real.log y ^ 2
linarith All goals completed! 🐙
· inr.inr y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:900 ≤ yhy2500:2500 ≤ y⊢ 3863 / 10000 * √y + 2 * Real.log y ≤ 7 / 8 * Real.log y ^ 2 have h_sqrt : Real.sqrt y ≤ 78 := by
rw [Real.sqrt_le_left (by y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:900 ≤ yhy2500:2500 ≤ y⊢ 0 ≤ 78 norm_num All goals completed! 🐙)] y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:900 ≤ yhy2500:2500 ≤ y⊢ y ≤ 78 ^ 2
linarith inr.inr y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:900 ≤ yhy2500:2500 ≤ yh_sqrt:√y ≤ 78⊢ 3863 / 10000 * √y + 2 * Real.log y ≤ 7 / 8 * Real.log y ^ 2
have h_log : 762 / 100 ≤ Real.log y := log_ge_of_ge_2500 hy2500 inr.inr y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:900 ≤ yhy2500:2500 ≤ yh_sqrt:√y ≤ 78h_log:762 / 100 ≤ Real.log y⊢ 3863 / 10000 * √y + 2 * Real.log y ≤ 7 / 8 * Real.log y ^ 2
have h_quad := seven_eighths_sq_sub_two_mul_ge (by y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:900 ≤ yhy2500:2500 ≤ yh_sqrt:√y ≤ 78h_log:762 / 100 ≤ Real.log y⊢ 16 / 7 ≤ 762 / 100 norm_num All goals completed! 🐙 : (16 / 7 : ℝ) ≤ 762 / 100) h_log inr.inr y:ℝhy_low:254 ≤ yhy_high:y ≤ 6000hy900:900 ≤ yhy2500:2500 ≤ yh_sqrt:√y ≤ 78h_log:762 / 100 ≤ Real.log yh_quad:762 / 100 * (7 / 8 * (762 / 100) - 2) ≤ 7 / 8 * Real.log y ^ 2 - 2 * Real.log y⊢ 3863 / 10000 * √y + 2 * Real.log y ≤ 7 / 8 * Real.log y ^ 2
linarith All goals completed! 🐙
From Chebyshev.psi_le and Chebyshev.psi_ge, for all x ≥ 254,
|Chebyshev.psi x - x| ≤ Real.sqrt x * ((3863 / 10000) * Real.sqrt x + 2 * Real.log x).
theorem abs_psi_sub_self_le_linear_add_sqrt_log {x : ℕ} (hx : 254 ≤ x) :
|Chebyshev.psi x - x| ≤
Real.sqrt x * ((3863 / 10000 : ℝ) * Real.sqrt x + 2 * Real.log x) := by x:ℕhx:254 ≤ x⊢ |Chebyshev.psi ↑x - ↑x| ≤ √↑x * (3863 / 10000 * √↑x + 2 * Real.log ↑x)
have hy_cast : (254 : ℝ) ≤ (x : ℝ) := by exact_mod_cast hx x:ℕhx:254 ≤ xhy_cast:254 ≤ ↑x⊢ |Chebyshev.psi ↑x - ↑x| ≤ √↑x * (3863 / 10000 * √↑x + 2 * Real.log ↑x)
set y : ℝ := (x : ℝ) x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ y⊢ |Chebyshev.psi y - y| ≤ √y * (3863 / 10000 * √y + 2 * Real.log y)
have hy : 254 ≤ y := hy_cast x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ y⊢ |Chebyshev.psi y - y| ≤ √y * (3863 / 10000 * √y + 2 * Real.log y)
have hy_pos : 0 < y := by x:ℕhx:254 ≤ x⊢ |Chebyshev.psi ↑x - ↑x| ≤ √↑x * (3863 / 10000 * √↑x + 2 * Real.log ↑x) linarith x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < y⊢ |Chebyshev.psi y - y| ≤ √y * (3863 / 10000 * √y + 2 * Real.log y)
have h_sqrt_sq : Real.sqrt y * Real.sqrt y = y := Real.mul_self_sqrt hy_pos.le x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = y⊢ |Chebyshev.psi y - y| ≤ √y * (3863 / 10000 * √y + 2 * Real.log y)
have h_rhs_eq :
Real.sqrt y * ((3863 / 10000 : ℝ) * Real.sqrt y + 2 * Real.log y) =
(3863 / 10000 : ℝ) * y + 2 * Real.sqrt y * Real.log y := by x:ℕhx:254 ≤ x⊢ |Chebyshev.psi ↑x - ↑x| ≤ √↑x * (3863 / 10000 * √↑x + 2 * Real.log ↑x)
calc
Real.sqrt y * ((3863 / 10000 : ℝ) * Real.sqrt y + 2 * Real.log y)
= (3863 / 10000 : ℝ) * (Real.sqrt y * Real.sqrt y) + 2 * Real.sqrt y * Real.log y := by x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = y⊢ √y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * (√y * √y) + 2 * √y * Real.log y
ring All goals completed! 🐙
_ = (3863 / 10000 : ℝ) * y + 2 * Real.sqrt y * Real.log y := by x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = y⊢ 3863 / 10000 * (√y * √y) + 2 * √y * Real.log y = 3863 / 10000 * y + 2 * √y * Real.log y rw [h_sqrt_sq x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = y⊢ 3863 / 10000 * y + 2 * √y * Real.log y = 3863 / 10000 * y + 2 * √y * Real.log y] x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log y⊢ |Chebyshev.psi y - y| ≤ √y * (3863 / 10000 * √y + 2 * Real.log y)
rw [h_rhs_eq, x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log y⊢ |Chebyshev.psi y - y| ≤ 3863 / 10000 * y + 2 * √y * Real.log y abs_le x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log y⊢ -(3863 / 10000 * y + 2 * √y * Real.log y) ≤ Chebyshev.psi y - y ∧
Chebyshev.psi y - y ≤ 3863 / 10000 * y + 2 * √y * Real.log y] x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log y⊢ -(3863 / 10000 * y + 2 * √y * Real.log y) ≤ Chebyshev.psi y - y ∧
Chebyshev.psi y - y ≤ 3863 / 10000 * y + 2 * √y * Real.log y
constructor left x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log y⊢ -(3863 / 10000 * y + 2 * √y * Real.log y) ≤ Chebyshev.psi y - yright x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log y⊢ Chebyshev.psi y - y ≤ 3863 / 10000 * y + 2 * √y * Real.log y
· left x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log y⊢ -(3863 / 10000 * y + 2 * √y * Real.log y) ≤ Chebyshev.psi y - y have h_ge : y * Real.log 2 - Real.log (y + 1) ≤ Chebyshev.psi y := Chebyshev.psi_ge x left x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log yh_ge:y * Real.log 2 - Real.log (y + 1) ≤ Chebyshev.psi y⊢ -(3863 / 10000 * y + 2 * √y * Real.log y) ≤ Chebyshev.psi y - y
have h_coeff := one_sub_log_two_le left x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log yh_ge:y * Real.log 2 - Real.log (y + 1) ≤ Chebyshev.psi yh_coeff:1 - Real.log 2 ≤ 3863 / 10000⊢ -(3863 / 10000 * y + 2 * √y * Real.log y) ≤ Chebyshev.psi y - y
have h_log_add_one : Real.log (y + 1) ≤ 2 * Real.log y := by x:ℕhx:254 ≤ x⊢ |Chebyshev.psi ↑x - ↑x| ≤ √↑x * (3863 / 10000 * √↑x + 2 * Real.log ↑x)
have h_le_sq : y + 1 ≤ y ^ 2 := by x:ℕhx:254 ≤ x⊢ |Chebyshev.psi ↑x - ↑x| ≤ √↑x * (3863 / 10000 * √↑x + 2 * Real.log ↑x) nlinarith x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log yh_ge:y * Real.log 2 - Real.log (y + 1) ≤ Chebyshev.psi yh_coeff:1 - Real.log 2 ≤ 3863 / 10000h_le_sq:y + 1 ≤ y ^ 2⊢ Real.log (y + 1) ≤ 2 * Real.log y
have h1 : Real.log (y + 1) ≤ Real.log (y ^ 2) := Real.log_le_log (by x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log yh_ge:y * Real.log 2 - Real.log (y + 1) ≤ Chebyshev.psi yh_coeff:1 - Real.log 2 ≤ 3863 / 10000h_le_sq:y + 1 ≤ y ^ 2⊢ 0 < y + 1 positivity All goals completed! 🐙) h_le_sq x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log yh_ge:y * Real.log 2 - Real.log (y + 1) ≤ Chebyshev.psi yh_coeff:1 - Real.log 2 ≤ 3863 / 10000h_le_sq:y + 1 ≤ y ^ 2h1:Real.log (y + 1) ≤ Real.log (y ^ 2)⊢ Real.log (y + 1) ≤ 2 * Real.log y
rwa [Real.log_pow, Nat.cast_ofNat] at h1 left x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log yh_ge:y * Real.log 2 - Real.log (y + 1) ≤ Chebyshev.psi yh_coeff:1 - Real.log 2 ≤ 3863 / 10000h_log_add_one:Real.log (y + 1) ≤ 2 * Real.log y⊢ -(3863 / 10000 * y + 2 * √y * Real.log y) ≤ Chebyshev.psi y - y
have h_sqrt_ge_one : 1 ≤ Real.sqrt y := Real.le_sqrt_of_sq_le (by x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log yh_ge:y * Real.log 2 - Real.log (y + 1) ≤ Chebyshev.psi yh_coeff:1 - Real.log 2 ≤ 3863 / 10000h_log_add_one:Real.log (y + 1) ≤ 2 * Real.log y⊢ 1 ^ 2 ≤ y linarith All goals completed! 🐙) left x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log yh_ge:y * Real.log 2 - Real.log (y + 1) ≤ Chebyshev.psi yh_coeff:1 - Real.log 2 ≤ 3863 / 10000h_log_add_one:Real.log (y + 1) ≤ 2 * Real.log yh_sqrt_ge_one:1 ≤ √y⊢ -(3863 / 10000 * y + 2 * √y * Real.log y) ≤ Chebyshev.psi y - y
have h_log_nonneg : 0 ≤ Real.log y := Real.log_nonneg (by x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log yh_ge:y * Real.log 2 - Real.log (y + 1) ≤ Chebyshev.psi yh_coeff:1 - Real.log 2 ≤ 3863 / 10000h_log_add_one:Real.log (y + 1) ≤ 2 * Real.log yh_sqrt_ge_one:1 ≤ √y⊢ 1 ≤ y linarith All goals completed! 🐙) left x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log yh_ge:y * Real.log 2 - Real.log (y + 1) ≤ Chebyshev.psi yh_coeff:1 - Real.log 2 ≤ 3863 / 10000h_log_add_one:Real.log (y + 1) ≤ 2 * Real.log yh_sqrt_ge_one:1 ≤ √yh_log_nonneg:0 ≤ Real.log y⊢ -(3863 / 10000 * y + 2 * √y * Real.log y) ≤ Chebyshev.psi y - y
have h_log_le_sqrt_log : 2 * Real.log y ≤ 2 * Real.sqrt y * Real.log y := by x:ℕhx:254 ≤ x⊢ |Chebyshev.psi ↑x - ↑x| ≤ √↑x * (3863 / 10000 * √↑x + 2 * Real.log ↑x)
nlinarith left x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log yh_ge:y * Real.log 2 - Real.log (y + 1) ≤ Chebyshev.psi yh_coeff:1 - Real.log 2 ≤ 3863 / 10000h_log_add_one:Real.log (y + 1) ≤ 2 * Real.log yh_sqrt_ge_one:1 ≤ √yh_log_nonneg:0 ≤ Real.log yh_log_le_sqrt_log:2 * Real.log y ≤ 2 * √y * Real.log y⊢ -(3863 / 10000 * y + 2 * √y * Real.log y) ≤ Chebyshev.psi y - y
nlinarith All goals completed! 🐙
· right x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log y⊢ Chebyshev.psi y - y ≤ 3863 / 10000 * y + 2 * √y * Real.log y have h_le := Chebyshev.psi_le (by x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log y⊢ 1 ≤ y linarith All goals completed! 🐙 : 1 ≤ y) right x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log yh_le:Chebyshev.psi y ≤ Real.log 4 * y + 2 * √y * Real.log y⊢ Chebyshev.psi y - y ≤ 3863 / 10000 * y + 2 * √y * Real.log y
have h_coeff := log_four_sub_one_le right x:ℕhx:254 ≤ xy:ℝ := ↑xhy_cast:254 ≤ yhy:254 ≤ yhy_pos:0 < yh_sqrt_sq:√y * √y = yh_rhs_eq:√y * (3863 / 10000 * √y + 2 * Real.log y) = 3863 / 10000 * y + 2 * √y * Real.log yh_le:Chebyshev.psi y ≤ Real.log 4 * y + 2 * √y * Real.log yh_coeff:Real.log 4 - 1 ≤ 3863 / 10000⊢ Chebyshev.psi y - y ≤ 3863 / 10000 * y + 2 * √y * Real.log y
nlinarith All goals completed! 🐙Unconditional Chebyshev Bound for $253 < x \le 6000$: For every natural number $x$ with $253 < x \le 6000$, $$|\psi(x) - x| \le \frac{7}{8} \sqrt{x} (\log x)^2.$$
theorem abs_psi_sub_self_le_seven_eighths_of_le_six_thousand
{x : ℕ} (hx_low : 253 < x) (hx_high : x ≤ 6000) :
|Chebyshev.psi x - x| ≤ (7 / 8 : ℝ) * Real.sqrt x * (Real.log x) ^ 2 := by x:ℕhx_low:253 < xhx_high:x ≤ 6000⊢ |Chebyshev.psi ↑x - ↑x| ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2
have hx254_nat : 254 ≤ x := by omega x:ℕhx_low:253 < xhx_high:x ≤ 6000hx254_nat:254 ≤ x⊢ |Chebyshev.psi ↑x - ↑x| ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2
have hx254 : (254 : ℝ) ≤ (x : ℝ) := by exact_mod_cast hx254_nat x:ℕhx_low:253 < xhx_high:x ≤ 6000hx254_nat:254 ≤ xhx254:254 ≤ ↑x⊢ |Chebyshev.psi ↑x - ↑x| ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2
have hx6000 : (x : ℝ) ≤ 6000 := by exact_mod_cast hx_high x:ℕhx_low:253 < xhx_high:x ≤ 6000hx254_nat:254 ≤ xhx254:254 ≤ ↑xhx6000:↑x ≤ 6000⊢ |Chebyshev.psi ↑x - ↑x| ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2
calc
|Chebyshev.psi x - x|
≤ Real.sqrt x * ((3863 / 10000 : ℝ) * Real.sqrt x + 2 * Real.log x) :=
abs_psi_sub_self_le_linear_add_sqrt_log hx254_nat
_ ≤ Real.sqrt x * ((7 / 8 : ℝ) * (Real.log x) ^ 2) :=
mul_le_mul_of_nonneg_left
(chebyshev_factor_le_seven_eighths_log_sq hx254 hx6000) (Real.sqrt_nonneg x)
_ = (7 / 8 : ℝ) * Real.sqrt x * (Real.log x) ^ 2 := by x:ℕhx_low:253 < xhx_high:x ≤ 6000hx254_nat:254 ≤ xhx254:254 ≤ ↑xhx6000:↑x ≤ 6000⊢ √↑x * (7 / 8 * Real.log ↑x ^ 2) = 7 / 8 * √↑x * Real.log ↑x ^ 2 ring All goals completed! 🐙Explicit Schoenfeld-type inequality at $x$: $$|\psi(x) - x| \le \frac{7}{8} \sqrt{x} (\log x)^2.$$
def SchoenfeldPsiBound (x : ℝ) : Prop :=
|Chebyshev.psi x - x| ≤ (7 / 8 : ℝ) * Real.sqrt x * (Real.log x) ^ 2
Schoenfeld Bound $\implies$ No Counterexample:
If Chebyshev's $\psi(x)$ satisfies the explicit upper bound
$$\psi(x) - x \le \frac{7}{8} \sqrt{x} (\log x)^2,$$
then MatiyasevichRiemannCounterexample x cannot hold.
The proof is completely elementary: for $x > 253$, we have $\sqrt{x} \ge 15$, $H_x \ge 5$, $\log x \le H_x$, $\frac{1}{8} \sqrt{x} H_x^2 \ge \frac{375}{8} > 1$, and $H_{\operatorname{lcm}(1,\dots,x)} \le \psi(x) + 1$, so the $+1$ slack between $H_{L_x}$ and $\psi(x)$ is absorbed with room to spare.
theorem not_matiyasevichRiemannCounterexample_of_psi_sub_le {x : ℕ}
(hpsi : Chebyshev.psi x - x ≤ (7 / 8 : ℝ) * Real.sqrt x * (Real.log x) ^ 2) :
¬ MatiyasevichRiemannCounterexample x := by x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2⊢ ¬MatiyasevichRiemannCounterexample x
rw [matiyasevichRiemannCounterexample_iff_sqrt_lt x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2⊢ ¬(253 < x ∧ √↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x)] x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2⊢ ¬(253 < x ∧ √↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x)
rintro ⟨hx, hlt⟩ x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2hx:253 < xhlt:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x⊢ False
have hx254 : (254 : ℝ) ≤ (x : ℝ) := by x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2⊢ ¬MatiyasevichRiemannCounterexample x
have : 254 ≤ x := by x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2⊢ ¬MatiyasevichRiemannCounterexample x omega x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2hx:253 < xhlt:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑xthis:254 ≤ x⊢ 254 ≤ ↑x
exact_mod_cast this x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2hx:253 < xhlt:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑xhx254:254 ≤ ↑x⊢ False
have hsqrt15 : (15 : ℝ) ≤ Real.sqrt x :=
Real.le_sqrt_of_sq_le (by x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2hx:253 < xhlt:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑xhx254:254 ≤ ↑x⊢ 15 ^ 2 ≤ ↑x linarith All goals completed! 🐙) x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2hx:253 < xhlt:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑xhx254:254 ≤ ↑xhsqrt15:15 ≤ √↑x⊢ False
have hlog5 : (5 : ℝ) ≤ Real.log x := by x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2⊢ ¬MatiyasevichRiemannCounterexample x
linarith [log_ge_of_ge_254 hx254] x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2hx:253 < xhlt:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑xhx254:254 ≤ ↑xhsqrt15:15 ≤ √↑xhlog5:5 ≤ Real.log ↑x⊢ False
have hharm5 : (5 : ℝ) ≤ (harmonic x : ℝ) :=
hlog5.trans (log_le_harmonic x) x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2hx:253 < xhlt:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑xhx254:254 ≤ ↑xhsqrt15:15 ≤ √↑xhlog5:5 ≤ Real.log ↑xhharm5:5 ≤ ↑(harmonic x)⊢ False
have hharm_sq25 : (25 : ℝ) ≤ (harmonic x : ℝ) ^ 2 := by x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2⊢ ¬MatiyasevichRiemannCounterexample x nlinarith x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2hx:253 < xhlt:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑xhx254:254 ≤ ↑xhsqrt15:15 ≤ √↑xhlog5:5 ≤ Real.log ↑xhharm5:5 ≤ ↑(harmonic x)hharm_sq25:25 ≤ ↑(harmonic x) ^ 2⊢ False
have h_one_eighth : (1 : ℝ) ≤ (1 / 8 : ℝ) * (Real.sqrt x * (harmonic x : ℝ) ^ 2) := by x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2⊢ ¬MatiyasevichRiemannCounterexample x
nlinarith x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2hx:253 < xhlt:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑xhx254:254 ≤ ↑xhsqrt15:15 ≤ √↑xhlog5:5 ≤ Real.log ↑xhharm5:5 ≤ ↑(harmonic x)hharm_sq25:25 ≤ ↑(harmonic x) ^ 2h_one_eighth:1 ≤ 1 / 8 * (√↑x * ↑(harmonic x) ^ 2)⊢ False
have hlog_harm : (Real.log x) ^ 2 ≤ (harmonic x : ℝ) ^ 2 := log_sq_le_harmonic_sq x x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2hx:253 < xhlt:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑xhx254:254 ≤ ↑xhsqrt15:15 ≤ √↑xhlog5:5 ≤ Real.log ↑xhharm5:5 ≤ ↑(harmonic x)hharm_sq25:25 ≤ ↑(harmonic x) ^ 2h_one_eighth:1 ≤ 1 / 8 * (√↑x * ↑(harmonic x) ^ 2)hlog_harm:Real.log ↑x ^ 2 ≤ ↑(harmonic x) ^ 2⊢ False
have h_seven_eighths :
(7 / 8 : ℝ) * Real.sqrt x * (Real.log x) ^ 2 ≤
(7 / 8 : ℝ) * (Real.sqrt x * (harmonic x : ℝ) ^ 2) := by x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2⊢ ¬MatiyasevichRiemannCounterexample x
calc
(7 / 8 : ℝ) * Real.sqrt x * (Real.log x) ^ 2
≤ (7 / 8 : ℝ) * Real.sqrt x * (harmonic x : ℝ) ^ 2 :=
mul_le_mul_of_nonneg_left hlog_harm (by x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2hx:253 < xhlt:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑xhx254:254 ≤ ↑xhsqrt15:15 ≤ √↑xhlog5:5 ≤ Real.log ↑xhharm5:5 ≤ ↑(harmonic x)hharm_sq25:25 ≤ ↑(harmonic x) ^ 2h_one_eighth:1 ≤ 1 / 8 * (√↑x * ↑(harmonic x) ^ 2)hlog_harm:Real.log ↑x ^ 2 ≤ ↑(harmonic x) ^ 2⊢ 0 ≤ 7 / 8 * √↑x positivity All goals completed! 🐙)
_ = (7 / 8 : ℝ) * (Real.sqrt x * (harmonic x : ℝ) ^ 2) := by x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2hx:253 < xhlt:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑xhx254:254 ≤ ↑xhsqrt15:15 ≤ √↑xhlog5:5 ≤ Real.log ↑xhharm5:5 ≤ ↑(harmonic x)hharm_sq25:25 ≤ ↑(harmonic x) ^ 2h_one_eighth:1 ≤ 1 / 8 * (√↑x * ↑(harmonic x) ^ 2)hlog_harm:Real.log ↑x ^ 2 ≤ ↑(harmonic x) ^ 2⊢ 7 / 8 * √↑x * ↑(harmonic x) ^ 2 = 7 / 8 * (√↑x * ↑(harmonic x) ^ 2) ring x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2hx:253 < xhlt:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑xhx254:254 ≤ ↑xhsqrt15:15 ≤ √↑xhlog5:5 ≤ Real.log ↑xhharm5:5 ≤ ↑(harmonic x)hharm_sq25:25 ≤ ↑(harmonic x) ^ 2h_one_eighth:1 ≤ 1 / 8 * (√↑x * ↑(harmonic x) ^ 2)hlog_harm:Real.log ↑x ^ 2 ≤ ↑(harmonic x) ^ 2h_seven_eighths:7 / 8 * √↑x * Real.log ↑x ^ 2 ≤ 7 / 8 * (√↑x * ↑(harmonic x) ^ 2)⊢ False
have hhlcm : (harmonic (lcmUpTo x) : ℝ) - x ≤ Chebyshev.psi x - x + 1 := by x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2⊢ ¬MatiyasevichRiemannCounterexample x
linarith [harmonic_lcmUpTo_le_psi_add_one x] x:ℕhpsi:Chebyshev.psi ↑x - ↑x ≤ 7 / 8 * √↑x * Real.log ↑x ^ 2hx:253 < xhlt:√↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑xhx254:254 ≤ ↑xhsqrt15:15 ≤ √↑xhlog5:5 ≤ Real.log ↑xhharm5:5 ≤ ↑(harmonic x)hharm_sq25:25 ≤ ↑(harmonic x) ^ 2h_one_eighth:1 ≤ 1 / 8 * (√↑x * ↑(harmonic x) ^ 2)hlog_harm:Real.log ↑x ^ 2 ≤ ↑(harmonic x) ^ 2h_seven_eighths:7 / 8 * √↑x * Real.log ↑x ^ 2 ≤ 7 / 8 * (√↑x * ↑(harmonic x) ^ 2)hhlcm:↑(harmonic (lcmUpTo x)) - ↑x ≤ Chebyshev.psi ↑x - ↑x + 1⊢ False
linarith All goals completed! 🐙
Variant of not_matiyasevichRiemannCounterexample_of_psi_sub_le taking the
two-sided absolute-value bound SchoenfeldPsiBound x.
theorem not_matiyasevichRiemannCounterexample_of_schoenfeldPsiBound {x : ℕ}
(hpsi : SchoenfeldPsiBound x) :
¬ MatiyasevichRiemannCounterexample x :=
not_matiyasevichRiemannCounterexample_of_psi_sub_le ((le_abs_self _).trans hpsi)
$\psi(x)$ Oscillation $\implies$ Counterexample:
If $x > 253$ and $\sqrt{x} H_x^2 \le \psi(x) - x + \gamma$, then
MatiyasevichRiemannCounterexample x holds.
theorem matiyasevichRiemannCounterexample_of_sqrt_mul_harmonic_sq_le_psi_sub {x : ℕ}
(hx : 253 < x)
(hpsi : Real.sqrt x * (harmonic x : ℝ) ^ 2 ≤
Chebyshev.psi x - x + Real.eulerMascheroniConstant) :
MatiyasevichRiemannCounterexample x := by x:ℕhx:253 < xhpsi:√↑x * ↑(harmonic x) ^ 2 ≤ Chebyshev.psi ↑x - ↑x + Real.eulerMascheroniConstant⊢ MatiyasevichRiemannCounterexample x
rw [matiyasevichRiemannCounterexample_iff_sqrt_lt x:ℕhx:253 < xhpsi:√↑x * ↑(harmonic x) ^ 2 ≤ Chebyshev.psi ↑x - ↑x + Real.eulerMascheroniConstant⊢ 253 < x ∧ √↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x] x:ℕhx:253 < xhpsi:√↑x * ↑(harmonic x) ^ 2 ≤ Chebyshev.psi ↑x - ↑x + Real.eulerMascheroniConstant⊢ 253 < x ∧ √↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x
refine ⟨hx, ?_⟩ x:ℕhx:253 < xhpsi:√↑x * ↑(harmonic x) ^ 2 ≤ Chebyshev.psi ↑x - ↑x + Real.eulerMascheroniConstant⊢ √↑x * ↑(harmonic x) ^ 2 < ↑(harmonic (lcmUpTo x)) - ↑x
linarith [psi_add_eulerMascheroniConstant_lt_harmonic_lcmUpTo x] All goals completed! 🐙
Purely logarithmic sufficient condition for MatiyasevichRiemannCounterexample x:
if $x > 253$ and $\sqrt{x} (1 + \log x)^2 \le \psi(x) - x$, then
MatiyasevichRiemannCounterexample x holds.
theorem matiyasevichRiemannCounterexample_of_sqrt_mul_one_add_log_sq_le_psi_sub {x : ℕ}
(hx : 253 < x)
(hpsi : Real.sqrt x * (1 + Real.log x) ^ 2 ≤ Chebyshev.psi x - x) :
MatiyasevichRiemannCounterexample x := by x:ℕhx:253 < xhpsi:√↑x * (1 + Real.log ↑x) ^ 2 ≤ Chebyshev.psi ↑x - ↑x⊢ MatiyasevichRiemannCounterexample x
apply matiyasevichRiemannCounterexample_of_sqrt_mul_harmonic_sq_le_psi_sub hx x:ℕhx:253 < xhpsi:√↑x * (1 + Real.log ↑x) ^ 2 ≤ Chebyshev.psi ↑x - ↑x⊢ √↑x * ↑(harmonic x) ^ 2 ≤ Chebyshev.psi ↑x - ↑x + Real.eulerMascheroniConstant
have h1 : Real.sqrt x * (harmonic x : ℝ) ^ 2 ≤ Real.sqrt x * (1 + Real.log x) ^ 2 :=
mul_le_mul_of_nonneg_left (harmonic_sq_le_one_add_log_sq x) (Real.sqrt_nonneg x) x:ℕhx:253 < xhpsi:√↑x * (1 + Real.log ↑x) ^ 2 ≤ Chebyshev.psi ↑x - ↑xh1:√↑x * ↑(harmonic x) ^ 2 ≤ √↑x * (1 + Real.log ↑x) ^ 2⊢ √↑x * ↑(harmonic x) ^ 2 ≤ Chebyshev.psi ↑x - ↑x + Real.eulerMascheroniConstant
linarith [Real.one_half_lt_eulerMascheroniConstant] All goals completed! 🐙6. Classical Analytic Number Theory Ingredients (Schoenfeld 1976 & Schmidt 1903)
export RiemannSchmidt
(not_riemannHypothesis_iff_exists_zero
not_riemannHypothesis_imp_exists_psi_sub_ge_sqrt_mul_one_add_log_sq)
Explicit Formula $\psi(x)$ Bound for $x \ge 5000$ under RiemannHypothesis:
Combining the smoothed Perron contour shift and multiplicity-weighted Stieltjes bound
(WeightedStieltjes), the quartic Euler–Maclaurin Jensen zero-counting bound (VonMangoldtCount),
the Binet/Euler–Maclaurin digamma vertical bound (DigammaBinet), the Borel–Carathéodory
horizontal contour bound (HorizontalBounds), and the large-x real inequality (ExplicitLarge)
proves SchoenfeldPsiBound x for all x ≥ 5000.
theorem abs_psi_sub_self_le_seven_eighths_of_five_thousand_le (hRH : RiemannHypothesis)
{x : ℝ} (hx : 5000 ≤ x) :
SchoenfeldPsiBound x := by hRH:RiemannHypothesisx:ℝhx:5000 ≤ x⊢ SchoenfeldPsiBound x
unfold SchoenfeldPsiBound hRH:RiemannHypothesisx:ℝhx:5000 ≤ x⊢ |Chebyshev.psi x - x| ≤ 7 / 8 * √x * Real.log x ^ 2
obtain ⟨⟨hx_sub, hh_pos, h6T⟩, h_rhs⟩ :=
ExplicitLarge.explicit_rhs_le_seven_eighths_of_five_thousand_le hx hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log x⊢ |Chebyshev.psi x - x| ≤ 7 / 8 * √x * Real.log x ^ 2
obtain ⟨C_h, hCh, h_heights_hb⟩ :=
HorizontalBounds.exists_zero_free_height_with_log_pow_five_bound hRH h6T hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log xC_h:ℝhCh:0 ≤ C_hh_heights_hb:∀ U₀ ≥ 3 / 2 * √x / Real.log x,
∃ U ≥ U₀,
(∀ ρ ∈ VonMangoldtCount.nontrivialZetaZerosUpTo U, |ρ.im| < U) ∧
(∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ + ↑U * Complex.I) / riemannZeta (↑σ + ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5) ∧
∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ - ↑U * Complex.I) / riemannZeta (↑σ - ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5⊢ |Chebyshev.psi x - x| ≤ 7 / 8 * √x * Real.log x ^ 2
have hN_bound : ∀ t ≥ 6,
(WeightedStieltjes.weightedZeroCountingFunction t : ℝ) ≤
(16 / 5 : ℝ) * t * Real.log t + (11 / 5 : ℝ) * t + (0 : ℝ) := by hRH:RiemannHypothesisx:ℝhx:5000 ≤ x⊢ SchoenfeldPsiBound x
intro t ht hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log xC_h:ℝhCh:0 ≤ C_hh_heights_hb:∀ U₀ ≥ 3 / 2 * √x / Real.log x,
∃ U ≥ U₀,
(∀ ρ ∈ VonMangoldtCount.nontrivialZetaZerosUpTo U, |ρ.im| < U) ∧
(∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ + ↑U * Complex.I) / riemannZeta (↑σ + ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5) ∧
∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ - ↑U * Complex.I) / riemannZeta (↑σ - ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5t:ℝht:t ≥ 6⊢ ↑(VonMangoldtCount.weightedZeroCountingFunction t) ≤ 16 / 5 * t * Real.log t + 11 / 5 * t + 0
rw [add_zero hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log xC_h:ℝhCh:0 ≤ C_hh_heights_hb:∀ U₀ ≥ 3 / 2 * √x / Real.log x,
∃ U ≥ U₀,
(∀ ρ ∈ VonMangoldtCount.nontrivialZetaZerosUpTo U, |ρ.im| < U) ∧
(∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ + ↑U * Complex.I) / riemannZeta (↑σ + ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5) ∧
∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ - ↑U * Complex.I) / riemannZeta (↑σ - ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5t:ℝht:t ≥ 6⊢ ↑(VonMangoldtCount.weightedZeroCountingFunction t) ≤ 16 / 5 * t * Real.log t + 11 / 5 * t] hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log xC_h:ℝhCh:0 ≤ C_hh_heights_hb:∀ U₀ ≥ 3 / 2 * √x / Real.log x,
∃ U ≥ U₀,
(∀ ρ ∈ VonMangoldtCount.nontrivialZetaZerosUpTo U, |ρ.im| < U) ∧
(∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ + ↑U * Complex.I) / riemannZeta (↑σ + ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5) ∧
∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ - ↑U * Complex.I) / riemannZeta (↑σ - ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5t:ℝht:t ≥ 6⊢ ↑(VonMangoldtCount.weightedZeroCountingFunction t) ≤ 16 / 5 * t * Real.log t + 11 / 5 * t
exact VonMangoldtCount.weightedZeroCountingFunction_le_sixteen_fifths hRH ht hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log xC_h:ℝhCh:0 ≤ C_hh_heights_hb:∀ U₀ ≥ 3 / 2 * √x / Real.log x,
∃ U ≥ U₀,
(∀ ρ ∈ VonMangoldtCount.nontrivialZetaZerosUpTo U, |ρ.im| < U) ∧
(∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ + ↑U * Complex.I) / riemannZeta (↑σ + ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5) ∧
∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ - ↑U * Complex.I) / riemannZeta (↑σ - ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5hN_bound:∀ t ≥ 6, ↑(VonMangoldtCount.weightedZeroCountingFunction t) ≤ 16 / 5 * t * Real.log t + 11 / 5 * t + 0⊢ |Chebyshev.psi x - x| ≤ 7 / 8 * √x * Real.log x ^ 2
have h_left_zeta : ∀ t : ℝ,
‖-deriv riemannZeta (((-1 / 4 : ℝ) : ℂ) + (t : ℂ) * Complex.I) /
riemannZeta (((-1 / 4 : ℝ) : ℂ) + (t : ℂ) * Complex.I)‖ ≤
(1 : ℝ) * Real.log (|t| + 2) + (85 : ℝ) := by hRH:RiemannHypothesisx:ℝhx:5000 ≤ x⊢ SchoenfeldPsiBound x
intro t hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log xC_h:ℝhCh:0 ≤ C_hh_heights_hb:∀ U₀ ≥ 3 / 2 * √x / Real.log x,
∃ U ≥ U₀,
(∀ ρ ∈ VonMangoldtCount.nontrivialZetaZerosUpTo U, |ρ.im| < U) ∧
(∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ + ↑U * Complex.I) / riemannZeta (↑σ + ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5) ∧
∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ - ↑U * Complex.I) / riemannZeta (↑σ - ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5hN_bound:∀ t ≥ 6, ↑(VonMangoldtCount.weightedZeroCountingFunction t) ≤ 16 / 5 * t * Real.log t + 11 / 5 * t + 0t:ℝ⊢ ‖-deriv riemannZeta (↑(-1 / 4) + ↑t * Complex.I) / riemannZeta (↑(-1 / 4) + ↑t * Complex.I)‖ ≤
1 * Real.log (|t| + 2) + 85
have h_eq : (((-1 / 4 : ℝ) : ℂ) + (t : ℂ) * Complex.I) =
(-1 / 4 : ℂ) + (t : ℂ) * Complex.I := by hRH:RiemannHypothesisx:ℝhx:5000 ≤ x⊢ SchoenfeldPsiBound x push_cast hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log xC_h:ℝhCh:0 ≤ C_hh_heights_hb:∀ U₀ ≥ 3 / 2 * √x / Real.log x,
∃ U ≥ U₀,
(∀ ρ ∈ VonMangoldtCount.nontrivialZetaZerosUpTo U, |ρ.im| < U) ∧
(∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ + ↑U * Complex.I) / riemannZeta (↑σ + ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5) ∧
∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ - ↑U * Complex.I) / riemannZeta (↑σ - ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5hN_bound:∀ t ≥ 6, ↑(VonMangoldtCount.weightedZeroCountingFunction t) ≤ 16 / 5 * t * Real.log t + 11 / 5 * t + 0t:ℝ⊢ -1 / 4 + ↑t * Complex.I = -1 / 4 + ↑t * Complex.I; ring hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log xC_h:ℝhCh:0 ≤ C_hh_heights_hb:∀ U₀ ≥ 3 / 2 * √x / Real.log x,
∃ U ≥ U₀,
(∀ ρ ∈ VonMangoldtCount.nontrivialZetaZerosUpTo U, |ρ.im| < U) ∧
(∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ + ↑U * Complex.I) / riemannZeta (↑σ + ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5) ∧
∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ - ↑U * Complex.I) / riemannZeta (↑σ - ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5hN_bound:∀ t ≥ 6, ↑(VonMangoldtCount.weightedZeroCountingFunction t) ≤ 16 / 5 * t * Real.log t + 11 / 5 * t + 0t:ℝh_eq:↑(-1 / 4) + ↑t * Complex.I = -1 / 4 + ↑t * Complex.I⊢ ‖-deriv riemannZeta (↑(-1 / 4) + ↑t * Complex.I) / riemannZeta (↑(-1 / 4) + ↑t * Complex.I)‖ ≤
1 * Real.log (|t| + 2) + 85
rw [h_eq, hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log xC_h:ℝhCh:0 ≤ C_hh_heights_hb:∀ U₀ ≥ 3 / 2 * √x / Real.log x,
∃ U ≥ U₀,
(∀ ρ ∈ VonMangoldtCount.nontrivialZetaZerosUpTo U, |ρ.im| < U) ∧
(∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ + ↑U * Complex.I) / riemannZeta (↑σ + ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5) ∧
∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ - ↑U * Complex.I) / riemannZeta (↑σ - ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5hN_bound:∀ t ≥ 6, ↑(VonMangoldtCount.weightedZeroCountingFunction t) ≤ 16 / 5 * t * Real.log t + 11 / 5 * t + 0t:ℝh_eq:↑(-1 / 4) + ↑t * Complex.I = -1 / 4 + ↑t * Complex.I⊢ ‖-deriv riemannZeta (-1 / 4 + ↑t * Complex.I) / riemannZeta (-1 / 4 + ↑t * Complex.I)‖ ≤ 1 * Real.log (|t| + 2) + 85 neg_div, hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log xC_h:ℝhCh:0 ≤ C_hh_heights_hb:∀ U₀ ≥ 3 / 2 * √x / Real.log x,
∃ U ≥ U₀,
(∀ ρ ∈ VonMangoldtCount.nontrivialZetaZerosUpTo U, |ρ.im| < U) ∧
(∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ + ↑U * Complex.I) / riemannZeta (↑σ + ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5) ∧
∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ - ↑U * Complex.I) / riemannZeta (↑σ - ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5hN_bound:∀ t ≥ 6, ↑(VonMangoldtCount.weightedZeroCountingFunction t) ≤ 16 / 5 * t * Real.log t + 11 / 5 * t + 0t:ℝh_eq:↑(-1 / 4) + ↑t * Complex.I = -1 / 4 + ↑t * Complex.I⊢ ‖-(deriv riemannZeta (-1 / 4 + ↑t * Complex.I) / riemannZeta (-1 / 4 + ↑t * Complex.I))‖ ≤ 1 * Real.log (|t| + 2) + 85 norm_neg, hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log xC_h:ℝhCh:0 ≤ C_hh_heights_hb:∀ U₀ ≥ 3 / 2 * √x / Real.log x,
∃ U ≥ U₀,
(∀ ρ ∈ VonMangoldtCount.nontrivialZetaZerosUpTo U, |ρ.im| < U) ∧
(∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ + ↑U * Complex.I) / riemannZeta (↑σ + ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5) ∧
∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ - ↑U * Complex.I) / riemannZeta (↑σ - ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5hN_bound:∀ t ≥ 6, ↑(VonMangoldtCount.weightedZeroCountingFunction t) ≤ 16 / 5 * t * Real.log t + 11 / 5 * t + 0t:ℝh_eq:↑(-1 / 4) + ↑t * Complex.I = -1 / 4 + ↑t * Complex.I⊢ ‖deriv riemannZeta (-1 / 4 + ↑t * Complex.I) / riemannZeta (-1 / 4 + ↑t * Complex.I)‖ ≤ 1 * Real.log (|t| + 2) + 85 ← logDeriv_apply, hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log xC_h:ℝhCh:0 ≤ C_hh_heights_hb:∀ U₀ ≥ 3 / 2 * √x / Real.log x,
∃ U ≥ U₀,
(∀ ρ ∈ VonMangoldtCount.nontrivialZetaZerosUpTo U, |ρ.im| < U) ∧
(∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ + ↑U * Complex.I) / riemannZeta (↑σ + ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5) ∧
∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ - ↑U * Complex.I) / riemannZeta (↑σ - ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5hN_bound:∀ t ≥ 6, ↑(VonMangoldtCount.weightedZeroCountingFunction t) ≤ 16 / 5 * t * Real.log t + 11 / 5 * t + 0t:ℝh_eq:↑(-1 / 4) + ↑t * Complex.I = -1 / 4 + ↑t * Complex.I⊢ ‖logDeriv riemannZeta (-1 / 4 + ↑t * Complex.I)‖ ≤ 1 * Real.log (|t| + 2) + 85 one_mul hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log xC_h:ℝhCh:0 ≤ C_hh_heights_hb:∀ U₀ ≥ 3 / 2 * √x / Real.log x,
∃ U ≥ U₀,
(∀ ρ ∈ VonMangoldtCount.nontrivialZetaZerosUpTo U, |ρ.im| < U) ∧
(∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ + ↑U * Complex.I) / riemannZeta (↑σ + ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5) ∧
∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ - ↑U * Complex.I) / riemannZeta (↑σ - ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5hN_bound:∀ t ≥ 6, ↑(VonMangoldtCount.weightedZeroCountingFunction t) ≤ 16 / 5 * t * Real.log t + 11 / 5 * t + 0t:ℝh_eq:↑(-1 / 4) + ↑t * Complex.I = -1 / 4 + ↑t * Complex.I⊢ ‖logDeriv riemannZeta (-1 / 4 + ↑t * Complex.I)‖ ≤ Real.log (|t| + 2) + 85] hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log xC_h:ℝhCh:0 ≤ C_hh_heights_hb:∀ U₀ ≥ 3 / 2 * √x / Real.log x,
∃ U ≥ U₀,
(∀ ρ ∈ VonMangoldtCount.nontrivialZetaZerosUpTo U, |ρ.im| < U) ∧
(∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ + ↑U * Complex.I) / riemannZeta (↑σ + ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5) ∧
∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ - ↑U * Complex.I) / riemannZeta (↑σ - ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5hN_bound:∀ t ≥ 6, ↑(VonMangoldtCount.weightedZeroCountingFunction t) ≤ 16 / 5 * t * Real.log t + 11 / 5 * t + 0t:ℝh_eq:↑(-1 / 4) + ↑t * Complex.I = -1 / 4 + ↑t * Complex.I⊢ ‖logDeriv riemannZeta (-1 / 4 + ↑t * Complex.I)‖ ≤ Real.log (|t| + 2) + 85
exact DigammaBinet.norm_logDeriv_riemannZeta_leftVertical_le_eighty_five t hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log xC_h:ℝhCh:0 ≤ C_hh_heights_hb:∀ U₀ ≥ 3 / 2 * √x / Real.log x,
∃ U ≥ U₀,
(∀ ρ ∈ VonMangoldtCount.nontrivialZetaZerosUpTo U, |ρ.im| < U) ∧
(∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ + ↑U * Complex.I) / riemannZeta (↑σ + ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5) ∧
∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ - ↑U * Complex.I) / riemannZeta (↑σ - ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5hN_bound:∀ t ≥ 6, ↑(VonMangoldtCount.weightedZeroCountingFunction t) ≤ 16 / 5 * t * Real.log t + 11 / 5 * t + 0h_left_zeta:∀ (t : ℝ),
‖-deriv riemannZeta (↑(-1 / 4) + ↑t * Complex.I) / riemannZeta (↑(-1 / 4) + ↑t * Complex.I)‖ ≤
1 * Real.log (|t| + 2) + 85⊢ |Chebyshev.psi x - x| ≤ 7 / 8 * √x * Real.log x ^ 2
have h_explicit :=
WeightedStieltjes.abs_psi_sub_self_le_weighted_riemannVonMangoldt_six_neg_one_fourth
hRH hx_sub hh_pos h6T (by hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log xC_h:ℝhCh:0 ≤ C_hh_heights_hb:∀ U₀ ≥ 3 / 2 * √x / Real.log x,
∃ U ≥ U₀,
(∀ ρ ∈ VonMangoldtCount.nontrivialZetaZerosUpTo U, |ρ.im| < U) ∧
(∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ + ↑U * Complex.I) / riemannZeta (↑σ + ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5) ∧
∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ - ↑U * Complex.I) / riemannZeta (↑σ - ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5hN_bound:∀ t ≥ 6, ↑(VonMangoldtCount.weightedZeroCountingFunction t) ≤ 16 / 5 * t * Real.log t + 11 / 5 * t + 0h_left_zeta:∀ (t : ℝ),
‖-deriv riemannZeta (↑(-1 / 4) + ↑t * Complex.I) / riemannZeta (↑(-1 / 4) + ↑t * Complex.I)‖ ≤
1 * Real.log (|t| + 2) + 85⊢ 0 ≤ 16 / 5 norm_num All goals completed! 🐙) (by hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log xC_h:ℝhCh:0 ≤ C_hh_heights_hb:∀ U₀ ≥ 3 / 2 * √x / Real.log x,
∃ U ≥ U₀,
(∀ ρ ∈ VonMangoldtCount.nontrivialZetaZerosUpTo U, |ρ.im| < U) ∧
(∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ + ↑U * Complex.I) / riemannZeta (↑σ + ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5) ∧
∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ - ↑U * Complex.I) / riemannZeta (↑σ - ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5hN_bound:∀ t ≥ 6, ↑(VonMangoldtCount.weightedZeroCountingFunction t) ≤ 16 / 5 * t * Real.log t + 11 / 5 * t + 0h_left_zeta:∀ (t : ℝ),
‖-deriv riemannZeta (↑(-1 / 4) + ↑t * Complex.I) / riemannZeta (↑(-1 / 4) + ↑t * Complex.I)‖ ≤
1 * Real.log (|t| + 2) + 85⊢ 0 ≤ 0 norm_num All goals completed! 🐙) (by hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log xC_h:ℝhCh:0 ≤ C_hh_heights_hb:∀ U₀ ≥ 3 / 2 * √x / Real.log x,
∃ U ≥ U₀,
(∀ ρ ∈ VonMangoldtCount.nontrivialZetaZerosUpTo U, |ρ.im| < U) ∧
(∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ + ↑U * Complex.I) / riemannZeta (↑σ + ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5) ∧
∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ - ↑U * Complex.I) / riemannZeta (↑σ - ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5hN_bound:∀ t ≥ 6, ↑(VonMangoldtCount.weightedZeroCountingFunction t) ≤ 16 / 5 * t * Real.log t + 11 / 5 * t + 0h_left_zeta:∀ (t : ℝ),
‖-deriv riemannZeta (↑(-1 / 4) + ↑t * Complex.I) / riemannZeta (↑(-1 / 4) + ↑t * Complex.I)‖ ≤
1 * Real.log (|t| + 2) + 85⊢ 0 ≤ 1 norm_num All goals completed! 🐙) (by hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log xC_h:ℝhCh:0 ≤ C_hh_heights_hb:∀ U₀ ≥ 3 / 2 * √x / Real.log x,
∃ U ≥ U₀,
(∀ ρ ∈ VonMangoldtCount.nontrivialZetaZerosUpTo U, |ρ.im| < U) ∧
(∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ + ↑U * Complex.I) / riemannZeta (↑σ + ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5) ∧
∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ - ↑U * Complex.I) / riemannZeta (↑σ - ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5hN_bound:∀ t ≥ 6, ↑(VonMangoldtCount.weightedZeroCountingFunction t) ≤ 16 / 5 * t * Real.log t + 11 / 5 * t + 0h_left_zeta:∀ (t : ℝ),
‖-deriv riemannZeta (↑(-1 / 4) + ↑t * Complex.I) / riemannZeta (↑(-1 / 4) + ↑t * Complex.I)‖ ≤
1 * Real.log (|t| + 2) + 85⊢ 0 ≤ 85 norm_num All goals completed! 🐙) hCh
hN_bound h_left_zeta h_heights_hb hRH:RiemannHypothesisx:ℝhx:5000 ≤ xh_rhs:7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4) ≤
7 / 8 * √x * Real.log x ^ 2hx_sub:1 ≤ x - 7 / 20 * √x * Real.log x ^ 2hh_pos:0 < 7 / 20 * √x * Real.log x ^ 2h6T:6 ≤ 3 / 2 * √x / Real.log xC_h:ℝhCh:0 ≤ C_hh_heights_hb:∀ U₀ ≥ 3 / 2 * √x / Real.log x,
∃ U ≥ U₀,
(∀ ρ ∈ VonMangoldtCount.nontrivialZetaZerosUpTo U, |ρ.im| < U) ∧
(∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ + ↑U * Complex.I) / riemannZeta (↑σ + ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5) ∧
∀ σ ∈ Set.Icc (-1 / 4) 2,
‖-deriv riemannZeta (↑σ - ↑U * Complex.I) / riemannZeta (↑σ - ↑U * Complex.I)‖ ≤ C_h * Real.log U ^ 5hN_bound:∀ t ≥ 6, ↑(VonMangoldtCount.weightedZeroCountingFunction t) ≤ 16 / 5 * t * Real.log t + 11 / 5 * t + 0h_left_zeta:∀ (t : ℝ),
‖-deriv riemannZeta (↑(-1 / 4) + ↑t * Complex.I) / riemannZeta (↑(-1 / 4) + ↑t * Complex.I)‖ ≤
1 * Real.log (|t| + 2) + 85h_explicit:|Chebyshev.psi x - x| ≤
7 / 20 * √x * Real.log x ^ 2 / 2 + Real.log (2 * Real.pi) +
√(x + 7 / 20 * √x * Real.log x ^ 2) *
(16 / 5 / 2 * Real.log (3 / 2 * √x / Real.log x) ^ 2 +
(16 / 5 + 11 / 5) * Real.log (3 / 2 * √x / Real.log x) +
11 / 5 +
0 / 6 -
16 / 5 / 2 * Real.log 6 ^ 2 -
11 / 5 * Real.log 6) +
2 * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 2) / (7 / 20 * √x * Real.log x ^ 2) *
((2 * (16 / 5) * Real.log (3 / 2 * √x / Real.log x) + 2 * (16 / 5) + 2 * (11 / 5)) / (3 / 2 * √x / Real.log x) +
2 * 0 / (3 / 2 * √x / Real.log x) ^ 2) +
32 * (2 * 1 + 85) / (Real.pi * (7 / 20 * √x * Real.log x ^ 2)) * (x + 7 / 20 * √x * Real.log x ^ 2) ^ (3 / 4)⊢ |Chebyshev.psi x - x| ≤ 7 / 8 * √x * Real.log x ^ 2
exact h_explicit.trans h_rhs All goals completed! 🐙
Explicit $\psi(x)$ Bound under RH:
Assuming RiemannHypothesis, for every integer $x > 253$,
$$|\psi(x) - x| \le \frac{7}{8} \sqrt{x} (\log x)^2.$$
theorem riemannHypothesis_imp_schoenfeldPsiBound (hRH : RiemannHypothesis)
{x : ℕ} (hx : 253 < x) :
SchoenfeldPsiBound x := by hRH:RiemannHypothesisx:ℕhx:253 < x⊢ SchoenfeldPsiBound ↑x
rcases le_or_gt x 6000 with hx_le | hx_gt inl hRH:RiemannHypothesisx:ℕhx:253 < xhx_le:x ≤ 6000⊢ SchoenfeldPsiBound ↑xinr hRH:RiemannHypothesisx:ℕhx:253 < xhx_gt:6000 < x⊢ SchoenfeldPsiBound ↑x
· inl hRH:RiemannHypothesisx:ℕhx:253 < xhx_le:x ≤ 6000⊢ SchoenfeldPsiBound ↑x exact abs_psi_sub_self_le_seven_eighths_of_le_six_thousand hx hx_le All goals completed! 🐙
· inr hRH:RiemannHypothesisx:ℕhx:253 < xhx_gt:6000 < x⊢ SchoenfeldPsiBound ↑x have hx5000 : (5000 : ℝ) ≤ (x : ℝ) := by
have : 5000 ≤ x := by hRH:RiemannHypothesisx:ℕhx:253 < x⊢ SchoenfeldPsiBound ↑x omega hRH:RiemannHypothesisx:ℕhx:253 < xhx_gt:6000 < xthis:5000 ≤ x⊢ 5000 ≤ ↑x
exact_mod_cast this inr hRH:RiemannHypothesisx:ℕhx:253 < xhx_gt:6000 < xhx5000:5000 ≤ ↑x⊢ SchoenfeldPsiBound ↑x
exact abs_psi_sub_self_le_seven_eighths_of_five_thousand_le hRH hx5000 All goals completed! 🐙
Corollary of not_riemannHypothesis_imp_exists_psi_sub_ge_sqrt_mul_one_add_log_sq in terms
of harmonic numbers and the Euler–Mascheroni constant $\gamma$.
theorem not_riemannHypothesis_imp_exists_psi_oscillation (hNotRH : ¬ RiemannHypothesis) :
∃ x : ℕ, 253 < x ∧
Real.sqrt x * (harmonic x : ℝ) ^ 2 ≤
Chebyshev.psi x - x + Real.eulerMascheroniConstant := by hNotRH:¬RiemannHypothesis⊢ ∃ x, 253 < x ∧ √↑x * ↑(harmonic x) ^ 2 ≤ Chebyshev.psi ↑x - ↑x + Real.eulerMascheroniConstant
obtain ⟨x, hx, hpsi⟩ :=
not_riemannHypothesis_imp_exists_psi_sub_ge_sqrt_mul_one_add_log_sq hNotRH hNotRH:¬RiemannHypothesisx:ℕhx:253 < xhpsi:√↑x * (1 + Real.log ↑x) ^ 2 ≤ Chebyshev.psi ↑x - ↑x⊢ ∃ x, 253 < x ∧ √↑x * ↑(harmonic x) ^ 2 ≤ Chebyshev.psi ↑x - ↑x + Real.eulerMascheroniConstant
refine ⟨x, hx, ?_⟩ hNotRH:¬RiemannHypothesisx:ℕhx:253 < xhpsi:√↑x * (1 + Real.log ↑x) ^ 2 ≤ Chebyshev.psi ↑x - ↑x⊢ √↑x * ↑(harmonic x) ^ 2 ≤ Chebyshev.psi ↑x - ↑x + Real.eulerMascheroniConstant
have h1 : Real.sqrt x * (harmonic x : ℝ) ^ 2 ≤ Real.sqrt x * (1 + Real.log x) ^ 2 :=
mul_le_mul_of_nonneg_left (harmonic_sq_le_one_add_log_sq x) (Real.sqrt_nonneg x) hNotRH:¬RiemannHypothesisx:ℕhx:253 < xhpsi:√↑x * (1 + Real.log ↑x) ^ 2 ≤ Chebyshev.psi ↑x - ↑xh1:√↑x * ↑(harmonic x) ^ 2 ≤ √↑x * (1 + Real.log ↑x) ^ 2⊢ √↑x * ↑(harmonic x) ^ 2 ≤ Chebyshev.psi ↑x - ↑x + Real.eulerMascheroniConstant
linarith [Real.one_half_lt_eulerMascheroniConstant] All goals completed! 🐙
Schoenfeld's Explicit Chebyshev-$\psi$ Criterion for RH (1976):
The Riemann Hypothesis holds if and only if SchoenfeldPsiBound x holds for all $x > 253$.
theorem riemannHypothesis_iff_forall_schoenfeldPsiBound :
RiemannHypothesis ↔ ∀ x : ℕ, 253 < x → SchoenfeldPsiBound x := by ⊢ RiemannHypothesis ↔ ∀ (x : ℕ), 253 < x → SchoenfeldPsiBound ↑x
constructor mp ⊢ RiemannHypothesis → ∀ (x : ℕ), 253 < x → SchoenfeldPsiBound ↑xmpr ⊢ (∀ (x : ℕ), 253 < x → SchoenfeldPsiBound ↑x) → RiemannHypothesis
· mp ⊢ RiemannHypothesis → ∀ (x : ℕ), 253 < x → SchoenfeldPsiBound ↑x exact fun hRH _ hx => riemannHypothesis_imp_schoenfeldPsiBound hRH hx All goals completed! 🐙
· mpr ⊢ (∀ (x : ℕ), 253 < x → SchoenfeldPsiBound ↑x) → RiemannHypothesis intro hBound mpr hBound:∀ (x : ℕ), 253 < x → SchoenfeldPsiBound ↑x⊢ RiemannHypothesis
by_contra hNotRH mpr hBound:∀ (x : ℕ), 253 < x → SchoenfeldPsiBound ↑xhNotRH:¬RiemannHypothesis⊢ False
obtain ⟨x, hx, hpsi⟩ :=
not_riemannHypothesis_imp_exists_psi_sub_ge_sqrt_mul_one_add_log_sq hNotRH mpr hBound:∀ (x : ℕ), 253 < x → SchoenfeldPsiBound ↑xhNotRH:¬RiemannHypothesisx:ℕhx:253 < xhpsi:√↑x * (1 + Real.log ↑x) ^ 2 ≤ Chebyshev.psi ↑x - ↑x⊢ False
exact not_matiyasevichRiemannCounterexample_of_schoenfeldPsiBound (hBound x hx)
(matiyasevichRiemannCounterexample_of_sqrt_mul_one_add_log_sq_le_psi_sub hx hpsi) All goals completed! 🐙
Matiyasevich–Aaronson Harmonic-LCM Criterion for RH (2016):
The Riemann Hypothesis holds if and only if no natural number $x$ satisfies
MatiyasevichRiemannCounterexample x.
theorem riemannHypothesis_iff_forall_not_counterexample :
RiemannHypothesis ↔ ∀ x : ℕ, ¬ MatiyasevichRiemannCounterexample x := by ⊢ RiemannHypothesis ↔ ∀ (x : ℕ), ¬MatiyasevichRiemannCounterexample x
constructor mp ⊢ RiemannHypothesis → ∀ (x : ℕ), ¬MatiyasevichRiemannCounterexample xmpr ⊢ (∀ (x : ℕ), ¬MatiyasevichRiemannCounterexample x) → RiemannHypothesis
· mp ⊢ RiemannHypothesis → ∀ (x : ℕ), ¬MatiyasevichRiemannCounterexample x intro hRH x hx_ce mp hRH:RiemannHypothesisx:ℕhx_ce:MatiyasevichRiemannCounterexample x⊢ False
have hx : 253 < x := hx_ce.1 mp hRH:RiemannHypothesisx:ℕhx_ce:MatiyasevichRiemannCounterexample xhx:253 < x⊢ False
exact not_matiyasevichRiemannCounterexample_of_schoenfeldPsiBound
(riemannHypothesis_imp_schoenfeldPsiBound hRH hx) hx_ce All goals completed! 🐙
· mpr ⊢ (∀ (x : ℕ), ¬MatiyasevichRiemannCounterexample x) → RiemannHypothesis intro hNoCE mpr hNoCE:∀ (x : ℕ), ¬MatiyasevichRiemannCounterexample x⊢ RiemannHypothesis
by_contra hNotRH mpr hNoCE:∀ (x : ℕ), ¬MatiyasevichRiemannCounterexample xhNotRH:¬RiemannHypothesis⊢ False
obtain ⟨x, hx, hpsi⟩ := not_riemannHypothesis_imp_exists_psi_oscillation hNotRH mpr hNoCE:∀ (x : ℕ), ¬MatiyasevichRiemannCounterexample xhNotRH:¬RiemannHypothesisx:ℕhx:253 < xhpsi:√↑x * ↑(harmonic x) ^ 2 ≤ Chebyshev.psi ↑x - ↑x + Real.eulerMascheroniConstant⊢ False
exact hNoCE x (matiyasevichRiemannCounterexample_of_sqrt_mul_harmonic_sq_le_psi_sub hx hpsi) All goals completed! 🐙
Part II (Elementary Counterexample ↔ Riemann Hypothesis):
There exists an integer x satisfying MatiyasevichRiemannCounterexample x if and only if
the Riemann Hypothesis (RiemannHypothesis) is false.
theorem exists_counterexample_iff_not_riemannHypothesis :
(∃ x : ℕ, MatiyasevichRiemannCounterexample x) ↔ ¬ RiemannHypothesis := by ⊢ (∃ x, MatiyasevichRiemannCounterexample x) ↔ ¬RiemannHypothesis
rw [riemannHypothesis_iff_forall_not_counterexample ⊢ (∃ x, MatiyasevichRiemannCounterexample x) ↔ ¬∀ (x : ℕ), ¬MatiyasevichRiemannCounterexample x] ⊢ (∃ x, MatiyasevichRiemannCounterexample x) ↔ ¬∀ (x : ℕ), ¬MatiyasevichRiemannCounterexample x
push Not ⊢ (∃ x, MatiyasevichRiemannCounterexample x) ↔ ∃ x, MatiyasevichRiemannCounterexample x
rfl All goals completed! 🐙end ConjectureMachines.Semantics.Riemann