src/HOL/Library/Zorn.thy
changeset 18143 fe14f0282c60
parent 17200 3a4d03d1a31b
child 18585 5d379fe2eb74
equal deleted inserted replaced
18142:a51ab4152097 18143:fe14f0282c60
    41 
    41 
    42 
    42 
    43 subsection{*Mathematical Preamble*}
    43 subsection{*Mathematical Preamble*}
    44 
    44 
    45 lemma Union_lemma0:
    45 lemma Union_lemma0:
    46     "(\<forall>x \<in> C. x \<subseteq> A | B \<subseteq> x) ==> Union(C)<=A | B \<subseteq> Union(C)"
    46     "(\<forall>x \<in> C. x \<subseteq> A | B \<subseteq> x) ==> Union(C) \<subseteq> A | B \<subseteq> Union(C)"
    47   by blast
    47   by blast
    48 
    48 
    49 
    49 
    50 text{*This is theorem @{text increasingD2} of ZF/Zorn.thy*}
    50 text{*This is theorem @{text increasingD2} of ZF/Zorn.thy*}
    51 
    51 
   127 
   127 
   128 text{*Property 3.3 of section 3.3*}
   128 text{*Property 3.3 of section 3.3*}
   129 lemma equal_succ_Union: "m \<in> TFin S ==> (m = succ S m) = (m = Union(TFin S))"
   129 lemma equal_succ_Union: "m \<in> TFin S ==> (m = succ S m) = (m = Union(TFin S))"
   130   apply (rule iffI)
   130   apply (rule iffI)
   131    apply (rule Union_upper [THEN equalityI])
   131    apply (rule Union_upper [THEN equalityI])
   132     apply (rule_tac [2] eq_succ_upper [THEN Union_least])
   132     apply assumption
   133       apply (assumption+)
   133    apply (rule eq_succ_upper [THEN Union_least], assumption+)
   134   apply (erule ssubst)
   134   apply (erule ssubst)
   135   apply (rule Abrial_axiom1 [THEN equalityI])
   135   apply (rule Abrial_axiom1 [THEN equalityI])
   136   apply (blast del: subsetI intro: subsetI TFin_UnionI TFin.succI)
   136   apply (blast del: subsetI intro: subsetI TFin_UnionI TFin.succI)
   137   done
   137   done
   138 
   138 
   151   by (unfold maxchain_def) blast
   151   by (unfold maxchain_def) blast
   152 
   152 
   153 lemma mem_super_Ex: "c \<in> chain S - maxchain S ==> ? d. d \<in> super S c"
   153 lemma mem_super_Ex: "c \<in> chain S - maxchain S ==> ? d. d \<in> super S c"
   154   by (unfold super_def maxchain_def) auto
   154   by (unfold super_def maxchain_def) auto
   155 
   155 
   156 lemma select_super: "c \<in> chain S - maxchain S ==>
   156 lemma select_super:
   157                           (\<some>c'. c': super S c): super S c"
   157      "c \<in> chain S - maxchain S ==> (\<some>c'. c': super S c): super S c"
   158   apply (erule mem_super_Ex [THEN exE])
   158   apply (erule mem_super_Ex [THEN exE])
   159   apply (rule someI2, auto)
   159   apply (rule someI2, auto)
   160   done
   160   done
   161 
   161 
   162 lemma select_not_equals: "c \<in> chain S - maxchain S ==>
   162 lemma select_not_equals:
   163                           (\<some>c'. c': super S c) \<noteq> c"
   163      "c \<in> chain S - maxchain S ==> (\<some>c'. c': super S c) \<noteq> c"
   164   apply (rule notI)
   164   apply (rule notI)
   165   apply (drule select_super)
   165   apply (drule select_super)
   166   apply (simp add: super_def psubset_def)
   166   apply (simp add: super_def psubset_def)
   167   done
   167   done
   168 
   168 
   184    apply (rule_tac [2] m1 = Xa and n1 = X in TFin_subset_linear [THEN disjE],
   184    apply (rule_tac [2] m1 = Xa and n1 = X in TFin_subset_linear [THEN disjE],
   185      blast+)
   185      blast+)
   186   done
   186   done
   187 
   187 
   188 theorem Hausdorff: "\<exists>c. (c :: 'a set set): maxchain S"
   188 theorem Hausdorff: "\<exists>c. (c :: 'a set set): maxchain S"
   189   apply (rule_tac x = "Union (TFin S) " in exI)
   189   apply (rule_tac x = "Union (TFin S)" in exI)
   190   apply (rule classical)
   190   apply (rule classical)
   191   apply (subgoal_tac "succ S (Union (TFin S)) = Union (TFin S) ")
   191   apply (subgoal_tac "succ S (Union (TFin S)) = Union (TFin S) ")
   192    prefer 2
   192    prefer 2
   193    apply (blast intro!: TFin_UnionI equal_succ_Union [THEN iffD2, symmetric])
   193    apply (blast intro!: TFin_UnionI equal_succ_Union [THEN iffD2, symmetric])
   194   apply (cut_tac subset_refl [THEN TFin_UnionI, THEN TFin_chain_lemma4])
   194   apply (cut_tac subset_refl [THEN TFin_UnionI, THEN TFin_chain_lemma4])
   199 subsection{*Zorn's Lemma: If All Chains Have Upper Bounds Then
   199 subsection{*Zorn's Lemma: If All Chains Have Upper Bounds Then
   200                                There Is  a Maximal Element*}
   200                                There Is  a Maximal Element*}
   201 
   201 
   202 lemma chain_extend:
   202 lemma chain_extend:
   203     "[| c \<in> chain S; z \<in> S;
   203     "[| c \<in> chain S; z \<in> S;
   204         \<forall>x \<in> c. x<=(z:: 'a set) |] ==> {z} Un c \<in> chain S"
   204         \<forall>x \<in> c. x \<subseteq> (z:: 'a set) |] ==> {z} Un c \<in> chain S"
   205   by (unfold chain_def) blast
   205   by (unfold chain_def) blast
   206 
   206 
   207 lemma chain_Union_upper: "[| c \<in> chain S; x \<in> c |] ==> x \<subseteq> Union(c)"
   207 lemma chain_Union_upper: "[| c \<in> chain S; x \<in> c |] ==> x \<subseteq> Union(c)"
   208   by (unfold chain_def) auto
   208   by (unfold chain_def) auto
   209 
   209 
   213 lemma maxchain_Zorn:
   213 lemma maxchain_Zorn:
   214      "[| c \<in> maxchain S; u \<in> S; Union(c) \<subseteq> u |] ==> Union(c) = u"
   214      "[| c \<in> maxchain S; u \<in> S; Union(c) \<subseteq> u |] ==> Union(c) = u"
   215   apply (rule ccontr)
   215   apply (rule ccontr)
   216   apply (simp add: maxchain_def)
   216   apply (simp add: maxchain_def)
   217   apply (erule conjE)
   217   apply (erule conjE)
   218   apply (subgoal_tac " ({u} Un c) \<in> super S c")
   218   apply (subgoal_tac "({u} Un c) \<in> super S c")
   219    apply simp
   219    apply simp
   220   apply (unfold super_def psubset_def)
   220   apply (unfold super_def psubset_def)
   221   apply (blast intro: chain_extend dest: chain_Union_upper)
   221   apply (blast intro: chain_extend dest: chain_Union_upper)
   222   done
   222   done
   223 
   223 
   225     "\<forall>c \<in> chain S. Union(c): S ==> \<exists>y \<in> S. \<forall>z \<in> S. y \<subseteq> z --> y = z"
   225     "\<forall>c \<in> chain S. Union(c): S ==> \<exists>y \<in> S. \<forall>z \<in> S. y \<subseteq> z --> y = z"
   226   apply (cut_tac Hausdorff maxchain_subset_chain)
   226   apply (cut_tac Hausdorff maxchain_subset_chain)
   227   apply (erule exE)
   227   apply (erule exE)
   228   apply (drule subsetD, assumption)
   228   apply (drule subsetD, assumption)
   229   apply (drule bspec, assumption)
   229   apply (drule bspec, assumption)
   230   apply (rule_tac x = "Union (c) " in bexI)
   230   apply (rule_tac x = "Union(c)" in bexI)
   231    apply (rule ballI, rule impI)
   231    apply (rule ballI, rule impI)
   232    apply (blast dest!: maxchain_Zorn, assumption)
   232    apply (blast dest!: maxchain_Zorn, assumption)
   233   done
   233   done
   234 
   234 
   235 subsection{*Alternative version of Zorn's Lemma*}
   235 subsection{*Alternative version of Zorn's Lemma*}