@@ -452,6 +452,12 @@ lemma cont_diff_within_at.congr_of_eventually_eq
452
452
⟨{x ∈ u | f₁ x = f x}, filter.inter_mem hu (mem_nhds_within_insert.2 ⟨hx, h₁⟩), p,
453
453
(H.mono (sep_subset _ _)).congr (λ _, and.right)⟩
454
454
455
+ lemma cont_diff_within_at.congr_of_eventually_eq_insert
456
+ (h : cont_diff_within_at 𝕜 n f s x) (h₁ : f₁ =ᶠ[𝓝[insert x s] x] f) :
457
+ cont_diff_within_at 𝕜 n f₁ s x :=
458
+ h.congr_of_eventually_eq (nhds_within_mono x (subset_insert x s) h₁)
459
+ (mem_of_mem_nhds_within (mem_insert x s) h₁ : _)
460
+
455
461
lemma cont_diff_within_at.congr_of_eventually_eq'
456
462
(h : cont_diff_within_at 𝕜 n f s x) (h₁ : f₁ =ᶠ[𝓝[s] x] f) (hx : x ∈ s) :
457
463
cont_diff_within_at 𝕜 n f₁ s x :=
@@ -569,6 +575,38 @@ begin
569
575
rw [snoc_last, init_snoc] } } } }
570
576
end
571
577
578
+ /-- One direction of `cont_diff_within_at_succ_iff_has_fderiv_within_at`, but where all derivatives
579
+ are taken within the same set. -/
580
+ lemma cont_diff_within_at.has_fderiv_within_at_nhds {n : ℕ}
581
+ (hf : cont_diff_within_at 𝕜 (n + 1 : ℕ) f s x) :
582
+ ∃ u ∈ 𝓝[insert x s] x, u ⊆ insert x s ∧ ∃ f' : E → E →L[𝕜] F,
583
+ (∀ x ∈ u, has_fderiv_within_at f (f' x) s x) ∧ cont_diff_within_at 𝕜 n f' s x :=
584
+ begin
585
+ obtain ⟨u, hu, f', huf', hf'⟩ := cont_diff_within_at_succ_iff_has_fderiv_within_at.mp hf,
586
+ obtain ⟨w, hw, hxw, hwu⟩ := mem_nhds_within.mp hu,
587
+ rw [inter_comm] at hwu,
588
+ refine ⟨insert x s ∩ w, inter_mem_nhds_within _ (hw.mem_nhds hxw), inter_subset_left _ _,
589
+ f', λ y hy, _, _⟩,
590
+ { refine ((huf' y $ hwu hy).mono hwu).mono_of_mem _,
591
+ refine mem_of_superset _ (inter_subset_inter_left _ (subset_insert _ _)),
592
+ refine inter_mem_nhds_within _ (hw.mem_nhds hy.2 ) },
593
+ { exact hf'.mono_of_mem (nhds_within_mono _ (subset_insert _ _) hu) }
594
+ end
595
+
596
+ /-- A version of `cont_diff_within_at_succ_iff_has_fderiv_within_at` where all derivatives
597
+ are taken within the same set. This lemma assumes `x ∈ s`. -/
598
+ lemma cont_diff_within_at_succ_iff_has_fderiv_within_at_of_mem {n : ℕ} (hx : x ∈ s) :
599
+ cont_diff_within_at 𝕜 (n + 1 : ℕ) f s x
600
+ ↔ ∃ u ∈ 𝓝[s] x, u ⊆ s ∧ ∃ f' : E → E →L[𝕜] F,
601
+ (∀ x ∈ u, has_fderiv_within_at f (f' x) s x) ∧ cont_diff_within_at 𝕜 n f' s x :=
602
+ begin
603
+ split,
604
+ { intro hf, simpa only [insert_eq_of_mem hx] using hf.has_fderiv_within_at_nhds },
605
+ rw [cont_diff_within_at_succ_iff_has_fderiv_within_at, insert_eq_of_mem hx],
606
+ rintro ⟨u, hu, hus, f', huf', hf'⟩,
607
+ exact ⟨u, hu, f', λ y hy, (huf' y hy).mono hus, hf'.mono hus⟩
608
+ end
609
+
572
610
/-! ### Smooth functions within a set -/
573
611
574
612
variable (𝕜)
@@ -1093,6 +1131,31 @@ lemma cont_diff_on.continuous_on_fderiv_of_open
1093
1131
continuous_on (λ x, fderiv 𝕜 f x) s :=
1094
1132
((cont_diff_on_succ_iff_fderiv_of_open hs).1 (h.of_le hn)).2 .continuous_on
1095
1133
1134
+ lemma cont_diff_within_at.fderiv_within'
1135
+ (hf : cont_diff_within_at 𝕜 n f s x) (hs : ∀ᶠ y in 𝓝[insert x s] x, unique_diff_within_at 𝕜 s y)
1136
+ (hmn : m + 1 ≤ n) :
1137
+ cont_diff_within_at 𝕜 m (fderiv_within 𝕜 f s) s x :=
1138
+ begin
1139
+ have : ∀ k : ℕ, (k + 1 : with_top ℕ) ≤ n → cont_diff_within_at 𝕜 k (fderiv_within 𝕜 f s) s x,
1140
+ { intros k hkn,
1141
+ obtain ⟨v, hv, -, f', hvf', hf'⟩ := (hf.of_le hkn).has_fderiv_within_at_nhds,
1142
+ apply hf'.congr_of_eventually_eq_insert,
1143
+ filter_upwards [hv, hs],
1144
+ exact λ y hy h2y, (hvf' y hy).fderiv_within h2y },
1145
+ induction m using with_top.rec_top_coe,
1146
+ { obtain rfl := eq_top_iff.mpr hmn,
1147
+ rw [cont_diff_within_at_top],
1148
+ exact λ m, this m le_top },
1149
+ exact this m hmn
1150
+ end
1151
+
1152
+ lemma cont_diff_within_at.fderiv_within
1153
+ (hf : cont_diff_within_at 𝕜 n f s x) (hs : unique_diff_on 𝕜 s)
1154
+ (hmn : (m + 1 : with_top ℕ) ≤ n) (hxs : x ∈ s) :
1155
+ cont_diff_within_at 𝕜 m (fderiv_within 𝕜 f s) s x :=
1156
+ hf.fderiv_within' (by { rw [insert_eq_of_mem hxs], exact eventually_of_mem self_mem_nhds_within hs})
1157
+ hmn
1158
+
1096
1159
/-- If a function is at least `C^1`, its bundled derivative (mapping `(x, v)` to `Df(x) v`) is
1097
1160
continuous. -/
1098
1161
lemma cont_diff_on.continuous_on_fderiv_within_apply
0 commit comments