analysis.calculus.dslope ⟷ Mathlib.Analysis.Calculus.Dslope

This file has been ported!

Changes since the initial port

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.

Changes in mathlib3

(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)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2022 Yury Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 -/
-import Mathbin.Analysis.Calculus.Deriv.Slope
-import Mathbin.Analysis.Calculus.Deriv.Inv
+import Analysis.Calculus.Deriv.Slope
+import Analysis.Calculus.Deriv.Inv
 
 #align_import analysis.calculus.dslope from "leanprover-community/mathlib"@"61b5e2755ccb464b68d05a9acf891ae04992d09d"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2022 Yury Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
-
-! This file was ported from Lean 3 source module analysis.calculus.dslope
-! leanprover-community/mathlib commit 61b5e2755ccb464b68d05a9acf891ae04992d09d
-! 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.Analysis.Calculus.Deriv.Inv
 
+#align_import analysis.calculus.dslope from "leanprover-community/mathlib"@"61b5e2755ccb464b68d05a9acf891ae04992d09d"
+
 /-!
 # Slope of a differentiable function
 
Diff
@@ -49,10 +49,13 @@ theorem dslope_same (f : π•œ β†’ E) (a : π•œ) : dslope f a a = deriv f a :=
 
 variable {f : π•œ β†’ E} {a b : π•œ} {s : Set π•œ}
 
+#print dslope_of_ne /-
 theorem dslope_of_ne (f : π•œ β†’ E) (h : b β‰  a) : dslope f a b = slope f a b :=
   update_noteq h _ _
 #align dslope_of_ne dslope_of_ne
+-/
 
+#print ContinuousLinearMap.dslope_comp /-
 theorem ContinuousLinearMap.dslope_comp {F : Type _} [NormedAddCommGroup F] [NormedSpace π•œ F]
     (f : E β†’L[π•œ] F) (g : π•œ β†’ E) (a b : π•œ) (H : a = b β†’ DifferentiableAt π•œ g a) :
     dslope (f ∘ g) a b = f (dslope g a b) :=
