equal
deleted
inserted
replaced
2308 lemma Lim_at_infinity: |
2308 lemma Lim_at_infinity: |
2309 "(f ---> l) at_infinity \<longleftrightarrow> (\<forall>e>0. \<exists>b. \<forall>x. norm x \<ge> b \<longrightarrow> dist (f x) l < e)" |
2309 "(f ---> l) at_infinity \<longleftrightarrow> (\<forall>e>0. \<exists>b. \<forall>x. norm x \<ge> b \<longrightarrow> dist (f x) l < e)" |
2310 by (auto simp add: tendsto_iff eventually_at_infinity) |
2310 by (auto simp add: tendsto_iff eventually_at_infinity) |
2311 |
2311 |
2312 lemma Lim_eventually: "eventually (\<lambda>x. f x = l) net \<Longrightarrow> (f ---> l) net" |
2312 lemma Lim_eventually: "eventually (\<lambda>x. f x = l) net \<Longrightarrow> (f ---> l) net" |
2313 by (rule topological_tendstoI, auto elim: eventually_mono') |
2313 by (rule topological_tendstoI, auto elim: eventually_mono) |
2314 |
2314 |
2315 text\<open>The expected monotonicity property.\<close> |
2315 text\<open>The expected monotonicity property.\<close> |
2316 |
2316 |
2317 lemma Lim_Un: |
2317 lemma Lim_Un: |
2318 assumes "(f ---> l) (at x within S)" "(f ---> l) (at x within T)" |
2318 assumes "(f ---> l) (at x within S)" "(f ---> l) (at x within T)" |
2346 then show "?rhs" |
2346 then show "?rhs" |
2347 unfolding eventually_at_topological by auto |
2347 unfolding eventually_at_topological by auto |
2348 next |
2348 next |
2349 assume "?rhs" |
2349 assume "?rhs" |
2350 then show "?lhs" |
2350 then show "?lhs" |
2351 by (auto elim: eventually_elim1 simp: eventually_at_filter) |
2351 by (auto elim: eventually_mono simp: eventually_at_filter) |
2352 } |
2352 } |
2353 qed |
2353 qed |
2354 |
2354 |
2355 lemma at_within_interior: |
2355 lemma at_within_interior: |
2356 "x \<in> interior S \<Longrightarrow> at x within S = at x" |
2356 "x \<in> interior S \<Longrightarrow> at x within S = at x" |
2427 proof (rule topological_tendstoI) |
2427 proof (rule topological_tendstoI) |
2428 fix S |
2428 fix S |
2429 assume "open S" "x \<in> S" |
2429 assume "open S" "x \<in> S" |
2430 from A(3)[OF this] \<open>\<And>n. f n \<in> A n\<close> |
2430 from A(3)[OF this] \<open>\<And>n. f n \<in> A n\<close> |
2431 show "eventually (\<lambda>x. f x \<in> S) sequentially" |
2431 show "eventually (\<lambda>x. f x \<in> S) sequentially" |
2432 by (auto elim!: eventually_elim1) |
2432 by (auto elim!: eventually_mono) |
2433 qed |
2433 qed |
2434 ultimately show ?rhs by fast |
2434 ultimately show ?rhs by fast |
2435 next |
2435 next |
2436 assume ?rhs |
2436 assume ?rhs |
2437 then obtain f :: "nat \<Rightarrow> 'a" where f: "\<And>n. f n \<in> S - {x}" and lim: "f ----> x" |
2437 then obtain f :: "nat \<Rightarrow> 'a" where f: "\<And>n. f n \<in> S - {x}" and lim: "f ----> x" |
2457 assumes "eventually (\<lambda>x. norm (f x) \<le> g x) net" "(g ---> 0) net" |
2457 assumes "eventually (\<lambda>x. norm (f x) \<le> g x) net" "(g ---> 0) net" |
2458 shows "(f ---> 0) net" |
2458 shows "(f ---> 0) net" |
2459 using assms(2) |
2459 using assms(2) |
2460 proof (rule metric_tendsto_imp_tendsto) |
2460 proof (rule metric_tendsto_imp_tendsto) |
2461 show "eventually (\<lambda>x. dist (f x) 0 \<le> dist (g x) 0) net" |
2461 show "eventually (\<lambda>x. dist (f x) 0 \<le> dist (g x) 0) net" |
2462 using assms(1) by (rule eventually_elim1) (simp add: dist_norm) |
2462 using assms(1) by (rule eventually_mono) (simp add: dist_norm) |
2463 qed |
2463 qed |
2464 |
2464 |
2465 lemma Lim_transform_bound: |
2465 lemma Lim_transform_bound: |
2466 fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
2466 fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
2467 and g :: "'a \<Rightarrow> 'c::real_normed_vector" |
2467 and g :: "'a \<Rightarrow> 'c::real_normed_vector" |
3204 assume "y \<in> closure S" |
3204 assume "y \<in> closure S" |
3205 then obtain f where f: "\<forall>n. f n \<in> S" "(f ---> y) sequentially" |
3205 then obtain f where f: "\<forall>n. f n \<in> S" "(f ---> y) sequentially" |
3206 unfolding closure_sequential by auto |
3206 unfolding closure_sequential by auto |
3207 have "\<forall>n. f n \<in> S \<longrightarrow> dist x (f n) \<le> a" using a by simp |
3207 have "\<forall>n. f n \<in> S \<longrightarrow> dist x (f n) \<le> a" using a by simp |
3208 then have "eventually (\<lambda>n. dist x (f n) \<le> a) sequentially" |
3208 then have "eventually (\<lambda>n. dist x (f n) \<le> a) sequentially" |
3209 by (rule eventually_mono, simp add: f(1)) |
3209 by (simp add: f(1)) |
3210 have "dist x y \<le> a" |
3210 have "dist x y \<le> a" |
3211 apply (rule Lim_dist_ubound [of sequentially f]) |
3211 apply (rule Lim_dist_ubound [of sequentially f]) |
3212 apply (rule trivial_limit_sequentially) |
3212 apply (rule trivial_limit_sequentially) |
3213 apply (rule f(2)) |
3213 apply (rule f(2)) |
3214 apply fact |
3214 apply fact |
3806 def Z \<equiv> "closure ` {A. eventually (\<lambda>x. x \<in> A) F}" |
3806 def Z \<equiv> "closure ` {A. eventually (\<lambda>x. x \<in> A) F}" |
3807 then have "\<forall>z\<in>Z. closed z" |
3807 then have "\<forall>z\<in>Z. closed z" |
3808 by auto |
3808 by auto |
3809 moreover |
3809 moreover |
3810 have ev_Z: "\<And>z. z \<in> Z \<Longrightarrow> eventually (\<lambda>x. x \<in> z) F" |
3810 have ev_Z: "\<And>z. z \<in> Z \<Longrightarrow> eventually (\<lambda>x. x \<in> z) F" |
3811 unfolding Z_def by (auto elim: eventually_elim1 intro: set_mp[OF closure_subset]) |
3811 unfolding Z_def by (auto elim: eventually_mono intro: set_mp[OF closure_subset]) |
3812 have "(\<forall>B \<subseteq> Z. finite B \<longrightarrow> U \<inter> \<Inter>B \<noteq> {})" |
3812 have "(\<forall>B \<subseteq> Z. finite B \<longrightarrow> U \<inter> \<Inter>B \<noteq> {})" |
3813 proof (intro allI impI) |
3813 proof (intro allI impI) |
3814 fix B assume "finite B" "B \<subseteq> Z" |
3814 fix B assume "finite B" "B \<subseteq> Z" |
3815 with \<open>finite B\<close> ev_Z F(2) have "eventually (\<lambda>x. x \<in> U \<inter> (\<Inter>B)) F" |
3815 with \<open>finite B\<close> ev_Z F(2) have "eventually (\<lambda>x. x \<in> U \<inter> (\<Inter>B)) F" |
3816 by (auto simp: eventually_ball_finite_distrib eventually_conj_iff) |
3816 by (auto simp: eventually_ball_finite_distrib eventually_conj_iff) |
4483 done |
4483 done |
4484 finally have "dist (f (r n)) l < e" |
4484 finally have "dist (f (r n)) l < e" |
4485 by auto |
4485 by auto |
4486 } |
4486 } |
4487 ultimately have "eventually (\<lambda>n. dist (f (r n)) l < e) sequentially" |
4487 ultimately have "eventually (\<lambda>n. dist (f (r n)) l < e) sequentially" |
4488 by (rule eventually_elim1) |
4488 by (rule eventually_mono) |
4489 } |
4489 } |
4490 then have *: "((f \<circ> r) ---> l) sequentially" |
4490 then have *: "((f \<circ> r) ---> l) sequentially" |
4491 unfolding o_def tendsto_iff by simp |
4491 unfolding o_def tendsto_iff by simp |
4492 with r show "\<exists>l r. subseq r \<and> ((f \<circ> r) ---> l) sequentially" |
4492 with r show "\<exists>l r. subseq r \<and> ((f \<circ> r) ---> l) sequentially" |
4493 by auto |
4493 by auto |
5557 then obtain T where T_def: "open T" "x0 \<in> T" "\<forall>x\<in>T. f x \<in> S" |
5557 then obtain T where T_def: "open T" "x0 \<in> T" "\<forall>x\<in>T. f x \<in> S" |
5558 using assms continuous_at_open by metis |
5558 using assms continuous_at_open by metis |
5559 then have "eventually (\<lambda>n. x n \<in> T) sequentially" |
5559 then have "eventually (\<lambda>n. x n \<in> T) sequentially" |
5560 using assms T_def by (auto simp: tendsto_def) |
5560 using assms T_def by (auto simp: tendsto_def) |
5561 then show "eventually (\<lambda>n. (f \<circ> x) n \<in> S) sequentially" |
5561 then show "eventually (\<lambda>n. (f \<circ> x) n \<in> S) sequentially" |
5562 using T_def by (auto elim!: eventually_elim1) |
5562 using T_def by (auto elim!: eventually_mono) |
5563 qed |
5563 qed |
5564 |
5564 |
5565 lemma continuous_on_open: |
5565 lemma continuous_on_open: |
5566 "continuous_on s f \<longleftrightarrow> |
5566 "continuous_on s f \<longleftrightarrow> |
5567 (\<forall>t. openin (subtopology euclidean (f ` s)) t \<longrightarrow> |
5567 (\<forall>t. openin (subtopology euclidean (f ` s)) t \<longrightarrow> |
5732 using assms(1) by (simp add: continuous_within) |
5732 using assms(1) by (simp add: continuous_within) |
5733 then have "eventually (\<lambda>y. f y \<in> U) (at x within s)" |
5733 then have "eventually (\<lambda>y. f y \<in> U) (at x within s)" |
5734 using \<open>open U\<close> and \<open>f x \<in> U\<close> |
5734 using \<open>open U\<close> and \<open>f x \<in> U\<close> |
5735 unfolding tendsto_def by fast |
5735 unfolding tendsto_def by fast |
5736 then have "eventually (\<lambda>y. f y \<noteq> a) (at x within s)" |
5736 then have "eventually (\<lambda>y. f y \<noteq> a) (at x within s)" |
5737 using \<open>a \<notin> U\<close> by (fast elim: eventually_mono') |
5737 using \<open>a \<notin> U\<close> by (fast elim: eventually_mono) |
5738 then show ?thesis |
5738 then show ?thesis |
5739 using \<open>f x \<noteq> a\<close> by (auto simp: dist_commute zero_less_dist_iff eventually_at) |
5739 using \<open>f x \<noteq> a\<close> by (auto simp: dist_commute zero_less_dist_iff eventually_at) |
5740 qed |
5740 qed |
5741 |
5741 |
5742 lemma continuous_at_avoid: |
5742 lemma continuous_at_avoid: |