src/ZF/Cardinal_AC.thy
changeset 46954 d8b3412cdb99
parent 46821 ff6b0c1087f2
child 46963 67da5904300a
equal deleted inserted replaced
46953:2b6e55924af3 46954:d8b3412cdb99
     9 
     9 
    10 theory Cardinal_AC imports CardinalArith Zorn begin
    10 theory Cardinal_AC imports CardinalArith Zorn begin
    11 
    11 
    12 subsection{*Strengthened Forms of Existing Theorems on Cardinals*}
    12 subsection{*Strengthened Forms of Existing Theorems on Cardinals*}
    13 
    13 
    14 lemma cardinal_eqpoll: "|A| eqpoll A"
    14 lemma cardinal_eqpoll: "|A| \<approx> A"
    15 apply (rule AC_well_ord [THEN exE])
    15 apply (rule AC_well_ord [THEN exE])
    16 apply (erule well_ord_cardinal_eqpoll)
    16 apply (erule well_ord_cardinal_eqpoll)
    17 done
    17 done
    18 
    18 
    19 text{*The theorem @{term "||A|| = |A|"} *}
    19 text{*The theorem @{term "||A|| = |A|"} *}
    20 lemmas cardinal_idem = cardinal_eqpoll [THEN cardinal_cong, simp]
    20 lemmas cardinal_idem = cardinal_eqpoll [THEN cardinal_cong, simp]
    21 
    21 
    22 lemma cardinal_eqE: "|X| = |Y| ==> X eqpoll Y"
    22 lemma cardinal_eqE: "|X| = |Y| ==> X \<approx> Y"
    23 apply (rule AC_well_ord [THEN exE])
    23 apply (rule AC_well_ord [THEN exE])
    24 apply (rule AC_well_ord [THEN exE])
    24 apply (rule AC_well_ord [THEN exE])
    25 apply (rule well_ord_cardinal_eqE, assumption+)
    25 apply (rule well_ord_cardinal_eqE, assumption+)
    26 done
    26 done
    27 
    27 
    28 lemma cardinal_eqpoll_iff: "|X| = |Y| \<longleftrightarrow> X eqpoll Y"
    28 lemma cardinal_eqpoll_iff: "|X| = |Y| \<longleftrightarrow> X \<approx> Y"
    29 by (blast intro: cardinal_cong cardinal_eqE)
    29 by (blast intro: cardinal_cong cardinal_eqE)
    30 
    30 
    31 lemma cardinal_disjoint_Un:
    31 lemma cardinal_disjoint_Un:
    32      "[| |A|=|B|;  |C|=|D|;  A \<inter> C = 0;  B \<inter> D = 0 |]
    32      "[| |A|=|B|;  |C|=|D|;  A \<inter> C = 0;  B \<inter> D = 0 |]
    33       ==> |A \<union> C| = |B \<union> D|"
    33       ==> |A \<union> C| = |B \<union> D|"
    34 by (simp add: cardinal_eqpoll_iff eqpoll_disjoint_Un)
    34 by (simp add: cardinal_eqpoll_iff eqpoll_disjoint_Un)
    35 
    35 
    36 lemma lepoll_imp_Card_le: "A lepoll B ==> |A| \<le> |B|"
    36 lemma lepoll_imp_Card_le: "A \<lesssim> B ==> |A| \<le> |B|"
    37 apply (rule AC_well_ord [THEN exE])
    37 apply (rule AC_well_ord [THEN exE])
    38 apply (erule well_ord_lepoll_imp_Card_le, assumption)
    38 apply (erule well_ord_lepoll_imp_Card_le, assumption)
    39 done
    39 done
    40 
    40 
    41 lemma cadd_assoc: "(i \<oplus> j) \<oplus> k = i \<oplus> (j \<oplus> k)"
    41 lemma cadd_assoc: "(i \<oplus> j) \<oplus> k = i \<oplus> (j \<oplus> k)"
    57 apply (rule AC_well_ord [THEN exE])
    57 apply (rule AC_well_ord [THEN exE])
    58 apply (rule AC_well_ord [THEN exE])
    58 apply (rule AC_well_ord [THEN exE])
    59 apply (rule well_ord_cadd_cmult_distrib, assumption+)
    59 apply (rule well_ord_cadd_cmult_distrib, assumption+)
    60 done
    60 done
    61 
    61 
    62 lemma InfCard_square_eq: "InfCard(|A|) ==> A*A eqpoll A"
    62 lemma InfCard_square_eq: "InfCard(|A|) ==> A*A \<approx> A"
    63 apply (rule AC_well_ord [THEN exE])
    63 apply (rule AC_well_ord [THEN exE])
    64 apply (erule well_ord_InfCard_square_eq, assumption)
    64 apply (erule well_ord_InfCard_square_eq, assumption)
    65 done
    65 done
    66 
    66 
    67 
    67 
    68 subsection {*The relationship between cardinality and le-pollence*}
    68 subsection {*The relationship between cardinality and le-pollence*}
    69 
    69 
    70 lemma Card_le_imp_lepoll: "|A| \<le> |B| ==> A lepoll B"
    70 lemma Card_le_imp_lepoll:
    71 apply (rule cardinal_eqpoll
    71   assumes "|A| \<le> |B|" shows "A \<lesssim> B"
    72               [THEN eqpoll_sym, THEN eqpoll_imp_lepoll, THEN lepoll_trans])
    72 proof -
    73 apply (erule le_imp_subset [THEN subset_imp_lepoll, THEN lepoll_trans])
    73   have "A \<approx> |A|" 
    74 apply (rule cardinal_eqpoll [THEN eqpoll_imp_lepoll])
    74     by (rule cardinal_eqpoll [THEN eqpoll_sym])
    75 done
    75   also have "... \<lesssim> |B|"
    76 
    76     by (rule le_imp_subset [THEN subset_imp_lepoll]) (rule assms)
    77 lemma le_Card_iff: "Card(K) ==> |A| \<le> K \<longleftrightarrow> A lepoll K"
    77   also have "... \<approx> B" 
       
    78     by (rule cardinal_eqpoll)
       
    79   finally show ?thesis .
       
    80 qed
       
    81 
       
    82 lemma le_Card_iff: "Card(K) ==> |A| \<le> K \<longleftrightarrow> A \<lesssim> K"
    78 apply (erule Card_cardinal_eq [THEN subst], rule iffI,
    83 apply (erule Card_cardinal_eq [THEN subst], rule iffI,
    79        erule Card_le_imp_lepoll)
    84        erule Card_le_imp_lepoll)
    80 apply (erule lepoll_imp_Card_le)
    85 apply (erule lepoll_imp_Card_le)
    81 done
    86 done
    82 
    87 
    83 lemma cardinal_0_iff_0 [simp]: "|A| = 0 \<longleftrightarrow> A = 0";
    88 lemma cardinal_0_iff_0 [simp]: "|A| = 0 \<longleftrightarrow> A = 0"
    84 apply auto
    89 apply auto
    85 apply (drule cardinal_0 [THEN ssubst])
    90 apply (drule cardinal_0 [THEN ssubst])
    86 apply (blast intro: eqpoll_0_iff [THEN iffD1] cardinal_eqpoll_iff [THEN iffD1])
    91 apply (blast intro: eqpoll_0_iff [THEN iffD1] cardinal_eqpoll_iff [THEN iffD1])
    87 done
    92 done
    88 
    93 
    89 lemma cardinal_lt_iff_lesspoll: "Ord(i) ==> i < |A| \<longleftrightarrow> i lesspoll A"
    94 lemma cardinal_lt_iff_lesspoll:
    90 apply (cut_tac A = "A" in cardinal_eqpoll)
    95   assumes i: "Ord(i)" shows "i < |A| \<longleftrightarrow> i \<prec> A"
    91 apply (auto simp add: eqpoll_iff)
    96 proof
    92 apply (blast intro: lesspoll_trans2 lt_Card_imp_lesspoll Card_cardinal)
    97   assume "i < |A|"
    93 apply (force intro: cardinal_lt_imp_lt lesspoll_cardinal_lt lesspoll_trans2
    98   hence  "i \<prec> |A|" 
    94              simp add: cardinal_idem)
    99     by (blast intro: lt_Card_imp_lesspoll Card_cardinal) 
    95 done
   100   also have "...  \<approx> A" 
       
   101     by (rule cardinal_eqpoll)
       
   102   finally show "i \<prec> A" .
       
   103 next
       
   104   assume "i \<prec> A"
       
   105   also have "...  \<approx> |A|" 
       
   106     by (blast intro: cardinal_eqpoll eqpoll_sym) 
       
   107   finally have "i \<prec> |A|" .
       
   108   thus  "i < |A|" using i
       
   109     by (force intro: cardinal_lt_imp_lt lesspoll_cardinal_lt)
       
   110 qed
    96 
   111 
    97 lemma cardinal_le_imp_lepoll: " i \<le> |A| ==> i \<lesssim> A"
   112 lemma cardinal_le_imp_lepoll: " i \<le> |A| ==> i \<lesssim> A"
    98 apply (blast intro: lt_Ord Card_le_imp_lepoll Ord_cardinal_le le_trans)
   113   by (blast intro: lt_Ord Card_le_imp_lepoll Ord_cardinal_le le_trans)
    99 done
       
   100 
   114 
   101 
   115 
   102 subsection{*Other Applications of AC*}
   116 subsection{*Other Applications of AC*}
   103 
   117 
   104 lemma surj_implies_inj: "f: surj(X,Y) ==> \<exists>g. g: inj(Y,X)"
   118 lemma surj_implies_inj: "f: surj(X,Y) ==> \<exists>g. g: inj(Y,X)"
   162 
   176 
   163 (** Main result for infinite-branching datatypes.  As above, but the index
   177 (** Main result for infinite-branching datatypes.  As above, but the index
   164     set need not be a cardinal.  Surprisingly complicated proof!
   178     set need not be a cardinal.  Surprisingly complicated proof!
   165 **)
   179 **)
   166 
   180 
   167 (*Work backwards along the injection from W into K, given that @{term"W\<noteq>0"}.*)
   181 text{*Work backwards along the injection from @{term W} into @{term K}, given that @{term"W\<noteq>0"}.*}
       
   182 
   168 lemma inj_UN_subset:
   183 lemma inj_UN_subset:
   169      "[| f: inj(A,B);  a:A |] ==>
   184   assumes f: "f \<in> inj(A,B)" and a: "a \<in> A"
   170       (\<Union>x\<in>A. C(x)) \<subseteq> (\<Union>y\<in>B. C(if y: range(f) then converse(f)`y else a))"
   185   shows "(\<Union>x\<in>A. C(x)) \<subseteq> (\<Union>y\<in>B. C(if y \<in> range(f) then converse(f)`y else a))"
   171 apply (rule UN_least)
   186 proof (rule UN_least)
   172 apply (rule_tac x1= "f`x" in subset_trans [OF _ UN_upper])
   187   fix x
   173  apply (simp add: inj_is_fun [THEN apply_rangeI])
   188   assume x: "x \<in> A"
   174 apply (blast intro: inj_is_fun [THEN apply_type])
   189   hence fx: "f ` x \<in> B" by (blast intro: f inj_is_fun [THEN apply_type])
   175 done
   190   have "C(x) \<subseteq> C(if f ` x \<in> range(f) then converse(f) ` (f ` x) else a)" 
       
   191     using f x by (simp add: inj_is_fun [THEN apply_rangeI])
       
   192   also have "... \<subseteq> (\<Union>y\<in>B. C(if y \<in> range(f) then converse(f) ` y else a))"
       
   193     by (rule UN_upper [OF fx]) 
       
   194   finally show "C(x) \<subseteq> (\<Union>y\<in>B. C(if y \<in> range(f) then converse(f)`y else a))" .
       
   195 qed
   176 
   196 
   177 (*Simpler to require |W|=K; we'd have a bijection; but the theorem would
   197 (*Simpler to require |W|=K; we'd have a bijection; but the theorem would
   178   be weaker.*)
   198   be weaker.*)
   179 lemma le_UN_Ord_lt_csucc:
   199 lemma le_UN_Ord_lt_csucc:
   180      "[| InfCard(K);  |W| \<le> K;  \<forall>w\<in>W. j(w) < csucc(K) |]
   200      "[| InfCard(K);  |W| \<le> K;  \<forall>w\<in>W. j(w) < csucc(K) |]