Skip to content

Commit 819ba93

Browse files
committed
feat(FDeriv/Basic): add HasFDerivWithinAt.of_finite (#24466)
... and some corollaries
1 parent 9525089 commit 819ba93

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

Mathlib/Analysis/Calculus/FDeriv/Basic.lean

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ lemma hasFDerivWithinAt_of_isOpen (h : IsOpen s) (hx : x ∈ s) :
390390
HasFDerivWithinAt f f' s x ↔ HasFDerivAt f f' x :=
391391
hasFDerivWithinAt_of_mem_nhds (h.mem_nhds hx)
392392

393+
@[simp]
393394
theorem hasFDerivWithinAt_insert {y : E} :
394395
HasFDerivWithinAt f f' (insert y s) x ↔ HasFDerivWithinAt f f' s x := by
395396
rcases eq_or_ne x y with (rfl | h)
@@ -405,10 +406,42 @@ protected theorem HasFDerivWithinAt.insert (h : HasFDerivWithinAt g g' s x) :
405406
HasFDerivWithinAt g g' (insert x s) x :=
406407
h.insert'
407408

409+
@[simp]
408410
theorem hasFDerivWithinAt_diff_singleton (y : E) :
409411
HasFDerivWithinAt f f' (s \ {y}) x ↔ HasFDerivWithinAt f f' s x := by
410412
rw [← hasFDerivWithinAt_insert, insert_diff_singleton, hasFDerivWithinAt_insert]
411413

414+
@[simp]
415+
protected theorem HasFDerivWithinAt.empty : HasFDerivWithinAt f f' ∅ x := by
416+
simp [HasFDerivWithinAt, hasFDerivAtFilter_iff_isLittleOTVS]
417+
418+
@[simp]
419+
protected theorem DifferentiableWithinAt.empty : DifferentiableWithinAt 𝕜 f ∅ x :=
420+
0, .empty⟩
421+
422+
theorem HasFDerivWithinAt.of_finite (h : s.Finite) : HasFDerivWithinAt f f' s x := by
423+
induction s, h using Set.Finite.induction_on with
424+
| empty => exact .empty
425+
| insert _ _ ih => exact ih.insert'
426+
427+
theorem DifferentiableWithinAt.of_finite (h : s.Finite) : DifferentiableWithinAt 𝕜 f s x :=
428+
0, .of_finite h⟩
429+
430+
@[simp]
431+
protected theorem HasFDerivWithinAt.singleton {y} : HasFDerivWithinAt f f' {x} y :=
432+
.of_finite <| finite_singleton _
433+
434+
@[simp]
435+
protected theorem DifferentiableWithinAt.singleton {y} : DifferentiableWithinAt 𝕜 f {x} y :=
436+
0, .singleton⟩
437+
438+
theorem HasFDerivWithinAt.of_subsingleton (h : s.Subsingleton) : HasFDerivWithinAt f f' s x :=
439+
.of_finite h.finite
440+
441+
theorem DifferentiableWithinAt.of_subsingleton (h : s.Subsingleton) :
442+
DifferentiableWithinAt 𝕜 f s x :=
443+
.of_finite h.finite
444+
412445
theorem HasStrictFDerivAt.isBigO_sub (hf : HasStrictFDerivAt f f' x) :
413446
(fun p : E × E => f p.1 - f p.2) =O[𝓝 (x, x)] fun p : E × E => p.1 - p.2 :=
414447
hf.isLittleO.isBigO.congr_of_sub.2 (f'.isBigO_comp _ _)

0 commit comments

Comments
 (0)