1
+ \<^marker >\<open>creator "Niklas Krofta"\<close>
2
+ \<^marker >\<open>contributor "Kevin Kappelmann"\<close>
3
+ theory HOTG_Cardinals_Less_Than
4
+ imports
5
+ HOTG_Cantor_Schroeder_Bernstein
6
+ begin
7
+
8
+ lemma cardinality_le_if_injective_onI :
9
+ assumes "(X \<Rightarrow> Y) (f :: _ \<Rightarrow> _)"
10
+ and inj_f : "injective_on X f"
11
+ shows "|X| \<le> |Y|"
12
+ proof ( rule ccontr )
13
+ assume "\<not>(|X| \<le> |Y|)"
14
+ then have "|Y| < |X|" using ordinal_cardinality lt_if_not_le_if_ordinal by blast
15
+ then have "|Y| \<subseteq> |X|" using ordinal_cardinality le_iff_subset_if_ordinal le_if_lt by blast
16
+ obtain g \<^sub >X h \<^sub >X :: "set \<Rightarrow> set" where bijX : "bijection_on |X| X g\<^sub>X h\<^sub>X"
17
+ using cardinality_equipollent_self by blast
18
+ obtain g \<^sub >Y h \<^sub >Y :: "set \<Rightarrow> set" where bijY : "bijection_on |Y| Y g\<^sub>Y h\<^sub>Y"
19
+ using cardinality_equipollent_self by blast
20
+ have "(|X| \<Rightarrow> X) g\<^sub>X" "injective_on |X| g\<^sub>X" using injective_on_if_bijection_on_left bijX by auto
21
+ with inj_f have "injective_on |X| (f \<circ> g\<^sub>X)" using injective_on_comp_if_injective_onI by auto
22
+ moreover have "(|X| \<Rightarrow> Y) (f \<circ> g\<^sub>X)" using \<open>(|X| \<Rightarrow> X) g\<^sub>X\<close> \<open>(X \<Rightarrow> Y) f\<close> by force
23
+ moreover from bijY have "(Y \<Rightarrow> |Y|) h\<^sub>Y" "injective_on Y h\<^sub>Y"
24
+ using injective_on_if_bijection_on_right by auto
25
+ ultimately have "injective_on |X| (h\<^sub>Y \<circ> (f \<circ> g\<^sub>X))" using injective_on_comp_if_injective_onI by auto
26
+ moreover have "(|X| \<Rightarrow> |Y|) (h\<^sub>Y \<circ> (f \<circ> g\<^sub>X))" using \<open>(|X| \<Rightarrow> Y) (f \<circ> g\<^sub>X)\<close> \<open>(Y \<Rightarrow> |Y|) h\<^sub>Y\<close> by force
27
+ ultimately have "|X| \<approx> |Y|"
28
+ using \<open>|Y| \<subseteq> |X|\<close> equipollent_if_subset_if_injective_on_if_mono_wrt by blast
29
+ then have "|X| = |Y|" using cardinality_eq_if_equipollent by force
30
+ then show "False" using \<open>\<not>(|X| \<le> |Y|)\<close> by auto
31
+ qed
32
+
33
+ lemma injective_on_if_cardinality_leE :
34
+ assumes "|X| \<le> |Y|"
35
+ obtains f :: "_ \<Rightarrow> _" where "(X \<Rightarrow> Y) f" "injective_on X f"
36
+ proof -
37
+ obtain g \<^sub >X h \<^sub >X :: "set \<Rightarrow> set" where bijX : "bijection_on |X| X g\<^sub>X h\<^sub>X"
38
+ using cardinality_equipollent_self by blast
39
+ obtain g \<^sub >Y h \<^sub >Y :: "set \<Rightarrow> set" where bijY : "bijection_on |Y| Y g\<^sub>Y h\<^sub>Y"
40
+ using cardinality_equipollent_self by blast
41
+ have "(X \<Rightarrow> |X|) h\<^sub>X" "injective_on X h\<^sub>X" using injective_on_if_bijection_on_right bijX by auto
42
+ have "(|Y| \<Rightarrow> Y) g\<^sub>Y" "injective_on |Y| g\<^sub>Y" using injective_on_if_bijection_on_left bijY by auto
43
+ from assms have "|X| \<subseteq> |Y|" using ordinal_cardinality le_iff_subset_if_ordinal by blast
44
+ then have "(X \<Rightarrow> |Y|) h\<^sub>X" using \<open>(X \<Rightarrow> |X|) h\<^sub>X\<close> by auto
45
+ then have "injective_on X (g\<^sub>Y \<circ> h\<^sub>X)"
46
+ using \<open>injective_on X h\<^sub>X\<close> \<open>injective_on |Y| g\<^sub>Y\<close> injective_on_comp_if_injective_onI by auto
47
+ moreover have "(X \<Rightarrow> Y) (g\<^sub>Y \<circ> h\<^sub>X)" using \<open>(X \<Rightarrow> |Y|) h\<^sub>X\<close> \<open>(|Y| \<Rightarrow> Y) g\<^sub>Y\<close> by force
48
+ ultimately show ?thesis using that by auto
49
+ qed
50
+
51
+ corollary cardinality_le_iff_ex_injective_on :
52
+ "|X| \<le> |Y| \<longleftrightarrow> (\<exists>(f :: _ \<Rightarrow> _) : X \<Rightarrow> Y. injective_on X f)"
53
+ using cardinality_le_if_injective_onI by ( auto elim : injective_on_if_cardinality_leE )
54
+
55
+ end
0 commit comments