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

ZetaAppendix.lemma_approx_monotone_C1_I

PrimeNumberTheoremAnd.IEANTN.ZetaAppendix · PrimeNumberTheoremAnd/IEANTN/ZetaAppendix.lean:831 to 845

Source documentation

Continuous monotone functions on [0,1] can be uniformly approximated by smooth monotone functions (polynomials).

Exact Lean statement

theorem lemma_approx_monotone_C1_I (f : C(I, ℝ)) (hf_mono : Monotone f) :
    ∀ ε > 0, ∃ P : ℝ → ℝ, ContDiffOn ℝ 1 P I ∧ MonotoneOn P I ∧ ∀ x : I, |f x - P x| < ε

Complete declaration

Lean source

Canonical source
Full Lean sourceLean 4
theorem lemma_approx_monotone_C1_I (f : C(I, )) (hf_mono : Monotone f) :     ε > 0,  P :   , ContDiffOn  1 P I  MonotoneOn P I   x : I, |f x - P x| < ε := by  intro ε hεpos  obtain n, hn := Metric.tendsto_atTop.mp (tendsto_iff_norm_sub_tendsto_zero.mp    (bernsteinApproximation_uniform f)) ε hεpos  have hn : ‖bernsteinApproximation n f - f‖ < ε := by simpa [dist_zero_right, norm_norm] using hn n le_rfl  let P :    := fun x  ∑ k : Fin (n + 1), (n.choose k : ) * x ^ (k : ) * (1 - x) ^ (n - k : ) * f (bernstein.z k)  have hP (x) (hx : x  I) : P x = bernsteinApproximation n f x, hx := by    simp [P, bernsteinApproximation, bernstein, bernsteinPolynomial, mul_comm]  refine P, ContDiff.contDiffOn <| ContDiff.sum fun k _  ?_, fun x hx y hy hxy  ?_, fun x  ?_  · apply_rules [ContDiff.mul, ContDiff.pow, contDiff_const, contDiff_id, ContDiff.sub]  · rw [hP x hx, hP y hy]    exact bernsteinApproximation_monotone n f hf_mono (Subtype.mk_le_mk.mpr hxy)  · rw [abs_sub_comm, hP x x.2]    exact lt_of_le_of_lt (ContinuousMap.norm_coe_le_norm (bernsteinApproximation n f - f) x) hn