src/ZF/AC/HH.thy
author haftmann
Fri, 25 Jul 2008 07:35:53 +0200
changeset 27678 85ea2be46c71
parent 24894 163c82d039cf
child 32960 69916a850301
permissions -rw-r--r--
dropped locale (open)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
     1
(*  Title:      ZF/AC/HH.thy
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     2
    ID:         $Id$
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
     3
    Author:     Krzysztof Grabczewski
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     4
12776
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
     5
Some properties of the recursive definition of HH used in the proofs of
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     6
  AC17 ==> AC1
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     7
  AC1 ==> WO2
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     8
  AC15 ==> WO6
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     9
*)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    10
27678
85ea2be46c71 dropped locale (open)
haftmann
parents: 24894
diff changeset
    11
theory HH
85ea2be46c71 dropped locale (open)
haftmann
parents: 24894
diff changeset
    12
imports AC_Equiv Hartog
85ea2be46c71 dropped locale (open)
haftmann
parents: 24894
diff changeset
    13
begin
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    14
24894
163c82d039cf modernized specifications;
wenzelm
parents: 16417
diff changeset
    15
definition
163c82d039cf modernized specifications;
wenzelm
parents: 16417
diff changeset
    16
  HH :: "[i, i, i] => i"  where
12776
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    17
    "HH(f,x,a) == transrec(a, %b r. let z = x - (\<Union>c \<in> b. r`c)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    18
                                    in  if f`z \<in> Pow(z)-{0} then f`z else {x})"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    19
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 14171
diff changeset
    20
subsection{*Lemmas useful in each of the three proofs*}
12776
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    21
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    22
lemma HH_def_satisfies_eq:
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    23
     "HH(f,x,a) = (let z = x - (\<Union>b \<in> a. HH(f,x,b))   
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    24
                   in  if f`z \<in> Pow(z)-{0} then f`z else {x})"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    25
by (rule HH_def [THEN def_transrec, THEN trans], simp)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    26
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    27
lemma HH_values: "HH(f,x,a) \<in> Pow(x)-{0} | HH(f,x,a)={x}"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    28
apply (rule HH_def_satisfies_eq [THEN ssubst])
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    29
apply (simp add: Let_def Diff_subset [THEN PowI], fast)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    30
done
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    31
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    32
lemma subset_imp_Diff_eq:
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    33
     "B \<subseteq> A ==> X-(\<Union>a \<in> A. P(a)) = X-(\<Union>a \<in> A-B. P(a))-(\<Union>b \<in> B. P(b))"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    34
by fast
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    35
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    36
lemma Ord_DiffE: "[| c \<in> a-b; b<a |] ==> c=b | b<c & c<a"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    37
apply (erule ltE)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    38
apply (drule Ord_linear [of _ c])
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    39
apply (fast elim: Ord_in_Ord)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    40
apply (fast intro!: ltI intro: Ord_in_Ord)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    41
done
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    42
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 14171
diff changeset
    43
lemma Diff_UN_eq_self: "(!!y. y\<in>A ==> P(y) = {x}) ==> x - (\<Union>y \<in> A. P(y)) = x" 
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 14171
diff changeset
    44
by (simp, fast elim!: mem_irrefl)
12776
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    45
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    46
lemma HH_eq: "x - (\<Union>b \<in> a. HH(f,x,b)) = x - (\<Union>b \<in> a1. HH(f,x,b))   
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    47
              ==> HH(f,x,a) = HH(f,x,a1)"
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 14171
diff changeset
    48
apply (subst HH_def_satisfies_eq [of _ _ a1]) 
12776
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    49
apply (rule HH_def_satisfies_eq [THEN trans], simp) 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    50
done
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    51
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    52
lemma HH_is_x_gt_too: "[| HH(f,x,b)={x}; b<a |] ==> HH(f,x,a)={x}"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    53
apply (rule_tac P = "b<a" in impE)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    54
prefer 2 apply assumption+
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    55
apply (erule lt_Ord2 [THEN trans_induct])
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    56
apply (rule impI)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    57
apply (rule HH_eq [THEN trans])
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    58
prefer 2 apply assumption+
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    59
apply (rule leI [THEN le_imp_subset, THEN subset_imp_Diff_eq, THEN ssubst], 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    60
       assumption)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    61
