Development/AutomorphicArithmetic/DedekindLFunctions/LandauTheorems/ChCore.lean
351GmA D ell Kp c x ≤ x ^ ((1 : ℝ) / 2 + (C + 3) * ε) + SigA D ell A0 Kp x := by352obtain ⟨Cd, hCd, hDer⟩ := derivative_integral_all353obtain ⟨x₁, hx₁⟩ := Filter.eventually_atTop.1354((tendsto_rpow_atTop (show 0 < 3 * ε / 8 by positivity)).eventually_ge_atTop 26)355set A1 : ℝ := 5 + Cd + |Ko| + |M| * (4 + Cd + |Ko|) + 4 * |CE| with hA1356have hA10 : 0 ≤ A1 := by positivity357obtain ⟨x₂, hx₂⟩ := Filter.eventually_atTop.1358((tendsto_rpow_atTop (show (0 : ℝ) < 1 / 4 by norm_num)).eventually_ge_atTop (|M| * A1))359refine ⟨max 3 (max x₁ x₂), fun x hx => ?_⟩360intro H _ _ _ m D S ell N TT T2 a w b b' k aE η X' θ A0 Kp hHost hb ha hk hm hxm hS hThin hCost hSize hT2 hCh hTop361obtain ⟨h0K, hKp, hM, hE2, hKo, hE3⟩ := hCh362have hx3 : 3 ≤ x := le_of_max_le_left hx363have h26 := hx₁ x (le_of_max_le_left (le_of_max_le_right hx))364have hbig := hx₂ x (le_of_max_le_right (le_of_max_le_right hx))365have hx0 : 0 < x := by linarith366have w1 : 1 ≤ x := by linarith367have hW : SizeWindows C ε x (Fintype.card H) TT.card T2.card m b k aE368(x ^ (C * ε) * errorBracketSizeWindows x ε (Fintype.card H) TT.card T2.card m b k aE) :=369(size_windows_split _ _ _ _ _ _ _ _ _ _ _).2 ⟨hSize, le_refl _, ⟨hx3, h26⟩, hε, hC,370Fintype.card_pos, hb, ha, Finset.card_le_univ T2, hm, hxm⟩371set s : ℝ := x ^ ((1 : ℝ) / 4) with hs372set e : ℝ := x ^ ε with he373have hs1 : 1 ≤ s := Real.one_le_rpow w1 (by norm_num)374have he1 : 1 ≤ e := Real.one_le_rpow w1 hε.le375have hX : x ^ ((1 : ℝ) / 2 + ε) = s * (s * e) := by376rw [hs, he, ← Real.rpow_add hx0, ← Real.rpow_add hx0]377congr 1378ring379have hρ : x ^ (-1 + ε) * x = e := by380rw [Real.rpow_add hx0, Real.rpow_neg_one]381field_simp382rfl383have hl0 : 0 ≤ Real.log x := Real.log_nonneg w1384have hl : Real.log x ≤ 4 * s := by385have := Real.log_le_rpow_div hx0.le (by norm_num : (0 : ℝ) < 1 / 4)386linarith387have hl1 : Real.log (x + 1) ≤ 5 * s := by388have h1 : Real.log (x + 1) ≤ Real.log (2 * x) := Real.log_le_log (by linarith) (by linarith)389rw [Real.log_mul (by norm_num) hx0.ne'] at h1390have h2 : Real.log 2 ≤ 2 - 1 := Real.log_le_sub_one_of_pos (by norm_num)391linarith392have hse : s ≤ s * e := le_mul_of_one_le_right (by linarith) he1393have hse1 : 1 ≤ s * e := by linarith394have up : ∀ z : ℝ, 0 ≤ z → z ≤ z * (s * e) := fun z hz => le_mul_of_one_le_right hz hse1395have hMe : 0 ≤ |M| * (4 + Cd + |Ko|) * (s * e) := by positivity396have hCe : 0 ≤ |CE| * (s * e) := by positivity397have hKe : 0 ≤ |Ko| * (s * e) := by positivity398have hCde : 0 ≤ Cd * (s * e) := by positivity399have hR : A1 * (s * e) = 5 * (s * e) + Cd * (s * e) + |Ko| * (s * e) + |M| * (4 + Cd + |Ko|) * (s * e)400+ 4 * (|CE| * (s * e)) := by