src/ZF/Cardinal.ML
author lcp
Fri, 16 Dec 1994 18:07:12 +0100
changeset 803 4c8333ab3eae
parent 792 5d2a7634da46
child 833 ba386650df2c
permissions -rw-r--r--
changed useless "qed" calls for lemmas back to uses of "result", and/or used "bind_thm" to declare the real results.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
     1
(*  Title: 	ZF/Cardinal.ML
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
     2
    ID:         $Id$
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
     3
    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
     4
    Copyright   1994  University of Cambridge
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
     5
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
     6
Cardinals in Zermelo-Fraenkel Set Theory 
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
     7
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
     8
This theory does NOT assume the Axiom of Choice
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
     9
*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    10
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    11
open Cardinal;
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    12
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    13
(*** The Schroeder-Bernstein Theorem -- see Davey & Priestly, page 106 ***)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    14
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    15
(** Lemma: Banach's Decomposition Theorem **)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    16
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    17
goal Cardinal.thy "bnd_mono(X, %W. X - g``(Y - f``W))";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    18
by (rtac bnd_monoI 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    19
by (REPEAT (ares_tac [Diff_subset, subset_refl, Diff_mono, image_mono] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
    20
qed "decomp_bnd_mono";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    21
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    22
val [gfun] = goal Cardinal.thy
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    23
    "g: Y->X ==>   					\
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    24
\    g``(Y - f`` lfp(X, %W. X - g``(Y - f``W))) = 	\
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    25
\    X - lfp(X, %W. X - g``(Y - f``W)) ";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    26
by (res_inst_tac [("P", "%u. ?v = X-u")] 
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    27
     (decomp_bnd_mono RS lfp_Tarski RS ssubst) 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    28
by (simp_tac (ZF_ss addsimps [subset_refl, double_complement,
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    29
			     gfun RS fun_is_rel RS image_subset]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
    30
qed "Banach_last_equation";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    31
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    32
val prems = goal Cardinal.thy
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    33
    "[| f: X->Y;  g: Y->X |] ==>   \
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    34
\    EX XA XB YA YB. (XA Int XB = 0) & (XA Un XB = X) &    \
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    35
\                    (YA Int YB = 0) & (YA Un YB = Y) &    \
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    36
\                    f``XA=YA & g``YB=XB";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    37
by (REPEAT 
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    38
    (FIRSTGOAL
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    39
     (resolve_tac [refl, exI, conjI, Diff_disjoint, Diff_partition])));
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    40
by (rtac Banach_last_equation 3);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    41
by (REPEAT (resolve_tac (prems@[fun_is_rel, image_subset, lfp_subset]) 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
    42
qed "decomposition";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    43
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    44
val prems = goal Cardinal.thy
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    45
    "[| f: inj(X,Y);  g: inj(Y,X) |] ==> EX h. h: bij(X,Y)";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    46
by (cut_facts_tac prems 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    47
by (cut_facts_tac [(prems RL [inj_is_fun]) MRS decomposition] 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    48
by (fast_tac (ZF_cs addSIs [restrict_bij,bij_disjoint_Un]
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    49
                    addIs [bij_converse_bij]) 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    50
(* The instantiation of exI to "restrict(f,XA) Un converse(restrict(g,YB))"
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    51
   is forced by the context!! *)
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
    52
qed "schroeder_bernstein";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    53
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    54
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    55
(** Equipollence is an equivalence relation **)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    56
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    57
goalw Cardinal.thy [eqpoll_def] "X eqpoll X";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
    58
by (rtac exI 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
    59
by (rtac id_bij 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
    60
qed "eqpoll_refl";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    61
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    62
goalw Cardinal.thy [eqpoll_def] "!!X Y. X eqpoll Y ==> Y eqpoll X";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    63
by (fast_tac (ZF_cs addIs [bij_converse_bij]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
    64
qed "eqpoll_sym";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    65
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    66
goalw Cardinal.thy [eqpoll_def]
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    67
    "!!X Y. [| X eqpoll Y;  Y eqpoll Z |] ==> X eqpoll Z";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    68
by (fast_tac (ZF_cs addIs [comp_bij]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
    69
qed "eqpoll_trans";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    70
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    71
(** Le-pollence is a partial ordering **)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    72
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    73
goalw Cardinal.thy [lepoll_def] "!!X Y. X<=Y ==> X lepoll Y";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
    74
by (rtac exI 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
    75
by (etac id_subset_inj 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
    76
qed "subset_imp_lepoll";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    77
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    78
val lepoll_refl = subset_refl RS subset_imp_lepoll;
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    79
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    80
goalw Cardinal.thy [eqpoll_def, bij_def, lepoll_def]
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    81
    "!!X Y. X eqpoll Y ==> X lepoll Y";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    82
by (fast_tac ZF_cs 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
    83
qed "eqpoll_imp_lepoll";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    84
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    85
goalw Cardinal.thy [lepoll_def]
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    86
    "!!X Y. [| X lepoll Y;  Y lepoll Z |] ==> X lepoll Z";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    87
by (fast_tac (ZF_cs addIs [comp_inj]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
    88
qed "lepoll_trans";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    89
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    90
(*Asymmetry law*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    91
goalw Cardinal.thy [lepoll_def,eqpoll_def]
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    92
    "!!X Y. [| X lepoll Y;  Y lepoll X |] ==> X eqpoll Y";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    93
by (REPEAT (etac exE 1));
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    94
by (rtac schroeder_bernstein 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    95
by (REPEAT (assume_tac 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
    96
qed "eqpollI";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    97
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    98
val [major,minor] = goal Cardinal.thy
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    99
    "[| X eqpoll Y; [| X lepoll Y; Y lepoll X |] ==> P |] ==> P";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   100
by (rtac minor 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   101
by (REPEAT (resolve_tac [major, eqpoll_imp_lepoll, eqpoll_sym] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   102
qed "eqpollE";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   103
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   104
goal Cardinal.thy "X eqpoll Y <-> X lepoll Y & Y lepoll X";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   105
by (fast_tac (ZF_cs addIs [eqpollI] addSEs [eqpollE]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   106
qed "eqpoll_iff";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   107
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   108
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   109
(** LEAST -- the least number operator [from HOL/Univ.ML] **)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   110
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   111
val [premP,premOrd,premNot] = goalw Cardinal.thy [Least_def]
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   112
    "[| P(i);  Ord(i);  !!x. x<i ==> ~P(x) |] ==> (LEAST x.P(x)) = i";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   113
by (rtac the_equality 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   114
by (fast_tac (ZF_cs addSIs [premP,premOrd,premNot]) 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   115
by (REPEAT (etac conjE 1));
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   116
by (etac (premOrd RS Ord_linear_lt) 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   117
by (ALLGOALS (fast_tac (ZF_cs addSIs [premP] addSDs [premNot])));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   118
qed "Least_equality";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   119
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   120
goal Cardinal.thy "!!i. [| P(i);  Ord(i) |] ==> P(LEAST x.P(x))";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   121
by (etac rev_mp 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   122
by (trans_ind_tac "i" [] 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   123
by (rtac impI 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   124
by (rtac classical 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   125
by (EVERY1 [rtac (Least_equality RS ssubst), assume_tac, assume_tac]);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   126
by (assume_tac 2);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   127
by (fast_tac (ZF_cs addSEs [ltE]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   128
qed "LeastI";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   129
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   130
(*Proof is almost identical to the one above!*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   131
goal Cardinal.thy "!!i. [| P(i);  Ord(i) |] ==> (LEAST x.P(x)) le i";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   132
by (etac rev_mp 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   133
by (trans_ind_tac "i" [] 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   134
by (rtac impI 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   135
by (rtac classical 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   136
by (EVERY1 [rtac (Least_equality RS ssubst), assume_tac, assume_tac]);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   137
by (etac le_refl 2);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   138
by (fast_tac (ZF_cs addEs [ltE, lt_trans1] addIs [leI, ltI]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   139
qed "Least_le";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   140
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   141
(*LEAST really is the smallest*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   142
goal Cardinal.thy "!!i. [| P(i);  i < (LEAST x.P(x)) |] ==> Q";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   143
by (rtac (Least_le RSN (2,lt_trans2) RS lt_irrefl) 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   144
by (REPEAT (eresolve_tac [asm_rl, ltE] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   145
qed "less_LeastE";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   146
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   147
(*If there is no such P then LEAST is vacuously 0*)
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   148
goalw Cardinal.thy [Least_def]
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   149
    "!!P. [| ~ (EX i. Ord(i) & P(i)) |] ==> (LEAST x.P(x)) = 0";
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   150
by (rtac the_0 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   151
by (fast_tac ZF_cs 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   152
qed "Least_0";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   153
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   154
goal Cardinal.thy "Ord(LEAST x.P(x))";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   155
by (excluded_middle_tac "EX i. Ord(i) & P(i)" 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   156
by (safe_tac ZF_cs);
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   157
by (rtac (Least_le RS ltE) 2);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   158
by (REPEAT_SOME assume_tac);
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   159
by (etac (Least_0 RS ssubst) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   160
by (rtac Ord_0 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   161
qed "Ord_Least";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   162
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   163
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   164
(** Basic properties of cardinals **)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   165
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   166
(*Not needed for simplification, but helpful below*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   167
val prems = goal Cardinal.thy
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   168
    "[| !!y. P(y) <-> Q(y) |] ==> (LEAST x.P(x)) = (LEAST x.Q(x))";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   169
by (simp_tac (FOL_ss addsimps prems) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   170
qed "Least_cong";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   171
765
06a484afc603 Card_cardinal_le: new
lcp
parents: 760
diff changeset
   172
(*Need AC to prove   X lepoll Y ==> |X| le |Y| ; 
06a484afc603 Card_cardinal_le: new
lcp
parents: 760
diff changeset
   173
  see well_ord_lepoll_imp_Card_le  *)
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   174
goalw Cardinal.thy [eqpoll_def,cardinal_def] "!!X Y. X eqpoll Y ==> |X| = |Y|";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   175
by (rtac Least_cong 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   176
by (fast_tac (ZF_cs addEs [comp_bij,bij_converse_bij]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   177
qed "cardinal_cong";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   178
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   179
(*Under AC, the premise becomes trivial; one consequence is ||A|| = |A|*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   180
goalw Cardinal.thy [eqpoll_def, cardinal_def]
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   181
    "!!A. well_ord(A,r) ==> |A| eqpoll A";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   182
by (rtac LeastI 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   183
by (etac Ord_ordertype 2);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   184
by (rtac exI 1);
467
92868dab2939 new cardinal arithmetic developments
lcp
parents: 437
diff changeset
   185
by (etac (ordermap_bij RS bij_converse_bij) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   186
qed "well_ord_cardinal_eqpoll";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   187
803
4c8333ab3eae changed useless "qed" calls for lemmas back to uses of "result",
lcp
parents: 792
diff changeset
   188
bind_thm ("Ord_cardinal_eqpoll", well_ord_Memrel RS well_ord_cardinal_eqpoll);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   189
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   190
goal Cardinal.thy
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   191
    "!!X Y. [| well_ord(X,r);  well_ord(Y,s);  |X| = |Y| |] ==> X eqpoll Y";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   192
by (rtac (eqpoll_sym RS eqpoll_trans) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   193
by (etac well_ord_cardinal_eqpoll 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   194
by (asm_simp_tac (ZF_ss addsimps [well_ord_cardinal_eqpoll]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   195
qed "well_ord_cardinal_eqE";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   196
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   197
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   198
(** Observations from Kunen, page 28 **)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   199
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   200
goalw Cardinal.thy [cardinal_def] "!!i. Ord(i) ==> |i| le i";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   201
by (etac (eqpoll_refl RS Least_le) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   202
qed "Ord_cardinal_le";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   203
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   204
goalw Cardinal.thy [Card_def] "!!K. Card(K) ==> |K| = K";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   205
by (etac sym 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   206
qed "Card_cardinal_eq";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   207
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   208
val prems = goalw Cardinal.thy [Card_def,cardinal_def]
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   209
    "[| Ord(i);  !!j. j<i ==> ~(j eqpoll i) |] ==> Card(i)";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   210
by (rtac (Least_equality RS ssubst) 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   211
by (REPEAT (ares_tac ([refl,eqpoll_refl]@prems) 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   212
qed "CardI";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   213
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   214
goalw Cardinal.thy [Card_def, cardinal_def] "!!i. Card(i) ==> Ord(i)";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   215
by (etac ssubst 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   216
by (rtac Ord_Least 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   217
qed "Card_is_Ord";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   218
765
06a484afc603 Card_cardinal_le: new
lcp
parents: 760
diff changeset
   219
goal Cardinal.thy "!!K. Card(K) ==> K le |K|";
06a484afc603 Card_cardinal_le: new
lcp
parents: 760
diff changeset
   220
by (asm_simp_tac (ZF_ss addsimps [le_refl, Card_is_Ord, Card_cardinal_eq]) 1);
782
200a16083201 added bind_thm for theorems defined by "standard ..."
clasohm
parents: 765
diff changeset
   221
qed "Card_cardinal_le";
765
06a484afc603 Card_cardinal_le: new
lcp
parents: 760
diff changeset
   222
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   223
goalw Cardinal.thy [cardinal_def] "Ord(|A|)";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   224
by (rtac Ord_Least 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   225
qed "Ord_cardinal";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   226
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   227
goal Cardinal.thy "Card(0)";
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   228
by (rtac (Ord_0 RS CardI) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   229
by (fast_tac (ZF_cs addSEs [ltE]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   230
qed "Card_0";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   231
522
e1de521e012a ZF/Cardinal/Card_Un: new
lcp
parents: 484
diff changeset
   232
val [premK,premL] = goal Cardinal.thy
e1de521e012a ZF/Cardinal/Card_Un: new
lcp
parents: 484
diff changeset
   233
    "[| Card(K);  Card(L) |] ==> Card(K Un L)";
e1de521e012a ZF/Cardinal/Card_Un: new
lcp
parents: 484
diff changeset
   234
by (rtac ([premK RS Card_is_Ord, premL RS Card_is_Ord] MRS Ord_linear_le) 1);
e1de521e012a ZF/Cardinal/Card_Un: new
lcp
parents: 484
diff changeset
   235
by (asm_simp_tac 
e1de521e012a ZF/Cardinal/Card_Un: new
lcp
parents: 484
diff changeset
   236
    (ZF_ss addsimps [premL, le_imp_subset, subset_Un_iff RS iffD1]) 1);
e1de521e012a ZF/Cardinal/Card_Un: new
lcp
parents: 484
diff changeset
   237
by (asm_simp_tac
e1de521e012a ZF/Cardinal/Card_Un: new
lcp
parents: 484
diff changeset
   238
    (ZF_ss addsimps [premK, le_imp_subset, subset_Un_iff2 RS iffD1]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   239
qed "Card_Un";
522
e1de521e012a ZF/Cardinal/Card_Un: new
lcp
parents: 484
diff changeset
   240
e1de521e012a ZF/Cardinal/Card_Un: new
lcp
parents: 484
diff changeset
   241
(*Infinite unions of cardinals?  See Devlin, Lemma 6.7, page 98*)
e1de521e012a ZF/Cardinal/Card_Un: new
lcp
parents: 484
diff changeset
   242
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   243
goalw Cardinal.thy [cardinal_def] "Card(|A|)";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   244
by (excluded_middle_tac "EX i. Ord(i) & i eqpoll A" 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   245
by (etac (Least_0 RS ssubst) 1 THEN rtac Card_0 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   246
by (rtac (Ord_Least RS CardI) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   247
by (safe_tac ZF_cs);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   248
by (rtac less_LeastE 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   249
by (assume_tac 2);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   250
by (etac eqpoll_trans 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   251
by (REPEAT (ares_tac [LeastI] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   252
qed "Card_cardinal";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   253
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   254
(*Kunen's Lemma 10.5*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   255
goal Cardinal.thy "!!i j. [| |i| le j;  j le i |] ==> |j| = |i|";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   256
by (rtac (eqpollI RS cardinal_cong) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   257
by (etac (le_imp_subset RS subset_imp_lepoll) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   258
by (rtac lepoll_trans 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   259
by (etac (le_imp_subset RS subset_imp_lepoll) 2);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   260
by (rtac (eqpoll_sym RS eqpoll_imp_lepoll) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   261
by (rtac Ord_cardinal_eqpoll 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   262
by (REPEAT (eresolve_tac [ltE, Ord_succD] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   263
qed "cardinal_eq_lemma";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   264
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   265
goal Cardinal.thy "!!i j. i le j ==> |i| le |j|";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   266
by (res_inst_tac [("i","|i|"),("j","|j|")] Ord_linear_le 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   267
by (REPEAT_FIRST (ares_tac [Ord_cardinal, le_eqI]));
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   268
by (rtac cardinal_eq_lemma 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   269
by (assume_tac 2);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   270
by (etac le_trans 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   271
by (etac ltE 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   272
by (etac Ord_cardinal_le 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   273
qed "cardinal_mono";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   274
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   275
(*Since we have |succ(nat)| le |nat|, the converse of cardinal_mono fails!*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   276
goal Cardinal.thy "!!i j. [| |i| < |j|;  Ord(i);  Ord(j) |] ==> i < j";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   277
by (rtac Ord_linear2 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   278
by (REPEAT_SOME assume_tac);
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   279
by (etac (lt_trans2 RS lt_irrefl) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   280
by (etac cardinal_mono 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   281
qed "cardinal_lt_imp_lt";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   282
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   283
goal Cardinal.thy "!!i j. [| |i| < K;  Ord(i);  Card(K) |] ==> i < K";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   284
by (asm_simp_tac (ZF_ss addsimps 
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   285
		  [cardinal_lt_imp_lt, Card_is_Ord, Card_cardinal_eq]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   286
qed "Card_lt_imp_lt";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   287
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   288
goal Cardinal.thy "!!i j. [| Ord(i);  Card(K) |] ==> (|i| < K) <-> (i < K)";
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   289
by (fast_tac (ZF_cs addEs [Card_lt_imp_lt, Ord_cardinal_le RS lt_trans1]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   290
qed "Card_lt_iff";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   291
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   292
goal Cardinal.thy "!!i j. [| Ord(i);  Card(K) |] ==> (K le |i|) <-> (K le i)";
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   293
by (asm_simp_tac (ZF_ss addsimps 
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   294
		  [Card_lt_iff, Card_is_Ord, Ord_cardinal, 
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   295
		   not_lt_iff_le RS iff_sym]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   296
qed "Card_le_iff";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   297
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   298
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   299
(** The swap operator [NOT USED] **)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   300
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   301
goalw Cardinal.thy [swap_def]
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   302
    "!!A. [| x:A;  y:A |] ==> swap(A,x,y) : A->A";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   303
by (REPEAT (ares_tac [lam_type,if_type] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   304
qed "swap_type";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   305
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   306
goalw Cardinal.thy [swap_def]
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   307
    "!!A. [| x:A;  y:A;  z:A |] ==> swap(A,x,y)`(swap(A,x,y)`z) = z";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   308
by (asm_simp_tac (ZF_ss setloop split_tac [expand_if]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   309
qed "swap_swap_identity";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   310
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   311
goal Cardinal.thy "!!A. [| x:A;  y:A |] ==> swap(A,x,y) : bij(A,A)";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   312
by (rtac nilpotent_imp_bijective 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   313
by (REPEAT (ares_tac [swap_type, comp_eq_id_iff RS iffD2,
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   314
		      ballI, swap_swap_identity] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   315
qed "swap_bij";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   316
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   317
(*** The finite cardinals ***)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   318
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   319
(*Lemma suggested by Mike Fourman*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   320
val [prem] = goalw Cardinal.thy [inj_def]
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   321
 "f: inj(succ(m), succ(n)) ==> (lam x:m. if(f`x=n, f`m, f`x)) : inj(m,n)";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   322
by (rtac CollectI 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   323
(*Proving it's in the function space m->n*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   324
by (cut_facts_tac [prem] 1);
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   325
by (rtac (if_type RS lam_type) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   326
by (fast_tac (ZF_cs addSEs [mem_irrefl] addEs [apply_funtype RS succE]) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   327
by (fast_tac (ZF_cs addSEs [mem_irrefl] addEs [apply_funtype RS succE]) 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   328
(*Proving it's injective*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   329
by (asm_simp_tac (ZF_ss setloop split_tac [expand_if]) 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   330
(*Adding  prem  earlier would cause the simplifier to loop*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   331
by (cut_facts_tac [prem] 1);
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   332
by (fast_tac (ZF_cs addSEs [mem_irrefl]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   333
qed "inj_succ_succD";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   334
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   335
val [prem] = goalw Cardinal.thy [lepoll_def]
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   336
    "m:nat ==> ALL n: nat. m lepoll n --> m le n";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   337
by (nat_ind_tac "m" [prem] 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   338
by (fast_tac (ZF_cs addSIs [nat_0_le]) 1);
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   339
by (rtac ballI 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   340
by (eres_inst_tac [("n","n")] natE 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   341
by (asm_simp_tac (ZF_ss addsimps [inj_def, succI1 RS Pi_empty2]) 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   342
by (fast_tac (ZF_cs addSIs [succ_leI] addSDs [inj_succ_succD]) 1);
803
4c8333ab3eae changed useless "qed" calls for lemmas back to uses of "result",
lcp
parents: 792
diff changeset
   343
val nat_lepoll_imp_le_lemma = result();
4c8333ab3eae changed useless "qed" calls for lemmas back to uses of "result",
lcp
parents: 792
diff changeset
   344
4c8333ab3eae changed useless "qed" calls for lemmas back to uses of "result",
lcp
parents: 792
diff changeset
   345
bind_thm ("nat_lepoll_imp_le", nat_lepoll_imp_le_lemma RS bspec RS mp);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   346
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   347
goal Cardinal.thy
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   348
    "!!m n. [| m:nat; n: nat |] ==> m eqpoll n <-> m = n";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   349
by (rtac iffI 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   350
by (asm_simp_tac (ZF_ss addsimps [eqpoll_refl]) 2);
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   351
by (fast_tac (ZF_cs addIs [nat_lepoll_imp_le, le_anti_sym] 
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   352
                    addSEs [eqpollE]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   353
qed "nat_eqpoll_iff";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   354
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   355
goalw Cardinal.thy [Card_def,cardinal_def]
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   356
    "!!n. n: nat ==> Card(n)";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   357
by (rtac (Least_equality RS ssubst) 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   358
by (REPEAT_FIRST (ares_tac [eqpoll_refl, nat_into_Ord, refl]));
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   359
by (asm_simp_tac (ZF_ss addsimps [lt_nat_in_nat RS nat_eqpoll_iff]) 1);
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   360
by (fast_tac (ZF_cs addSEs [lt_irrefl]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   361
qed "nat_into_Card";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   362
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   363
(*Part of Kunen's Lemma 10.6*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   364
goal Cardinal.thy "!!n. [| succ(n) lepoll n;  n:nat |] ==> P";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   365
by (rtac (nat_lepoll_imp_le RS lt_irrefl) 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   366
by (REPEAT (ares_tac [nat_succI] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   367
qed "succ_lepoll_natE";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   368
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   369
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   370
(*** The first infinite cardinal: Omega, or nat ***)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   371
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   372
(*This implies Kunen's Lemma 10.6*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   373
goal Cardinal.thy "!!n. [| n<i;  n:nat |] ==> ~ i lepoll n";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   374
by (rtac notI 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   375
by (rtac succ_lepoll_natE 1 THEN assume_tac 2);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   376
by (rtac lepoll_trans 1 THEN assume_tac 2);
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   377
by (etac ltE 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   378
by (REPEAT (ares_tac [Ord_succ_subsetI RS subset_imp_lepoll] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   379
qed "lt_not_lepoll";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   380
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   381
goal Cardinal.thy "!!i n. [| Ord(i);  n:nat |] ==> i eqpoll n <-> i=n";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   382
by (rtac iffI 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   383
by (asm_simp_tac (ZF_ss addsimps [eqpoll_refl]) 2);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   384
by (rtac Ord_linear_lt 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   385
by (REPEAT_SOME (eresolve_tac [asm_rl, nat_into_Ord]));
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   386
by (etac (lt_nat_in_nat RS nat_eqpoll_iff RS iffD1) 1 THEN
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   387
    REPEAT (assume_tac 1));
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   388
by (rtac (lt_not_lepoll RS notE) 1 THEN (REPEAT (assume_tac 1)));
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   389
by (etac eqpoll_imp_lepoll 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   390
qed "Ord_nat_eqpoll_iff";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   391
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   392
goalw Cardinal.thy [Card_def,cardinal_def] "Card(nat)";
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   393
by (rtac (Least_equality RS ssubst) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   394
by (REPEAT_FIRST (ares_tac [eqpoll_refl, Ord_nat, refl]));
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   395
by (etac ltE 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   396
by (asm_simp_tac (ZF_ss addsimps [eqpoll_iff, lt_not_lepoll, ltI]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   397
qed "Card_nat";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   398
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   399
(*Allows showing that |i| is a limit cardinal*)
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   400
goal Cardinal.thy  "!!i. nat le i ==> nat le |i|";
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   401
by (rtac (Card_nat RS Card_cardinal_eq RS subst) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   402
by (etac cardinal_mono 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   403
qed "nat_le_cardinal";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   404
571
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   405
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   406
(*** Towards Cardinal Arithmetic ***)
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   407
(** Congruence laws for successor, cardinal addition and multiplication **)
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   408
792
5d2a7634da46 case_ss: now built upon ZF/Order/bij_inverse_ss. Deleted
lcp
parents: 782
diff changeset
   409
val case_ss = 
5d2a7634da46 case_ss: now built upon ZF/Order/bij_inverse_ss. Deleted
lcp
parents: 782
diff changeset
   410
    bij_inverse_ss addsimps [Inl_iff, Inl_Inr_iff, Inr_iff, Inr_Inl_iff,
5d2a7634da46 case_ss: now built upon ZF/Order/bij_inverse_ss. Deleted
lcp
parents: 782
diff changeset
   411
			     case_Inl, case_Inr, InlI, InrI];
571
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   412
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   413
(*Congruence law for  cons  under equipollence*)
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   414
goalw Cardinal.thy [lepoll_def]
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   415
    "!!A B. [| A lepoll B;  b ~: B |] ==> cons(a,A) lepoll cons(b,B)";
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   416
by (safe_tac ZF_cs);
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   417
by (res_inst_tac [("x", "lam y: cons(a,A).if(y=a, b, f`y)")] exI 1);
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   418
by (res_inst_tac [("d","%z.if(z:B, converse(f)`z, a)")] 
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   419
    lam_injective 1);
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   420
by (asm_simp_tac (ZF_ss addsimps [inj_is_fun RS apply_type, cons_iff]
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   421
                        setloop etac consE') 1);
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   422
by (asm_simp_tac (ZF_ss addsimps [inj_is_fun RS apply_type, left_inverse]
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   423
                        setloop etac consE') 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   424
qed "cons_lepoll_cong";
571
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   425
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   426
goal Cardinal.thy
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   427
    "!!A B. [| A eqpoll B;  a ~: A;  b ~: B |] ==> cons(a,A) eqpoll cons(b,B)";
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   428
by (asm_full_simp_tac (ZF_ss addsimps [eqpoll_iff, cons_lepoll_cong]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   429
qed "cons_eqpoll_cong";
571
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   430
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   431
(*Congruence law for  succ  under equipollence*)
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   432
goalw Cardinal.thy [succ_def]
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   433
    "!!A B. A eqpoll B ==> succ(A) eqpoll succ(B)";
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   434
by (REPEAT (ares_tac [cons_eqpoll_cong, mem_not_refl] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   435
qed "succ_eqpoll_cong";
571
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   436
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   437
(*Congruence law for + under equipollence*)
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   438
goalw Cardinal.thy [eqpoll_def]
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   439
    "!!A B C D. [| A eqpoll C;  B eqpoll D |] ==> A+B eqpoll C+D";
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   440
by (safe_tac ZF_cs);
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   441
by (rtac exI 1);
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   442
by (res_inst_tac [("c", "case(%x. Inl(f`x), %y. Inr(fa`y))"),
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   443
	 ("d", "case(%x. Inl(converse(f)`x), %y. Inr(converse(fa)`y))")] 
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   444
    lam_bijective 1);
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   445
by (safe_tac (ZF_cs addSEs [sumE]));
792
5d2a7634da46 case_ss: now built upon ZF/Order/bij_inverse_ss. Deleted
lcp
parents: 782
diff changeset
   446
by (ALLGOALS (asm_simp_tac case_ss));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   447
qed "sum_eqpoll_cong";
571
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   448
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   449
(*Congruence law for * under equipollence*)
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   450
goalw Cardinal.thy [eqpoll_def]
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   451
    "!!A B C D. [| A eqpoll C;  B eqpoll D |] ==> A*B eqpoll C*D";
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   452
by (safe_tac ZF_cs);
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   453
by (rtac exI 1);
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   454
by (res_inst_tac [("c", "split(%x y. <f`x, fa`y>)"),
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   455
		  ("d", "split(%x y. <converse(f)`x, converse(fa)`y>)")] 
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   456
    lam_bijective 1);
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   457
by (safe_tac ZF_cs);
792
5d2a7634da46 case_ss: now built upon ZF/Order/bij_inverse_ss. Deleted
lcp
parents: 782
diff changeset
   458
by (ALLGOALS (asm_simp_tac case_ss));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   459
qed "prod_eqpoll_cong";
571
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   460
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   461
goalw Cardinal.thy [eqpoll_def]
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   462
    "!!f. [| f: inj(A,B);  A Int B = 0 |] ==> A Un (B - range(f)) eqpoll B";
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   463
by (rtac exI 1);
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   464
by (res_inst_tac [("c", "%x. if(x:A, f`x, x)"),
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   465
		  ("d", "%y. if(y: range(f), converse(f)`y, y)")] 
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   466
    lam_bijective 1);
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   467
by (fast_tac (ZF_cs addSIs [if_type, apply_type] addIs [inj_is_fun]) 1);
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   468
by (asm_simp_tac 
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   469
    (ZF_ss addsimps [inj_converse_fun RS apply_funtype]
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   470
           setloop split_tac [expand_if]) 1);
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   471
by (asm_simp_tac (ZF_ss addsimps [inj_is_fun RS apply_rangeI, left_inverse]
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   472
                        setloop etac UnE') 1);
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   473
by (asm_simp_tac 
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   474
    (ZF_ss addsimps [inj_converse_fun RS apply_funtype, right_inverse]
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   475
           setloop split_tac [expand_if]) 1);
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 522
diff changeset
   476
by (fast_tac (ZF_cs addEs [equals0D]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   477
qed "inj_disjoint_eqpoll";