src/ZF/Cardinal.thy
author paulson
Tue Jul 09 23:05:26 2002 +0200 (2002-07-09)
changeset 13328 703de709a64b
parent 13269 3ba9be497c33
child 13356 c9cfe1638bf2
permissions -rw-r--r--
better document preparation
clasohm@1478
     1
(*  Title:      ZF/Cardinal.thy
lcp@435
     2
    ID:         $Id$
clasohm@1478
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
lcp@435
     4
    Copyright   1994  University of Cambridge
lcp@435
     5
paulson@13328
     6
*)
paulson@13221
     7
paulson@13328
     8
header{*Cardinal Numbers Without the Axiom of Choice*}
lcp@435
     9
paulson@13244
    10
theory Cardinal = OrderType + Finite + Nat + Sum:
paulson@13221
    11
paulson@13221
    12
(*** The following really belong in upair ***)
lcp@435
    13
paulson@13221
    14
lemma eq_imp_not_mem: "a=A ==> a ~: A"
paulson@13221
    15
by (blast intro: elim: mem_irrefl)
paulson@13221
    16
paulson@13221
    17
constdefs
lcp@435
    18
lcp@435
    19
  (*least ordinal operator*)
paulson@13221
    20
   Least    :: "(i=>o) => i"    (binder "LEAST " 10)
paulson@13221
    21
     "Least(P) == THE i. Ord(i) & P(i) & (ALL j. j<i --> ~P(j))"
lcp@435
    22
paulson@13221
    23
  eqpoll   :: "[i,i] => o"     (infixl "eqpoll" 50)
paulson@13221
    24
    "A eqpoll B == EX f. f: bij(A,B)"
lcp@435
    25
paulson@13221
    26
  lepoll   :: "[i,i] => o"     (infixl "lepoll" 50)
paulson@13221
    27
    "A lepoll B == EX f. f: inj(A,B)"
lcp@435
    28
paulson@13221
    29
  lesspoll :: "[i,i] => o"     (infixl "lesspoll" 50)
paulson@13221
    30
    "A lesspoll B == A lepoll B & ~(A eqpoll B)"
lcp@832
    31
paulson@13221
    32
  cardinal :: "i=>i"           ("|_|")
paulson@13221
    33
    "|A| == LEAST i. i eqpoll A"
lcp@435
    34
paulson@13221
    35
  Finite   :: "i=>o"
paulson@13221
    36
    "Finite(A) == EX n:nat. A eqpoll n"
lcp@435
    37
paulson@13221
    38
  Card     :: "i=>o"
paulson@13221
    39
    "Card(i) == (i = |i|)"
lcp@435
    40
paulson@9683
    41
syntax (xsymbols)
paulson@13221
    42
  "eqpoll"      :: "[i,i] => o"       (infixl "\<approx>" 50)
paulson@13221
    43
  "lepoll"      :: "[i,i] => o"       (infixl "\<lesssim>" 50)
paulson@13221
    44
  "lesspoll"    :: "[i,i] => o"       (infixl "\<prec>" 50)
paulson@13221
    45
  "LEAST "         :: "[pttrn, o] => i"  ("(3\<mu>_./ _)" [0, 10] 10)
paulson@13221
    46
paulson@13221
    47
(*** The Schroeder-Bernstein Theorem -- see Davey & Priestly, page 106 ***)
paulson@13221
    48
paulson@13221
    49
