Skip to content

Commit 54c954e

Browse files
committed
refactor(fderiv): redefine fderivWithin and fderiv (#19694)
Prefer `0` answer whenever it's possible. This way, `fderivWithin_const` is true without extra assumptions.
1 parent fdbd2e1 commit 54c954e

File tree

6 files changed

+77
-119
lines changed

6 files changed

+77
-119
lines changed

Mathlib/Analysis/Calculus/ContDiff/Basic.lean

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,26 @@ variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
5454

5555
/-! ### Constants -/
5656

57+
theorem iteratedFDerivWithin_succ_const (n : ℕ) (c : F) :
58+
iteratedFDerivWithin 𝕜 (n + 1) (fun _ : E ↦ c) s = 0 := by
59+
induction n with
60+
| zero =>
61+
ext1
62+
simp [iteratedFDerivWithin_succ_eq_comp_left, iteratedFDerivWithin_zero_eq_comp, comp_def]
63+
| succ n IH =>
64+
rw [iteratedFDerivWithin_succ_eq_comp_left, IH]
65+
simp only [Pi.zero_def, comp_def, fderivWithin_const, map_zero]
66+
5767
@[simp]
58-
theorem iteratedFDerivWithin_zero_fun (hs : UniqueDiffOn 𝕜 s) (hx : x ∈ s) {i : ℕ} :
59-
iteratedFDerivWithin 𝕜 i (fun _ : E ↦ (0 : F)) s x = 0 := by
60-
induction i generalizing x with
68+
theorem iteratedFDerivWithin_zero_fun {i : ℕ} :
69+
iteratedFDerivWithin 𝕜 i (fun _ : E ↦ (0 : F)) s = 0 := by
70+
cases i with
6171
| zero => ext; simp
62-
| succ i IH =>
63-
ext m
64-
rw [iteratedFDerivWithin_succ_apply_left, fderivWithin_congr (fun _ ↦ IH) (IH hx)]
65-
rw [fderivWithin_const_apply _ (hs x hx)]
66-
rfl
72+
| succ i => apply iteratedFDerivWithin_succ_const
6773

6874
@[simp]
6975
theorem iteratedFDeriv_zero_fun {n : ℕ} : (iteratedFDeriv 𝕜 n fun _ : E ↦ (0 : F)) = 0 :=
70-
funext fun x ↦ by simpa [← iteratedFDerivWithin_univ] using
71-
iteratedFDerivWithin_zero_fun uniqueDiffOn_univ (mem_univ x)
76+
funext fun x ↦ by simp only [← iteratedFDerivWithin_univ, iteratedFDerivWithin_zero_fun]
7277

7378
theorem contDiff_zero_fun : ContDiff 𝕜 n fun _ : E => (0 : F) :=
7479
analyticOnNhd_const.contDiff
@@ -103,30 +108,19 @@ theorem contDiffWithinAt_of_subsingleton [Subsingleton F] : ContDiffWithinAt
103108
theorem contDiffOn_of_subsingleton [Subsingleton F] : ContDiffOn 𝕜 n f s := by
104109
rw [Subsingleton.elim f fun _ => 0]; exact contDiffOn_const
105110

106-
theorem iteratedFDerivWithin_succ_const (n : ℕ) (c : F) (hs : UniqueDiffOn 𝕜 s) (hx : x ∈ s) :
107-
iteratedFDerivWithin 𝕜 (n + 1) (fun _ : E ↦ c) s x = 0 := by
108-
ext m
109-
rw [iteratedFDerivWithin_succ_apply_right hs hx]
110-
rw [iteratedFDerivWithin_congr (fun y hy ↦ fderivWithin_const_apply c (hs y hy)) hx]
111-
rw [iteratedFDerivWithin_zero_fun hs hx]
112-
simp [ContinuousMultilinearMap.zero_apply (R := 𝕜)]
113-
114-
theorem iteratedFDeriv_succ_const (n : ℕ) (c : F) :
115-
(iteratedFDeriv 𝕜 (n + 1) fun _ : E ↦ c) = 0 :=
116-
funext fun x ↦ by simpa [← iteratedFDerivWithin_univ] using
117-
iteratedFDerivWithin_succ_const n c uniqueDiffOn_univ (mem_univ x)
118-
119-
theorem iteratedFDerivWithin_const_of_ne {n : ℕ} (hn : n ≠ 0) (c : F)
120-
(hs : UniqueDiffOn 𝕜 s) (hx : x ∈ s) :
121-
iteratedFDerivWithin 𝕜 n (fun _ : E ↦ c) s x = 0 := by
111+
theorem iteratedFDerivWithin_const_of_ne {n : ℕ} (hn : n ≠ 0) (c : F) (s : Set E) :
112+
iteratedFDerivWithin 𝕜 n (fun _ : E ↦ c) s = 0 := by
122113
cases n with
123114
| zero => contradiction
124-
| succ n => exact iteratedFDerivWithin_succ_const n c hs hx
115+
| succ n => exact iteratedFDerivWithin_succ_const n c
125116

126117
theorem iteratedFDeriv_const_of_ne {n : ℕ} (hn : n ≠ 0) (c : F) :
127-
(iteratedFDeriv 𝕜 n fun _ : E ↦ c) = 0 :=
128-
funext fun x ↦ by simpa [← iteratedFDerivWithin_univ] using
129-
iteratedFDerivWithin_const_of_ne hn c uniqueDiffOn_univ (mem_univ x)
118+
(iteratedFDeriv 𝕜 n fun _ : E ↦ c) = 0 := by
119+
simp only [← iteratedFDerivWithin_univ, iteratedFDerivWithin_const_of_ne hn]
120+
121+
theorem iteratedFDeriv_succ_const (n : ℕ) (c : F) :
122+
(iteratedFDeriv 𝕜 (n + 1) fun _ : E ↦ c) = 0 :=
123+
iteratedFDeriv_const_of_ne (by simp) _
130124

131125
theorem contDiffWithinAt_singleton : ContDiffWithinAt 𝕜 n f {x} x :=
132126
(contDiffWithinAt_const (c := f x)).congr (by simp) rfl
@@ -946,7 +940,7 @@ theorem iteratedFDerivWithin_clm_apply_const_apply
946940
rw [fderivWithin_congr' (fun x hx ↦ ih hi.le hx) hx]
947941
rw [fderivWithin_clm_apply (hs x hx) (h_deriv.continuousMultilinear_apply_const _ x hx)
948942
(differentiableWithinAt_const u)]
949-
rw [fderivWithin_const_apply _ (hs x hx)]
943+
rw [fderivWithin_const_apply]
950944
simp only [ContinuousLinearMap.flip_apply, ContinuousLinearMap.comp_zero, zero_add]
951945
rw [fderivWithin_continuousMultilinear_apply_const_apply (hs x hx) (h_deriv x hx)]
952946

Mathlib/Analysis/Calculus/ContDiff/Bounds.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ theorem norm_iteratedFDerivWithin_prod_le [DecidableEq ι] [NormOneClass A'] {u
296296
| empty =>
297297
cases n with
298298
| zero => simp [Sym.eq_nil_of_card_zero]
299-
| succ n => simp [iteratedFDerivWithin_succ_const _ _ hs hx]
299+
| succ n => simp [iteratedFDerivWithin_succ_const]
300300
| @insert i u hi IH =>
301301
conv => lhs; simp only [Finset.prod_insert hi]
302302
simp only [Finset.mem_insert, forall_eq_or_imp] at hf

Mathlib/Analysis/Calculus/Deriv/Basic.lean

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,9 @@ theorem deriv_const : deriv (fun _ => c) x = 0 :=
630630
theorem deriv_const' : (deriv fun _ : 𝕜 => c) = fun _ => 0 :=
631631
funext fun x => deriv_const x c
632632

633-
theorem derivWithin_const (hxs : UniqueDiffWithinAt 𝕜 s x) : derivWithin (fun _ => c) s x = 0 :=
634-
(hasDerivWithinAt_const _ _ _).derivWithin hxs
633+
@[simp]
634+
theorem derivWithin_const : derivWithin (fun _ => c) s = 0 := by
635+
ext; simp [derivWithin]
635636

636637
end Const
637638

Mathlib/Analysis/Calculus/Deriv/Slope.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ theorem range_derivWithin_subset_closure_span_image
9292
range (derivWithin f s) ⊆ closure (Submodule.span 𝕜 (f '' t)) := by
9393
rintro - ⟨x, rfl⟩
9494
rcases eq_or_neBot (𝓝[s \ {x}] x) with H|H
95-
· simpa [derivWithin, fderivWithin, H] using subset_closure (zero_mem _)
95+
· simpa [derivWithin_zero_of_isolated H] using subset_closure (zero_mem _)
9696
by_cases H' : DifferentiableWithinAt 𝕜 f s x; swap
9797
· rw [derivWithin_zero_of_not_differentiableWithinAt H']
9898
exact subset_closure (zero_mem _)

Mathlib/Analysis/Calculus/FDeriv/Add.lean

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -739,31 +739,7 @@ theorem differentiableWithinAt_comp_add_right (a : E) :
739739

740740
theorem fderivWithin_comp_add_right (a : E) :
741741
fderivWithin 𝕜 (fun x ↦ f (x + a)) s x = fderivWithin 𝕜 f (a +ᵥ s) (x + a) := by
742-
simp only [fderivWithin, hasFDerivWithinAt_comp_add_right]
743-
by_cases h : 𝓝[s \ {x}] x = ⊥
744-
· have h' : 𝓝[(a +ᵥ s) \ {x + a}] (x + a) = ⊥ := by
745-
let e := Homeomorph.addRight a
746-
have : 𝓝[(a +ᵥ s) \ {x + a}] (x + a) = map e (𝓝[s \ {x}] x) := by
747-
rw [e.isEmbedding.map_nhdsWithin_eq]
748-
congr
749-
ext y
750-
rw [← e.preimage_symm]
751-
simp [e, Homeomorph.addRight, Set.mem_vadd_set_iff_neg_vadd_mem, add_comm]
752-
rw [this, h, Filter.map_bot]
753-
simp [h, h']
754-
· have h' : 𝓝[(a +ᵥ s) \ {x + a}] (x + a) ≠ ⊥ := by
755-
intro h''
756-
let e := Homeomorph.addRight (-a)
757-
have : 𝓝[s \ {x}] x = map e (𝓝[(a +ᵥ s) \ {x + a}] (x + a)) := by
758-
rw [e.isEmbedding.map_nhdsWithin_eq]
759-
congr
760-
· simp [e]
761-
ext y
762-
rw [← e.preimage_symm]
763-
simp [e, Homeomorph.addRight, Set.mem_vadd_set_iff_neg_vadd_mem, add_comm]
764-
apply h
765-
rw [this, h'', Filter.map_bot]
766-
simp [h, h']
742+
simp only [fderivWithin, hasFDerivWithinAt_comp_add_right, DifferentiableWithinAt]
767743

768744
theorem hasFDerivWithinAt_comp_add_left (a : E) :
769745
HasFDerivWithinAt (fun x ↦ f (a + x)) f' s x ↔ HasFDerivWithinAt f f' (a +ᵥ s) (a + x) := by

Mathlib/Analysis/Calculus/FDeriv/Basic.lean

Lines changed: 46 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -171,16 +171,18 @@ def DifferentiableAt (f : E → F) (x : E) :=
171171
∃ f' : E →L[𝕜] F, HasFDerivAt f f' x
172172

173173
/-- If `f` has a derivative at `x` within `s`, then `fderivWithin 𝕜 f s x` is such a derivative.
174-
Otherwise, it is set to `0`. If `x` is isolated in `s`, we take the derivative within `s` to
175-
be zero for convenience. -/
174+
Otherwise, it is set to `0`. We also set it to be zero, if zero is one of possible derivatives. -/
176175
irreducible_def fderivWithin (f : E → F) (s : Set E) (x : E) : E →L[𝕜] F :=
177-
if 𝓝[s \ {x}] x = ⊥ then 0 else
178-
if h : ∃ f', HasFDerivWithinAt f f' s x then Classical.choose h else 0
176+
if HasFDerivWithinAt f (0 : E →L[𝕜] F) s x
177+
then 0
178+
else if h : DifferentiableWithinAt 𝕜 f s x
179+
then Classical.choose h
180+
else 0
179181

180182
/-- If `f` has a derivative at `x`, then `fderiv 𝕜 f x` is such a derivative. Otherwise, it is
181183
set to `0`. -/
182184
irreducible_def fderiv (f : E → F) (x : E) : E →L[𝕜] F :=
183-
if h : ∃ f', HasFDerivAt f f' x then Classical.choose h else 0
185+
fderivWithin 𝕜 f univ x
184186

185187
/-- `DifferentiableOn 𝕜 f s` means that `f` is differentiable within `s` at any point of `s`. -/
186188
@[fun_prop]
@@ -199,23 +201,14 @@ variable {x : E}
199201
variable {s t : Set E}
200202
variable {L L₁ L₂ : Filter E}
201203

202-
theorem fderivWithin_zero_of_isolated (h : 𝓝[s \ {x}] x = ⊥) : fderivWithin 𝕜 f s x = 0 := by
203-
rw [fderivWithin, if_pos h]
204-
205-
theorem fderivWithin_zero_of_nmem_closure (h : x ∉ closure s) : fderivWithin 𝕜 f s x = 0 := by
206-
apply fderivWithin_zero_of_isolated
207-
simp only [mem_closure_iff_nhdsWithin_neBot, neBot_iff, Ne, Classical.not_not] at h
208-
rw [eq_bot_iff, ← h]
209-
exact nhdsWithin_mono _ diff_subset
210-
211204
theorem fderivWithin_zero_of_not_differentiableWithinAt (h : ¬DifferentiableWithinAt 𝕜 f s x) :
212205
fderivWithin 𝕜 f s x = 0 := by
213-
have : ¬∃ f', HasFDerivWithinAt f f' s x := h
214-
simp [fderivWithin, this]
206+
simp [fderivWithin, h]
215207

216-
theorem fderiv_zero_of_not_differentiableAt (h : ¬DifferentiableAt 𝕜 f x) : fderiv 𝕜 f x = 0 := by
217-
have : ¬∃ f', HasFDerivAt f f' x := h
218-
simp [fderiv, this]
208+
@[simp]
209+
theorem fderivWithin_univ : fderivWithin 𝕜 f univ = fderiv 𝕜 f := by
210+
ext
211+
rw [fderiv]
219212

220213
section DerivativeUniqueness
221214

@@ -375,6 +368,14 @@ theorem hasFDerivWithinAt_univ : HasFDerivWithinAt f f' univ x ↔ HasFDerivAt f
375368

376369
alias ⟨HasFDerivWithinAt.hasFDerivAt_of_univ, _⟩ := hasFDerivWithinAt_univ
377370

371+
theorem differentiableWithinAt_univ :
372+
DifferentiableWithinAt 𝕜 f univ x ↔ DifferentiableAt 𝕜 f x := by
373+
simp only [DifferentiableWithinAt, hasFDerivWithinAt_univ, DifferentiableAt]
374+
375+
theorem fderiv_zero_of_not_differentiableAt (h : ¬DifferentiableAt 𝕜 f x) : fderiv 𝕜 f x = 0 := by
376+
rw [fderiv, fderivWithin_zero_of_not_differentiableWithinAt]
377+
rwa [differentiableWithinAt_univ]
378+
378379
theorem hasFDerivWithinAt_of_mem_nhds (h : s ∈ 𝓝 x) :
379380
HasFDerivWithinAt f f' s x ↔ HasFDerivAt f f' x := by
380381
rw [HasFDerivAt, HasFDerivWithinAt, nhdsWithin_eq_nhds.mpr h]
@@ -486,19 +487,23 @@ theorem hasFDerivWithinAt_of_nmem_closure (h : x ∉ closure s) : HasFDerivWithi
486487
.of_nhdsWithin_eq_bot <| eq_bot_mono (nhdsWithin_mono _ diff_subset) <| by
487488
rwa [mem_closure_iff_nhdsWithin_neBot, not_neBot] at h
488489

490+
theorem fderivWithin_zero_of_isolated (h : 𝓝[s \ {x}] x = ⊥) : fderivWithin 𝕜 f s x = 0 := by
491+
rw [fderivWithin, if_pos (.of_nhdsWithin_eq_bot h)]
492+
493+
theorem fderivWithin_zero_of_nmem_closure (h : x ∉ closure s) : fderivWithin 𝕜 f s x = 0 := by
494+
rw [fderivWithin, if_pos (hasFDerivWithinAt_of_nmem_closure h)]
495+
489496
theorem DifferentiableWithinAt.hasFDerivWithinAt (h : DifferentiableWithinAt 𝕜 f s x) :
490497
HasFDerivWithinAt f (fderivWithin 𝕜 f s x) s x := by
491-
by_cases H : 𝓝[s \ {x}] x = ⊥
492-
· exact .of_nhdsWithin_eq_bot H
493-
· unfold DifferentiableWithinAt at h
494-
rw [fderivWithin, if_neg H, dif_pos h]
495-
exact Classical.choose_spec h
498+
simp only [fderivWithin, dif_pos h]
499+
split_ifs with h₀
500+
exacts [h₀, Classical.choose_spec h]
496501

497502
theorem DifferentiableAt.hasFDerivAt (h : DifferentiableAt 𝕜 f x) :
498503
HasFDerivAt f (fderiv 𝕜 f x) x := by
499-
dsimp only [DifferentiableAt] at h
500-
rw [fderiv, dif_pos h]
501-
exact Classical.choose_spec h
504+
rw [fderiv, ← hasFDerivWithinAt_univ]
505+
rw [← differentiableWithinAt_univ] at h
506+
exact h.hasFDerivWithinAt
502507

503508
theorem DifferentiableOn.hasFDerivAt (h : DifferentiableOn 𝕜 f s) (hs : s ∈ 𝓝 x) :
504509
HasFDerivAt f (fderiv 𝕜 f x) x :=
@@ -575,10 +580,6 @@ theorem differentiableWithinAt_congr_nhds {t : Set E} (hst : 𝓝[s] x = 𝓝[t]
575580
DifferentiableWithinAt 𝕜 f s x ↔ DifferentiableWithinAt 𝕜 f t x :=
576581
fun h => h.congr_nhds hst, fun h => h.congr_nhds hst.symm⟩
577582

578-
theorem differentiableWithinAt_univ :
579-
DifferentiableWithinAt 𝕜 f univ x ↔ DifferentiableAt 𝕜 f x := by
580-
simp only [DifferentiableWithinAt, hasFDerivWithinAt_univ, DifferentiableAt]
581-
582583
theorem differentiableWithinAt_inter (ht : t ∈ 𝓝 x) :
583584
DifferentiableWithinAt 𝕜 f (s ∩ t) x ↔ DifferentiableWithinAt 𝕜 f s x := by
584585
simp only [DifferentiableWithinAt, hasFDerivWithinAt_inter ht]
@@ -647,19 +648,7 @@ theorem fderivWithin_subset (st : s ⊆ t) (ht : UniqueDiffWithinAt 𝕜 s x)
647648
fderivWithin_of_mem_nhdsWithin (nhdsWithin_mono _ st self_mem_nhdsWithin) ht h
648649

649650
theorem fderivWithin_inter (ht : t ∈ 𝓝 x) : fderivWithin 𝕜 f (s ∩ t) x = fderivWithin 𝕜 f s x := by
650-
have A : 𝓝[(s ∩ t) \ {x}] x = 𝓝[s \ {x}] x := by
651-
have : (s ∩ t) \ {x} = (s \ {x}) ∩ t := by rw [inter_comm, inter_diff_assoc, inter_comm]
652-
rw [this, ← nhdsWithin_restrict' _ ht]
653-
simp [fderivWithin, A, hasFDerivWithinAt_inter ht]
654-
655-
@[simp]
656-
theorem fderivWithin_univ : fderivWithin 𝕜 f univ = fderiv 𝕜 f := by
657-
ext1 x
658-
nontriviality E
659-
have H : 𝓝[univ \ {x}] x ≠ ⊥ := by
660-
rw [← compl_eq_univ_diff, ← neBot_iff]
661-
exact Module.punctured_nhds_neBot 𝕜 E x
662-
simp [fderivWithin, fderiv, H]
651+
simp [fderivWithin, hasFDerivWithinAt_inter ht, DifferentiableWithinAt]
663652

664653
theorem fderivWithin_of_mem_nhds (h : s ∈ 𝓝 x) : fderivWithin 𝕜 f s x = fderiv 𝕜 f x := by
665654
rw [← fderivWithin_univ, ← univ_inter s, fderivWithin_inter h]
@@ -803,11 +792,7 @@ theorem differentiableWithinAt_congr_set (h : s =ᶠ[𝓝 x] t) :
803792

804793
theorem fderivWithin_congr_set' (y : E) (h : s =ᶠ[𝓝[{y}ᶜ] x] t) :
805794
fderivWithin 𝕜 f s x = fderivWithin 𝕜 f t x := by
806-
have : s =ᶠ[𝓝[{x}ᶜ] x] t := nhdsWithin_compl_singleton_le x y h
807-
have : 𝓝[s \ {x}] x = 𝓝[t \ {x}] x := by
808-
simpa only [set_eventuallyEq_iff_inf_principal, ← nhdsWithin_inter', diff_eq,
809-
inter_comm] using this
810-
simp only [fderivWithin, hasFDerivWithinAt_congr_set' y h, this]
795+
simp only [fderivWithin, differentiableWithinAt_congr_set' _ h, hasFDerivWithinAt_congr_set' _ h]
811796

812797
theorem fderivWithin_congr_set (h : s =ᶠ[𝓝 x] t) : fderivWithin 𝕜 f s x = fderivWithin 𝕜 f t x :=
813798
fderivWithin_congr_set' x <| h.filter_mono inf_le_left
@@ -937,7 +922,7 @@ theorem DifferentiableWithinAt.fderivWithin_congr_mono (h : DifferentiableWithin
937922

938923
theorem Filter.EventuallyEq.fderivWithin_eq (hs : f₁ =ᶠ[𝓝[s] x] f) (hx : f₁ x = f x) :
939924
fderivWithin 𝕜 f₁ s x = fderivWithin 𝕜 f s x := by
940-
simp only [fderivWithin, hs.hasFDerivWithinAt_iff hx]
925+
simp only [fderivWithin, DifferentiableWithinAt, hs.hasFDerivWithinAt_iff hx]
941926

942927
theorem Filter.EventuallyEq.fderivWithin_eq_of_mem (hs : f₁ =ᶠ[𝓝[s] x] f) (hx : x ∈ s) :
943928
fderivWithin 𝕜 f₁ s x = fderivWithin 𝕜 f s x :=
@@ -1068,19 +1053,21 @@ theorem differentiableAt_const (c : F) : DifferentiableAt 𝕜 (fun _ => c) x :=
10681053
theorem differentiableWithinAt_const (c : F) : DifferentiableWithinAt 𝕜 (fun _ => c) s x :=
10691054
DifferentiableAt.differentiableWithinAt (differentiableAt_const _)
10701055

1056+
theorem fderivWithin_const_apply (c : F) : fderivWithin 𝕜 (fun _ => c) s x = 0 := by
1057+
rw [fderivWithin, if_pos]
1058+
apply hasFDerivWithinAt_const
1059+
1060+
@[simp]
1061+
theorem fderivWithin_const (c : F) : fderivWithin 𝕜 (fun _ ↦ c) s = 0 := by
1062+
ext
1063+
rw [fderivWithin_const_apply, Pi.zero_apply]
1064+
10711065
theorem fderiv_const_apply (c : F) : fderiv 𝕜 (fun _ => c) x = 0 :=
1072-
HasFDerivAt.fderiv (hasFDerivAt_const c x)
1066+
(hasFDerivAt_const c x).fderiv
10731067

10741068
@[simp]
10751069
theorem fderiv_const (c : F) : (fderiv 𝕜 fun _ : E => c) = 0 := by
1076-
ext m
1077-
rw [fderiv_const_apply]
1078-
rfl
1079-
1080-
theorem fderivWithin_const_apply (c : F) (hxs : UniqueDiffWithinAt 𝕜 s x) :
1081-
fderivWithin 𝕜 (fun _ => c) s x = 0 := by
1082-
rw [DifferentiableAt.fderivWithin (differentiableAt_const _) hxs]
1083-
exact fderiv_const_apply _
1070+
rw [← fderivWithin_univ, fderivWithin_const]
10841071

10851072
@[simp, fun_prop]
10861073
theorem differentiable_const (c : F) : Differentiable 𝕜 fun _ : E => c := fun _ =>

0 commit comments

Comments
 (0)