Formalism/GammaFactorNonvanishing/RhOfRight.lean
1import Mathlib23open Complex45theorem Formalism.VW.rh_of_right (hz : ∀ s : ℂ, 1 / 2 < s.re → s ≠ 1 → riemannZeta s ≠ 0) : RiemannHypothesis := by6unfold RiemannHypothesis7intro s hs htriv hs18rcases lt_trichotomy s.re (1 / 2) with hlt | heq | hgt9· exfalso10have hpi : (Real.pi : ℂ) ≠ 0 := by exact_mod_cast Real.pi_ne_zero11have hs0 : s ≠ 0 := by12rintro rfl13rw [riemannZeta_zero] at hs14norm_num at hs15have ht : 1 / 2 < (1 - s).re := by16rw [Complex.sub_re, Complex.one_re]17linarith18have h1 : (1 - s) ≠ 1 := by19intro h20apply hs021linear_combination -h22have hnat : ∀ n : ℕ, (1 - s) ≠ -(n : ℂ) := by23intro n h24have hr := congrArg Complex.re h25rw [Complex.sub_re, Complex.one_re, Complex.neg_re, Complex.natCast_re] at hr26have : (0 : ℝ) ≤ n := n.cast_nonneg27linarith28have key := riemannZeta_one_sub hnat h129rw [sub_sub_cancel, hs] at key30have hz' := hz (1 - s) ht h131have h2pi : (2 : ℂ) * (2 * (Real.pi : ℂ)) ^ (-(1 - s)) ≠ 0 :=32mul_ne_zero two_ne_zero (Complex.cpow_ne_zero_iff.2 (Or.inl (mul_ne_zero two_ne_zero hpi)))33have hG : Complex.Gamma (1 - s) ≠ 0 := Complex.Gamma_ne_zero_of_re_pos (by linarith)34have hcos : Complex.cos ((Real.pi : ℂ) * (1 - s) / 2) ≠ 0 := by35rw [Ne, Complex.cos_eq_zero_iff]36rintro ⟨k, hk⟩37have h3 : ((1 - s) - (2 * (k : ℂ) + 1)) * (Real.pi : ℂ) = 0 := by38linear_combination 2 * hk39rcases mul_eq_zero.1 h3 with h | h40· have hsk : s = -2 * (k : ℂ) := by linear_combination -h41have hre : s.re = -2 * (k : ℝ) := by42rw [hsk, Complex.mul_re]43simp44rcases lt_trichotomy k 0 with hk0 | hk0 | hk045· have : (k : ℝ) ≤ -1 := by exact_mod_cast (show k ≤ -1 by omega)46linarith47· apply hs048rw [hsk, hk0]49simp50· apply htriv