apply (rule_tac t = "%z. z-?X" in subst_context)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    62
apply (rule Diff_UN_eq_self)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    63
apply (drule Ord_DiffE, assumption) 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    64
apply (fast elim: ltE, auto) 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    65
done
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    66
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    67
lemma HH_subset_x_lt_too:
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    68
     "[| HH(f,x,a) \<in> Pow(x)-{0}; b<a |] ==> HH(f,x,b) \<in> Pow(x)-{0}"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    69
apply (rule HH_values [THEN disjE], assumption)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    70
apply (drule HH_is_x_gt_too, assumption)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    71
apply (drule subst, assumption)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    72
apply (fast elim!: mem_irrefl)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    73
done
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    74
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    75
lemma HH_subset_x_imp_subset_Diff_UN:
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    76
    "HH(f,x,a) \<in> Pow(x)-{0} ==> HH(f,x,a) \<in> Pow(x - (\<Union>b \<in> a. HH(f,x,b)))-{0}"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    77
apply (drule HH_def_satisfies_eq [THEN subst])
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    78
apply (rule HH_def_satisfies_eq [THEN ssubst])
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    79
apply (simp add: Let_def Diff_subset [THEN PowI])
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    80
apply (drule split_if [THEN iffD1])
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    81
apply (fast elim!: mem_irrefl)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    82
done
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    83
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    84
lemma HH_eq_arg_lt:
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    85
     "[| HH(f,x,v)=HH(f,x,w); HH(f,x,v) \<in> Pow(x)-{0}; v \<in> w |] ==> P"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    86
apply (frule_tac P = "%y. y \<in> Pow (x) -{0}" in subst, assumption)
13339
0f89104dd377 Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents: 12820
diff changeset
    87
apply (drule_tac a = w in HH_subset_x_imp_subset_Diff_UN)
12776
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    88
apply (drule subst_elem, assumption)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    89
apply (fast intro!: singleton_iff [THEN iffD2] equals0I)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    90
done
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    91
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    92
lemma HH_eq_imp_arg_eq:
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    93
  "[| HH(f,x,v)=HH(f,x,w); HH(f,x,w) \<in> Pow(x)-{0}; Ord(v); Ord(w) |] ==> v=w"
13339
0f89104dd377 Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents: 12820
diff changeset
    94
apply (rule_tac j = w in Ord_linear_lt)
12776
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    95
apply (simp_all (no_asm_simp))
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    96
 apply (drule subst_elem, assumption) 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    97
 apply (blast dest: ltD HH_eq_arg_lt)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    98
apply (blast dest: HH_eq_arg_lt [OF sym] ltD) 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
    99
done
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   100
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   101
lemma HH_subset_x_imp_lepoll: 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   102
     "[| HH(f, x, i) \<in> Pow(x)-{0}; Ord(i) |] ==> i lepoll Pow(x)-{0}"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   103
apply (unfold lepoll_def inj_def)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   104
apply (rule_tac x = "\<lambda>j \<in> i. HH (f, x, j) " in exI)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   105
apply (simp (no_asm_simp))
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   106
apply (fast del: DiffE
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   107
	    elim!: HH_eq_imp_arg_eq Ord_in_Ord HH_subset_x_lt_too 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   108
            intro!: lam_type ballI ltI intro: bexI)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   109
done
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   110
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   111
lemma HH_Hartog_is_x: "HH(f, x, Hartog(Pow(x)-{0})) = {x}"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   112
apply (rule HH_values [THEN disjE])
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   113
prefer 2 apply assumption 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   114
apply (fast del: DiffE
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   115
            intro!: Ord_Hartog 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   116
	    dest!: HH_subset_x_imp_lepoll 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   117
            elim!: Hartog_lepoll_selfE)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   118
done
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   119
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   120
lemma HH_Least_eq_x: "HH(f, x, LEAST i. HH(f, x, i) = {x}) = {x}"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   121
by (fast intro!: Ord_Hartog HH_Hartog_is_x LeastI)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   122
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   123
lemma less_Least_subset_x:
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   124
     "a \<in> (LEAST i. HH(f,x,i)={x}) ==> HH(f,x,a) \<in> Pow(x)-{0}"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   125
