analysis.calculus.monotone
⟷
Mathlib.Analysis.Calculus.Monotone
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -56,13 +56,13 @@ theorem tendsto_apply_add_mul_sq_div_sub {f : ℝ → ℝ} {x a c d : ℝ} {l :
by
apply tendsto.mono_left _ (hl.trans nhdsWithin_le_nhds)
exact ((tendsto_id.sub_const x).const_mul c).const_add 1
- simp only [_root_.sub_self, add_zero, MulZeroClass.mul_zero] at this
+ simp only [_root_.sub_self, add_zero, MulZeroClass.mul_zero] at this
apply tendsto.congr' (eventually.filter_mono hl _) this
filter_upwards [self_mem_nhdsWithin] with y hy
field_simp [sub_ne_zero.2 hy]
ring
have Z := (hf.comp h').mul L
- rw [mul_one] at Z
+ rw [mul_one] at Z
apply tendsto.congr' _ Z
have : ∀ᶠ y in l, y + c * (y - x) ^ 2 ≠ x := by apply tendsto.mono_right h' hl self_mem_nhdsWithin
filter_upwards [this] with y hy
@@ -164,12 +164,12 @@ theorem Monotone.ae_hasDerivAt {f : ℝ → ℝ} (hf : Monotone f) :
hf.countable_not_continuous_at.ae_not_mem volume] with x hx h'x
have A : hf.stieltjes_function x = f x :=
by
- rw [Classical.not_not, hf.continuous_at_iff_left_lim_eq_right_lim] at h'x
+ rw [Classical.not_not, hf.continuous_at_iff_left_lim_eq_right_lim] at h'x
apply le_antisymm _ (hf.le_right_lim (le_refl _))
rw [← h'x]
exact hf.left_lim_le (le_refl _)
rw [hasDerivAt_iff_tendsto_slope, (nhds_left'_sup_nhds_right' x).symm, tendsto_sup,
- slope_fun_def_field, A] at hx
+ slope_fun_def_field, A] at hx
-- prove differentiability on the right, by sandwiching with values of `g`
have L1 :
tendsto (fun y => (f y - f x) / (y - x)) (𝓝[>] x)
@@ -197,11 +197,11 @@ theorem Monotone.ae_hasDerivAt {f : ℝ → ℝ} (hf : Monotone f) :
· filter_upwards [self_mem_nhdsWithin]
rintro y (hy : x < y)
have : 0 < (y - x) ^ 2 := sq_pos_of_pos (sub_pos.2 hy)
- apply div_le_div_of_le_of_nonneg _ (sub_pos.2 hy).le
+ apply div_le_div_of_nonneg_right _ (sub_pos.2 hy).le
exact (sub_le_sub_iff_right _).2 (hf.right_lim_le (by linarith))
· filter_upwards [self_mem_nhdsWithin]
rintro y (hy : x < y)
- apply div_le_div_of_le_of_nonneg _ (sub_pos.2 hy).le
+ apply div_le_div_of_nonneg_right _ (sub_pos.2 hy).le
exact (sub_le_sub_iff_right _).2 (hf.le_right_lim (le_refl y))
-- prove differentiability on the left, by sandwiching with values of `g`
have L2 :
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,9 +3,9 @@ Copyright (c) 2022 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
-/
-import Mathbin.Analysis.Calculus.Deriv.Slope
-import Mathbin.MeasureTheory.Covering.OneDim
-import Mathbin.Order.Monotone.Extension
+import Analysis.Calculus.Deriv.Slope
+import MeasureTheory.Covering.OneDim
+import Order.Monotone.Extension
#align_import analysis.calculus.monotone from "leanprover-community/mathlib"@"7e5137f579de09a059a5ce98f364a04e221aabf0"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,16 +2,13 @@
Copyright (c) 2022 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
-
-! This file was ported from Lean 3 source module analysis.calculus.monotone
-! leanprover-community/mathlib commit 7e5137f579de09a059a5ce98f364a04e221aabf0
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Analysis.Calculus.Deriv.Slope
import Mathbin.MeasureTheory.Covering.OneDim
import Mathbin.Order.Monotone.Extension
+#align_import analysis.calculus.monotone from "leanprover-community/mathlib"@"7e5137f579de09a059a5ce98f364a04e221aabf0"
+
/-!
# Differentiability of monotone functions
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -42,6 +42,7 @@ open Set Filter Function Metric MeasureTheory MeasureTheory.Measure IsUnifLocDou
open scoped Topology
+#print tendsto_apply_add_mul_sq_div_sub /-
/-- If `(f y - f x) / (y - x)` converges to a limit as `y` tends to `x`, then the same goes if
`y` is shifted a little bit, i.e., `f (y + (y-x)^2) - f x) / (y - x)` converges to the same limit.
This lemma contains a slightly more general version of this statement (where one considers
@@ -70,6 +71,7 @@ theorem tendsto_apply_add_mul_sq_div_sub {f : ℝ → ℝ} {x a c d : ℝ} {l :
filter_upwards [this] with y hy
field_simp [sub_ne_zero.2 hy]
#align tendsto_apply_add_mul_sq_div_sub tendsto_apply_add_mul_sq_div_sub
+-/
#print StieltjesFunction.ae_hasDerivAt /-
/-- A Stieltjes function is almost everywhere differentiable, with derivative equal to the
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e5137f579de09a059a5ce98f364a04e221aabf0
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
! This file was ported from Lean 3 source module analysis.calculus.monotone
-! leanprover-community/mathlib commit 3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe
+! leanprover-community/mathlib commit 7e5137f579de09a059a5ce98f364a04e221aabf0
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -15,6 +15,9 @@ import Mathbin.Order.Monotone.Extension
/-!
# Differentiability of monotone functions
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
We show that a monotone function `f : ℝ → ℝ` is differentiable almost everywhere, in
`monotone.ae_differentiable_at`. (We also give a version for a function monotone on a set, in
`monotone_on.ae_differentiable_within_at`.)
mathlib commit https://github.com/leanprover-community/mathlib/commit/58a272265b5e05f258161260dd2c5d247213cbd3
@@ -68,6 +68,7 @@ theorem tendsto_apply_add_mul_sq_div_sub {f : ℝ → ℝ} {x a c d : ℝ} {l :
field_simp [sub_ne_zero.2 hy]
#align tendsto_apply_add_mul_sq_div_sub tendsto_apply_add_mul_sq_div_sub
+#print StieltjesFunction.ae_hasDerivAt /-
/-- A Stieltjes function is almost everywhere differentiable, with derivative equal to the
Radon-Nikodym derivative of the associated Stieltjes measure with respect to Lebesgue. -/
theorem StieltjesFunction.ae_hasDerivAt (f : StieltjesFunction) :
@@ -145,7 +146,9 @@ theorem StieltjesFunction.ae_hasDerivAt (f : StieltjesFunction) :
rw [hasDerivAt_iff_tendsto_slope, slope_fun_def_field, ← nhds_left'_sup_nhds_right', tendsto_sup]
exact ⟨L4, L1⟩
#align stieltjes_function.ae_has_deriv_at StieltjesFunction.ae_hasDerivAt
+-/
+#print Monotone.ae_hasDerivAt /-
/-- A monotone function is almost everywhere differentiable, with derivative equal to the
Radon-Nikodym derivative of the associated Stieltjes measure with respect to Lebesgue. -/
theorem Monotone.ae_hasDerivAt {f : ℝ → ℝ} (hf : Monotone f) :
@@ -236,12 +239,16 @@ theorem Monotone.ae_hasDerivAt {f : ℝ → ℝ} (hf : Monotone f) :
tendsto_sup]
exact ⟨L2, L1⟩
#align monotone.ae_has_deriv_at Monotone.ae_hasDerivAt
+-/
+#print Monotone.ae_differentiableAt /-
/-- A monotone real function is differentiable Lebesgue-almost everywhere. -/
theorem Monotone.ae_differentiableAt {f : ℝ → ℝ} (hf : Monotone f) : ∀ᵐ x, DifferentiableAt ℝ f x :=
by filter_upwards [hf.ae_has_deriv_at] with x hx using hx.differentiable_at
#align monotone.ae_differentiable_at Monotone.ae_differentiableAt
+-/
+#print MonotoneOn.ae_differentiableWithinAt_of_mem /-
/-- A real function which is monotone on a set is differentiable Lebesgue-almost everywhere on
this set. This version does not assume that `s` is measurable. For a formulation with
`volume.restrict s` assuming that `s` is measurable, see `monotone_on.ae_differentiable_within_at`.
@@ -265,7 +272,9 @@ theorem MonotoneOn.ae_differentiableWithinAt_of_mem {f : ℝ → ℝ} {s : Set
filter_upwards [self_mem_nhdsWithin, this] with y hy h'y
exact gf ⟨hy, h'y.1.le, h'y.2.le⟩
#align monotone_on.ae_differentiable_within_at_of_mem MonotoneOn.ae_differentiableWithinAt_of_mem
+-/
+#print MonotoneOn.ae_differentiableWithinAt /-
/-- A real function which is monotone on a set is differentiable Lebesgue-almost everywhere on
this set. This version assumes that `s` is measurable and uses `volume.restrict s`.
For a formulation without measurability assumption,
@@ -276,4 +285,5 @@ theorem MonotoneOn.ae_differentiableWithinAt {f : ℝ → ℝ} {s : Set ℝ} (hf
rw [ae_restrict_iff' hs]
exact hf.ae_differentiable_within_at_of_mem
#align monotone_on.ae_differentiable_within_at MonotoneOn.ae_differentiableWithinAt
+-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -57,14 +57,14 @@ theorem tendsto_apply_add_mul_sq_div_sub {f : ℝ → ℝ} {x a c d : ℝ} {l :
exact ((tendsto_id.sub_const x).const_mul c).const_add 1
simp only [_root_.sub_self, add_zero, MulZeroClass.mul_zero] at this
apply tendsto.congr' (eventually.filter_mono hl _) this
- filter_upwards [self_mem_nhdsWithin]with y hy
+ filter_upwards [self_mem_nhdsWithin] with y hy
field_simp [sub_ne_zero.2 hy]
ring
have Z := (hf.comp h').mul L
rw [mul_one] at Z
apply tendsto.congr' _ Z
have : ∀ᶠ y in l, y + c * (y - x) ^ 2 ≠ x := by apply tendsto.mono_right h' hl self_mem_nhdsWithin
- filter_upwards [this]with y hy
+ filter_upwards [this] with y hy
field_simp [sub_ne_zero.2 hy]
#align tendsto_apply_add_mul_sq_div_sub tendsto_apply_add_mul_sq_div_sub
@@ -81,7 +81,7 @@ theorem StieltjesFunction.ae_hasDerivAt (f : StieltjesFunction) :
As `μ [y, x] = f x - f (y^-)`, this is not exactly the right result, so one uses a sandwiching
argument to deduce the convergence for `(f x - f y) / (x - y)`. -/
filter_upwards [VitaliFamily.ae_tendsto_rnDeriv (VitaliFamily (volume : Measure ℝ) 1) f.measure,
- rn_deriv_lt_top f.measure volume, f.countable_left_lim_ne.ae_not_mem volume]with x hx h'x h''x
+ rn_deriv_lt_top f.measure volume, f.countable_left_lim_ne.ae_not_mem volume] with x hx h'x h''x
-- Limit on the right, following from differentiation of measures
have L1 :
tendsto (fun y => (f y - f x) / (y - x)) (𝓝[>] x) (𝓝 (rn_deriv f.measure volume x).toReal) :=
@@ -156,7 +156,7 @@ theorem Monotone.ae_hasDerivAt {f : ℝ → ℝ} (hf : Monotone f) :
values of `g`, by shifting with `(y - x)^2` (which has no influence on the relevant
scale `y - x`.)-/
filter_upwards [hf.stieltjes_function.ae_has_deriv_at,
- hf.countable_not_continuous_at.ae_not_mem volume]with x hx h'x
+ hf.countable_not_continuous_at.ae_not_mem volume] with x hx h'x
have A : hf.stieltjes_function x = f x :=
by
rw [Classical.not_not, hf.continuous_at_iff_left_lim_eq_right_lim] at h'x
@@ -239,7 +239,7 @@ theorem Monotone.ae_hasDerivAt {f : ℝ → ℝ} (hf : Monotone f) :
/-- A monotone real function is differentiable Lebesgue-almost everywhere. -/
theorem Monotone.ae_differentiableAt {f : ℝ → ℝ} (hf : Monotone f) : ∀ᵐ x, DifferentiableAt ℝ f x :=
- by filter_upwards [hf.ae_has_deriv_at]with x hx using hx.differentiable_at
+ by filter_upwards [hf.ae_has_deriv_at] with x hx using hx.differentiable_at
#align monotone.ae_differentiable_at Monotone.ae_differentiableAt
/-- A real function which is monotone on a set is differentiable Lebesgue-almost everywhere on
@@ -258,11 +258,11 @@ theorem MonotoneOn.ae_differentiableWithinAt_of_mem {f : ℝ → ℝ} {s : Set
(hf.mono (inter_subset_left s (Icc a b))).exists_monotone_extension
(hf.map_bdd_below (inter_subset_left _ _) ⟨a, fun x hx => hx.2.1, as⟩)
(hf.map_bdd_above (inter_subset_left _ _) ⟨b, fun x hx => hx.2.2, bs⟩)
- filter_upwards [hg.ae_differentiable_at]with x hx
+ filter_upwards [hg.ae_differentiable_at] with x hx
intro h'x
apply hx.differentiable_within_at.congr_of_eventually_eq _ (gf ⟨h'x.1, h'x.2.1.le, h'x.2.2.le⟩)
have : Ioo a b ∈ 𝓝[s] x := nhdsWithin_le_nhds (Ioo_mem_nhds h'x.2.1 h'x.2.2)
- filter_upwards [self_mem_nhdsWithin, this]with y hy h'y
+ filter_upwards [self_mem_nhdsWithin, this] with y hy h'y
exact gf ⟨hy, h'y.1.le, h'y.2.le⟩
#align monotone_on.ae_differentiable_within_at_of_mem MonotoneOn.ae_differentiableWithinAt_of_mem
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -55,13 +55,13 @@ theorem tendsto_apply_add_mul_sq_div_sub {f : ℝ → ℝ} {x a c d : ℝ} {l :
by
apply tendsto.mono_left _ (hl.trans nhdsWithin_le_nhds)
exact ((tendsto_id.sub_const x).const_mul c).const_add 1
- simp only [_root_.sub_self, add_zero, MulZeroClass.mul_zero] at this
+ simp only [_root_.sub_self, add_zero, MulZeroClass.mul_zero] at this
apply tendsto.congr' (eventually.filter_mono hl _) this
filter_upwards [self_mem_nhdsWithin]with y hy
field_simp [sub_ne_zero.2 hy]
ring
have Z := (hf.comp h').mul L
- rw [mul_one] at Z
+ rw [mul_one] at Z
apply tendsto.congr' _ Z
have : ∀ᶠ y in l, y + c * (y - x) ^ 2 ≠ x := by apply tendsto.mono_right h' hl self_mem_nhdsWithin
filter_upwards [this]with y hy
@@ -159,12 +159,12 @@ theorem Monotone.ae_hasDerivAt {f : ℝ → ℝ} (hf : Monotone f) :
hf.countable_not_continuous_at.ae_not_mem volume]with x hx h'x
have A : hf.stieltjes_function x = f x :=
by
- rw [Classical.not_not, hf.continuous_at_iff_left_lim_eq_right_lim] at h'x
+ rw [Classical.not_not, hf.continuous_at_iff_left_lim_eq_right_lim] at h'x
apply le_antisymm _ (hf.le_right_lim (le_refl _))
rw [← h'x]
exact hf.left_lim_le (le_refl _)
rw [hasDerivAt_iff_tendsto_slope, (nhds_left'_sup_nhds_right' x).symm, tendsto_sup,
- slope_fun_def_field, A] at hx
+ slope_fun_def_field, A] at hx
-- prove differentiability on the right, by sandwiching with values of `g`
have L1 :
tendsto (fun y => (f y - f x) / (y - x)) (𝓝[>] x)
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -37,7 +37,7 @@ behavior of `μ [x, y]`.
open Set Filter Function Metric MeasureTheory MeasureTheory.Measure IsUnifLocDoublingMeasure
-open Topology
+open scoped Topology
/-- If `(f y - f x) / (y - x)` converges to a limit as `y` tends to `x`, then the same goes if
`y` is shifted a little bit, i.e., `f (y + (y-x)^2) - f x) / (y - x)` converges to the same limit.
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -120,9 +120,7 @@ theorem StieltjesFunction.ae_hasDerivAt (f : StieltjesFunction) :
have : tendsto (fun y : ℝ => y + 1 * (y - x) ^ 2) (𝓝 x) (𝓝 (x + 1 * (x - x) ^ 2)) :=
tendsto_id.add (((tendsto_id.sub_const x).pow 2).const_mul 1)
simpa using this
- · have : Ioo (x - 1) x ∈ 𝓝[<] x :=
- by
- apply Ioo_mem_nhdsWithin_Iio
+ · have : Ioo (x - 1) x ∈ 𝓝[<] x := by apply Ioo_mem_nhdsWithin_Iio;
exact ⟨by linarith, le_refl _⟩
filter_upwards [this]
rintro y ⟨hy : x - 1 < y, h'y : y < x⟩
@@ -183,9 +181,7 @@ theorem Monotone.ae_hasDerivAt {f : ℝ → ℝ} (hf : Monotone f) :
have : tendsto (fun y : ℝ => y + -1 * (y - x) ^ 2) (𝓝 x) (𝓝 (x + -1 * (x - x) ^ 2)) :=
tendsto_id.add (((tendsto_id.sub_const x).pow 2).const_mul (-1))
simpa using this
- · have : Ioo x (x + 1) ∈ 𝓝[>] x :=
- by
- apply Ioo_mem_nhdsWithin_Ioi
+ · have : Ioo x (x + 1) ∈ 𝓝[>] x := by apply Ioo_mem_nhdsWithin_Ioi;
exact ⟨le_refl _, by linarith⟩
filter_upwards [this]
rintro y ⟨hy : x < y, h'y : y < x + 1⟩
@@ -218,9 +214,7 @@ theorem Monotone.ae_hasDerivAt {f : ℝ → ℝ} (hf : Monotone f) :
have : tendsto (fun y : ℝ => y + -1 * (y - x) ^ 2) (𝓝 x) (𝓝 (x + -1 * (x - x) ^ 2)) :=
tendsto_id.add (((tendsto_id.sub_const x).pow 2).const_mul (-1))
simpa using this
- · have : Ioo (x - 1) x ∈ 𝓝[<] x :=
- by
- apply Ioo_mem_nhdsWithin_Iio
+ · have : Ioo (x - 1) x ∈ 𝓝[<] x := by apply Ioo_mem_nhdsWithin_Iio;
exact ⟨by linarith, le_refl _⟩
filter_upwards [this]
rintro y ⟨hy : x - 1 < y, h'y : y < x⟩
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -4,11 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
! This file was ported from Lean 3 source module analysis.calculus.monotone
-! leanprover-community/mathlib commit 8f9fea08977f7e450770933ee6abb20733b47c92
+! leanprover-community/mathlib commit 3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
-import Mathbin.Analysis.Calculus.Deriv
+import Mathbin.Analysis.Calculus.Deriv.Slope
import Mathbin.MeasureTheory.Covering.OneDim
import Mathbin.Order.Monotone.Extension
mathlib commit https://github.com/leanprover-community/mathlib/commit/95a87616d63b3cb49d3fe678d416fbe9c4217bf4
@@ -4,10 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
! This file was ported from Lean 3 source module analysis.calculus.monotone
-! leanprover-community/mathlib commit 2c1d8ca2812b64f88992a5294ea3dba144755cd1
+! leanprover-community/mathlib commit 8f9fea08977f7e450770933ee6abb20733b47c92
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
+import Mathbin.Analysis.Calculus.Deriv
import Mathbin.MeasureTheory.Covering.OneDim
import Mathbin.Order.Monotone.Extension
mathlib commit https://github.com/leanprover-community/mathlib/commit/36b8aa61ea7c05727161f96a0532897bd72aedab
@@ -4,12 +4,10 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
! This file was ported from Lean 3 source module analysis.calculus.monotone
-! leanprover-community/mathlib commit 5f6e827d81dfbeb6151d7016586ceeb0099b9655
+! leanprover-community/mathlib commit 2c1d8ca2812b64f88992a5294ea3dba144755cd1
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
-import Mathbin.MeasureTheory.Measure.Lebesgue
-import Mathbin.Analysis.Calculus.Deriv
import Mathbin.MeasureTheory.Covering.OneDim
import Mathbin.Order.Monotone.Extension
mathlib commit https://github.com/leanprover-community/mathlib/commit/d95bef0d215ea58c0fd7bbc4b151bf3fe952c095
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
! This file was ported from Lean 3 source module analysis.calculus.monotone
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! leanprover-community/mathlib commit 5f6e827d81dfbeb6151d7016586ceeb0099b9655
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -36,7 +36,7 @@ behavior of `μ [x, y]`.
-/
-open Set Filter Function Metric MeasureTheory MeasureTheory.Measure IsDoublingMeasure
+open Set Filter Function Metric MeasureTheory MeasureTheory.Measure IsUnifLocDoublingMeasure
open Topology
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -56,7 +56,7 @@ theorem tendsto_apply_add_mul_sq_div_sub {f : ℝ → ℝ} {x a c d : ℝ} {l :
by
apply tendsto.mono_left _ (hl.trans nhdsWithin_le_nhds)
exact ((tendsto_id.sub_const x).const_mul c).const_add 1
- simp only [_root_.sub_self, add_zero, mul_zero] at this
+ simp only [_root_.sub_self, add_zero, MulZeroClass.mul_zero] at this
apply tendsto.congr' (eventually.filter_mono hl _) this
filter_upwards [self_mem_nhdsWithin]with y hy
field_simp [sub_ne_zero.2 hy]
mathlib commit https://github.com/leanprover-community/mathlib/commit/eb0cb4511aaef0da2462207b67358a0e1fe1e2ee
@@ -89,11 +89,11 @@ theorem StieltjesFunction.ae_hasDerivAt (f : StieltjesFunction) :
by
apply
tendsto.congr' _
- ((Ennreal.tendsto_toReal h'x.ne).comp (hx.comp (Real.tendsto_Icc_vitaliFamily_right x)))
+ ((ENNReal.tendsto_toReal h'x.ne).comp (hx.comp (Real.tendsto_Icc_vitaliFamily_right x)))
filter_upwards [self_mem_nhdsWithin]
rintro y (hxy : x < y)
simp only [comp_app, StieltjesFunction.measure_Icc, Real.volume_Icc, Classical.not_not.1 h''x]
- rw [← Ennreal.ofReal_div_of_pos (sub_pos.2 hxy), Ennreal.toReal_ofReal]
+ rw [← ENNReal.ofReal_div_of_pos (sub_pos.2 hxy), ENNReal.toReal_ofReal]
exact div_nonneg (sub_nonneg.2 (f.mono hxy.le)) (sub_pos.2 hxy).le
-- Limit on the left, following from differentiation of measures. Its form is not exactly the one
-- we need, due to the appearance of a left limit.
@@ -103,11 +103,11 @@ theorem StieltjesFunction.ae_hasDerivAt (f : StieltjesFunction) :
by
apply
tendsto.congr' _
- ((Ennreal.tendsto_toReal h'x.ne).comp (hx.comp (Real.tendsto_Icc_vitaliFamily_left x)))
+ ((ENNReal.tendsto_toReal h'x.ne).comp (hx.comp (Real.tendsto_Icc_vitaliFamily_left x)))
filter_upwards [self_mem_nhdsWithin]
rintro y (hxy : y < x)
simp only [comp_app, StieltjesFunction.measure_Icc, Real.volume_Icc]
- rw [← Ennreal.ofReal_div_of_pos (sub_pos.2 hxy), Ennreal.toReal_ofReal, ← neg_neg (y - x),
+ rw [← ENNReal.ofReal_div_of_pos (sub_pos.2 hxy), ENNReal.toReal_ofReal, ← neg_neg (y - x),
div_neg, neg_div', neg_sub, neg_sub]
exact div_nonneg (sub_nonneg.2 (f.mono.left_lim_le hxy.le)) (sub_pos.2 hxy).le
-- Shifting a little bit the limit on the left, by `(y - x)^2`.
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -168,12 +168,12 @@ theorem Monotone.ae_hasDerivAt {f : ℝ → ℝ} (hf : Monotone f) :
norm_num; nlinarith
-- apply the sandwiching argument, with the helper function and `g`
apply tendsto_of_tendsto_of_tendsto_of_le_of_le' this hx.2
- · filter_upwards [self_mem_nhdsWithin] with y (hy : x < y)
- rw [← sub_pos] at hy
+ · filter_upwards [self_mem_nhdsWithin] with y hy
+ rw [mem_Ioi, ← sub_pos] at hy
gcongr
exact hf.rightLim_le (by nlinarith)
- · filter_upwards [self_mem_nhdsWithin] with y (hy : x < y)
- rw [← sub_pos] at hy
+ · filter_upwards [self_mem_nhdsWithin] with y hy
+ rw [mem_Ioi, ← sub_pos] at hy
gcongr
exact hf.le_rightLim le_rfl
-- prove differentiability on the left, by sandwiching with values of `g`
@@ -191,19 +191,22 @@ theorem Monotone.ae_hasDerivAt {f : ℝ → ℝ} (hf : Monotone f) :
· have : Ioo (x - 1) x ∈ 𝓝[<] x := by
apply Ioo_mem_nhdsWithin_Iio; exact ⟨by linarith, le_refl _⟩
filter_upwards [this]
- rintro y ⟨hy : x - 1 < y, h'y : y < x⟩
+ rintro y hy
+ rw [mem_Ioo] at hy
rw [mem_Iio]
norm_num; nlinarith
-- apply the sandwiching argument, with `g` and the helper function
apply tendsto_of_tendsto_of_tendsto_of_le_of_le' hx.1 this
· filter_upwards [self_mem_nhdsWithin]
- rintro y (hy : y < x)
- apply div_le_div_of_nonpos_of_le (sub_neg.2 hy).le
+ rintro y hy
+ rw [mem_Iio, ← sub_neg] at hy
+ apply div_le_div_of_nonpos_of_le hy.le
exact (sub_le_sub_iff_right _).2 (hf.le_rightLim (le_refl _))
· filter_upwards [self_mem_nhdsWithin]
- rintro y (hy : y < x)
- have : ↑0 < (y - x) ^ 2 := sq_pos_of_neg (sub_neg.2 hy)
- apply div_le_div_of_nonpos_of_le (sub_neg.2 hy).le
+ rintro y hy
+ rw [mem_Iio, ← sub_neg] at hy
+ have : 0 < (y - x) ^ 2 := sq_pos_of_neg hy
+ apply div_le_div_of_nonpos_of_le hy.le
exact (sub_le_sub_iff_right _).2 (hf.rightLim_le (by norm_num; linarith))
-- conclude global differentiability
rw [hasDerivAt_iff_tendsto_slope, slope_fun_def_field, (nhds_left'_sup_nhds_right' x).symm,
@@ -168,15 +168,14 @@ theorem Monotone.ae_hasDerivAt {f : ℝ → ℝ} (hf : Monotone f) :
norm_num; nlinarith
-- apply the sandwiching argument, with the helper function and `g`
apply tendsto_of_tendsto_of_tendsto_of_le_of_le' this hx.2
- · filter_upwards [self_mem_nhdsWithin]
- rintro y (hy : x < y)
- have : ↑0 < (y - x) ^ 2 := sq_pos_of_pos (sub_pos.2 hy)
- apply div_le_div_of_le (sub_pos.2 hy).le
- exact (sub_le_sub_iff_right _).2 (hf.rightLim_le (by norm_num; linarith))
- · filter_upwards [self_mem_nhdsWithin]
- rintro y (hy : x < y)
- apply div_le_div_of_le (sub_pos.2 hy).le
- exact (sub_le_sub_iff_right _).2 (hf.le_rightLim (le_refl y))
+ · filter_upwards [self_mem_nhdsWithin] with y (hy : x < y)
+ rw [← sub_pos] at hy
+ gcongr
+ exact hf.rightLim_le (by nlinarith)
+ · filter_upwards [self_mem_nhdsWithin] with y (hy : x < y)
+ rw [← sub_pos] at hy
+ gcongr
+ exact hf.le_rightLim le_rfl
-- prove differentiability on the left, by sandwiching with values of `g`
have L2 : Tendsto (fun y => (f y - f x) / (y - x)) (𝓝[<] x)
(𝓝 (rnDeriv hf.stieltjesFunction.measure volume x).toReal) := by
@@ -171,11 +171,11 @@ theorem Monotone.ae_hasDerivAt {f : ℝ → ℝ} (hf : Monotone f) :
· filter_upwards [self_mem_nhdsWithin]
rintro y (hy : x < y)
have : ↑0 < (y - x) ^ 2 := sq_pos_of_pos (sub_pos.2 hy)
- apply div_le_div_of_le_of_nonneg _ (sub_pos.2 hy).le
+ apply div_le_div_of_le (sub_pos.2 hy).le
exact (sub_le_sub_iff_right _).2 (hf.rightLim_le (by norm_num; linarith))
· filter_upwards [self_mem_nhdsWithin]
rintro y (hy : x < y)
- apply div_le_div_of_le_of_nonneg _ (sub_pos.2 hy).le
+ apply div_le_div_of_le (sub_pos.2 hy).le
exact (sub_le_sub_iff_right _).2 (hf.le_rightLim (le_refl y))
-- prove differentiability on the left, by sandwiching with values of `g`
have L2 : Tendsto (fun y => (f y - f x) / (y - x)) (𝓝[<] x)
This is the supremum of
along with some minor fixes from failures on nightly-testing as Mathlib master
is merged into it.
Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.
I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0
branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.
In particular this includes adjustments for the Lean PRs
We can get rid of all the
local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)
macros across Mathlib (and in any projects that want to write natural number powers of reals).
Changes the default behaviour of simp
to (config := {decide := false})
. This makes simp
(and consequentially norm_num
) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp
or norm_num
to decide
or rfl
, or adding (config := {decide := true})
.
This changed the behaviour of simp
so that simp [f]
will only unfold "fully applied" occurrences of f
. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true })
. We may in future add a syntax for this, e.g. simp [!f]
; please provide feedback! In the meantime, we have made the following changes:
(config := { unfoldPartialApp := true })
in some places, to recover the old behaviour@[eqns]
to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp
and Function.flip
.This change in Lean may require further changes down the line (e.g. adding the !f
syntax, and/or upstreaming the special treatment for Function.comp
and Function.flip
, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!
Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>
@@ -36,8 +36,6 @@ open Set Filter Function Metric MeasureTheory MeasureTheory.Measure IsUnifLocDou
open scoped Topology
-local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue lean4#2220
-
/-- If `(f y - f x) / (y - x)` converges to a limit as `y` tends to `x`, then the same goes if
`y` is shifted a little bit, i.e., `f (y + (y-x)^2) - f x) / (y - x)` converges to the same limit.
This lemma contains a slightly more general version of this statement (where one considers
MulZeroClass.
in mul_zero
/zero_mul
(#6682)
Search&replace MulZeroClass.mul_zero
-> mul_zero
, MulZeroClass.zero_mul
-> zero_mul
.
These were introduced by Mathport, as the full name of mul_zero
is actually MulZeroClass.mul_zero
(it's exported with the short name).
@@ -51,7 +51,7 @@ theorem tendsto_apply_add_mul_sq_div_sub {f : ℝ → ℝ} {x a c d : ℝ} {l :
have : Tendsto (fun y => 1 + c * (y - x)) l (𝓝 (1 + c * (x - x))) := by
apply Tendsto.mono_left _ (hl.trans nhdsWithin_le_nhds)
exact ((tendsto_id.sub_const x).const_mul c).const_add 1
- simp only [_root_.sub_self, add_zero, MulZeroClass.mul_zero] at this
+ simp only [_root_.sub_self, add_zero, mul_zero] at this
apply Tendsto.congr' (Eventually.filter_mono hl _) this
filter_upwards [self_mem_nhdsWithin] with y hy
field_simp [sub_ne_zero.2 hy]
@@ -36,7 +36,7 @@ open Set Filter Function Metric MeasureTheory MeasureTheory.Measure IsUnifLocDou
open scoped Topology
-local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue #2220
+local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue lean4#2220
/-- If `(f y - f x) / (y - x)` converges to a limit as `y` tends to `x`, then the same goes if
`y` is shifted a little bit, i.e., `f (y + (y-x)^2) - f x) / (y - x)` converges to the same limit.
@@ -2,16 +2,13 @@
Copyright (c) 2022 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
-
-! This file was ported from Lean 3 source module analysis.calculus.monotone
-! leanprover-community/mathlib commit 3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.MeasureTheory.Covering.OneDim
import Mathlib.Order.Monotone.Extension
+#align_import analysis.calculus.monotone from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
+
/-!
# Differentiability of monotone functions
The unported dependencies are
algebra.order.module
init.core
linear_algebra.free_module.finite.rank
algebra.order.monoid.cancel.defs
algebra.abs
algebra.group_power.lemmas
init.data.list.basic
linear_algebra.free_module.rank
algebra.order.monoid.cancel.basic
init.data.list.default
topology.subset_properties
init.logic
The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file