Development/AutomorphicArithmetic/PrimitiveCosets/GzEq.lean
1import Development.AutomorphicArithmetic.PrimitiveCosets.CoreAtH23open UpperTheory.Comparison₂ Deduction.CH Formalism Formalism.HC Formalism.D5 Formalism.RankGapBounds.WeightedMeanData Formalism.LFunctionChainParameters.WeightedSlopeBounds Formalism.LFunctionChainParameters.characterSumData Formalism.LFunctionChainParameters.ThickSetMeanBounds Formalism.LFunctionChainParameters.LErr4Formalism.LFunctionChainParameters.LChain Formalism.LFunctionChainParameters.LHost56theorem UpperTheory.Comparison₂.Gz_eq :7∀ y : ℝ, Formalism.Gz y = An.G y ∧ An.G y = Deduction.G y := by8intro y9have hsum : ∑ n ∈ Finset.Icc 1 ⌊y⌋₊, ArithmeticFunction.vonMangoldt n * (y / (n : ℝ) - 1)10= ∑ n ∈ Finset.Icc 1 ⌊y⌋₊, An.abelian₂ n * max (y / (n : ℝ) - 1) 0 := by11apply Finset.sum_congr rfl12intro n hn13rw [Finset.mem_Icc] at hn14have hn1 : (1 : ℝ) ≤ n := by exact_mod_cast hn.115have hy : (n : ℝ) ≤ y := by16have hk : 0 < ⌊y⌋₊ := lt_of_lt_of_le Nat.zero_lt_one (le_trans hn.1 hn.2)17have hy0 : 0 ≤ y := by18by_contra hneg19push_neg at hneg20rw [Nat.floor_eq_zero.2 (lt_trans hneg zero_lt_one)] at hk21exact lt_irrefl 0 hk22exact le_trans (by exact_mod_cast hn.2) (Nat.floor_le hy0)23have hpos : (0 : ℝ) < n := by linarith24have : 0 ≤ y / (n : ℝ) - 1 := by25rw [sub_nonneg, le_div_iff₀ hpos, one_mul]26exact hy27rw [max_eq_left this]28have hre : (Deduction.ramp (fun _ => 1) y).re29= ∑ n ∈ Finset.Icc 1 ⌊y⌋₊, An.abelian₂ n * max (y / (n : ℝ) - 1) 0 := by30have hsub : Finset.Icc 1 ⌊y⌋₊ ⊆ Finset.range (⌊y⌋₊ + 1) := by31intro n hn32rw [Finset.mem_Icc] at hn33rw [Finset.mem_range]34omega35rw [Finset.sum_subset hsub]36· simp [Deduction.ramp, Complex.re_sum]37· intro n hn hn'38have h0 : n = 0 := by39rw [Finset.mem_range] at hn40rw [Finset.mem_Icc] at hn'41omega42subst h043simp44refine ⟨?_, ?_⟩45· simp only [Formalism.Gz, Formalism.Sz, An.G]46rw [hsum]47ring48· simp only [An.G, Deduction.G]49rw [hre]50ring