# HG changeset patch # User paulson # Date 1551977952 0 # Node ID 03bc14eab432dbdd11c3245ed45e8dcc3391064a # Parent 11065b70407da6cd54eb9c0fa029acf9bddc7339 renamed the constant "limit" as it is too "generic" diff -r 11065b70407d -r 03bc14eab432 src/HOL/Analysis/Abstract_Limits.thy --- a/src/HOL/Analysis/Abstract_Limits.thy Thu Mar 07 14:08:05 2019 +0000 +++ b/src/HOL/Analysis/Abstract_Limits.thy Thu Mar 07 16:59:12 2019 +0000 @@ -44,32 +44,32 @@ subsection\Limits in a topological space\ -definition limit :: "'a topology \ ('b \ 'a) \ 'a \ 'b filter \ bool" where - "limit X f l F \ l \ topspace X \ (\U. openin X U \ l \ U \ eventually (\x. f x \ U) F)" +definition limitin :: "'a topology \ ('b \ 'a) \ 'a \ 'b filter \ bool" where + "limitin X f l F \ l \ topspace X \ (\U. openin X U \ l \ U \ eventually (\x. f x \ U) F)" -lemma limit_euclideanreal_iff [simp]: "limit euclideanreal f l F \ (f \ l) F" - by (auto simp: limit_def tendsto_def) +lemma limitin_euclideanreal_iff [simp]: "limitin euclideanreal f l F \ (f \ l) F" + by (auto simp: limitin_def tendsto_def) -lemma limit_in_topspace: "limit X f l F \ l \ topspace X" - by (simp add: limit_def) +lemma limitin_topspace: "limitin X f l F \ l \ topspace X" + by (simp add: limitin_def) -lemma limit_const: "limit X (\a. l) l F \ l \ topspace X" - by (simp add: limit_def) +lemma limitin_const: "limitin X (\a. l) l F \ l \ topspace X" + by (simp add: limitin_def) -lemma limit_real_const: "limit euclideanreal (\a. l) l F" - by (simp add: limit_def) +lemma limitin_real_const: "limitin euclideanreal (\a. l) l F" + by (simp add: limitin_def) -lemma limit_eventually: - "\l \ topspace X; eventually (\x. f x = l) F\ \ limit X f l F" - by (auto simp: limit_def eventually_mono) +lemma limitin_eventually: + "\l \ topspace X; eventually (\x. f x = l) F\ \ limitin X f l F" + by (auto simp: limitin_def eventually_mono) -lemma limit_subsequence: - "\strict_mono r; limit X f l sequentially\ \ limit X (f \ r) l sequentially" - unfolding limit_def using eventually_subseq by fastforce +lemma limitin_subsequence: + "\strict_mono r; limitin X f l sequentially\ \ limitin X (f \ r) l sequentially" + unfolding limitin_def using eventually_subseq by fastforce -lemma limit_subtopology: - "limit (subtopology X S) f l F - \ l \ S \ eventually (\a. f a \ S) F \ limit X f l F" (is "?lhs = ?rhs") +lemma limitin_subtopology: + "limitin (subtopology X S) f l F + \ l \ S \ eventually (\a. f a \ S) F \ limitin X f l F" (is "?lhs = ?rhs") proof (cases "l \ S \ topspace X") case True show ?thesis @@ -77,84 +77,84 @@ assume L: ?lhs with True have "\\<^sub>F b in F. f b \ topspace X \ S" - by (metis (no_types) limit_def openin_topspace topspace_subtopology) + by (metis (no_types) limitin_def openin_topspace topspace_subtopology) with L show ?rhs - apply (clarsimp simp add: limit_def eventually_mono topspace_subtopology openin_subtopology_alt) + apply (clarsimp simp add: limitin_def eventually_mono topspace_subtopology openin_subtopology_alt) apply (drule_tac x="S \ U" in spec, force simp: elim: eventually_mono) done next assume ?rhs then show ?lhs using eventually_elim2 - by (fastforce simp add: limit_def topspace_subtopology openin_subtopology_alt) + by (fastforce simp add: limitin_def topspace_subtopology openin_subtopology_alt) qed -qed (auto simp: limit_def topspace_subtopology) +qed (auto simp: limitin_def topspace_subtopology) -lemma limit_sequentially: - "limit X S l sequentially \ +lemma limitin_sequentially: + "limitin X S l sequentially \ l \ topspace X \ (\U. openin X U \ l \ U \ (\N. \n. N \ n \ S n \ U))" - by (simp add: limit_def eventually_sequentially) + by (simp add: limitin_def eventually_sequentially) -lemma limit_sequentially_offset: - "limit X f l sequentially \ limit X (\i. f (i + k)) l sequentially" - unfolding limit_sequentially +lemma limitin_sequentially_offset: + "limitin X f l sequentially \ limitin X (\i. f (i + k)) l sequentially" + unfolding limitin_sequentially by (metis add.commute le_add2 order_trans) -lemma limit_sequentially_offset_rev: - assumes "limit X (\i. f (i + k)) l sequentially" - shows "limit X f l sequentially" +lemma limitin_sequentially_offset_rev: + assumes "limitin X (\i. f (i + k)) l sequentially" + shows "limitin X f l sequentially" proof - have "\N. \n\N. f n \ U" if U: "openin X U" "l \ U" for U proof - obtain N where "\n. n\N \ f (n + k) \ U" - using assms U unfolding limit_sequentially by blast + using assms U unfolding limitin_sequentially by blast then have "\n\N+k. f n \ U" by (metis add_leD2 le_add_diff_inverse ordered_cancel_comm_monoid_diff_class.le_diff_conv2 add.commute) then show ?thesis .. qed with assms show ?thesis - unfolding limit_sequentially + unfolding limitin_sequentially by simp qed -lemma limit_atin: - "limit Y f y (atin X x) \ +lemma limitin_atin: + "limitin Y f y (atin X x) \ y \ topspace Y \ (x \ topspace X \ (\V. openin Y V \ y \ V \ (\U. openin X U \ x \ U \ f ` (U - {x}) \ V)))" - by (auto simp: limit_def eventually_atin image_subset_iff) + by (auto simp: limitin_def eventually_atin image_subset_iff) -lemma limit_atin_self: - "limit Y f (f a) (atin X a) \ +lemma limitin_atin_self: + "limitin Y f (f a) (atin X a) \ f a \ topspace Y \ (a \ topspace X \ (\V. openin Y V \ f a \ V \ (\U. openin X U \ a \ U \ f ` U \ V)))" - unfolding limit_atin by fastforce + unfolding limitin_atin by fastforce -lemma limit_trivial: - "\trivial_limit F; y \ topspace X\ \ limit X f y F" - by (simp add: limit_def) +lemma limitin_trivial: + "\trivial_limit F; y \ topspace X\ \ limitin X f y F" + by (simp add: limitin_def) -lemma limit_transform_eventually: - "\eventually (\x. f x = g x) F; limit X f l F\ \ limit X g l F" - unfolding limit_def using eventually_elim2 by fastforce +lemma limitin_transform_eventually: + "\eventually (\x. f x = g x) F; limitin X f l F\ \ limitin X g l F" + unfolding limitin_def using eventually_elim2 by fastforce lemma continuous_map_limit: - assumes "continuous_map X Y g" and f: "limit X f l F" - shows "limit Y (g \ f) (g l) F" + assumes "continuous_map X Y g" and f: "limitin X f l F" + shows "limitin Y (g \ f) (g l) F" proof - have "g l \ topspace Y" - by (meson assms continuous_map_def limit_in_topspace) + by (meson assms continuous_map_def limitin_topspace) moreover have "\U. \\V. openin X V \ l \ V \ (\\<^sub>F x in F. f x \ V); openin Y U; g l \ U\ \ \\<^sub>F x in F. g (f x) \ U" using assms eventually_mono - by (fastforce simp: limit_def dest!: openin_continuous_map_preimage) + by (fastforce simp: limitin_def dest!: openin_continuous_map_preimage) ultimately show ?thesis - using f by (fastforce simp add: limit_def) + using f by (fastforce simp add: limitin_def) qed @@ -171,9 +171,9 @@ "topcontinuous_at X Y f x \ x \ topspace X \ (\x \ topspace X. f x \ topspace Y) \ - limit Y f (f x) (atin X x)" + limitin Y f (f x) (atin X x)" unfolding topcontinuous_at_def - by (fastforce simp add: limit_atin)+ + by (fastforce simp add: limitin_atin)+ lemma continuous_map_eq_topcontinuous_at: "continuous_map X Y f \ (\x \ topspace X. topcontinuous_at X Y f x)" @@ -193,11 +193,11 @@ qed lemma continuous_map_atin: - "continuous_map X Y f \ (\x \ topspace X. limit Y f (f x) (atin X x))" - by (auto simp: limit_def topcontinuous_at_atin continuous_map_eq_topcontinuous_at) + "continuous_map X Y f \ (\x \ topspace X. limitin Y f (f x) (atin X x))" + by (auto simp: limitin_def topcontinuous_at_atin continuous_map_eq_topcontinuous_at) -lemma limit_continuous_map: - "\continuous_map X Y f; a \ topspace X; f a = b\ \ limit Y f b (atin X a)" +lemma limitin_continuous_map: + "\continuous_map X Y f; a \ topspace X; f a = b\ \ limitin Y f b (atin X a)" by (auto simp: continuous_map_atin)