# HG changeset patch # User paulson # Date 1697040153 -3600 # Node ID f229090cb8a3be70b0801dbac61d231d93306496 # Parent 23215f71ab69b84ee374137b6cf49cb674f3b0b3 atin now an abbreviation for atin_within, which has been moved to Abstract_Limits diff -r 23215f71ab69 -r f229090cb8a3 src/HOL/Analysis/Abstract_Limits.thy --- a/src/HOL/Analysis/Abstract_Limits.thy Wed Oct 11 14:25:14 2023 +0100 +++ b/src/HOL/Analysis/Abstract_Limits.thy Wed Oct 11 17:02:33 2023 +0100 @@ -9,9 +9,14 @@ where "nhdsin X a = (if a \ topspace X then (INF S\{S. openin X S \ a \ S}. principal S) else bot)" -definition atin :: "'a topology \ 'a \ 'a filter" - where "atin X a \ inf (nhdsin X a) (principal (topspace X - {a}))" +definition atin_within :: "['a topology, 'a, 'a set] \ 'a filter" + where "atin_within X a S = inf (nhdsin X a) (principal (topspace X \ S - {a}))" +abbreviation atin :: "'a topology \ 'a \ 'a filter" + where "atin X a \ atin_within X a UNIV" + +lemma atin_def: "atin X a = inf (nhdsin X a) (principal (topspace X - {a}))" + by (simp add: atin_within_def) lemma nhdsin_degenerate [simp]: "a \ topspace X \ nhdsin X a = bot" and atin_degenerate [simp]: "a \ topspace X \ atin X a = bot" @@ -28,18 +33,23 @@ finally show ?thesis using True by simp qed auto +lemma eventually_atin_within: + "eventually P (atin_within X a S) \ a \ topspace X \ (\T. openin X T \ a \ T \ (\x\T. x \ S \ x \ a \ P x))" +proof (cases "a \ topspace X") + case True + hence "eventually P (atin_within X a S) \ + (\T. openin X T \ a \ T \ + (\x\T. x \ topspace X \ x \ S \ x \ a \ P x))" + by (simp add: atin_within_def eventually_inf_principal eventually_nhdsin) + also have "\ \ (\T. openin X T \ a \ T \ (\x\T. x \ S \ x \ a \ P x))" + using openin_subset by (intro ex_cong) auto + finally show ?thesis by (simp add: True) +qed (simp add: atin_within_def) + lemma eventually_atin: "eventually P (atin X a) \ a \ topspace X \ (\U. openin X U \ a \ U \ (\x \ U - {a}. P x))" -proof (cases "a \ topspace X") - case True - hence "eventually P (atin X a) \ (\S. openin X S \ - a \ S \ (\x\S. x \ topspace X \ x \ a \ P x))" - by (simp add: atin_def eventually_inf_principal eventually_nhdsin) - also have "\ \ (\U. openin X U \ a \ U \ (\x \ U - {a}. P x))" - using openin_subset by (intro ex_cong) auto - finally show ?thesis by (simp add: True) -qed auto + by (auto simp add: eventually_atin_within) lemma nontrivial_limit_atin: "atin X a \ bot \ a \ X derived_set_of topspace X" @@ -64,12 +74,50 @@ qed qed +lemma eventually_atin_subtopology: + assumes "a \ topspace X" + shows "eventually P (atin (subtopology X S) a) \ + (a \ S \ (\U. openin (subtopology X S) U \ a \ U \ (\x\U - {a}. P x)))" + using assms by (simp add: eventually_atin) + +lemma eventually_within_imp: + "eventually P (atin_within X a S) \ eventually (\x. x \ S \ P x) (atin X a)" + by (auto simp add: eventually_atin_within eventually_atin) + +lemma atin_subtopology_within: + assumes "a \ S" + shows "atin (subtopology X S) a = atin_within X a S" +proof - + have "eventually P (atin (subtopology X S) a) \ eventually P (atin_within X a S)" for P + unfolding eventually_atin eventually_atin_within openin_subtopology + using assms by auto + then show ?thesis + by (meson le_filter_def order.eq_iff) +qed + +lemma atin_subtopology_within_if: + shows "atin (subtopology X S) a = (if a \ S then atin_within X a S else bot)" + by (simp add: atin_subtopology_within) + +lemma trivial_limit_atpointof_within: + "trivial_limit(atin_within X a S) \ + (a \ X derived_set_of S)" + by (auto simp: trivial_limit_def eventually_atin_within in_derived_set_of) + +lemma derived_set_of_trivial_limit: + "a \ X derived_set_of S \ \ trivial_limit(atin_within X a S)" + by (simp add: trivial_limit_atpointof_within) + subsection\Limits in a topological space\ 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_within_subset: + "\limitin X f l (atin_within Y a S); T \ S\ \ limitin X f l (atin_within Y a T)" + by (smt (verit) eventually_atin_within limitin_def subset_eq) + lemma limitinD: "\limitin X f l F; openin X U; l \ U\ \ eventually (\x. f x \ U) F" by (simp add: limitin_def) @@ -217,10 +265,7 @@ assume R: ?rhs then show ?lhs apply (auto simp: continuous_map_def topcontinuous_at_def) - apply (subst openin_subopen, safe) - apply (drule bspec, assumption) - using openin_subset[of X] apply (auto simp: subset_iff dest!: spec) - done + by (smt (verit, del_insts) mem_Collect_eq openin_subopen openin_subset subset_eq) qed lemma continuous_map_atin: @@ -231,6 +276,11 @@ "\continuous_map X Y f; a \ topspace X; f a = b\ \ limitin Y f b (atin X a)" by (auto simp: continuous_map_atin) +lemma limit_continuous_map_within: + "\continuous_map (subtopology X S) Y f; a \ S; a \ topspace X\ + \ limitin Y f (f a) (atin_within X a S)" + by (metis Int_iff atin_subtopology_within continuous_map_atin topspace_subtopology) + subsection\Combining theorems for continuous functions into the reals\ diff -r 23215f71ab69 -r f229090cb8a3 src/HOL/Analysis/Abstract_Metric_Spaces.thy --- a/src/HOL/Analysis/Abstract_Metric_Spaces.thy Wed Oct 11 14:25:14 2023 +0100 +++ b/src/HOL/Analysis/Abstract_Metric_Spaces.thy Wed Oct 11 17:02:33 2023 +0100 @@ -3371,74 +3371,6 @@ using empty_completely_metrizable_space by auto qed - -subsection \The "atin-within" filter for topologies\ - -(*FIXME: replace original definition of atin to be an abbreviation, like at / at_within - ("atin (_) (_)/ within (_)" [1000, 60] 60)*) -definition atin_within :: "['a topology, 'a, 'a set] \ 'a filter" - where "atin_within X a S = inf (nhdsin X a) (principal (topspace X \ S - {a}))" - -lemma atin_within_UNIV [simp]: - shows "atin_within X a UNIV = atin X a" - by (simp add: atin_def atin_within_def) - -lemma eventually_atin_subtopology: - assumes "a \ topspace X" - shows "eventually P (atin (subtopology X S) a) \ - (a \ S \ (\U. openin (subtopology X S) U \ a \ U \ (\x\U - {a}. P x)))" - using assms by (simp add: eventually_atin) - -lemma eventually_atin_within: - "eventually P (atin_within X a S) \ a \ topspace X \ (\T. openin X T \ a \ T \ (\x\T. x \ S \ x \ a \ P x))" -proof (cases "a \ topspace X") - case True - hence "eventually P (atin_within X a S) \ - (\T. openin X T \ a \ T \ - (\x\T. x \ topspace X \ x \ S \ x \ a \ P x))" - by (simp add: atin_within_def eventually_inf_principal eventually_nhdsin) - also have "\ \ (\T. openin X T \ a \ T \ (\x\T. x \ S \ x \ a \ P x))" - using openin_subset by (intro ex_cong) auto - finally show ?thesis by (simp add: True) -qed (simp add: atin_within_def) - -lemma eventually_within_imp: - "eventually P (atin_within X a S) \ eventually (\x. x \ S \ P x) (atin X a)" - by (auto simp add: eventually_atin_within eventually_atin) - -lemma limit_within_subset: - "\limitin X f l (atin_within Y a S); T \ S\ \ limitin X f l (atin_within Y a T)" - by (smt (verit) eventually_atin_within limitin_def subset_eq) - -lemma atin_subtopology_within: - assumes "a \ S" - shows "atin (subtopology X S) a = atin_within X a S" -proof - - have "eventually P (atin (subtopology X S) a) \ eventually P (atin_within X a S)" for P - unfolding eventually_atin eventually_atin_within openin_subtopology - using assms by auto - then show ?thesis - by (meson le_filter_def order.eq_iff) -qed - -lemma limit_continuous_map_within: - "\continuous_map (subtopology X S) Y f; a \ S; a \ topspace X\ - \ limitin Y f (f a) (atin_within X a S)" - by (metis Int_iff atin_subtopology_within continuous_map_atin topspace_subtopology) - -lemma atin_subtopology_within_if: - shows "atin (subtopology X S) a = (if a \ S then atin_within X a S else bot)" - by (simp add: atin_subtopology_within) - -lemma trivial_limit_atpointof_within: - "trivial_limit(atin_within X a S) \ - (a \ X derived_set_of S)" - by (auto simp: trivial_limit_def eventually_atin_within in_derived_set_of) - -lemma derived_set_of_trivial_limit: - "a \ X derived_set_of S \ \ trivial_limit(atin_within X a S)" - by (simp add: trivial_limit_atpointof_within) - subsection\More sequential characterizations in a metric space\ diff -r 23215f71ab69 -r f229090cb8a3 src/HOL/Analysis/Urysohn.thy --- a/src/HOL/Analysis/Urysohn.thy Wed Oct 11 14:25:14 2023 +0100 +++ b/src/HOL/Analysis/Urysohn.thy Wed Oct 11 17:02:33 2023 +0100 @@ -4562,8 +4562,7 @@ with that \a \ topspace X\ obtain U where U: "openin X U" "a \ U" "l \ M" and Uless: "\x\U - {a}. x \ S \ f x \ M \ d (f x) l < \/2" - unfolding limitin_metric eventually_within_imp eventually_atin - using half_gt_zero by blast + unfolding limitin_metric eventually_atin_within by (metis Diff_iff insertI1 half_gt_zero [OF \\>0\]) show "\U. openin X U \ a \ U \ (\x\S \ U - {a}. \y\S \ U - {a}. d (f x) (f y) < \)" proof (intro exI strip conjI) fix x y @@ -4653,7 +4652,7 @@ qed ultimately show "\\<^sub>F x in atin_within X a S. f x \ M \ d (f x) b < \" using fim U - apply (simp add: eventually_atin eventually_within_imp del: divide_const_simps flip: image_subset_iff_funcset) + apply (simp add: eventually_atin_within del: divide_const_simps flip: image_subset_iff_funcset) by (smt (verit, del_insts) Diff_iff Int_iff imageI insertI1 openin_subset subsetD) qed then show ?thesis ..