apply (rule HH_values [THEN disjE], assumption)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   126
apply (rule less_LeastE)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   127
apply (erule_tac [2] ltI [OF _ Ord_Least], assumption)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   128
done
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   129
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 14171
diff changeset
   130
subsection{*Lemmas used in the proofs of AC1 ==> WO2 and AC17 ==> AC1*}
12776
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   131
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   132
lemma lam_Least_HH_inj_Pow: 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   133
        "(\<lambda>a \<in> (LEAST i. HH(f,x,i)={x}). HH(f,x,a))   
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   134
         \<in> inj(LEAST i. HH(f,x,i)={x}, Pow(x)-{0})"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   135
apply (unfold inj_def, simp)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   136
apply (fast intro!: lam_type dest: less_Least_subset_x 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   137
            elim!: HH_eq_imp_arg_eq Ord_Least [THEN Ord_in_Ord])
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   138
done
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   139
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   140
lemma lam_Least_HH_inj:
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   141
     "\<forall>a \<in> (LEAST i. HH(f,x,i)={x}). \<exists>z \<in> x. HH(f,x,a) = {z}   
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   142
      ==> (\<lambda>a \<in> (LEAST i. HH(f,x,i)={x}). HH(f,x,a))   
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   143
          \<in> inj(LEAST i. HH(f,x,i)={x}, {{y}. y \<in> x})"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   144
by (rule lam_Least_HH_inj_Pow [THEN inj_strengthen_type], simp)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   145
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   146
lemma lam_surj_sing: 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   147
        "[| x - (\<Union>a \<in> A. F(a)) = 0;  \<forall>a \<in> A. \<exists>z \<in> x. F(a) = {z} |]   
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   148
         ==> (\<lambda>a \<in> A. F(a)) \<in> surj(A, {{y}. y \<in> x})"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   149
apply (simp add: surj_def lam_type Diff_eq_0_iff)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   150
apply (blast elim: equalityE) 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   151
done
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   152
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   153
lemma not_emptyI2: "y \<in> Pow(x)-{0} ==> x \<noteq> 0"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   154
by auto
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   155
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   156
lemma f_subset_imp_HH_subset:
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   157
     "f`(x - (\<Union>j \<in> i. HH(f,x,j))) \<in> Pow(x - (\<Union>j \<in> i. HH(f,x,j)))-{0}   
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   158
      ==> HH(f, x, i) \<in> Pow(x) - {0}"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   159
apply (rule HH_def_satisfies_eq [THEN ssubst])
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   160
apply (simp add: Let_def Diff_subset [THEN PowI] not_emptyI2 [THEN if_P], fast)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   161
done
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   162
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   163
lemma f_subsets_imp_UN_HH_eq_x:
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   164
     "\<forall>z \<in> Pow(x)-{0}. f`z \<in> Pow(z)-{0}
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   165
      ==> x - (\<Union>j \<in> (LEAST i. HH(f,x,i)={x}). HH(f,x,j)) = 0"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   166
apply (case_tac "?P \<in> {0}", fast)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   167
apply (drule Diff_subset [THEN PowI, THEN DiffI])
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   168
apply (drule bspec, assumption) 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   169
apply (drule f_subset_imp_HH_subset) 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   170
apply (blast dest!: subst_elem [OF _ HH_Least_eq_x [symmetric]] 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   171
             elim!: mem_irrefl)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   172
done
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   173
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   174
lemma HH_values2: "HH(f,x,i) = f`(x - (\<Union>j \<in> i. HH(f,x,j))) | HH(f,x,i)={x}"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   175
apply (rule HH_def_satisfies_eq [THEN ssubst])
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   176
apply (simp add: Let_def Diff_subset [THEN PowI])
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   177
done
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   178
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   179
lemma HH_subset_imp_eq:
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   180
     "HH(f,x,i): Pow(x)-{0} ==> HH(f,x,i)=f`(x - (\<Union>j \<in> i. HH(f,x,j)))"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   181
apply (rule HH_values2 [THEN disjE], assumption)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   182
apply (fast elim!: equalityE mem_irrefl dest!: singleton_subsetD)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   183
done
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   184
12776
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   185
lemma f_sing_imp_HH_sing:
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   186
     "[| f \<in> (Pow(x)-{0}) -> {{z}. z \<in> x};   
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   187
         a \<in> (LEAST i. HH(f,x,i)={x}) |] ==> \<exists>z \<in> x. HH(f,x,a) = {z}"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   188