(** Lemma: Banach's Decomposition Theorem **)
paulson@13221
    50
paulson@13221
    51
lemma decomp_bnd_mono: "bnd_mono(X, %W. X - g``(Y - f``W))"
paulson@13221
    52
by (rule bnd_monoI, blast+)
paulson@13221
    53
paulson@13221
    54
lemma Banach_last_equation:
paulson@13221
    55
    "g: Y->X
paulson@13221
    56
     ==> g``(Y - f`` lfp(X, %W. X - g``(Y - f``W))) =        
paulson@13221
    57
	 X - lfp(X, %W. X - g``(Y - f``W))" 
paulson@13221
    58
apply (rule_tac P = "%u. ?v = X-u" 
paulson@13221
    59
       in decomp_bnd_mono [THEN lfp_unfold, THEN ssubst])
paulson@13221
    60
apply (simp add: double_complement  fun_is_rel [THEN image_subset])
paulson@13221
    61
done
paulson@13221
    62
paulson@13221
    63
lemma decomposition:
paulson@13221
    64
     "[| f: X->Y;  g: Y->X |] ==>    
paulson@13221
    65
      EX XA XB YA YB. (XA Int XB = 0) & (XA Un XB = X) &     
paulson@13221
    66
                      (YA Int YB = 0) & (YA Un YB = Y) &     
paulson@13221
    67
                      f``XA=YA & g``YB=XB"
paulson@13221
    68
apply (intro exI conjI)
paulson@13221
    69
apply (rule_tac [6] Banach_last_equation)
paulson@13221
    70
apply (rule_tac [5] refl)
paulson@13221
    71
apply (assumption | 
paulson@13221
    72
       rule  Diff_disjoint Diff_partition fun_is_rel image_subset lfp_subset)+
paulson@13221
    73
done
paulson@13221
    74
paulson@13221
    75
lemma schroeder_bernstein:
paulson@13221
    76
    "[| f: inj(X,Y);  g: inj(Y,X) |] ==> EX h. h: bij(X,Y)"
paulson@13221
    77
apply (insert decomposition [of f X Y g]) 
paulson@13221
    78
apply (simp add: inj_is_fun)
paulson@13221
    79
apply (blast intro!: restrict_bij bij_disjoint_Un intro: bij_converse_bij)
paulson@13221
    80
(* The instantiation of exI to "restrict(f,XA) Un converse(restrict(g,YB))"
paulson@13221
    81
   is forced by the context!! *)
paulson@13221
    82
done
paulson@13221
    83
paulson@13221
    84
paulson@13221
    85
(** Equipollence is an equivalence relation **)
paulson@13221
    86
paulson@13221
    87
lemma bij_imp_eqpoll: "f: bij(A,B) ==> A \<approx> B"
paulson@13221
    88
apply (unfold eqpoll_def)
paulson@13221
    89
apply (erule exI)
paulson@13221
    90
done
paulson@13221
    91
paulson@13221
    92
(*A eqpoll A*)
paulson@13221
    93
lemmas eqpoll_refl = id_bij [THEN bij_imp_eqpoll, standard, simp]
paulson@13221
    94
paulson@13221
    95
lemma eqpoll_sym: "X \<approx> Y ==> Y \<approx> X"
paulson@13221
    96
apply (unfold eqpoll_def)
paulson@13221
    97
apply (blast intro: bij_converse_bij)
paulson@13221
    98
done
paulson@13221
    99
paulson@13221
   100
lemma eqpoll_trans: 
paulson@13221
   101
    "[| X \<approx> Y;  Y \<approx> Z |] ==> X \<approx> Z"
paulson@13221
   102
apply (unfold eqpoll_def)
paulson@13221
   103
apply (blast intro: comp_bij)
paulson@13221
   104
done
paulson@13221
   105
paulson@13221
   106
(** Le-pollence is a partial ordering **)
paulson@13221
   107
paulson@13221
   108
lemma subset_imp_lepoll: "X<=Y ==> X \<lesssim> Y"
paulson@13221
   109
apply (unfold lepoll_def)
paulson@13221
   110
apply (rule exI)
paulson@13221
   111
apply (erule id_subset_inj)
paulson@13221
   112
done
paulson@13221
   113
paulson@13221
   114
lemmas lepoll_refl = subset_refl [THEN subset_imp_lepoll, standard, simp]
paulson@13221
   115
paulson@13221
   116
lemmas le_imp_lepoll = le_imp_subset [THEN subset_imp_lepoll, standard]
paulson@13221
   117
paulson@13221
   118
lemma eqpoll_imp_lepoll: "X \<approx> Y ==> X \<lesssim> Y"
paulson@13221
   119
by (unfold eqpoll_def bij_def lepoll_def, blast)
paulson@13221
   120
paulson@13221
   121
lemma lepoll_trans: "[| X \<lesssim> Y;  Y \<lesssim> Z |] ==> X \<lesssim> Z"
paulson@13221
   122
apply (unfold lepoll_def)
paulson@13221
   123
apply (blast intro: comp_inj)
paulson@13221
   124
done
paulson@13221
   125
paulson@13221
   126
(*Asymmetry law*)
paulson@13221
   127
lemma eqpollI: "[| X \<lesssim> Y;  Y \<lesssim> X |] ==> X \<approx> Y"
paulson@13221
   128
apply (unfold lepoll_def eqpoll_def)
paulson@13221
   129
apply (elim exE)
paulson@13221
   130
apply (rule schroeder_bernstein, assumption+)
paulson@13221
   131
done
paulson@13221
   132
paulson@13221
   133
lemma eqpollE:
paulson@13221
   134
    "[| X \<approx> Y; [| X \<lesssim> Y; Y \<lesssim> X |] ==> P |] ==> P"
paulson@13221
   135
by (blast intro: eqpoll_imp_lepoll eqpoll_sym) 
paulson@13221
   136
paulson@13221
   137
lemma eqpoll_iff: "X \<approx> Y <-> X \<lesssim> Y & Y \<lesssim> X"
paulson@13221
   138
by (blast intro: eqpollI elim!: eqpollE)
paulson@13221
   139
paulson@13221
   140
lemma lepoll_0_is_0: "A \<lesssim> 0 ==> A = 0"
paulson@13221
   141
apply (unfold lepoll_def inj_def)
paulson@13221
   142
apply (blast dest: apply_type)
paulson@13221
   143
done
paulson@13221
   144
paulson@13221
   145
(*0 \<lesssim> Y*)
paulson@13221
   146
lemmas empty_lepollI = empty_subsetI [THEN subset_imp_lepoll, standard]
paulson@13221
   147
paulson@13221
   148
lemma lepoll_0_iff: "A \<lesssim> 0 <-> A=0"
paulson@13221
   149
by (blast intro: lepoll_0_is_0 lepoll_refl)
paulson@13221
   150
paulson@13221
   151
lemma Un_lepoll_Un: 
paulson@13221
   152
    "[| A \<lesssim> B; C \<lesssim> D; B Int D = 0 |] ==> A Un C \<lesssim> B Un D"
paulson@13221
   153
apply (unfold lepoll_def)
paulson@13221
   154
apply (blast intro: inj_disjoint_Un)
paulson@13221
   155
done
paulson@13221
   156
paulson@13221
   157
(*A eqpoll 0 ==> A=0*)
paulson@13221
   158
lemmas eqpoll_0_is_0 = eqpoll_imp_lepoll [THEN lepoll_0_is_0, standard]
paulson@13221
   159
paulson@13221
   160
lemma eqpoll_0_iff: "A \<approx> 0 <-> A=0"
paulson@13221
   161
by (blast intro: eqpoll_0_is_0 eqpoll_refl)
paulson@13221
   162
paulson@13221
   163
lemma eqpoll_disjoint_Un: 
paulson@13221
   164
    "[| A \<approx> B;  C \<approx> D;  A Int C = 0;  B Int D = 0 |]   
paulson@13221
   165
     ==> A Un C \<approx> B Un D"
paulson@13221
   166
apply (unfold eqpoll_def)
paulson@13221
   167
apply (blast intro: bij_disjoint_Un)
paulson@13221
   168
done
paulson@13221
   169
paulson@13221
   170
paulson@13221
   171
(*** lesspoll: contributions by Krzysztof Grabczewski ***)
paulson@13221
   172
paulson@13221
   173
lemma lesspoll_not_refl: "~ (i \<prec> i)"
paulson@13221
   174
by (simp add: lesspoll_def) 
paulson@13221
   175
paulson@13221
   176
lemma lesspoll_irrefl [elim!]: "i \<prec> i ==> P"
paulson@13221
   177
by (simp add: lesspoll_def) 
paulson@13221
   178
paulson@13221
   179
lemma lesspoll_imp_lepoll: "A \<prec> B ==> A \<lesssim> B"
paulson@13221
   180
by (unfold lesspoll_def, blast)
paulson@13221
   181
paulson@13221
   182
lemma lepoll_well_ord: "[| A \<lesssim> B; well_ord(B,r) |] ==> EX s. well_ord(A,s)"
paulson@13221
   183
apply (unfold lepoll_def)
paulson@13221
   184
apply (blast intro: well_ord_rvimage)
paulson@13221
   185
done
paulson@13221
   186
paulson@13221
   187
lemma lepoll_iff_leqpoll: "A \<lesssim> B <-> A \<prec> B | A \<approx> B"
paulson@13221
   188
apply (unfold lesspoll_def)
paulson@13221
   189
apply (blast intro!: eqpollI elim!: eqpollE)
paulson@13221
   190
done
paulson@13221
   191
paulson@13221
   192
lemma inj_not_surj_succ: 
paulson@13221
   193
  "[| f : inj(A, succ(m)); f ~: surj(A, succ(m)) |] ==> EX f. f:inj(A,m)"
paulson@13221
   194
apply (unfold inj_def surj_def) 
paulson@13221
   195
apply (safe del: succE) 
paulson@13221
   196
apply (erule swap, rule exI) 
paulson@13221
   197
apply (rule_tac a = "lam z:A. if f`z=m then y else f`z" in CollectI)
paulson@13221
   198
txt{*the typing condition*}
paulson@13221
   199
 apply (best intro!: if_type [THEN lam_type] elim: apply_funtype [THEN succE])
paulson@13221
   200
txt{*Proving it's injective*}
paulson@13221
   201
apply simp
paulson@13221
   202
apply blast 
paulson@13221
   203
done
paulson@13221
   204
paulson@13221
   205
(** Variations on transitivity **)
paulson@13221
   206
paulson@13221
   207
lemma lesspoll_trans: 
paulson@13221
   208
      "[| X \<prec> Y; Y \<prec> Z |] ==> X \<prec> Z"
paulson@13221
   209
apply (unfold lesspoll_def)
paulson@13221
   210
apply (blast elim!: eqpollE intro: eqpollI lepoll_trans)
paulson@13221
   211
done
paulson@13221
   212
paulson@13221
   213
lemma lesspoll_trans1: 
paulson@13221
   214
      "[| X \<lesssim> Y; Y \<prec> Z |] ==> X \<prec> Z"
paulson@13221
   215
apply (unfold lesspoll_def)
paulson@13221
   216
apply (blast elim!: eqpollE intro: eqpollI lepoll_trans)
paulson@13221
   217
done
paulson@13221
   218
paulson@13221
   219
lemma lesspoll_trans2: 
paulson@13221
   220
      "[| X \<prec> Y; Y \<lesssim> Z |] ==> X \<prec> Z"
paulson@13221
   221
apply (unfold lesspoll_def)
paulson@13221
   222
apply (blast elim!: eqpollE intro: eqpollI lepoll_trans)
paulson@13221
   223
done
paulson@13221
   224
paulson@13221
   225
paulson@13221
   226
(** LEAST -- the least number operator [from HOL/Univ.ML] **)
paulson@13221
   227
paulson@13221
   228
lemma Least_equality: 
paulson@13221
   229
    "[| P(i);  Ord(i);  !!x. x<i ==> ~P(x) |] ==> (LEAST x. P(x)) = i"
paulson@13221
   230
apply (unfold Least_def) 
paulson@13221
   231
apply (rule the_equality, blast)
paulson@13221
   232
apply (elim conjE)
paulson@13221
   233
apply (erule Ord_linear_lt, assumption, blast+)
paulson@13221
   234
done
paulson@13221
   235
paulson@13221
   236
lemma LeastI: "[| P(i);  Ord(i) |] ==> P(LEAST x. P(x))"
paulson@13221
   237
apply (erule rev_mp)
paulson@13221
   238
apply (erule_tac i=i in trans_induct) 
paulson@13221
   239
apply (rule impI)
paulson@13221
   240
apply (rule classical)
paulson@13221
   241
apply (blast intro: Least_equality [THEN ssubst]  elim!: ltE)
paulson@13221
   242
done
paulson@13221
   243
paulson@13221
   244
(*Proof is almost identical to the one above!*)
paulson@13221
   245
lemma Least_le: "[| P(i);  Ord(i) |] ==> (LEAST x. P(x)) le i"
paulson@13221
   246
apply (erule rev_mp)
paulson@13221
   247
apply (erule_tac i=i in trans_induct) 
paulson@13221
   248
apply (rule impI)
paulson@13221
   249
apply (rule classical)
paulson@13221
   250
apply (subst Least_equality, assumption+)
paulson@13221
   251
apply (erule_tac [2] le_refl)
paulson@13221
   252
apply (blast elim: ltE intro: leI ltI lt_trans1)
paulson@13221
   253
done
paulson@13221
   254
paulson@13221
   255
(*LEAST really is the smallest*)
paulson@13221
   256
lemma less_LeastE: "[| P(i);  i < (LEAST x. P(x)) |] ==> Q"
paulson@13221
   257
apply (rule Least_le [THEN [2] lt_trans2, THEN lt_irrefl], assumption+)
paulson@13221
   258
apply (simp add: lt_Ord) 
paulson@13221
   259
done
paulson@13221
   260
paulson@13221
   261
(*Easier to apply than LeastI: conclusion has only one occurrence of P*)
paulson@13221
   262
lemma LeastI2:
paulson@13221
   263
    "[| P(i);  Ord(i);  !!j. P(j) ==> Q(j) |] ==> Q(LEAST j. P(j))"
paulson@13221
   264
by (blast intro: LeastI ) 
paulson@13221
   265
paulson@13221
   266
(*If there is no such P then LEAST is vacuously 0*)
paulson@13221
   267
lemma Least_0: 
paulson@13221
   268
    "[| ~ (EX i. Ord(i) & P(i)) |] ==> (LEAST x. P(x)) = 0"
paulson@13221
   269
apply (unfold Least_def)
paulson@13221
   270
apply (rule the_0, blast)
paulson@13221
   271
done
paulson@13221
   272
paulson@13221
   273
lemma Ord_Least: "Ord(LEAST x. P(x))"
paulson@13221
   274
apply (rule_tac P = "EX i. Ord(i) & P(i)" in case_split_thm)  
paulson@13221
   275
    (*case_tac method not available yet; needs "inductive"*)
paulson@13221
   276
apply safe
paulson@13221
   277
apply (rule Least_le [THEN ltE])
paulson@13221
   278
prefer 3 apply assumption+
paulson@13221
   279
apply (erule Least_0 [THEN ssubst])
paulson@13221
   280
apply (rule Ord_0)
paulson@13221
   281
done
paulson@13221
   282
paulson@13221
   283
paulson@13221
   284
(** Basic properties of cardinals **)
paulson@13221
   285
paulson@13221
   286
(*Not needed for simplification, but helpful below*)
paulson@13221
   287
lemma Least_cong:
paulson@13221
   288
     "(!!y. P(y) <-> Q(y)) ==> (LEAST x. P(x)) = (LEAST x. Q(x))"
paulson@13221
   289
by simp
paulson@13221
   290
paulson@13221
   291
(*Need AC to get X \<lesssim> Y ==> |X| le |Y|;  see well_ord_lepoll_imp_Card_le
paulson@13221
   292
  Converse also requires AC, but see well_ord_cardinal_eqE*)
paulson@13221
   293
lemma cardinal_cong: "X \<approx> Y ==> |X| = |Y|"
paulson@13221
   294
apply (unfold eqpoll_def cardinal_def)
paulson@13221
   295
apply (rule Least_cong)
paulson@13221
   296
apply (blast intro: comp_bij bij_converse_bij)
paulson@13221
   297
done
paulson@13221
   298
paulson@13221
   299
(*Under AC, the premise becomes trivial; one consequence is ||A|| = |A|*)
paulson@13221
   300
lemma well_ord_cardinal_eqpoll: 
paulson@13221
   301
    "well_ord(A,r) ==> |A| \<approx> A"
paulson@13221
   302
apply (unfold cardinal_def)
paulson@13221
   303
apply (rule LeastI)
paulson@13221
   304
apply (erule_tac [2] Ord_ordertype)
paulson@13221
   305
apply (erule ordermap_bij [THEN bij_converse_bij, THEN bij_imp_eqpoll])
paulson@13221
   306
done
paulson@13221
   307
paulson@13221
   308
(* Ord(A) ==> |A| \<approx> A *)
paulson@13221
   309
lemmas Ord_cardinal_eqpoll = well_ord_Memrel [THEN well_ord_cardinal_eqpoll]
paulson@13221
   310
paulson@13221
   311
lemma well_ord_cardinal_eqE:
paulson@13221
   312
     "[| well_ord(X,r);  well_ord(Y,s);  |X| = |Y| |] ==> X \<approx> Y"
paulson@13221
   313
apply (rule eqpoll_sym [THEN eqpoll_trans])
paulson@13221
   314
apply (erule well_ord_cardinal_eqpoll)
paulson@13221
   315
apply (simp (no_asm_simp) add: well_ord_cardinal_eqpoll)
paulson@13221
   316
done
paulson@13221
   317
paulson@13221
   318
lemma well_ord_cardinal_eqpoll_iff:
paulson@13221
   319
     "[| well_ord(X,r);  well_ord(Y,s) |] ==> |X| = |Y| <-> X \<approx> Y"
paulson@13221
   320
by (blast intro: cardinal_cong well_ord_cardinal_eqE)
paulson@13221
   321
paulson@13221
   322
paulson@13221
   323
(** Observations from Kunen, page 28 **)
paulson@13221
   324
paulson@13221
   325
lemma Ord_cardinal_le: "Ord(i) ==> |i| le i"
paulson@13221
   326
apply (unfold cardinal_def)
paulson@13221
   327
apply (erule eqpoll_refl [THEN Least_le])
paulson@13221
   328
done
paulson@13221
   329
paulson@13221
   330
lemma Card_cardinal_eq: "Card(K) ==> |K| = K"
paulson@13221
   331
apply (unfold Card_def)
paulson@13221
   332
apply (erule sym)
paulson@13221
   333
done
paulson@13221
   334
paulson@13221
   335
(* Could replace the  ~(j \<approx> i)  by  ~(i \<lesssim> j) *)
paulson@13221
   336
lemma CardI: "[| Ord(i);  !!j. j<i ==> ~(j \<approx> i) |] ==> Card(i)"
paulson@13221
   337
apply (unfold Card_def cardinal_def) 
paulson@13221
   338
apply (subst Least_equality)
paulson@13221
   339
apply (blast intro: eqpoll_refl )+
paulson@13221
   340
done
paulson@13221
   341
paulson@13221
   342
lemma Card_is_Ord: "Card(i) ==> Ord(i)"
paulson@13221
   343
apply (unfold Card_def cardinal_def)
paulson@13221
   344
apply (erule ssubst)
paulson@13221
   345
apply (rule Ord_Least)
paulson@13221
   346
done
paulson@13221
   347
paulson@13221
   348
lemma Card_cardinal_le: "Card(K) ==> K le |K|"
paulson@13221
   349
apply (simp (no_asm_simp) add: Card_is_Ord Card_cardinal_eq)
paulson@13221
   350
done
paulson@13221
   351
paulson@13221
   352
lemma Ord_cardinal [simp,intro!]: "Ord(|A|)"
paulson@13221
   353
apply (unfold cardinal_def)
paulson@13221
   354
apply (rule Ord_Least)
paulson@13221
   355
done
paulson@13221
   356
paulson@13221
   357
(*The cardinals are the initial ordinals*)
paulson@13221
   358
lemma Card_iff_initial: "Card(K) <-> Ord(K) & (ALL j. j<K --> ~ j \<approx> K)"
paulson@13221
   359
apply (safe intro!: CardI Card_is_Ord)
paulson@13221
   360
 prefer 2 apply blast
paulson@13221
   361
apply (unfold Card_def cardinal_def)
paulson@13221
   362
apply (rule less_LeastE)
paulson@13221
   363
apply (erule_tac [2] subst, assumption+)
paulson@13221
   364
done
paulson@13221
   365
paulson@13221
   366
lemma lt_Card_imp_lesspoll: "[| Card(a); i<a |] ==> i \<prec> a"
paulson@13221
   367
apply (unfold lesspoll_def)
paulson@13221
   368
apply (drule Card_iff_initial [THEN iffD1])
paulson@13221
   369
apply (blast intro!: leI [THEN le_imp_lepoll])
paulson@13221
   370
done
paulson@13221
   371
paulson@13221
   372
lemma Card_0: "Card(0)"
paulson@13221
   373
apply (rule Ord_0 [THEN CardI])
paulson@13221
   374
apply (blast elim!: ltE)
paulson@13221
   375
done
paulson@13221
   376
paulson@13221
   377
lemma Card_Un: "[| Card(K);  Card(L) |] ==> Card(K Un L)"
paulson@13221
   378
apply (rule Ord_linear_le [of K L])
paulson@13221
   379
apply (simp_all add: subset_Un_iff [THEN iffD1]  Card_is_Ord le_imp_subset
paulson@13221
   380
                     subset_Un_iff2 [THEN iffD1])
paulson@13221
   381
done
paulson@13221
   382
paulson@13221
   383
(*Infinite unions of cardinals?  See Devlin, Lemma 6.7, page 98*)
paulson@13221
   384
paulson@13221
   385
lemma Card_cardinal: "Card(|A|)"
paulson@13221
   386
apply (unfold cardinal_def)
paulson@13221
   387
apply (rule_tac P =  "EX i. Ord (i) & i \<approx> A" in case_split_thm)
paulson@13221
   388
 txt{*degenerate case*}
paulson@13221
   389
 prefer 2 apply (erule Least_0 [THEN ssubst], rule Card_0)
paulson@13221
   390
txt{*real case: A is isomorphic to some ordinal*}
paulson@13221
   391
apply (rule Ord_Least [THEN CardI], safe)
paulson@13221
   392
apply (rule less_LeastE)
paulson@13221
   393
prefer 2 apply assumption
paulson@13221
   394
apply (erule eqpoll_trans)
paulson@13221
   395
apply (best intro: LeastI ) 
paulson@13221
   396
done
paulson@13221
   397
paulson@13221
   398
(*Kunen's Lemma 10.5*)
paulson@13221
   399
lemma cardinal_eq_lemma: "[| |i| le j;  j le i |] ==> |j| = |i|"
paulson@13221
   400
apply (rule eqpollI [THEN cardinal_cong])
paulson@13221
   401
apply (erule le_imp_lepoll)
paulson@13221
   402
apply (rule lepoll_trans)
paulson@13221
   403
apply (erule_tac [2] le_imp_lepoll)
paulson@13221
   404
apply (rule eqpoll_sym [THEN eqpoll_imp_lepoll])
paulson@13221
   405
apply (rule Ord_cardinal_eqpoll)
paulson@13221
   406
apply (elim ltE Ord_succD)
paulson@13221
   407
done
paulson@13221
   408
paulson@13221
   409
lemma cardinal_mono: "i le j ==> |i| le |j|"
paulson@13221
   410
apply (rule_tac i = "|i|" and j = "|j|" in Ord_linear_le)
paulson@13221
   411
apply (safe intro!: Ord_cardinal le_eqI)
paulson@13221
   412
apply (rule cardinal_eq_lemma)
paulson@13221
   413
prefer 2 apply assumption
paulson@13221
   414
apply (erule le_trans)
paulson@13221
   415
apply (erule ltE)
paulson@13221
   416
apply (erule Ord_cardinal_le)
paulson@13221
   417
done
paulson@13221
   418
paulson@13221
   419
(*Since we have |succ(nat)| le |nat|, the converse of cardinal_mono fails!*)
paulson@13221
   420
lemma cardinal_lt_imp_lt: "[| |i| < |j|;  Ord(i);  Ord(j) |] ==> i < j"
paulson@13221
   421
apply (rule Ord_linear2 [of i j], assumption+)
paulson@13221
   422
apply (erule lt_trans2 [THEN lt_irrefl])
paulson@13221
   423
apply (erule cardinal_mono)
paulson@13221
   424
done
paulson@13221
   425
paulson@13221
   426
lemma Card_lt_imp_lt: "[| |i| < K;  Ord(i);  Card(K) |] ==> i < K"
paulson@13221
   427
apply (simp (no_asm_simp) add: cardinal_lt_imp_lt Card_is_Ord Card_cardinal_eq)
paulson@13221
   428
done
paulson@13221
   429
paulson@13221
   430
lemma Card_lt_iff: "[| Ord(i);  Card(K) |] ==> (|i| < K) <-> (i < K)"
paulson@13221
   431
by (blast intro: Card_lt_imp_lt Ord_cardinal_le [THEN lt_trans1])
paulson@13221
   432
paulson@13221
   433
lemma Card_le_iff: "[| Ord(i);  Card(K) |] ==> (K le |i|) <-> (K le i)"
paulson@13269
   434
by (simp add: Card_lt_iff Card_is_Ord Ord_cardinal not_lt_iff_le [THEN iff_sym])
paulson@13221
   435
paulson@13221
   436
(*Can use AC or finiteness to discharge first premise*)
paulson@13221
   437
lemma well_ord_lepoll_imp_Card_le:
paulson@13221
   438
     "[| well_ord(B,r);  A \<lesssim> B |] ==> |A| le |B|"
paulson@13221
   439
apply (rule_tac i = "|A|" and j = "|B|" in Ord_linear_le)
paulson@13221
   440
apply (safe intro!: Ord_cardinal le_eqI)
paulson@13221
   441
apply (rule eqpollI [THEN cardinal_cong], assumption)
paulson@13221
   442
apply (rule lepoll_trans)
paulson@13221
   443
apply (rule well_ord_cardinal_eqpoll [THEN eqpoll_sym, THEN eqpoll_imp_lepoll], assumption)
paulson@13221
   444
apply (erule le_imp_lepoll [THEN lepoll_trans])
paulson@13221
   445
apply (rule eqpoll_imp_lepoll)
paulson@13221
   446
apply (unfold lepoll_def)
paulson@13221
   447
apply (erule exE)
paulson@13221
   448
apply (rule well_ord_cardinal_eqpoll)
paulson@13221
   449
apply (erule well_ord_rvimage, assumption)
paulson@13221
   450
done
paulson@13221
   451
paulson@13221
   452
paulson@13221
   453
lemma lepoll_cardinal_le: "[| A \<lesssim> i; Ord(i) |] ==> |A| le i"
paulson@13221
   454
apply (rule le_trans)
paulson@13221
   455
apply (erule well_ord_Memrel [THEN well_ord_lepoll_imp_Card_le], assumption)
paulson@13221
   456
apply (erule Ord_cardinal_le)
paulson@13221
   457
done
paulson@13221
   458
paulson@13221
   459
lemma lepoll_Ord_imp_eqpoll: "[| A \<lesssim> i; Ord(i) |] ==> |A| \<approx> A"
paulson@13221
   460
by (blast intro: lepoll_cardinal_le well_ord_Memrel well_ord_cardinal_eqpoll dest!: lepoll_well_ord)
paulson@13221
   461
paulson@13221
   462
lemma lesspoll_imp_eqpoll: 
paulson@13221
   463
     "[| A \<prec> i; Ord(i) |] ==> |A| \<approx> A"
paulson@13221
   464
apply (unfold lesspoll_def)
paulson@13221
   465
apply (blast intro: lepoll_Ord_imp_eqpoll)
paulson@13221
   466
done
paulson@13221
   467
paulson@13221
   468
paulson@13221
   469
(*** The finite cardinals ***)
paulson@13221
   470
paulson@13221
   471
lemma cons_lepoll_consD: 
paulson@13221
   472
 "[| cons(u,A) \<lesssim> cons(v,B);  u~:A;  v~:B |] ==> A \<lesssim> B"
paulson@13221
   473
apply (unfold lepoll_def inj_def, safe)
paulson@13221
   474
apply (rule_tac x = "lam x:A. if f`x=v then f`u else f`x" in exI)
paulson@13221
   475
apply (rule CollectI)
paulson@13221
   476
(*Proving it's in the function space A->B*)
paulson@13221
   477
apply (rule if_type [THEN lam_type])
paulson@13221
   478
apply (blast dest: apply_funtype)
paulson@13221
   479
apply (blast elim!: mem_irrefl dest: apply_funtype)
paulson@13221
   480
(*Proving it's injective*)
paulson@13221
   481
apply (simp (no_asm_simp))
paulson@13221
   482
apply blast
paulson@13221
   483
done
paulson@13221
   484
paulson@13221
   485
lemma cons_eqpoll_consD: "[| cons(u,A) \<approx> cons(v,B);  u~:A;  v~:B |] ==> A \<approx> B"
paulson@13221
   486
apply (simp add: eqpoll_iff)
paulson@13221
   487
apply (blast intro: cons_lepoll_consD)
paulson@13221
   488
done
paulson@13221
   489
paulson@13221
   490
(*Lemma suggested by Mike Fourman*)
paulson@13221
   491
lemma succ_lepoll_succD: "succ(m) \<lesssim> succ(n) ==> m \<lesssim> n"
paulson@13221
   492
apply (unfold succ_def)
paulson@13221
   493
apply (erule cons_lepoll_consD)
paulson@13221
   494
apply (rule mem_not_refl)+
paulson@13221
   495
done
paulson@13221
   496
paulson@13221
   497
lemma nat_lepoll_imp_le [rule_format]:
paulson@13221
   498
     "m:nat ==> ALL n: nat. m \<lesssim> n --> m le n"
paulson@13244
   499
apply (induct_tac m)
paulson@13221
   500
apply (blast intro!: nat_0_le)
paulson@13221
   501
apply (rule ballI)
paulson@13221
   502
apply (erule_tac n = "n" in natE)
paulson@13221
   503
apply (simp (no_asm_simp) add: lepoll_def inj_def)
paulson@13221
   504
apply (blast intro!: succ_leI dest!: succ_lepoll_succD)
paulson@13221
   505
done
paulson@13221
   506
paulson@13221
   507
lemma nat_eqpoll_iff: "[| m:nat; n: nat |] ==> m \<approx> n <-> m = n"
paulson@13221
   508
apply (rule iffI)
paulson@13221
   509
apply (blast intro: nat_lepoll_imp_le le_anti_sym elim!: eqpollE)
paulson@13221
   510
apply (simp add: eqpoll_refl)
paulson@13221
   511
done
paulson@13221
   512
paulson@13221
   513
(*The object of all this work: every natural number is a (finite) cardinal*)
paulson@13221
   514
lemma nat_into_Card: 
paulson@13221
   515
    "n: nat ==> Card(n)"
paulson@13221
   516
apply (unfold Card_def cardinal_def)
paulson@13221
   517
apply (subst Least_equality)
paulson@13221
   518
apply (rule eqpoll_refl)
paulson@13221
   519
apply (erule nat_into_Ord) 
paulson@13221
   520
apply (simp (no_asm_simp) add: lt_nat_in_nat [THEN nat_eqpoll_iff])
paulson@13221
   521
apply (blast elim!: lt_irrefl)+
paulson@13221
   522
done
paulson@13221
   523
paulson@13221
   524
lemmas cardinal_0 = nat_0I [THEN nat_into_Card, THEN Card_cardinal_eq, iff]
paulson@13221
   525
lemmas cardinal_1 = nat_1I [THEN nat_into_Card, THEN Card_cardinal_eq, iff]
paulson@13221
   526
paulson@13221
   527
paulson@13221
   528
(*Part of Kunen's Lemma 10.6*)
paulson@13221
   529
lemma succ_lepoll_natE: "[| succ(n) \<lesssim> n;  n:nat |] ==> P"
paulson@13221
   530
by (rule nat_lepoll_imp_le [THEN lt_irrefl], auto)
paulson@13221
   531
paulson@13221
   532
lemma n_lesspoll_nat: "n \<in> nat ==> n \<prec> nat"
paulson@13221
   533
apply (unfold lesspoll_def)
paulson@13221
   534
apply (fast elim!: Ord_nat [THEN [2] ltI [THEN leI, THEN le_imp_lepoll]]
paulson@13221
   535
                   eqpoll_sym [THEN eqpoll_imp_lepoll] 
paulson@13221
   536
    intro: Ord_nat [THEN [2] nat_succI [THEN ltI], THEN leI, 
paulson@13221
   537
                 THEN le_imp_lepoll, THEN lepoll_trans, THEN succ_lepoll_natE])
paulson@13221
   538
done
paulson@13221
   539
paulson@13221
   540
lemma nat_lepoll_imp_ex_eqpoll_n: 
paulson@13221
   541
     "[| n \<in> nat;  nat \<lesssim> X |] ==> \<exists>Y. Y \<subseteq> X & n \<approx> Y"
paulson@13221
   542
apply (unfold lepoll_def eqpoll_def)
paulson@13221
   543
apply (fast del: subsetI subsetCE
paulson@13221
   544
            intro!: subset_SIs
paulson@13221
   545
            dest!: Ord_nat [THEN [2] OrdmemD, THEN [2] restrict_inj]
paulson@13221
   546
            elim!: restrict_bij 
paulson@13221
   547
                   inj_is_fun [THEN fun_is_rel, THEN image_subset])
paulson@13221
   548
done
paulson@13221
   549
paulson@13221
   550
paulson@13221
   551
(** lepoll, \<prec> and natural numbers **)
paulson@13221
   552
paulson@13221
   553
lemma lepoll_imp_lesspoll_succ: 
paulson@13221
   554
     "[| A \<lesssim> m; m:nat |] ==> A \<prec> succ(m)"
paulson@13221
   555
apply (unfold lesspoll_def)
paulson@13221
   556
apply (rule conjI)
paulson@13221
   557
apply (blast intro: subset_imp_lepoll [THEN [2] lepoll_trans])
paulson@13221
   558
apply (rule notI)
paulson@13221
   559
apply (drule eqpoll_sym [THEN eqpoll_imp_lepoll])
paulson@13221
   560
apply (drule lepoll_trans, assumption)
paulson@13221
   561
apply (erule succ_lepoll_natE, assumption)
paulson@13221
   562
done
paulson@13221
   563
paulson@13221
   564
lemma lesspoll_succ_imp_lepoll: 
paulson@13221
   565
     "[| A \<prec> succ(m); m:nat |] ==> A \<lesssim> m"
paulson@13221
   566
apply (unfold lesspoll_def lepoll_def eqpoll_def bij_def, clarify)
paulson@13221
   567
apply (blast intro!: inj_not_surj_succ)
paulson@13221
   568
done
paulson@13221
   569
paulson@13221
   570
lemma lesspoll_succ_iff: "m:nat ==> A \<prec> succ(m) <-> A \<lesssim> m"
paulson@13221
   571
by (blast intro!: lepoll_imp_lesspoll_succ lesspoll_succ_imp_lepoll)
paulson@13221
   572
paulson@13221
   573
lemma lepoll_succ_disj: "[| A \<lesssim> succ(m);  m:nat |] ==> A \<lesssim> m | A \<approx> succ(m)"
paulson@13221
   574
apply (rule disjCI)
paulson@13221
   575
apply (rule lesspoll_succ_imp_lepoll)
paulson@13221
   576
prefer 2 apply assumption
paulson@13221
   577
apply (simp (no_asm_simp) add: lesspoll_def)
paulson@13221
   578
done
paulson@13221
   579
paulson@13221
   580
lemma lesspoll_cardinal_lt: "[| A \<prec> i; Ord(i) |] ==> |A| < i"
paulson@13221
   581
apply (unfold lesspoll_def, clarify)
paulson@13221
   582
apply (frule lepoll_cardinal_le, assumption)
paulson@13221
   583
apply (blast intro: well_ord_Memrel well_ord_cardinal_eqpoll [THEN eqpoll_sym]
paulson@13221
   584
             dest: lepoll_well_ord  elim!: leE)
paulson@13221
   585
done
paulson@13221
   586
paulson@13221
   587
paulson@13221
   588
(*** The first infinite cardinal: Omega, or nat ***)
paulson@13221
   589
paulson@13221
   590
(*This implies Kunen's Lemma 10.6*)
paulson@13221
   591
lemma lt_not_lepoll: "[| n<i;  n:nat |] ==> ~ i \<lesssim> n"
paulson@13221
   592
apply (rule notI)
paulson@13221
   593
apply (rule succ_lepoll_natE [of n])
paulson@13221
   594
apply (rule lepoll_trans [of _ i])
paulson@13221
   595
apply (erule ltE)
paulson@13221
   596
apply (rule Ord_succ_subsetI [THEN subset_imp_lepoll], assumption+)
paulson@13221
   597
done
paulson@13221
   598
paulson@13221
   599
lemma Ord_nat_eqpoll_iff: "[| Ord(i);  n:nat |] ==> i \<approx> n <-> i=n"
paulson@13221
   600
apply (rule iffI)
paulson@13221
   601
 prefer 2 apply (simp add: eqpoll_refl)
paulson@13221
   602
apply (rule Ord_linear_lt [of i n])
paulson@13221
   603
apply (simp_all add: nat_into_Ord)
paulson@13221
   604
apply (erule lt_nat_in_nat [THEN nat_eqpoll_iff, THEN iffD1], assumption+)
paulson@13221
   605
apply (rule lt_not_lepoll [THEN notE], assumption+)
paulson@13221
   606
apply (erule eqpoll_imp_lepoll)
paulson@13221
   607
done
paulson@13221
   608
paulson@13221
   609
lemma Card_nat: "Card(nat)"
paulson@13221
   610
apply (unfold Card_def cardinal_def)
paulson@13221
   611
apply (subst Least_equality)
paulson@13221
   612
apply (rule eqpoll_refl) 
paulson@13221
   613
apply (rule Ord_nat) 
paulson@13221
   614
apply (erule ltE)
paulson@13221
   615
apply (simp_all add: eqpoll_iff lt_not_lepoll ltI)
paulson@13221
   616
done
paulson@13221
   617
paulson@13221
   618
(*Allows showing that |i| is a limit cardinal*)
paulson@13221
   619
lemma nat_le_cardinal: "nat le i ==> nat le |i|"
paulson@13221
   620
apply (rule Card_nat [THEN Card_cardinal_eq, THEN subst])
paulson@13221
   621
apply (erule cardinal_mono)
paulson@13221
   622
done
paulson@13221
   623
paulson@13221
   624
paulson@13221
   625
(*** Towards Cardinal Arithmetic ***)
paulson@13221
   626
(** Congruence laws for successor, cardinal addition and multiplication **)
paulson@13221
   627
paulson@13221
   628
(*Congruence law for  cons  under equipollence*)
paulson@13221
   629
lemma cons_lepoll_cong: 
paulson@13221
   630
    "[| A \<lesssim> B;  b ~: B |] ==> cons(a,A) \<lesssim> cons(b,B)"
paulson@13221
   631
apply (unfold lepoll_def, safe)
paulson@13221
   632
apply (rule_tac x = "lam y: cons (a,A) . if y=a then b else f`y" in exI)
paulson@13221
   633
apply (rule_tac d = "%z. if z:B then converse (f) `z else a" in lam_injective)
paulson@13221
   634
apply (safe elim!: consE') 
paulson@13221
   635
   apply simp_all
paulson@13221
   636
apply (blast intro: inj_is_fun [THEN apply_type])+ 
paulson@13221
   637
done
paulson@13221
   638
paulson@13221
   639
lemma cons_eqpoll_cong:
paulson@13221
   640
     "[| A \<approx> B;  a ~: A;  b ~: B |] ==> cons(a,A) \<approx> cons(b,B)"
paulson@13221
   641
by (simp add: eqpoll_iff cons_lepoll_cong)
paulson@13221
   642
paulson@13221
   643
lemma cons_lepoll_cons_iff:
paulson@13221
   644
     "[| a ~: A;  b ~: B |] ==> cons(a,A) \<lesssim> cons(b,B)  <->  A \<lesssim> B"
paulson@13221
   645
by (blast intro: cons_lepoll_cong cons_lepoll_consD)
paulson@13221
   646
paulson@13221
   647
lemma cons_eqpoll_cons_iff:
paulson@13221
   648
     "[| a ~: A;  b ~: B |] ==> cons(a,A) \<approx> cons(b,B)  <->  A \<approx> B"
paulson@13221
   649
by (blast intro: cons_eqpoll_cong cons_eqpoll_consD)
paulson@13221
   650
paulson@13221
   651
lemma singleton_eqpoll_1: "{a} \<approx> 1"
paulson@13221
   652
apply (unfold succ_def)
paulson@13221
   653
apply (blast intro!: eqpoll_refl [THEN cons_eqpoll_cong])
paulson@13221
   654
done
paulson@13221
   655
paulson@13221
   656
lemma cardinal_singleton: "|{a}| = 1"
paulson@13221
   657
apply (rule singleton_eqpoll_1 [THEN cardinal_cong, THEN trans])
paulson@13221
   658
apply (simp (no_asm) add: nat_into_Card [THEN Card_cardinal_eq])
paulson@13221
   659
done
paulson@13221
   660
paulson@13221
   661
lemma not_0_is_lepoll_1: "A ~= 0 ==> 1 \<lesssim> A"
paulson@13221
   662
apply (erule not_emptyE)
paulson@13221
   663
apply (rule_tac a = "cons (x, A-{x}) " in subst)
paulson@13221
   664
apply (rule_tac [2] a = "cons(0,0)" and P= "%y. y \<lesssim> cons (x, A-{x})" in subst)
paulson@13221
   665
prefer 3 apply (blast intro: cons_lepoll_cong subset_imp_lepoll, auto)
paulson@13221
   666
done
paulson@13221
   667
paulson@13221
   668
(*Congruence law for  succ  under equipollence*)
paulson@13221
   669
lemma succ_eqpoll_cong: "A \<approx> B ==> succ(A) \<approx> succ(B)"
paulson@13221
   670
apply (unfold succ_def)
paulson@13221
   671
apply (simp add: cons_eqpoll_cong mem_not_refl)
paulson@13221
   672
done
paulson@13221
   673
paulson@13221
   674
(*Congruence law for + under equipollence*)
paulson@13221
   675
lemma sum_eqpoll_cong: "[| A \<approx> C;  B \<approx> D |] ==> A+B \<approx> C+D"
paulson@13221
   676
apply (unfold eqpoll_def)
paulson@13221
   677
apply (blast intro!: sum_bij)
paulson@13221
   678
done
paulson@13221
   679
paulson@13221
   680
(*Congruence law for * under equipollence*)
paulson@13221
   681
lemma prod_eqpoll_cong: 
paulson@13221
   682
    "[| A \<approx> C;  B \<approx> D |] ==> A*B \<approx> C*D"
paulson@13221
   683
apply (unfold eqpoll_def)
paulson@13221
   684
apply (blast intro!: prod_bij)
paulson@13221
   685
done
paulson@13221
   686
paulson@13221
   687
lemma inj_disjoint_eqpoll: 
paulson@13221
   688
    "[| f: inj(A,B);  A Int B = 0 |] ==> A Un (B - range(f)) \<approx> B"
paulson@13221
   689
apply (unfold eqpoll_def)
paulson@13221
   690
apply (rule exI)
paulson@13221
   691
apply (rule_tac c = "%x. if x:A then f`x else x" 
paulson@13221
   692
            and d = "%y. if y: range (f) then converse (f) `y else y" 
paulson@13221
   693
       in lam_bijective)
paulson@13221
   694
apply (blast intro!: if_type inj_is_fun [THEN apply_type])
paulson@13221
   695
apply (simp (no_asm_simp) add: inj_converse_fun [THEN apply_funtype])
paulson@13221
   696
apply (safe elim!: UnE') 
paulson@13221
   697
   apply (simp_all add: inj_is_fun [THEN apply_rangeI])
paulson@13221
   698
apply (blast intro: inj_converse_fun [THEN apply_type])+ 
paulson@13221
   699
done
paulson@13221
   700
paulson@13221
   701
paulson@13221
   702
(*** Lemmas by Krzysztof Grabczewski.  New proofs using cons_lepoll_cons.
paulson@13221
   703
     Could easily generalise from succ to cons. ***)
paulson@13221
   704
paulson@13221
   705
(*If A has at most n+1 elements and a:A then A-{a} has at most n.*)
paulson@13221
   706
lemma Diff_sing_lepoll: 
paulson@13221
   707
      "[| a:A;  A \<lesssim> succ(n) |] ==> A - {a} \<lesssim> n"
paulson@13221
   708
apply (unfold succ_def)
paulson@13221
   709
apply (rule cons_lepoll_consD)
paulson@13221
   710
apply (rule_tac [3] mem_not_refl)
paulson@13221
   711
apply (erule cons_Diff [THEN ssubst], safe)
paulson@13221
   712
done
paulson@13221
   713
paulson@13221
   714
(*If A has at least n+1 elements then A-{a} has at least n.*)
paulson@13221
   715
lemma lepoll_Diff_sing: 
paulson@13221
   716
      "[| succ(n) \<lesssim> A |] ==> n \<lesssim> A - {a}"
paulson@13221
   717
apply (unfold succ_def)
paulson@13221
   718
apply (rule cons_lepoll_consD)
paulson@13221
   719
apply (rule_tac [2] mem_not_refl)
paulson@13221
   720
prefer 2 apply blast
paulson@13221
   721
apply (blast intro: subset_imp_lepoll [THEN [2] lepoll_trans])
paulson@13221
   722
done
paulson@13221
   723
paulson@13221
   724
lemma Diff_sing_eqpoll: "[| a:A; A \<approx> succ(n) |] ==> A - {a} \<approx> n"
paulson@13221
   725
by (blast intro!: eqpollI 
paulson@13221
   726
          elim!: eqpollE 
paulson@13221
   727
          intro: Diff_sing_lepoll lepoll_Diff_sing)
paulson@13221
   728
paulson@13221
   729
lemma lepoll_1_is_sing: "[| A \<lesssim> 1; a:A |] ==> A = {a}"
paulson@13221
   730
apply (frule Diff_sing_lepoll, assumption)
paulson@13221
   731
apply (drule lepoll_0_is_0)
paulson@13221
   732
apply (blast elim: equalityE)
paulson@13221
   733
done
paulson@13221
   734
paulson@13221
   735
lemma Un_lepoll_sum: "A Un B \<lesssim> A+B"
paulson@13221
   736
apply (unfold lepoll_def)
paulson@13221
   737
apply (rule_tac x = "lam x: A Un B. if x:A then Inl (x) else Inr (x) " in exI)
paulson@13221
   738
apply (rule_tac d = "%z. snd (z) " in lam_injective)
paulson@13221
   739
apply force 
paulson@13221
   740
apply (simp add: Inl_def Inr_def)
paulson@13221
   741
done
paulson@13221
   742
paulson@13221
   743
lemma well_ord_Un:
paulson@13221
   744
     "[| well_ord(X,R); well_ord(Y,S) |] ==> EX T. well_ord(X Un Y, T)"
paulson@13221
   745
by (erule well_ord_radd [THEN Un_lepoll_sum [THEN lepoll_well_ord]], 
paulson@13221
   746
    assumption)
paulson@13221
   747
paulson@13221
   748
(*Krzysztof Grabczewski*)
paulson@13221
   749
lemma disj_Un_eqpoll_sum: "A Int B = 0 ==> A Un B \<approx> A + B"
paulson@13221
   750
apply (unfold eqpoll_def)
paulson@13221
   751
apply (rule_tac x = "lam a:A Un B. if a:A then Inl (a) else Inr (a) " in exI)
paulson@13221
   752
apply (rule_tac d = "%z. case (%x. x, %x. x, z) " in lam_bijective)
paulson@13221
   753
apply auto
paulson@13221
   754
done
paulson@13221
   755
paulson@13221
   756
paulson@13244
   757
subsection {*Finite and infinite sets*}
paulson@13221
   758
paulson@13244
   759
lemma Finite_0 [simp]: "Finite(0)"
paulson@13221
   760
apply (unfold Finite_def)
paulson@13221
   761
apply (blast intro!: eqpoll_refl nat_0I)
paulson@13221
   762
done
paulson@13221
   763
paulson@13221
   764
lemma lepoll_nat_imp_Finite: "[| A \<lesssim> n;  n:nat |] ==> Finite(A)"
paulson@13221
   765
apply (unfold Finite_def)
paulson@13221
   766
apply (erule rev_mp)
paulson@13221
   767
apply (erule nat_induct)
paulson@13221
   768
apply (blast dest!: lepoll_0_is_0 intro!: eqpoll_refl nat_0I)
paulson@13221
   769
apply (blast dest!: lepoll_succ_disj)
paulson@13221
   770
done
paulson@13221
   771
paulson@13221
   772
lemma lesspoll_nat_is_Finite: 
paulson@13221
   773
     "A \<prec> nat ==> Finite(A)"
paulson@13221
   774
apply (unfold Finite_def)
paulson@13221
   775
apply (blast dest: ltD lesspoll_cardinal_lt 
paulson@13221
   776
                   lesspoll_imp_eqpoll [THEN eqpoll_sym])
paulson@13221
   777
done
paulson@13221
   778
paulson@13221
   779
lemma lepoll_Finite: 
paulson@13221
   780
     "[| Y \<lesssim> X;  Finite(X) |] ==> Finite(Y)"
paulson@13221
   781
apply (unfold Finite_def)
paulson@13221
   782
apply (blast elim!: eqpollE
paulson@13221
   783
             intro: lepoll_trans [THEN lepoll_nat_imp_Finite
paulson@13221
   784
                                       [unfolded Finite_def]])
paulson@13221
   785
done
paulson@13221
   786
paulson@13221
   787
lemmas subset_Finite = subset_imp_lepoll [THEN lepoll_Finite, standard]
paulson@13221
   788
paulson@13221
   789
lemmas Finite_Diff = Diff_subset [THEN subset_Finite, standard]
paulson@13221
   790
paulson@13221
   791
lemma Finite_cons: "Finite(x) ==> Finite(cons(y,x))"
paulson@13221
   792
apply (unfold Finite_def)
paulson@13221
   793
apply (rule_tac P =  "y:x" in case_split_thm)
paulson@13221
   794
apply (simp add: cons_absorb)
paulson@13221
   795
apply (erule bexE)
paulson@13221
   796
apply (rule bexI)
paulson@13221
   797
apply (erule_tac [2] nat_succI)
paulson@13221
   798
apply (simp (no_asm_simp) add: succ_def cons_eqpoll_cong mem_not_refl)
paulson@13221
   799
done
paulson@13221
   800
paulson@13221
   801
lemma Finite_succ: "Finite(x) ==> Finite(succ(x))"
paulson@13221
   802
apply (unfold succ_def)
paulson@13221
   803
apply (erule Finite_cons)
paulson@13221
   804
done
paulson@13221
   805
paulson@13269
   806
lemma Finite_cons_iff [iff]: "Finite(cons(y,x)) <-> Finite(x)"
paulson@13244
   807
by (blast intro: Finite_cons subset_Finite)
paulson@13244
   808
paulson@13269
   809
lemma Finite_succ_iff [iff]: "Finite(succ(x)) <-> Finite(x)"
paulson@13244
   810
by (simp add: succ_def)
paulson@13244
   811
paulson@13221
   812
lemma nat_le_infinite_Ord: 
paulson@13221
   813
      "[| Ord(i);  ~ Finite(i) |] ==> nat le i"
paulson@13221
   814
apply (unfold Finite_def)
paulson@13221
   815
apply (erule Ord_nat [THEN [2] Ord_linear2])
paulson@13221
   816
prefer 2 apply assumption
paulson@13221
   817
apply (blast intro!: eqpoll_refl elim!: ltE)
paulson@13221
   818
done
paulson@13221
   819
paulson@13221
   820
lemma Finite_imp_well_ord: 
paulson@13221
   821
    "Finite(A) ==> EX r. well_ord(A,r)"
paulson@13221
   822
apply (unfold Finite_def eqpoll_def)
paulson@13221
   823
apply (blast intro: well_ord_rvimage bij_is_inj well_ord_Memrel nat_into_Ord)
paulson@13221
   824
done
paulson@13221
   825
paulson@13244
   826
lemma succ_lepoll_imp_not_empty: "succ(x) \<lesssim> y ==> y \<noteq> 0"
paulson@13244
   827
by (fast dest!: lepoll_0_is_0)
paulson@13244
   828
paulson@13244
   829
lemma eqpoll_succ_imp_not_empty: "x \<approx> succ(n) ==> x \<noteq> 0"
paulson@13244
   830
by (fast elim!: eqpoll_sym [THEN eqpoll_0_is_0, THEN succ_neq_0])
paulson@13244
   831
paulson@13244
   832
lemma Finite_Fin_lemma [rule_format]:
paulson@13244
   833
     "n \<in> nat ==> \<forall>A. (A\<approx>n & A \<subseteq> X) --> A \<in> Fin(X)"
paulson@13244
   834
apply (induct_tac n)
paulson@13244
   835
apply (rule allI)
paulson@13244
   836
apply (fast intro!: Fin.emptyI dest!: eqpoll_imp_lepoll [THEN lepoll_0_is_0])
paulson@13244
   837
apply (rule allI)
paulson@13244
   838
apply (rule impI)
paulson@13244
   839
apply (erule conjE)
paulson@13244
   840
apply (rule eqpoll_succ_imp_not_empty [THEN not_emptyE], assumption)
paulson@13244
   841
apply (frule Diff_sing_eqpoll, assumption)
paulson@13244
   842
apply (erule allE)
paulson@13244
   843
apply (erule impE, fast)
paulson@13244
   844
apply (drule subsetD, assumption)
paulson@13244
   845
apply (drule Fin.consI, assumption)
paulson@13244
   846
apply (simp add: cons_Diff)
paulson@13244
   847
done
paulson@13244
   848
paulson@13244
   849
lemma Finite_Fin: "[| Finite(A); A \<subseteq> X |] ==> A \<in> Fin(X)"
paulson@13244
   850
by (unfold Finite_def, blast intro: Finite_Fin_lemma) 
paulson@13244
   851
paulson@13244
   852
lemma eqpoll_imp_Finite_iff: "A \<approx> B ==> Finite(A) <-> Finite(B)"
paulson@13244
   853
apply (unfold Finite_def) 
paulson@13244
   854
apply (blast intro: eqpoll_trans eqpoll_sym) 
paulson@13244
   855
done
paulson@13244
   856
paulson@13244
   857
lemma Fin_lemma [rule_format]: "n: nat ==> ALL A. A \<approx> n --> A : Fin(A)"
paulson@13244
   858
apply (induct_tac n)
paulson@13244
   859
apply (simp add: eqpoll_0_iff, clarify)
paulson@13244
   860
apply (subgoal_tac "EX u. u:A")
paulson@13244
   861
apply (erule exE)
paulson@13244
   862
apply (rule Diff_sing_eqpoll [THEN revcut_rl])
paulson@13244
   863
prefer 2 apply assumption
paulson@13244
   864
apply assumption
paulson@13244
   865
apply (rule_tac b = "A" in cons_Diff [THEN subst], assumption)
paulson@13244
   866
apply (rule Fin.consI, blast)
paulson@13244
   867
apply (blast intro: subset_consI [THEN Fin_mono, THEN subsetD])
paulson@13244
   868
(*Now for the lemma assumed above*)
paulson@13244
   869
apply (unfold eqpoll_def)
paulson@13244
   870
apply (blast intro: bij_converse_bij [THEN bij_is_fun, THEN apply_type])
paulson@13244
   871
done
paulson@13244
   872
paulson@13244
   873
lemma Finite_into_Fin: "Finite(A) ==> A : Fin(A)"
paulson@13244
   874
apply (unfold Finite_def)
paulson@13244
   875
apply (blast intro: Fin_lemma)
paulson@13244
   876
done
paulson@13244
   877
paulson@13244
   878
lemma Fin_into_Finite: "A : Fin(U) ==> Finite(A)"
paulson@13244
   879
by (fast intro!: Finite_0 Finite_cons elim: Fin_induct)
paulson@13244
   880
paulson@13244
   881
lemma Finite_Fin_iff: "Finite(A) <-> A : Fin(A)"
paulson@13244
   882
by (blast intro: Finite_into_Fin Fin_into_Finite)
paulson@13244
   883
paulson@13244
   884
lemma Finite_Un: "[| Finite(A); Finite(B) |] ==> Finite(A Un B)"
paulson@13244
   885
by (blast intro!: Fin_into_Finite Fin_UnI 
paulson@13244
   886
          dest!: Finite_into_Fin
paulson@13244
   887
          intro: Un_upper1 [THEN Fin_mono, THEN subsetD] 
paulson@13244
   888
                 Un_upper2 [THEN Fin_mono, THEN subsetD])
paulson@13244
   889
paulson@13244
   890
lemma Finite_Union: "[| ALL y:X. Finite(y);  Finite(X) |] ==> Finite(Union(X))"
paulson@13244
   891
apply (simp add: Finite_Fin_iff)
paulson@13244
   892
apply (rule Fin_UnionI)
paulson@13244
   893
apply (erule Fin_induct, simp)
paulson@13244
   894
apply (blast intro: Fin.consI Fin_mono [THEN [2] rev_subsetD])
paulson@13244
   895
done
paulson@13244
   896
paulson@13244
   897
(* Induction principle for Finite(A), by Sidi Ehmety *)
paulson@13244
   898
lemma Finite_induct:
paulson@13244
   899
"[| Finite(A); P(0);
paulson@13244
   900
    !! x B.   [| Finite(B); x ~: B; P(B) |] ==> P(cons(x, B)) |]
paulson@13244
   901
 ==> P(A)"
paulson@13244
   902
apply (erule Finite_into_Fin [THEN Fin_induct]) 
paulson@13244
   903
apply (blast intro: Fin_into_Finite)+
paulson@13244
   904
done
paulson@13244
   905
paulson@13244
   906
(*Sidi Ehmety.  The contrapositive says ~Finite(A) ==> ~Finite(A-{a}) *)
paulson@13244
   907
lemma Diff_sing_Finite: "Finite(A - {a}) ==> Finite(A)"
paulson@13244
   908
apply (unfold Finite_def)
paulson@13244
   909
apply (case_tac "a:A")
paulson@13244
   910
apply (subgoal_tac [2] "A-{a}=A", auto)
paulson@13244
   911
apply (rule_tac x = "succ (n) " in bexI)
paulson@13244
   912
apply (subgoal_tac "cons (a, A - {a}) = A & cons (n, n) = succ (n) ")
paulson@13244
   913
apply (drule_tac a = "a" and b = "n" in cons_eqpoll_cong)
paulson@13244
   914
apply (auto dest: mem_irrefl)
paulson@13244
   915
done
paulson@13244
   916
paulson@13244
   917
(*Sidi Ehmety.  And the contrapositive of this says
paulson@13244
   918
   [| ~Finite(A); Finite(B) |] ==> ~Finite(A-B) *)
paulson@13244
   919
lemma Diff_Finite [rule_format]: "Finite(B) ==> Finite(A-B) --> Finite(A)"
paulson@13244
   920
apply (erule Finite_induct, auto)
paulson@13244
   921
apply (case_tac "x:A")
paulson@13244
   922
 apply (subgoal_tac [2] "A-cons (x, B) = A - B")
paulson@13244
   923
apply (subgoal_tac "A - cons (x, B) = (A - B) - {x}")
paulson@13244
   924
apply (rotate_tac -1, simp)
paulson@13244
   925
apply (drule Diff_sing_Finite, auto)
paulson@13244
   926
done
paulson@13244
   927
paulson@13244
   928
lemma Finite_RepFun: "Finite(A) ==> Finite(RepFun(A,f))"
paulson@13244
   929
by (erule Finite_induct, simp_all)
paulson@13244
   930
paulson@13244
   931
lemma Finite_RepFun_iff_lemma [rule_format]:
paulson@13244
   932
     "[|Finite(x); !!x y. f(x)=f(y) ==> x=y|] 
paulson@13244
   933
      ==> \<forall>A. x = RepFun(A,f) --> Finite(A)" 
paulson@13244
   934
apply (erule Finite_induct)
paulson@13244
   935
 apply clarify 
paulson@13244
   936
 apply (case_tac "A=0", simp)
paulson@13244
   937
 apply (blast del: allE, clarify) 
paulson@13244
   938
apply (subgoal_tac "\<exists>z\<in>A. x = f(z)") 
paulson@13244
   939
 prefer 2 apply (blast del: allE elim: equalityE, clarify) 
paulson@13244
   940
apply (subgoal_tac "B = {f(u) . u \<in> A - {z}}")
paulson@13244
   941
 apply (blast intro: Diff_sing_Finite) 
paulson@13244
   942
apply (thin_tac "\<forall>A. ?P(A) --> Finite(A)") 
paulson@13244
   943
apply (rule equalityI) 
paulson@13244
   944
 apply (blast intro: elim: equalityE) 
paulson@13244
   945
apply (blast intro: elim: equalityCE) 
paulson@13244
   946
done
paulson@13244
   947
paulson@13244
   948
text{*I don't know why, but if the premise is expressed using meta-connectives
paulson@13244
   949
then  the simplifier cannot prove it automatically in conditional rewriting.*}
paulson@13244
   950
lemma Finite_RepFun_iff:
paulson@13244
   951
     "(\<forall>x y. f(x)=f(y) --> x=y) ==> Finite(RepFun(A,f)) <-> Finite(A)"
paulson@13244
   952
by (blast intro: Finite_RepFun Finite_RepFun_iff_lemma [of _ f]) 
paulson@13244
   953
paulson@13244
   954
lemma Finite_Pow: "Finite(A) ==> Finite(Pow(A))"
paulson@13244
   955
apply (erule Finite_induct) 
paulson@13244
   956
apply (simp_all add: Pow_insert Finite_Un Finite_RepFun) 
paulson@13244
   957
done
paulson@13244
   958
paulson@13244
   959
lemma Finite_Pow_imp_Finite: "Finite(Pow(A)) ==> Finite(A)"
paulson@13244
   960
apply (subgoal_tac "Finite({{x} . x \<in> A})")
paulson@13244
   961
 apply (simp add: Finite_RepFun_iff ) 
paulson@13244
   962
apply (blast intro: subset_Finite) 
paulson@13244
   963
done
paulson@13244
   964
paulson@13244
   965
lemma Finite_Pow_iff [iff]: "Finite(Pow(A)) <-> Finite(A)"
paulson@13244
   966
by (blast intro: Finite_Pow Finite_Pow_imp_Finite)
paulson@13244
   967
paulson@13244
   968
paulson@13221
   969
paulson@13221
   970
(*Krzysztof Grabczewski's proof that the converse of a finite, well-ordered
paulson@13221
   971
  set is well-ordered.  Proofs simplified by lcp. *)
paulson@13221
   972
paulson@13221
   973
lemma nat_wf_on_converse_Memrel: "n:nat ==> wf[n](converse(Memrel(n)))"
paulson@13221
   974
apply (erule nat_induct)
paulson@13221
   975
apply (blast intro: wf_onI)
paulson@13221
   976
apply (rule wf_onI)
paulson@13221
   977
apply (simp add: wf_on_def wf_def)
paulson@13221
   978
apply (rule_tac P =  "x:Z" in case_split_thm)
paulson@13221
   979
 txt{*x:Z case*}
paulson@13221
   980
 apply (drule_tac x = x in bspec, assumption)
paulson@13221
   981
 apply (blast elim: mem_irrefl mem_asym)
paulson@13221
   982
txt{*other case*} 
paulson@13221
   983
apply (drule_tac x = "Z" in spec, blast) 
paulson@13221
   984
done
paulson@13221
   985
paulson@13221
   986
lemma nat_well_ord_converse_Memrel: "n:nat ==> well_ord(n,converse(Memrel(n)))"
paulson@13221
   987
apply (frule Ord_nat [THEN Ord_in_Ord, THEN well_ord_Memrel])
paulson@13221
   988
apply (unfold well_ord_def)
paulson@13221
   989
apply (blast intro!: tot_ord_converse nat_wf_on_converse_Memrel)
paulson@13221
   990
done
paulson@13221
   991
paulson@13221
   992
lemma well_ord_converse:
paulson@13221
   993
     "[|well_ord(A,r);      
paulson@13221
   994
        well_ord(ordertype(A,r), converse(Memrel(ordertype(A, r)))) |]
paulson@13221
   995
      ==> well_ord(A,converse(r))"
paulson@13221
   996
apply (rule well_ord_Int_iff [THEN iffD1])
paulson@13221
   997
apply (frule ordermap_bij [THEN bij_is_inj, THEN well_ord_rvimage], assumption)
paulson@13221
   998
apply (simp add: rvimage_converse converse_Int converse_prod
paulson@13221
   999
                 ordertype_ord_iso [THEN ord_iso_rvimage_eq])
paulson@13221
  1000
done
paulson@13221
  1001
paulson@13221
  1002
lemma ordertype_eq_n:
paulson@13221
  1003
     "[| well_ord(A,r);  A \<approx> n;  n:nat |] ==> ordertype(A,r)=n"
paulson@13221
  1004
apply (rule Ord_ordertype [THEN Ord_nat_eqpoll_iff, THEN iffD1], assumption+)
paulson@13221
  1005
apply (rule eqpoll_trans)
paulson@13221
  1006
 prefer 2 apply assumption
paulson@13221
  1007
apply (unfold eqpoll_def)
paulson@13221
  1008
apply (blast intro!: ordermap_bij [THEN bij_converse_bij])
paulson@13221
  1009
done
paulson@13221
  1010
paulson@13221
  1011
lemma Finite_well_ord_converse: 
paulson@13221
  1012
    "[| Finite(A);  well_ord(A,r) |] ==> well_ord(A,converse(r))"
paulson@13221
  1013
apply (unfold Finite_def)
paulson@13221
  1014
apply (rule well_ord_converse, assumption)
paulson@13221
  1015
apply (blast dest: ordertype_eq_n intro!: nat_well_ord_converse_Memrel)
paulson@13221
  1016
done
paulson@13221
  1017
paulson@13221
  1018
lemma nat_into_Finite: "n:nat ==> Finite(n)"
paulson@13221
  1019
apply (unfold Finite_def)
paulson@13221
  1020
apply (fast intro!: eqpoll_refl)
paulson@13221
  1021
done
paulson@13221
  1022
paulson@13221
  1023
ML
paulson@13221
  1024
{*
paulson@13221
  1025
val Least_def = thm "Least_def";
paulson@13221
  1026
val eqpoll_def = thm "eqpoll_def";
paulson@13221
  1027
val lepoll_def = thm "lepoll_def";
paulson@13221
  1028
val lesspoll_def = thm "lesspoll_def";
paulson@13221
  1029
val cardinal_def = thm "cardinal_def";
paulson@13221
  1030
val Finite_def = thm "Finite_def";
paulson@13221
  1031
val Card_def = thm "Card_def";
paulson@13221
  1032
val eq_imp_not_mem = thm "eq_imp_not_mem";
paulson@13221
  1033
val decomp_bnd_mono = thm "decomp_bnd_mono";
paulson@13221
  1034
val Banach_last_equation = thm "Banach_last_equation";
paulson@13221
  1035
val decomposition = thm "decomposition";
paulson@13221
  1036
val schroeder_bernstein = thm "schroeder_bernstein";
paulson@13221
  1037
val bij_imp_eqpoll = thm "bij_imp_eqpoll";
paulson@13221
  1038
val eqpoll_refl = thm "eqpoll_refl";
paulson@13221
  1039
val eqpoll_sym = thm "eqpoll_sym";
paulson@13221
  1040
val eqpoll_trans = thm "eqpoll_trans";
paulson@13221
  1041
val subset_imp_lepoll = thm "subset_imp_lepoll";
paulson@13221
  1042
val lepoll_refl = thm "lepoll_refl";
paulson@13221
  1043
val le_imp_lepoll = thm "le_imp_lepoll";
paulson@13221
  1044
val eqpoll_imp_lepoll = thm "eqpoll_imp_lepoll";
paulson@13221
  1045
val lepoll_trans = thm "lepoll_trans";
paulson@13221
  1046
val eqpollI = thm "eqpollI";
paulson@13221
  1047
val eqpollE = thm "eqpollE";
paulson@13221
  1048
val eqpoll_iff = thm "eqpoll_iff";
paulson@13221
  1049
val lepoll_0_is_0 = thm "lepoll_0_is_0";
paulson@13221
  1050
val empty_lepollI = thm "empty_lepollI";
paulson@13221
  1051
val lepoll_0_iff = thm "lepoll_0_iff";
paulson@13221
  1052
val Un_lepoll_Un = thm "Un_lepoll_Un";
paulson@13221
  1053
val eqpoll_0_is_0 = thm "eqpoll_0_is_0";
paulson@13221
  1054
val eqpoll_0_iff = thm "eqpoll_0_iff";
paulson@13221
  1055
val eqpoll_disjoint_Un = thm "eqpoll_disjoint_Un";
paulson@13221
  1056
val lesspoll_not_refl = thm "lesspoll_not_refl";
paulson@13221
  1057
val lesspoll_irrefl = thm "lesspoll_irrefl";
paulson@13221
  1058
val lesspoll_imp_lepoll = thm "lesspoll_imp_lepoll";
paulson@13221
  1059
val lepoll_well_ord = thm "lepoll_well_ord";
paulson@13221
  1060
val lepoll_iff_leqpoll = thm "lepoll_iff_leqpoll";
paulson@13221
  1061
val inj_not_surj_succ = thm "inj_not_surj_succ";
paulson@13221
  1062
val lesspoll_trans = thm "lesspoll_trans";
paulson@13221
  1063
val lesspoll_trans1 = thm "lesspoll_trans1";
paulson@13221
  1064
val lesspoll_trans2 = thm "lesspoll_trans2";
paulson@13221
  1065
val Least_equality = thm "Least_equality";
paulson@13221
  1066
val LeastI = thm "LeastI";
paulson@13221
  1067
val Least_le = thm "Least_le";
paulson@13221
  1068
val less_LeastE = thm "less_LeastE";
paulson@13221
  1069
val LeastI2 = thm "LeastI2";
paulson@13221
  1070
val Least_0 = thm "Least_0";
paulson@13221
  1071
val Ord_Least = thm "Ord_Least";
paulson@13221
  1072
val Least_cong = thm "Least_cong";
paulson@13221
  1073
val cardinal_cong = thm "cardinal_cong";
paulson@13221
  1074
val well_ord_cardinal_eqpoll = thm "well_ord_cardinal_eqpoll";
paulson@13221
  1075
val Ord_cardinal_eqpoll = thm "Ord_cardinal_eqpoll";
paulson@13221
  1076
val well_ord_cardinal_eqE = thm "well_ord_cardinal_eqE";
paulson@13221
  1077
val well_ord_cardinal_eqpoll_iff = thm "well_ord_cardinal_eqpoll_iff";
paulson@13221
  1078
val Ord_cardinal_le = thm "Ord_cardinal_le";
paulson@13221
  1079
val Card_cardinal_eq = thm "Card_cardinal_eq";
paulson@13221
  1080
val CardI = thm "CardI";
paulson@13221
  1081
val Card_is_Ord = thm "Card_is_Ord";
paulson@13221
  1082
val Card_cardinal_le = thm "Card_cardinal_le";
paulson@13221
  1083
val Ord_cardinal = thm "Ord_cardinal";
paulson@13221
  1084
val Card_iff_initial = thm "Card_iff_initial";
paulson@13221
  1085
val lt_Card_imp_lesspoll = thm "lt_Card_imp_lesspoll";
paulson@13221
  1086
val Card_0 = thm "Card_0";
paulson@13221
  1087
val Card_Un = thm "Card_Un";
paulson@13221
  1088
val Card_cardinal = thm "Card_cardinal";
paulson@13221
  1089
val cardinal_mono = thm "cardinal_mono";
paulson@13221
  1090
val cardinal_lt_imp_lt = thm "cardinal_lt_imp_lt";
paulson@13221
  1091
val Card_lt_imp_lt = thm "Card_lt_imp_lt";
paulson@13221
  1092
val Card_lt_iff = thm "Card_lt_iff";
paulson@13221
  1093
val Card_le_iff = thm "Card_le_iff";
paulson@13221
  1094
val well_ord_lepoll_imp_Card_le = thm "well_ord_lepoll_imp_Card_le";
paulson@13221
  1095
val lepoll_cardinal_le = thm "lepoll_cardinal_le";
paulson@13221
  1096
val lepoll_Ord_imp_eqpoll = thm "lepoll_Ord_imp_eqpoll";
paulson@13221
  1097
val lesspoll_imp_eqpoll = thm "lesspoll_imp_eqpoll";
paulson@13221
  1098
val cons_lepoll_consD = thm "cons_lepoll_consD";
paulson@13221
  1099
val cons_eqpoll_consD = thm "cons_eqpoll_consD";
paulson@13221
  1100
val succ_lepoll_succD = thm "succ_lepoll_succD";
paulson@13221
  1101
val nat_lepoll_imp_le = thm "nat_lepoll_imp_le";
paulson@13221
  1102
val nat_eqpoll_iff = thm "nat_eqpoll_iff";
paulson@13221
  1103
val nat_into_Card = thm "nat_into_Card";
paulson@13221
  1104
val cardinal_0 = thm "cardinal_0";
paulson@13221
  1105
val cardinal_1 = thm "cardinal_1";
paulson@13221
  1106
val succ_lepoll_natE = thm "succ_lepoll_natE";
paulson@13221
  1107
val n_lesspoll_nat = thm "n_lesspoll_nat";
paulson@13221
  1108
val nat_lepoll_imp_ex_eqpoll_n = thm "nat_lepoll_imp_ex_eqpoll_n";
paulson@13221
  1109
val lepoll_imp_lesspoll_succ = thm "lepoll_imp_lesspoll_succ";
paulson@13221
  1110
val lesspoll_succ_imp_lepoll = thm "lesspoll_succ_imp_lepoll";
paulson@13221
  1111
val lesspoll_succ_iff = thm "lesspoll_succ_iff";
paulson@13221
  1112
val lepoll_succ_disj = thm "lepoll_succ_disj";
paulson@13221
  1113
val lesspoll_cardinal_lt = thm "lesspoll_cardinal_lt";
paulson@13221
  1114
val lt_not_lepoll = thm "lt_not_lepoll";
paulson@13221
  1115
val Ord_nat_eqpoll_iff = thm "Ord_nat_eqpoll_iff";
paulson@13221
  1116
val Card_nat = thm "Card_nat";
paulson@13221
  1117
val nat_le_cardinal = thm "nat_le_cardinal";
paulson@13221
  1118
val cons_lepoll_cong = thm "cons_lepoll_cong";
paulson@13221
  1119
val cons_eqpoll_cong = thm "cons_eqpoll_cong";
paulson@13221
  1120
val cons_lepoll_cons_iff = thm "cons_lepoll_cons_iff";
paulson@13221
  1121
val cons_eqpoll_cons_iff = thm "cons_eqpoll_cons_iff";
paulson@13221
  1122
val singleton_eqpoll_1 = thm "singleton_eqpoll_1";
paulson@13221
  1123
val cardinal_singleton = thm "cardinal_singleton";
paulson@13221
  1124
val not_0_is_lepoll_1 = thm "not_0_is_lepoll_1";
paulson@13221
  1125
val succ_eqpoll_cong = thm "succ_eqpoll_cong";
paulson@13221
  1126
val sum_eqpoll_cong = thm "sum_eqpoll_cong";
paulson@13221
  1127
val prod_eqpoll_cong = thm "prod_eqpoll_cong";
paulson@13221
  1128
val inj_disjoint_eqpoll = thm "inj_disjoint_eqpoll";
paulson@13221
  1129
val Diff_sing_lepoll = thm "Diff_sing_lepoll";
paulson@13221
  1130
val lepoll_Diff_sing = thm "lepoll_Diff_sing";
paulson@13221
  1131
val Diff_sing_eqpoll = thm "Diff_sing_eqpoll";
paulson@13221
  1132
val lepoll_1_is_sing = thm "lepoll_1_is_sing";
paulson@13221
  1133
val Un_lepoll_sum = thm "Un_lepoll_sum";
paulson@13221
  1134
val well_ord_Un = thm "well_ord_Un";
paulson@13221
  1135
val disj_Un_eqpoll_sum = thm "disj_Un_eqpoll_sum";
paulson@13221
  1136
val Finite_0 = thm "Finite_0";
paulson@13221
  1137
val lepoll_nat_imp_Finite = thm "lepoll_nat_imp_Finite";
paulson@13221
  1138
val lesspoll_nat_is_Finite = thm "lesspoll_nat_is_Finite";
paulson@13221
  1139
val lepoll_Finite = thm "lepoll_Finite";
paulson@13221
  1140
val subset_Finite = thm "subset_Finite";
paulson@13221
  1141
val Finite_Diff = thm "Finite_Diff";
paulson@13221
  1142
val Finite_cons = thm "Finite_cons";
paulson@13221
  1143
val Finite_succ = thm "Finite_succ";
paulson@13221
  1144
val nat_le_infinite_Ord = thm "nat_le_infinite_Ord";
paulson@13221
  1145
val Finite_imp_well_ord = thm "Finite_imp_well_ord";
paulson@13221
  1146
val nat_wf_on_converse_Memrel = thm "nat_wf_on_converse_Memrel";
paulson@13221
  1147
val nat_well_ord_converse_Memrel = thm "nat_well_ord_converse_Memrel";
paulson@13221
  1148
val well_ord_converse = thm "well_ord_converse";
paulson@13221
  1149
val ordertype_eq_n = thm "ordertype_eq_n";
paulson@13221
  1150
val Finite_well_ord_converse = thm "Finite_well_ord_converse";
paulson@13221
  1151
val nat_into_Finite = thm "nat_into_Finite";
paulson@13221
  1152
*}
paulson@9683
  1153
lcp@435
  1154
end