150 qed |
150 qed |
151 |
151 |
152 subsubsection \<open>Continuity of operations\<close> |
152 subsubsection \<open>Continuity of operations\<close> |
153 |
153 |
154 lemma tendsto_fst [tendsto_intros]: |
154 lemma tendsto_fst [tendsto_intros]: |
155 assumes "(f ---> a) F" |
155 assumes "(f \<longlongrightarrow> a) F" |
156 shows "((\<lambda>x. fst (f x)) ---> fst a) F" |
156 shows "((\<lambda>x. fst (f x)) \<longlongrightarrow> fst a) F" |
157 proof (rule topological_tendstoI) |
157 proof (rule topological_tendstoI) |
158 fix S assume "open S" and "fst a \<in> S" |
158 fix S assume "open S" and "fst a \<in> S" |
159 then have "open (fst -` S)" and "a \<in> fst -` S" |
159 then have "open (fst -` S)" and "a \<in> fst -` S" |
160 by (simp_all add: open_vimage_fst) |
160 by (simp_all add: open_vimage_fst) |
161 with assms have "eventually (\<lambda>x. f x \<in> fst -` S) F" |
161 with assms have "eventually (\<lambda>x. f x \<in> fst -` S) F" |
163 then show "eventually (\<lambda>x. fst (f x) \<in> S) F" |
163 then show "eventually (\<lambda>x. fst (f x) \<in> S) F" |
164 by simp |
164 by simp |
165 qed |
165 qed |
166 |
166 |
167 lemma tendsto_snd [tendsto_intros]: |
167 lemma tendsto_snd [tendsto_intros]: |
168 assumes "(f ---> a) F" |
168 assumes "(f \<longlongrightarrow> a) F" |
169 shows "((\<lambda>x. snd (f x)) ---> snd a) F" |
169 shows "((\<lambda>x. snd (f x)) \<longlongrightarrow> snd a) F" |
170 proof (rule topological_tendstoI) |
170 proof (rule topological_tendstoI) |
171 fix S assume "open S" and "snd a \<in> S" |
171 fix S assume "open S" and "snd a \<in> S" |
172 then have "open (snd -` S)" and "a \<in> snd -` S" |
172 then have "open (snd -` S)" and "a \<in> snd -` S" |
173 by (simp_all add: open_vimage_snd) |
173 by (simp_all add: open_vimage_snd) |
174 with assms have "eventually (\<lambda>x. f x \<in> snd -` S) F" |
174 with assms have "eventually (\<lambda>x. f x \<in> snd -` S) F" |
176 then show "eventually (\<lambda>x. snd (f x) \<in> S) F" |
176 then show "eventually (\<lambda>x. snd (f x) \<in> S) F" |
177 by simp |
177 by simp |
178 qed |
178 qed |
179 |
179 |
180 lemma tendsto_Pair [tendsto_intros]: |
180 lemma tendsto_Pair [tendsto_intros]: |
181 assumes "(f ---> a) F" and "(g ---> b) F" |
181 assumes "(f \<longlongrightarrow> a) F" and "(g \<longlongrightarrow> b) F" |
182 shows "((\<lambda>x. (f x, g x)) ---> (a, b)) F" |
182 shows "((\<lambda>x. (f x, g x)) \<longlongrightarrow> (a, b)) F" |
183 proof (rule topological_tendstoI) |
183 proof (rule topological_tendstoI) |
184 fix S assume "open S" and "(a, b) \<in> S" |
184 fix S assume "open S" and "(a, b) \<in> S" |
185 then obtain A B where "open A" "open B" "a \<in> A" "b \<in> B" "A \<times> B \<subseteq> S" |
185 then obtain A B where "open A" "open B" "a \<in> A" "b \<in> B" "A \<times> B \<subseteq> S" |
186 unfolding open_prod_def by fast |
186 unfolding open_prod_def by fast |
187 have "eventually (\<lambda>x. f x \<in> A) F" |
187 have "eventually (\<lambda>x. f x \<in> A) F" |
188 using \<open>(f ---> a) F\<close> \<open>open A\<close> \<open>a \<in> A\<close> |
188 using \<open>(f \<longlongrightarrow> a) F\<close> \<open>open A\<close> \<open>a \<in> A\<close> |
189 by (rule topological_tendstoD) |
189 by (rule topological_tendstoD) |
190 moreover |
190 moreover |
191 have "eventually (\<lambda>x. g x \<in> B) F" |
191 have "eventually (\<lambda>x. g x \<in> B) F" |
192 using \<open>(g ---> b) F\<close> \<open>open B\<close> \<open>b \<in> B\<close> |
192 using \<open>(g \<longlongrightarrow> b) F\<close> \<open>open B\<close> \<open>b \<in> B\<close> |
193 by (rule topological_tendstoD) |
193 by (rule topological_tendstoD) |
194 ultimately |
194 ultimately |
195 show "eventually (\<lambda>x. (f x, g x) \<in> S) F" |
195 show "eventually (\<lambda>x. (f x, g x) \<in> S) F" |
196 by (rule eventually_elim2) |
196 by (rule eventually_elim2) |
197 (simp add: subsetD [OF \<open>A \<times> B \<subseteq> S\<close>]) |
197 (simp add: subsetD [OF \<open>A \<times> B \<subseteq> S\<close>]) |
489 using f g by (intro bounded_linear_Pair has_derivative_bounded_linear) |
489 using f g by (intro bounded_linear_Pair has_derivative_bounded_linear) |
490 let ?Rf = "\<lambda>y. f y - f x - f' (y - x)" |
490 let ?Rf = "\<lambda>y. f y - f x - f' (y - x)" |
491 let ?Rg = "\<lambda>y. g y - g x - g' (y - x)" |
491 let ?Rg = "\<lambda>y. g y - g x - g' (y - x)" |
492 let ?R = "\<lambda>y. ((f y, g y) - (f x, g x) - (f' (y - x), g' (y - x)))" |
492 let ?R = "\<lambda>y. ((f y, g y) - (f x, g x) - (f' (y - x), g' (y - x)))" |
493 |
493 |
494 show "((\<lambda>y. norm (?Rf y) / norm (y - x) + norm (?Rg y) / norm (y - x)) ---> 0) (at x within s)" |
494 show "((\<lambda>y. norm (?Rf y) / norm (y - x) + norm (?Rg y) / norm (y - x)) \<longlongrightarrow> 0) (at x within s)" |
495 using f g by (intro tendsto_add_zero) (auto simp: has_derivative_iff_norm) |
495 using f g by (intro tendsto_add_zero) (auto simp: has_derivative_iff_norm) |
496 |
496 |
497 fix y :: 'a assume "y \<noteq> x" |
497 fix y :: 'a assume "y \<noteq> x" |
498 show "norm (?R y) / norm (y - x) \<le> norm (?Rf y) / norm (y - x) + norm (?Rg y) / norm (y - x)" |
498 show "norm (?R y) / norm (y - x) \<le> norm (?Rf y) / norm (y - x) + norm (?Rg y) / norm (y - x)" |
499 unfolding add_divide_distrib [symmetric] |
499 unfolding add_divide_distrib [symmetric] |