File tree Expand file tree Collapse file tree
Mathlib/Analysis/Calculus/FDeriv Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -270,6 +270,9 @@ protected theorem HasFDerivWithinAt.empty : HasFDerivWithinAt f f' ∅ x := by
270270protected theorem DifferentiableWithinAt.empty : DifferentiableWithinAt 𝕜 f ∅ x :=
271271 ⟨0 , .empty⟩
272272
273+ @[fun_prop]
274+ theorem differentiableOn_empty : DifferentiableOn 𝕜 f ∅ := fun _ => False.elim
275+
273276theorem HasFDerivWithinAt.of_finite [T1Space E] (h : s.Finite) : HasFDerivWithinAt f f' s x := by
274277 induction s, h using Set.Finite.induction_on with
275278 | empty => exact .empty
Original file line number Diff line number Diff line change @@ -294,14 +294,23 @@ theorem hasFDerivWithinAt_singleton (f : E → F) (x : E) :
294294 simp only [HasFDerivWithinAt, nhdsWithin_singleton, hasFDerivAtFilter_iff_isLittleO,
295295 isLittleO_pure, ContinuousLinearMap.zero_apply, sub_self]
296296
297+ @[fun_prop]
298+ theorem hasFDerivWithinAt_of_subsingleton [h : Subsingleton E] (f : E → F) (s : Set E) (x : E) :
299+ HasFDerivWithinAt f (0 : E →L[𝕜] F) s x := by
300+ by_cases hs : s = ∅
301+ · simp [hs]
302+ · obtain ⟨a, rfl⟩ := exists_eq_singleton_iff_nonempty_subsingleton (s := s)|>.mpr
303+ ⟨by rwa [nonempty_iff_ne_empty], subsingleton_of_subsingleton⟩
304+ exact HasFDerivWithinAt.singleton
305+
297306@[fun_prop]
298307theorem hasFDerivAt_of_subsingleton [h : Subsingleton E] (f : E → F) (x : E) :
299308 HasFDerivAt f (0 : E →L[𝕜] F) x := by
300309 rw [← hasFDerivWithinAt_univ, subsingleton_univ.eq_singleton_of_mem (mem_univ x)]
301310 exact hasFDerivWithinAt_singleton f x
302311
303- @[fun_prop]
304- theorem differentiableOn_empty : DifferentiableOn 𝕜 f ∅ := fun _ => False.elim
312+ theorem differentiable_of_subsingleton [Subsingleton E] {f : E → F} : Differentiable 𝕜 f :=
313+ fun x ↦ (hasFDerivAt_of_subsingleton f x (𝕜 := 𝕜)).differentiableAt
305314
306315@[fun_prop]
307316theorem differentiableOn_singleton : DifferentiableOn 𝕜 f {x} :=
You can’t perform that action at this time.
0 commit comments