src/ZF/AC/WO2_AC16.thy
author haftmann
Fri, 17 Jun 2005 16:12:49 +0200
changeset 16417 9bc16273c2d4
parent 15481 fc075ae929e4
child 24893 b8ef7afe3a6b
permissions -rw-r--r--
migrated theory headers to new format
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
     1
(*  Title:      ZF/AC/WO2_AC16.thy
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
     2
    ID:         $Id$
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
     3
    Author:     Krzysztof Grabczewski
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
     4
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
     5
  The proof of WO2 ==> AC16(k #+ m, k)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
     6
  
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
     7
  The main part of the proof is the inductive reasoning concerning
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
     8
  properties of constructed family T_gamma.
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
     9
  The proof deals with three cases for ordinals: 0, succ and limit ordinal.
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    10
  The first instance is trivial, the third not difficult, but the second
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    11
  is very complicated requiring many lemmas.
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    12
  We also need to prove that at any stage gamma the set 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    13
  (s - Union(...) - k_gamma)   (Rubin & Rubin page 15)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    14
  contains m distinct elements (in fact is equipollent to s)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    15
*)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    16
16417
9bc16273c2d4 migrated theory headers to new format
haftmann
parents: 15481
diff changeset
    17
theory WO2_AC16 imports AC_Equiv AC16_lemmas Cardinal_aux begin
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    18
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    19
(**** A recursive definition used in the proof of WO2 ==> AC16 ****)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    20
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    21
constdefs
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    22
  recfunAC16 :: "[i,i,i,i] => i"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    23
    "recfunAC16(f,h,i,a) == 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    24
         transrec2(i, 0, 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    25
              %g r. if (\<exists>y \<in> r. h`g \<subseteq> y) then r
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    26
                    else r Un {f`(LEAST i. h`g \<subseteq> f`i & 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    27
                         (\<forall>b<a. (h`b \<subseteq> f`i --> (\<forall>t \<in> r. ~ h`b \<subseteq> t))))})"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    28
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    29
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    30
(* Basic properties of recfunAC16                                         *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    31
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    32
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    33
lemma recfunAC16_0: "recfunAC16(f,h,0,a) = 0"
12820
02e2ff3e4d37 lexical tidying
paulson
parents: 12776
diff changeset
    34
by (simp add: recfunAC16_def)
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    35
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    36
lemma recfunAC16_succ: 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    37
     "recfunAC16(f,h,succ(i),a) =   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    38
      (if (\<exists>y \<in> recfunAC16(f,h,i,a). h ` i \<subseteq> y) then recfunAC16(f,h,i,a)  
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    39
       else recfunAC16(f,h,i,a) Un  
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    40
            {f ` (LEAST j. h ` i \<subseteq> f ` j &   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    41
             (\<forall>b<a. (h`b \<subseteq> f`j   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    42
              --> (\<forall>t \<in> recfunAC16(f,h,i,a). ~ h`b \<subseteq> t))))})"
12820
02e2ff3e4d37 lexical tidying
paulson
parents: 12776
diff changeset
    43
apply (simp add: recfunAC16_def)
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    44
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    45
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    46
lemma recfunAC16_Limit: "Limit(i)   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    47
        ==> recfunAC16(f,h,i,a) = (\<Union>j<i. recfunAC16(f,h,j,a))"
13339
0f89104dd377 Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents: 12820
diff changeset
    48
by (simp add: recfunAC16_def transrec2_Limit)
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    49
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    50
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    51
(* Monotonicity of transrec2                                              *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    52
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    53
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    54
lemma transrec2_mono_lemma [rule_format]:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    55
     "[| !!g r. r \<subseteq> B(g,r);  Ord(i) |]   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    56
      ==> j<i --> transrec2(j, 0, B) \<subseteq> transrec2(i, 0, B)"
12820
02e2ff3e4d37 lexical tidying
paulson
parents: 12776
diff changeset
    57
apply (erule trans_induct)
02e2ff3e4d37 lexical tidying
paulson
parents: 12776
diff changeset
    58
apply (rule Ord_cases, assumption+, fast)
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    59
apply (simp (no_asm_simp))
12820
02e2ff3e4d37 lexical tidying
paulson
parents: 12776
diff changeset
    60
apply (blast elim!: leE) 
02e2ff3e4d37 lexical tidying
paulson
parents: 12776
diff changeset
    61
apply (simp add: transrec2_Limit) 
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    62
apply (blast intro: OUN_I ltI Ord_in_Ord [THEN le_refl]
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    63
             elim!: Limit_has_succ [THEN ltE])
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    64
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    65
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    66
lemma transrec2_mono:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    67
     "[| !!g r. r \<subseteq> B(g,r); j\<le>i |] 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    68
      ==> transrec2(j, 0, B) \<subseteq> transrec2(i, 0, B)"
12820
02e2ff3e4d37 lexical tidying
paulson
parents: 12776
diff changeset
    69
apply (erule leE)
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    70
apply (rule transrec2_mono_lemma)
12820
02e2ff3e4d37 lexical tidying
paulson
parents: 12776
diff changeset
    71
apply (auto intro: lt_Ord2 ) 
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    72
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    73
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    74
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    75
(* Monotonicity of recfunAC16                                             *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    76
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    77
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    78
lemma recfunAC16_mono: 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    79
       "i\<le>j ==> recfunAC16(f, g, i, a) \<subseteq> recfunAC16(f, g, j, a)"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    80
apply (unfold recfunAC16_def)
12820
02e2ff3e4d37 lexical tidying
paulson
parents: 12776
diff changeset
    81
apply (rule transrec2_mono, auto) 
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    82
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    83
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    84
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    85
(* case of limit ordinal                                                  *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    86
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    87
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    88
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    89
lemma lemma3_1:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    90
    "[| \<forall>y<x. \<forall>z<a. z<y | (\<exists>Y \<in> F(y). f(z)<=Y) --> (\<exists>! Y. Y \<in> F(y) & f(z)<=Y);
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    91
        \<forall>i j. i\<le>j --> F(i) \<subseteq> F(j); j\<le>i; i<x; z<a;
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    92
        V \<in> F(i); f(z)<=V; W \<in> F(j); f(z)<=W |]   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    93
     ==> V = W"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    94
apply (erule asm_rl allE impE)+
12820
02e2ff3e4d37 lexical tidying
paulson
parents: 12776
diff changeset
    95
apply (drule subsetD, assumption, blast) 
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    96
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    97
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    98
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
    99
lemma lemma3:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   100
    "[| \<forall>y<x. \<forall>z<a. z<y | (\<exists>Y \<in> F(y). f(z)<=Y) --> (\<exists>! Y. Y \<in> F(y) & f(z)<=Y);
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   101
        \<forall>i j. i\<le>j --> F(i) \<subseteq> F(j); i<x; j<x; z<a;   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   102
        V \<in> F(i); f(z)<=V; W \<in> F(j); f(z)<=W |]   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   103
     ==> V = W"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   104
apply (rule_tac j=j in Ord_linear_le [OF lt_Ord lt_Ord], assumption+)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   105
apply (erule lemma3_1 [symmetric], assumption+)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   106
apply (erule lemma3_1, assumption+)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   107
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   108
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   109
lemma lemma4:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   110
     "[| \<forall>y<x. F(y) \<subseteq> X &   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   111
                (\<forall>x<a. x < y | (\<exists>Y \<in> F(y). h(x) \<subseteq> Y) -->   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   112
                 (\<exists>! Y. Y \<in> F(y) & h(x) \<subseteq> Y)); 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   113
         x < a |]   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   114
      ==> \<forall>y<x. \<forall>z<a. z < y | (\<exists>Y \<in> F(y). h(z) \<subseteq> Y) -->   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   115
                       (\<exists>! Y. Y \<in> F(y) & h(z) \<subseteq> Y)"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   116
apply (intro oallI impI)
12820
02e2ff3e4d37 lexical tidying
paulson
parents: 12776
diff changeset
   117
apply (drule ospec, assumption, clarify)
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   118
apply (blast elim!: oallE ) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   119
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   120
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   121
lemma lemma5:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   122
     "[| \<forall>y<x. F(y) \<subseteq> X &   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   123
               (\<forall>x<a. x < y | (\<exists>Y \<in> F(y). h(x) \<subseteq> Y) -->   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   124
                (\<exists>! Y. Y \<in> F(y) & h(x) \<subseteq> Y));  
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   125
         x < a; Limit(x); \<forall>i j. i\<le>j --> F(i) \<subseteq> F(j) |]   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   126
      ==> (\<Union>x<x. F(x)) \<subseteq> X &   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   127
          (\<forall>xa<a. xa < x | (\<exists>x \<in> \<Union>x<x. F(x). h(xa) \<subseteq> x)   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   128
                --> (\<exists>! Y. Y \<in> (\<Union>x<x. F(x)) & h(xa) \<subseteq> Y))"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   129
