AlexKontorovich/PrimeNumberTheoremAnd
Source indexedlemma · leanprover/lean4:v4.32.0
FKS2.h_monotoneOn
PrimeNumberTheoremAnd.IEANTN.FKS2 · PrimeNumberTheoremAnd/IEANTN/FKS2.lean:3418 to 3444
Mathematical statement
Exact Lean statement
lemma h_monotoneOn {x₁ : ℝ} (hx₁ : x₁ ≥ 14) :
MonotoneOn (fun t => (log t / t) * ∫ s in x₁..t, 1 / (log s) ^ 2)
(Set.Icc x₁ (x₁ * log x₁))Complete declaration
Lean source
Full Lean sourceLean 4
lemma h_monotoneOn {x₁ : ℝ} (hx₁ : x₁ ≥ 14) : MonotoneOn (fun t => (log t / t) * ∫ s in x₁..t, 1 / (log s) ^ 2) (Set.Icc x₁ (x₁ * log x₁)) := by -- Let $I(t) = \int_{x₁}^t 1 / (\log s)^2 \, ds$. set I : ℝ → ℝ := fun t => ∫ s in x₁..t, 1 / (Real.log s) ^ 2; -- We need to show that $u(t) = \frac{t}{\log t} - (\log t - 1)I(t)$ is non-negative on $[x₁, x₁ \log x₁]$. have hu_nonneg : ∀ t ∈ Set.Icc x₁ (x₁ * Real.log x₁), t / Real.log t - (Real.log t - 1) * I t ≥ 0 := by intros t ht have h_u_eq := u_eq_sub_integral hx₁ ht have h_I_bound := integral_I_div_self_le hx₁ ht rw [integral_sub_div_self (by linarith : 0 < x₁) ht.1] at h_I_bound dsimp only [I] linarith [hu_simplify hx₁ ht] have h_deriv : ∀ t ∈ Set.Ioo x₁ (x₁ * Real.log x₁), HasDerivAt (fun t => (Real.log t / t) * I t) ((t / Real.log t - (Real.log t - 1) * I t) / t^2) t := fun t ht => h_deriv_at hx₁ ht intro a ha b hb hab; rcases eq_or_lt_of_le hab with rfl | hab' <;> norm_num at *; obtain ⟨c, hc⟩ : ∃ c ∈ Set.Ioo a b, deriv (fun t => (Real.log t / t) * I t) c = ((fun t => (Real.log t / t) * I t) b - (fun t => (Real.log t / t) * I t) a) / (b - a) := by apply_rules [ exists_deriv_eq_slope ]; · refine ContinuousOn.mul ( ContinuousOn.div ( Real.continuousOn_log.mono <| by intro t ht; exact ne_of_gt <| by linarith [ ht.1 ] ) continuousOn_id <| by intro t ht; linarith [ ht.1 ] ) ?_; intro t ht; apply_rules [ intervalIntegral.continuousWithinAt_primitive ] · aesop · apply_rules [ ContinuousOn.intervalIntegrable ]; exact continuousOn_of_forall_continuousAt fun x hx => ContinuousAt.div continuousAt_const ( ContinuousAt.pow ( Real.continuousAt_log ( by cases Set.mem_uIcc.mp hx <;> cases min_cases x₁ a <;> cases max_cases x₁ b <;> linarith [ ht.1, ht.2 ] ) ) _ ) ( ne_of_gt ( sq_pos_of_pos ( Real.log_pos ( by cases Set.mem_uIcc.mp hx <;> cases min_cases x₁ a <;> cases max_cases x₁ b <;> linarith [ ht.1, ht.2 ] ) ) ) ); · exact fun t ht => ( h_deriv t ( by linarith [ ht.1 ] ) ( by linarith [ ht.2 ] ) |> HasDerivAt.differentiableAt |> DifferentiableAt.differentiableWithinAt ); simp +zetaDelta only [one_div, Set.mem_Ioo] at * have hd := (h_deriv c (by linarith) (by linarith)).deriv rw [eq_div_iff] at * <;> nlinarith [hu_nonneg c (by linarith) (by linarith), show 0 < c ^ 2 by nlinarith]