@@ -62,42 +65,60 @@ theorem ContinuousLinearMap.dslope_comp {F : Type _} [NormedAddCommGroup F] [Nor
     exact (f.has_fderiv_at.comp_has_deriv_at b (H rfl).HasDerivAt).deriv
   Β· simpa only [dslope_of_ne _ hne] using f.to_linear_map.slope_comp g a b
 #align continuous_linear_map.dslope_comp ContinuousLinearMap.dslope_comp
+-/
 
+#print eqOn_dslope_slope /-
 theorem eqOn_dslope_slope (f : π•œ β†’ E) (a : π•œ) : EqOn (dslope f a) (slope f a) ({a}ᢜ) := fun b =>
   dslope_of_ne f
 #align eq_on_dslope_slope eqOn_dslope_slope
+-/
 
+#print dslope_eventuallyEq_slope_of_ne /-
 theorem dslope_eventuallyEq_slope_of_ne (f : π•œ β†’ E) (h : b β‰  a) : dslope f a =αΆ [𝓝 b] slope f a :=
   (eqOn_dslope_slope f a).eventuallyEq_of_mem (isOpen_ne.mem_nhds h)
 #align dslope_eventually_eq_slope_of_ne dslope_eventuallyEq_slope_of_ne
+-/
 
+#print dslope_eventuallyEq_slope_punctured_nhds /-
 theorem dslope_eventuallyEq_slope_punctured_nhds (f : π•œ β†’ E) : dslope f a =αΆ [𝓝[β‰ ] a] slope f a :=
   (eqOn_dslope_slope f a).eventuallyEq_of_mem self_mem_nhdsWithin
 #align dslope_eventually_eq_slope_punctured_nhds dslope_eventuallyEq_slope_punctured_nhds
+-/
 
+#print sub_smul_dslope /-
 @[simp]
 theorem sub_smul_dslope (f : π•œ β†’ E) (a b : π•œ) : (b - a) β€’ dslope f a b = f b - f a := by
   rcases eq_or_ne b a with (rfl | hne) <;> simp [dslope_of_ne, *]
 #align sub_smul_dslope sub_smul_dslope
+-/
 
+#print dslope_sub_smul_of_ne /-
 theorem dslope_sub_smul_of_ne (f : π•œ β†’ E) (h : b β‰  a) : dslope (fun x => (x - a) β€’ f x) a b = f b :=
   by rw [dslope_of_ne _ h, slope_sub_smul _ h.symm]
 #align dslope_sub_smul_of_ne dslope_sub_smul_of_ne
+-/
 
+#print eqOn_dslope_sub_smul /-
 theorem eqOn_dslope_sub_smul (f : π•œ β†’ E) (a : π•œ) :
     EqOn (dslope (fun x => (x - a) β€’ f x) a) f ({a}ᢜ) := fun b => dslope_sub_smul_of_ne f
 #align eq_on_dslope_sub_smul eqOn_dslope_sub_smul
+-/
 
+#print dslope_sub_smul /-
 theorem dslope_sub_smul [DecidableEq π•œ] (f : π•œ β†’ E) (a : π•œ) :
     dslope (fun x => (x - a) β€’ f x) a = update f a (deriv (fun x => (x - a) β€’ f x) a) :=
   eq_update_iff.2 ⟨dslope_same _ _, eqOn_dslope_sub_smul f a⟩
 #align dslope_sub_smul dslope_sub_smul
+-/
 
+#print continuousAt_dslope_same /-
 @[simp]
 theorem continuousAt_dslope_same : ContinuousAt (dslope f a) a ↔ DifferentiableAt π•œ f a := by
   simp only [dslope, continuousAt_update_same, ← hasDerivAt_deriv_iff, hasDerivAt_iff_tendsto_slope]
 #align continuous_at_dslope_same continuousAt_dslope_same
+-/
 
+#print ContinuousWithinAt.of_dslope /-
 theorem ContinuousWithinAt.of_dslope (h : ContinuousWithinAt (dslope f a) s b) :
     ContinuousWithinAt f s b :=
   by
@@ -105,15 +126,21 @@ theorem ContinuousWithinAt.of_dslope (h : ContinuousWithinAt (dslope f a) s b) :
     ((continuousWithinAt_id.sub continuousWithinAt_const).smul h).add continuousWithinAt_const
   simpa only [sub_smul_dslope, sub_add_cancel] using this
 #align continuous_within_at.of_dslope ContinuousWithinAt.of_dslope
+-/
 
+#print ContinuousAt.of_dslope /-
 theorem ContinuousAt.of_dslope (h : ContinuousAt (dslope f a) b) : ContinuousAt f b :=
   (continuousWithinAt_univ _ _).1 h.ContinuousWithinAt.of_dslope
 #align continuous_at.of_dslope ContinuousAt.of_dslope
+-/
 
+#print ContinuousOn.of_dslope /-
 theorem ContinuousOn.of_dslope (h : ContinuousOn (dslope f a) s) : ContinuousOn f s := fun x hx =>
   (h x hx).of_dslope
 #align continuous_on.of_dslope ContinuousOn.of_dslope
+-/
 
+#print continuousWithinAt_dslope_of_ne /-
 theorem continuousWithinAt_dslope_of_ne (h : b β‰  a) :
     ContinuousWithinAt (dslope f a) s b ↔ ContinuousWithinAt f s b :=
   by
@@ -123,11 +150,15 @@ theorem continuousWithinAt_dslope_of_ne (h : b β‰  a) :
     ((continuous_within_at_id.sub continuousWithinAt_const).invβ‚€ (sub_ne_zero.2 h)).smul
       (hc.sub continuousWithinAt_const)
 #align continuous_within_at_dslope_of_ne continuousWithinAt_dslope_of_ne
+-/
 
+#print continuousAt_dslope_of_ne /-
 theorem continuousAt_dslope_of_ne (h : b β‰  a) : ContinuousAt (dslope f a) b ↔ ContinuousAt f b := by
   simp only [← continuousWithinAt_univ, continuousWithinAt_dslope_of_ne h]
 #align continuous_at_dslope_of_ne continuousAt_dslope_of_ne
+-/
 
+#print continuousOn_dslope /-
 theorem continuousOn_dslope (h : s ∈ 𝓝 a) :
     ContinuousOn (dslope f a) s ↔ ContinuousOn f s ∧ DifferentiableAt π•œ f a :=
   by
@@ -137,22 +168,30 @@ theorem continuousOn_dslope (h : s ∈ 𝓝 a) :
   exacts [(continuousAt_dslope_same.2 hd).ContinuousWithinAt,
     (continuousWithinAt_dslope_of_ne hne).2 (hc x hx)]
 #align continuous_on_dslope continuousOn_dslope
+-/
 
+#print DifferentiableWithinAt.of_dslope /-
 theorem DifferentiableWithinAt.of_dslope (h : DifferentiableWithinAt π•œ (dslope f a) s b) :
     DifferentiableWithinAt π•œ f s b := by
   simpa only [id, sub_smul_dslope f a, sub_add_cancel] using
     ((differentiable_within_at_id.sub_const a).smul h).AddConst (f a)
 #align differentiable_within_at.of_dslope DifferentiableWithinAt.of_dslope
+-/
 
+#print DifferentiableAt.of_dslope /-
 theorem DifferentiableAt.of_dslope (h : DifferentiableAt π•œ (dslope f a) b) :
     DifferentiableAt π•œ f b :=
   differentiableWithinAt_univ.1 h.DifferentiableWithinAt.of_dslope
 #align differentiable_at.of_dslope DifferentiableAt.of_dslope
+-/
 
+#print DifferentiableOn.of_dslope /-
 theorem DifferentiableOn.of_dslope (h : DifferentiableOn π•œ (dslope f a) s) :
     DifferentiableOn π•œ f s := fun x hx => (h x hx).of_dslope
 #align differentiable_on.of_dslope DifferentiableOn.of_dslope
+-/
 
+#print differentiableWithinAt_dslope_of_ne /-
 theorem differentiableWithinAt_dslope_of_ne (h : b β‰  a) :
     DifferentiableWithinAt π•œ (dslope f a) s b ↔ DifferentiableWithinAt π•œ f s b :=
   by
@@ -164,15 +203,20 @@ theorem differentiableWithinAt_dslope_of_ne (h : b β‰  a) :
   refine' (eqOn_dslope_slope _ _).eventuallyEq_of_mem _
   exact mem_nhdsWithin_of_mem_nhds (is_open_ne.mem_nhds h)
 #align differentiable_within_at_dslope_of_ne differentiableWithinAt_dslope_of_ne
+-/
 
+#print differentiableOn_dslope_of_nmem /-
 theorem differentiableOn_dslope_of_nmem (h : a βˆ‰ s) :
     DifferentiableOn π•œ (dslope f a) s ↔ DifferentiableOn π•œ f s :=
   forall_congr' fun x =>
     forall_congr' fun hx => differentiableWithinAt_dslope_of_ne <| ne_of_mem_of_not_mem hx h
 #align differentiable_on_dslope_of_nmem differentiableOn_dslope_of_nmem
+-/
 
+#print differentiableAt_dslope_of_ne /-
 theorem differentiableAt_dslope_of_ne (h : b β‰  a) :
     DifferentiableAt π•œ (dslope f a) b ↔ DifferentiableAt π•œ f b := by
   simp only [← differentiableWithinAt_univ, differentiableWithinAt_dslope_of_ne h]
 #align differentiable_at_dslope_of_ne differentiableAt_dslope_of_ne
+-/
 
Diff
@@ -134,7 +134,7 @@ theorem continuousOn_dslope (h : s ∈ 𝓝 a) :
   refine' ⟨fun hc => ⟨hc.of_dslope, continuousAt_dslope_same.1 <| hc.ContinuousAt h⟩, _⟩
   rintro ⟨hc, hd⟩ x hx
   rcases eq_or_ne x a with (rfl | hne)
-  exacts[(continuousAt_dslope_same.2 hd).ContinuousWithinAt,
+  exacts [(continuousAt_dslope_same.2 hd).ContinuousWithinAt,
     (continuousWithinAt_dslope_of_ne hne).2 (hc x hx)]
 #align continuous_on_dslope continuousOn_dslope
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 
 ! This file was ported from Lean 3 source module analysis.calculus.dslope
-! leanprover-community/mathlib commit 3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe
+! leanprover-community/mathlib commit 61b5e2755ccb464b68d05a9acf891ae04992d09d
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.Analysis.Calculus.Deriv.Inv
 /-!
 # Slope of a differentiable function
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 Given a function `f : π•œ β†’ E` from a nontrivially normed field to a normed space over this field,
 `dslope f a b` is defined as `slope f a b = (b - a)⁻¹ β€’ (f b - f a)` for `a β‰  b` and as `deriv f a`
 for `a = b`.
@@ -29,16 +32,20 @@ open Function Set Filter
 
 variable {π•œ E : Type _} [NontriviallyNormedField π•œ] [NormedAddCommGroup E] [NormedSpace π•œ E]
 
+#print dslope /-
 /-- `dslope f a b` is defined as `slope f a b = (b - a)⁻¹ β€’ (f b - f a)` for `a β‰  b` and
 `deriv f a` for `a = b`. -/
 noncomputable def dslope (f : π•œ β†’ E) (a : π•œ) : π•œ β†’ E :=
   update (slope f a) a (deriv f a)
 #align dslope dslope
+-/
 
+#print dslope_same /-
 @[simp]
 theorem dslope_same (f : π•œ β†’ E) (a : π•œ) : dslope f a a = deriv f a :=
   update_same _ _ _
 #align dslope_same dslope_same
+-/
 
 variable {f : π•œ β†’ E} {a b : π•œ} {s : Set π•œ}
 
Diff
@@ -23,7 +23,7 @@ differentiability.
 -/
 
 
-open Classical Topology Filter
+open scoped Classical Topology Filter
 
 open Function Set Filter
 
Diff
@@ -4,11 +4,12 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 
 ! This file was ported from Lean 3 source module analysis.calculus.dslope
-! leanprover-community/mathlib commit 2c1d8ca2812b64f88992a5294ea3dba144755cd1
+! 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.Analysis.Calculus.Deriv.Inv
 
 /-!
 # Slope of a differentiable function
Diff
@@ -4,12 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 
 ! This file was ported from Lean 3 source module analysis.calculus.dslope
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! 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.Analysis.Calculus.Deriv
-import Mathbin.LinearAlgebra.AffineSpace.Slope
 
 /-!
 # Slope of a differentiable function

Changes in mathlib4

mathlib3
mathlib4
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -24,7 +24,7 @@ open scoped Classical Topology Filter
 
 open Function Set Filter
 
-variable {π•œ E : Type _} [NontriviallyNormedField π•œ] [NormedAddCommGroup E] [NormedSpace π•œ E]
+variable {π•œ E : Type*} [NontriviallyNormedField π•œ] [NormedAddCommGroup E] [NormedSpace π•œ E]
 
 /-- `dslope f a b` is defined as `slope f a b = (b - a)⁻¹ β€’ (f b - f a)` for `a β‰  b` and
 `deriv f a` for `a = b`. -/
@@ -43,7 +43,7 @@ theorem dslope_of_ne (f : π•œ β†’ E) (h : b β‰  a) : dslope f a b = slope f a b
   update_noteq h _ _
 #align dslope_of_ne dslope_of_ne
 
-theorem ContinuousLinearMap.dslope_comp {F : Type _} [NormedAddCommGroup F] [NormedSpace π•œ F]
+theorem ContinuousLinearMap.dslope_comp {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F]
     (f : E β†’L[π•œ] F) (g : π•œ β†’ E) (a b : π•œ) (H : a = b β†’ DifferentiableAt π•œ g a) :
     dslope (f ∘ g) a b = f (dslope g a b) := by
   rcases eq_or_ne b a with (rfl | hne)
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2022 Yury Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
-
-! This file was ported from Lean 3 source module analysis.calculus.dslope
-! 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.Analysis.Calculus.Deriv.Inv
 
+#align_import analysis.calculus.dslope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
+
 /-!
 # Slope of a differentiable function
 
fix: change compl precedence (#5586)

Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>

Diff
@@ -55,7 +55,7 @@ theorem ContinuousLinearMap.dslope_comp {F : Type _} [NormedAddCommGroup F] [Nor
   Β· simpa only [dslope_of_ne _ hne] using f.toLinearMap.slope_comp g a b
 #align continuous_linear_map.dslope_comp ContinuousLinearMap.dslope_comp
 
-theorem eqOn_dslope_slope (f : π•œ β†’ E) (a : π•œ) : EqOn (dslope f a) (slope f a) ({a}ᢜ) := fun _ =>
+theorem eqOn_dslope_slope (f : π•œ β†’ E) (a : π•œ) : EqOn (dslope f a) (slope f a) {a}ᢜ := fun _ =>
   dslope_of_ne f
 #align eq_on_dslope_slope eqOn_dslope_slope
 
@@ -78,7 +78,7 @@ theorem dslope_sub_smul_of_ne (f : π•œ β†’ E) (h : b β‰  a) :
 #align dslope_sub_smul_of_ne dslope_sub_smul_of_ne
 
 theorem eqOn_dslope_sub_smul (f : π•œ β†’ E) (a : π•œ) :
-    EqOn (dslope (fun x => (x - a) β€’ f x) a) f ({a}ᢜ) := fun _ => dslope_sub_smul_of_ne f
+    EqOn (dslope (fun x => (x - a) β€’ f x) a) f {a}ᢜ := fun _ => dslope_sub_smul_of_ne f
 #align eq_on_dslope_sub_smul eqOn_dslope_sub_smul
 
 theorem dslope_sub_smul [DecidableEq π•œ] (f : π•œ β†’ E) (a : π•œ) :
feat: port Analysis.Calculus.Dslope (#4491)

Dependencies 10 + 686

687 files ported (98.6%)
303985 lines ported (98.3%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file