src/HOL/Analysis/Sparse_In.thy
changeset 82137 7281e57085ab
parent 81150 3dd8035578b8
equal deleted inserted replaced
82136:b97cea26d3a3 82137:7281e57085ab
    87   assumes "open D" "pts sparse_in D" 
    87   assumes "open D" "pts sparse_in D" 
    88   shows "open (D - pts)"
    88   shows "open (D - pts)"
    89   using assms sparse_imp_closedin_pts
    89   using assms sparse_imp_closedin_pts
    90   by (metis Diff_Diff_Int Diff_cancel Diff_eq_empty_iff Diff_subset 
    90   by (metis Diff_Diff_Int Diff_cancel Diff_eq_empty_iff Diff_subset 
    91       closedin_def double_diff openin_open_eq topspace_euclidean_subtopology)
    91       closedin_def double_diff openin_open_eq topspace_euclidean_subtopology)
       
    92 
       
    93 lemma sparse_in_UNIV_imp_closed: "X sparse_in UNIV \<Longrightarrow> closed X"
       
    94   by (simp add: Compl_eq_Diff_UNIV closed_open open_diff_sparse_pts)
       
    95 
    92 
    96 
    93 lemma sparse_imp_countable:
    97 lemma sparse_imp_countable:
    94   fixes D::"'a ::euclidean_space set"
    98   fixes D::"'a ::euclidean_space set"
    95   assumes  "open D" "pts sparse_in D"
    99   assumes  "open D" "pts sparse_in D"
    96   shows "countable (D \<inter> pts)"
   100   shows "countable (D \<inter> pts)"
   194   unfolding eventually_cosparse
   198   unfolding eventually_cosparse
   195   by (subst sparse_in_open) (auto simp: islimpt_conv_frequently_at frequently_def)
   199   by (subst sparse_in_open) (auto simp: islimpt_conv_frequently_at frequently_def)
   196 
   200 
   197 lemma eventually_cosparse_imp_eventually_at:
   201 lemma eventually_cosparse_imp_eventually_at:
   198   "eventually P (cosparse A) \<Longrightarrow> x \<in> A \<Longrightarrow> eventually P (at x within B)"
   202   "eventually P (cosparse A) \<Longrightarrow> x \<in> A \<Longrightarrow> eventually P (at x within B)"
   199   unfolding eventually_cosparse sparse_in_def
   203   unfolding eventually_cosparse sparse_in_def islimpt_def eventually_at_topological 
   200   apply (auto simp: islimpt_conv_frequently_at frequently_def)
   204   by fastforce
   201    apply (metis UNIV_I eventually_at_topological)
       
   202   done
       
   203 
   205 
   204 lemma eventually_in_cosparse:
   206 lemma eventually_in_cosparse:
   205   assumes "A \<subseteq> X" "open A"
   207   assumes "A \<subseteq> X" "open A"
   206   shows   "eventually (\<lambda>x. x \<in> X) (cosparse A)"
   208   shows   "eventually (\<lambda>x. x \<in> X) (cosparse A)"
   207 proof -
   209 proof -
   225   by (rule filter_eqI) (auto simp: eventually_cosparse sparse_in_def)
   227   by (rule filter_eqI) (auto simp: eventually_cosparse sparse_in_def)
   226 
   228 
   227 lemma cosparse_eq_bot_iff' [simp]: "cosparse (A :: 'a :: perfect_space set) = bot \<longleftrightarrow> A = {}"
   229 lemma cosparse_eq_bot_iff' [simp]: "cosparse (A :: 'a :: perfect_space set) = bot \<longleftrightarrow> A = {}"
   228   by (auto simp: cosparse_eq_bot_iff not_open_singleton)
   230   by (auto simp: cosparse_eq_bot_iff not_open_singleton)
   229 
   231 
   230 
       
   231 end
   232 end