diff -r b67bab2b132c -r 4900351361b0 src/HOL/Library/Countable_Set.thy --- a/src/HOL/Library/Countable_Set.thy Tue Apr 16 19:50:30 2019 +0000 +++ b/src/HOL/Library/Countable_Set.thy Wed Apr 17 17:48:28 2019 +0100 @@ -195,6 +195,23 @@ lemma countable_image_inj_on: "countable (f ` A) \ inj_on f A \ countable A" by (metis countable_image the_inv_into_onto) +lemma countable_image_inj_Int_vimage: + "\inj_on f S; countable A\ \ countable (S \ f -` A)" + by (meson countable_image_inj_on countable_subset image_subset_iff_subset_vimage inf_le2 inj_on_Int) + +lemma countable_image_inj_gen: + "\inj_on f S; countable A\ \ countable {x \ S. f x \ A}" + using countable_image_inj_Int_vimage + by (auto simp: vimage_def Collect_conj_eq) + +lemma countable_image_inj_eq: + "inj_on f S \ countable(f ` S) \ countable S" + using countable_image_inj_on by blast + +lemma countable_image_inj: + "\countable A; inj f\ \ countable {x. f x \ A}" + by (metis (mono_tags, lifting) countable_image_inj_eq countable_subset image_Collect_subsetI inj_on_inverseI the_inv_f_f) + lemma countable_UN[intro, simp]: fixes I :: "'i set" and A :: "'i => 'a set" assumes I: "countable I" @@ -320,6 +337,39 @@ then show ?lhs by force qed +lemma ex_subset_image_inj: + "(\T. T \ f ` S \ P T) \ (\T. T \ S \ inj_on f T \ P (f ` T))" + by (auto simp: subset_image_inj) + +lemma all_subset_image_inj: + "(\T. T \ f ` S \ P T) \ (\T. T \ S \ inj_on f T \ P(f ` T))" + by (metis subset_image_inj) + +lemma ex_countable_subset_image_inj: + "(\T. countable T \ T \ f ` S \ P T) \ + (\T. countable T \ T \ S \ inj_on f T \ P (f ` T))" + by (metis countable_image_inj_eq subset_image_inj) + +lemma all_countable_subset_image_inj: + "(\T. countable T \ T \ f ` S \ P T) \ (\T. countable T \ T \ S \ inj_on f T \P(f ` T))" + by (metis countable_image_inj_eq subset_image_inj) + +lemma ex_countable_subset_image: + "(\T. countable T \ T \ f ` S \ P T) \ (\T. countable T \ T \ S \ P (f ` T))" + by (metis countable_subset_image) + +lemma all_countable_subset_image: + "(\T. countable T \ T \ f ` S \ P T) \ (\T. countable T \ T \ S \ P(f ` T))" + by (metis countable_subset_image) + +lemma countable_image_eq: + "countable(f ` S) \ (\T. countable T \ T \ S \ f ` S = f ` T)" + by (metis countable_image countable_image_inj_eq order_refl subset_image_inj) + +lemma countable_image_eq_inj: + "countable(f ` S) \ (\T. countable T \ T \ S \ f ` S = f ` T \ inj_on f T)" + by (metis countable_image_inj_eq order_refl subset_image_inj) + lemma infinite_countable_subset': assumes X: "infinite X" shows "\C\X. countable C \ infinite C" proof -