apply (rule conjI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   130
apply (rule subsetI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   131
apply (erule OUN_E)
12820
02e2ff3e4d37 lexical tidying
paulson
parents: 12776
diff changeset
   132
apply (drule ospec, assumption, fast)
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   133
apply (drule lemma4, assumption)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   134
apply (rule oallI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   135
apply (rule impI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   136
apply (erule disjE)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   137
apply (frule ospec, erule Limit_has_succ, assumption) 
13339
0f89104dd377 Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents: 12820
diff changeset
   138
apply (drule_tac A = a and x = xa in ospec, assumption)
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   139
apply (erule impE, rule le_refl [THEN disjI1], erule lt_Ord) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   140
apply (blast intro: lemma3 Limit_has_succ) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   141
apply (blast intro: lemma3) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   142
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   143
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   144
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   145
(* case of successor ordinal                                              *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   146
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   147
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   148
(*
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   149
  First quite complicated proof of the fact used in the recursive construction
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   150
  of the family T_gamma (WO2 ==> AC16(k #+ m, k)) - the fact that at any stage
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   151
  gamma the set (s - Union(...) - k_gamma) is equipollent to s
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   152
  (Rubin & Rubin page 15).
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   153
*)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   154
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   155
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   156
(* dbl_Diff_eqpoll_Card                                                   *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   157
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   158
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   159
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   160
lemma dbl_Diff_eqpoll_Card:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   161
      "[| A\<approx>a; Card(a); ~Finite(a); B\<prec>a; C\<prec>a |] ==> A - B - C\<approx>a"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   162
by (blast intro: Diff_lesspoll_eqpoll_Card) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   163
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   164
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   165
(* Case of finite ordinals                                                *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   166
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   167
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   168
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   169
lemma Finite_lesspoll_infinite_Ord: 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   170
      "[| Finite(X); ~Finite(a); Ord(a) |] ==> X\<prec>a"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   171
apply (unfold lesspoll_def)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   172
apply (rule conjI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   173
apply (drule nat_le_infinite_Ord [THEN le_imp_lepoll], assumption)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   174
apply (unfold Finite_def)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   175
apply (blast intro: leI [THEN le_imp_subset, THEN subset_imp_lepoll]
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   176
                    ltI eqpoll_imp_lepoll lepoll_trans) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   177
apply (blast intro: eqpoll_sym [THEN eqpoll_trans])
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   178
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   179
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   180
lemma Union_lesspoll:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   181
     "[| \<forall>x \<in> X. x lepoll n & x \<subseteq> T; well_ord(T, R); X lepoll b;   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   182
         b<a; ~Finite(a); Card(a); n \<in> nat |]   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   183
      ==> Union(X)\<prec>a"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   184
apply (case_tac "Finite (X)")
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   185
apply (blast intro: Card_is_Ord Finite_lesspoll_infinite_Ord 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   186
                    lepoll_nat_imp_Finite Finite_Union)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   187
apply (drule lepoll_imp_ex_le_eqpoll) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   188
apply (erule lt_Ord) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   189
apply (elim exE conjE)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   190
apply (frule eqpoll_imp_lepoll [THEN lepoll_infinite], assumption)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   191
apply (erule eqpoll_sym [THEN eqpoll_def [THEN def_imp_iff, THEN iffD1],
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   192
                         THEN exE])
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   193
apply (frule bij_is_surj [THEN surj_image_eq])
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   194
apply (drule image_fun [OF bij_is_fun subset_refl])
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   195
apply (drule sym [THEN trans], assumption)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   196
apply (blast intro: lt_Ord UN_lepoll lt_Card_imp_lesspoll
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   197
                    lt_trans1 lesspoll_trans1)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   198
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   199
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   200
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   201
(* recfunAC16_lepoll_index                                                *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   202
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   203
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   204
lemma Un_sing_eq_cons: "A Un {a} = cons(a, A)"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   205
by fast
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   206
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   207
lemma Un_lepoll_succ: "A lepoll B ==> A Un {a} lepoll succ(B)"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   208
apply (simp add: Un_sing_eq_cons succ_def)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   209
apply (blast elim!: mem_irrefl intro: cons_lepoll_cong)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   210
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   211
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   212
lemma Diff_UN_succ_empty: "Ord(a) ==> F(a) - (\<Union>b<succ(a). F(b)) = 0"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   213
by (fast intro!: le_refl)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   214
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   215
lemma Diff_UN_succ_subset: "Ord(a) ==> F(a) Un X - (\<Union>b<succ(a). F(b)) \<subseteq> X"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   216
by blast
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   217
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   218
lemma recfunAC16_Diff_lepoll_1:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   219
     "Ord(x) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   220
      ==> recfunAC16(f, g, x, a) - (\<Union>i<x. recfunAC16(f, g, i, a)) lepoll 1"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   221
apply (erule Ord_cases)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   222
  apply (simp add: recfunAC16_0 empty_subsetI [THEN subset_imp_lepoll])
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   223
(*Limit case*)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   224
prefer 2 apply (simp add: recfunAC16_Limit Diff_cancel 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   225
                          empty_subsetI [THEN subset_imp_lepoll])
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   226
(*succ case*)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   227
apply (simp add: recfunAC16_succ
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   228
                 Diff_UN_succ_empty [of _ "%j. recfunAC16(f,g,j,a)"]
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   229
                 empty_subsetI [THEN subset_imp_lepoll])
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   230
apply (best intro: Diff_UN_succ_subset [THEN subset_imp_lepoll]
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   231
                   singleton_eqpoll_1 [THEN eqpoll_imp_lepoll] lepoll_trans)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   232
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   233
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   234
lemma in_Least_Diff:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   235
     "[| z \<in> F(x); Ord(x) |]   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   236
      ==> z \<in> F(LEAST i. z \<in> F(i)) - (\<Union>j<(LEAST i. z \<in> F(i)). F(j))"
13339
0f89104dd377 Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents: 12820
diff changeset
   237
by (fast elim: less_LeastE elim!: LeastI)
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   238
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   239
lemma Least_eq_imp_ex:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   240
     "[| (LEAST i. w \<in> F(i)) = (LEAST i. z \<in> F(i));   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   241
         w \<in> (\<Union>i<a. F(i)); z \<in> (\<Union>i<a. F(i)) |]   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   242
      ==> \<exists>b<a. w \<in> (F(b) - (\<Union>c<b. F(c))) & z \<in> (F(b) - (\<Union>c<b. F(c)))"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   243
apply (elim OUN_E)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   244
apply (drule in_Least_Diff, erule lt_Ord) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   245
apply (frule in_Least_Diff, erule lt_Ord) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   246
apply (rule oexI, force) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   247
apply (blast intro: lt_Ord Least_le [THEN lt_trans1]) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   248
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   249
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   250
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   251
lemma two_in_lepoll_1: "[| A lepoll 1; a \<in> A; b \<in> A |] ==> a=b"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   252
by (fast dest!: lepoll_1_is_sing)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   253
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   254
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   255
lemma UN_lepoll_index:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   256
     "[| \<forall>i<a. F(i)-(\<Union>j<i. F(j)) lepoll 1; Limit(a) |]   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   257
      ==> (\<Union>x<a. F(x)) lepoll a"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   258
apply (rule lepoll_def [THEN def_imp_iff [THEN iffD2]])
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   259
apply (rule_tac x = "\<lambda>z \<in> (\<Union>x<a. F (x)). LEAST i. z \<in> F (i) " in exI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   260
apply (unfold inj_def)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   261
apply (rule CollectI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   262
apply (rule lam_type)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   263
apply (erule OUN_E)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   264
apply (erule Least_in_Ord)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   265
apply (erule ltD)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   266
apply (erule lt_Ord2)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   267
apply (intro ballI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   268
apply (simp (no_asm_simp))
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   269
apply (rule impI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   270
apply (drule Least_eq_imp_ex, assumption+)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   271
apply (fast elim!: two_in_lepoll_1)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   272
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   273
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   274
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   275
lemma recfunAC16_lepoll_index: "Ord(y) ==> recfunAC16(f, h, y, a) lepoll y"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   276
apply (erule trans_induct3)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   277
(*0 case*)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   278
apply (simp (no_asm_simp) add: recfunAC16_0 lepoll_refl)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   279
(*succ case*)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   280
apply (simp (no_asm_simp) add: recfunAC16_succ)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   281
apply (blast dest!: succI1 [THEN rev_bspec] 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   282
             intro: subset_succI [THEN subset_imp_lepoll] Un_lepoll_succ  
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   283
                    lepoll_trans)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   284
apply (simp (no_asm_simp) add: recfunAC16_Limit)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   285
apply (blast intro: lt_Ord [THEN recfunAC16_Diff_lepoll_1] UN_lepoll_index)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   286
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   287
1196
d43c1f7a53fe Numerous small improvements by KG and LCP
lcp
parents:
diff changeset
   288
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   289
lemma Union_recfunAC16_lesspoll:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   290
     "[| recfunAC16(f,g,y,a) \<subseteq> {X \<in> Pow(A). X\<approx>n};   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   291
         A\<approx>a;  y<a;  ~Finite(a);  Card(a);  n \<in> nat |]   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   292
      ==> Union(recfunAC16(f,g,y,a))\<prec>a"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   293
apply (erule eqpoll_def [THEN def_imp_iff, THEN iffD1, THEN exE])
13339
0f89104dd377 Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents: 12820
diff changeset
   294
apply (rule_tac T=A in Union_lesspoll, simp_all)
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   295
apply (blast intro!: eqpoll_imp_lepoll)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   296
apply (blast intro: bij_is_inj Card_is_Ord [THEN well_ord_Memrel]
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   297
                    well_ord_rvimage)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   298
apply (erule lt_Ord [THEN recfunAC16_lepoll_index])
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   299
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   300
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   301
lemma dbl_Diff_eqpoll:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   302
     "[| recfunAC16(f, h, y, a) \<subseteq> {X \<in> Pow(A) . X\<approx>succ(k #+ m)};   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   303
	 Card(a); ~ Finite(a); A\<approx>a;   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   304
	 k \<in> nat;  y<a;   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   305
	 h \<in> bij(a, {Y \<in> Pow(A). Y\<approx>succ(k)}) |]   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   306
      ==> A - Union(recfunAC16(f, h, y, a)) - h`y\<approx>a"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   307
apply (rule dbl_Diff_eqpoll_Card, simp_all)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   308
apply (simp add: Union_recfunAC16_lesspoll)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   309
apply (rule Finite_lesspoll_infinite_Ord) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   310
apply (rule Finite_def [THEN def_imp_iff, THEN iffD2]) 
12820
02e2ff3e4d37 lexical tidying
paulson
parents: 12776
diff changeset
   311
apply (blast dest: ltD bij_is_fun [THEN apply_type], assumption)  
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   312
apply (blast intro: Card_is_Ord) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   313
done;
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   314
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   315
(* back to the proof *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   316
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   317
lemmas disj_Un_eqpoll_nat_sum = 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   318
    eqpoll_trans [THEN eqpoll_trans, 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   319
                  OF disj_Un_eqpoll_sum sum_eqpoll_cong nat_sum_eqpoll_sum,
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   320
                  standard];
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   321
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   322
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   323
lemma Un_in_Collect: "[| x \<in> Pow(A - B - h`i); x\<approx>m;   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   324
        h \<in> bij(a, {x \<in> Pow(A) . x\<approx>k}); i<a; k \<in> nat; m \<in> nat |]   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   325
        ==> h ` i Un x \<in> {x \<in> Pow(A) . x\<approx>k #+ m}"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   326
by (blast intro: disj_Un_eqpoll_nat_sum
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   327
          dest:  ltD bij_is_fun [THEN apply_type])
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   328
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   329
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   330
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   331
(* Lemmas simplifying assumptions                                         *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   332
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   333
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   334
lemma lemma6:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   335
     "[| \<forall>y<succ(j). F(y)<=X & (\<forall>x<a. x<y | P(x,y) --> Q(x,y)); succ(j)<a |]
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   336
      ==> F(j)<=X & (\<forall>x<a. x<j | P(x,j) --> Q(x,j))"
13339
0f89104dd377 Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents: 12820
diff changeset
   337
by (blast intro!: lt_Ord succI1 [THEN ltI, THEN lt_Ord, THEN le_refl]) 
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   338
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   339
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   340
lemma lemma7:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   341
     "[| \<forall>x<a. x<j | P(x,j) --> Q(x,j);  succ(j)<a |]   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   342
      ==> P(j,j) --> (\<forall>x<a. x\<le>j | P(x,j) --> Q(x,j))"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   343
by (fast elim!: leE)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   344
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   345
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   346
(* Lemmas needed to prove ex_next_set, which means that for any successor *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   347
(* ordinal there is a set satisfying certain properties                   *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   348
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   349
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   350
lemma ex_subset_eqpoll:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   351
     "[| A\<approx>a; ~ Finite(a); Ord(a); m \<in> nat |] ==> \<exists>X \<in> Pow(A). X\<approx>m"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   352
apply (rule lepoll_imp_eqpoll_subset [of m A, THEN exE]) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   353
 apply (rule lepoll_trans, rule leI [THEN le_imp_lepoll])
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   354
  apply (blast intro: lt_trans2 [OF ltI nat_le_infinite_Ord] Ord_nat)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   355
apply (erule eqpoll_sym [THEN eqpoll_imp_lepoll]) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   356
apply (fast elim!: eqpoll_sym)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   357
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   358
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   359
lemma subset_Un_disjoint: "[| A \<subseteq> B Un C; A Int C = 0 |] ==> A \<subseteq> B"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   360
by blast
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   361
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   362
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   363
lemma Int_empty:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   364
     "[| X \<in> Pow(A - Union(B) -C); T \<in> B; F \<subseteq> T |] ==> F Int X = 0"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   365
by blast
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   366
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   367
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   368
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   369
(* equipollent subset (and finite) is the whole set                       *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   370
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   371
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   372
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   373
lemma subset_imp_eq_lemma:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   374
     "m \<in> nat ==> \<forall>A B. A \<subseteq> B & m lepoll A & B lepoll m --> A=B"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   375
apply (induct_tac "m")
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   376
apply (fast dest!: lepoll_0_is_0)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   377
apply (intro allI impI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   378
apply (elim conjE)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   379
apply (rule succ_lepoll_imp_not_empty [THEN not_emptyE], assumption)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   380
apply (frule subsetD [THEN Diff_sing_lepoll], assumption+)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   381
apply (frule lepoll_Diff_sing)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   382
apply (erule allE impE)+
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   383
apply (rule conjI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   384
prefer 2 apply fast
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   385
apply fast
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   386
apply (blast elim: equalityE) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   387
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   388
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   389
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   390
lemma subset_imp_eq: "[| A \<subseteq> B; m lepoll A; B lepoll m; m \<in> nat |] ==> A=B"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   391
by (blast dest!: subset_imp_eq_lemma)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   392
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   393
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   394
lemma bij_imp_arg_eq:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   395
     "[| f \<in> bij(a, {Y \<in> X. Y\<approx>succ(k)}); k \<in> nat; f`b \<subseteq> f`y; b<a; y<a |] 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   396
      ==> b=y"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   397
apply (drule subset_imp_eq)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   398
apply (erule_tac [3] nat_succI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   399
apply (unfold bij_def inj_def)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   400
apply (blast intro: eqpoll_sym eqpoll_imp_lepoll
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   401
             dest:  ltD apply_type)+
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   402
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   403
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   404
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   405
lemma ex_next_set:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   406
     "[| recfunAC16(f, h, y, a) \<subseteq> {X \<in> Pow(A) . X\<approx>succ(k #+ m)};   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   407
         Card(a); ~ Finite(a); A\<approx>a;   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   408
         k \<in> nat; m \<in> nat; y<a;   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   409
         h \<in> bij(a, {Y \<in> Pow(A). Y\<approx>succ(k)});   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   410
         ~ (\<exists>Y \<in> recfunAC16(f, h, y, a). h`y \<subseteq> Y) |]   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   411
      ==> \<exists>X \<in> {Y \<in> Pow(A). Y\<approx>succ(k #+ m)}. h`y \<subseteq> X &   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   412
                (\<forall>b<a. h`b \<subseteq> X -->   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   413
                (\<forall>T \<in> recfunAC16(f, h, y, a). ~ h`b \<subseteq> T))"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   414
apply (erule_tac m1=m in dbl_Diff_eqpoll [THEN ex_subset_eqpoll, THEN bexE], 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   415
       assumption+)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   416
apply (erule Card_is_Ord, assumption)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   417
apply (frule Un_in_Collect, (erule asm_rl nat_succI)+) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   418
apply (erule CollectE)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   419
apply (rule rev_bexI, simp)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   420
apply (rule conjI, blast) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   421
apply (intro ballI impI oallI notI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   422
apply (drule subset_Un_disjoint, rule Int_empty, assumption+)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   423
apply (blast dest: bij_imp_arg_eq) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   424
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   425
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   426
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   427
(* Lemma ex_next_Ord states that for any successor                        *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   428
(* ordinal there is a number of the set satisfying certain properties     *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   429
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   430
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   431
lemma ex_next_Ord:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   432
     "[| recfunAC16(f, h, y, a) \<subseteq> {X \<in> Pow(A) . X\<approx>succ(k #+ m)};   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   433
	 Card(a); ~ Finite(a); A\<approx>a;   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   434
	 k \<in> nat; m \<in> nat; y<a;   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   435
	 h \<in> bij(a, {Y \<in> Pow(A). Y\<approx>succ(k)});   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   436
	 f \<in> bij(a, {Y \<in> Pow(A). Y\<approx>succ(k #+ m)});   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   437
	 ~ (\<exists>Y \<in> recfunAC16(f, h, y, a). h`y \<subseteq> Y) |]   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   438
      ==> \<exists>c<a. h`y \<subseteq> f`c &   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   439
	        (\<forall>b<a. h`b \<subseteq> f`c -->   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   440
		(\<forall>T \<in> recfunAC16(f, h, y, a). ~ h`b \<subseteq> T))"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   441
apply (drule ex_next_set, assumption+)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   442
apply (erule bexE)
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 13339
diff changeset
   443
apply (rule_tac x="converse(f)`X" in oexI)
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 13339
diff changeset
   444
apply (simp add: right_inverse_bij)
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   445
apply (blast intro: bij_converse_bij bij_is_fun [THEN apply_type] ltI
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   446
                    Card_is_Ord)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   447
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   448
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   449
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   450
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   451
(* Lemma simplifying assumptions                                          *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   452
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   453
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   454
lemma lemma8:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   455
     "[| \<forall>x<a. x<j | (\<exists>xa \<in> F(j). P(x, xa))   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   456
         --> (\<exists>! Y. Y \<in> F(j) & P(x, Y)); F(j) \<subseteq> X;   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   457
         L \<in> X; P(j, L) & (\<forall>x<a. P(x, L) --> (\<forall>xa \<in> F(j). ~P(x, xa))) |]   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   458
      ==> F(j) Un {L} \<subseteq> X &   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   459
          (\<forall>x<a. x\<le>j | (\<exists>xa \<in> (F(j) Un {L}). P(x, xa)) -->   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   460
                 (\<exists>! Y. Y \<in> (F(j) Un {L}) & P(x, Y)))"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   461
apply (rule conjI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   462
apply (fast intro!: singleton_subsetI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   463
apply (rule oallI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   464
apply (blast elim!: leE oallE)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   465
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   466
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   467
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   468
(* The main part of the proof: inductive proof of the property of T_gamma *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   469
(* lemma main_induct                                                      *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   470
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   471
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   472
lemma main_induct:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   473
     "[| b < a; f \<in> bij(a, {Y \<in> Pow(A) . Y\<approx>succ(k #+ m)});   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   474
         h \<in> bij(a, {Y \<in> Pow(A) . Y\<approx>succ(k)});   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   475
         ~Finite(a); Card(a); A\<approx>a; k \<in> nat; m \<in> nat |]   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   476
      ==> recfunAC16(f, h, b, a) \<subseteq> {X \<in> Pow(A) . X\<approx>succ(k #+ m)} &   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   477
          (\<forall>x<a. x < b | (\<exists>Y \<in> recfunAC16(f, h, b, a). h ` x \<subseteq> Y) -->   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   478
          (\<exists>! Y. Y \<in> recfunAC16(f, h, b, a) & h ` x \<subseteq> Y))"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   479
apply (erule lt_induct)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   480
apply (frule lt_Ord)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   481
apply (erule Ord_cases)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   482
(* case 0 *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   483
apply (simp add: recfunAC16_0)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   484
(* case Limit *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   485
prefer 2  apply (simp add: recfunAC16_Limit)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   486
          apply (rule lemma5, assumption+)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   487
          apply (blast dest!: recfunAC16_mono)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   488
(* case succ *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   489
apply clarify 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   490
apply (erule lemma6 [THEN conjE], assumption)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   491
apply (simp (no_asm_simp) split del: split_if add: recfunAC16_succ)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   492
apply (rule conjI [THEN split_if [THEN iffD2]])
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   493
 apply (simp, erule lemma7, assumption)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   494
apply (rule impI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   495
apply (rule ex_next_Ord [THEN oexE], 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   496
       assumption+, rule le_refl [THEN lt_trans], assumption+) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   497
apply (erule lemma8, assumption)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   498
 apply (rule bij_is_fun [THEN apply_type], assumption)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   499
 apply (erule Least_le [THEN lt_trans2, THEN ltD])
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   500
  apply (erule lt_Ord) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   501
 apply (erule succ_leI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   502
apply (erule LeastI) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   503
apply (erule lt_Ord) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   504
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   505
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   506
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   507
(* Lemma to simplify the inductive proof                                  *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   508
(*   - the desired property is a consequence of the inductive assumption  *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   509
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   510
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   511
lemma lemma_simp_induct:
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   512
     "[| \<forall>b. b<a --> F(b) \<subseteq> S & (\<forall>x<a. (x<b | (\<exists>Y \<in> F(b). f`x \<subseteq> Y))  
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   513
                                   --> (\<exists>! Y. Y \<in> F(b) & f`x \<subseteq> Y));
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   514
         f \<in> a->f``(a); Limit(a); 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   515
         \<forall>i j. i\<le>j --> F(i) \<subseteq> F(j) |]   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   516
        ==> (\<Union>j<a. F(j)) \<subseteq> S &   
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   517
            (\<forall>x \<in> f``a. \<exists>! Y. Y \<in> (\<Union>j<a. F(j)) & x \<subseteq> Y)"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   518
apply (rule conjI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   519
apply (rule subsetI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   520
apply (erule OUN_E, blast) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   521
apply (rule ballI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   522
apply (erule imageE)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   523
apply (drule ltI, erule Limit_is_Ord) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   524
apply (drule Limit_has_succ, assumption) 
12820
02e2ff3e4d37 lexical tidying
paulson
parents: 12776
diff changeset
   525
apply (frule_tac x1="succ(xa)" in spec [THEN mp], assumption)
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   526
apply (erule conjE)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   527
apply (drule ospec) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   528
(** LEVEL 10 **)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   529
apply (erule leI [THEN succ_leE])
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   530
apply (erule impE)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   531
apply (fast elim!: leI [THEN succ_leE, THEN lt_Ord, THEN le_refl])
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   532
apply (drule apply_equality, assumption) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   533
apply (elim conjE ex1E)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   534
(** LEVEL 15 **)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   535
apply (rule ex1I, blast) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   536
apply (elim conjE OUN_E)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   537
apply (erule_tac i="succ(xa)" and j=aa 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   538
       in Ord_linear_le [OF lt_Ord lt_Ord], assumption)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   539
prefer 2 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   540
apply (drule spec [THEN spec, THEN mp, THEN subsetD], assumption+, blast) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   541
(** LEVEL 20 **)
13339
0f89104dd377 Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents: 12820
diff changeset
   542
apply (drule_tac x1=aa in spec [THEN mp], assumption)
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   543
apply (frule succ_leE)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   544
apply (drule spec [THEN spec, THEN mp, THEN subsetD], assumption+, blast) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   545
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   546
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   547
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   548
(* The target theorem                                                     *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   549
(* ********************************************************************** *)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   550
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   551
theorem WO2_AC16: "[| WO2; 0<m; k \<in> nat; m \<in> nat |] ==> AC16(k #+ m,k)"
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   552
apply (unfold AC16_def)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   553
apply (rule allI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   554
apply (rule impI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   555
apply (frule WO2_infinite_subsets_eqpoll_X, assumption+)
12820
02e2ff3e4d37 lexical tidying
paulson
parents: 12776
diff changeset
   556
apply (frule_tac n="k #+ m" in WO2_infinite_subsets_eqpoll_X, simp, simp) 
12776
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   557
apply (frule WO2_imp_ex_Card)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   558
apply (elim exE conjE)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   559
apply (drule eqpoll_trans [THEN eqpoll_sym, 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   560
                           THEN eqpoll_def [THEN def_imp_iff, THEN iffD1]],
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   561
       assumption)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   562
apply (drule eqpoll_trans [THEN eqpoll_sym, 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   563
                           THEN eqpoll_def [THEN def_imp_iff, THEN iffD1]], 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   564
       assumption+)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   565
apply (elim exE)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   566
apply (rename_tac h)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   567
apply (rule_tac x = "\<Union>j<a. recfunAC16 (h,f,j,a) " in exI)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   568
apply (rule_tac P="%z. ?Y & (\<forall>x \<in> z. ?Z (x))" 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   569
       in bij_is_surj [THEN surj_image_eq, THEN subst], assumption)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   570
apply (rule lemma_simp_induct)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   571
apply (blast del: conjI notI
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   572
	     intro!: main_induct eqpoll_imp_lepoll [THEN lepoll_infinite] ) 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   573
apply (blast intro: bij_is_fun [THEN surj_image, THEN surj_is_fun])
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   574
apply (erule eqpoll_imp_lepoll [THEN lepoll_infinite, 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   575
                                THEN infinite_Card_is_InfCard, 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   576
                                THEN InfCard_is_Limit], 
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   577
       assumption+)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   578
apply (blast dest!: recfunAC16_mono)
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   579
done
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   580
249600a63ba9 Isar version of AC
paulson
parents: 1196
diff changeset
   581
end