Context
stringlengths
57
6.04k
file_name
stringlengths
21
79
start
int64
14
1.49k
end
int64
18
1.5k
theorem
stringlengths
25
1.55k
proof
stringlengths
5
7.36k
rank
int64
0
2.4k
import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Add import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.Deriv.Inverse #align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical NNReal Nat local notation "∞" => (⊀ : β„•βˆž) universe u v w uD uE uF uG attribute [local instance 1001] NormedAddCommGroup.toAddCommGroup NormedSpace.toModule' AddCommGroup.toAddCommMonoid open Set Fin Filter Function open scoped Topology variable {π•œ : Type*} [NontriviallyNormedField π•œ] {D : Type uD} [NormedAddCommGroup D] [NormedSpace π•œ D] {E : Type uE} [NormedAddCommGroup E] [NormedSpace π•œ E] {F : Type uF} [NormedAddCommGroup F] [NormedSpace π•œ F] {G : Type uG} [NormedAddCommGroup G] [NormedSpace π•œ G] {X : Type*} [NormedAddCommGroup X] [NormedSpace π•œ X] {s s₁ t u : Set E} {f f₁ : E β†’ F} {g : F β†’ G} {x xβ‚€ : E} {c : F} {b : E Γ— F β†’ G} {m n : β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F} @[simp] theorem iteratedFDerivWithin_zero_fun (hs : UniqueDiffOn π•œ s) (hx : x ∈ s) {i : β„•} : iteratedFDerivWithin π•œ i (fun _ : E ↦ (0 : F)) s x = 0 := by induction i generalizing x with | zero => ext; simp | succ i IH => ext m rw [iteratedFDerivWithin_succ_apply_left, fderivWithin_congr (fun _ ↦ IH) (IH hx)] rw [fderivWithin_const_apply _ (hs x hx)] rfl @[simp] theorem iteratedFDeriv_zero_fun {n : β„•} : (iteratedFDeriv π•œ n fun _ : E ↦ (0 : F)) = 0 := funext fun x ↦ by simpa [← iteratedFDerivWithin_univ] using iteratedFDerivWithin_zero_fun uniqueDiffOn_univ (mem_univ x) #align iterated_fderiv_zero_fun iteratedFDeriv_zero_fun theorem contDiff_zero_fun : ContDiff π•œ n fun _ : E => (0 : F) := contDiff_of_differentiable_iteratedFDeriv fun m _ => by rw [iteratedFDeriv_zero_fun] exact differentiable_const (0 : E[Γ—m]β†’L[π•œ] F) #align cont_diff_zero_fun contDiff_zero_fun theorem contDiff_const {c : F} : ContDiff π•œ n fun _ : E => c := by suffices h : ContDiff π•œ ∞ fun _ : E => c from h.of_le le_top rw [contDiff_top_iff_fderiv] refine ⟨differentiable_const c, ?_⟩ rw [fderiv_const] exact contDiff_zero_fun #align cont_diff_const contDiff_const theorem contDiffOn_const {c : F} {s : Set E} : ContDiffOn π•œ n (fun _ : E => c) s := contDiff_const.contDiffOn #align cont_diff_on_const contDiffOn_const theorem contDiffAt_const {c : F} : ContDiffAt π•œ n (fun _ : E => c) x := contDiff_const.contDiffAt #align cont_diff_at_const contDiffAt_const theorem contDiffWithinAt_const {c : F} : ContDiffWithinAt π•œ n (fun _ : E => c) s x := contDiffAt_const.contDiffWithinAt #align cont_diff_within_at_const contDiffWithinAt_const @[nontriviality]
Mathlib/Analysis/Calculus/ContDiff/Basic.lean
107
108
theorem contDiff_of_subsingleton [Subsingleton F] : ContDiff π•œ n f := by
rw [Subsingleton.elim f fun _ => 0]; exact contDiff_const
1,616
import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Add import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.Deriv.Inverse #align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical NNReal Nat local notation "∞" => (⊀ : β„•βˆž) universe u v w uD uE uF uG attribute [local instance 1001] NormedAddCommGroup.toAddCommGroup NormedSpace.toModule' AddCommGroup.toAddCommMonoid open Set Fin Filter Function open scoped Topology variable {π•œ : Type*} [NontriviallyNormedField π•œ] {D : Type uD} [NormedAddCommGroup D] [NormedSpace π•œ D] {E : Type uE} [NormedAddCommGroup E] [NormedSpace π•œ E] {F : Type uF} [NormedAddCommGroup F] [NormedSpace π•œ F] {G : Type uG} [NormedAddCommGroup G] [NormedSpace π•œ G] {X : Type*} [NormedAddCommGroup X] [NormedSpace π•œ X] {s s₁ t u : Set E} {f f₁ : E β†’ F} {g : F β†’ G} {x xβ‚€ : E} {c : F} {b : E Γ— F β†’ G} {m n : β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F} @[simp] theorem iteratedFDerivWithin_zero_fun (hs : UniqueDiffOn π•œ s) (hx : x ∈ s) {i : β„•} : iteratedFDerivWithin π•œ i (fun _ : E ↦ (0 : F)) s x = 0 := by induction i generalizing x with | zero => ext; simp | succ i IH => ext m rw [iteratedFDerivWithin_succ_apply_left, fderivWithin_congr (fun _ ↦ IH) (IH hx)] rw [fderivWithin_const_apply _ (hs x hx)] rfl @[simp] theorem iteratedFDeriv_zero_fun {n : β„•} : (iteratedFDeriv π•œ n fun _ : E ↦ (0 : F)) = 0 := funext fun x ↦ by simpa [← iteratedFDerivWithin_univ] using iteratedFDerivWithin_zero_fun uniqueDiffOn_univ (mem_univ x) #align iterated_fderiv_zero_fun iteratedFDeriv_zero_fun theorem contDiff_zero_fun : ContDiff π•œ n fun _ : E => (0 : F) := contDiff_of_differentiable_iteratedFDeriv fun m _ => by rw [iteratedFDeriv_zero_fun] exact differentiable_const (0 : E[Γ—m]β†’L[π•œ] F) #align cont_diff_zero_fun contDiff_zero_fun theorem contDiff_const {c : F} : ContDiff π•œ n fun _ : E => c := by suffices h : ContDiff π•œ ∞ fun _ : E => c from h.of_le le_top rw [contDiff_top_iff_fderiv] refine ⟨differentiable_const c, ?_⟩ rw [fderiv_const] exact contDiff_zero_fun #align cont_diff_const contDiff_const theorem contDiffOn_const {c : F} {s : Set E} : ContDiffOn π•œ n (fun _ : E => c) s := contDiff_const.contDiffOn #align cont_diff_on_const contDiffOn_const theorem contDiffAt_const {c : F} : ContDiffAt π•œ n (fun _ : E => c) x := contDiff_const.contDiffAt #align cont_diff_at_const contDiffAt_const theorem contDiffWithinAt_const {c : F} : ContDiffWithinAt π•œ n (fun _ : E => c) s x := contDiffAt_const.contDiffWithinAt #align cont_diff_within_at_const contDiffWithinAt_const @[nontriviality] theorem contDiff_of_subsingleton [Subsingleton F] : ContDiff π•œ n f := by rw [Subsingleton.elim f fun _ => 0]; exact contDiff_const #align cont_diff_of_subsingleton contDiff_of_subsingleton @[nontriviality]
Mathlib/Analysis/Calculus/ContDiff/Basic.lean
112
113
theorem contDiffAt_of_subsingleton [Subsingleton F] : ContDiffAt π•œ n f x := by
rw [Subsingleton.elim f fun _ => 0]; exact contDiffAt_const
1,616
import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Add import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.Deriv.Inverse #align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical NNReal Nat local notation "∞" => (⊀ : β„•βˆž) universe u v w uD uE uF uG attribute [local instance 1001] NormedAddCommGroup.toAddCommGroup NormedSpace.toModule' AddCommGroup.toAddCommMonoid open Set Fin Filter Function open scoped Topology variable {π•œ : Type*} [NontriviallyNormedField π•œ] {D : Type uD} [NormedAddCommGroup D] [NormedSpace π•œ D] {E : Type uE} [NormedAddCommGroup E] [NormedSpace π•œ E] {F : Type uF} [NormedAddCommGroup F] [NormedSpace π•œ F] {G : Type uG} [NormedAddCommGroup G] [NormedSpace π•œ G] {X : Type*} [NormedAddCommGroup X] [NormedSpace π•œ X] {s s₁ t u : Set E} {f f₁ : E β†’ F} {g : F β†’ G} {x xβ‚€ : E} {c : F} {b : E Γ— F β†’ G} {m n : β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F} @[simp] theorem iteratedFDerivWithin_zero_fun (hs : UniqueDiffOn π•œ s) (hx : x ∈ s) {i : β„•} : iteratedFDerivWithin π•œ i (fun _ : E ↦ (0 : F)) s x = 0 := by induction i generalizing x with | zero => ext; simp | succ i IH => ext m rw [iteratedFDerivWithin_succ_apply_left, fderivWithin_congr (fun _ ↦ IH) (IH hx)] rw [fderivWithin_const_apply _ (hs x hx)] rfl @[simp] theorem iteratedFDeriv_zero_fun {n : β„•} : (iteratedFDeriv π•œ n fun _ : E ↦ (0 : F)) = 0 := funext fun x ↦ by simpa [← iteratedFDerivWithin_univ] using iteratedFDerivWithin_zero_fun uniqueDiffOn_univ (mem_univ x) #align iterated_fderiv_zero_fun iteratedFDeriv_zero_fun theorem contDiff_zero_fun : ContDiff π•œ n fun _ : E => (0 : F) := contDiff_of_differentiable_iteratedFDeriv fun m _ => by rw [iteratedFDeriv_zero_fun] exact differentiable_const (0 : E[Γ—m]β†’L[π•œ] F) #align cont_diff_zero_fun contDiff_zero_fun theorem contDiff_const {c : F} : ContDiff π•œ n fun _ : E => c := by suffices h : ContDiff π•œ ∞ fun _ : E => c from h.of_le le_top rw [contDiff_top_iff_fderiv] refine ⟨differentiable_const c, ?_⟩ rw [fderiv_const] exact contDiff_zero_fun #align cont_diff_const contDiff_const theorem contDiffOn_const {c : F} {s : Set E} : ContDiffOn π•œ n (fun _ : E => c) s := contDiff_const.contDiffOn #align cont_diff_on_const contDiffOn_const theorem contDiffAt_const {c : F} : ContDiffAt π•œ n (fun _ : E => c) x := contDiff_const.contDiffAt #align cont_diff_at_const contDiffAt_const theorem contDiffWithinAt_const {c : F} : ContDiffWithinAt π•œ n (fun _ : E => c) s x := contDiffAt_const.contDiffWithinAt #align cont_diff_within_at_const contDiffWithinAt_const @[nontriviality] theorem contDiff_of_subsingleton [Subsingleton F] : ContDiff π•œ n f := by rw [Subsingleton.elim f fun _ => 0]; exact contDiff_const #align cont_diff_of_subsingleton contDiff_of_subsingleton @[nontriviality] theorem contDiffAt_of_subsingleton [Subsingleton F] : ContDiffAt π•œ n f x := by rw [Subsingleton.elim f fun _ => 0]; exact contDiffAt_const #align cont_diff_at_of_subsingleton contDiffAt_of_subsingleton @[nontriviality]
Mathlib/Analysis/Calculus/ContDiff/Basic.lean
117
118
theorem contDiffWithinAt_of_subsingleton [Subsingleton F] : ContDiffWithinAt π•œ n f s x := by
rw [Subsingleton.elim f fun _ => 0]; exact contDiffWithinAt_const
1,616
import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Add import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.Deriv.Inverse #align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical NNReal Nat local notation "∞" => (⊀ : β„•βˆž) universe u v w uD uE uF uG attribute [local instance 1001] NormedAddCommGroup.toAddCommGroup NormedSpace.toModule' AddCommGroup.toAddCommMonoid open Set Fin Filter Function open scoped Topology variable {π•œ : Type*} [NontriviallyNormedField π•œ] {D : Type uD} [NormedAddCommGroup D] [NormedSpace π•œ D] {E : Type uE} [NormedAddCommGroup E] [NormedSpace π•œ E] {F : Type uF} [NormedAddCommGroup F] [NormedSpace π•œ F] {G : Type uG} [NormedAddCommGroup G] [NormedSpace π•œ G] {X : Type*} [NormedAddCommGroup X] [NormedSpace π•œ X] {s s₁ t u : Set E} {f f₁ : E β†’ F} {g : F β†’ G} {x xβ‚€ : E} {c : F} {b : E Γ— F β†’ G} {m n : β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F} @[simp] theorem iteratedFDerivWithin_zero_fun (hs : UniqueDiffOn π•œ s) (hx : x ∈ s) {i : β„•} : iteratedFDerivWithin π•œ i (fun _ : E ↦ (0 : F)) s x = 0 := by induction i generalizing x with | zero => ext; simp | succ i IH => ext m rw [iteratedFDerivWithin_succ_apply_left, fderivWithin_congr (fun _ ↦ IH) (IH hx)] rw [fderivWithin_const_apply _ (hs x hx)] rfl @[simp] theorem iteratedFDeriv_zero_fun {n : β„•} : (iteratedFDeriv π•œ n fun _ : E ↦ (0 : F)) = 0 := funext fun x ↦ by simpa [← iteratedFDerivWithin_univ] using iteratedFDerivWithin_zero_fun uniqueDiffOn_univ (mem_univ x) #align iterated_fderiv_zero_fun iteratedFDeriv_zero_fun theorem contDiff_zero_fun : ContDiff π•œ n fun _ : E => (0 : F) := contDiff_of_differentiable_iteratedFDeriv fun m _ => by rw [iteratedFDeriv_zero_fun] exact differentiable_const (0 : E[Γ—m]β†’L[π•œ] F) #align cont_diff_zero_fun contDiff_zero_fun theorem contDiff_const {c : F} : ContDiff π•œ n fun _ : E => c := by suffices h : ContDiff π•œ ∞ fun _ : E => c from h.of_le le_top rw [contDiff_top_iff_fderiv] refine ⟨differentiable_const c, ?_⟩ rw [fderiv_const] exact contDiff_zero_fun #align cont_diff_const contDiff_const theorem contDiffOn_const {c : F} {s : Set E} : ContDiffOn π•œ n (fun _ : E => c) s := contDiff_const.contDiffOn #align cont_diff_on_const contDiffOn_const theorem contDiffAt_const {c : F} : ContDiffAt π•œ n (fun _ : E => c) x := contDiff_const.contDiffAt #align cont_diff_at_const contDiffAt_const theorem contDiffWithinAt_const {c : F} : ContDiffWithinAt π•œ n (fun _ : E => c) s x := contDiffAt_const.contDiffWithinAt #align cont_diff_within_at_const contDiffWithinAt_const @[nontriviality] theorem contDiff_of_subsingleton [Subsingleton F] : ContDiff π•œ n f := by rw [Subsingleton.elim f fun _ => 0]; exact contDiff_const #align cont_diff_of_subsingleton contDiff_of_subsingleton @[nontriviality] theorem contDiffAt_of_subsingleton [Subsingleton F] : ContDiffAt π•œ n f x := by rw [Subsingleton.elim f fun _ => 0]; exact contDiffAt_const #align cont_diff_at_of_subsingleton contDiffAt_of_subsingleton @[nontriviality] theorem contDiffWithinAt_of_subsingleton [Subsingleton F] : ContDiffWithinAt π•œ n f s x := by rw [Subsingleton.elim f fun _ => 0]; exact contDiffWithinAt_const #align cont_diff_within_at_of_subsingleton contDiffWithinAt_of_subsingleton @[nontriviality]
Mathlib/Analysis/Calculus/ContDiff/Basic.lean
122
123
theorem contDiffOn_of_subsingleton [Subsingleton F] : ContDiffOn π•œ n f s := by
rw [Subsingleton.elim f fun _ => 0]; exact contDiffOn_const
1,616
import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Add import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.Deriv.Inverse #align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical NNReal Nat local notation "∞" => (⊀ : β„•βˆž) universe u v w uD uE uF uG attribute [local instance 1001] NormedAddCommGroup.toAddCommGroup NormedSpace.toModule' AddCommGroup.toAddCommMonoid open Set Fin Filter Function open scoped Topology variable {π•œ : Type*} [NontriviallyNormedField π•œ] {D : Type uD} [NormedAddCommGroup D] [NormedSpace π•œ D] {E : Type uE} [NormedAddCommGroup E] [NormedSpace π•œ E] {F : Type uF} [NormedAddCommGroup F] [NormedSpace π•œ F] {G : Type uG} [NormedAddCommGroup G] [NormedSpace π•œ G] {X : Type*} [NormedAddCommGroup X] [NormedSpace π•œ X] {s s₁ t u : Set E} {f f₁ : E β†’ F} {g : F β†’ G} {x xβ‚€ : E} {c : F} {b : E Γ— F β†’ G} {m n : β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F} @[simp] theorem iteratedFDerivWithin_zero_fun (hs : UniqueDiffOn π•œ s) (hx : x ∈ s) {i : β„•} : iteratedFDerivWithin π•œ i (fun _ : E ↦ (0 : F)) s x = 0 := by induction i generalizing x with | zero => ext; simp | succ i IH => ext m rw [iteratedFDerivWithin_succ_apply_left, fderivWithin_congr (fun _ ↦ IH) (IH hx)] rw [fderivWithin_const_apply _ (hs x hx)] rfl @[simp] theorem iteratedFDeriv_zero_fun {n : β„•} : (iteratedFDeriv π•œ n fun _ : E ↦ (0 : F)) = 0 := funext fun x ↦ by simpa [← iteratedFDerivWithin_univ] using iteratedFDerivWithin_zero_fun uniqueDiffOn_univ (mem_univ x) #align iterated_fderiv_zero_fun iteratedFDeriv_zero_fun theorem contDiff_zero_fun : ContDiff π•œ n fun _ : E => (0 : F) := contDiff_of_differentiable_iteratedFDeriv fun m _ => by rw [iteratedFDeriv_zero_fun] exact differentiable_const (0 : E[Γ—m]β†’L[π•œ] F) #align cont_diff_zero_fun contDiff_zero_fun theorem contDiff_const {c : F} : ContDiff π•œ n fun _ : E => c := by suffices h : ContDiff π•œ ∞ fun _ : E => c from h.of_le le_top rw [contDiff_top_iff_fderiv] refine ⟨differentiable_const c, ?_⟩ rw [fderiv_const] exact contDiff_zero_fun #align cont_diff_const contDiff_const theorem contDiffOn_const {c : F} {s : Set E} : ContDiffOn π•œ n (fun _ : E => c) s := contDiff_const.contDiffOn #align cont_diff_on_const contDiffOn_const theorem contDiffAt_const {c : F} : ContDiffAt π•œ n (fun _ : E => c) x := contDiff_const.contDiffAt #align cont_diff_at_const contDiffAt_const theorem contDiffWithinAt_const {c : F} : ContDiffWithinAt π•œ n (fun _ : E => c) s x := contDiffAt_const.contDiffWithinAt #align cont_diff_within_at_const contDiffWithinAt_const @[nontriviality] theorem contDiff_of_subsingleton [Subsingleton F] : ContDiff π•œ n f := by rw [Subsingleton.elim f fun _ => 0]; exact contDiff_const #align cont_diff_of_subsingleton contDiff_of_subsingleton @[nontriviality] theorem contDiffAt_of_subsingleton [Subsingleton F] : ContDiffAt π•œ n f x := by rw [Subsingleton.elim f fun _ => 0]; exact contDiffAt_const #align cont_diff_at_of_subsingleton contDiffAt_of_subsingleton @[nontriviality] theorem contDiffWithinAt_of_subsingleton [Subsingleton F] : ContDiffWithinAt π•œ n f s x := by rw [Subsingleton.elim f fun _ => 0]; exact contDiffWithinAt_const #align cont_diff_within_at_of_subsingleton contDiffWithinAt_of_subsingleton @[nontriviality] theorem contDiffOn_of_subsingleton [Subsingleton F] : ContDiffOn π•œ n f s := by rw [Subsingleton.elim f fun _ => 0]; exact contDiffOn_const #align cont_diff_on_of_subsingleton contDiffOn_of_subsingleton
Mathlib/Analysis/Calculus/ContDiff/Basic.lean
126
132
theorem iteratedFDerivWithin_succ_const (n : β„•) (c : F) (hs : UniqueDiffOn π•œ s) (hx : x ∈ s) : iteratedFDerivWithin π•œ (n + 1) (fun _ : E ↦ c) s x = 0 := by
ext m rw [iteratedFDerivWithin_succ_apply_right hs hx] rw [iteratedFDerivWithin_congr (fun y hy ↦ fderivWithin_const_apply c (hs y hy)) hx] rw [iteratedFDerivWithin_zero_fun hs hx] simp [ContinuousMultilinearMap.zero_apply (R := π•œ)]
1,616
import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Add import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.Deriv.Inverse #align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical NNReal Nat local notation "∞" => (⊀ : β„•βˆž) universe u v w uD uE uF uG attribute [local instance 1001] NormedAddCommGroup.toAddCommGroup NormedSpace.toModule' AddCommGroup.toAddCommMonoid open Set Fin Filter Function open scoped Topology variable {π•œ : Type*} [NontriviallyNormedField π•œ] {D : Type uD} [NormedAddCommGroup D] [NormedSpace π•œ D] {E : Type uE} [NormedAddCommGroup E] [NormedSpace π•œ E] {F : Type uF} [NormedAddCommGroup F] [NormedSpace π•œ F] {G : Type uG} [NormedAddCommGroup G] [NormedSpace π•œ G] {X : Type*} [NormedAddCommGroup X] [NormedSpace π•œ X] {s s₁ t u : Set E} {f f₁ : E β†’ F} {g : F β†’ G} {x xβ‚€ : E} {c : F} {b : E Γ— F β†’ G} {m n : β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F} @[simp] theorem iteratedFDerivWithin_zero_fun (hs : UniqueDiffOn π•œ s) (hx : x ∈ s) {i : β„•} : iteratedFDerivWithin π•œ i (fun _ : E ↦ (0 : F)) s x = 0 := by induction i generalizing x with | zero => ext; simp | succ i IH => ext m rw [iteratedFDerivWithin_succ_apply_left, fderivWithin_congr (fun _ ↦ IH) (IH hx)] rw [fderivWithin_const_apply _ (hs x hx)] rfl @[simp] theorem iteratedFDeriv_zero_fun {n : β„•} : (iteratedFDeriv π•œ n fun _ : E ↦ (0 : F)) = 0 := funext fun x ↦ by simpa [← iteratedFDerivWithin_univ] using iteratedFDerivWithin_zero_fun uniqueDiffOn_univ (mem_univ x) #align iterated_fderiv_zero_fun iteratedFDeriv_zero_fun theorem contDiff_zero_fun : ContDiff π•œ n fun _ : E => (0 : F) := contDiff_of_differentiable_iteratedFDeriv fun m _ => by rw [iteratedFDeriv_zero_fun] exact differentiable_const (0 : E[Γ—m]β†’L[π•œ] F) #align cont_diff_zero_fun contDiff_zero_fun theorem contDiff_const {c : F} : ContDiff π•œ n fun _ : E => c := by suffices h : ContDiff π•œ ∞ fun _ : E => c from h.of_le le_top rw [contDiff_top_iff_fderiv] refine ⟨differentiable_const c, ?_⟩ rw [fderiv_const] exact contDiff_zero_fun #align cont_diff_const contDiff_const theorem contDiffOn_const {c : F} {s : Set E} : ContDiffOn π•œ n (fun _ : E => c) s := contDiff_const.contDiffOn #align cont_diff_on_const contDiffOn_const theorem contDiffAt_const {c : F} : ContDiffAt π•œ n (fun _ : E => c) x := contDiff_const.contDiffAt #align cont_diff_at_const contDiffAt_const theorem contDiffWithinAt_const {c : F} : ContDiffWithinAt π•œ n (fun _ : E => c) s x := contDiffAt_const.contDiffWithinAt #align cont_diff_within_at_const contDiffWithinAt_const @[nontriviality] theorem contDiff_of_subsingleton [Subsingleton F] : ContDiff π•œ n f := by rw [Subsingleton.elim f fun _ => 0]; exact contDiff_const #align cont_diff_of_subsingleton contDiff_of_subsingleton @[nontriviality] theorem contDiffAt_of_subsingleton [Subsingleton F] : ContDiffAt π•œ n f x := by rw [Subsingleton.elim f fun _ => 0]; exact contDiffAt_const #align cont_diff_at_of_subsingleton contDiffAt_of_subsingleton @[nontriviality] theorem contDiffWithinAt_of_subsingleton [Subsingleton F] : ContDiffWithinAt π•œ n f s x := by rw [Subsingleton.elim f fun _ => 0]; exact contDiffWithinAt_const #align cont_diff_within_at_of_subsingleton contDiffWithinAt_of_subsingleton @[nontriviality] theorem contDiffOn_of_subsingleton [Subsingleton F] : ContDiffOn π•œ n f s := by rw [Subsingleton.elim f fun _ => 0]; exact contDiffOn_const #align cont_diff_on_of_subsingleton contDiffOn_of_subsingleton theorem iteratedFDerivWithin_succ_const (n : β„•) (c : F) (hs : UniqueDiffOn π•œ s) (hx : x ∈ s) : iteratedFDerivWithin π•œ (n + 1) (fun _ : E ↦ c) s x = 0 := by ext m rw [iteratedFDerivWithin_succ_apply_right hs hx] rw [iteratedFDerivWithin_congr (fun y hy ↦ fderivWithin_const_apply c (hs y hy)) hx] rw [iteratedFDerivWithin_zero_fun hs hx] simp [ContinuousMultilinearMap.zero_apply (R := π•œ)] theorem iteratedFDeriv_succ_const (n : β„•) (c : F) : (iteratedFDeriv π•œ (n + 1) fun _ : E ↦ c) = 0 := funext fun x ↦ by simpa [← iteratedFDerivWithin_univ] using iteratedFDerivWithin_succ_const n c uniqueDiffOn_univ (mem_univ x) #align iterated_fderiv_succ_const iteratedFDeriv_succ_const
Mathlib/Analysis/Calculus/ContDiff/Basic.lean
140
145
theorem iteratedFDerivWithin_const_of_ne {n : β„•} (hn : n β‰  0) (c : F) (hs : UniqueDiffOn π•œ s) (hx : x ∈ s) : iteratedFDerivWithin π•œ n (fun _ : E ↦ c) s x = 0 := by
cases n with | zero => contradiction | succ n => exact iteratedFDerivWithin_succ_const n c hs hx
1,616
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Data.Finset.Sym import Mathlib.Data.Nat.Choose.Cast import Mathlib.Data.Nat.Choose.Multinomial #align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical NNReal Nat universe u uD uE uF uG open Set Fin Filter Function variable {π•œ : Type*} [NontriviallyNormedField π•œ] {D : Type uD} [NormedAddCommGroup D] [NormedSpace π•œ D] {E : Type uE} [NormedAddCommGroup E] [NormedSpace π•œ E] {F : Type uF} [NormedAddCommGroup F] [NormedSpace π•œ F] {G : Type uG} [NormedAddCommGroup G] [NormedSpace π•œ G] {s s₁ t u : Set E}
Mathlib/Analysis/Calculus/ContDiff/Bounds.lean
40
122
theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux {Du Eu Fu Gu : Type u} [NormedAddCommGroup Du] [NormedSpace π•œ Du] [NormedAddCommGroup Eu] [NormedSpace π•œ Eu] [NormedAddCommGroup Fu] [NormedSpace π•œ Fu] [NormedAddCommGroup Gu] [NormedSpace π•œ Gu] (B : Eu β†’L[π•œ] Fu β†’L[π•œ] Gu) {f : Du β†’ Eu} {g : Du β†’ Fu} {n : β„•} {s : Set Du} {x : Du} (hf : ContDiffOn π•œ n f s) (hg : ContDiffOn π•œ n g s) (hs : UniqueDiffOn π•œ s) (hx : x ∈ s) : β€–iteratedFDerivWithin π•œ n (fun y => B (f y) (g y)) s xβ€– ≀ β€–Bβ€– * βˆ‘ i ∈ Finset.range (n + 1), (n.choose i : ℝ) * β€–iteratedFDerivWithin π•œ i f s xβ€– * β€–iteratedFDerivWithin π•œ (n - i) g s xβ€– := by
/- We argue by induction on `n`. The bound is trivial for `n = 0`. For `n + 1`, we write the `(n+1)`-th derivative as the `n`-th derivative of the derivative `B f g' + B f' g`, and apply the inductive assumption to each of those two terms. For this induction to make sense, the spaces of linear maps that appear in the induction should be in the same universe as the original spaces, which explains why we assume in the lemma that all spaces live in the same universe. -/ induction' n with n IH generalizing Eu Fu Gu Β· simp only [Nat.zero_eq, norm_iteratedFDerivWithin_zero, zero_add, Finset.range_one, Finset.sum_singleton, Nat.choose_self, Nat.cast_one, one_mul, Nat.sub_zero, ← mul_assoc] apply B.le_opNormβ‚‚ Β· have In : (n : β„•βˆž) + 1 ≀ n.succ := by simp only [Nat.cast_succ, le_refl] -- Porting note: the next line is a hack allowing Lean to find the operator norm instance. let norm := @ContinuousLinearMap.hasOpNorm _ _ Eu ((Du β†’L[π•œ] Fu) β†’L[π•œ] Du β†’L[π•œ] Gu) _ _ _ _ _ _ (RingHom.id π•œ) have I1 : β€–iteratedFDerivWithin π•œ n (fun y : Du => B.precompR Du (f y) (fderivWithin π•œ g s y)) s xβ€– ≀ β€–Bβ€– * βˆ‘ i ∈ Finset.range (n + 1), n.choose i * β€–iteratedFDerivWithin π•œ i f s xβ€– * β€–iteratedFDerivWithin π•œ (n + 1 - i) g s xβ€– := by calc β€–iteratedFDerivWithin π•œ n (fun y : Du => B.precompR Du (f y) (fderivWithin π•œ g s y)) s xβ€– ≀ β€–B.precompR Duβ€– * βˆ‘ i ∈ Finset.range (n + 1), n.choose i * β€–iteratedFDerivWithin π•œ i f s xβ€– * β€–iteratedFDerivWithin π•œ (n - i) (fderivWithin π•œ g s) s xβ€– := IH _ (hf.of_le (Nat.cast_le.2 (Nat.le_succ n))) (hg.fderivWithin hs In) _ ≀ β€–Bβ€– * βˆ‘ i ∈ Finset.range (n + 1), n.choose i * β€–iteratedFDerivWithin π•œ i f s xβ€– * β€–iteratedFDerivWithin π•œ (n - i) (fderivWithin π•œ g s) s xβ€– := mul_le_mul_of_nonneg_right (B.norm_precompR_le Du) (by positivity) _ = _ := by congr 1 apply Finset.sum_congr rfl fun i hi => ?_ rw [Nat.succ_sub (Nat.lt_succ_iff.1 (Finset.mem_range.1 hi)), ← norm_iteratedFDerivWithin_fderivWithin hs hx] -- Porting note: the next line is a hack allowing Lean to find the operator norm instance. let norm := @ContinuousLinearMap.hasOpNorm _ _ (Du β†’L[π•œ] Eu) (Fu β†’L[π•œ] Du β†’L[π•œ] Gu) _ _ _ _ _ _ (RingHom.id π•œ) have I2 : β€–iteratedFDerivWithin π•œ n (fun y : Du => B.precompL Du (fderivWithin π•œ f s y) (g y)) s xβ€– ≀ β€–Bβ€– * βˆ‘ i ∈ Finset.range (n + 1), n.choose i * β€–iteratedFDerivWithin π•œ (i + 1) f s xβ€– * β€–iteratedFDerivWithin π•œ (n - i) g s xβ€– := calc β€–iteratedFDerivWithin π•œ n (fun y : Du => B.precompL Du (fderivWithin π•œ f s y) (g y)) s xβ€– ≀ β€–B.precompL Duβ€– * βˆ‘ i ∈ Finset.range (n + 1), n.choose i * β€–iteratedFDerivWithin π•œ i (fderivWithin π•œ f s) s xβ€– * β€–iteratedFDerivWithin π•œ (n - i) g s xβ€– := IH _ (hf.fderivWithin hs In) (hg.of_le (Nat.cast_le.2 (Nat.le_succ n))) _ ≀ β€–Bβ€– * βˆ‘ i ∈ Finset.range (n + 1), n.choose i * β€–iteratedFDerivWithin π•œ i (fderivWithin π•œ f s) s xβ€– * β€–iteratedFDerivWithin π•œ (n - i) g s xβ€– := mul_le_mul_of_nonneg_right (B.norm_precompL_le Du) (by positivity) _ = _ := by congr 1 apply Finset.sum_congr rfl fun i _ => ?_ rw [← norm_iteratedFDerivWithin_fderivWithin hs hx] have J : iteratedFDerivWithin π•œ n (fun y : Du => fderivWithin π•œ (fun y : Du => B (f y) (g y)) s y) s x = iteratedFDerivWithin π•œ n (fun y => B.precompR Du (f y) (fderivWithin π•œ g s y) + B.precompL Du (fderivWithin π•œ f s y) (g y)) s x := by apply iteratedFDerivWithin_congr (fun y hy => ?_) hx have L : (1 : β„•βˆž) ≀ n.succ := by simpa only [ENat.coe_one, Nat.one_le_cast] using Nat.succ_pos n exact B.fderivWithin_of_bilinear (hf.differentiableOn L y hy) (hg.differentiableOn L y hy) (hs y hy) rw [← norm_iteratedFDerivWithin_fderivWithin hs hx, J] have A : ContDiffOn π•œ n (fun y => B.precompR Du (f y) (fderivWithin π•œ g s y)) s := (B.precompR Du).isBoundedBilinearMap.contDiff.comp_contDiff_onβ‚‚ (hf.of_le (Nat.cast_le.2 (Nat.le_succ n))) (hg.fderivWithin hs In) have A' : ContDiffOn π•œ n (fun y => B.precompL Du (fderivWithin π•œ f s y) (g y)) s := (B.precompL Du).isBoundedBilinearMap.contDiff.comp_contDiff_onβ‚‚ (hf.fderivWithin hs In) (hg.of_le (Nat.cast_le.2 (Nat.le_succ n))) rw [iteratedFDerivWithin_add_apply' A A' hs hx] apply (norm_add_le _ _).trans ((add_le_add I1 I2).trans (le_of_eq ?_)) simp_rw [← mul_add, mul_assoc] congr 1 exact (Finset.sum_choose_succ_mul (fun i j => β€–iteratedFDerivWithin π•œ i f s xβ€– * β€–iteratedFDerivWithin π•œ j g s xβ€–) n).symm
1,617
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} namespace ContinuousLinearMap variable {B : E β†’L[π•œ] F β†’L[π•œ] G} {u : π•œ β†’ E} {v : π•œ β†’ F} {u' : E} {v' : F}
Mathlib/Analysis/Calculus/Deriv/Mul.lean
52
56
theorem hasDerivWithinAt_of_bilinear (hu : HasDerivWithinAt u u' s x) (hv : HasDerivWithinAt v v' s x) : HasDerivWithinAt (fun x ↦ B (u x) (v x)) (B (u x) v' + B u' (v x)) s x := by
simpa using (B.hasFDerivWithinAt_of_bilinear hu.hasFDerivWithinAt hv.hasFDerivWithinAt).hasDerivWithinAt
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} namespace ContinuousLinearMap variable {B : E β†’L[π•œ] F β†’L[π•œ] G} {u : π•œ β†’ E} {v : π•œ β†’ F} {u' : E} {v' : F} theorem hasDerivWithinAt_of_bilinear (hu : HasDerivWithinAt u u' s x) (hv : HasDerivWithinAt v v' s x) : HasDerivWithinAt (fun x ↦ B (u x) (v x)) (B (u x) v' + B u' (v x)) s x := by simpa using (B.hasFDerivWithinAt_of_bilinear hu.hasFDerivWithinAt hv.hasFDerivWithinAt).hasDerivWithinAt
Mathlib/Analysis/Calculus/Deriv/Mul.lean
58
60
theorem hasDerivAt_of_bilinear (hu : HasDerivAt u u' x) (hv : HasDerivAt v v' x) : HasDerivAt (fun x ↦ B (u x) (v x)) (B (u x) v' + B u' (v x)) x := by
simpa using (B.hasFDerivAt_of_bilinear hu.hasFDerivAt hv.hasFDerivAt).hasDerivAt
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} namespace ContinuousLinearMap variable {B : E β†’L[π•œ] F β†’L[π•œ] G} {u : π•œ β†’ E} {v : π•œ β†’ F} {u' : E} {v' : F} theorem hasDerivWithinAt_of_bilinear (hu : HasDerivWithinAt u u' s x) (hv : HasDerivWithinAt v v' s x) : HasDerivWithinAt (fun x ↦ B (u x) (v x)) (B (u x) v' + B u' (v x)) s x := by simpa using (B.hasFDerivWithinAt_of_bilinear hu.hasFDerivWithinAt hv.hasFDerivWithinAt).hasDerivWithinAt theorem hasDerivAt_of_bilinear (hu : HasDerivAt u u' x) (hv : HasDerivAt v v' x) : HasDerivAt (fun x ↦ B (u x) (v x)) (B (u x) v' + B u' (v x)) x := by simpa using (B.hasFDerivAt_of_bilinear hu.hasFDerivAt hv.hasFDerivAt).hasDerivAt
Mathlib/Analysis/Calculus/Deriv/Mul.lean
62
65
theorem hasStrictDerivAt_of_bilinear (hu : HasStrictDerivAt u u' x) (hv : HasStrictDerivAt v v' x) : HasStrictDerivAt (fun x ↦ B (u x) (v x)) (B (u x) v' + B u' (v x)) x := by
simpa using (B.hasStrictFDerivAt_of_bilinear hu.hasStrictFDerivAt hv.hasStrictFDerivAt).hasStrictDerivAt
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section SMul variable {π•œ' : Type*} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {c : π•œ β†’ π•œ'} {c' : π•œ'}
Mathlib/Analysis/Calculus/Deriv/Mul.lean
87
89
theorem HasDerivWithinAt.smul (hc : HasDerivWithinAt c c' s x) (hf : HasDerivWithinAt f f' s x) : HasDerivWithinAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) s x := by
simpa using (HasFDerivWithinAt.smul hc hf).hasDerivWithinAt
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section SMul variable {π•œ' : Type*} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {c : π•œ β†’ π•œ'} {c' : π•œ'} theorem HasDerivWithinAt.smul (hc : HasDerivWithinAt c c' s x) (hf : HasDerivWithinAt f f' s x) : HasDerivWithinAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) s x := by simpa using (HasFDerivWithinAt.smul hc hf).hasDerivWithinAt #align has_deriv_within_at.smul HasDerivWithinAt.smul
Mathlib/Analysis/Calculus/Deriv/Mul.lean
92
95
theorem HasDerivAt.smul (hc : HasDerivAt c c' x) (hf : HasDerivAt f f' x) : HasDerivAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) x := by
rw [← hasDerivWithinAt_univ] at * exact hc.smul hf
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section SMul variable {π•œ' : Type*} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {c : π•œ β†’ π•œ'} {c' : π•œ'} theorem HasDerivWithinAt.smul (hc : HasDerivWithinAt c c' s x) (hf : HasDerivWithinAt f f' s x) : HasDerivWithinAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) s x := by simpa using (HasFDerivWithinAt.smul hc hf).hasDerivWithinAt #align has_deriv_within_at.smul HasDerivWithinAt.smul theorem HasDerivAt.smul (hc : HasDerivAt c c' x) (hf : HasDerivAt f f' x) : HasDerivAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) x := by rw [← hasDerivWithinAt_univ] at * exact hc.smul hf #align has_deriv_at.smul HasDerivAt.smul nonrec theorem HasStrictDerivAt.smul (hc : HasStrictDerivAt c c' x) (hf : HasStrictDerivAt f f' x) : HasStrictDerivAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) x := by simpa using (hc.smul hf).hasStrictDerivAt #align has_strict_deriv_at.smul HasStrictDerivAt.smul theorem derivWithin_smul (hxs : UniqueDiffWithinAt π•œ s x) (hc : DifferentiableWithinAt π•œ c s x) (hf : DifferentiableWithinAt π•œ f s x) : derivWithin (fun y => c y β€’ f y) s x = c x β€’ derivWithin f s x + derivWithin c s x β€’ f x := (hc.hasDerivWithinAt.smul hf.hasDerivWithinAt).derivWithin hxs #align deriv_within_smul derivWithin_smul theorem deriv_smul (hc : DifferentiableAt π•œ c x) (hf : DifferentiableAt π•œ f x) : deriv (fun y => c y β€’ f y) x = c x β€’ deriv f x + deriv c x β€’ f x := (hc.hasDerivAt.smul hf.hasDerivAt).deriv #align deriv_smul deriv_smul
Mathlib/Analysis/Calculus/Deriv/Mul.lean
114
117
theorem HasStrictDerivAt.smul_const (hc : HasStrictDerivAt c c' x) (f : F) : HasStrictDerivAt (fun y => c y β€’ f) (c' β€’ f) x := by
have := hc.smul (hasStrictDerivAt_const x f) rwa [smul_zero, zero_add] at this
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section SMul variable {π•œ' : Type*} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {c : π•œ β†’ π•œ'} {c' : π•œ'} theorem HasDerivWithinAt.smul (hc : HasDerivWithinAt c c' s x) (hf : HasDerivWithinAt f f' s x) : HasDerivWithinAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) s x := by simpa using (HasFDerivWithinAt.smul hc hf).hasDerivWithinAt #align has_deriv_within_at.smul HasDerivWithinAt.smul theorem HasDerivAt.smul (hc : HasDerivAt c c' x) (hf : HasDerivAt f f' x) : HasDerivAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) x := by rw [← hasDerivWithinAt_univ] at * exact hc.smul hf #align has_deriv_at.smul HasDerivAt.smul nonrec theorem HasStrictDerivAt.smul (hc : HasStrictDerivAt c c' x) (hf : HasStrictDerivAt f f' x) : HasStrictDerivAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) x := by simpa using (hc.smul hf).hasStrictDerivAt #align has_strict_deriv_at.smul HasStrictDerivAt.smul theorem derivWithin_smul (hxs : UniqueDiffWithinAt π•œ s x) (hc : DifferentiableWithinAt π•œ c s x) (hf : DifferentiableWithinAt π•œ f s x) : derivWithin (fun y => c y β€’ f y) s x = c x β€’ derivWithin f s x + derivWithin c s x β€’ f x := (hc.hasDerivWithinAt.smul hf.hasDerivWithinAt).derivWithin hxs #align deriv_within_smul derivWithin_smul theorem deriv_smul (hc : DifferentiableAt π•œ c x) (hf : DifferentiableAt π•œ f x) : deriv (fun y => c y β€’ f y) x = c x β€’ deriv f x + deriv c x β€’ f x := (hc.hasDerivAt.smul hf.hasDerivAt).deriv #align deriv_smul deriv_smul theorem HasStrictDerivAt.smul_const (hc : HasStrictDerivAt c c' x) (f : F) : HasStrictDerivAt (fun y => c y β€’ f) (c' β€’ f) x := by have := hc.smul (hasStrictDerivAt_const x f) rwa [smul_zero, zero_add] at this #align has_strict_deriv_at.smul_const HasStrictDerivAt.smul_const
Mathlib/Analysis/Calculus/Deriv/Mul.lean
120
123
theorem HasDerivWithinAt.smul_const (hc : HasDerivWithinAt c c' s x) (f : F) : HasDerivWithinAt (fun y => c y β€’ f) (c' β€’ f) s x := by
have := hc.smul (hasDerivWithinAt_const x s f) rwa [smul_zero, zero_add] at this
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section SMul variable {π•œ' : Type*} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {c : π•œ β†’ π•œ'} {c' : π•œ'} theorem HasDerivWithinAt.smul (hc : HasDerivWithinAt c c' s x) (hf : HasDerivWithinAt f f' s x) : HasDerivWithinAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) s x := by simpa using (HasFDerivWithinAt.smul hc hf).hasDerivWithinAt #align has_deriv_within_at.smul HasDerivWithinAt.smul theorem HasDerivAt.smul (hc : HasDerivAt c c' x) (hf : HasDerivAt f f' x) : HasDerivAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) x := by rw [← hasDerivWithinAt_univ] at * exact hc.smul hf #align has_deriv_at.smul HasDerivAt.smul nonrec theorem HasStrictDerivAt.smul (hc : HasStrictDerivAt c c' x) (hf : HasStrictDerivAt f f' x) : HasStrictDerivAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) x := by simpa using (hc.smul hf).hasStrictDerivAt #align has_strict_deriv_at.smul HasStrictDerivAt.smul theorem derivWithin_smul (hxs : UniqueDiffWithinAt π•œ s x) (hc : DifferentiableWithinAt π•œ c s x) (hf : DifferentiableWithinAt π•œ f s x) : derivWithin (fun y => c y β€’ f y) s x = c x β€’ derivWithin f s x + derivWithin c s x β€’ f x := (hc.hasDerivWithinAt.smul hf.hasDerivWithinAt).derivWithin hxs #align deriv_within_smul derivWithin_smul theorem deriv_smul (hc : DifferentiableAt π•œ c x) (hf : DifferentiableAt π•œ f x) : deriv (fun y => c y β€’ f y) x = c x β€’ deriv f x + deriv c x β€’ f x := (hc.hasDerivAt.smul hf.hasDerivAt).deriv #align deriv_smul deriv_smul theorem HasStrictDerivAt.smul_const (hc : HasStrictDerivAt c c' x) (f : F) : HasStrictDerivAt (fun y => c y β€’ f) (c' β€’ f) x := by have := hc.smul (hasStrictDerivAt_const x f) rwa [smul_zero, zero_add] at this #align has_strict_deriv_at.smul_const HasStrictDerivAt.smul_const theorem HasDerivWithinAt.smul_const (hc : HasDerivWithinAt c c' s x) (f : F) : HasDerivWithinAt (fun y => c y β€’ f) (c' β€’ f) s x := by have := hc.smul (hasDerivWithinAt_const x s f) rwa [smul_zero, zero_add] at this #align has_deriv_within_at.smul_const HasDerivWithinAt.smul_const
Mathlib/Analysis/Calculus/Deriv/Mul.lean
126
129
theorem HasDerivAt.smul_const (hc : HasDerivAt c c' x) (f : F) : HasDerivAt (fun y => c y β€’ f) (c' β€’ f) x := by
rw [← hasDerivWithinAt_univ] at * exact hc.smul_const f
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Mul variable {π•œ' 𝔸 : Type*} [NormedField π•œ'] [NormedRing 𝔸] [NormedAlgebra π•œ π•œ'] [NormedAlgebra π•œ 𝔸] {c d : π•œ β†’ 𝔸} {c' d' : 𝔸} {u v : π•œ β†’ π•œ'}
Mathlib/Analysis/Calculus/Deriv/Mul.lean
206
212
theorem HasDerivWithinAt.mul (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x := by
have := (HasFDerivWithinAt.mul' hc hd).hasDerivWithinAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Mul variable {π•œ' 𝔸 : Type*} [NormedField π•œ'] [NormedRing 𝔸] [NormedAlgebra π•œ π•œ'] [NormedAlgebra π•œ 𝔸] {c d : π•œ β†’ 𝔸} {c' d' : 𝔸} {u v : π•œ β†’ π•œ'} theorem HasDerivWithinAt.mul (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x := by have := (HasFDerivWithinAt.mul' hc hd).hasDerivWithinAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.mul HasDerivWithinAt.mul
Mathlib/Analysis/Calculus/Deriv/Mul.lean
215
218
theorem HasDerivAt.mul (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by
rw [← hasDerivWithinAt_univ] at * exact hc.mul hd
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Mul variable {π•œ' 𝔸 : Type*} [NormedField π•œ'] [NormedRing 𝔸] [NormedAlgebra π•œ π•œ'] [NormedAlgebra π•œ 𝔸] {c d : π•œ β†’ 𝔸} {c' d' : 𝔸} {u v : π•œ β†’ π•œ'} theorem HasDerivWithinAt.mul (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x := by have := (HasFDerivWithinAt.mul' hc hd).hasDerivWithinAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.mul HasDerivWithinAt.mul theorem HasDerivAt.mul (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by rw [← hasDerivWithinAt_univ] at * exact hc.mul hd #align has_deriv_at.mul HasDerivAt.mul
Mathlib/Analysis/Calculus/Deriv/Mul.lean
221
227
theorem HasStrictDerivAt.mul (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by
have := (HasStrictFDerivAt.mul' hc hd).hasStrictDerivAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Mul variable {π•œ' 𝔸 : Type*} [NormedField π•œ'] [NormedRing 𝔸] [NormedAlgebra π•œ π•œ'] [NormedAlgebra π•œ 𝔸] {c d : π•œ β†’ 𝔸} {c' d' : 𝔸} {u v : π•œ β†’ π•œ'} theorem HasDerivWithinAt.mul (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x := by have := (HasFDerivWithinAt.mul' hc hd).hasDerivWithinAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.mul HasDerivWithinAt.mul theorem HasDerivAt.mul (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by rw [← hasDerivWithinAt_univ] at * exact hc.mul hd #align has_deriv_at.mul HasDerivAt.mul theorem HasStrictDerivAt.mul (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by have := (HasStrictFDerivAt.mul' hc hd).hasStrictDerivAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.mul HasStrictDerivAt.mul theorem derivWithin_mul (hxs : UniqueDiffWithinAt π•œ s x) (hc : DifferentiableWithinAt π•œ c s x) (hd : DifferentiableWithinAt π•œ d s x) : derivWithin (fun y => c y * d y) s x = derivWithin c s x * d x + c x * derivWithin d s x := (hc.hasDerivWithinAt.mul hd.hasDerivWithinAt).derivWithin hxs #align deriv_within_mul derivWithin_mul @[simp] theorem deriv_mul (hc : DifferentiableAt π•œ c x) (hd : DifferentiableAt π•œ d x) : deriv (fun y => c y * d y) x = deriv c x * d x + c x * deriv d x := (hc.hasDerivAt.mul hd.hasDerivAt).deriv #align deriv_mul deriv_mul
Mathlib/Analysis/Calculus/Deriv/Mul.lean
242
245
theorem HasDerivWithinAt.mul_const (hc : HasDerivWithinAt c c' s x) (d : 𝔸) : HasDerivWithinAt (fun y => c y * d) (c' * d) s x := by
convert hc.mul (hasDerivWithinAt_const x s d) using 1 rw [mul_zero, add_zero]
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Mul variable {π•œ' 𝔸 : Type*} [NormedField π•œ'] [NormedRing 𝔸] [NormedAlgebra π•œ π•œ'] [NormedAlgebra π•œ 𝔸] {c d : π•œ β†’ 𝔸} {c' d' : 𝔸} {u v : π•œ β†’ π•œ'} theorem HasDerivWithinAt.mul (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x := by have := (HasFDerivWithinAt.mul' hc hd).hasDerivWithinAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.mul HasDerivWithinAt.mul theorem HasDerivAt.mul (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by rw [← hasDerivWithinAt_univ] at * exact hc.mul hd #align has_deriv_at.mul HasDerivAt.mul theorem HasStrictDerivAt.mul (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by have := (HasStrictFDerivAt.mul' hc hd).hasStrictDerivAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.mul HasStrictDerivAt.mul theorem derivWithin_mul (hxs : UniqueDiffWithinAt π•œ s x) (hc : DifferentiableWithinAt π•œ c s x) (hd : DifferentiableWithinAt π•œ d s x) : derivWithin (fun y => c y * d y) s x = derivWithin c s x * d x + c x * derivWithin d s x := (hc.hasDerivWithinAt.mul hd.hasDerivWithinAt).derivWithin hxs #align deriv_within_mul derivWithin_mul @[simp] theorem deriv_mul (hc : DifferentiableAt π•œ c x) (hd : DifferentiableAt π•œ d x) : deriv (fun y => c y * d y) x = deriv c x * d x + c x * deriv d x := (hc.hasDerivAt.mul hd.hasDerivAt).deriv #align deriv_mul deriv_mul theorem HasDerivWithinAt.mul_const (hc : HasDerivWithinAt c c' s x) (d : 𝔸) : HasDerivWithinAt (fun y => c y * d) (c' * d) s x := by convert hc.mul (hasDerivWithinAt_const x s d) using 1 rw [mul_zero, add_zero] #align has_deriv_within_at.mul_const HasDerivWithinAt.mul_const
Mathlib/Analysis/Calculus/Deriv/Mul.lean
248
251
theorem HasDerivAt.mul_const (hc : HasDerivAt c c' x) (d : 𝔸) : HasDerivAt (fun y => c y * d) (c' * d) x := by
rw [← hasDerivWithinAt_univ] at * exact hc.mul_const d
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Mul variable {π•œ' 𝔸 : Type*} [NormedField π•œ'] [NormedRing 𝔸] [NormedAlgebra π•œ π•œ'] [NormedAlgebra π•œ 𝔸] {c d : π•œ β†’ 𝔸} {c' d' : 𝔸} {u v : π•œ β†’ π•œ'} theorem HasDerivWithinAt.mul (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x := by have := (HasFDerivWithinAt.mul' hc hd).hasDerivWithinAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.mul HasDerivWithinAt.mul theorem HasDerivAt.mul (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by rw [← hasDerivWithinAt_univ] at * exact hc.mul hd #align has_deriv_at.mul HasDerivAt.mul theorem HasStrictDerivAt.mul (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by have := (HasStrictFDerivAt.mul' hc hd).hasStrictDerivAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.mul HasStrictDerivAt.mul theorem derivWithin_mul (hxs : UniqueDiffWithinAt π•œ s x) (hc : DifferentiableWithinAt π•œ c s x) (hd : DifferentiableWithinAt π•œ d s x) : derivWithin (fun y => c y * d y) s x = derivWithin c s x * d x + c x * derivWithin d s x := (hc.hasDerivWithinAt.mul hd.hasDerivWithinAt).derivWithin hxs #align deriv_within_mul derivWithin_mul @[simp] theorem deriv_mul (hc : DifferentiableAt π•œ c x) (hd : DifferentiableAt π•œ d x) : deriv (fun y => c y * d y) x = deriv c x * d x + c x * deriv d x := (hc.hasDerivAt.mul hd.hasDerivAt).deriv #align deriv_mul deriv_mul theorem HasDerivWithinAt.mul_const (hc : HasDerivWithinAt c c' s x) (d : 𝔸) : HasDerivWithinAt (fun y => c y * d) (c' * d) s x := by convert hc.mul (hasDerivWithinAt_const x s d) using 1 rw [mul_zero, add_zero] #align has_deriv_within_at.mul_const HasDerivWithinAt.mul_const theorem HasDerivAt.mul_const (hc : HasDerivAt c c' x) (d : 𝔸) : HasDerivAt (fun y => c y * d) (c' * d) x := by rw [← hasDerivWithinAt_univ] at * exact hc.mul_const d #align has_deriv_at.mul_const HasDerivAt.mul_const
Mathlib/Analysis/Calculus/Deriv/Mul.lean
254
255
theorem hasDerivAt_mul_const (c : π•œ) : HasDerivAt (fun x => x * c) c x := by
simpa only [one_mul] using (hasDerivAt_id' x).mul_const c
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Mul variable {π•œ' 𝔸 : Type*} [NormedField π•œ'] [NormedRing 𝔸] [NormedAlgebra π•œ π•œ'] [NormedAlgebra π•œ 𝔸] {c d : π•œ β†’ 𝔸} {c' d' : 𝔸} {u v : π•œ β†’ π•œ'} theorem HasDerivWithinAt.mul (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x := by have := (HasFDerivWithinAt.mul' hc hd).hasDerivWithinAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.mul HasDerivWithinAt.mul theorem HasDerivAt.mul (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by rw [← hasDerivWithinAt_univ] at * exact hc.mul hd #align has_deriv_at.mul HasDerivAt.mul theorem HasStrictDerivAt.mul (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by have := (HasStrictFDerivAt.mul' hc hd).hasStrictDerivAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.mul HasStrictDerivAt.mul theorem derivWithin_mul (hxs : UniqueDiffWithinAt π•œ s x) (hc : DifferentiableWithinAt π•œ c s x) (hd : DifferentiableWithinAt π•œ d s x) : derivWithin (fun y => c y * d y) s x = derivWithin c s x * d x + c x * derivWithin d s x := (hc.hasDerivWithinAt.mul hd.hasDerivWithinAt).derivWithin hxs #align deriv_within_mul derivWithin_mul @[simp] theorem deriv_mul (hc : DifferentiableAt π•œ c x) (hd : DifferentiableAt π•œ d x) : deriv (fun y => c y * d y) x = deriv c x * d x + c x * deriv d x := (hc.hasDerivAt.mul hd.hasDerivAt).deriv #align deriv_mul deriv_mul theorem HasDerivWithinAt.mul_const (hc : HasDerivWithinAt c c' s x) (d : 𝔸) : HasDerivWithinAt (fun y => c y * d) (c' * d) s x := by convert hc.mul (hasDerivWithinAt_const x s d) using 1 rw [mul_zero, add_zero] #align has_deriv_within_at.mul_const HasDerivWithinAt.mul_const theorem HasDerivAt.mul_const (hc : HasDerivAt c c' x) (d : 𝔸) : HasDerivAt (fun y => c y * d) (c' * d) x := by rw [← hasDerivWithinAt_univ] at * exact hc.mul_const d #align has_deriv_at.mul_const HasDerivAt.mul_const theorem hasDerivAt_mul_const (c : π•œ) : HasDerivAt (fun x => x * c) c x := by simpa only [one_mul] using (hasDerivAt_id' x).mul_const c #align has_deriv_at_mul_const hasDerivAt_mul_const
Mathlib/Analysis/Calculus/Deriv/Mul.lean
258
261
theorem HasStrictDerivAt.mul_const (hc : HasStrictDerivAt c c' x) (d : 𝔸) : HasStrictDerivAt (fun y => c y * d) (c' * d) x := by
convert hc.mul (hasStrictDerivAt_const x d) using 1 rw [mul_zero, add_zero]
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Mul variable {π•œ' 𝔸 : Type*} [NormedField π•œ'] [NormedRing 𝔸] [NormedAlgebra π•œ π•œ'] [NormedAlgebra π•œ 𝔸] {c d : π•œ β†’ 𝔸} {c' d' : 𝔸} {u v : π•œ β†’ π•œ'} theorem HasDerivWithinAt.mul (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x := by have := (HasFDerivWithinAt.mul' hc hd).hasDerivWithinAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.mul HasDerivWithinAt.mul theorem HasDerivAt.mul (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by rw [← hasDerivWithinAt_univ] at * exact hc.mul hd #align has_deriv_at.mul HasDerivAt.mul theorem HasStrictDerivAt.mul (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by have := (HasStrictFDerivAt.mul' hc hd).hasStrictDerivAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.mul HasStrictDerivAt.mul theorem derivWithin_mul (hxs : UniqueDiffWithinAt π•œ s x) (hc : DifferentiableWithinAt π•œ c s x) (hd : DifferentiableWithinAt π•œ d s x) : derivWithin (fun y => c y * d y) s x = derivWithin c s x * d x + c x * derivWithin d s x := (hc.hasDerivWithinAt.mul hd.hasDerivWithinAt).derivWithin hxs #align deriv_within_mul derivWithin_mul @[simp] theorem deriv_mul (hc : DifferentiableAt π•œ c x) (hd : DifferentiableAt π•œ d x) : deriv (fun y => c y * d y) x = deriv c x * d x + c x * deriv d x := (hc.hasDerivAt.mul hd.hasDerivAt).deriv #align deriv_mul deriv_mul theorem HasDerivWithinAt.mul_const (hc : HasDerivWithinAt c c' s x) (d : 𝔸) : HasDerivWithinAt (fun y => c y * d) (c' * d) s x := by convert hc.mul (hasDerivWithinAt_const x s d) using 1 rw [mul_zero, add_zero] #align has_deriv_within_at.mul_const HasDerivWithinAt.mul_const theorem HasDerivAt.mul_const (hc : HasDerivAt c c' x) (d : 𝔸) : HasDerivAt (fun y => c y * d) (c' * d) x := by rw [← hasDerivWithinAt_univ] at * exact hc.mul_const d #align has_deriv_at.mul_const HasDerivAt.mul_const theorem hasDerivAt_mul_const (c : π•œ) : HasDerivAt (fun x => x * c) c x := by simpa only [one_mul] using (hasDerivAt_id' x).mul_const c #align has_deriv_at_mul_const hasDerivAt_mul_const theorem HasStrictDerivAt.mul_const (hc : HasStrictDerivAt c c' x) (d : 𝔸) : HasStrictDerivAt (fun y => c y * d) (c' * d) x := by convert hc.mul (hasStrictDerivAt_const x d) using 1 rw [mul_zero, add_zero] #align has_strict_deriv_at.mul_const HasStrictDerivAt.mul_const theorem derivWithin_mul_const (hxs : UniqueDiffWithinAt π•œ s x) (hc : DifferentiableWithinAt π•œ c s x) (d : 𝔸) : derivWithin (fun y => c y * d) s x = derivWithin c s x * d := (hc.hasDerivWithinAt.mul_const d).derivWithin hxs #align deriv_within_mul_const derivWithin_mul_const theorem deriv_mul_const (hc : DifferentiableAt π•œ c x) (d : 𝔸) : deriv (fun y => c y * d) x = deriv c x * d := (hc.hasDerivAt.mul_const d).deriv #align deriv_mul_const deriv_mul_const
Mathlib/Analysis/Calculus/Deriv/Mul.lean
274
281
theorem deriv_mul_const_field (v : π•œ') : deriv (fun y => u y * v) x = deriv u x * v := by
by_cases hu : DifferentiableAt π•œ u x Β· exact deriv_mul_const hu v Β· rw [deriv_zero_of_not_differentiableAt hu, zero_mul] rcases eq_or_ne v 0 with (rfl | hd) Β· simp only [mul_zero, deriv_const] Β· refine deriv_zero_of_not_differentiableAt (mt (fun H => ?_) hu) simpa only [mul_inv_cancel_rightβ‚€ hd] using H.mul_const v⁻¹
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Prod section HasDeriv variable {ΞΉ : Type*} [DecidableEq ΞΉ] {𝔸' : Type*} [NormedCommRing 𝔸'] [NormedAlgebra π•œ 𝔸'] {u : Finset ΞΉ} {f : ΞΉ β†’ π•œ β†’ 𝔸'} {f' : ΞΉ β†’ 𝔸'}
Mathlib/Analysis/Calculus/Deriv/Mul.lean
336
339
theorem HasDerivAt.finset_prod (hf : βˆ€ i ∈ u, HasDerivAt (f i) (f' i) x) : HasDerivAt (∏ i ∈ u, f i Β·) (βˆ‘ i ∈ u, (∏ j ∈ u.erase i, f j x) β€’ f' i) x := by
simpa [ContinuousLinearMap.sum_apply, ContinuousLinearMap.smul_apply] using (HasFDerivAt.finset_prod (fun i hi ↦ (hf i hi).hasFDerivAt)).hasDerivAt
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Prod section HasDeriv variable {ΞΉ : Type*} [DecidableEq ΞΉ] {𝔸' : Type*} [NormedCommRing 𝔸'] [NormedAlgebra π•œ 𝔸'] {u : Finset ΞΉ} {f : ΞΉ β†’ π•œ β†’ 𝔸'} {f' : ΞΉ β†’ 𝔸'} theorem HasDerivAt.finset_prod (hf : βˆ€ i ∈ u, HasDerivAt (f i) (f' i) x) : HasDerivAt (∏ i ∈ u, f i Β·) (βˆ‘ i ∈ u, (∏ j ∈ u.erase i, f j x) β€’ f' i) x := by simpa [ContinuousLinearMap.sum_apply, ContinuousLinearMap.smul_apply] using (HasFDerivAt.finset_prod (fun i hi ↦ (hf i hi).hasFDerivAt)).hasDerivAt
Mathlib/Analysis/Calculus/Deriv/Mul.lean
341
344
theorem HasDerivWithinAt.finset_prod (hf : βˆ€ i ∈ u, HasDerivWithinAt (f i) (f' i) s x) : HasDerivWithinAt (∏ i ∈ u, f i Β·) (βˆ‘ i ∈ u, (∏ j ∈ u.erase i, f j x) β€’ f' i) s x := by
simpa [ContinuousLinearMap.sum_apply, ContinuousLinearMap.smul_apply] using (HasFDerivWithinAt.finset_prod (fun i hi ↦ (hf i hi).hasFDerivWithinAt)).hasDerivWithinAt
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Prod section HasDeriv variable {ΞΉ : Type*} [DecidableEq ΞΉ] {𝔸' : Type*} [NormedCommRing 𝔸'] [NormedAlgebra π•œ 𝔸'] {u : Finset ΞΉ} {f : ΞΉ β†’ π•œ β†’ 𝔸'} {f' : ΞΉ β†’ 𝔸'} theorem HasDerivAt.finset_prod (hf : βˆ€ i ∈ u, HasDerivAt (f i) (f' i) x) : HasDerivAt (∏ i ∈ u, f i Β·) (βˆ‘ i ∈ u, (∏ j ∈ u.erase i, f j x) β€’ f' i) x := by simpa [ContinuousLinearMap.sum_apply, ContinuousLinearMap.smul_apply] using (HasFDerivAt.finset_prod (fun i hi ↦ (hf i hi).hasFDerivAt)).hasDerivAt theorem HasDerivWithinAt.finset_prod (hf : βˆ€ i ∈ u, HasDerivWithinAt (f i) (f' i) s x) : HasDerivWithinAt (∏ i ∈ u, f i Β·) (βˆ‘ i ∈ u, (∏ j ∈ u.erase i, f j x) β€’ f' i) s x := by simpa [ContinuousLinearMap.sum_apply, ContinuousLinearMap.smul_apply] using (HasFDerivWithinAt.finset_prod (fun i hi ↦ (hf i hi).hasFDerivWithinAt)).hasDerivWithinAt
Mathlib/Analysis/Calculus/Deriv/Mul.lean
346
349
theorem HasStrictDerivAt.finset_prod (hf : βˆ€ i ∈ u, HasStrictDerivAt (f i) (f' i) x) : HasStrictDerivAt (∏ i ∈ u, f i Β·) (βˆ‘ i ∈ u, (∏ j ∈ u.erase i, f j x) β€’ f' i) x := by
simpa [ContinuousLinearMap.sum_apply, ContinuousLinearMap.smul_apply] using (HasStrictFDerivAt.finset_prod (fun i hi ↦ (hf i hi).hasStrictFDerivAt)).hasStrictDerivAt
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Prod section CLMCompApply open ContinuousLinearMap variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] {c : π•œ β†’ F β†’L[π•œ] G} {c' : F β†’L[π•œ] G} {d : π•œ β†’ E β†’L[π•œ] F} {d' : E β†’L[π•œ] F} {u : π•œ β†’ F} {u' : F}
Mathlib/Analysis/Calculus/Deriv/Mul.lean
447
451
theorem HasStrictDerivAt.clm_comp (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by
have := (hc.hasStrictFDerivAt.clm_comp hd.hasStrictFDerivAt).hasStrictDerivAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Prod section CLMCompApply open ContinuousLinearMap variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] {c : π•œ β†’ F β†’L[π•œ] G} {c' : F β†’L[π•œ] G} {d : π•œ β†’ E β†’L[π•œ] F} {d' : E β†’L[π•œ] F} {u : π•œ β†’ F} {u' : F} theorem HasStrictDerivAt.clm_comp (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by have := (hc.hasStrictFDerivAt.clm_comp hd.hasStrictFDerivAt).hasStrictDerivAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.clm_comp HasStrictDerivAt.clm_comp
Mathlib/Analysis/Calculus/Deriv/Mul.lean
454
459
theorem HasDerivWithinAt.clm_comp (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') s x := by
have := (hc.hasFDerivWithinAt.clm_comp hd.hasFDerivWithinAt).hasDerivWithinAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Prod section CLMCompApply open ContinuousLinearMap variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] {c : π•œ β†’ F β†’L[π•œ] G} {c' : F β†’L[π•œ] G} {d : π•œ β†’ E β†’L[π•œ] F} {d' : E β†’L[π•œ] F} {u : π•œ β†’ F} {u' : F} theorem HasStrictDerivAt.clm_comp (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by have := (hc.hasStrictFDerivAt.clm_comp hd.hasStrictFDerivAt).hasStrictDerivAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.clm_comp HasStrictDerivAt.clm_comp theorem HasDerivWithinAt.clm_comp (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') s x := by have := (hc.hasFDerivWithinAt.clm_comp hd.hasFDerivWithinAt).hasDerivWithinAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.clm_comp HasDerivWithinAt.clm_comp
Mathlib/Analysis/Calculus/Deriv/Mul.lean
462
465
theorem HasDerivAt.clm_comp (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by
rw [← hasDerivWithinAt_univ] at * exact hc.clm_comp hd
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Prod section CLMCompApply open ContinuousLinearMap variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] {c : π•œ β†’ F β†’L[π•œ] G} {c' : F β†’L[π•œ] G} {d : π•œ β†’ E β†’L[π•œ] F} {d' : E β†’L[π•œ] F} {u : π•œ β†’ F} {u' : F} theorem HasStrictDerivAt.clm_comp (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by have := (hc.hasStrictFDerivAt.clm_comp hd.hasStrictFDerivAt).hasStrictDerivAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.clm_comp HasStrictDerivAt.clm_comp theorem HasDerivWithinAt.clm_comp (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') s x := by have := (hc.hasFDerivWithinAt.clm_comp hd.hasFDerivWithinAt).hasDerivWithinAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.clm_comp HasDerivWithinAt.clm_comp theorem HasDerivAt.clm_comp (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by rw [← hasDerivWithinAt_univ] at * exact hc.clm_comp hd #align has_deriv_at.clm_comp HasDerivAt.clm_comp theorem derivWithin_clm_comp (hc : DifferentiableWithinAt π•œ c s x) (hd : DifferentiableWithinAt π•œ d s x) (hxs : UniqueDiffWithinAt π•œ s x) : derivWithin (fun y => (c y).comp (d y)) s x = (derivWithin c s x).comp (d x) + (c x).comp (derivWithin d s x) := (hc.hasDerivWithinAt.clm_comp hd.hasDerivWithinAt).derivWithin hxs #align deriv_within_clm_comp derivWithin_clm_comp theorem deriv_clm_comp (hc : DifferentiableAt π•œ c x) (hd : DifferentiableAt π•œ d x) : deriv (fun y => (c y).comp (d y)) x = (deriv c x).comp (d x) + (c x).comp (deriv d x) := (hc.hasDerivAt.clm_comp hd.hasDerivAt).deriv #align deriv_clm_comp deriv_clm_comp
Mathlib/Analysis/Calculus/Deriv/Mul.lean
480
484
theorem HasStrictDerivAt.clm_apply (hc : HasStrictDerivAt c c' x) (hu : HasStrictDerivAt u u' x) : HasStrictDerivAt (fun y => (c y) (u y)) (c' (u x) + c x u') x := by
have := (hc.hasStrictFDerivAt.clm_apply hu.hasStrictFDerivAt).hasStrictDerivAt rwa [add_apply, comp_apply, flip_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Prod section CLMCompApply open ContinuousLinearMap variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] {c : π•œ β†’ F β†’L[π•œ] G} {c' : F β†’L[π•œ] G} {d : π•œ β†’ E β†’L[π•œ] F} {d' : E β†’L[π•œ] F} {u : π•œ β†’ F} {u' : F} theorem HasStrictDerivAt.clm_comp (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by have := (hc.hasStrictFDerivAt.clm_comp hd.hasStrictFDerivAt).hasStrictDerivAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.clm_comp HasStrictDerivAt.clm_comp theorem HasDerivWithinAt.clm_comp (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') s x := by have := (hc.hasFDerivWithinAt.clm_comp hd.hasFDerivWithinAt).hasDerivWithinAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.clm_comp HasDerivWithinAt.clm_comp theorem HasDerivAt.clm_comp (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by rw [← hasDerivWithinAt_univ] at * exact hc.clm_comp hd #align has_deriv_at.clm_comp HasDerivAt.clm_comp theorem derivWithin_clm_comp (hc : DifferentiableWithinAt π•œ c s x) (hd : DifferentiableWithinAt π•œ d s x) (hxs : UniqueDiffWithinAt π•œ s x) : derivWithin (fun y => (c y).comp (d y)) s x = (derivWithin c s x).comp (d x) + (c x).comp (derivWithin d s x) := (hc.hasDerivWithinAt.clm_comp hd.hasDerivWithinAt).derivWithin hxs #align deriv_within_clm_comp derivWithin_clm_comp theorem deriv_clm_comp (hc : DifferentiableAt π•œ c x) (hd : DifferentiableAt π•œ d x) : deriv (fun y => (c y).comp (d y)) x = (deriv c x).comp (d x) + (c x).comp (deriv d x) := (hc.hasDerivAt.clm_comp hd.hasDerivAt).deriv #align deriv_clm_comp deriv_clm_comp theorem HasStrictDerivAt.clm_apply (hc : HasStrictDerivAt c c' x) (hu : HasStrictDerivAt u u' x) : HasStrictDerivAt (fun y => (c y) (u y)) (c' (u x) + c x u') x := by have := (hc.hasStrictFDerivAt.clm_apply hu.hasStrictFDerivAt).hasStrictDerivAt rwa [add_apply, comp_apply, flip_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.clm_apply HasStrictDerivAt.clm_apply
Mathlib/Analysis/Calculus/Deriv/Mul.lean
487
492
theorem HasDerivWithinAt.clm_apply (hc : HasDerivWithinAt c c' s x) (hu : HasDerivWithinAt u u' s x) : HasDerivWithinAt (fun y => (c y) (u y)) (c' (u x) + c x u') s x := by
have := (hc.hasFDerivWithinAt.clm_apply hu.hasFDerivWithinAt).hasDerivWithinAt rwa [add_apply, comp_apply, flip_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this
1,618
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Prod section CLMCompApply open ContinuousLinearMap variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] {c : π•œ β†’ F β†’L[π•œ] G} {c' : F β†’L[π•œ] G} {d : π•œ β†’ E β†’L[π•œ] F} {d' : E β†’L[π•œ] F} {u : π•œ β†’ F} {u' : F} theorem HasStrictDerivAt.clm_comp (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by have := (hc.hasStrictFDerivAt.clm_comp hd.hasStrictFDerivAt).hasStrictDerivAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.clm_comp HasStrictDerivAt.clm_comp theorem HasDerivWithinAt.clm_comp (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') s x := by have := (hc.hasFDerivWithinAt.clm_comp hd.hasFDerivWithinAt).hasDerivWithinAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.clm_comp HasDerivWithinAt.clm_comp theorem HasDerivAt.clm_comp (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by rw [← hasDerivWithinAt_univ] at * exact hc.clm_comp hd #align has_deriv_at.clm_comp HasDerivAt.clm_comp theorem derivWithin_clm_comp (hc : DifferentiableWithinAt π•œ c s x) (hd : DifferentiableWithinAt π•œ d s x) (hxs : UniqueDiffWithinAt π•œ s x) : derivWithin (fun y => (c y).comp (d y)) s x = (derivWithin c s x).comp (d x) + (c x).comp (derivWithin d s x) := (hc.hasDerivWithinAt.clm_comp hd.hasDerivWithinAt).derivWithin hxs #align deriv_within_clm_comp derivWithin_clm_comp theorem deriv_clm_comp (hc : DifferentiableAt π•œ c x) (hd : DifferentiableAt π•œ d x) : deriv (fun y => (c y).comp (d y)) x = (deriv c x).comp (d x) + (c x).comp (deriv d x) := (hc.hasDerivAt.clm_comp hd.hasDerivAt).deriv #align deriv_clm_comp deriv_clm_comp theorem HasStrictDerivAt.clm_apply (hc : HasStrictDerivAt c c' x) (hu : HasStrictDerivAt u u' x) : HasStrictDerivAt (fun y => (c y) (u y)) (c' (u x) + c x u') x := by have := (hc.hasStrictFDerivAt.clm_apply hu.hasStrictFDerivAt).hasStrictDerivAt rwa [add_apply, comp_apply, flip_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.clm_apply HasStrictDerivAt.clm_apply theorem HasDerivWithinAt.clm_apply (hc : HasDerivWithinAt c c' s x) (hu : HasDerivWithinAt u u' s x) : HasDerivWithinAt (fun y => (c y) (u y)) (c' (u x) + c x u') s x := by have := (hc.hasFDerivWithinAt.clm_apply hu.hasFDerivWithinAt).hasDerivWithinAt rwa [add_apply, comp_apply, flip_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.clm_apply HasDerivWithinAt.clm_apply
Mathlib/Analysis/Calculus/Deriv/Mul.lean
495
499
theorem HasDerivAt.clm_apply (hc : HasDerivAt c c' x) (hu : HasDerivAt u u' x) : HasDerivAt (fun y => (c y) (u y)) (c' (u x) + c x u') x := by
have := (hc.hasFDerivAt.clm_apply hu.hasFDerivAt).hasDerivAt rwa [add_apply, comp_apply, flip_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this
1,618
import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Comp #align_import analysis.calculus.deriv.pow from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter ENNReal open Filter Asymptotics Set variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} variable {c : π•œ β†’ π•œ} {c' : π•œ} variable (n : β„•) theorem hasStrictDerivAt_pow : βˆ€ (n : β„•) (x : π•œ), HasStrictDerivAt (fun x : π•œ ↦ x ^ n) ((n : π•œ) * x ^ (n - 1)) x | 0, x => by simp [hasStrictDerivAt_const] | 1, x => by simpa using hasStrictDerivAt_id x | n + 1 + 1, x => by simpa [pow_succ, add_mul, mul_assoc] using (hasStrictDerivAt_pow (n + 1) x).mul (hasStrictDerivAt_id x) #align has_strict_deriv_at_pow hasStrictDerivAt_pow theorem hasDerivAt_pow (n : β„•) (x : π•œ) : HasDerivAt (fun x : π•œ => x ^ n) ((n : π•œ) * x ^ (n - 1)) x := (hasStrictDerivAt_pow n x).hasDerivAt #align has_deriv_at_pow hasDerivAt_pow theorem hasDerivWithinAt_pow (n : β„•) (x : π•œ) (s : Set π•œ) : HasDerivWithinAt (fun x : π•œ => x ^ n) ((n : π•œ) * x ^ (n - 1)) s x := (hasDerivAt_pow n x).hasDerivWithinAt #align has_deriv_within_at_pow hasDerivWithinAt_pow theorem differentiableAt_pow : DifferentiableAt π•œ (fun x : π•œ => x ^ n) x := (hasDerivAt_pow n x).differentiableAt #align differentiable_at_pow differentiableAt_pow theorem differentiableWithinAt_pow : DifferentiableWithinAt π•œ (fun x : π•œ => x ^ n) s x := (differentiableAt_pow n).differentiableWithinAt #align differentiable_within_at_pow differentiableWithinAt_pow theorem differentiable_pow : Differentiable π•œ fun x : π•œ => x ^ n := fun _ => differentiableAt_pow n #align differentiable_pow differentiable_pow theorem differentiableOn_pow : DifferentiableOn π•œ (fun x : π•œ => x ^ n) s := (differentiable_pow n).differentiableOn #align differentiable_on_pow differentiableOn_pow theorem deriv_pow : deriv (fun x : π•œ => x ^ n) x = (n : π•œ) * x ^ (n - 1) := (hasDerivAt_pow n x).deriv #align deriv_pow deriv_pow @[simp] theorem deriv_pow' : (deriv fun x : π•œ => x ^ n) = fun x => (n : π•œ) * x ^ (n - 1) := funext fun _ => deriv_pow n #align deriv_pow' deriv_pow' theorem derivWithin_pow (hxs : UniqueDiffWithinAt π•œ s x) : derivWithin (fun x : π•œ => x ^ n) s x = (n : π•œ) * x ^ (n - 1) := (hasDerivWithinAt_pow n x s).derivWithin hxs #align deriv_within_pow derivWithin_pow theorem HasDerivWithinAt.pow (hc : HasDerivWithinAt c c' s x) : HasDerivWithinAt (fun y => c y ^ n) ((n : π•œ) * c x ^ (n - 1) * c') s x := (hasDerivAt_pow n (c x)).comp_hasDerivWithinAt x hc #align has_deriv_within_at.pow HasDerivWithinAt.pow
Mathlib/Analysis/Calculus/Deriv/Pow.lean
99
102
theorem HasDerivAt.pow (hc : HasDerivAt c c' x) : HasDerivAt (fun y => c y ^ n) ((n : π•œ) * c x ^ (n - 1) * c') x := by
rw [← hasDerivWithinAt_univ] at * exact hc.pow n
1,619
import Mathlib.Analysis.Calculus.Deriv.Pow import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.deriv.zpow from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter open Filter Asymptotics Set variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {E : Type v} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {x : π•œ} variable {s : Set π•œ} variable {m : β„€}
Mathlib/Analysis/Calculus/Deriv/ZPow.lean
39
58
theorem hasStrictDerivAt_zpow (m : β„€) (x : π•œ) (h : x β‰  0 ∨ 0 ≀ m) : HasStrictDerivAt (fun x => x ^ m) ((m : π•œ) * x ^ (m - 1)) x := by
have : βˆ€ m : β„€, 0 < m β†’ HasStrictDerivAt (Β· ^ m) ((m : π•œ) * x ^ (m - 1)) x := fun m hm ↦ by lift m to β„• using hm.le simp only [zpow_natCast, Int.cast_natCast] convert hasStrictDerivAt_pow m x using 2 rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_natCast] norm_cast at hm rcases lt_trichotomy m 0 with (hm | hm | hm) Β· have hx : x β‰  0 := h.resolve_right hm.not_le have := (hasStrictDerivAt_inv ?_).scomp _ (this (-m) (neg_pos.2 hm)) <;> [skip; exact zpow_ne_zero _ hx] simp only [(Β· ∘ Β·), zpow_neg, one_div, inv_inv, smul_eq_mul] at this convert this using 1 rw [sq, mul_inv, inv_inv, Int.cast_neg, neg_mul, neg_mul_neg, ← zpow_addβ‚€ hx, mul_assoc, ← zpow_addβ‚€ hx] congr abel Β· simp only [hm, zpow_zero, Int.cast_zero, zero_mul, hasStrictDerivAt_const] Β· exact this m hm
1,620
import Mathlib.Analysis.Calculus.Deriv.Pow import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.deriv.zpow from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter open Filter Asymptotics Set variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {E : Type v} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {x : π•œ} variable {s : Set π•œ} variable {m : β„€} theorem hasStrictDerivAt_zpow (m : β„€) (x : π•œ) (h : x β‰  0 ∨ 0 ≀ m) : HasStrictDerivAt (fun x => x ^ m) ((m : π•œ) * x ^ (m - 1)) x := by have : βˆ€ m : β„€, 0 < m β†’ HasStrictDerivAt (Β· ^ m) ((m : π•œ) * x ^ (m - 1)) x := fun m hm ↦ by lift m to β„• using hm.le simp only [zpow_natCast, Int.cast_natCast] convert hasStrictDerivAt_pow m x using 2 rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_natCast] norm_cast at hm rcases lt_trichotomy m 0 with (hm | hm | hm) Β· have hx : x β‰  0 := h.resolve_right hm.not_le have := (hasStrictDerivAt_inv ?_).scomp _ (this (-m) (neg_pos.2 hm)) <;> [skip; exact zpow_ne_zero _ hx] simp only [(Β· ∘ Β·), zpow_neg, one_div, inv_inv, smul_eq_mul] at this convert this using 1 rw [sq, mul_inv, inv_inv, Int.cast_neg, neg_mul, neg_mul_neg, ← zpow_addβ‚€ hx, mul_assoc, ← zpow_addβ‚€ hx] congr abel Β· simp only [hm, zpow_zero, Int.cast_zero, zero_mul, hasStrictDerivAt_const] Β· exact this m hm #align has_strict_deriv_at_zpow hasStrictDerivAt_zpow theorem hasDerivAt_zpow (m : β„€) (x : π•œ) (h : x β‰  0 ∨ 0 ≀ m) : HasDerivAt (fun x => x ^ m) ((m : π•œ) * x ^ (m - 1)) x := (hasStrictDerivAt_zpow m x h).hasDerivAt #align has_deriv_at_zpow hasDerivAt_zpow theorem hasDerivWithinAt_zpow (m : β„€) (x : π•œ) (h : x β‰  0 ∨ 0 ≀ m) (s : Set π•œ) : HasDerivWithinAt (fun x => x ^ m) ((m : π•œ) * x ^ (m - 1)) s x := (hasDerivAt_zpow m x h).hasDerivWithinAt #align has_deriv_within_at_zpow hasDerivWithinAt_zpow theorem differentiableAt_zpow : DifferentiableAt π•œ (fun x => x ^ m) x ↔ x β‰  0 ∨ 0 ≀ m := ⟨fun H => NormedField.continuousAt_zpow.1 H.continuousAt, fun H => (hasDerivAt_zpow m x H).differentiableAt⟩ #align differentiable_at_zpow differentiableAt_zpow theorem differentiableWithinAt_zpow (m : β„€) (x : π•œ) (h : x β‰  0 ∨ 0 ≀ m) : DifferentiableWithinAt π•œ (fun x => x ^ m) s x := (differentiableAt_zpow.mpr h).differentiableWithinAt #align differentiable_within_at_zpow differentiableWithinAt_zpow theorem differentiableOn_zpow (m : β„€) (s : Set π•œ) (h : (0 : π•œ) βˆ‰ s ∨ 0 ≀ m) : DifferentiableOn π•œ (fun x => x ^ m) s := fun x hxs => differentiableWithinAt_zpow m x <| h.imp_left <| ne_of_mem_of_not_mem hxs #align differentiable_on_zpow differentiableOn_zpow
Mathlib/Analysis/Calculus/Deriv/ZPow.lean
86
92
theorem deriv_zpow (m : β„€) (x : π•œ) : deriv (fun x => x ^ m) x = m * x ^ (m - 1) := by
by_cases H : x β‰  0 ∨ 0 ≀ m Β· exact (hasDerivAt_zpow m x H).deriv Β· rw [deriv_zero_of_not_differentiableAt (mt differentiableAt_zpow.1 H)] push_neg at H rcases H with ⟨rfl, hm⟩ rw [zero_zpow _ ((sub_one_lt _).trans hm).ne, mul_zero]
1,620
import Mathlib.Analysis.Calculus.Deriv.Pow import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.deriv.zpow from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter open Filter Asymptotics Set variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {E : Type v} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {x : π•œ} variable {s : Set π•œ} variable {m : β„€} theorem hasStrictDerivAt_zpow (m : β„€) (x : π•œ) (h : x β‰  0 ∨ 0 ≀ m) : HasStrictDerivAt (fun x => x ^ m) ((m : π•œ) * x ^ (m - 1)) x := by have : βˆ€ m : β„€, 0 < m β†’ HasStrictDerivAt (Β· ^ m) ((m : π•œ) * x ^ (m - 1)) x := fun m hm ↦ by lift m to β„• using hm.le simp only [zpow_natCast, Int.cast_natCast] convert hasStrictDerivAt_pow m x using 2 rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_natCast] norm_cast at hm rcases lt_trichotomy m 0 with (hm | hm | hm) Β· have hx : x β‰  0 := h.resolve_right hm.not_le have := (hasStrictDerivAt_inv ?_).scomp _ (this (-m) (neg_pos.2 hm)) <;> [skip; exact zpow_ne_zero _ hx] simp only [(Β· ∘ Β·), zpow_neg, one_div, inv_inv, smul_eq_mul] at this convert this using 1 rw [sq, mul_inv, inv_inv, Int.cast_neg, neg_mul, neg_mul_neg, ← zpow_addβ‚€ hx, mul_assoc, ← zpow_addβ‚€ hx] congr abel Β· simp only [hm, zpow_zero, Int.cast_zero, zero_mul, hasStrictDerivAt_const] Β· exact this m hm #align has_strict_deriv_at_zpow hasStrictDerivAt_zpow theorem hasDerivAt_zpow (m : β„€) (x : π•œ) (h : x β‰  0 ∨ 0 ≀ m) : HasDerivAt (fun x => x ^ m) ((m : π•œ) * x ^ (m - 1)) x := (hasStrictDerivAt_zpow m x h).hasDerivAt #align has_deriv_at_zpow hasDerivAt_zpow theorem hasDerivWithinAt_zpow (m : β„€) (x : π•œ) (h : x β‰  0 ∨ 0 ≀ m) (s : Set π•œ) : HasDerivWithinAt (fun x => x ^ m) ((m : π•œ) * x ^ (m - 1)) s x := (hasDerivAt_zpow m x h).hasDerivWithinAt #align has_deriv_within_at_zpow hasDerivWithinAt_zpow theorem differentiableAt_zpow : DifferentiableAt π•œ (fun x => x ^ m) x ↔ x β‰  0 ∨ 0 ≀ m := ⟨fun H => NormedField.continuousAt_zpow.1 H.continuousAt, fun H => (hasDerivAt_zpow m x H).differentiableAt⟩ #align differentiable_at_zpow differentiableAt_zpow theorem differentiableWithinAt_zpow (m : β„€) (x : π•œ) (h : x β‰  0 ∨ 0 ≀ m) : DifferentiableWithinAt π•œ (fun x => x ^ m) s x := (differentiableAt_zpow.mpr h).differentiableWithinAt #align differentiable_within_at_zpow differentiableWithinAt_zpow theorem differentiableOn_zpow (m : β„€) (s : Set π•œ) (h : (0 : π•œ) βˆ‰ s ∨ 0 ≀ m) : DifferentiableOn π•œ (fun x => x ^ m) s := fun x hxs => differentiableWithinAt_zpow m x <| h.imp_left <| ne_of_mem_of_not_mem hxs #align differentiable_on_zpow differentiableOn_zpow theorem deriv_zpow (m : β„€) (x : π•œ) : deriv (fun x => x ^ m) x = m * x ^ (m - 1) := by by_cases H : x β‰  0 ∨ 0 ≀ m Β· exact (hasDerivAt_zpow m x H).deriv Β· rw [deriv_zero_of_not_differentiableAt (mt differentiableAt_zpow.1 H)] push_neg at H rcases H with ⟨rfl, hm⟩ rw [zero_zpow _ ((sub_one_lt _).trans hm).ne, mul_zero] #align deriv_zpow deriv_zpow @[simp] theorem deriv_zpow' (m : β„€) : (deriv fun x : π•œ => x ^ m) = fun x => (m : π•œ) * x ^ (m - 1) := funext <| deriv_zpow m #align deriv_zpow' deriv_zpow' theorem derivWithin_zpow (hxs : UniqueDiffWithinAt π•œ s x) (h : x β‰  0 ∨ 0 ≀ m) : derivWithin (fun x => x ^ m) s x = (m : π•œ) * x ^ (m - 1) := (hasDerivWithinAt_zpow m x h s).derivWithin hxs #align deriv_within_zpow derivWithin_zpow @[simp]
Mathlib/Analysis/Calculus/Deriv/ZPow.lean
106
113
theorem iter_deriv_zpow' (m : β„€) (k : β„•) : (deriv^[k] fun x : π•œ => x ^ m) = fun x => (∏ i ∈ Finset.range k, ((m : π•œ) - i)) * x ^ (m - k) := by
induction' k with k ihk Β· simp only [Nat.zero_eq, one_mul, Int.ofNat_zero, id, sub_zero, Finset.prod_range_zero, Function.iterate_zero] Β· simp only [Function.iterate_succ_apply', ihk, deriv_const_mul_field', deriv_zpow', Finset.prod_range_succ, Int.ofNat_succ, ← sub_sub, Int.cast_sub, Int.cast_natCast, mul_assoc]
1,620
import Mathlib.Analysis.Calculus.Deriv.Pow import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.deriv.zpow from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter open Filter Asymptotics Set variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {E : Type v} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {x : π•œ} variable {s : Set π•œ} variable {m : β„€} theorem hasStrictDerivAt_zpow (m : β„€) (x : π•œ) (h : x β‰  0 ∨ 0 ≀ m) : HasStrictDerivAt (fun x => x ^ m) ((m : π•œ) * x ^ (m - 1)) x := by have : βˆ€ m : β„€, 0 < m β†’ HasStrictDerivAt (Β· ^ m) ((m : π•œ) * x ^ (m - 1)) x := fun m hm ↦ by lift m to β„• using hm.le simp only [zpow_natCast, Int.cast_natCast] convert hasStrictDerivAt_pow m x using 2 rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_natCast] norm_cast at hm rcases lt_trichotomy m 0 with (hm | hm | hm) Β· have hx : x β‰  0 := h.resolve_right hm.not_le have := (hasStrictDerivAt_inv ?_).scomp _ (this (-m) (neg_pos.2 hm)) <;> [skip; exact zpow_ne_zero _ hx] simp only [(Β· ∘ Β·), zpow_neg, one_div, inv_inv, smul_eq_mul] at this convert this using 1 rw [sq, mul_inv, inv_inv, Int.cast_neg, neg_mul, neg_mul_neg, ← zpow_addβ‚€ hx, mul_assoc, ← zpow_addβ‚€ hx] congr abel Β· simp only [hm, zpow_zero, Int.cast_zero, zero_mul, hasStrictDerivAt_const] Β· exact this m hm #align has_strict_deriv_at_zpow hasStrictDerivAt_zpow theorem hasDerivAt_zpow (m : β„€) (x : π•œ) (h : x β‰  0 ∨ 0 ≀ m) : HasDerivAt (fun x => x ^ m) ((m : π•œ) * x ^ (m - 1)) x := (hasStrictDerivAt_zpow m x h).hasDerivAt #align has_deriv_at_zpow hasDerivAt_zpow theorem hasDerivWithinAt_zpow (m : β„€) (x : π•œ) (h : x β‰  0 ∨ 0 ≀ m) (s : Set π•œ) : HasDerivWithinAt (fun x => x ^ m) ((m : π•œ) * x ^ (m - 1)) s x := (hasDerivAt_zpow m x h).hasDerivWithinAt #align has_deriv_within_at_zpow hasDerivWithinAt_zpow theorem differentiableAt_zpow : DifferentiableAt π•œ (fun x => x ^ m) x ↔ x β‰  0 ∨ 0 ≀ m := ⟨fun H => NormedField.continuousAt_zpow.1 H.continuousAt, fun H => (hasDerivAt_zpow m x H).differentiableAt⟩ #align differentiable_at_zpow differentiableAt_zpow theorem differentiableWithinAt_zpow (m : β„€) (x : π•œ) (h : x β‰  0 ∨ 0 ≀ m) : DifferentiableWithinAt π•œ (fun x => x ^ m) s x := (differentiableAt_zpow.mpr h).differentiableWithinAt #align differentiable_within_at_zpow differentiableWithinAt_zpow theorem differentiableOn_zpow (m : β„€) (s : Set π•œ) (h : (0 : π•œ) βˆ‰ s ∨ 0 ≀ m) : DifferentiableOn π•œ (fun x => x ^ m) s := fun x hxs => differentiableWithinAt_zpow m x <| h.imp_left <| ne_of_mem_of_not_mem hxs #align differentiable_on_zpow differentiableOn_zpow theorem deriv_zpow (m : β„€) (x : π•œ) : deriv (fun x => x ^ m) x = m * x ^ (m - 1) := by by_cases H : x β‰  0 ∨ 0 ≀ m Β· exact (hasDerivAt_zpow m x H).deriv Β· rw [deriv_zero_of_not_differentiableAt (mt differentiableAt_zpow.1 H)] push_neg at H rcases H with ⟨rfl, hm⟩ rw [zero_zpow _ ((sub_one_lt _).trans hm).ne, mul_zero] #align deriv_zpow deriv_zpow @[simp] theorem deriv_zpow' (m : β„€) : (deriv fun x : π•œ => x ^ m) = fun x => (m : π•œ) * x ^ (m - 1) := funext <| deriv_zpow m #align deriv_zpow' deriv_zpow' theorem derivWithin_zpow (hxs : UniqueDiffWithinAt π•œ s x) (h : x β‰  0 ∨ 0 ≀ m) : derivWithin (fun x => x ^ m) s x = (m : π•œ) * x ^ (m - 1) := (hasDerivWithinAt_zpow m x h s).derivWithin hxs #align deriv_within_zpow derivWithin_zpow @[simp] theorem iter_deriv_zpow' (m : β„€) (k : β„•) : (deriv^[k] fun x : π•œ => x ^ m) = fun x => (∏ i ∈ Finset.range k, ((m : π•œ) - i)) * x ^ (m - k) := by induction' k with k ihk Β· simp only [Nat.zero_eq, one_mul, Int.ofNat_zero, id, sub_zero, Finset.prod_range_zero, Function.iterate_zero] Β· simp only [Function.iterate_succ_apply', ihk, deriv_const_mul_field', deriv_zpow', Finset.prod_range_succ, Int.ofNat_succ, ← sub_sub, Int.cast_sub, Int.cast_natCast, mul_assoc] #align iter_deriv_zpow' iter_deriv_zpow' theorem iter_deriv_zpow (m : β„€) (x : π•œ) (k : β„•) : deriv^[k] (fun y => y ^ m) x = (∏ i ∈ Finset.range k, ((m : π•œ) - i)) * x ^ (m - k) := congr_fun (iter_deriv_zpow' m k) x #align iter_deriv_zpow iter_deriv_zpow
Mathlib/Analysis/Calculus/Deriv/ZPow.lean
121
128
theorem iter_deriv_pow (n : β„•) (x : π•œ) (k : β„•) : deriv^[k] (fun x : π•œ => x ^ n) x = (∏ i ∈ Finset.range k, ((n : π•œ) - i)) * x ^ (n - k) := by
simp only [← zpow_natCast, iter_deriv_zpow, Int.cast_natCast] rcases le_or_lt k n with hkn | hnk Β· rw [Int.ofNat_sub hkn] Β· have : (∏ i ∈ Finset.range k, (n - i : π•œ)) = 0 := Finset.prod_eq_zero (Finset.mem_range.2 hnk) (sub_self _) simp only [this, zero_mul]
1,620
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.Deriv.Pow #align_import analysis.special_functions.sqrt from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set open scoped Topology namespace Real noncomputable def sqPartialHomeomorph : PartialHomeomorph ℝ ℝ where toFun x := x ^ 2 invFun := (√·) source := Ioi 0 target := Ioi 0 map_source' _ h := mem_Ioi.2 (pow_pos (mem_Ioi.1 h) _) map_target' _ h := mem_Ioi.2 (sqrt_pos.2 h) left_inv' _ h := sqrt_sq (le_of_lt h) right_inv' _ h := sq_sqrt (le_of_lt h) open_source := isOpen_Ioi open_target := isOpen_Ioi continuousOn_toFun := (continuous_pow 2).continuousOn continuousOn_invFun := continuousOn_id.sqrt #align real.sq_local_homeomorph Real.sqPartialHomeomorph
Mathlib/Analysis/SpecialFunctions/Sqrt.lean
46
58
theorem deriv_sqrt_aux {x : ℝ} (hx : x β‰  0) : HasStrictDerivAt (√·) (1 / (2 * √x)) x ∧ βˆ€ n, ContDiffAt ℝ n (√·) x := by
cases' hx.lt_or_lt with hx hx Β· rw [sqrt_eq_zero_of_nonpos hx.le, mul_zero, div_zero] have : (√·) =αΆ [𝓝 x] fun _ => 0 := (gt_mem_nhds hx).mono fun x hx => sqrt_eq_zero_of_nonpos hx.le exact ⟨(hasStrictDerivAt_const x (0 : ℝ)).congr_of_eventuallyEq this.symm, fun n => contDiffAt_const.congr_of_eventuallyEq this⟩ Β· have : ↑2 * √x ^ (2 - 1) β‰  0 := by simp [(sqrt_pos.2 hx).ne', @two_ne_zero ℝ] constructor Β· simpa using sqPartialHomeomorph.hasStrictDerivAt_symm hx this (hasStrictDerivAt_pow 2 _) Β· exact fun n => sqPartialHomeomorph.contDiffAt_symm_deriv this hx (hasDerivAt_pow 2 (√x)) (contDiffAt_id.pow 2)
1,621
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.add from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter ENNReal open Filter Asymptotics Set variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L : Filter π•œ} section Add nonrec theorem HasDerivAtFilter.add (hf : HasDerivAtFilter f f' x L) (hg : HasDerivAtFilter g g' x L) : HasDerivAtFilter (fun y => f y + g y) (f' + g') x L := by simpa using (hf.add hg).hasDerivAtFilter #align has_deriv_at_filter.add HasDerivAtFilter.add nonrec theorem HasStrictDerivAt.add (hf : HasStrictDerivAt f f' x) (hg : HasStrictDerivAt g g' x) : HasStrictDerivAt (fun y => f y + g y) (f' + g') x := by simpa using (hf.add hg).hasStrictDerivAt #align has_strict_deriv_at.add HasStrictDerivAt.add nonrec theorem HasDerivWithinAt.add (hf : HasDerivWithinAt f f' s x) (hg : HasDerivWithinAt g g' s x) : HasDerivWithinAt (fun y => f y + g y) (f' + g') s x := hf.add hg #align has_deriv_within_at.add HasDerivWithinAt.add nonrec theorem HasDerivAt.add (hf : HasDerivAt f f' x) (hg : HasDerivAt g g' x) : HasDerivAt (fun x => f x + g x) (f' + g') x := hf.add hg #align has_deriv_at.add HasDerivAt.add theorem derivWithin_add (hxs : UniqueDiffWithinAt π•œ s x) (hf : DifferentiableWithinAt π•œ f s x) (hg : DifferentiableWithinAt π•œ g s x) : derivWithin (fun y => f y + g y) s x = derivWithin f s x + derivWithin g s x := (hf.hasDerivWithinAt.add hg.hasDerivWithinAt).derivWithin hxs #align deriv_within_add derivWithin_add @[simp] theorem deriv_add (hf : DifferentiableAt π•œ f x) (hg : DifferentiableAt π•œ g x) : deriv (fun y => f y + g y) x = deriv f x + deriv g x := (hf.hasDerivAt.add hg.hasDerivAt).deriv #align deriv_add deriv_add -- Porting note (#10756): new theorem theorem HasStrictDerivAt.add_const (c : F) (hf : HasStrictDerivAt f f' x) : HasStrictDerivAt (fun y ↦ f y + c) f' x := add_zero f' β–Έ hf.add (hasStrictDerivAt_const x c) theorem HasDerivAtFilter.add_const (hf : HasDerivAtFilter f f' x L) (c : F) : HasDerivAtFilter (fun y => f y + c) f' x L := add_zero f' β–Έ hf.add (hasDerivAtFilter_const x L c) #align has_deriv_at_filter.add_const HasDerivAtFilter.add_const nonrec theorem HasDerivWithinAt.add_const (hf : HasDerivWithinAt f f' s x) (c : F) : HasDerivWithinAt (fun y => f y + c) f' s x := hf.add_const c #align has_deriv_within_at.add_const HasDerivWithinAt.add_const nonrec theorem HasDerivAt.add_const (hf : HasDerivAt f f' x) (c : F) : HasDerivAt (fun x => f x + c) f' x := hf.add_const c #align has_deriv_at.add_const HasDerivAt.add_const
Mathlib/Analysis/Calculus/Deriv/Add.lean
97
99
theorem derivWithin_add_const (hxs : UniqueDiffWithinAt π•œ s x) (c : F) : derivWithin (fun y => f y + c) s x = derivWithin f s x := by
simp only [derivWithin, fderivWithin_add_const hxs]
1,622
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.add from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter ENNReal open Filter Asymptotics Set variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L : Filter π•œ} section Add nonrec theorem HasDerivAtFilter.add (hf : HasDerivAtFilter f f' x L) (hg : HasDerivAtFilter g g' x L) : HasDerivAtFilter (fun y => f y + g y) (f' + g') x L := by simpa using (hf.add hg).hasDerivAtFilter #align has_deriv_at_filter.add HasDerivAtFilter.add nonrec theorem HasStrictDerivAt.add (hf : HasStrictDerivAt f f' x) (hg : HasStrictDerivAt g g' x) : HasStrictDerivAt (fun y => f y + g y) (f' + g') x := by simpa using (hf.add hg).hasStrictDerivAt #align has_strict_deriv_at.add HasStrictDerivAt.add nonrec theorem HasDerivWithinAt.add (hf : HasDerivWithinAt f f' s x) (hg : HasDerivWithinAt g g' s x) : HasDerivWithinAt (fun y => f y + g y) (f' + g') s x := hf.add hg #align has_deriv_within_at.add HasDerivWithinAt.add nonrec theorem HasDerivAt.add (hf : HasDerivAt f f' x) (hg : HasDerivAt g g' x) : HasDerivAt (fun x => f x + g x) (f' + g') x := hf.add hg #align has_deriv_at.add HasDerivAt.add theorem derivWithin_add (hxs : UniqueDiffWithinAt π•œ s x) (hf : DifferentiableWithinAt π•œ f s x) (hg : DifferentiableWithinAt π•œ g s x) : derivWithin (fun y => f y + g y) s x = derivWithin f s x + derivWithin g s x := (hf.hasDerivWithinAt.add hg.hasDerivWithinAt).derivWithin hxs #align deriv_within_add derivWithin_add @[simp] theorem deriv_add (hf : DifferentiableAt π•œ f x) (hg : DifferentiableAt π•œ g x) : deriv (fun y => f y + g y) x = deriv f x + deriv g x := (hf.hasDerivAt.add hg.hasDerivAt).deriv #align deriv_add deriv_add -- Porting note (#10756): new theorem theorem HasStrictDerivAt.add_const (c : F) (hf : HasStrictDerivAt f f' x) : HasStrictDerivAt (fun y ↦ f y + c) f' x := add_zero f' β–Έ hf.add (hasStrictDerivAt_const x c) theorem HasDerivAtFilter.add_const (hf : HasDerivAtFilter f f' x L) (c : F) : HasDerivAtFilter (fun y => f y + c) f' x L := add_zero f' β–Έ hf.add (hasDerivAtFilter_const x L c) #align has_deriv_at_filter.add_const HasDerivAtFilter.add_const nonrec theorem HasDerivWithinAt.add_const (hf : HasDerivWithinAt f f' s x) (c : F) : HasDerivWithinAt (fun y => f y + c) f' s x := hf.add_const c #align has_deriv_within_at.add_const HasDerivWithinAt.add_const nonrec theorem HasDerivAt.add_const (hf : HasDerivAt f f' x) (c : F) : HasDerivAt (fun x => f x + c) f' x := hf.add_const c #align has_deriv_at.add_const HasDerivAt.add_const theorem derivWithin_add_const (hxs : UniqueDiffWithinAt π•œ s x) (c : F) : derivWithin (fun y => f y + c) s x = derivWithin f s x := by simp only [derivWithin, fderivWithin_add_const hxs] #align deriv_within_add_const derivWithin_add_const
Mathlib/Analysis/Calculus/Deriv/Add.lean
102
103
theorem deriv_add_const (c : F) : deriv (fun y => f y + c) x = deriv f x := by
simp only [deriv, fderiv_add_const]
1,622
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.add from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter ENNReal open Filter Asymptotics Set variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L : Filter π•œ} section Add nonrec theorem HasDerivAtFilter.add (hf : HasDerivAtFilter f f' x L) (hg : HasDerivAtFilter g g' x L) : HasDerivAtFilter (fun y => f y + g y) (f' + g') x L := by simpa using (hf.add hg).hasDerivAtFilter #align has_deriv_at_filter.add HasDerivAtFilter.add nonrec theorem HasStrictDerivAt.add (hf : HasStrictDerivAt f f' x) (hg : HasStrictDerivAt g g' x) : HasStrictDerivAt (fun y => f y + g y) (f' + g') x := by simpa using (hf.add hg).hasStrictDerivAt #align has_strict_deriv_at.add HasStrictDerivAt.add nonrec theorem HasDerivWithinAt.add (hf : HasDerivWithinAt f f' s x) (hg : HasDerivWithinAt g g' s x) : HasDerivWithinAt (fun y => f y + g y) (f' + g') s x := hf.add hg #align has_deriv_within_at.add HasDerivWithinAt.add nonrec theorem HasDerivAt.add (hf : HasDerivAt f f' x) (hg : HasDerivAt g g' x) : HasDerivAt (fun x => f x + g x) (f' + g') x := hf.add hg #align has_deriv_at.add HasDerivAt.add theorem derivWithin_add (hxs : UniqueDiffWithinAt π•œ s x) (hf : DifferentiableWithinAt π•œ f s x) (hg : DifferentiableWithinAt π•œ g s x) : derivWithin (fun y => f y + g y) s x = derivWithin f s x + derivWithin g s x := (hf.hasDerivWithinAt.add hg.hasDerivWithinAt).derivWithin hxs #align deriv_within_add derivWithin_add @[simp] theorem deriv_add (hf : DifferentiableAt π•œ f x) (hg : DifferentiableAt π•œ g x) : deriv (fun y => f y + g y) x = deriv f x + deriv g x := (hf.hasDerivAt.add hg.hasDerivAt).deriv #align deriv_add deriv_add -- Porting note (#10756): new theorem theorem HasStrictDerivAt.add_const (c : F) (hf : HasStrictDerivAt f f' x) : HasStrictDerivAt (fun y ↦ f y + c) f' x := add_zero f' β–Έ hf.add (hasStrictDerivAt_const x c) theorem HasDerivAtFilter.add_const (hf : HasDerivAtFilter f f' x L) (c : F) : HasDerivAtFilter (fun y => f y + c) f' x L := add_zero f' β–Έ hf.add (hasDerivAtFilter_const x L c) #align has_deriv_at_filter.add_const HasDerivAtFilter.add_const nonrec theorem HasDerivWithinAt.add_const (hf : HasDerivWithinAt f f' s x) (c : F) : HasDerivWithinAt (fun y => f y + c) f' s x := hf.add_const c #align has_deriv_within_at.add_const HasDerivWithinAt.add_const nonrec theorem HasDerivAt.add_const (hf : HasDerivAt f f' x) (c : F) : HasDerivAt (fun x => f x + c) f' x := hf.add_const c #align has_deriv_at.add_const HasDerivAt.add_const theorem derivWithin_add_const (hxs : UniqueDiffWithinAt π•œ s x) (c : F) : derivWithin (fun y => f y + c) s x = derivWithin f s x := by simp only [derivWithin, fderivWithin_add_const hxs] #align deriv_within_add_const derivWithin_add_const theorem deriv_add_const (c : F) : deriv (fun y => f y + c) x = deriv f x := by simp only [deriv, fderiv_add_const] #align deriv_add_const deriv_add_const @[simp] theorem deriv_add_const' (c : F) : (deriv fun y => f y + c) = deriv f := funext fun _ => deriv_add_const c #align deriv_add_const' deriv_add_const' -- Porting note (#10756): new theorem theorem HasStrictDerivAt.const_add (c : F) (hf : HasStrictDerivAt f f' x) : HasStrictDerivAt (fun y ↦ c + f y) f' x := zero_add f' β–Έ (hasStrictDerivAt_const x c).add hf theorem HasDerivAtFilter.const_add (c : F) (hf : HasDerivAtFilter f f' x L) : HasDerivAtFilter (fun y => c + f y) f' x L := zero_add f' β–Έ (hasDerivAtFilter_const x L c).add hf #align has_deriv_at_filter.const_add HasDerivAtFilter.const_add nonrec theorem HasDerivWithinAt.const_add (c : F) (hf : HasDerivWithinAt f f' s x) : HasDerivWithinAt (fun y => c + f y) f' s x := hf.const_add c #align has_deriv_within_at.const_add HasDerivWithinAt.const_add nonrec theorem HasDerivAt.const_add (c : F) (hf : HasDerivAt f f' x) : HasDerivAt (fun x => c + f x) f' x := hf.const_add c #align has_deriv_at.const_add HasDerivAt.const_add
Mathlib/Analysis/Calculus/Deriv/Add.lean
131
133
theorem derivWithin_const_add (hxs : UniqueDiffWithinAt π•œ s x) (c : F) : derivWithin (fun y => c + f y) s x = derivWithin f s x := by
simp only [derivWithin, fderivWithin_const_add hxs]
1,622
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.add from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter ENNReal open Filter Asymptotics Set variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L : Filter π•œ} section Add nonrec theorem HasDerivAtFilter.add (hf : HasDerivAtFilter f f' x L) (hg : HasDerivAtFilter g g' x L) : HasDerivAtFilter (fun y => f y + g y) (f' + g') x L := by simpa using (hf.add hg).hasDerivAtFilter #align has_deriv_at_filter.add HasDerivAtFilter.add nonrec theorem HasStrictDerivAt.add (hf : HasStrictDerivAt f f' x) (hg : HasStrictDerivAt g g' x) : HasStrictDerivAt (fun y => f y + g y) (f' + g') x := by simpa using (hf.add hg).hasStrictDerivAt #align has_strict_deriv_at.add HasStrictDerivAt.add nonrec theorem HasDerivWithinAt.add (hf : HasDerivWithinAt f f' s x) (hg : HasDerivWithinAt g g' s x) : HasDerivWithinAt (fun y => f y + g y) (f' + g') s x := hf.add hg #align has_deriv_within_at.add HasDerivWithinAt.add nonrec theorem HasDerivAt.add (hf : HasDerivAt f f' x) (hg : HasDerivAt g g' x) : HasDerivAt (fun x => f x + g x) (f' + g') x := hf.add hg #align has_deriv_at.add HasDerivAt.add theorem derivWithin_add (hxs : UniqueDiffWithinAt π•œ s x) (hf : DifferentiableWithinAt π•œ f s x) (hg : DifferentiableWithinAt π•œ g s x) : derivWithin (fun y => f y + g y) s x = derivWithin f s x + derivWithin g s x := (hf.hasDerivWithinAt.add hg.hasDerivWithinAt).derivWithin hxs #align deriv_within_add derivWithin_add @[simp] theorem deriv_add (hf : DifferentiableAt π•œ f x) (hg : DifferentiableAt π•œ g x) : deriv (fun y => f y + g y) x = deriv f x + deriv g x := (hf.hasDerivAt.add hg.hasDerivAt).deriv #align deriv_add deriv_add -- Porting note (#10756): new theorem theorem HasStrictDerivAt.add_const (c : F) (hf : HasStrictDerivAt f f' x) : HasStrictDerivAt (fun y ↦ f y + c) f' x := add_zero f' β–Έ hf.add (hasStrictDerivAt_const x c) theorem HasDerivAtFilter.add_const (hf : HasDerivAtFilter f f' x L) (c : F) : HasDerivAtFilter (fun y => f y + c) f' x L := add_zero f' β–Έ hf.add (hasDerivAtFilter_const x L c) #align has_deriv_at_filter.add_const HasDerivAtFilter.add_const nonrec theorem HasDerivWithinAt.add_const (hf : HasDerivWithinAt f f' s x) (c : F) : HasDerivWithinAt (fun y => f y + c) f' s x := hf.add_const c #align has_deriv_within_at.add_const HasDerivWithinAt.add_const nonrec theorem HasDerivAt.add_const (hf : HasDerivAt f f' x) (c : F) : HasDerivAt (fun x => f x + c) f' x := hf.add_const c #align has_deriv_at.add_const HasDerivAt.add_const theorem derivWithin_add_const (hxs : UniqueDiffWithinAt π•œ s x) (c : F) : derivWithin (fun y => f y + c) s x = derivWithin f s x := by simp only [derivWithin, fderivWithin_add_const hxs] #align deriv_within_add_const derivWithin_add_const theorem deriv_add_const (c : F) : deriv (fun y => f y + c) x = deriv f x := by simp only [deriv, fderiv_add_const] #align deriv_add_const deriv_add_const @[simp] theorem deriv_add_const' (c : F) : (deriv fun y => f y + c) = deriv f := funext fun _ => deriv_add_const c #align deriv_add_const' deriv_add_const' -- Porting note (#10756): new theorem theorem HasStrictDerivAt.const_add (c : F) (hf : HasStrictDerivAt f f' x) : HasStrictDerivAt (fun y ↦ c + f y) f' x := zero_add f' β–Έ (hasStrictDerivAt_const x c).add hf theorem HasDerivAtFilter.const_add (c : F) (hf : HasDerivAtFilter f f' x L) : HasDerivAtFilter (fun y => c + f y) f' x L := zero_add f' β–Έ (hasDerivAtFilter_const x L c).add hf #align has_deriv_at_filter.const_add HasDerivAtFilter.const_add nonrec theorem HasDerivWithinAt.const_add (c : F) (hf : HasDerivWithinAt f f' s x) : HasDerivWithinAt (fun y => c + f y) f' s x := hf.const_add c #align has_deriv_within_at.const_add HasDerivWithinAt.const_add nonrec theorem HasDerivAt.const_add (c : F) (hf : HasDerivAt f f' x) : HasDerivAt (fun x => c + f x) f' x := hf.const_add c #align has_deriv_at.const_add HasDerivAt.const_add theorem derivWithin_const_add (hxs : UniqueDiffWithinAt π•œ s x) (c : F) : derivWithin (fun y => c + f y) s x = derivWithin f s x := by simp only [derivWithin, fderivWithin_const_add hxs] #align deriv_within_const_add derivWithin_const_add
Mathlib/Analysis/Calculus/Deriv/Add.lean
136
137
theorem deriv_const_add (c : F) : deriv (fun y => c + f y) x = deriv f x := by
simp only [deriv, fderiv_const_add]
1,622
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.add from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter ENNReal open Filter Asymptotics Set variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L : Filter π•œ} section Sum variable {ΞΉ : Type*} {u : Finset ΞΉ} {A : ΞΉ β†’ π•œ β†’ F} {A' : ΞΉ β†’ F}
Mathlib/Analysis/Calculus/Deriv/Add.lean
153
155
theorem HasDerivAtFilter.sum (h : βˆ€ i ∈ u, HasDerivAtFilter (A i) (A' i) x L) : HasDerivAtFilter (fun y => βˆ‘ i ∈ u, A i y) (βˆ‘ i ∈ u, A' i) x L := by
simpa [ContinuousLinearMap.sum_apply] using (HasFDerivAtFilter.sum h).hasDerivAtFilter
1,622
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.add from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter ENNReal open Filter Asymptotics Set variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L : Filter π•œ} section Sum variable {ΞΉ : Type*} {u : Finset ΞΉ} {A : ΞΉ β†’ π•œ β†’ F} {A' : ΞΉ β†’ F} theorem HasDerivAtFilter.sum (h : βˆ€ i ∈ u, HasDerivAtFilter (A i) (A' i) x L) : HasDerivAtFilter (fun y => βˆ‘ i ∈ u, A i y) (βˆ‘ i ∈ u, A' i) x L := by simpa [ContinuousLinearMap.sum_apply] using (HasFDerivAtFilter.sum h).hasDerivAtFilter #align has_deriv_at_filter.sum HasDerivAtFilter.sum
Mathlib/Analysis/Calculus/Deriv/Add.lean
158
160
theorem HasStrictDerivAt.sum (h : βˆ€ i ∈ u, HasStrictDerivAt (A i) (A' i) x) : HasStrictDerivAt (fun y => βˆ‘ i ∈ u, A i y) (βˆ‘ i ∈ u, A' i) x := by
simpa [ContinuousLinearMap.sum_apply] using (HasStrictFDerivAt.sum h).hasStrictDerivAt
1,622
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.add from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter ENNReal open Filter Asymptotics Set variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L : Filter π•œ} section Neg nonrec theorem HasDerivAtFilter.neg (h : HasDerivAtFilter f f' x L) : HasDerivAtFilter (fun x => -f x) (-f') x L := by simpa using h.neg.hasDerivAtFilter #align has_deriv_at_filter.neg HasDerivAtFilter.neg nonrec theorem HasDerivWithinAt.neg (h : HasDerivWithinAt f f' s x) : HasDerivWithinAt (fun x => -f x) (-f') s x := h.neg #align has_deriv_within_at.neg HasDerivWithinAt.neg nonrec theorem HasDerivAt.neg (h : HasDerivAt f f' x) : HasDerivAt (fun x => -f x) (-f') x := h.neg #align has_deriv_at.neg HasDerivAt.neg nonrec theorem HasStrictDerivAt.neg (h : HasStrictDerivAt f f' x) : HasStrictDerivAt (fun x => -f x) (-f') x := by simpa using h.neg.hasStrictDerivAt #align has_strict_deriv_at.neg HasStrictDerivAt.neg
Mathlib/Analysis/Calculus/Deriv/Add.lean
208
210
theorem derivWithin.neg (hxs : UniqueDiffWithinAt π•œ s x) : derivWithin (fun y => -f y) s x = -derivWithin f s x := by
simp only [derivWithin, fderivWithin_neg hxs, ContinuousLinearMap.neg_apply]
1,622
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.add from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter ENNReal open Filter Asymptotics Set variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L : Filter π•œ} section Neg nonrec theorem HasDerivAtFilter.neg (h : HasDerivAtFilter f f' x L) : HasDerivAtFilter (fun x => -f x) (-f') x L := by simpa using h.neg.hasDerivAtFilter #align has_deriv_at_filter.neg HasDerivAtFilter.neg nonrec theorem HasDerivWithinAt.neg (h : HasDerivWithinAt f f' s x) : HasDerivWithinAt (fun x => -f x) (-f') s x := h.neg #align has_deriv_within_at.neg HasDerivWithinAt.neg nonrec theorem HasDerivAt.neg (h : HasDerivAt f f' x) : HasDerivAt (fun x => -f x) (-f') x := h.neg #align has_deriv_at.neg HasDerivAt.neg nonrec theorem HasStrictDerivAt.neg (h : HasStrictDerivAt f f' x) : HasStrictDerivAt (fun x => -f x) (-f') x := by simpa using h.neg.hasStrictDerivAt #align has_strict_deriv_at.neg HasStrictDerivAt.neg theorem derivWithin.neg (hxs : UniqueDiffWithinAt π•œ s x) : derivWithin (fun y => -f y) s x = -derivWithin f s x := by simp only [derivWithin, fderivWithin_neg hxs, ContinuousLinearMap.neg_apply] #align deriv_within.neg derivWithin.neg
Mathlib/Analysis/Calculus/Deriv/Add.lean
213
214
theorem deriv.neg : deriv (fun y => -f y) x = -deriv f x := by
simp only [deriv, fderiv_neg, ContinuousLinearMap.neg_apply]
1,622
import Mathlib.Analysis.Calculus.Deriv.Add import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.LocalExtr.Basic #align_import analysis.calculus.darboux from "leanprover-community/mathlib"@"61b5e2755ccb464b68d05a9acf891ae04992d09d" open Filter Set open scoped Topology Classical variable {a b : ℝ} {f f' : ℝ β†’ ℝ}
Mathlib/Analysis/Calculus/Darboux.lean
28
60
theorem exists_hasDerivWithinAt_eq_of_gt_of_lt (hab : a ≀ b) (hf : βˆ€ x ∈ Icc a b, HasDerivWithinAt f (f' x) (Icc a b) x) {m : ℝ} (hma : f' a < m) (hmb : m < f' b) : m ∈ f' '' Ioo a b := by
rcases hab.eq_or_lt with (rfl | hab') Β· exact (lt_asymm hma hmb).elim set g : ℝ β†’ ℝ := fun x => f x - m * x have hg : βˆ€ x ∈ Icc a b, HasDerivWithinAt g (f' x - m) (Icc a b) x := by intro x hx simpa using (hf x hx).sub ((hasDerivWithinAt_id x _).const_mul m) obtain ⟨c, cmem, hc⟩ : βˆƒ c ∈ Icc a b, IsMinOn g (Icc a b) c := isCompact_Icc.exists_isMinOn (nonempty_Icc.2 <| hab) fun x hx => (hg x hx).continuousWithinAt have cmem' : c ∈ Ioo a b := by rcases cmem.1.eq_or_lt with (rfl | hac) -- Show that `c` can't be equal to `a` Β· refine absurd (sub_nonneg.1 <| nonneg_of_mul_nonneg_right ?_ (sub_pos.2 hab')) (not_le_of_lt hma) have : b - a ∈ posTangentConeAt (Icc a b) a := mem_posTangentConeAt_of_segment_subset (segment_eq_Icc hab β–Έ Subset.refl _) simpa only [ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply] using hc.localize.hasFDerivWithinAt_nonneg (hg a (left_mem_Icc.2 hab)) this rcases cmem.2.eq_or_gt with (rfl | hcb) -- Show that `c` can't be equal to `b` Β· refine absurd (sub_nonpos.1 <| nonpos_of_mul_nonneg_right ?_ (sub_lt_zero.2 hab')) (not_le_of_lt hmb) have : a - b ∈ posTangentConeAt (Icc a b) b := mem_posTangentConeAt_of_segment_subset (by rw [segment_symm, segment_eq_Icc hab]) simpa only [ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply] using hc.localize.hasFDerivWithinAt_nonneg (hg b (right_mem_Icc.2 hab)) this exact ⟨hac, hcb⟩ use c, cmem' rw [← sub_eq_zero] have : Icc a b ∈ 𝓝 c := by rwa [← mem_interior_iff_mem_nhds, interior_Icc] exact (hc.isLocalMin this).hasDerivAt_eq_zero ((hg c cmem).hasDerivAt this)
1,623
import Mathlib.Analysis.Calculus.Deriv.Add import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.LocalExtr.Basic #align_import analysis.calculus.darboux from "leanprover-community/mathlib"@"61b5e2755ccb464b68d05a9acf891ae04992d09d" open Filter Set open scoped Topology Classical variable {a b : ℝ} {f f' : ℝ β†’ ℝ} theorem exists_hasDerivWithinAt_eq_of_gt_of_lt (hab : a ≀ b) (hf : βˆ€ x ∈ Icc a b, HasDerivWithinAt f (f' x) (Icc a b) x) {m : ℝ} (hma : f' a < m) (hmb : m < f' b) : m ∈ f' '' Ioo a b := by rcases hab.eq_or_lt with (rfl | hab') Β· exact (lt_asymm hma hmb).elim set g : ℝ β†’ ℝ := fun x => f x - m * x have hg : βˆ€ x ∈ Icc a b, HasDerivWithinAt g (f' x - m) (Icc a b) x := by intro x hx simpa using (hf x hx).sub ((hasDerivWithinAt_id x _).const_mul m) obtain ⟨c, cmem, hc⟩ : βˆƒ c ∈ Icc a b, IsMinOn g (Icc a b) c := isCompact_Icc.exists_isMinOn (nonempty_Icc.2 <| hab) fun x hx => (hg x hx).continuousWithinAt have cmem' : c ∈ Ioo a b := by rcases cmem.1.eq_or_lt with (rfl | hac) -- Show that `c` can't be equal to `a` Β· refine absurd (sub_nonneg.1 <| nonneg_of_mul_nonneg_right ?_ (sub_pos.2 hab')) (not_le_of_lt hma) have : b - a ∈ posTangentConeAt (Icc a b) a := mem_posTangentConeAt_of_segment_subset (segment_eq_Icc hab β–Έ Subset.refl _) simpa only [ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply] using hc.localize.hasFDerivWithinAt_nonneg (hg a (left_mem_Icc.2 hab)) this rcases cmem.2.eq_or_gt with (rfl | hcb) -- Show that `c` can't be equal to `b` Β· refine absurd (sub_nonpos.1 <| nonpos_of_mul_nonneg_right ?_ (sub_lt_zero.2 hab')) (not_le_of_lt hmb) have : a - b ∈ posTangentConeAt (Icc a b) b := mem_posTangentConeAt_of_segment_subset (by rw [segment_symm, segment_eq_Icc hab]) simpa only [ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply] using hc.localize.hasFDerivWithinAt_nonneg (hg b (right_mem_Icc.2 hab)) this exact ⟨hac, hcb⟩ use c, cmem' rw [← sub_eq_zero] have : Icc a b ∈ 𝓝 c := by rwa [← mem_interior_iff_mem_nhds, interior_Icc] exact (hc.isLocalMin this).hasDerivAt_eq_zero ((hg c cmem).hasDerivAt this) #align exists_has_deriv_within_at_eq_of_gt_of_lt exists_hasDerivWithinAt_eq_of_gt_of_lt theorem exists_hasDerivWithinAt_eq_of_lt_of_gt (hab : a ≀ b) (hf : βˆ€ x ∈ Icc a b, HasDerivWithinAt f (f' x) (Icc a b) x) {m : ℝ} (hma : m < f' a) (hmb : f' b < m) : m ∈ f' '' Ioo a b := let ⟨c, cmem, hc⟩ := exists_hasDerivWithinAt_eq_of_gt_of_lt hab (fun x hx => (hf x hx).neg) (neg_lt_neg hma) (neg_lt_neg hmb) ⟨c, cmem, neg_injective hc⟩ #align exists_has_deriv_within_at_eq_of_lt_of_gt exists_hasDerivWithinAt_eq_of_lt_of_gt
Mathlib/Analysis/Calculus/Darboux.lean
76
90
theorem Set.OrdConnected.image_hasDerivWithinAt {s : Set ℝ} (hs : OrdConnected s) (hf : βˆ€ x ∈ s, HasDerivWithinAt f (f' x) s x) : OrdConnected (f' '' s) := by
apply ordConnected_of_Ioo rintro _ ⟨a, ha, rfl⟩ _ ⟨b, hb, rfl⟩ - m ⟨hma, hmb⟩ rcases le_total a b with hab | hab Β· have : Icc a b βŠ† s := hs.out ha hb rcases exists_hasDerivWithinAt_eq_of_gt_of_lt hab (fun x hx => (hf x <| this hx).mono this) hma hmb with ⟨c, cmem, hc⟩ exact ⟨c, this <| Ioo_subset_Icc_self cmem, hc⟩ Β· have : Icc b a βŠ† s := hs.out hb ha rcases exists_hasDerivWithinAt_eq_of_lt_of_gt hab (fun x hx => (hf x <| this hx).mono this) hmb hma with ⟨c, cmem, hc⟩ exact ⟨c, this <| Ioo_subset_Icc_self cmem, hc⟩
1,623
import Mathlib.Analysis.Calculus.Deriv.Add import Mathlib.Analysis.Calculus.Deriv.Linear import Mathlib.LinearAlgebra.AffineSpace.AffineMap variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] (f : π•œ →ᡃ[π•œ] E) {a b : E} {L : Filter π•œ} {s : Set π•œ} {x : π•œ} namespace AffineMap
Mathlib/Analysis/Calculus/Deriv/AffineMap.lean
32
34
theorem hasStrictDerivAt : HasStrictDerivAt f (f.linear 1) x := by
rw [f.decomp] exact f.linear.hasStrictDerivAt.add_const (f 0)
1,624
import Mathlib.Analysis.Calculus.Deriv.Add import Mathlib.Analysis.Calculus.Deriv.Linear import Mathlib.LinearAlgebra.AffineSpace.AffineMap variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] (f : π•œ →ᡃ[π•œ] E) {a b : E} {L : Filter π•œ} {s : Set π•œ} {x : π•œ} namespace AffineMap theorem hasStrictDerivAt : HasStrictDerivAt f (f.linear 1) x := by rw [f.decomp] exact f.linear.hasStrictDerivAt.add_const (f 0)
Mathlib/Analysis/Calculus/Deriv/AffineMap.lean
36
38
theorem hasDerivAtFilter : HasDerivAtFilter f (f.linear 1) x L := by
rw [f.decomp] exact f.linear.hasDerivAtFilter.add_const (f 0)
1,624
import Mathlib.Analysis.Calculus.Deriv.Add import Mathlib.Analysis.Calculus.Deriv.Linear import Mathlib.LinearAlgebra.AffineSpace.AffineMap variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] (f : π•œ →ᡃ[π•œ] E) {a b : E} {L : Filter π•œ} {s : Set π•œ} {x : π•œ} namespace AffineMap theorem hasStrictDerivAt : HasStrictDerivAt f (f.linear 1) x := by rw [f.decomp] exact f.linear.hasStrictDerivAt.add_const (f 0) theorem hasDerivAtFilter : HasDerivAtFilter f (f.linear 1) x L := by rw [f.decomp] exact f.linear.hasDerivAtFilter.add_const (f 0) theorem hasDerivWithinAt : HasDerivWithinAt f (f.linear 1) s x := f.hasDerivAtFilter theorem hasDerivAt : HasDerivAt f (f.linear 1) x := f.hasDerivAtFilter protected theorem derivWithin (hs : UniqueDiffWithinAt π•œ s x) : derivWithin f s x = f.linear 1 := f.hasDerivWithinAt.derivWithin hs @[simp] protected theorem deriv : deriv f x = f.linear 1 := f.hasDerivAt.deriv protected theorem differentiableAt : DifferentiableAt π•œ f x := f.hasDerivAt.differentiableAt protected theorem differentiable : Differentiable π•œ f := fun _ ↦ f.differentiableAt protected theorem differentiableWithinAt : DifferentiableWithinAt π•œ f s x := f.differentiableAt.differentiableWithinAt protected theorem differentiableOn : DifferentiableOn π•œ f s := fun _ _ ↦ f.differentiableWithinAt
Mathlib/Analysis/Calculus/Deriv/AffineMap.lean
64
65
theorem hasStrictDerivAt_lineMap : HasStrictDerivAt (lineMap a b) (b - a) x := by
simpa using (lineMap a b : π•œ →ᡃ[π•œ] E).hasStrictDerivAt
1,624
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs #align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical Topology open Filter Asymptotics Set variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] def iteratedDeriv (n : β„•) (f : π•œ β†’ F) (x : π•œ) : F := (iteratedFDeriv π•œ n f x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv iteratedDeriv def iteratedDerivWithin (n : β„•) (f : π•œ β†’ F) (s : Set π•œ) (x : π•œ) : F := (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv_within iteratedDerivWithin variable {n : β„•} {f : π•œ β†’ F} {s : Set π•œ} {x : π•œ}
Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean
69
71
theorem iteratedDerivWithin_univ : iteratedDerivWithin n f univ = iteratedDeriv n f := by
ext x rw [iteratedDerivWithin, iteratedDeriv, iteratedFDerivWithin_univ]
1,625
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs #align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical Topology open Filter Asymptotics Set variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] def iteratedDeriv (n : β„•) (f : π•œ β†’ F) (x : π•œ) : F := (iteratedFDeriv π•œ n f x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv iteratedDeriv def iteratedDerivWithin (n : β„•) (f : π•œ β†’ F) (s : Set π•œ) (x : π•œ) : F := (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv_within iteratedDerivWithin variable {n : β„•} {f : π•œ β†’ F} {s : Set π•œ} {x : π•œ} theorem iteratedDerivWithin_univ : iteratedDerivWithin n f univ = iteratedDeriv n f := by ext x rw [iteratedDerivWithin, iteratedDeriv, iteratedFDerivWithin_univ] #align iterated_deriv_within_univ iteratedDerivWithin_univ theorem iteratedDerivWithin_eq_iteratedFDerivWithin : iteratedDerivWithin n f s x = (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 := rfl #align iterated_deriv_within_eq_iterated_fderiv_within iteratedDerivWithin_eq_iteratedFDerivWithin
Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean
84
86
theorem iteratedDerivWithin_eq_equiv_comp : iteratedDerivWithin n f s = (ContinuousMultilinearMap.piFieldEquiv π•œ (Fin n) F).symm ∘ iteratedFDerivWithin π•œ n f s := by
ext x; rfl
1,625
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs #align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical Topology open Filter Asymptotics Set variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] def iteratedDeriv (n : β„•) (f : π•œ β†’ F) (x : π•œ) : F := (iteratedFDeriv π•œ n f x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv iteratedDeriv def iteratedDerivWithin (n : β„•) (f : π•œ β†’ F) (s : Set π•œ) (x : π•œ) : F := (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv_within iteratedDerivWithin variable {n : β„•} {f : π•œ β†’ F} {s : Set π•œ} {x : π•œ} theorem iteratedDerivWithin_univ : iteratedDerivWithin n f univ = iteratedDeriv n f := by ext x rw [iteratedDerivWithin, iteratedDeriv, iteratedFDerivWithin_univ] #align iterated_deriv_within_univ iteratedDerivWithin_univ theorem iteratedDerivWithin_eq_iteratedFDerivWithin : iteratedDerivWithin n f s x = (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 := rfl #align iterated_deriv_within_eq_iterated_fderiv_within iteratedDerivWithin_eq_iteratedFDerivWithin theorem iteratedDerivWithin_eq_equiv_comp : iteratedDerivWithin n f s = (ContinuousMultilinearMap.piFieldEquiv π•œ (Fin n) F).symm ∘ iteratedFDerivWithin π•œ n f s := by ext x; rfl #align iterated_deriv_within_eq_equiv_comp iteratedDerivWithin_eq_equiv_comp
Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean
91
95
theorem iteratedFDerivWithin_eq_equiv_comp : iteratedFDerivWithin π•œ n f s = ContinuousMultilinearMap.piFieldEquiv π•œ (Fin n) F ∘ iteratedDerivWithin n f s := by
rw [iteratedDerivWithin_eq_equiv_comp, ← Function.comp.assoc, LinearIsometryEquiv.self_comp_symm, Function.id_comp]
1,625
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs #align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical Topology open Filter Asymptotics Set variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] def iteratedDeriv (n : β„•) (f : π•œ β†’ F) (x : π•œ) : F := (iteratedFDeriv π•œ n f x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv iteratedDeriv def iteratedDerivWithin (n : β„•) (f : π•œ β†’ F) (s : Set π•œ) (x : π•œ) : F := (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv_within iteratedDerivWithin variable {n : β„•} {f : π•œ β†’ F} {s : Set π•œ} {x : π•œ} theorem iteratedDerivWithin_univ : iteratedDerivWithin n f univ = iteratedDeriv n f := by ext x rw [iteratedDerivWithin, iteratedDeriv, iteratedFDerivWithin_univ] #align iterated_deriv_within_univ iteratedDerivWithin_univ theorem iteratedDerivWithin_eq_iteratedFDerivWithin : iteratedDerivWithin n f s x = (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 := rfl #align iterated_deriv_within_eq_iterated_fderiv_within iteratedDerivWithin_eq_iteratedFDerivWithin theorem iteratedDerivWithin_eq_equiv_comp : iteratedDerivWithin n f s = (ContinuousMultilinearMap.piFieldEquiv π•œ (Fin n) F).symm ∘ iteratedFDerivWithin π•œ n f s := by ext x; rfl #align iterated_deriv_within_eq_equiv_comp iteratedDerivWithin_eq_equiv_comp theorem iteratedFDerivWithin_eq_equiv_comp : iteratedFDerivWithin π•œ n f s = ContinuousMultilinearMap.piFieldEquiv π•œ (Fin n) F ∘ iteratedDerivWithin n f s := by rw [iteratedDerivWithin_eq_equiv_comp, ← Function.comp.assoc, LinearIsometryEquiv.self_comp_symm, Function.id_comp] #align iterated_fderiv_within_eq_equiv_comp iteratedFDerivWithin_eq_equiv_comp
Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean
100
104
theorem iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod {m : Fin n β†’ π•œ} : (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) m = (∏ i, m i) β€’ iteratedDerivWithin n f s x := by
rw [iteratedDerivWithin_eq_iteratedFDerivWithin, ← ContinuousMultilinearMap.map_smul_univ] simp
1,625
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs #align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical Topology open Filter Asymptotics Set variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] def iteratedDeriv (n : β„•) (f : π•œ β†’ F) (x : π•œ) : F := (iteratedFDeriv π•œ n f x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv iteratedDeriv def iteratedDerivWithin (n : β„•) (f : π•œ β†’ F) (s : Set π•œ) (x : π•œ) : F := (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv_within iteratedDerivWithin variable {n : β„•} {f : π•œ β†’ F} {s : Set π•œ} {x : π•œ} theorem iteratedDerivWithin_univ : iteratedDerivWithin n f univ = iteratedDeriv n f := by ext x rw [iteratedDerivWithin, iteratedDeriv, iteratedFDerivWithin_univ] #align iterated_deriv_within_univ iteratedDerivWithin_univ theorem iteratedDerivWithin_eq_iteratedFDerivWithin : iteratedDerivWithin n f s x = (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 := rfl #align iterated_deriv_within_eq_iterated_fderiv_within iteratedDerivWithin_eq_iteratedFDerivWithin theorem iteratedDerivWithin_eq_equiv_comp : iteratedDerivWithin n f s = (ContinuousMultilinearMap.piFieldEquiv π•œ (Fin n) F).symm ∘ iteratedFDerivWithin π•œ n f s := by ext x; rfl #align iterated_deriv_within_eq_equiv_comp iteratedDerivWithin_eq_equiv_comp theorem iteratedFDerivWithin_eq_equiv_comp : iteratedFDerivWithin π•œ n f s = ContinuousMultilinearMap.piFieldEquiv π•œ (Fin n) F ∘ iteratedDerivWithin n f s := by rw [iteratedDerivWithin_eq_equiv_comp, ← Function.comp.assoc, LinearIsometryEquiv.self_comp_symm, Function.id_comp] #align iterated_fderiv_within_eq_equiv_comp iteratedFDerivWithin_eq_equiv_comp theorem iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod {m : Fin n β†’ π•œ} : (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) m = (∏ i, m i) β€’ iteratedDerivWithin n f s x := by rw [iteratedDerivWithin_eq_iteratedFDerivWithin, ← ContinuousMultilinearMap.map_smul_univ] simp #align iterated_fderiv_within_apply_eq_iterated_deriv_within_mul_prod iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod
Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean
107
109
theorem norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin : β€–iteratedFDerivWithin π•œ n f s xβ€– = β€–iteratedDerivWithin n f s xβ€– := by
rw [iteratedDerivWithin_eq_equiv_comp, Function.comp_apply, LinearIsometryEquiv.norm_map]
1,625
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs #align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical Topology open Filter Asymptotics Set variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] def iteratedDeriv (n : β„•) (f : π•œ β†’ F) (x : π•œ) : F := (iteratedFDeriv π•œ n f x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv iteratedDeriv def iteratedDerivWithin (n : β„•) (f : π•œ β†’ F) (s : Set π•œ) (x : π•œ) : F := (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv_within iteratedDerivWithin variable {n : β„•} {f : π•œ β†’ F} {s : Set π•œ} {x : π•œ} theorem iteratedDerivWithin_univ : iteratedDerivWithin n f univ = iteratedDeriv n f := by ext x rw [iteratedDerivWithin, iteratedDeriv, iteratedFDerivWithin_univ] #align iterated_deriv_within_univ iteratedDerivWithin_univ theorem iteratedDerivWithin_eq_iteratedFDerivWithin : iteratedDerivWithin n f s x = (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 := rfl #align iterated_deriv_within_eq_iterated_fderiv_within iteratedDerivWithin_eq_iteratedFDerivWithin theorem iteratedDerivWithin_eq_equiv_comp : iteratedDerivWithin n f s = (ContinuousMultilinearMap.piFieldEquiv π•œ (Fin n) F).symm ∘ iteratedFDerivWithin π•œ n f s := by ext x; rfl #align iterated_deriv_within_eq_equiv_comp iteratedDerivWithin_eq_equiv_comp theorem iteratedFDerivWithin_eq_equiv_comp : iteratedFDerivWithin π•œ n f s = ContinuousMultilinearMap.piFieldEquiv π•œ (Fin n) F ∘ iteratedDerivWithin n f s := by rw [iteratedDerivWithin_eq_equiv_comp, ← Function.comp.assoc, LinearIsometryEquiv.self_comp_symm, Function.id_comp] #align iterated_fderiv_within_eq_equiv_comp iteratedFDerivWithin_eq_equiv_comp theorem iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod {m : Fin n β†’ π•œ} : (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) m = (∏ i, m i) β€’ iteratedDerivWithin n f s x := by rw [iteratedDerivWithin_eq_iteratedFDerivWithin, ← ContinuousMultilinearMap.map_smul_univ] simp #align iterated_fderiv_within_apply_eq_iterated_deriv_within_mul_prod iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod theorem norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin : β€–iteratedFDerivWithin π•œ n f s xβ€– = β€–iteratedDerivWithin n f s xβ€– := by rw [iteratedDerivWithin_eq_equiv_comp, Function.comp_apply, LinearIsometryEquiv.norm_map] #align norm_iterated_fderiv_within_eq_norm_iterated_deriv_within norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin @[simp]
Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean
113
115
theorem iteratedDerivWithin_zero : iteratedDerivWithin 0 f s = f := by
ext x simp [iteratedDerivWithin]
1,625
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs #align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical Topology open Filter Asymptotics Set variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] def iteratedDeriv (n : β„•) (f : π•œ β†’ F) (x : π•œ) : F := (iteratedFDeriv π•œ n f x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv iteratedDeriv def iteratedDerivWithin (n : β„•) (f : π•œ β†’ F) (s : Set π•œ) (x : π•œ) : F := (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv_within iteratedDerivWithin variable {n : β„•} {f : π•œ β†’ F} {s : Set π•œ} {x : π•œ} theorem iteratedDerivWithin_univ : iteratedDerivWithin n f univ = iteratedDeriv n f := by ext x rw [iteratedDerivWithin, iteratedDeriv, iteratedFDerivWithin_univ] #align iterated_deriv_within_univ iteratedDerivWithin_univ theorem iteratedDerivWithin_eq_iteratedFDerivWithin : iteratedDerivWithin n f s x = (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 := rfl #align iterated_deriv_within_eq_iterated_fderiv_within iteratedDerivWithin_eq_iteratedFDerivWithin theorem iteratedDerivWithin_eq_equiv_comp : iteratedDerivWithin n f s = (ContinuousMultilinearMap.piFieldEquiv π•œ (Fin n) F).symm ∘ iteratedFDerivWithin π•œ n f s := by ext x; rfl #align iterated_deriv_within_eq_equiv_comp iteratedDerivWithin_eq_equiv_comp theorem iteratedFDerivWithin_eq_equiv_comp : iteratedFDerivWithin π•œ n f s = ContinuousMultilinearMap.piFieldEquiv π•œ (Fin n) F ∘ iteratedDerivWithin n f s := by rw [iteratedDerivWithin_eq_equiv_comp, ← Function.comp.assoc, LinearIsometryEquiv.self_comp_symm, Function.id_comp] #align iterated_fderiv_within_eq_equiv_comp iteratedFDerivWithin_eq_equiv_comp theorem iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod {m : Fin n β†’ π•œ} : (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) m = (∏ i, m i) β€’ iteratedDerivWithin n f s x := by rw [iteratedDerivWithin_eq_iteratedFDerivWithin, ← ContinuousMultilinearMap.map_smul_univ] simp #align iterated_fderiv_within_apply_eq_iterated_deriv_within_mul_prod iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod theorem norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin : β€–iteratedFDerivWithin π•œ n f s xβ€– = β€–iteratedDerivWithin n f s xβ€– := by rw [iteratedDerivWithin_eq_equiv_comp, Function.comp_apply, LinearIsometryEquiv.norm_map] #align norm_iterated_fderiv_within_eq_norm_iterated_deriv_within norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin @[simp] theorem iteratedDerivWithin_zero : iteratedDerivWithin 0 f s = f := by ext x simp [iteratedDerivWithin] #align iterated_deriv_within_zero iteratedDerivWithin_zero @[simp]
Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean
119
121
theorem iteratedDerivWithin_one {x : π•œ} (h : UniqueDiffWithinAt π•œ s x) : iteratedDerivWithin 1 f s x = derivWithin f s x := by
simp only [iteratedDerivWithin, iteratedFDerivWithin_one_apply h]; rfl
1,625
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs #align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical Topology open Filter Asymptotics Set variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] def iteratedDeriv (n : β„•) (f : π•œ β†’ F) (x : π•œ) : F := (iteratedFDeriv π•œ n f x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv iteratedDeriv def iteratedDerivWithin (n : β„•) (f : π•œ β†’ F) (s : Set π•œ) (x : π•œ) : F := (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv_within iteratedDerivWithin variable {n : β„•} {f : π•œ β†’ F} {s : Set π•œ} {x : π•œ} theorem iteratedDerivWithin_univ : iteratedDerivWithin n f univ = iteratedDeriv n f := by ext x rw [iteratedDerivWithin, iteratedDeriv, iteratedFDerivWithin_univ] #align iterated_deriv_within_univ iteratedDerivWithin_univ theorem iteratedDerivWithin_eq_iteratedFDerivWithin : iteratedDerivWithin n f s x = (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 := rfl #align iterated_deriv_within_eq_iterated_fderiv_within iteratedDerivWithin_eq_iteratedFDerivWithin theorem iteratedDerivWithin_eq_equiv_comp : iteratedDerivWithin n f s = (ContinuousMultilinearMap.piFieldEquiv π•œ (Fin n) F).symm ∘ iteratedFDerivWithin π•œ n f s := by ext x; rfl #align iterated_deriv_within_eq_equiv_comp iteratedDerivWithin_eq_equiv_comp theorem iteratedFDerivWithin_eq_equiv_comp : iteratedFDerivWithin π•œ n f s = ContinuousMultilinearMap.piFieldEquiv π•œ (Fin n) F ∘ iteratedDerivWithin n f s := by rw [iteratedDerivWithin_eq_equiv_comp, ← Function.comp.assoc, LinearIsometryEquiv.self_comp_symm, Function.id_comp] #align iterated_fderiv_within_eq_equiv_comp iteratedFDerivWithin_eq_equiv_comp theorem iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod {m : Fin n β†’ π•œ} : (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) m = (∏ i, m i) β€’ iteratedDerivWithin n f s x := by rw [iteratedDerivWithin_eq_iteratedFDerivWithin, ← ContinuousMultilinearMap.map_smul_univ] simp #align iterated_fderiv_within_apply_eq_iterated_deriv_within_mul_prod iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod theorem norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin : β€–iteratedFDerivWithin π•œ n f s xβ€– = β€–iteratedDerivWithin n f s xβ€– := by rw [iteratedDerivWithin_eq_equiv_comp, Function.comp_apply, LinearIsometryEquiv.norm_map] #align norm_iterated_fderiv_within_eq_norm_iterated_deriv_within norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin @[simp] theorem iteratedDerivWithin_zero : iteratedDerivWithin 0 f s = f := by ext x simp [iteratedDerivWithin] #align iterated_deriv_within_zero iteratedDerivWithin_zero @[simp] theorem iteratedDerivWithin_one {x : π•œ} (h : UniqueDiffWithinAt π•œ s x) : iteratedDerivWithin 1 f s x = derivWithin f s x := by simp only [iteratedDerivWithin, iteratedFDerivWithin_one_apply h]; rfl #align iterated_deriv_within_one iteratedDerivWithin_one
Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean
128
134
theorem contDiffOn_of_continuousOn_differentiableOn_deriv {n : β„•βˆž} (Hcont : βˆ€ m : β„•, (m : β„•βˆž) ≀ n β†’ ContinuousOn (fun x => iteratedDerivWithin m f s x) s) (Hdiff : βˆ€ m : β„•, (m : β„•βˆž) < n β†’ DifferentiableOn π•œ (fun x => iteratedDerivWithin m f s x) s) : ContDiffOn π•œ n f s := by
apply contDiffOn_of_continuousOn_differentiableOn Β· simpa only [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_continuousOn_iff] Β· simpa only [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_differentiableOn_iff]
1,625
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs #align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical Topology open Filter Asymptotics Set variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] def iteratedDeriv (n : β„•) (f : π•œ β†’ F) (x : π•œ) : F := (iteratedFDeriv π•œ n f x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv iteratedDeriv def iteratedDerivWithin (n : β„•) (f : π•œ β†’ F) (s : Set π•œ) (x : π•œ) : F := (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv_within iteratedDerivWithin variable {n : β„•} {f : π•œ β†’ F} {s : Set π•œ} {x : π•œ} theorem iteratedDerivWithin_univ : iteratedDerivWithin n f univ = iteratedDeriv n f := by ext x rw [iteratedDerivWithin, iteratedDeriv, iteratedFDerivWithin_univ] #align iterated_deriv_within_univ iteratedDerivWithin_univ theorem iteratedDerivWithin_eq_iteratedFDerivWithin : iteratedDerivWithin n f s x = (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 := rfl #align iterated_deriv_within_eq_iterated_fderiv_within iteratedDerivWithin_eq_iteratedFDerivWithin theorem iteratedDerivWithin_eq_equiv_comp : iteratedDerivWithin n f s = (ContinuousMultilinearMap.piFieldEquiv π•œ (Fin n) F).symm ∘ iteratedFDerivWithin π•œ n f s := by ext x; rfl #align iterated_deriv_within_eq_equiv_comp iteratedDerivWithin_eq_equiv_comp theorem iteratedFDerivWithin_eq_equiv_comp : iteratedFDerivWithin π•œ n f s = ContinuousMultilinearMap.piFieldEquiv π•œ (Fin n) F ∘ iteratedDerivWithin n f s := by rw [iteratedDerivWithin_eq_equiv_comp, ← Function.comp.assoc, LinearIsometryEquiv.self_comp_symm, Function.id_comp] #align iterated_fderiv_within_eq_equiv_comp iteratedFDerivWithin_eq_equiv_comp theorem iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod {m : Fin n β†’ π•œ} : (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) m = (∏ i, m i) β€’ iteratedDerivWithin n f s x := by rw [iteratedDerivWithin_eq_iteratedFDerivWithin, ← ContinuousMultilinearMap.map_smul_univ] simp #align iterated_fderiv_within_apply_eq_iterated_deriv_within_mul_prod iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod theorem norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin : β€–iteratedFDerivWithin π•œ n f s xβ€– = β€–iteratedDerivWithin n f s xβ€– := by rw [iteratedDerivWithin_eq_equiv_comp, Function.comp_apply, LinearIsometryEquiv.norm_map] #align norm_iterated_fderiv_within_eq_norm_iterated_deriv_within norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin @[simp] theorem iteratedDerivWithin_zero : iteratedDerivWithin 0 f s = f := by ext x simp [iteratedDerivWithin] #align iterated_deriv_within_zero iteratedDerivWithin_zero @[simp] theorem iteratedDerivWithin_one {x : π•œ} (h : UniqueDiffWithinAt π•œ s x) : iteratedDerivWithin 1 f s x = derivWithin f s x := by simp only [iteratedDerivWithin, iteratedFDerivWithin_one_apply h]; rfl #align iterated_deriv_within_one iteratedDerivWithin_one theorem contDiffOn_of_continuousOn_differentiableOn_deriv {n : β„•βˆž} (Hcont : βˆ€ m : β„•, (m : β„•βˆž) ≀ n β†’ ContinuousOn (fun x => iteratedDerivWithin m f s x) s) (Hdiff : βˆ€ m : β„•, (m : β„•βˆž) < n β†’ DifferentiableOn π•œ (fun x => iteratedDerivWithin m f s x) s) : ContDiffOn π•œ n f s := by apply contDiffOn_of_continuousOn_differentiableOn Β· simpa only [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_continuousOn_iff] Β· simpa only [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_differentiableOn_iff] #align cont_diff_on_of_continuous_on_differentiable_on_deriv contDiffOn_of_continuousOn_differentiableOn_deriv
Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean
142
146
theorem contDiffOn_of_differentiableOn_deriv {n : β„•βˆž} (h : βˆ€ m : β„•, (m : β„•βˆž) ≀ n β†’ DifferentiableOn π•œ (iteratedDerivWithin m f s) s) : ContDiffOn π•œ n f s := by
apply contDiffOn_of_differentiableOn simpa only [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_differentiableOn_iff]
1,625
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs #align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical Topology open Filter Asymptotics Set variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] def iteratedDeriv (n : β„•) (f : π•œ β†’ F) (x : π•œ) : F := (iteratedFDeriv π•œ n f x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv iteratedDeriv def iteratedDerivWithin (n : β„•) (f : π•œ β†’ F) (s : Set π•œ) (x : π•œ) : F := (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv_within iteratedDerivWithin variable {n : β„•} {f : π•œ β†’ F} {s : Set π•œ} {x : π•œ} theorem iteratedDerivWithin_univ : iteratedDerivWithin n f univ = iteratedDeriv n f := by ext x rw [iteratedDerivWithin, iteratedDeriv, iteratedFDerivWithin_univ] #align iterated_deriv_within_univ iteratedDerivWithin_univ theorem iteratedDerivWithin_eq_iteratedFDerivWithin : iteratedDerivWithin n f s x = (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 := rfl #align iterated_deriv_within_eq_iterated_fderiv_within iteratedDerivWithin_eq_iteratedFDerivWithin theorem iteratedDerivWithin_eq_equiv_comp : iteratedDerivWithin n f s = (ContinuousMultilinearMap.piFieldEquiv π•œ (Fin n) F).symm ∘ iteratedFDerivWithin π•œ n f s := by ext x; rfl #align iterated_deriv_within_eq_equiv_comp iteratedDerivWithin_eq_equiv_comp theorem iteratedFDerivWithin_eq_equiv_comp : iteratedFDerivWithin π•œ n f s = ContinuousMultilinearMap.piFieldEquiv π•œ (Fin n) F ∘ iteratedDerivWithin n f s := by rw [iteratedDerivWithin_eq_equiv_comp, ← Function.comp.assoc, LinearIsometryEquiv.self_comp_symm, Function.id_comp] #align iterated_fderiv_within_eq_equiv_comp iteratedFDerivWithin_eq_equiv_comp theorem iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod {m : Fin n β†’ π•œ} : (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) m = (∏ i, m i) β€’ iteratedDerivWithin n f s x := by rw [iteratedDerivWithin_eq_iteratedFDerivWithin, ← ContinuousMultilinearMap.map_smul_univ] simp #align iterated_fderiv_within_apply_eq_iterated_deriv_within_mul_prod iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod theorem norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin : β€–iteratedFDerivWithin π•œ n f s xβ€– = β€–iteratedDerivWithin n f s xβ€– := by rw [iteratedDerivWithin_eq_equiv_comp, Function.comp_apply, LinearIsometryEquiv.norm_map] #align norm_iterated_fderiv_within_eq_norm_iterated_deriv_within norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin @[simp] theorem iteratedDerivWithin_zero : iteratedDerivWithin 0 f s = f := by ext x simp [iteratedDerivWithin] #align iterated_deriv_within_zero iteratedDerivWithin_zero @[simp] theorem iteratedDerivWithin_one {x : π•œ} (h : UniqueDiffWithinAt π•œ s x) : iteratedDerivWithin 1 f s x = derivWithin f s x := by simp only [iteratedDerivWithin, iteratedFDerivWithin_one_apply h]; rfl #align iterated_deriv_within_one iteratedDerivWithin_one theorem contDiffOn_of_continuousOn_differentiableOn_deriv {n : β„•βˆž} (Hcont : βˆ€ m : β„•, (m : β„•βˆž) ≀ n β†’ ContinuousOn (fun x => iteratedDerivWithin m f s x) s) (Hdiff : βˆ€ m : β„•, (m : β„•βˆž) < n β†’ DifferentiableOn π•œ (fun x => iteratedDerivWithin m f s x) s) : ContDiffOn π•œ n f s := by apply contDiffOn_of_continuousOn_differentiableOn Β· simpa only [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_continuousOn_iff] Β· simpa only [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_differentiableOn_iff] #align cont_diff_on_of_continuous_on_differentiable_on_deriv contDiffOn_of_continuousOn_differentiableOn_deriv theorem contDiffOn_of_differentiableOn_deriv {n : β„•βˆž} (h : βˆ€ m : β„•, (m : β„•βˆž) ≀ n β†’ DifferentiableOn π•œ (iteratedDerivWithin m f s) s) : ContDiffOn π•œ n f s := by apply contDiffOn_of_differentiableOn simpa only [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_differentiableOn_iff] #align cont_diff_on_of_differentiable_on_deriv contDiffOn_of_differentiableOn_deriv
Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean
151
154
theorem ContDiffOn.continuousOn_iteratedDerivWithin {n : β„•βˆž} {m : β„•} (h : ContDiffOn π•œ n f s) (hmn : (m : β„•βˆž) ≀ n) (hs : UniqueDiffOn π•œ s) : ContinuousOn (iteratedDerivWithin m f s) s := by
simpa only [iteratedDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_continuousOn_iff] using h.continuousOn_iteratedFDerivWithin hmn hs
1,625
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs #align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical Topology open Filter Asymptotics Set variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] def iteratedDeriv (n : β„•) (f : π•œ β†’ F) (x : π•œ) : F := (iteratedFDeriv π•œ n f x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv iteratedDeriv def iteratedDerivWithin (n : β„•) (f : π•œ β†’ F) (s : Set π•œ) (x : π•œ) : F := (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 #align iterated_deriv_within iteratedDerivWithin variable {n : β„•} {f : π•œ β†’ F} {s : Set π•œ} {x : π•œ} theorem iteratedDerivWithin_univ : iteratedDerivWithin n f univ = iteratedDeriv n f := by ext x rw [iteratedDerivWithin, iteratedDeriv, iteratedFDerivWithin_univ] #align iterated_deriv_within_univ iteratedDerivWithin_univ theorem iteratedDerivWithin_eq_iteratedFDerivWithin : iteratedDerivWithin n f s x = (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) fun _ : Fin n => 1 := rfl #align iterated_deriv_within_eq_iterated_fderiv_within iteratedDerivWithin_eq_iteratedFDerivWithin theorem iteratedDerivWithin_eq_equiv_comp : iteratedDerivWithin n f s = (ContinuousMultilinearMap.piFieldEquiv π•œ (Fin n) F).symm ∘ iteratedFDerivWithin π•œ n f s := by ext x; rfl #align iterated_deriv_within_eq_equiv_comp iteratedDerivWithin_eq_equiv_comp theorem iteratedFDerivWithin_eq_equiv_comp : iteratedFDerivWithin π•œ n f s = ContinuousMultilinearMap.piFieldEquiv π•œ (Fin n) F ∘ iteratedDerivWithin n f s := by rw [iteratedDerivWithin_eq_equiv_comp, ← Function.comp.assoc, LinearIsometryEquiv.self_comp_symm, Function.id_comp] #align iterated_fderiv_within_eq_equiv_comp iteratedFDerivWithin_eq_equiv_comp theorem iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod {m : Fin n β†’ π•œ} : (iteratedFDerivWithin π•œ n f s x : (Fin n β†’ π•œ) β†’ F) m = (∏ i, m i) β€’ iteratedDerivWithin n f s x := by rw [iteratedDerivWithin_eq_iteratedFDerivWithin, ← ContinuousMultilinearMap.map_smul_univ] simp #align iterated_fderiv_within_apply_eq_iterated_deriv_within_mul_prod iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod theorem norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin : β€–iteratedFDerivWithin π•œ n f s xβ€– = β€–iteratedDerivWithin n f s xβ€– := by rw [iteratedDerivWithin_eq_equiv_comp, Function.comp_apply, LinearIsometryEquiv.norm_map] #align norm_iterated_fderiv_within_eq_norm_iterated_deriv_within norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin @[simp] theorem iteratedDerivWithin_zero : iteratedDerivWithin 0 f s = f := by ext x simp [iteratedDerivWithin] #align iterated_deriv_within_zero iteratedDerivWithin_zero @[simp] theorem iteratedDerivWithin_one {x : π•œ} (h : UniqueDiffWithinAt π•œ s x) : iteratedDerivWithin 1 f s x = derivWithin f s x := by simp only [iteratedDerivWithin, iteratedFDerivWithin_one_apply h]; rfl #align iterated_deriv_within_one iteratedDerivWithin_one theorem contDiffOn_of_continuousOn_differentiableOn_deriv {n : β„•βˆž} (Hcont : βˆ€ m : β„•, (m : β„•βˆž) ≀ n β†’ ContinuousOn (fun x => iteratedDerivWithin m f s x) s) (Hdiff : βˆ€ m : β„•, (m : β„•βˆž) < n β†’ DifferentiableOn π•œ (fun x => iteratedDerivWithin m f s x) s) : ContDiffOn π•œ n f s := by apply contDiffOn_of_continuousOn_differentiableOn Β· simpa only [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_continuousOn_iff] Β· simpa only [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_differentiableOn_iff] #align cont_diff_on_of_continuous_on_differentiable_on_deriv contDiffOn_of_continuousOn_differentiableOn_deriv theorem contDiffOn_of_differentiableOn_deriv {n : β„•βˆž} (h : βˆ€ m : β„•, (m : β„•βˆž) ≀ n β†’ DifferentiableOn π•œ (iteratedDerivWithin m f s) s) : ContDiffOn π•œ n f s := by apply contDiffOn_of_differentiableOn simpa only [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_differentiableOn_iff] #align cont_diff_on_of_differentiable_on_deriv contDiffOn_of_differentiableOn_deriv theorem ContDiffOn.continuousOn_iteratedDerivWithin {n : β„•βˆž} {m : β„•} (h : ContDiffOn π•œ n f s) (hmn : (m : β„•βˆž) ≀ n) (hs : UniqueDiffOn π•œ s) : ContinuousOn (iteratedDerivWithin m f s) s := by simpa only [iteratedDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_continuousOn_iff] using h.continuousOn_iteratedFDerivWithin hmn hs #align cont_diff_on.continuous_on_iterated_deriv_within ContDiffOn.continuousOn_iteratedDerivWithin
Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean
157
162
theorem ContDiffWithinAt.differentiableWithinAt_iteratedDerivWithin {n : β„•βˆž} {m : β„•} (h : ContDiffWithinAt π•œ n f s x) (hmn : (m : β„•βˆž) < n) (hs : UniqueDiffOn π•œ (insert x s)) : DifferentiableWithinAt π•œ (iteratedDerivWithin m f s) s x := by
simpa only [iteratedDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_differentiableWithinAt_iff] using h.differentiableWithinAt_iteratedFDerivWithin hmn hs
1,625
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Shift import Mathlib.Analysis.Calculus.IteratedDeriv.Defs variable {π•œ : Type*} [NontriviallyNormedField π•œ] {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] {R : Type*} [Semiring R] [Module R F] [SMulCommClass π•œ R F] [ContinuousConstSMul R F] {n : β„•} {x : π•œ} {s : Set π•œ} (hx : x ∈ s) (h : UniqueDiffOn π•œ s) {f g : π•œ β†’ F}
Mathlib/Analysis/Calculus/IteratedDeriv/Lemmas.lean
24
28
theorem iteratedDerivWithin_add (hf : ContDiffOn π•œ n f s) (hg : ContDiffOn π•œ n g s) : iteratedDerivWithin n (f + g) s x = iteratedDerivWithin n f s x + iteratedDerivWithin n g s x := by
simp_rw [iteratedDerivWithin, iteratedFDerivWithin_add_apply hf hg h hx, ContinuousMultilinearMap.add_apply]
1,626
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Shift import Mathlib.Analysis.Calculus.IteratedDeriv.Defs variable {π•œ : Type*} [NontriviallyNormedField π•œ] {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] {R : Type*} [Semiring R] [Module R F] [SMulCommClass π•œ R F] [ContinuousConstSMul R F] {n : β„•} {x : π•œ} {s : Set π•œ} (hx : x ∈ s) (h : UniqueDiffOn π•œ s) {f g : π•œ β†’ F} theorem iteratedDerivWithin_add (hf : ContDiffOn π•œ n f s) (hg : ContDiffOn π•œ n g s) : iteratedDerivWithin n (f + g) s x = iteratedDerivWithin n f s x + iteratedDerivWithin n g s x := by simp_rw [iteratedDerivWithin, iteratedFDerivWithin_add_apply hf hg h hx, ContinuousMultilinearMap.add_apply]
Mathlib/Analysis/Calculus/IteratedDeriv/Lemmas.lean
30
38
theorem iteratedDerivWithin_congr (hfg : Set.EqOn f g s) : Set.EqOn (iteratedDerivWithin n f s) (iteratedDerivWithin n g s) s := by
induction n generalizing f g with | zero => rwa [iteratedDerivWithin_zero] | succ n IH => intro y hy have : UniqueDiffWithinAt π•œ s y := h.uniqueDiffWithinAt hy rw [iteratedDerivWithin_succ this, iteratedDerivWithin_succ this] exact derivWithin_congr (IH hfg) (IH hfg hy)
1,626
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Shift import Mathlib.Analysis.Calculus.IteratedDeriv.Defs variable {π•œ : Type*} [NontriviallyNormedField π•œ] {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] {R : Type*} [Semiring R] [Module R F] [SMulCommClass π•œ R F] [ContinuousConstSMul R F] {n : β„•} {x : π•œ} {s : Set π•œ} (hx : x ∈ s) (h : UniqueDiffOn π•œ s) {f g : π•œ β†’ F} theorem iteratedDerivWithin_add (hf : ContDiffOn π•œ n f s) (hg : ContDiffOn π•œ n g s) : iteratedDerivWithin n (f + g) s x = iteratedDerivWithin n f s x + iteratedDerivWithin n g s x := by simp_rw [iteratedDerivWithin, iteratedFDerivWithin_add_apply hf hg h hx, ContinuousMultilinearMap.add_apply] theorem iteratedDerivWithin_congr (hfg : Set.EqOn f g s) : Set.EqOn (iteratedDerivWithin n f s) (iteratedDerivWithin n g s) s := by induction n generalizing f g with | zero => rwa [iteratedDerivWithin_zero] | succ n IH => intro y hy have : UniqueDiffWithinAt π•œ s y := h.uniqueDiffWithinAt hy rw [iteratedDerivWithin_succ this, iteratedDerivWithin_succ this] exact derivWithin_congr (IH hfg) (IH hfg hy)
Mathlib/Analysis/Calculus/IteratedDeriv/Lemmas.lean
40
46
theorem iteratedDerivWithin_const_add (hn : 0 < n) (c : F) : iteratedDerivWithin n (fun z => c + f z) s x = iteratedDerivWithin n f s x := by
obtain ⟨n, rfl⟩ := n.exists_eq_succ_of_ne_zero hn.ne' rw [iteratedDerivWithin_succ' h hx, iteratedDerivWithin_succ' h hx] refine iteratedDerivWithin_congr h ?_ hx intro y hy exact derivWithin_const_add (h.uniqueDiffWithinAt hy) _
1,626
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Shift import Mathlib.Analysis.Calculus.IteratedDeriv.Defs variable {π•œ : Type*} [NontriviallyNormedField π•œ] {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] {R : Type*} [Semiring R] [Module R F] [SMulCommClass π•œ R F] [ContinuousConstSMul R F] {n : β„•} {x : π•œ} {s : Set π•œ} (hx : x ∈ s) (h : UniqueDiffOn π•œ s) {f g : π•œ β†’ F} theorem iteratedDerivWithin_add (hf : ContDiffOn π•œ n f s) (hg : ContDiffOn π•œ n g s) : iteratedDerivWithin n (f + g) s x = iteratedDerivWithin n f s x + iteratedDerivWithin n g s x := by simp_rw [iteratedDerivWithin, iteratedFDerivWithin_add_apply hf hg h hx, ContinuousMultilinearMap.add_apply] theorem iteratedDerivWithin_congr (hfg : Set.EqOn f g s) : Set.EqOn (iteratedDerivWithin n f s) (iteratedDerivWithin n g s) s := by induction n generalizing f g with | zero => rwa [iteratedDerivWithin_zero] | succ n IH => intro y hy have : UniqueDiffWithinAt π•œ s y := h.uniqueDiffWithinAt hy rw [iteratedDerivWithin_succ this, iteratedDerivWithin_succ this] exact derivWithin_congr (IH hfg) (IH hfg hy) theorem iteratedDerivWithin_const_add (hn : 0 < n) (c : F) : iteratedDerivWithin n (fun z => c + f z) s x = iteratedDerivWithin n f s x := by obtain ⟨n, rfl⟩ := n.exists_eq_succ_of_ne_zero hn.ne' rw [iteratedDerivWithin_succ' h hx, iteratedDerivWithin_succ' h hx] refine iteratedDerivWithin_congr h ?_ hx intro y hy exact derivWithin_const_add (h.uniqueDiffWithinAt hy) _
Mathlib/Analysis/Calculus/IteratedDeriv/Lemmas.lean
48
56
theorem iteratedDerivWithin_const_neg (hn : 0 < n) (c : F) : iteratedDerivWithin n (fun z => c - f z) s x = iteratedDerivWithin n (fun z => -f z) s x := by
obtain ⟨n, rfl⟩ := n.exists_eq_succ_of_ne_zero hn.ne' rw [iteratedDerivWithin_succ' h hx, iteratedDerivWithin_succ' h hx] refine iteratedDerivWithin_congr h ?_ hx intro y hy have : UniqueDiffWithinAt π•œ s y := h.uniqueDiffWithinAt hy rw [derivWithin.neg this] exact derivWithin_const_sub this _
1,626
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Shift import Mathlib.Analysis.Calculus.IteratedDeriv.Defs variable {π•œ : Type*} [NontriviallyNormedField π•œ] {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] {R : Type*} [Semiring R] [Module R F] [SMulCommClass π•œ R F] [ContinuousConstSMul R F] {n : β„•} {x : π•œ} {s : Set π•œ} (hx : x ∈ s) (h : UniqueDiffOn π•œ s) {f g : π•œ β†’ F} theorem iteratedDerivWithin_add (hf : ContDiffOn π•œ n f s) (hg : ContDiffOn π•œ n g s) : iteratedDerivWithin n (f + g) s x = iteratedDerivWithin n f s x + iteratedDerivWithin n g s x := by simp_rw [iteratedDerivWithin, iteratedFDerivWithin_add_apply hf hg h hx, ContinuousMultilinearMap.add_apply] theorem iteratedDerivWithin_congr (hfg : Set.EqOn f g s) : Set.EqOn (iteratedDerivWithin n f s) (iteratedDerivWithin n g s) s := by induction n generalizing f g with | zero => rwa [iteratedDerivWithin_zero] | succ n IH => intro y hy have : UniqueDiffWithinAt π•œ s y := h.uniqueDiffWithinAt hy rw [iteratedDerivWithin_succ this, iteratedDerivWithin_succ this] exact derivWithin_congr (IH hfg) (IH hfg hy) theorem iteratedDerivWithin_const_add (hn : 0 < n) (c : F) : iteratedDerivWithin n (fun z => c + f z) s x = iteratedDerivWithin n f s x := by obtain ⟨n, rfl⟩ := n.exists_eq_succ_of_ne_zero hn.ne' rw [iteratedDerivWithin_succ' h hx, iteratedDerivWithin_succ' h hx] refine iteratedDerivWithin_congr h ?_ hx intro y hy exact derivWithin_const_add (h.uniqueDiffWithinAt hy) _ theorem iteratedDerivWithin_const_neg (hn : 0 < n) (c : F) : iteratedDerivWithin n (fun z => c - f z) s x = iteratedDerivWithin n (fun z => -f z) s x := by obtain ⟨n, rfl⟩ := n.exists_eq_succ_of_ne_zero hn.ne' rw [iteratedDerivWithin_succ' h hx, iteratedDerivWithin_succ' h hx] refine iteratedDerivWithin_congr h ?_ hx intro y hy have : UniqueDiffWithinAt π•œ s y := h.uniqueDiffWithinAt hy rw [derivWithin.neg this] exact derivWithin_const_sub this _
Mathlib/Analysis/Calculus/IteratedDeriv/Lemmas.lean
58
62
theorem iteratedDerivWithin_const_smul (c : R) (hf : ContDiffOn π•œ n f s) : iteratedDerivWithin n (c β€’ f) s x = c β€’ iteratedDerivWithin n f s x := by
simp_rw [iteratedDerivWithin] rw [iteratedFDerivWithin_const_smul_apply hf h hx] simp only [ContinuousMultilinearMap.smul_apply]
1,626
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Shift import Mathlib.Analysis.Calculus.IteratedDeriv.Defs variable {π•œ : Type*} [NontriviallyNormedField π•œ] {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] {R : Type*} [Semiring R] [Module R F] [SMulCommClass π•œ R F] [ContinuousConstSMul R F] {n : β„•} {x : π•œ} {s : Set π•œ} (hx : x ∈ s) (h : UniqueDiffOn π•œ s) {f g : π•œ β†’ F} theorem iteratedDerivWithin_add (hf : ContDiffOn π•œ n f s) (hg : ContDiffOn π•œ n g s) : iteratedDerivWithin n (f + g) s x = iteratedDerivWithin n f s x + iteratedDerivWithin n g s x := by simp_rw [iteratedDerivWithin, iteratedFDerivWithin_add_apply hf hg h hx, ContinuousMultilinearMap.add_apply] theorem iteratedDerivWithin_congr (hfg : Set.EqOn f g s) : Set.EqOn (iteratedDerivWithin n f s) (iteratedDerivWithin n g s) s := by induction n generalizing f g with | zero => rwa [iteratedDerivWithin_zero] | succ n IH => intro y hy have : UniqueDiffWithinAt π•œ s y := h.uniqueDiffWithinAt hy rw [iteratedDerivWithin_succ this, iteratedDerivWithin_succ this] exact derivWithin_congr (IH hfg) (IH hfg hy) theorem iteratedDerivWithin_const_add (hn : 0 < n) (c : F) : iteratedDerivWithin n (fun z => c + f z) s x = iteratedDerivWithin n f s x := by obtain ⟨n, rfl⟩ := n.exists_eq_succ_of_ne_zero hn.ne' rw [iteratedDerivWithin_succ' h hx, iteratedDerivWithin_succ' h hx] refine iteratedDerivWithin_congr h ?_ hx intro y hy exact derivWithin_const_add (h.uniqueDiffWithinAt hy) _ theorem iteratedDerivWithin_const_neg (hn : 0 < n) (c : F) : iteratedDerivWithin n (fun z => c - f z) s x = iteratedDerivWithin n (fun z => -f z) s x := by obtain ⟨n, rfl⟩ := n.exists_eq_succ_of_ne_zero hn.ne' rw [iteratedDerivWithin_succ' h hx, iteratedDerivWithin_succ' h hx] refine iteratedDerivWithin_congr h ?_ hx intro y hy have : UniqueDiffWithinAt π•œ s y := h.uniqueDiffWithinAt hy rw [derivWithin.neg this] exact derivWithin_const_sub this _ theorem iteratedDerivWithin_const_smul (c : R) (hf : ContDiffOn π•œ n f s) : iteratedDerivWithin n (c β€’ f) s x = c β€’ iteratedDerivWithin n f s x := by simp_rw [iteratedDerivWithin] rw [iteratedFDerivWithin_const_smul_apply hf h hx] simp only [ContinuousMultilinearMap.smul_apply]
Mathlib/Analysis/Calculus/IteratedDeriv/Lemmas.lean
64
66
theorem iteratedDerivWithin_const_mul (c : π•œ) {f : π•œ β†’ π•œ} (hf : ContDiffOn π•œ n f s) : iteratedDerivWithin n (fun z => c * f z) s x = c * iteratedDerivWithin n f s x := by
simpa using iteratedDerivWithin_const_smul (F := π•œ) hx h c hf
1,626
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Shift import Mathlib.Analysis.Calculus.IteratedDeriv.Defs variable {π•œ : Type*} [NontriviallyNormedField π•œ] {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] {R : Type*} [Semiring R] [Module R F] [SMulCommClass π•œ R F] [ContinuousConstSMul R F] {n : β„•} {x : π•œ} {s : Set π•œ} (hx : x ∈ s) (h : UniqueDiffOn π•œ s) {f g : π•œ β†’ F} theorem iteratedDerivWithin_add (hf : ContDiffOn π•œ n f s) (hg : ContDiffOn π•œ n g s) : iteratedDerivWithin n (f + g) s x = iteratedDerivWithin n f s x + iteratedDerivWithin n g s x := by simp_rw [iteratedDerivWithin, iteratedFDerivWithin_add_apply hf hg h hx, ContinuousMultilinearMap.add_apply] theorem iteratedDerivWithin_congr (hfg : Set.EqOn f g s) : Set.EqOn (iteratedDerivWithin n f s) (iteratedDerivWithin n g s) s := by induction n generalizing f g with | zero => rwa [iteratedDerivWithin_zero] | succ n IH => intro y hy have : UniqueDiffWithinAt π•œ s y := h.uniqueDiffWithinAt hy rw [iteratedDerivWithin_succ this, iteratedDerivWithin_succ this] exact derivWithin_congr (IH hfg) (IH hfg hy) theorem iteratedDerivWithin_const_add (hn : 0 < n) (c : F) : iteratedDerivWithin n (fun z => c + f z) s x = iteratedDerivWithin n f s x := by obtain ⟨n, rfl⟩ := n.exists_eq_succ_of_ne_zero hn.ne' rw [iteratedDerivWithin_succ' h hx, iteratedDerivWithin_succ' h hx] refine iteratedDerivWithin_congr h ?_ hx intro y hy exact derivWithin_const_add (h.uniqueDiffWithinAt hy) _ theorem iteratedDerivWithin_const_neg (hn : 0 < n) (c : F) : iteratedDerivWithin n (fun z => c - f z) s x = iteratedDerivWithin n (fun z => -f z) s x := by obtain ⟨n, rfl⟩ := n.exists_eq_succ_of_ne_zero hn.ne' rw [iteratedDerivWithin_succ' h hx, iteratedDerivWithin_succ' h hx] refine iteratedDerivWithin_congr h ?_ hx intro y hy have : UniqueDiffWithinAt π•œ s y := h.uniqueDiffWithinAt hy rw [derivWithin.neg this] exact derivWithin_const_sub this _ theorem iteratedDerivWithin_const_smul (c : R) (hf : ContDiffOn π•œ n f s) : iteratedDerivWithin n (c β€’ f) s x = c β€’ iteratedDerivWithin n f s x := by simp_rw [iteratedDerivWithin] rw [iteratedFDerivWithin_const_smul_apply hf h hx] simp only [ContinuousMultilinearMap.smul_apply] theorem iteratedDerivWithin_const_mul (c : π•œ) {f : π•œ β†’ π•œ} (hf : ContDiffOn π•œ n f s) : iteratedDerivWithin n (fun z => c * f z) s x = c * iteratedDerivWithin n f s x := by simpa using iteratedDerivWithin_const_smul (F := π•œ) hx h c hf variable (f) in
Mathlib/Analysis/Calculus/IteratedDeriv/Lemmas.lean
69
72
theorem iteratedDerivWithin_neg : iteratedDerivWithin n (-f) s x = -iteratedDerivWithin n f s x := by
rw [iteratedDerivWithin, iteratedDerivWithin, iteratedFDerivWithin_neg_apply h hx, ContinuousMultilinearMap.neg_apply]
1,626
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Shift import Mathlib.Analysis.Calculus.IteratedDeriv.Defs variable {π•œ : Type*} [NontriviallyNormedField π•œ] {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] {R : Type*} [Semiring R] [Module R F] [SMulCommClass π•œ R F] [ContinuousConstSMul R F] {n : β„•} {x : π•œ} {s : Set π•œ} (hx : x ∈ s) (h : UniqueDiffOn π•œ s) {f g : π•œ β†’ F} theorem iteratedDerivWithin_add (hf : ContDiffOn π•œ n f s) (hg : ContDiffOn π•œ n g s) : iteratedDerivWithin n (f + g) s x = iteratedDerivWithin n f s x + iteratedDerivWithin n g s x := by simp_rw [iteratedDerivWithin, iteratedFDerivWithin_add_apply hf hg h hx, ContinuousMultilinearMap.add_apply] theorem iteratedDerivWithin_congr (hfg : Set.EqOn f g s) : Set.EqOn (iteratedDerivWithin n f s) (iteratedDerivWithin n g s) s := by induction n generalizing f g with | zero => rwa [iteratedDerivWithin_zero] | succ n IH => intro y hy have : UniqueDiffWithinAt π•œ s y := h.uniqueDiffWithinAt hy rw [iteratedDerivWithin_succ this, iteratedDerivWithin_succ this] exact derivWithin_congr (IH hfg) (IH hfg hy) theorem iteratedDerivWithin_const_add (hn : 0 < n) (c : F) : iteratedDerivWithin n (fun z => c + f z) s x = iteratedDerivWithin n f s x := by obtain ⟨n, rfl⟩ := n.exists_eq_succ_of_ne_zero hn.ne' rw [iteratedDerivWithin_succ' h hx, iteratedDerivWithin_succ' h hx] refine iteratedDerivWithin_congr h ?_ hx intro y hy exact derivWithin_const_add (h.uniqueDiffWithinAt hy) _ theorem iteratedDerivWithin_const_neg (hn : 0 < n) (c : F) : iteratedDerivWithin n (fun z => c - f z) s x = iteratedDerivWithin n (fun z => -f z) s x := by obtain ⟨n, rfl⟩ := n.exists_eq_succ_of_ne_zero hn.ne' rw [iteratedDerivWithin_succ' h hx, iteratedDerivWithin_succ' h hx] refine iteratedDerivWithin_congr h ?_ hx intro y hy have : UniqueDiffWithinAt π•œ s y := h.uniqueDiffWithinAt hy rw [derivWithin.neg this] exact derivWithin_const_sub this _ theorem iteratedDerivWithin_const_smul (c : R) (hf : ContDiffOn π•œ n f s) : iteratedDerivWithin n (c β€’ f) s x = c β€’ iteratedDerivWithin n f s x := by simp_rw [iteratedDerivWithin] rw [iteratedFDerivWithin_const_smul_apply hf h hx] simp only [ContinuousMultilinearMap.smul_apply] theorem iteratedDerivWithin_const_mul (c : π•œ) {f : π•œ β†’ π•œ} (hf : ContDiffOn π•œ n f s) : iteratedDerivWithin n (fun z => c * f z) s x = c * iteratedDerivWithin n f s x := by simpa using iteratedDerivWithin_const_smul (F := π•œ) hx h c hf variable (f) in theorem iteratedDerivWithin_neg : iteratedDerivWithin n (-f) s x = -iteratedDerivWithin n f s x := by rw [iteratedDerivWithin, iteratedDerivWithin, iteratedFDerivWithin_neg_apply h hx, ContinuousMultilinearMap.neg_apply] variable (f) in theorem iteratedDerivWithin_neg' : iteratedDerivWithin n (fun z => -f z) s x = -iteratedDerivWithin n f s x := iteratedDerivWithin_neg hx h f
Mathlib/Analysis/Calculus/IteratedDeriv/Lemmas.lean
79
83
theorem iteratedDerivWithin_sub (hf : ContDiffOn π•œ n f s) (hg : ContDiffOn π•œ n g s) : iteratedDerivWithin n (f - g) s x = iteratedDerivWithin n f s x - iteratedDerivWithin n g s x := by
rw [sub_eq_add_neg, sub_eq_add_neg, Pi.neg_def, iteratedDerivWithin_add hx h hf hg.neg, iteratedDerivWithin_neg' hx h]
1,626
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Shift import Mathlib.Analysis.Calculus.IteratedDeriv.Defs variable {π•œ : Type*} [NontriviallyNormedField π•œ] {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] {R : Type*} [Semiring R] [Module R F] [SMulCommClass π•œ R F] [ContinuousConstSMul R F] {n : β„•} {x : π•œ} {s : Set π•œ} (hx : x ∈ s) (h : UniqueDiffOn π•œ s) {f g : π•œ β†’ F} theorem iteratedDerivWithin_add (hf : ContDiffOn π•œ n f s) (hg : ContDiffOn π•œ n g s) : iteratedDerivWithin n (f + g) s x = iteratedDerivWithin n f s x + iteratedDerivWithin n g s x := by simp_rw [iteratedDerivWithin, iteratedFDerivWithin_add_apply hf hg h hx, ContinuousMultilinearMap.add_apply] theorem iteratedDerivWithin_congr (hfg : Set.EqOn f g s) : Set.EqOn (iteratedDerivWithin n f s) (iteratedDerivWithin n g s) s := by induction n generalizing f g with | zero => rwa [iteratedDerivWithin_zero] | succ n IH => intro y hy have : UniqueDiffWithinAt π•œ s y := h.uniqueDiffWithinAt hy rw [iteratedDerivWithin_succ this, iteratedDerivWithin_succ this] exact derivWithin_congr (IH hfg) (IH hfg hy) theorem iteratedDerivWithin_const_add (hn : 0 < n) (c : F) : iteratedDerivWithin n (fun z => c + f z) s x = iteratedDerivWithin n f s x := by obtain ⟨n, rfl⟩ := n.exists_eq_succ_of_ne_zero hn.ne' rw [iteratedDerivWithin_succ' h hx, iteratedDerivWithin_succ' h hx] refine iteratedDerivWithin_congr h ?_ hx intro y hy exact derivWithin_const_add (h.uniqueDiffWithinAt hy) _ theorem iteratedDerivWithin_const_neg (hn : 0 < n) (c : F) : iteratedDerivWithin n (fun z => c - f z) s x = iteratedDerivWithin n (fun z => -f z) s x := by obtain ⟨n, rfl⟩ := n.exists_eq_succ_of_ne_zero hn.ne' rw [iteratedDerivWithin_succ' h hx, iteratedDerivWithin_succ' h hx] refine iteratedDerivWithin_congr h ?_ hx intro y hy have : UniqueDiffWithinAt π•œ s y := h.uniqueDiffWithinAt hy rw [derivWithin.neg this] exact derivWithin_const_sub this _ theorem iteratedDerivWithin_const_smul (c : R) (hf : ContDiffOn π•œ n f s) : iteratedDerivWithin n (c β€’ f) s x = c β€’ iteratedDerivWithin n f s x := by simp_rw [iteratedDerivWithin] rw [iteratedFDerivWithin_const_smul_apply hf h hx] simp only [ContinuousMultilinearMap.smul_apply] theorem iteratedDerivWithin_const_mul (c : π•œ) {f : π•œ β†’ π•œ} (hf : ContDiffOn π•œ n f s) : iteratedDerivWithin n (fun z => c * f z) s x = c * iteratedDerivWithin n f s x := by simpa using iteratedDerivWithin_const_smul (F := π•œ) hx h c hf variable (f) in theorem iteratedDerivWithin_neg : iteratedDerivWithin n (-f) s x = -iteratedDerivWithin n f s x := by rw [iteratedDerivWithin, iteratedDerivWithin, iteratedFDerivWithin_neg_apply h hx, ContinuousMultilinearMap.neg_apply] variable (f) in theorem iteratedDerivWithin_neg' : iteratedDerivWithin n (fun z => -f z) s x = -iteratedDerivWithin n f s x := iteratedDerivWithin_neg hx h f theorem iteratedDerivWithin_sub (hf : ContDiffOn π•œ n f s) (hg : ContDiffOn π•œ n g s) : iteratedDerivWithin n (f - g) s x = iteratedDerivWithin n f s x - iteratedDerivWithin n g s x := by rw [sub_eq_add_neg, sub_eq_add_neg, Pi.neg_def, iteratedDerivWithin_add hx h hf hg.neg, iteratedDerivWithin_neg' hx h]
Mathlib/Analysis/Calculus/IteratedDeriv/Lemmas.lean
85
100
theorem iteratedDeriv_const_smul {n : β„•} {f : π•œ β†’ F} (h : ContDiff π•œ n f) (c : π•œ) : iteratedDeriv n (fun x => f (c * x)) = fun x => c ^ n β€’ iteratedDeriv n f (c * x) := by
induction n with | zero => simp | succ n ih => funext x have hβ‚€ : DifferentiableAt π•œ (iteratedDeriv n f) (c * x) := h.differentiable_iteratedDeriv n (Nat.cast_lt.mpr n.lt_succ_self) |>.differentiableAt have h₁ : DifferentiableAt π•œ (fun x => iteratedDeriv n f (c * x)) x := by rw [← Function.comp_def] apply DifferentiableAt.comp Β· exact h.differentiable_iteratedDeriv n (Nat.cast_lt.mpr n.lt_succ_self) |>.differentiableAt Β· exact differentiableAt_id'.const_mul _ rw [iteratedDeriv_succ, ih h.of_succ, deriv_const_smul _ h₁, iteratedDeriv_succ, ← Function.comp_def, deriv.scomp x hβ‚€ (differentiableAt_id'.const_mul _), deriv_const_mul _ differentiableAt_id', deriv_id'', smul_smul, mul_one, pow_succ]
1,626
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Shift import Mathlib.Analysis.Calculus.IteratedDeriv.Defs variable {π•œ : Type*} [NontriviallyNormedField π•œ] {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] {R : Type*} [Semiring R] [Module R F] [SMulCommClass π•œ R F] [ContinuousConstSMul R F] {n : β„•} {x : π•œ} {s : Set π•œ} (hx : x ∈ s) (h : UniqueDiffOn π•œ s) {f g : π•œ β†’ F} theorem iteratedDerivWithin_add (hf : ContDiffOn π•œ n f s) (hg : ContDiffOn π•œ n g s) : iteratedDerivWithin n (f + g) s x = iteratedDerivWithin n f s x + iteratedDerivWithin n g s x := by simp_rw [iteratedDerivWithin, iteratedFDerivWithin_add_apply hf hg h hx, ContinuousMultilinearMap.add_apply] theorem iteratedDerivWithin_congr (hfg : Set.EqOn f g s) : Set.EqOn (iteratedDerivWithin n f s) (iteratedDerivWithin n g s) s := by induction n generalizing f g with | zero => rwa [iteratedDerivWithin_zero] | succ n IH => intro y hy have : UniqueDiffWithinAt π•œ s y := h.uniqueDiffWithinAt hy rw [iteratedDerivWithin_succ this, iteratedDerivWithin_succ this] exact derivWithin_congr (IH hfg) (IH hfg hy) theorem iteratedDerivWithin_const_add (hn : 0 < n) (c : F) : iteratedDerivWithin n (fun z => c + f z) s x = iteratedDerivWithin n f s x := by obtain ⟨n, rfl⟩ := n.exists_eq_succ_of_ne_zero hn.ne' rw [iteratedDerivWithin_succ' h hx, iteratedDerivWithin_succ' h hx] refine iteratedDerivWithin_congr h ?_ hx intro y hy exact derivWithin_const_add (h.uniqueDiffWithinAt hy) _ theorem iteratedDerivWithin_const_neg (hn : 0 < n) (c : F) : iteratedDerivWithin n (fun z => c - f z) s x = iteratedDerivWithin n (fun z => -f z) s x := by obtain ⟨n, rfl⟩ := n.exists_eq_succ_of_ne_zero hn.ne' rw [iteratedDerivWithin_succ' h hx, iteratedDerivWithin_succ' h hx] refine iteratedDerivWithin_congr h ?_ hx intro y hy have : UniqueDiffWithinAt π•œ s y := h.uniqueDiffWithinAt hy rw [derivWithin.neg this] exact derivWithin_const_sub this _ theorem iteratedDerivWithin_const_smul (c : R) (hf : ContDiffOn π•œ n f s) : iteratedDerivWithin n (c β€’ f) s x = c β€’ iteratedDerivWithin n f s x := by simp_rw [iteratedDerivWithin] rw [iteratedFDerivWithin_const_smul_apply hf h hx] simp only [ContinuousMultilinearMap.smul_apply] theorem iteratedDerivWithin_const_mul (c : π•œ) {f : π•œ β†’ π•œ} (hf : ContDiffOn π•œ n f s) : iteratedDerivWithin n (fun z => c * f z) s x = c * iteratedDerivWithin n f s x := by simpa using iteratedDerivWithin_const_smul (F := π•œ) hx h c hf variable (f) in theorem iteratedDerivWithin_neg : iteratedDerivWithin n (-f) s x = -iteratedDerivWithin n f s x := by rw [iteratedDerivWithin, iteratedDerivWithin, iteratedFDerivWithin_neg_apply h hx, ContinuousMultilinearMap.neg_apply] variable (f) in theorem iteratedDerivWithin_neg' : iteratedDerivWithin n (fun z => -f z) s x = -iteratedDerivWithin n f s x := iteratedDerivWithin_neg hx h f theorem iteratedDerivWithin_sub (hf : ContDiffOn π•œ n f s) (hg : ContDiffOn π•œ n g s) : iteratedDerivWithin n (f - g) s x = iteratedDerivWithin n f s x - iteratedDerivWithin n g s x := by rw [sub_eq_add_neg, sub_eq_add_neg, Pi.neg_def, iteratedDerivWithin_add hx h hf hg.neg, iteratedDerivWithin_neg' hx h] theorem iteratedDeriv_const_smul {n : β„•} {f : π•œ β†’ F} (h : ContDiff π•œ n f) (c : π•œ) : iteratedDeriv n (fun x => f (c * x)) = fun x => c ^ n β€’ iteratedDeriv n f (c * x) := by induction n with | zero => simp | succ n ih => funext x have hβ‚€ : DifferentiableAt π•œ (iteratedDeriv n f) (c * x) := h.differentiable_iteratedDeriv n (Nat.cast_lt.mpr n.lt_succ_self) |>.differentiableAt have h₁ : DifferentiableAt π•œ (fun x => iteratedDeriv n f (c * x)) x := by rw [← Function.comp_def] apply DifferentiableAt.comp Β· exact h.differentiable_iteratedDeriv n (Nat.cast_lt.mpr n.lt_succ_self) |>.differentiableAt Β· exact differentiableAt_id'.const_mul _ rw [iteratedDeriv_succ, ih h.of_succ, deriv_const_smul _ h₁, iteratedDeriv_succ, ← Function.comp_def, deriv.scomp x hβ‚€ (differentiableAt_id'.const_mul _), deriv_const_mul _ differentiableAt_id', deriv_id'', smul_smul, mul_one, pow_succ]
Mathlib/Analysis/Calculus/IteratedDeriv/Lemmas.lean
102
104
theorem iteratedDeriv_const_mul {n : β„•} {f : π•œ β†’ π•œ} (h : ContDiff π•œ n f) (c : π•œ) : iteratedDeriv n (fun x => f (c * x)) = fun x => c ^ n * iteratedDeriv n f (c * x) := by
simpa only [smul_eq_mul] using iteratedDeriv_const_smul h c
1,626
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.LinearAlgebra.AffineSpace.Slope #align_import analysis.calculus.deriv.slope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open Topology Filter TopologicalSpace open Filter Set section NormedField variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ}
Mathlib/Analysis/Calculus/Deriv/Slope.lean
51
63
theorem hasDerivAtFilter_iff_tendsto_slope {x : π•œ} {L : Filter π•œ} : HasDerivAtFilter f f' x L ↔ Tendsto (slope f x) (L βŠ“ π“Ÿ {x}ᢜ) (𝓝 f') := calc HasDerivAtFilter f f' x L ↔ Tendsto (fun y ↦ slope f x y - (y - x)⁻¹ β€’ (y - x) β€’ f') L (𝓝 0) := by
simp only [hasDerivAtFilter_iff_tendsto, ← norm_inv, ← norm_smul, ← tendsto_zero_iff_norm_tendsto_zero, slope_def_module, smul_sub] _ ↔ Tendsto (fun y ↦ slope f x y - (y - x)⁻¹ β€’ (y - x) β€’ f') (L βŠ“ π“Ÿ {x}ᢜ) (𝓝 0) := .symm <| tendsto_inf_principal_nhds_iff_of_forall_eq <| by simp _ ↔ Tendsto (fun y ↦ slope f x y - f') (L βŠ“ π“Ÿ {x}ᢜ) (𝓝 0) := tendsto_congr' <| by refine (EqOn.eventuallyEq fun y hy ↦ ?_).filter_mono inf_le_right rw [inv_smul_smulβ‚€ (sub_ne_zero.2 hy) f'] _ ↔ Tendsto (slope f x) (L βŠ“ π“Ÿ {x}ᢜ) (𝓝 f') := by rw [← nhds_translation_sub f', tendsto_comap_iff]; rfl
1,627
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.LinearAlgebra.AffineSpace.Slope #align_import analysis.calculus.deriv.slope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open Topology Filter TopologicalSpace open Filter Set section NormedField variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} theorem hasDerivAtFilter_iff_tendsto_slope {x : π•œ} {L : Filter π•œ} : HasDerivAtFilter f f' x L ↔ Tendsto (slope f x) (L βŠ“ π“Ÿ {x}ᢜ) (𝓝 f') := calc HasDerivAtFilter f f' x L ↔ Tendsto (fun y ↦ slope f x y - (y - x)⁻¹ β€’ (y - x) β€’ f') L (𝓝 0) := by simp only [hasDerivAtFilter_iff_tendsto, ← norm_inv, ← norm_smul, ← tendsto_zero_iff_norm_tendsto_zero, slope_def_module, smul_sub] _ ↔ Tendsto (fun y ↦ slope f x y - (y - x)⁻¹ β€’ (y - x) β€’ f') (L βŠ“ π“Ÿ {x}ᢜ) (𝓝 0) := .symm <| tendsto_inf_principal_nhds_iff_of_forall_eq <| by simp _ ↔ Tendsto (fun y ↦ slope f x y - f') (L βŠ“ π“Ÿ {x}ᢜ) (𝓝 0) := tendsto_congr' <| by refine (EqOn.eventuallyEq fun y hy ↦ ?_).filter_mono inf_le_right rw [inv_smul_smulβ‚€ (sub_ne_zero.2 hy) f'] _ ↔ Tendsto (slope f x) (L βŠ“ π“Ÿ {x}ᢜ) (𝓝 f') := by rw [← nhds_translation_sub f', tendsto_comap_iff]; rfl #align has_deriv_at_filter_iff_tendsto_slope hasDerivAtFilter_iff_tendsto_slope
Mathlib/Analysis/Calculus/Deriv/Slope.lean
66
69
theorem hasDerivWithinAt_iff_tendsto_slope : HasDerivWithinAt f f' s x ↔ Tendsto (slope f x) (𝓝[s \ {x}] x) (𝓝 f') := by
simp only [HasDerivWithinAt, nhdsWithin, diff_eq, ← inf_assoc, inf_principal.symm] exact hasDerivAtFilter_iff_tendsto_slope
1,627
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.LinearAlgebra.AffineSpace.Slope #align_import analysis.calculus.deriv.slope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open Topology Filter TopologicalSpace open Filter Set section NormedField variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} theorem hasDerivAtFilter_iff_tendsto_slope {x : π•œ} {L : Filter π•œ} : HasDerivAtFilter f f' x L ↔ Tendsto (slope f x) (L βŠ“ π“Ÿ {x}ᢜ) (𝓝 f') := calc HasDerivAtFilter f f' x L ↔ Tendsto (fun y ↦ slope f x y - (y - x)⁻¹ β€’ (y - x) β€’ f') L (𝓝 0) := by simp only [hasDerivAtFilter_iff_tendsto, ← norm_inv, ← norm_smul, ← tendsto_zero_iff_norm_tendsto_zero, slope_def_module, smul_sub] _ ↔ Tendsto (fun y ↦ slope f x y - (y - x)⁻¹ β€’ (y - x) β€’ f') (L βŠ“ π“Ÿ {x}ᢜ) (𝓝 0) := .symm <| tendsto_inf_principal_nhds_iff_of_forall_eq <| by simp _ ↔ Tendsto (fun y ↦ slope f x y - f') (L βŠ“ π“Ÿ {x}ᢜ) (𝓝 0) := tendsto_congr' <| by refine (EqOn.eventuallyEq fun y hy ↦ ?_).filter_mono inf_le_right rw [inv_smul_smulβ‚€ (sub_ne_zero.2 hy) f'] _ ↔ Tendsto (slope f x) (L βŠ“ π“Ÿ {x}ᢜ) (𝓝 f') := by rw [← nhds_translation_sub f', tendsto_comap_iff]; rfl #align has_deriv_at_filter_iff_tendsto_slope hasDerivAtFilter_iff_tendsto_slope theorem hasDerivWithinAt_iff_tendsto_slope : HasDerivWithinAt f f' s x ↔ Tendsto (slope f x) (𝓝[s \ {x}] x) (𝓝 f') := by simp only [HasDerivWithinAt, nhdsWithin, diff_eq, ← inf_assoc, inf_principal.symm] exact hasDerivAtFilter_iff_tendsto_slope #align has_deriv_within_at_iff_tendsto_slope hasDerivWithinAt_iff_tendsto_slope
Mathlib/Analysis/Calculus/Deriv/Slope.lean
72
74
theorem hasDerivWithinAt_iff_tendsto_slope' (hs : x βˆ‰ s) : HasDerivWithinAt f f' s x ↔ Tendsto (slope f x) (𝓝[s] x) (𝓝 f') := by
rw [hasDerivWithinAt_iff_tendsto_slope, diff_singleton_eq_self hs]
1,627
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.LinearAlgebra.AffineSpace.Slope #align_import analysis.calculus.deriv.slope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open Topology Filter TopologicalSpace open Filter Set section NormedField variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} theorem hasDerivAtFilter_iff_tendsto_slope {x : π•œ} {L : Filter π•œ} : HasDerivAtFilter f f' x L ↔ Tendsto (slope f x) (L βŠ“ π“Ÿ {x}ᢜ) (𝓝 f') := calc HasDerivAtFilter f f' x L ↔ Tendsto (fun y ↦ slope f x y - (y - x)⁻¹ β€’ (y - x) β€’ f') L (𝓝 0) := by simp only [hasDerivAtFilter_iff_tendsto, ← norm_inv, ← norm_smul, ← tendsto_zero_iff_norm_tendsto_zero, slope_def_module, smul_sub] _ ↔ Tendsto (fun y ↦ slope f x y - (y - x)⁻¹ β€’ (y - x) β€’ f') (L βŠ“ π“Ÿ {x}ᢜ) (𝓝 0) := .symm <| tendsto_inf_principal_nhds_iff_of_forall_eq <| by simp _ ↔ Tendsto (fun y ↦ slope f x y - f') (L βŠ“ π“Ÿ {x}ᢜ) (𝓝 0) := tendsto_congr' <| by refine (EqOn.eventuallyEq fun y hy ↦ ?_).filter_mono inf_le_right rw [inv_smul_smulβ‚€ (sub_ne_zero.2 hy) f'] _ ↔ Tendsto (slope f x) (L βŠ“ π“Ÿ {x}ᢜ) (𝓝 f') := by rw [← nhds_translation_sub f', tendsto_comap_iff]; rfl #align has_deriv_at_filter_iff_tendsto_slope hasDerivAtFilter_iff_tendsto_slope theorem hasDerivWithinAt_iff_tendsto_slope : HasDerivWithinAt f f' s x ↔ Tendsto (slope f x) (𝓝[s \ {x}] x) (𝓝 f') := by simp only [HasDerivWithinAt, nhdsWithin, diff_eq, ← inf_assoc, inf_principal.symm] exact hasDerivAtFilter_iff_tendsto_slope #align has_deriv_within_at_iff_tendsto_slope hasDerivWithinAt_iff_tendsto_slope theorem hasDerivWithinAt_iff_tendsto_slope' (hs : x βˆ‰ s) : HasDerivWithinAt f f' s x ↔ Tendsto (slope f x) (𝓝[s] x) (𝓝 f') := by rw [hasDerivWithinAt_iff_tendsto_slope, diff_singleton_eq_self hs] #align has_deriv_within_at_iff_tendsto_slope' hasDerivWithinAt_iff_tendsto_slope' theorem hasDerivAt_iff_tendsto_slope : HasDerivAt f f' x ↔ Tendsto (slope f x) (𝓝[β‰ ] x) (𝓝 f') := hasDerivAtFilter_iff_tendsto_slope #align has_deriv_at_iff_tendsto_slope hasDerivAt_iff_tendsto_slope
Mathlib/Analysis/Calculus/Deriv/Slope.lean
81
85
theorem hasDerivAt_iff_tendsto_slope_zero : HasDerivAt f f' x ↔ Tendsto (fun t ↦ t⁻¹ β€’ (f (x + t) - f x)) (𝓝[β‰ ] 0) (𝓝 f') := by
have : 𝓝[β‰ ] x = Filter.map (fun t ↦ x + t) (𝓝[β‰ ] 0) := by simp [nhdsWithin, map_add_left_nhds_zero x, Filter.map_inf, add_right_injective x] simp [hasDerivAt_iff_tendsto_slope, this, slope, Function.comp]
1,627
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.LinearAlgebra.AffineSpace.Slope #align_import analysis.calculus.deriv.slope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open Topology Filter TopologicalSpace open Filter Set section NormedField variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} theorem hasDerivAtFilter_iff_tendsto_slope {x : π•œ} {L : Filter π•œ} : HasDerivAtFilter f f' x L ↔ Tendsto (slope f x) (L βŠ“ π“Ÿ {x}ᢜ) (𝓝 f') := calc HasDerivAtFilter f f' x L ↔ Tendsto (fun y ↦ slope f x y - (y - x)⁻¹ β€’ (y - x) β€’ f') L (𝓝 0) := by simp only [hasDerivAtFilter_iff_tendsto, ← norm_inv, ← norm_smul, ← tendsto_zero_iff_norm_tendsto_zero, slope_def_module, smul_sub] _ ↔ Tendsto (fun y ↦ slope f x y - (y - x)⁻¹ β€’ (y - x) β€’ f') (L βŠ“ π“Ÿ {x}ᢜ) (𝓝 0) := .symm <| tendsto_inf_principal_nhds_iff_of_forall_eq <| by simp _ ↔ Tendsto (fun y ↦ slope f x y - f') (L βŠ“ π“Ÿ {x}ᢜ) (𝓝 0) := tendsto_congr' <| by refine (EqOn.eventuallyEq fun y hy ↦ ?_).filter_mono inf_le_right rw [inv_smul_smulβ‚€ (sub_ne_zero.2 hy) f'] _ ↔ Tendsto (slope f x) (L βŠ“ π“Ÿ {x}ᢜ) (𝓝 f') := by rw [← nhds_translation_sub f', tendsto_comap_iff]; rfl #align has_deriv_at_filter_iff_tendsto_slope hasDerivAtFilter_iff_tendsto_slope theorem hasDerivWithinAt_iff_tendsto_slope : HasDerivWithinAt f f' s x ↔ Tendsto (slope f x) (𝓝[s \ {x}] x) (𝓝 f') := by simp only [HasDerivWithinAt, nhdsWithin, diff_eq, ← inf_assoc, inf_principal.symm] exact hasDerivAtFilter_iff_tendsto_slope #align has_deriv_within_at_iff_tendsto_slope hasDerivWithinAt_iff_tendsto_slope theorem hasDerivWithinAt_iff_tendsto_slope' (hs : x βˆ‰ s) : HasDerivWithinAt f f' s x ↔ Tendsto (slope f x) (𝓝[s] x) (𝓝 f') := by rw [hasDerivWithinAt_iff_tendsto_slope, diff_singleton_eq_self hs] #align has_deriv_within_at_iff_tendsto_slope' hasDerivWithinAt_iff_tendsto_slope' theorem hasDerivAt_iff_tendsto_slope : HasDerivAt f f' x ↔ Tendsto (slope f x) (𝓝[β‰ ] x) (𝓝 f') := hasDerivAtFilter_iff_tendsto_slope #align has_deriv_at_iff_tendsto_slope hasDerivAt_iff_tendsto_slope theorem hasDerivAt_iff_tendsto_slope_zero : HasDerivAt f f' x ↔ Tendsto (fun t ↦ t⁻¹ β€’ (f (x + t) - f x)) (𝓝[β‰ ] 0) (𝓝 f') := by have : 𝓝[β‰ ] x = Filter.map (fun t ↦ x + t) (𝓝[β‰ ] 0) := by simp [nhdsWithin, map_add_left_nhds_zero x, Filter.map_inf, add_right_injective x] simp [hasDerivAt_iff_tendsto_slope, this, slope, Function.comp] alias ⟨HasDerivAt.tendsto_slope_zero, _⟩ := hasDerivAt_iff_tendsto_slope_zero theorem HasDerivAt.tendsto_slope_zero_right [PartialOrder π•œ] (h : HasDerivAt f f' x) : Tendsto (fun t ↦ t⁻¹ β€’ (f (x + t) - f x)) (𝓝[>] 0) (𝓝 f') := h.tendsto_slope_zero.mono_left (nhds_right'_le_nhds_ne 0) theorem HasDerivAt.tendsto_slope_zero_left [PartialOrder π•œ] (h : HasDerivAt f f' x) : Tendsto (fun t ↦ t⁻¹ β€’ (f (x + t) - f x)) (𝓝[<] 0) (𝓝 f') := h.tendsto_slope_zero.mono_left (nhds_left'_le_nhds_ne 0)
Mathlib/Analysis/Calculus/Deriv/Slope.lean
99
134
theorem range_derivWithin_subset_closure_span_image (f : π•œ β†’ F) {s t : Set π•œ} (h : s βŠ† closure (s ∩ t)) : range (derivWithin f s) βŠ† closure (Submodule.span π•œ (f '' t)) := by
rintro - ⟨x, rfl⟩ rcases eq_or_neBot (𝓝[s \ {x}] x) with H|H Β· simp [derivWithin, fderivWithin, H] exact subset_closure (zero_mem _) by_cases H' : DifferentiableWithinAt π•œ f s x; swap Β· rw [derivWithin_zero_of_not_differentiableWithinAt H'] exact subset_closure (zero_mem _) have I : (𝓝[(s ∩ t) \ {x}] x).NeBot := by rw [← mem_closure_iff_nhdsWithin_neBot] at H ⊒ have A : closure (s \ {x}) βŠ† closure (closure (s ∩ t) \ {x}) := closure_mono (diff_subset_diff_left h) have B : closure (s ∩ t) \ {x} βŠ† closure ((s ∩ t) \ {x}) := by convert closure_diff; exact closure_singleton.symm simpa using A.trans (closure_mono B) H have : Tendsto (slope f x) (𝓝[(s ∩ t) \ {x}] x) (𝓝 (derivWithin f s x)) := by apply Tendsto.mono_left (hasDerivWithinAt_iff_tendsto_slope.1 H'.hasDerivWithinAt) rw [inter_comm, inter_diff_assoc] exact nhdsWithin_mono _ inter_subset_right rw [← closure_closure, ← Submodule.topologicalClosure_coe] apply mem_closure_of_tendsto this filter_upwards [self_mem_nhdsWithin] with y hy simp only [slope, vsub_eq_sub, SetLike.mem_coe] refine Submodule.smul_mem _ _ (Submodule.sub_mem _ ?_ ?_) Β· apply Submodule.le_topologicalClosure apply Submodule.subset_span exact mem_image_of_mem _ hy.1.2 Β· apply Submodule.closure_subset_topologicalClosure_span suffices A : f x ∈ closure (f '' (s ∩ t)) from closure_mono (image_subset _ inter_subset_right) A apply ContinuousWithinAt.mem_closure_image Β· apply H'.continuousWithinAt.mono inter_subset_left rw [mem_closure_iff_nhdsWithin_neBot] exact I.mono (nhdsWithin_mono _ diff_subset)
1,627
import Mathlib.Analysis.Calculus.Deriv.Slope import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.dslope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open scoped Classical Topology Filter open Function Set Filter variable {π•œ E : Type*} [NontriviallyNormedField π•œ] [NormedAddCommGroup E] [NormedSpace π•œ E] noncomputable def dslope (f : π•œ β†’ E) (a : π•œ) : π•œ β†’ E := update (slope f a) a (deriv f a) #align dslope dslope @[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 π•œ} 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
Mathlib/Analysis/Calculus/Dslope.lean
46
52
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) Β· simp only [dslope_same] exact (f.hasFDerivAt.comp_hasDerivAt b (H rfl).hasDerivAt).deriv Β· simpa only [dslope_of_ne _ hne] using f.toLinearMap.slope_comp g a b
1,628
import Mathlib.Analysis.Calculus.Deriv.Slope import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.dslope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open scoped Classical Topology Filter open Function Set Filter variable {π•œ E : Type*} [NontriviallyNormedField π•œ] [NormedAddCommGroup E] [NormedSpace π•œ E] noncomputable def dslope (f : π•œ β†’ E) (a : π•œ) : π•œ β†’ E := update (slope f a) a (deriv f a) #align dslope dslope @[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 π•œ} 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] (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) Β· simp only [dslope_same] exact (f.hasFDerivAt.comp_hasDerivAt b (H rfl).hasDerivAt).deriv Β· 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 _ => dslope_of_ne f #align eq_on_dslope_slope eqOn_dslope_slope 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 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 @[simp]
Mathlib/Analysis/Calculus/Dslope.lean
68
69
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, *]
1,628
import Mathlib.Analysis.Calculus.Deriv.Slope import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.dslope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open scoped Classical Topology Filter open Function Set Filter variable {π•œ E : Type*} [NontriviallyNormedField π•œ] [NormedAddCommGroup E] [NormedSpace π•œ E] noncomputable def dslope (f : π•œ β†’ E) (a : π•œ) : π•œ β†’ E := update (slope f a) a (deriv f a) #align dslope dslope @[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 π•œ} 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] (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) Β· simp only [dslope_same] exact (f.hasFDerivAt.comp_hasDerivAt b (H rfl).hasDerivAt).deriv Β· 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 _ => dslope_of_ne f #align eq_on_dslope_slope eqOn_dslope_slope 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 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 @[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
Mathlib/Analysis/Calculus/Dslope.lean
72
74
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]
1,628
import Mathlib.Analysis.Calculus.Deriv.Slope import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.dslope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open scoped Classical Topology Filter open Function Set Filter variable {π•œ E : Type*} [NontriviallyNormedField π•œ] [NormedAddCommGroup E] [NormedSpace π•œ E] noncomputable def dslope (f : π•œ β†’ E) (a : π•œ) : π•œ β†’ E := update (slope f a) a (deriv f a) #align dslope dslope @[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 π•œ} 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] (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) Β· simp only [dslope_same] exact (f.hasFDerivAt.comp_hasDerivAt b (H rfl).hasDerivAt).deriv Β· 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 _ => dslope_of_ne f #align eq_on_dslope_slope eqOn_dslope_slope 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 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 @[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 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 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 #align eq_on_dslope_sub_smul eqOn_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 @[simp]
Mathlib/Analysis/Calculus/Dslope.lean
87
88
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]
1,628
import Mathlib.Analysis.Calculus.Deriv.Slope import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.dslope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open scoped Classical Topology Filter open Function Set Filter variable {π•œ E : Type*} [NontriviallyNormedField π•œ] [NormedAddCommGroup E] [NormedSpace π•œ E] noncomputable def dslope (f : π•œ β†’ E) (a : π•œ) : π•œ β†’ E := update (slope f a) a (deriv f a) #align dslope dslope @[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 π•œ} 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] (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) Β· simp only [dslope_same] exact (f.hasFDerivAt.comp_hasDerivAt b (H rfl).hasDerivAt).deriv Β· 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 _ => dslope_of_ne f #align eq_on_dslope_slope eqOn_dslope_slope 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 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 @[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 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 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 #align eq_on_dslope_sub_smul eqOn_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 @[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
Mathlib/Analysis/Calculus/Dslope.lean
91
95
theorem ContinuousWithinAt.of_dslope (h : ContinuousWithinAt (dslope f a) s b) : ContinuousWithinAt f s b := by
have : ContinuousWithinAt (fun x => (x - a) β€’ dslope f a x + f a) s b := ((continuousWithinAt_id.sub continuousWithinAt_const).smul h).add continuousWithinAt_const simpa only [sub_smul_dslope, sub_add_cancel] using this
1,628
import Mathlib.Analysis.Calculus.Deriv.Slope import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.dslope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open scoped Classical Topology Filter open Function Set Filter variable {π•œ E : Type*} [NontriviallyNormedField π•œ] [NormedAddCommGroup E] [NormedSpace π•œ E] noncomputable def dslope (f : π•œ β†’ E) (a : π•œ) : π•œ β†’ E := update (slope f a) a (deriv f a) #align dslope dslope @[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 π•œ} 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] (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) Β· simp only [dslope_same] exact (f.hasFDerivAt.comp_hasDerivAt b (H rfl).hasDerivAt).deriv Β· 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 _ => dslope_of_ne f #align eq_on_dslope_slope eqOn_dslope_slope 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 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 @[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 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 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 #align eq_on_dslope_sub_smul eqOn_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 @[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 theorem ContinuousWithinAt.of_dslope (h : ContinuousWithinAt (dslope f a) s b) : ContinuousWithinAt f s b := by have : ContinuousWithinAt (fun x => (x - a) β€’ dslope f a x + 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 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 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
Mathlib/Analysis/Calculus/Dslope.lean
106
111
theorem continuousWithinAt_dslope_of_ne (h : b β‰  a) : ContinuousWithinAt (dslope f a) s b ↔ ContinuousWithinAt f s b := by
refine ⟨ContinuousWithinAt.of_dslope, fun hc => ?_⟩ simp only [dslope, continuousWithinAt_update_of_ne h] exact ((continuousWithinAt_id.sub continuousWithinAt_const).invβ‚€ (sub_ne_zero.2 h)).smul (hc.sub continuousWithinAt_const)
1,628
import Mathlib.Analysis.Calculus.Deriv.Slope import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.dslope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open scoped Classical Topology Filter open Function Set Filter variable {π•œ E : Type*} [NontriviallyNormedField π•œ] [NormedAddCommGroup E] [NormedSpace π•œ E] noncomputable def dslope (f : π•œ β†’ E) (a : π•œ) : π•œ β†’ E := update (slope f a) a (deriv f a) #align dslope dslope @[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 π•œ} 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] (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) Β· simp only [dslope_same] exact (f.hasFDerivAt.comp_hasDerivAt b (H rfl).hasDerivAt).deriv Β· 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 _ => dslope_of_ne f #align eq_on_dslope_slope eqOn_dslope_slope 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 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 @[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 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 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 #align eq_on_dslope_sub_smul eqOn_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 @[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 theorem ContinuousWithinAt.of_dslope (h : ContinuousWithinAt (dslope f a) s b) : ContinuousWithinAt f s b := by have : ContinuousWithinAt (fun x => (x - a) β€’ dslope f a x + 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 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 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 theorem continuousWithinAt_dslope_of_ne (h : b β‰  a) : ContinuousWithinAt (dslope f a) s b ↔ ContinuousWithinAt f s b := by refine ⟨ContinuousWithinAt.of_dslope, fun hc => ?_⟩ simp only [dslope, continuousWithinAt_update_of_ne h] exact ((continuousWithinAt_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
Mathlib/Analysis/Calculus/Dslope.lean
114
115
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]
1,628
import Mathlib.Analysis.Calculus.Deriv.Slope import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.dslope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open scoped Classical Topology Filter open Function Set Filter variable {π•œ E : Type*} [NontriviallyNormedField π•œ] [NormedAddCommGroup E] [NormedSpace π•œ E] noncomputable def dslope (f : π•œ β†’ E) (a : π•œ) : π•œ β†’ E := update (slope f a) a (deriv f a) #align dslope dslope @[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 π•œ} 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] (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) Β· simp only [dslope_same] exact (f.hasFDerivAt.comp_hasDerivAt b (H rfl).hasDerivAt).deriv Β· 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 _ => dslope_of_ne f #align eq_on_dslope_slope eqOn_dslope_slope 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 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 @[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 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 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 #align eq_on_dslope_sub_smul eqOn_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 @[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 theorem ContinuousWithinAt.of_dslope (h : ContinuousWithinAt (dslope f a) s b) : ContinuousWithinAt f s b := by have : ContinuousWithinAt (fun x => (x - a) β€’ dslope f a x + 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 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 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 theorem continuousWithinAt_dslope_of_ne (h : b β‰  a) : ContinuousWithinAt (dslope f a) s b ↔ ContinuousWithinAt f s b := by refine ⟨ContinuousWithinAt.of_dslope, fun hc => ?_⟩ simp only [dslope, continuousWithinAt_update_of_ne h] exact ((continuousWithinAt_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 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
Mathlib/Analysis/Calculus/Dslope.lean
118
124
theorem continuousOn_dslope (h : s ∈ 𝓝 a) : ContinuousOn (dslope f a) s ↔ ContinuousOn f s ∧ DifferentiableAt π•œ f a := by
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, (continuousWithinAt_dslope_of_ne hne).2 (hc x hx)]
1,628
import Mathlib.Analysis.Calculus.Deriv.Comp import Mathlib.Analysis.Calculus.Deriv.Add import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Slope noncomputable section open scoped Topology Filter ENNReal NNReal open Filter Asymptotics Set variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] section Module variable (π•œ) variable {E : Type*} [AddCommGroup E] [Module π•œ E] def HasLineDerivWithinAt (f : E β†’ F) (f' : F) (s : Set E) (x : E) (v : E) := HasDerivWithinAt (fun t ↦ f (x + t β€’ v)) f' ((fun t ↦ x + t β€’ v) ⁻¹' s) (0 : π•œ) def HasLineDerivAt (f : E β†’ F) (f' : F) (x : E) (v : E) := HasDerivAt (fun t ↦ f (x + t β€’ v)) f' (0 : π•œ) def LineDifferentiableWithinAt (f : E β†’ F) (s : Set E) (x : E) (v : E) : Prop := DifferentiableWithinAt π•œ (fun t ↦ f (x + t β€’ v)) ((fun t ↦ x + t β€’ v) ⁻¹' s) (0 : π•œ) def LineDifferentiableAt (f : E β†’ F) (x : E) (v : E) : Prop := DifferentiableAt π•œ (fun t ↦ f (x + t β€’ v)) (0 : π•œ) def lineDerivWithin (f : E β†’ F) (s : Set E) (x : E) (v : E) : F := derivWithin (fun t ↦ f (x + t β€’ v)) ((fun t ↦ x + t β€’ v) ⁻¹' s) (0 : π•œ) def lineDeriv (f : E β†’ F) (x : E) (v : E) : F := deriv (fun t ↦ f (x + t β€’ v)) (0 : π•œ) variable {π•œ} variable {f f₁ : E β†’ F} {f' fβ‚€' f₁' : F} {s t : Set E} {x v : E} lemma HasLineDerivWithinAt.mono (hf : HasLineDerivWithinAt π•œ f f' s x v) (hst : t βŠ† s) : HasLineDerivWithinAt π•œ f f' t x v := HasDerivWithinAt.mono hf (preimage_mono hst) lemma HasLineDerivAt.hasLineDerivWithinAt (hf : HasLineDerivAt π•œ f f' x v) (s : Set E) : HasLineDerivWithinAt π•œ f f' s x v := HasDerivAt.hasDerivWithinAt hf lemma HasLineDerivWithinAt.lineDifferentiableWithinAt (hf : HasLineDerivWithinAt π•œ f f' s x v) : LineDifferentiableWithinAt π•œ f s x v := HasDerivWithinAt.differentiableWithinAt hf theorem HasLineDerivAt.lineDifferentiableAt (hf : HasLineDerivAt π•œ f f' x v) : LineDifferentiableAt π•œ f x v := HasDerivAt.differentiableAt hf theorem LineDifferentiableWithinAt.hasLineDerivWithinAt (h : LineDifferentiableWithinAt π•œ f s x v) : HasLineDerivWithinAt π•œ f (lineDerivWithin π•œ f s x v) s x v := DifferentiableWithinAt.hasDerivWithinAt h theorem LineDifferentiableAt.hasLineDerivAt (h : LineDifferentiableAt π•œ f x v) : HasLineDerivAt π•œ f (lineDeriv π•œ f x v) x v := DifferentiableAt.hasDerivAt h @[simp] lemma hasLineDerivWithinAt_univ : HasLineDerivWithinAt π•œ f f' univ x v ↔ HasLineDerivAt π•œ f f' x v := by simp only [HasLineDerivWithinAt, HasLineDerivAt, preimage_univ, hasDerivWithinAt_univ] theorem lineDerivWithin_zero_of_not_lineDifferentiableWithinAt (h : Β¬LineDifferentiableWithinAt π•œ f s x v) : lineDerivWithin π•œ f s x v = 0 := derivWithin_zero_of_not_differentiableWithinAt h theorem lineDeriv_zero_of_not_lineDifferentiableAt (h : Β¬LineDifferentiableAt π•œ f x v) : lineDeriv π•œ f x v = 0 := deriv_zero_of_not_differentiableAt h
Mathlib/Analysis/Calculus/LineDeriv/Basic.lean
147
150
theorem hasLineDerivAt_iff_isLittleO_nhds_zero : HasLineDerivAt π•œ f f' x v ↔ (fun t : π•œ => f (x + t β€’ v) - f x - t β€’ f') =o[𝓝 0] fun t => t := by
simp only [HasLineDerivAt, hasDerivAt_iff_isLittleO_nhds_zero, zero_add, zero_smul, add_zero]
1,629
import Mathlib.Analysis.Calculus.Deriv.Comp import Mathlib.Analysis.Calculus.Deriv.Add import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Slope noncomputable section open scoped Topology Filter ENNReal NNReal open Filter Asymptotics Set variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] section Module variable (π•œ) variable {E : Type*} [AddCommGroup E] [Module π•œ E] def HasLineDerivWithinAt (f : E β†’ F) (f' : F) (s : Set E) (x : E) (v : E) := HasDerivWithinAt (fun t ↦ f (x + t β€’ v)) f' ((fun t ↦ x + t β€’ v) ⁻¹' s) (0 : π•œ) def HasLineDerivAt (f : E β†’ F) (f' : F) (x : E) (v : E) := HasDerivAt (fun t ↦ f (x + t β€’ v)) f' (0 : π•œ) def LineDifferentiableWithinAt (f : E β†’ F) (s : Set E) (x : E) (v : E) : Prop := DifferentiableWithinAt π•œ (fun t ↦ f (x + t β€’ v)) ((fun t ↦ x + t β€’ v) ⁻¹' s) (0 : π•œ) def LineDifferentiableAt (f : E β†’ F) (x : E) (v : E) : Prop := DifferentiableAt π•œ (fun t ↦ f (x + t β€’ v)) (0 : π•œ) def lineDerivWithin (f : E β†’ F) (s : Set E) (x : E) (v : E) : F := derivWithin (fun t ↦ f (x + t β€’ v)) ((fun t ↦ x + t β€’ v) ⁻¹' s) (0 : π•œ) def lineDeriv (f : E β†’ F) (x : E) (v : E) : F := deriv (fun t ↦ f (x + t β€’ v)) (0 : π•œ) variable {π•œ} variable {f f₁ : E β†’ F} {f' fβ‚€' f₁' : F} {s t : Set E} {x v : E} lemma HasLineDerivWithinAt.mono (hf : HasLineDerivWithinAt π•œ f f' s x v) (hst : t βŠ† s) : HasLineDerivWithinAt π•œ f f' t x v := HasDerivWithinAt.mono hf (preimage_mono hst) lemma HasLineDerivAt.hasLineDerivWithinAt (hf : HasLineDerivAt π•œ f f' x v) (s : Set E) : HasLineDerivWithinAt π•œ f f' s x v := HasDerivAt.hasDerivWithinAt hf lemma HasLineDerivWithinAt.lineDifferentiableWithinAt (hf : HasLineDerivWithinAt π•œ f f' s x v) : LineDifferentiableWithinAt π•œ f s x v := HasDerivWithinAt.differentiableWithinAt hf theorem HasLineDerivAt.lineDifferentiableAt (hf : HasLineDerivAt π•œ f f' x v) : LineDifferentiableAt π•œ f x v := HasDerivAt.differentiableAt hf theorem LineDifferentiableWithinAt.hasLineDerivWithinAt (h : LineDifferentiableWithinAt π•œ f s x v) : HasLineDerivWithinAt π•œ f (lineDerivWithin π•œ f s x v) s x v := DifferentiableWithinAt.hasDerivWithinAt h theorem LineDifferentiableAt.hasLineDerivAt (h : LineDifferentiableAt π•œ f x v) : HasLineDerivAt π•œ f (lineDeriv π•œ f x v) x v := DifferentiableAt.hasDerivAt h @[simp] lemma hasLineDerivWithinAt_univ : HasLineDerivWithinAt π•œ f f' univ x v ↔ HasLineDerivAt π•œ f f' x v := by simp only [HasLineDerivWithinAt, HasLineDerivAt, preimage_univ, hasDerivWithinAt_univ] theorem lineDerivWithin_zero_of_not_lineDifferentiableWithinAt (h : Β¬LineDifferentiableWithinAt π•œ f s x v) : lineDerivWithin π•œ f s x v = 0 := derivWithin_zero_of_not_differentiableWithinAt h theorem lineDeriv_zero_of_not_lineDifferentiableAt (h : Β¬LineDifferentiableAt π•œ f x v) : lineDeriv π•œ f x v = 0 := deriv_zero_of_not_differentiableAt h theorem hasLineDerivAt_iff_isLittleO_nhds_zero : HasLineDerivAt π•œ f f' x v ↔ (fun t : π•œ => f (x + t β€’ v) - f x - t β€’ f') =o[𝓝 0] fun t => t := by simp only [HasLineDerivAt, hasDerivAt_iff_isLittleO_nhds_zero, zero_add, zero_smul, add_zero] theorem HasLineDerivAt.unique (hβ‚€ : HasLineDerivAt π•œ f fβ‚€' x v) (h₁ : HasLineDerivAt π•œ f f₁' x v) : fβ‚€' = f₁' := HasDerivAt.unique hβ‚€ h₁ protected theorem HasLineDerivAt.lineDeriv (h : HasLineDerivAt π•œ f f' x v) : lineDeriv π•œ f x v = f' := by rw [h.unique h.lineDifferentiableAt.hasLineDerivAt]
Mathlib/Analysis/Calculus/LineDeriv/Basic.lean
160
163
theorem lineDifferentiableWithinAt_univ : LineDifferentiableWithinAt π•œ f univ x v ↔ LineDifferentiableAt π•œ f x v := by
simp only [LineDifferentiableWithinAt, LineDifferentiableAt, preimage_univ, differentiableWithinAt_univ]
1,629
import Mathlib.Analysis.Calculus.Deriv.Comp import Mathlib.Analysis.Calculus.Deriv.Add import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Slope noncomputable section open scoped Topology Filter ENNReal NNReal open Filter Asymptotics Set variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] section Module variable (π•œ) variable {E : Type*} [AddCommGroup E] [Module π•œ E] def HasLineDerivWithinAt (f : E β†’ F) (f' : F) (s : Set E) (x : E) (v : E) := HasDerivWithinAt (fun t ↦ f (x + t β€’ v)) f' ((fun t ↦ x + t β€’ v) ⁻¹' s) (0 : π•œ) def HasLineDerivAt (f : E β†’ F) (f' : F) (x : E) (v : E) := HasDerivAt (fun t ↦ f (x + t β€’ v)) f' (0 : π•œ) def LineDifferentiableWithinAt (f : E β†’ F) (s : Set E) (x : E) (v : E) : Prop := DifferentiableWithinAt π•œ (fun t ↦ f (x + t β€’ v)) ((fun t ↦ x + t β€’ v) ⁻¹' s) (0 : π•œ) def LineDifferentiableAt (f : E β†’ F) (x : E) (v : E) : Prop := DifferentiableAt π•œ (fun t ↦ f (x + t β€’ v)) (0 : π•œ) def lineDerivWithin (f : E β†’ F) (s : Set E) (x : E) (v : E) : F := derivWithin (fun t ↦ f (x + t β€’ v)) ((fun t ↦ x + t β€’ v) ⁻¹' s) (0 : π•œ) def lineDeriv (f : E β†’ F) (x : E) (v : E) : F := deriv (fun t ↦ f (x + t β€’ v)) (0 : π•œ) variable {π•œ} variable {f f₁ : E β†’ F} {f' fβ‚€' f₁' : F} {s t : Set E} {x v : E} lemma HasLineDerivWithinAt.mono (hf : HasLineDerivWithinAt π•œ f f' s x v) (hst : t βŠ† s) : HasLineDerivWithinAt π•œ f f' t x v := HasDerivWithinAt.mono hf (preimage_mono hst) lemma HasLineDerivAt.hasLineDerivWithinAt (hf : HasLineDerivAt π•œ f f' x v) (s : Set E) : HasLineDerivWithinAt π•œ f f' s x v := HasDerivAt.hasDerivWithinAt hf lemma HasLineDerivWithinAt.lineDifferentiableWithinAt (hf : HasLineDerivWithinAt π•œ f f' s x v) : LineDifferentiableWithinAt π•œ f s x v := HasDerivWithinAt.differentiableWithinAt hf theorem HasLineDerivAt.lineDifferentiableAt (hf : HasLineDerivAt π•œ f f' x v) : LineDifferentiableAt π•œ f x v := HasDerivAt.differentiableAt hf theorem LineDifferentiableWithinAt.hasLineDerivWithinAt (h : LineDifferentiableWithinAt π•œ f s x v) : HasLineDerivWithinAt π•œ f (lineDerivWithin π•œ f s x v) s x v := DifferentiableWithinAt.hasDerivWithinAt h theorem LineDifferentiableAt.hasLineDerivAt (h : LineDifferentiableAt π•œ f x v) : HasLineDerivAt π•œ f (lineDeriv π•œ f x v) x v := DifferentiableAt.hasDerivAt h @[simp] lemma hasLineDerivWithinAt_univ : HasLineDerivWithinAt π•œ f f' univ x v ↔ HasLineDerivAt π•œ f f' x v := by simp only [HasLineDerivWithinAt, HasLineDerivAt, preimage_univ, hasDerivWithinAt_univ] theorem lineDerivWithin_zero_of_not_lineDifferentiableWithinAt (h : Β¬LineDifferentiableWithinAt π•œ f s x v) : lineDerivWithin π•œ f s x v = 0 := derivWithin_zero_of_not_differentiableWithinAt h theorem lineDeriv_zero_of_not_lineDifferentiableAt (h : Β¬LineDifferentiableAt π•œ f x v) : lineDeriv π•œ f x v = 0 := deriv_zero_of_not_differentiableAt h theorem hasLineDerivAt_iff_isLittleO_nhds_zero : HasLineDerivAt π•œ f f' x v ↔ (fun t : π•œ => f (x + t β€’ v) - f x - t β€’ f') =o[𝓝 0] fun t => t := by simp only [HasLineDerivAt, hasDerivAt_iff_isLittleO_nhds_zero, zero_add, zero_smul, add_zero] theorem HasLineDerivAt.unique (hβ‚€ : HasLineDerivAt π•œ f fβ‚€' x v) (h₁ : HasLineDerivAt π•œ f f₁' x v) : fβ‚€' = f₁' := HasDerivAt.unique hβ‚€ h₁ protected theorem HasLineDerivAt.lineDeriv (h : HasLineDerivAt π•œ f f' x v) : lineDeriv π•œ f x v = f' := by rw [h.unique h.lineDifferentiableAt.hasLineDerivAt] theorem lineDifferentiableWithinAt_univ : LineDifferentiableWithinAt π•œ f univ x v ↔ LineDifferentiableAt π•œ f x v := by simp only [LineDifferentiableWithinAt, LineDifferentiableAt, preimage_univ, differentiableWithinAt_univ] theorem LineDifferentiableAt.lineDifferentiableWithinAt (h : LineDifferentiableAt π•œ f x v) : LineDifferentiableWithinAt π•œ f s x v := (differentiableWithinAt_univ.2 h).mono (subset_univ _) @[simp]
Mathlib/Analysis/Calculus/LineDeriv/Basic.lean
170
171
theorem lineDerivWithin_univ : lineDerivWithin π•œ f univ x v = lineDeriv π•œ f x v := by
simp [lineDerivWithin, lineDeriv]
1,629
import Mathlib.Analysis.Calculus.LineDeriv.Basic import Mathlib.MeasureTheory.Integral.IntegralEqImproper open MeasureTheory Measure FiniteDimensional variable {E F G W : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] [NormedAddCommGroup G] [NormedSpace ℝ G] [NormedAddCommGroup W] [NormedSpace ℝ W] [MeasurableSpace E] [BorelSpace E] {ΞΌ : Measure E} lemma integral_bilinear_hasLineDerivAt_right_eq_neg_left_of_integrable_aux1 [SigmaFinite ΞΌ] {f f' : E Γ— ℝ β†’ F} {g g' : E Γ— ℝ β†’ G} {B : F β†’L[ℝ] G β†’L[ℝ] W} (hf'g : Integrable (fun x ↦ B (f' x) (g x)) (ΞΌ.prod volume)) (hfg' : Integrable (fun x ↦ B (f x) (g' x)) (ΞΌ.prod volume)) (hfg : Integrable (fun x ↦ B (f x) (g x)) (ΞΌ.prod volume)) (hf : βˆ€ x, HasLineDerivAt ℝ f (f' x) x (0, 1)) (hg : βˆ€ x, HasLineDerivAt ℝ g (g' x) x (0, 1)) : ∫ x, B (f x) (g' x) βˆ‚(ΞΌ.prod volume) = - ∫ x, B (f' x) (g x) βˆ‚(ΞΌ.prod volume) := calc ∫ x, B (f x) (g' x) βˆ‚(ΞΌ.prod volume) = ∫ x, (∫ t, B (f (x, t)) (g' (x, t))) βˆ‚ΞΌ := integral_prod _ hfg' _ = ∫ x, (- ∫ t, B (f' (x, t)) (g (x, t))) βˆ‚ΞΌ := by apply integral_congr_ae filter_upwards [hf'g.prod_right_ae, hfg'.prod_right_ae, hfg.prod_right_ae] with x hf'gx hfg'x hfgx apply integral_bilinear_hasDerivAt_right_eq_neg_left_of_integrable ?_ ?_ hfg'x hf'gx hfgx Β· intro t convert (hf (x, t)).scomp_of_eq t ((hasDerivAt_id t).add (hasDerivAt_const t (-t))) (by simp) <;> simp Β· intro t convert (hg (x, t)).scomp_of_eq t ((hasDerivAt_id t).add (hasDerivAt_const t (-t))) (by simp) <;> simp _ = - ∫ x, B (f' x) (g x) βˆ‚(ΞΌ.prod volume) := by rw [integral_neg, integral_prod _ hf'g] lemma integral_bilinear_hasLineDerivAt_right_eq_neg_left_of_integrable_aux2 [FiniteDimensional ℝ E] {ΞΌ : Measure (E Γ— ℝ)} [IsAddHaarMeasure ΞΌ] {f f' : E Γ— ℝ β†’ F} {g g' : E Γ— ℝ β†’ G} {B : F β†’L[ℝ] G β†’L[ℝ] W} (hf'g : Integrable (fun x ↦ B (f' x) (g x)) ΞΌ) (hfg' : Integrable (fun x ↦ B (f x) (g' x)) ΞΌ) (hfg : Integrable (fun x ↦ B (f x) (g x)) ΞΌ) (hf : βˆ€ x, HasLineDerivAt ℝ f (f' x) x (0, 1)) (hg : βˆ€ x, HasLineDerivAt ℝ g (g' x) x (0, 1)) : ∫ x, B (f x) (g' x) βˆ‚ΞΌ = - ∫ x, B (f' x) (g x) βˆ‚ΞΌ := by let Ξ½ : Measure E := addHaar have A : Ξ½.prod volume = (addHaarScalarFactor (Ξ½.prod volume) ΞΌ) β€’ ΞΌ := isAddLeftInvariant_eq_smul _ _ have Hf'g : Integrable (fun x ↦ B (f' x) (g x)) (Ξ½.prod volume) := by rw [A]; exact hf'g.smul_measure_nnreal have Hfg' : Integrable (fun x ↦ B (f x) (g' x)) (Ξ½.prod volume) := by rw [A]; exact hfg'.smul_measure_nnreal have Hfg : Integrable (fun x ↦ B (f x) (g x)) (Ξ½.prod volume) := by rw [A]; exact hfg.smul_measure_nnreal rw [isAddLeftInvariant_eq_smul ΞΌ (Ξ½.prod volume)] simp [integral_bilinear_hasLineDerivAt_right_eq_neg_left_of_integrable_aux1 Hf'g Hfg' Hfg hf hg] variable [FiniteDimensional ℝ E] [IsAddHaarMeasure ΞΌ]
Mathlib/Analysis/Calculus/LineDeriv/IntegrationByParts.lean
101
151
theorem integral_bilinear_hasLineDerivAt_right_eq_neg_left_of_integrable {f f' : E β†’ F} {g g' : E β†’ G} {v : E} {B : F β†’L[ℝ] G β†’L[ℝ] W} (hf'g : Integrable (fun x ↦ B (f' x) (g x)) ΞΌ) (hfg' : Integrable (fun x ↦ B (f x) (g' x)) ΞΌ) (hfg : Integrable (fun x ↦ B (f x) (g x)) ΞΌ) (hf : βˆ€ x, HasLineDerivAt ℝ f (f' x) x v) (hg : βˆ€ x, HasLineDerivAt ℝ g (g' x) x v) : ∫ x, B (f x) (g' x) βˆ‚ΞΌ = - ∫ x, B (f' x) (g x) βˆ‚ΞΌ := by
by_cases hW : CompleteSpace W; swap Β· simp [integral, hW] rcases eq_or_ne v 0 with rfl|hv Β· have Hf' x : f' x = 0 := by simpa [(hasLineDerivAt_zero (f := f) (x := x)).lineDeriv] using (hf x).lineDeriv.symm have Hg' x : g' x = 0 := by simpa [(hasLineDerivAt_zero (f := g) (x := x)).lineDeriv] using (hg x).lineDeriv.symm simp [Hf', Hg'] have : Nontrivial E := nontrivial_iff.2 ⟨v, 0, hv⟩ let n := finrank ℝ E let E' := Fin (n - 1) β†’ ℝ obtain ⟨L, hL⟩ : βˆƒ L : E ≃L[ℝ] (E' Γ— ℝ), L v = (0, 1) := by have : finrank ℝ (E' Γ— ℝ) = n := by simpa [this, E'] using Nat.sub_add_cancel finrank_pos have Lβ‚€ : E ≃L[ℝ] (E' Γ— ℝ) := (ContinuousLinearEquiv.ofFinrankEq this).symm obtain ⟨M, hM⟩ : βˆƒ M : (E' Γ— ℝ) ≃L[ℝ] (E' Γ— ℝ), M (Lβ‚€ v) = (0, 1) := by apply SeparatingDual.exists_continuousLinearEquiv_apply_eq Β· simpa using hv Β· simp exact ⟨Lβ‚€.trans M, by simp [hM]⟩ let Ξ½ := Measure.map L ΞΌ suffices H : ∫ (x : E' Γ— ℝ), (B (f (L.symm x))) (g' (L.symm x)) βˆ‚Ξ½ = -∫ (x : E' Γ— ℝ), (B (f' (L.symm x))) (g (L.symm x)) βˆ‚Ξ½ by have : ΞΌ = Measure.map L.symm Ξ½ := by simp [Measure.map_map L.symm.continuous.measurable L.continuous.measurable] have hL : ClosedEmbedding L.symm := L.symm.toHomeomorph.closedEmbedding simpa [this, hL.integral_map] using H have L_emb : MeasurableEmbedding L := L.toHomeomorph.measurableEmbedding apply integral_bilinear_hasLineDerivAt_right_eq_neg_left_of_integrable_aux2 Β· simpa [L_emb.integrable_map_iff, Function.comp] using hf'g Β· simpa [L_emb.integrable_map_iff, Function.comp] using hfg' Β· simpa [L_emb.integrable_map_iff, Function.comp] using hfg Β· intro x have : f = (f ∘ L.symm) ∘ (L : E β†’β‚—[ℝ] (E' Γ— ℝ)) := by ext y; simp specialize hf (L.symm x) rw [this] at hf convert hf.of_comp using 1 Β· simp Β· simp [← hL] Β· intro x have : g = (g ∘ L.symm) ∘ (L : E β†’β‚—[ℝ] (E' Γ— ℝ)) := by ext y; simp specialize hg (L.symm x) rw [this] at hg convert hg.of_comp using 1 Β· simp Β· simp [← hL]
1,630
import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace import Mathlib.Analysis.LocallyConvex.Barrelled import Mathlib.Topology.Baire.CompleteMetrizable #align_import analysis.normed_space.banach_steinhaus from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set variable {E F π•œ π•œβ‚‚ : Type*} [SeminormedAddCommGroup E] [SeminormedAddCommGroup F] [NontriviallyNormedField π•œ] [NontriviallyNormedField π•œβ‚‚] [NormedSpace π•œ E] [NormedSpace π•œβ‚‚ F] {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂]
Mathlib/Analysis/NormedSpace/BanachSteinhaus.lean
34
38
theorem banach_steinhaus {ΞΉ : Type*} [CompleteSpace E] {g : ΞΉ β†’ E β†’SL[σ₁₂] F} (h : βˆ€ x, βˆƒ C, βˆ€ i, β€–g i xβ€– ≀ C) : βˆƒ C', βˆ€ i, β€–g iβ€– ≀ C' := by
rw [show (βˆƒ C, βˆ€ i, β€–g iβ€– ≀ C) ↔ _ from (NormedSpace.equicontinuous_TFAE g).out 5 2] refine (norm_withSeminorms π•œβ‚‚ F).banach_steinhaus (fun _ x ↦ ?_) simpa [bddAbove_def, forall_mem_range] using h x
1,631
import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace import Mathlib.Analysis.LocallyConvex.Barrelled import Mathlib.Topology.Baire.CompleteMetrizable #align_import analysis.normed_space.banach_steinhaus from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set variable {E F π•œ π•œβ‚‚ : Type*} [SeminormedAddCommGroup E] [SeminormedAddCommGroup F] [NontriviallyNormedField π•œ] [NontriviallyNormedField π•œβ‚‚] [NormedSpace π•œ E] [NormedSpace π•œβ‚‚ F] {σ₁₂ : π•œ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] theorem banach_steinhaus {ΞΉ : Type*} [CompleteSpace E] {g : ΞΉ β†’ E β†’SL[σ₁₂] F} (h : βˆ€ x, βˆƒ C, βˆ€ i, β€–g i xβ€– ≀ C) : βˆƒ C', βˆ€ i, β€–g iβ€– ≀ C' := by rw [show (βˆƒ C, βˆ€ i, β€–g iβ€– ≀ C) ↔ _ from (NormedSpace.equicontinuous_TFAE g).out 5 2] refine (norm_withSeminorms π•œβ‚‚ F).banach_steinhaus (fun _ x ↦ ?_) simpa [bddAbove_def, forall_mem_range] using h x #align banach_steinhaus banach_steinhaus open ENNReal open ENNReal
Mathlib/Analysis/NormedSpace/BanachSteinhaus.lean
47
51
theorem banach_steinhaus_iSup_nnnorm {ΞΉ : Type*} [CompleteSpace E] {g : ΞΉ β†’ E β†’SL[σ₁₂] F} (h : βˆ€ x, (⨆ i, ↑‖g i xβ€–β‚Š) < ∞) : (⨆ i, ↑‖g iβ€–β‚Š) < ∞ := by
rw [show ((⨆ i, ↑‖g iβ€–β‚Š) < ∞) ↔ _ from (NormedSpace.equicontinuous_TFAE g).out 8 2] refine (norm_withSeminorms π•œβ‚‚ F).banach_steinhaus (fun _ x ↦ ?_) simpa [← NNReal.bddAbove_coe, ← Set.range_comp] using ENNReal.iSup_coe_lt_top.1 (h x)
1,631
import Mathlib.Analysis.NormedSpace.Banach import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace import Mathlib.Topology.PartialHomeomorph #align_import analysis.calculus.inverse from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" open Function Set Filter Metric open scoped Topology Classical NNReal noncomputable section variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {G' : Type*} [NormedAddCommGroup G'] [NormedSpace π•œ G'] variable {Ξ΅ : ℝ} open Filter Metric Set open ContinuousLinearMap (id) def ApproximatesLinearOn (f : E β†’ F) (f' : E β†’L[π•œ] F) (s : Set E) (c : ℝβ‰₯0) : Prop := βˆ€ x ∈ s, βˆ€ y ∈ s, β€–f x - f y - f' (x - y)β€– ≀ c * β€–x - yβ€– #align approximates_linear_on ApproximatesLinearOn @[simp]
Mathlib/Analysis/Calculus/InverseFunctionTheorem/ApproximatesLinearOn.lean
76
77
theorem approximatesLinearOn_empty (f : E β†’ F) (f' : E β†’L[π•œ] F) (c : ℝβ‰₯0) : ApproximatesLinearOn f f' βˆ… c := by
simp [ApproximatesLinearOn]
1,632
import Mathlib.Analysis.NormedSpace.Banach import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace import Mathlib.Topology.PartialHomeomorph #align_import analysis.calculus.inverse from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" open Function Set Filter Metric open scoped Topology Classical NNReal noncomputable section variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {G' : Type*} [NormedAddCommGroup G'] [NormedSpace π•œ G'] variable {Ξ΅ : ℝ} open Filter Metric Set open ContinuousLinearMap (id) def ApproximatesLinearOn (f : E β†’ F) (f' : E β†’L[π•œ] F) (s : Set E) (c : ℝβ‰₯0) : Prop := βˆ€ x ∈ s, βˆ€ y ∈ s, β€–f x - f y - f' (x - y)β€– ≀ c * β€–x - yβ€– #align approximates_linear_on ApproximatesLinearOn @[simp] theorem approximatesLinearOn_empty (f : E β†’ F) (f' : E β†’L[π•œ] F) (c : ℝβ‰₯0) : ApproximatesLinearOn f f' βˆ… c := by simp [ApproximatesLinearOn] #align approximates_linear_on_empty approximatesLinearOn_empty namespace ApproximatesLinearOn variable [CompleteSpace E] {f : E β†’ F} section variable {f' : E β†’L[π•œ] F} {s t : Set E} {c c' : ℝβ‰₯0} theorem mono_num (hc : c ≀ c') (hf : ApproximatesLinearOn f f' s c) : ApproximatesLinearOn f f' s c' := fun x hx y hy => le_trans (hf x hx y hy) (mul_le_mul_of_nonneg_right hc <| norm_nonneg _) #align approximates_linear_on.mono_num ApproximatesLinearOn.mono_num theorem mono_set (hst : s βŠ† t) (hf : ApproximatesLinearOn f f' t c) : ApproximatesLinearOn f f' s c := fun x hx y hy => hf x (hst hx) y (hst hy) #align approximates_linear_on.mono_set ApproximatesLinearOn.mono_set
Mathlib/Analysis/Calculus/InverseFunctionTheorem/ApproximatesLinearOn.lean
101
105
theorem approximatesLinearOn_iff_lipschitzOnWith {f : E β†’ F} {f' : E β†’L[π•œ] F} {s : Set E} {c : ℝβ‰₯0} : ApproximatesLinearOn f f' s c ↔ LipschitzOnWith c (f - ⇑f') s := by
have : βˆ€ x y, f x - f y - f' (x - y) = (f - f') x - (f - f') y := fun x y ↦ by simp only [map_sub, Pi.sub_apply]; abel simp only [this, lipschitzOnWith_iff_norm_sub_le, ApproximatesLinearOn]
1,632
import Mathlib.Analysis.NormedSpace.Banach import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace import Mathlib.Topology.PartialHomeomorph #align_import analysis.calculus.inverse from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" open Function Set Filter Metric open scoped Topology Classical NNReal noncomputable section variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {G' : Type*} [NormedAddCommGroup G'] [NormedSpace π•œ G'] variable {Ξ΅ : ℝ} open Filter Metric Set open ContinuousLinearMap (id) def ApproximatesLinearOn (f : E β†’ F) (f' : E β†’L[π•œ] F) (s : Set E) (c : ℝβ‰₯0) : Prop := βˆ€ x ∈ s, βˆ€ y ∈ s, β€–f x - f y - f' (x - y)β€– ≀ c * β€–x - yβ€– #align approximates_linear_on ApproximatesLinearOn @[simp] theorem approximatesLinearOn_empty (f : E β†’ F) (f' : E β†’L[π•œ] F) (c : ℝβ‰₯0) : ApproximatesLinearOn f f' βˆ… c := by simp [ApproximatesLinearOn] #align approximates_linear_on_empty approximatesLinearOn_empty namespace ApproximatesLinearOn variable [CompleteSpace E] {f : E β†’ F} section variable {f' : E β†’L[π•œ] F} {s t : Set E} {c c' : ℝβ‰₯0} theorem mono_num (hc : c ≀ c') (hf : ApproximatesLinearOn f f' s c) : ApproximatesLinearOn f f' s c' := fun x hx y hy => le_trans (hf x hx y hy) (mul_le_mul_of_nonneg_right hc <| norm_nonneg _) #align approximates_linear_on.mono_num ApproximatesLinearOn.mono_num theorem mono_set (hst : s βŠ† t) (hf : ApproximatesLinearOn f f' t c) : ApproximatesLinearOn f f' s c := fun x hx y hy => hf x (hst hx) y (hst hy) #align approximates_linear_on.mono_set ApproximatesLinearOn.mono_set theorem approximatesLinearOn_iff_lipschitzOnWith {f : E β†’ F} {f' : E β†’L[π•œ] F} {s : Set E} {c : ℝβ‰₯0} : ApproximatesLinearOn f f' s c ↔ LipschitzOnWith c (f - ⇑f') s := by have : βˆ€ x y, f x - f y - f' (x - y) = (f - f') x - (f - f') y := fun x y ↦ by simp only [map_sub, Pi.sub_apply]; abel simp only [this, lipschitzOnWith_iff_norm_sub_le, ApproximatesLinearOn] #align approximates_linear_on.approximates_linear_on_iff_lipschitz_on_with ApproximatesLinearOn.approximatesLinearOn_iff_lipschitzOnWith alias ⟨lipschitzOnWith, _root_.LipschitzOnWith.approximatesLinearOn⟩ := approximatesLinearOn_iff_lipschitzOnWith #align approximates_linear_on.lipschitz_on_with ApproximatesLinearOn.lipschitzOnWith #align lipschitz_on_with.approximates_linear_on LipschitzOnWith.approximatesLinearOn theorem lipschitz_sub (hf : ApproximatesLinearOn f f' s c) : LipschitzWith c fun x : s => f x - f' x := hf.lipschitzOnWith.to_restrict #align approximates_linear_on.lipschitz_sub ApproximatesLinearOn.lipschitz_sub protected theorem lipschitz (hf : ApproximatesLinearOn f f' s c) : LipschitzWith (β€–f'β€–β‚Š + c) (s.restrict f) := by simpa only [restrict_apply, add_sub_cancel] using (f'.lipschitz.restrict s).add hf.lipschitz_sub #align approximates_linear_on.lipschitz ApproximatesLinearOn.lipschitz protected theorem continuous (hf : ApproximatesLinearOn f f' s c) : Continuous (s.restrict f) := hf.lipschitz.continuous #align approximates_linear_on.continuous ApproximatesLinearOn.continuous protected theorem continuousOn (hf : ApproximatesLinearOn f f' s c) : ContinuousOn f s := continuousOn_iff_continuous_restrict.2 hf.continuous #align approximates_linear_on.continuous_on ApproximatesLinearOn.continuousOn end section LocallyOnto variable {s : Set E} {c : ℝβ‰₯0} {f' : E β†’L[π•œ] F}
Mathlib/Analysis/Calculus/InverseFunctionTheorem/ApproximatesLinearOn.lean
148
280
theorem surjOn_closedBall_of_nonlinearRightInverse (hf : ApproximatesLinearOn f f' s c) (f'symm : f'.NonlinearRightInverse) {Ξ΅ : ℝ} {b : E} (Ξ΅0 : 0 ≀ Ξ΅) (hΞ΅ : closedBall b Ξ΅ βŠ† s) : SurjOn f (closedBall b Ξ΅) (closedBall (f b) (((f'symm.nnnorm : ℝ)⁻¹ - c) * Ξ΅)) := by
intro y hy rcases le_or_lt (f'symm.nnnorm : ℝ)⁻¹ c with hc | hc Β· refine ⟨b, by simp [Ξ΅0], ?_⟩ have : dist y (f b) ≀ 0 := (mem_closedBall.1 hy).trans (mul_nonpos_of_nonpos_of_nonneg (by linarith) Ξ΅0) simp only [dist_le_zero] at this rw [this] have If' : (0 : ℝ) < f'symm.nnnorm := by rw [← inv_pos]; exact (NNReal.coe_nonneg _).trans_lt hc have Icf' : (c : ℝ) * f'symm.nnnorm < 1 := by rwa [inv_eq_one_div, lt_div_iff If'] at hc have Jf' : (f'symm.nnnorm : ℝ) β‰  0 := ne_of_gt If' have Jcf' : (1 : ℝ) - c * f'symm.nnnorm β‰  0 := by apply ne_of_gt; linarith /- We have to show that `y` can be written as `f x` for some `x ∈ closedBall b Ξ΅`. The idea of the proof is to apply the Banach contraction principle to the map `g : x ↦ x + f'symm (y - f x)`, as a fixed point of this map satisfies `f x = y`. When `f'symm` is a genuine linear inverse, `g` is a contracting map. In our case, since `f'symm` is nonlinear, this map is not contracting (it is not even continuous), but still the proof of the contraction theorem holds: `uβ‚™ = gⁿ b` is a Cauchy sequence, converging exponentially fast to the desired point `x`. Instead of appealing to general results, we check this by hand. The main point is that `f (u n)` becomes exponentially close to `y`, and therefore `dist (u (n+1)) (u n)` becomes exponentally small, making it possible to get an inductive bound on `dist (u n) b`, from which one checks that `u n` stays in the ball on which one has a control. Therefore, the bound can be checked at the next step, and so on inductively. -/ set g := fun x => x + f'symm (y - f x) with hg set u := fun n : β„• => g^[n] b with hu have usucc : βˆ€ n, u (n + 1) = g (u n) := by simp [hu, ← iterate_succ_apply' g _ b] -- First bound: if `f z` is close to `y`, then `g z` is close to `z` (i.e., almost a fixed point). have A : βˆ€ z, dist (g z) z ≀ f'symm.nnnorm * dist (f z) y := by intro z rw [dist_eq_norm, hg, add_sub_cancel_left, dist_eq_norm'] exact f'symm.bound _ -- Second bound: if `z` and `g z` are in the set with good control, then `f (g z)` becomes closer -- to `y` than `f z` was (this uses the linear approximation property, and is the reason for the -- choice of the formula for `g`). have B : βˆ€ z ∈ closedBall b Ξ΅, g z ∈ closedBall b Ξ΅ β†’ dist (f (g z)) y ≀ c * f'symm.nnnorm * dist (f z) y := by intro z hz hgz set v := f'symm (y - f z) calc dist (f (g z)) y = β€–f (z + v) - yβ€– := by rw [dist_eq_norm] _ = β€–f (z + v) - f z - f' v + f' v - (y - f z)β€– := by congr 1; abel _ = β€–f (z + v) - f z - f' (z + v - z)β€– := by simp only [v, ContinuousLinearMap.NonlinearRightInverse.right_inv, add_sub_cancel_left, sub_add_cancel] _ ≀ c * β€–z + v - zβ€– := hf _ (hΞ΅ hgz) _ (hΞ΅ hz) _ ≀ c * (f'symm.nnnorm * dist (f z) y) := by gcongr simpa [dist_eq_norm'] using f'symm.bound (y - f z) _ = c * f'symm.nnnorm * dist (f z) y := by ring -- Third bound: a complicated bound on `dist w b` (that will show up in the induction) is enough -- to check that `w` is in the ball on which one has controls. Will be used to check that `u n` -- belongs to this ball for all `n`. have C : βˆ€ (n : β„•) (w : E), dist w b ≀ f'symm.nnnorm * (1 - ((c : ℝ) * f'symm.nnnorm) ^ n) / (1 - c * f'symm.nnnorm) * dist (f b) y β†’ w ∈ closedBall b Ξ΅ := fun n w hw ↦ by apply hw.trans rw [div_mul_eq_mul_div, div_le_iff]; swap; Β· linarith calc (f'symm.nnnorm : ℝ) * (1 - ((c : ℝ) * f'symm.nnnorm) ^ n) * dist (f b) y = f'symm.nnnorm * dist (f b) y * (1 - ((c : ℝ) * f'symm.nnnorm) ^ n) := by ring _ ≀ f'symm.nnnorm * dist (f b) y * 1 := by gcongr rw [sub_le_self_iff] positivity _ ≀ f'symm.nnnorm * (((f'symm.nnnorm : ℝ)⁻¹ - c) * Ξ΅) := by rw [mul_one] gcongr exact mem_closedBall'.1 hy _ = Ξ΅ * (1 - c * f'symm.nnnorm) := by field_simp; ring /- Main inductive control: `f (u n)` becomes exponentially close to `y`, and therefore `dist (u (n+1)) (u n)` becomes exponentally small, making it possible to get an inductive bound on `dist (u n) b`, from which one checks that `u n` remains in the ball on which we have estimates. -/ have D : βˆ€ n : β„•, dist (f (u n)) y ≀ ((c : ℝ) * f'symm.nnnorm) ^ n * dist (f b) y ∧ dist (u n) b ≀ f'symm.nnnorm * (1 - ((c : ℝ) * f'symm.nnnorm) ^ n) / (1 - (c : ℝ) * f'symm.nnnorm) * dist (f b) y := fun n ↦ by induction' n with n IH; Β· simp [hu, le_refl] rw [usucc] have Ign : dist (g (u n)) b ≀ f'symm.nnnorm * (1 - ((c : ℝ) * f'symm.nnnorm) ^ n.succ) / (1 - c * f'symm.nnnorm) * dist (f b) y := calc dist (g (u n)) b ≀ dist (g (u n)) (u n) + dist (u n) b := dist_triangle _ _ _ _ ≀ f'symm.nnnorm * dist (f (u n)) y + dist (u n) b := add_le_add (A _) le_rfl _ ≀ f'symm.nnnorm * (((c : ℝ) * f'symm.nnnorm) ^ n * dist (f b) y) + f'symm.nnnorm * (1 - ((c : ℝ) * f'symm.nnnorm) ^ n) / (1 - c * f'symm.nnnorm) * dist (f b) y := by gcongr Β· exact IH.1 Β· exact IH.2 _ = f'symm.nnnorm * (1 - ((c : ℝ) * f'symm.nnnorm) ^ n.succ) / (1 - (c : ℝ) * f'symm.nnnorm) * dist (f b) y := by field_simp [Jcf', pow_succ]; ring refine ⟨?_, Ign⟩ calc dist (f (g (u n))) y ≀ c * f'symm.nnnorm * dist (f (u n)) y := B _ (C n _ IH.2) (C n.succ _ Ign) _ ≀ (c : ℝ) * f'symm.nnnorm * (((c : ℝ) * f'symm.nnnorm) ^ n * dist (f b) y) := by gcongr apply IH.1 _ = ((c : ℝ) * f'symm.nnnorm) ^ n.succ * dist (f b) y := by simp only [pow_succ']; ring -- Deduce from the inductive bound that `uβ‚™` is a Cauchy sequence, therefore converging. have : CauchySeq u := by refine cauchySeq_of_le_geometric _ (↑f'symm.nnnorm * dist (f b) y) Icf' fun n ↦ ?_ calc dist (u n) (u (n + 1)) = dist (g (u n)) (u n) := by rw [usucc, dist_comm] _ ≀ f'symm.nnnorm * dist (f (u n)) y := A _ _ ≀ f'symm.nnnorm * (((c : ℝ) * f'symm.nnnorm) ^ n * dist (f b) y) := by gcongr exact (D n).1 _ = f'symm.nnnorm * dist (f b) y * ((c : ℝ) * f'symm.nnnorm) ^ n := by ring obtain ⟨x, hx⟩ : βˆƒ x, Tendsto u atTop (𝓝 x) := cauchySeq_tendsto_of_complete this -- As all the `uβ‚™` belong to the ball `closedBall b Ξ΅`, so does their limit `x`. have xmem : x ∈ closedBall b Ξ΅ := isClosed_ball.mem_of_tendsto hx (eventually_of_forall fun n => C n _ (D n).2) refine ⟨x, xmem, ?_⟩ -- It remains to check that `f x = y`. This follows from continuity of `f` on `closedBall b Ξ΅` -- and from the fact that `f uβ‚™` is converging to `y` by construction. have hx' : Tendsto u atTop (𝓝[closedBall b Ξ΅] x) := by simp only [nhdsWithin, tendsto_inf, hx, true_and_iff, ge_iff_le, tendsto_principal] exact eventually_of_forall fun n => C n _ (D n).2 have T1 : Tendsto (f ∘ u) atTop (𝓝 (f x)) := (hf.continuousOn.mono hΞ΅ x xmem).tendsto.comp hx' have T2 : Tendsto (f ∘ u) atTop (𝓝 y) := by rw [tendsto_iff_dist_tendsto_zero] refine squeeze_zero (fun _ => dist_nonneg) (fun n => (D n).1) ?_ simpa using (tendsto_pow_atTop_nhds_zero_of_lt_one (by positivity) Icf').mul tendsto_const_nhds exact tendsto_nhds_unique T1 T2
1,632
import Mathlib.Analysis.Calculus.FDeriv.Equiv import Mathlib.Analysis.Calculus.InverseFunctionTheorem.ApproximatesLinearOn #align_import analysis.calculus.inverse from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" open Function Set Filter Metric open scoped Topology Classical NNReal noncomputable section variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {G' : Type*} [NormedAddCommGroup G'] [NormedSpace π•œ G'] variable {Ξ΅ : ℝ} open Asymptotics Filter Metric Set open ContinuousLinearMap (id) namespace HasStrictFDerivAt
Mathlib/Analysis/Calculus/InverseFunctionTheorem/FDeriv.lean
74
83
theorem approximates_deriv_on_nhds {f : E β†’ F} {f' : E β†’L[π•œ] F} {a : E} (hf : HasStrictFDerivAt f f' a) {c : ℝβ‰₯0} (hc : Subsingleton E ∨ 0 < c) : βˆƒ s ∈ 𝓝 a, ApproximatesLinearOn f f' s c := by
cases' hc with hE hc · refine ⟨univ, IsOpen.mem_nhds isOpen_univ trivial, fun x _ y _ => ?_⟩ simp [@Subsingleton.elim E hE x y] have := hf.def hc rw [nhds_prod_eq, Filter.Eventually, mem_prod_same_iff] at this rcases this with ⟨s, has, hs⟩ exact ⟨s, has, fun x hx y hy => hs (mk_mem_prod hx hy)⟩
1,633
import Mathlib.Analysis.Calculus.FDeriv.Equiv import Mathlib.Analysis.Calculus.InverseFunctionTheorem.ApproximatesLinearOn #align_import analysis.calculus.inverse from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" open Function Set Filter Metric open scoped Topology Classical NNReal noncomputable section variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {G' : Type*} [NormedAddCommGroup G'] [NormedSpace π•œ G'] variable {Ξ΅ : ℝ} open Asymptotics Filter Metric Set open ContinuousLinearMap (id) namespace HasStrictFDerivAt theorem approximates_deriv_on_nhds {f : E β†’ F} {f' : E β†’L[π•œ] F} {a : E} (hf : HasStrictFDerivAt f f' a) {c : ℝβ‰₯0} (hc : Subsingleton E ∨ 0 < c) : βˆƒ s ∈ 𝓝 a, ApproximatesLinearOn f f' s c := by cases' hc with hE hc Β· refine ⟨univ, IsOpen.mem_nhds isOpen_univ trivial, fun x _ y _ => ?_⟩ simp [@Subsingleton.elim E hE x y] have := hf.def hc rw [nhds_prod_eq, Filter.Eventually, mem_prod_same_iff] at this rcases this with ⟨s, has, hs⟩ exact ⟨s, has, fun x hx y hy => hs (mk_mem_prod hx hy)⟩ #align has_strict_fderiv_at.approximates_deriv_on_nhds HasStrictFDerivAt.approximates_deriv_on_nhds
Mathlib/Analysis/Calculus/InverseFunctionTheorem/FDeriv.lean
86
96
theorem map_nhds_eq_of_surj [CompleteSpace E] [CompleteSpace F] {f : E β†’ F} {f' : E β†’L[π•œ] F} {a : E} (hf : HasStrictFDerivAt f (f' : E β†’L[π•œ] F) a) (h : LinearMap.range f' = ⊀) : map f (𝓝 a) = 𝓝 (f a) := by
let f'symm := f'.nonlinearRightInverseOfSurjective h set c : ℝβ‰₯0 := f'symm.nnnorm⁻¹ / 2 with hc have f'symm_pos : 0 < f'symm.nnnorm := f'.nonlinearRightInverseOfSurjective_nnnorm_pos h have cpos : 0 < c := by simp [hc, half_pos, inv_pos, f'symm_pos] obtain ⟨s, s_nhds, hs⟩ : βˆƒ s ∈ 𝓝 a, ApproximatesLinearOn f f' s c := hf.approximates_deriv_on_nhds (Or.inr cpos) apply hs.map_nhds_eq f'symm s_nhds (Or.inr (NNReal.half_lt_self _)) simp [ne_of_gt f'symm_pos]
1,633
import Mathlib.Analysis.Calculus.FDeriv.Equiv import Mathlib.Analysis.Calculus.InverseFunctionTheorem.ApproximatesLinearOn #align_import analysis.calculus.inverse from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" open Function Set Filter Metric open scoped Topology Classical NNReal noncomputable section variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {G' : Type*} [NormedAddCommGroup G'] [NormedSpace π•œ G'] variable {Ξ΅ : ℝ} open Asymptotics Filter Metric Set open ContinuousLinearMap (id) namespace HasStrictFDerivAt theorem approximates_deriv_on_nhds {f : E β†’ F} {f' : E β†’L[π•œ] F} {a : E} (hf : HasStrictFDerivAt f f' a) {c : ℝβ‰₯0} (hc : Subsingleton E ∨ 0 < c) : βˆƒ s ∈ 𝓝 a, ApproximatesLinearOn f f' s c := by cases' hc with hE hc Β· refine ⟨univ, IsOpen.mem_nhds isOpen_univ trivial, fun x _ y _ => ?_⟩ simp [@Subsingleton.elim E hE x y] have := hf.def hc rw [nhds_prod_eq, Filter.Eventually, mem_prod_same_iff] at this rcases this with ⟨s, has, hs⟩ exact ⟨s, has, fun x hx y hy => hs (mk_mem_prod hx hy)⟩ #align has_strict_fderiv_at.approximates_deriv_on_nhds HasStrictFDerivAt.approximates_deriv_on_nhds theorem map_nhds_eq_of_surj [CompleteSpace E] [CompleteSpace F] {f : E β†’ F} {f' : E β†’L[π•œ] F} {a : E} (hf : HasStrictFDerivAt f (f' : E β†’L[π•œ] F) a) (h : LinearMap.range f' = ⊀) : map f (𝓝 a) = 𝓝 (f a) := by let f'symm := f'.nonlinearRightInverseOfSurjective h set c : ℝβ‰₯0 := f'symm.nnnorm⁻¹ / 2 with hc have f'symm_pos : 0 < f'symm.nnnorm := f'.nonlinearRightInverseOfSurjective_nnnorm_pos h have cpos : 0 < c := by simp [hc, half_pos, inv_pos, f'symm_pos] obtain ⟨s, s_nhds, hs⟩ : βˆƒ s ∈ 𝓝 a, ApproximatesLinearOn f f' s c := hf.approximates_deriv_on_nhds (Or.inr cpos) apply hs.map_nhds_eq f'symm s_nhds (Or.inr (NNReal.half_lt_self _)) simp [ne_of_gt f'symm_pos] #align has_strict_fderiv_at.map_nhds_eq_of_surj HasStrictFDerivAt.map_nhds_eq_of_surj variable [CompleteSpace E] {f : E β†’ F} {f' : E ≃L[π•œ] F} {a : E}
Mathlib/Analysis/Calculus/InverseFunctionTheorem/FDeriv.lean
101
108
theorem approximates_deriv_on_open_nhds (hf : HasStrictFDerivAt f (f' : E β†’L[π•œ] F) a) : βˆƒ s : Set E, a ∈ s ∧ IsOpen s ∧ ApproximatesLinearOn f (f' : E β†’L[π•œ] F) s (β€–(f'.symm : F β†’L[π•œ] E)β€–β‚Šβ»ΒΉ / 2) := by
simp only [← and_assoc] refine ((nhds_basis_opens a).exists_iff fun s t => ApproximatesLinearOn.mono_set).1 ?_ exact hf.approximates_deriv_on_nhds <| f'.subsingleton_or_nnnorm_symm_pos.imp id fun hf' => half_pos <| inv_pos.2 hf'
1,633
import Mathlib.Algebra.CharP.Invertible import Mathlib.Analysis.NormedSpace.LinearIsometry import Mathlib.Analysis.Normed.Group.AddTorsor import Mathlib.Analysis.NormedSpace.Basic import Mathlib.LinearAlgebra.AffineSpace.Restrict import Mathlib.Tactic.FailIfNoProgress #align_import analysis.normed_space.affine_isometry from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open Function Set variable (π•œ : Type*) {V V₁ V₁' Vβ‚‚ V₃ Vβ‚„ : Type*} {P₁ P₁' : Type*} (P Pβ‚‚ : Type*) {P₃ Pβ‚„ : Type*} [NormedField π•œ] [SeminormedAddCommGroup V] [NormedSpace π•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] [SeminormedAddCommGroup V₁] [NormedSpace π•œ V₁] [PseudoMetricSpace P₁] [NormedAddTorsor V₁ P₁] [SeminormedAddCommGroup V₁'] [NormedSpace π•œ V₁'] [MetricSpace P₁'] [NormedAddTorsor V₁' P₁'] [SeminormedAddCommGroup Vβ‚‚] [NormedSpace π•œ Vβ‚‚] [PseudoMetricSpace Pβ‚‚] [NormedAddTorsor Vβ‚‚ Pβ‚‚] [SeminormedAddCommGroup V₃] [NormedSpace π•œ V₃] [PseudoMetricSpace P₃] [NormedAddTorsor V₃ P₃] [SeminormedAddCommGroup Vβ‚„] [NormedSpace π•œ Vβ‚„] [PseudoMetricSpace Pβ‚„] [NormedAddTorsor Vβ‚„ Pβ‚„] structure AffineIsometry extends P →ᡃ[π•œ] Pβ‚‚ where norm_map : βˆ€ x : V, β€–linear xβ€– = β€–xβ€– #align affine_isometry AffineIsometry variable {π•œ P Pβ‚‚} @[inherit_doc] notation:25 -- `→ᡃᡒ` would be more consistent with the linear isometry notation, but it is uglier P " →ᡃⁱ[" π•œ:25 "] " Pβ‚‚:0 => AffineIsometry π•œ P Pβ‚‚ namespace AffineIsometry variable (f : P →ᡃⁱ[π•œ] Pβ‚‚) protected def linearIsometry : V β†’β‚—α΅’[π•œ] Vβ‚‚ := { f.linear with norm_map' := f.norm_map } #align affine_isometry.linear_isometry AffineIsometry.linearIsometry @[simp]
Mathlib/Analysis/NormedSpace/AffineIsometry.lean
72
74
theorem linear_eq_linearIsometry : f.linear = f.linearIsometry.toLinearMap := by
ext rfl
1,634
import Mathlib.Algebra.CharP.Invertible import Mathlib.Analysis.NormedSpace.LinearIsometry import Mathlib.Analysis.Normed.Group.AddTorsor import Mathlib.Analysis.NormedSpace.Basic import Mathlib.LinearAlgebra.AffineSpace.Restrict import Mathlib.Tactic.FailIfNoProgress #align_import analysis.normed_space.affine_isometry from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open Function Set variable (π•œ : Type*) {V V₁ V₁' Vβ‚‚ V₃ Vβ‚„ : Type*} {P₁ P₁' : Type*} (P Pβ‚‚ : Type*) {P₃ Pβ‚„ : Type*} [NormedField π•œ] [SeminormedAddCommGroup V] [NormedSpace π•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] [SeminormedAddCommGroup V₁] [NormedSpace π•œ V₁] [PseudoMetricSpace P₁] [NormedAddTorsor V₁ P₁] [SeminormedAddCommGroup V₁'] [NormedSpace π•œ V₁'] [MetricSpace P₁'] [NormedAddTorsor V₁' P₁'] [SeminormedAddCommGroup Vβ‚‚] [NormedSpace π•œ Vβ‚‚] [PseudoMetricSpace Pβ‚‚] [NormedAddTorsor Vβ‚‚ Pβ‚‚] [SeminormedAddCommGroup V₃] [NormedSpace π•œ V₃] [PseudoMetricSpace P₃] [NormedAddTorsor V₃ P₃] [SeminormedAddCommGroup Vβ‚„] [NormedSpace π•œ Vβ‚„] [PseudoMetricSpace Pβ‚„] [NormedAddTorsor Vβ‚„ Pβ‚„] structure AffineIsometry extends P →ᡃ[π•œ] Pβ‚‚ where norm_map : βˆ€ x : V, β€–linear xβ€– = β€–xβ€– #align affine_isometry AffineIsometry variable {π•œ P Pβ‚‚} @[inherit_doc] notation:25 -- `→ᡃᡒ` would be more consistent with the linear isometry notation, but it is uglier P " →ᡃⁱ[" π•œ:25 "] " Pβ‚‚:0 => AffineIsometry π•œ P Pβ‚‚ namespace AffineIsometry variable (f : P →ᡃⁱ[π•œ] Pβ‚‚) protected def linearIsometry : V β†’β‚—α΅’[π•œ] Vβ‚‚ := { f.linear with norm_map' := f.norm_map } #align affine_isometry.linear_isometry AffineIsometry.linearIsometry @[simp] theorem linear_eq_linearIsometry : f.linear = f.linearIsometry.toLinearMap := by ext rfl #align affine_isometry.linear_eq_linear_isometry AffineIsometry.linear_eq_linearIsometry instance : FunLike (P →ᡃⁱ[π•œ] Pβ‚‚) P Pβ‚‚ := { coe := fun f => f.toFun, coe_injective' := fun f g => by cases f; cases g; simp } @[simp]
Mathlib/Analysis/NormedSpace/AffineIsometry.lean
82
83
theorem coe_toAffineMap : ⇑f.toAffineMap = f := by
rfl
1,634
import Mathlib.Algebra.CharP.Invertible import Mathlib.Analysis.NormedSpace.LinearIsometry import Mathlib.Analysis.Normed.Group.AddTorsor import Mathlib.Analysis.NormedSpace.Basic import Mathlib.LinearAlgebra.AffineSpace.Restrict import Mathlib.Tactic.FailIfNoProgress #align_import analysis.normed_space.affine_isometry from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open Function Set variable (π•œ : Type*) {V V₁ V₁' Vβ‚‚ V₃ Vβ‚„ : Type*} {P₁ P₁' : Type*} (P Pβ‚‚ : Type*) {P₃ Pβ‚„ : Type*} [NormedField π•œ] [SeminormedAddCommGroup V] [NormedSpace π•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] [SeminormedAddCommGroup V₁] [NormedSpace π•œ V₁] [PseudoMetricSpace P₁] [NormedAddTorsor V₁ P₁] [SeminormedAddCommGroup V₁'] [NormedSpace π•œ V₁'] [MetricSpace P₁'] [NormedAddTorsor V₁' P₁'] [SeminormedAddCommGroup Vβ‚‚] [NormedSpace π•œ Vβ‚‚] [PseudoMetricSpace Pβ‚‚] [NormedAddTorsor Vβ‚‚ Pβ‚‚] [SeminormedAddCommGroup V₃] [NormedSpace π•œ V₃] [PseudoMetricSpace P₃] [NormedAddTorsor V₃ P₃] [SeminormedAddCommGroup Vβ‚„] [NormedSpace π•œ Vβ‚„] [PseudoMetricSpace Pβ‚„] [NormedAddTorsor Vβ‚„ Pβ‚„] structure AffineIsometry extends P →ᡃ[π•œ] Pβ‚‚ where norm_map : βˆ€ x : V, β€–linear xβ€– = β€–xβ€– #align affine_isometry AffineIsometry variable {π•œ P Pβ‚‚} @[inherit_doc] notation:25 -- `→ᡃᡒ` would be more consistent with the linear isometry notation, but it is uglier P " →ᡃⁱ[" π•œ:25 "] " Pβ‚‚:0 => AffineIsometry π•œ P Pβ‚‚ namespace AffineIsometry variable (f : P →ᡃⁱ[π•œ] Pβ‚‚) protected def linearIsometry : V β†’β‚—α΅’[π•œ] Vβ‚‚ := { f.linear with norm_map' := f.norm_map } #align affine_isometry.linear_isometry AffineIsometry.linearIsometry @[simp] theorem linear_eq_linearIsometry : f.linear = f.linearIsometry.toLinearMap := by ext rfl #align affine_isometry.linear_eq_linear_isometry AffineIsometry.linear_eq_linearIsometry instance : FunLike (P →ᡃⁱ[π•œ] Pβ‚‚) P Pβ‚‚ := { coe := fun f => f.toFun, coe_injective' := fun f g => by cases f; cases g; simp } @[simp] theorem coe_toAffineMap : ⇑f.toAffineMap = f := by rfl #align affine_isometry.coe_to_affine_map AffineIsometry.coe_toAffineMap
Mathlib/Analysis/NormedSpace/AffineIsometry.lean
86
88
theorem toAffineMap_injective : Injective (toAffineMap : (P →ᡃⁱ[π•œ] Pβ‚‚) β†’ P →ᡃ[π•œ] Pβ‚‚) := by
rintro ⟨f, _⟩ ⟨g, _⟩ rfl rfl
1,634