Skip to main content
AlexKontorovich/PrimeNumberTheoremAnd
Source indexedlemma · leanprover/lean4:v4.32.0

FKS2.sqrt_exp_le_half

PrimeNumberTheoremAnd.IEANTN.FKS2 · PrimeNumberTheoremAnd/IEANTN/FKS2.lean:4679 to 4688

Mathematical statement

Exact Lean statement

lemma sqrt_exp_le_half (v : ℝ) (hv : v ≥ 0) : Real.sqrt v * Real.exp (-v) ≤ 1/2

Complete declaration

Lean source

Canonical source
Full Lean sourceLean 4
lemma sqrt_exp_le_half (v : ) (hv : v  0) : Real.sqrt v * Real.exp (-v)  1/2 := by  -- Let $u = \sqrt{v}$, then the inequality becomes $u e^{-u^2} \leq \frac{1}{2}$.  set u :  := Real.sqrt v  have hu : u * Real.exp (-u^2)  1 / 2 := by    -- We'll use the fact that $u e^{-u^2} \leq \frac{1}{2}$ for all $u \geq 0$. This follows from the fact that the maximum of $u e^{-u^2}$ occurs at $u = \frac{1}{\sqrt{2}}$.    have h_max :  u : , 0  u  u * Real.exp (-u ^ 2)  1 / 2 := by      intro u hu; rw [ Real.exp_neg ] ; ring_nf; norm_num; (      rw [  div_eq_mul_inv, div_le_iff₀ ( Real.exp_pos _ ) ] ; nlinarith [ sq_nonneg ( u - 1 ), Real.add_one_le_exp ( u ^ 2 ) ] ;);    exact h_max u <| Real.sqrt_nonneg v;  rwa [ Real.sq_sqrt hv ] at hu