apply (drule less_Least_subset_x)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   189
apply (frule HH_subset_imp_eq)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   190
apply (drule apply_type)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   191
apply (rule Diff_subset [THEN PowI, THEN DiffI])
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   192
apply (fast dest!: HH_subset_x_imp_subset_Diff_UN [THEN not_emptyI2], force) 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   193
done
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   194
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   195
lemma f_sing_lam_bij: 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   196
     "[| x - (\<Union>j \<in> (LEAST i. HH(f,x,i)={x}). HH(f,x,j)) = 0;   
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   197
         f \<in> (Pow(x)-{0}) -> {{z}. z \<in> x} |]   
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   198
      ==> (\<lambda>a \<in> (LEAST i. HH(f,x,i)={x}). HH(f,x,a))   
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   199
          \<in> bij(LEAST i. HH(f,x,i)={x}, {{y}. y \<in> x})"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   200
apply (unfold bij_def)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   201
apply (fast intro!: lam_Least_HH_inj lam_surj_sing f_sing_imp_HH_sing)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   202
done
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   203
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   204
lemma lam_singI:
14171
0cab06e3bbd0 Extended the notion of letter and digit, such that now one may use greek,
skalberg
parents: 13339
diff changeset
   205
     "f \<in> (\<Pi> X \<in> Pow(x)-{0}. F(X))   
0cab06e3bbd0 Extended the notion of letter and digit, such that now one may use greek,
skalberg
parents: 13339
diff changeset
   206
      ==> (\<lambda>X \<in> Pow(x)-{0}. {f`X}) \<in> (\<Pi> X \<in> Pow(x)-{0}. {{z}. z \<in> F(X)})"
12776
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   207
by (fast del: DiffI DiffE
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   208
	    intro!: lam_type singleton_eq_iff [THEN iffD2] dest: apply_type)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   209
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   210
(*FIXME: both uses have the form ...[THEN bij_converse_bij], so 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   211
  simplification is needed!*)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   212
lemmas bij_Least_HH_x =  
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   213
    comp_bij [OF f_sing_lam_bij [OF _ lam_singI] 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   214
              lam_sing_bij [THEN bij_converse_bij], standard]
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   215
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   216
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 14171
diff changeset
   217
subsection{*The proof of AC1 ==> WO2*}
12776
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   218
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   219
(*Establishing the existence of a bijection, namely
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   220
converse
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   221
 (converse(\<lambda>x\<in>x. {x}) O
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   222
  Lambda
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   223
   (LEAST i. HH(\<lambda>X\<in>Pow(x) - {0}. {f ` X}, x, i) = {x},
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   224
    HH(\<lambda>X\<in>Pow(x) - {0}. {f ` X}, x)))
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   225
Perhaps it could be simplified. *)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   226
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   227
lemma bijection:
14171
0cab06e3bbd0 Extended the notion of letter and digit, such that now one may use greek,
skalberg
parents: 13339
diff changeset
   228
     "f \<in> (\<Pi> X \<in> Pow(x) - {0}. X) 
12776
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   229
      ==> \<exists>g. g \<in> bij(x, LEAST i. HH(\<lambda>X \<in> Pow(x)-{0}. {f`X}, x, i) = {x})"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   230
apply (rule exI) 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   231
apply (rule bij_Least_HH_x [THEN bij_converse_bij])
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   232
apply (rule f_subsets_imp_UN_HH_eq_x)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   233
apply (intro ballI apply_type) 
12820
02e2ff3e4d37 lexical tidying
paulson
parents: 12776
diff changeset
   234
apply (fast intro: lam_type apply_type del: DiffE, assumption) 
12776
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   235
apply (fast intro: Pi_weaken_type)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   236
done
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   237
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   238
lemma AC1_WO2: "AC1 ==> WO2"
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   239
apply (unfold AC1_def WO2_def eqpoll_def)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   240
apply (intro allI) 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   241
apply (drule_tac x = "Pow(A) - {0}" in spec) 
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   242
apply (blast dest: bijection)
249600a63ba9 Isar version of AC
paulson
parents: 11317
diff changeset
   243
done
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   244
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   245
end
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   246