src/ZF/CardinalArith.ML
author lcp
Fri, 16 Dec 1994 17:41:49 +0100
changeset 800 23f55b829ccb
parent 782 200a16083201
child 823 33dc37d46296
permissions -rw-r--r--
Limit_csucc: moved to InfDatatype and proved explicitly in theory InfDatatype.thy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
     1
(*  Title: 	ZF/CardinalArith.ML
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
     2
    ID:         $Id$
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
     3
    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
     4
    Copyright   1994  University of Cambridge
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
     5
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
     6
Cardinal arithmetic -- WITHOUT the Axiom of Choice
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
     7
*)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
     8
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
     9
open CardinalArith;
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    10
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
    11
(*** Elementary properties ***)
467
92868dab2939 new cardinal arithmetic developments
lcp
parents: 437
diff changeset
    12
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    13
(*Use AC to discharge first premise*)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    14
goal CardinalArith.thy
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    15
    "!!A B. [| well_ord(B,r);  A lepoll B |] ==> |A| le |B|";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    16
by (res_inst_tac [("i","|A|"),("j","|B|")] Ord_linear_le 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    17
by (REPEAT_FIRST (ares_tac [Ord_cardinal, le_eqI]));
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    18
by (rtac (eqpollI RS cardinal_cong) 1 THEN assume_tac 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    19
by (rtac lepoll_trans 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    20
by (rtac (well_ord_cardinal_eqpoll RS eqpoll_sym RS eqpoll_imp_lepoll) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    21
by (assume_tac 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    22
by (etac (le_imp_subset RS subset_imp_lepoll RS lepoll_trans) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    23
by (rtac eqpoll_imp_lepoll 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    24
by (rewtac lepoll_def);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    25
by (etac exE 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    26
by (rtac well_ord_cardinal_eqpoll 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    27
by (etac well_ord_rvimage 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    28
by (assume_tac 1);
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
    29
qed "well_ord_lepoll_imp_Card_le";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    30
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
    31
(*Each element of Fin(A) is equivalent to a natural number*)
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
    32
goal CardinalArith.thy
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
    33
    "!!X A. X: Fin(A) ==> EX n:nat. X eqpoll n";
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
    34
by (eresolve_tac [Fin_induct] 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
    35
by (fast_tac (ZF_cs addIs [eqpoll_refl, nat_0I]) 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
    36
by (fast_tac (ZF_cs addSIs [cons_eqpoll_cong, 
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
    37
			    rewrite_rule [succ_def] nat_succI] 
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
    38
                            addSEs [mem_irrefl]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
    39
qed "Fin_eqpoll";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
    40
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    41
(*** Cardinal addition ***)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    42
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    43
(** Cardinal addition is commutative **)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    44
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    45
goalw CardinalArith.thy [eqpoll_def] "A+B eqpoll B+A";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    46
by (rtac exI 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    47
by (res_inst_tac [("c", "case(Inr, Inl)"), ("d", "case(Inr, Inl)")] 
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    48
    lam_bijective 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    49
by (safe_tac (ZF_cs addSEs [sumE]));
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    50
by (ALLGOALS (asm_simp_tac case_ss));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
    51
qed "sum_commute_eqpoll";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    52
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    53
goalw CardinalArith.thy [cadd_def] "i |+| j = j |+| i";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    54
by (rtac (sum_commute_eqpoll RS cardinal_cong) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
    55
qed "cadd_commute";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    56
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    57
(** Cardinal addition is associative **)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    58
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    59
goalw CardinalArith.thy [eqpoll_def] "(A+B)+C eqpoll A+(B+C)";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    60
by (rtac exI 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    61
by (res_inst_tac [("c", "case(case(Inl, %y.Inr(Inl(y))), %y. Inr(Inr(y)))"),
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    62
		  ("d", "case(%x.Inl(Inl(x)), case(%x.Inl(Inr(x)), Inr))")] 
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    63
    lam_bijective 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    64
by (ALLGOALS (asm_simp_tac (case_ss setloop etac sumE)));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
    65
qed "sum_assoc_eqpoll";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    66
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    67
(*Unconditional version requires AC*)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    68
goalw CardinalArith.thy [cadd_def]
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
    69
    "!!i j k. [| well_ord(i,ri); well_ord(j,rj); well_ord(k,rk) |] ==>	\
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    70
\             (i |+| j) |+| k = i |+| (j |+| k)";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    71
by (rtac cardinal_cong 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    72
br ([well_ord_cardinal_eqpoll, eqpoll_refl] MRS sum_eqpoll_cong RS
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    73
    eqpoll_trans) 1;
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    74
by (rtac (sum_assoc_eqpoll RS eqpoll_trans) 2);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    75
br ([eqpoll_refl, well_ord_cardinal_eqpoll] MRS sum_eqpoll_cong RS
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    76
    eqpoll_sym) 2;
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
    77
by (REPEAT (ares_tac [well_ord_radd] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
    78
qed "well_ord_cadd_assoc";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    79
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    80
(** 0 is the identity for addition **)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    81
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    82
goalw CardinalArith.thy [eqpoll_def] "0+A eqpoll A";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    83
by (rtac exI 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    84
by (res_inst_tac [("c", "case(%x.x, %y.y)"), ("d", "Inr")] 
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    85
    lam_bijective 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    86
by (ALLGOALS (asm_simp_tac (case_ss setloop eresolve_tac [sumE,emptyE])));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
    87
qed "sum_0_eqpoll";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    88
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
    89
goalw CardinalArith.thy [cadd_def] "!!K. Card(K) ==> 0 |+| K = K";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    90
by (asm_simp_tac (ZF_ss addsimps [sum_0_eqpoll RS cardinal_cong, 
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    91
				  Card_cardinal_eq]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
    92
qed "cadd_0";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
    93
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
    94
(** Addition by another cardinal **)
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
    95
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
    96
goalw CardinalArith.thy [lepoll_def, inj_def] "A lepoll A+B";
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
    97
by (res_inst_tac [("x", "lam x:A. Inl(x)")] exI 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
    98
by (asm_simp_tac (sum_ss addsimps [lam_type]) 1);
782
200a16083201 added bind_thm for theorems defined by "standard ..."
clasohm
parents: 767
diff changeset
    99
qed "sum_lepoll_self";
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   100
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   101
(*Could probably weaken the premises to well_ord(K,r), or removing using AC*)
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   102
goalw CardinalArith.thy [cadd_def]
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   103
    "!!K. [| Card(K);  Ord(L) |] ==> K le (K |+| L)";
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   104
by (rtac ([Card_cardinal_le, well_ord_lepoll_imp_Card_le] MRS le_trans) 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   105
by (rtac sum_lepoll_self 3);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   106
by (REPEAT (ares_tac [well_ord_radd, well_ord_Memrel, Card_is_Ord] 1));
782
200a16083201 added bind_thm for theorems defined by "standard ..."
clasohm
parents: 767
diff changeset
   107
qed "cadd_le_self";
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   108
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   109
(** Monotonicity of addition **)
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   110
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   111
goalw CardinalArith.thy [lepoll_def]
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   112
     "!!A B C D. [| A lepoll C;  B lepoll D |] ==> A + B  lepoll  C + D";
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   113
by (REPEAT (etac exE 1));
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   114
by (res_inst_tac [("x", "lam z:A+B. case(%w. Inl(f`w), %y. Inr(fa`y), z)")] 
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   115
    exI 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   116
by (res_inst_tac 
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   117
      [("d", "case(%w. Inl(converse(f)`w), %y. Inr(converse(fa)`y))")] 
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   118
      lam_injective 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   119
by (typechk_tac ([inj_is_fun,case_type, InlI, InrI] @ ZF_typechecks));
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   120
by (eresolve_tac [sumE] 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   121
by (ALLGOALS (asm_simp_tac (sum_ss addsimps [left_inverse])));
782
200a16083201 added bind_thm for theorems defined by "standard ..."
clasohm
parents: 767
diff changeset
   122
qed "sum_lepoll_mono";
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   123
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   124
goalw CardinalArith.thy [cadd_def]
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   125
    "!!K. [| K' le K;  L' le L |] ==> (K' |+| L') le (K |+| L)";
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   126
by (safe_tac (ZF_cs addSDs [le_subset_iff RS iffD1]));
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   127
by (resolve_tac [well_ord_lepoll_imp_Card_le] 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   128
by (REPEAT (ares_tac [sum_lepoll_mono, subset_imp_lepoll] 2));
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   129
by (REPEAT (ares_tac [well_ord_radd, well_ord_Memrel] 1));
782
200a16083201 added bind_thm for theorems defined by "standard ..."
clasohm
parents: 767
diff changeset
   130
qed "cadd_le_mono";
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   131
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   132
(** Addition of finite cardinals is "ordinary" addition **)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   133
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   134
goalw CardinalArith.thy [eqpoll_def] "succ(A)+B eqpoll succ(A+B)";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   135
by (rtac exI 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   136
by (res_inst_tac [("c", "%z.if(z=Inl(A),A+B,z)"), 
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   137
		  ("d", "%z.if(z=A+B,Inl(A),z)")] 
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   138
    lam_bijective 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   139
by (ALLGOALS
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   140
    (asm_simp_tac (case_ss addsimps [succI2, mem_imp_not_eq]
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   141
		           setloop eresolve_tac [sumE,succE])));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   142
qed "sum_succ_eqpoll";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   143
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   144
(*Pulling the  succ(...)  outside the |...| requires m, n: nat  *)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   145
(*Unconditional version requires AC*)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   146
goalw CardinalArith.thy [cadd_def]
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   147
    "!!m n. [| Ord(m);  Ord(n) |] ==> succ(m) |+| n = |succ(m |+| n)|";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   148
by (rtac (sum_succ_eqpoll RS cardinal_cong RS trans) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   149
by (rtac (succ_eqpoll_cong RS cardinal_cong) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   150
by (rtac (well_ord_cardinal_eqpoll RS eqpoll_sym) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   151
by (REPEAT (ares_tac [well_ord_radd, well_ord_Memrel] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   152
qed "cadd_succ_lemma";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   153
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   154
val [mnat,nnat] = goal CardinalArith.thy
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   155
    "[| m: nat;  n: nat |] ==> m |+| n = m#+n";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   156
by (cut_facts_tac [nnat] 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   157
by (nat_ind_tac "m" [mnat] 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   158
by (asm_simp_tac (arith_ss addsimps [nat_into_Card RS cadd_0]) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   159
by (asm_simp_tac (arith_ss addsimps [nat_into_Ord, cadd_succ_lemma,
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   160
				     nat_into_Card RS Card_cardinal_eq]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   161
qed "nat_cadd_eq_add";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   162
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   163
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   164
(*** Cardinal multiplication ***)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   165
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   166
(** Cardinal multiplication is commutative **)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   167
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   168
(*Easier to prove the two directions separately*)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   169
goalw CardinalArith.thy [eqpoll_def] "A*B eqpoll B*A";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   170
by (rtac exI 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   171
by (res_inst_tac [("c", "split(%x y.<y,x>)"), ("d", "split(%x y.<y,x>)")] 
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   172
    lam_bijective 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   173
by (safe_tac ZF_cs);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   174
by (ALLGOALS (asm_simp_tac ZF_ss));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   175
qed "prod_commute_eqpoll";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   176
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   177
goalw CardinalArith.thy [cmult_def] "i |*| j = j |*| i";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   178
by (rtac (prod_commute_eqpoll RS cardinal_cong) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   179
qed "cmult_commute";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   180
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   181
(** Cardinal multiplication is associative **)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   182
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   183
goalw CardinalArith.thy [eqpoll_def] "(A*B)*C eqpoll A*(B*C)";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   184
by (rtac exI 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   185
by (res_inst_tac [("c", "split(%w z. split(%x y. <x,<y,z>>, w))"),
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   186
		  ("d", "split(%x.   split(%y z. <<x,y>, z>))")] 
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   187
    lam_bijective 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   188
by (safe_tac ZF_cs);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   189
by (ALLGOALS (asm_simp_tac ZF_ss));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   190
qed "prod_assoc_eqpoll";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   191
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   192
(*Unconditional version requires AC*)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   193
goalw CardinalArith.thy [cmult_def]
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   194
    "!!i j k. [| well_ord(i,ri); well_ord(j,rj); well_ord(k,rk) |] ==>	\
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   195
\             (i |*| j) |*| k = i |*| (j |*| k)";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   196
by (rtac cardinal_cong 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   197
br ([well_ord_cardinal_eqpoll, eqpoll_refl] MRS prod_eqpoll_cong RS
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   198
    eqpoll_trans) 1;
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   199
by (rtac (prod_assoc_eqpoll RS eqpoll_trans) 2);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   200
br ([eqpoll_refl, well_ord_cardinal_eqpoll] MRS prod_eqpoll_cong RS
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   201
    eqpoll_sym) 2;
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   202
by (REPEAT (ares_tac [well_ord_rmult] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   203
qed "well_ord_cmult_assoc";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   204
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   205
(** Cardinal multiplication distributes over addition **)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   206
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   207
goalw CardinalArith.thy [eqpoll_def] "(A+B)*C eqpoll (A*C)+(B*C)";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   208
by (rtac exI 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   209
by (res_inst_tac
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   210
    [("c", "split(%x z. case(%y.Inl(<y,z>), %y.Inr(<y,z>), x))"),
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   211
     ("d", "case(split(%x y.<Inl(x),y>), split(%x y.<Inr(x),y>))")] 
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   212
    lam_bijective 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   213
by (safe_tac (ZF_cs addSEs [sumE]));
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   214
by (ALLGOALS (asm_simp_tac case_ss));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   215
qed "sum_prod_distrib_eqpoll";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   216
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   217
(** Multiplication by 0 yields 0 **)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   218
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   219
goalw CardinalArith.thy [eqpoll_def] "0*A eqpoll 0";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   220
by (rtac exI 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   221
by (rtac lam_bijective 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   222
by (safe_tac ZF_cs);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   223
qed "prod_0_eqpoll";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   224
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   225
goalw CardinalArith.thy [cmult_def] "0 |*| i = 0";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   226
by (asm_simp_tac (ZF_ss addsimps [prod_0_eqpoll RS cardinal_cong, 
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   227
				  Card_0 RS Card_cardinal_eq]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   228
qed "cmult_0";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   229
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   230
(** 1 is the identity for multiplication **)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   231
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   232
goalw CardinalArith.thy [eqpoll_def] "{x}*A eqpoll A";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   233
by (rtac exI 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   234
by (res_inst_tac [("c", "snd"), ("d", "%z.<x,z>")] lam_bijective 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   235
by (safe_tac ZF_cs);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   236
by (ALLGOALS (asm_simp_tac ZF_ss));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   237
qed "prod_singleton_eqpoll";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   238
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   239
goalw CardinalArith.thy [cmult_def, succ_def] "!!K. Card(K) ==> 1 |*| K = K";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   240
by (asm_simp_tac (ZF_ss addsimps [prod_singleton_eqpoll RS cardinal_cong, 
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   241
				  Card_cardinal_eq]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   242
qed "cmult_1";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   243
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   244
(*** Some inequalities for multiplication ***)
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   245
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   246
goalw CardinalArith.thy [lepoll_def, inj_def] "A lepoll A*A";
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   247
by (res_inst_tac [("x", "lam x:A. <x,x>")] exI 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   248
by (simp_tac (ZF_ss addsimps [lam_type]) 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   249
qed "prod_square_lepoll";
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   250
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   251
(*Could probably weaken the premise to well_ord(K,r), or removing using AC*)
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   252
goalw CardinalArith.thy [cmult_def] "!!K. Card(K) ==> K le K |*| K";
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   253
by (rtac le_trans 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   254
by (rtac well_ord_lepoll_imp_Card_le 2);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   255
by (rtac prod_square_lepoll 3);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   256
by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel, Card_is_Ord] 2));
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   257
by (asm_simp_tac (ZF_ss addsimps [le_refl, Card_is_Ord, Card_cardinal_eq]) 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   258
qed "cmult_square_le";
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   259
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   260
(** Multiplication by a non-zero cardinal **)
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   261
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   262
goalw CardinalArith.thy [lepoll_def, inj_def] "!!b. b: B ==> A lepoll A*B";
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   263
by (res_inst_tac [("x", "lam x:A. <x,b>")] exI 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   264
by (asm_simp_tac (ZF_ss addsimps [lam_type]) 1);
782
200a16083201 added bind_thm for theorems defined by "standard ..."
clasohm
parents: 767
diff changeset
   265
qed "prod_lepoll_self";
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   266
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   267
(*Could probably weaken the premises to well_ord(K,r), or removing using AC*)
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   268
goalw CardinalArith.thy [cmult_def]
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   269
    "!!K. [| Card(K);  Ord(L);  0<L |] ==> K le (K |*| L)";
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   270
by (rtac ([Card_cardinal_le, well_ord_lepoll_imp_Card_le] MRS le_trans) 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   271
by (rtac prod_lepoll_self 3);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   272
by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel, Card_is_Ord, ltD] 1));
782
200a16083201 added bind_thm for theorems defined by "standard ..."
clasohm
parents: 767
diff changeset
   273
qed "cmult_le_self";
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   274
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   275
(** Monotonicity of multiplication **)
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   276
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   277
(*Equivalent to KG's lepoll_SigmaI*)
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   278
goalw CardinalArith.thy [lepoll_def]
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   279
     "!!A B C D. [| A lepoll C;  B lepoll D |] ==> A * B  lepoll  C * D";
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   280
by (REPEAT (etac exE 1));
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   281
by (res_inst_tac [("x", "lam z:A*B. split(%w y.<f`w, fa`y>, z)")] exI 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   282
by (res_inst_tac [("d", "split(%w y.<converse(f)`w, converse(fa)`y>)")] 
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   283
		  lam_injective 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   284
by (typechk_tac (inj_is_fun::ZF_typechecks));
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   285
by (eresolve_tac [SigmaE] 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   286
by (asm_simp_tac (ZF_ss addsimps [left_inverse]) 1);
782
200a16083201 added bind_thm for theorems defined by "standard ..."
clasohm
parents: 767
diff changeset
   287
qed "prod_lepoll_mono";
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   288
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   289
goalw CardinalArith.thy [cmult_def]
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   290
    "!!K. [| K' le K;  L' le L |] ==> (K' |*| L') le (K |*| L)";
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   291
by (safe_tac (ZF_cs addSDs [le_subset_iff RS iffD1]));
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   292
by (resolve_tac [well_ord_lepoll_imp_Card_le] 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   293
by (REPEAT (ares_tac [prod_lepoll_mono, subset_imp_lepoll] 2));
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   294
by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel] 1));
782
200a16083201 added bind_thm for theorems defined by "standard ..."
clasohm
parents: 767
diff changeset
   295
qed "cmult_le_mono";
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   296
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   297
(*** Multiplication of finite cardinals is "ordinary" multiplication ***)
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   298
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   299
goalw CardinalArith.thy [eqpoll_def] "succ(A)*B eqpoll B + A*B";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   300
by (rtac exI 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   301
by (res_inst_tac [("c", "split(%x y. if(x=A, Inl(y), Inr(<x,y>)))"), 
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   302
		  ("d", "case(%y. <A,y>, %z.z)")] 
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   303
    lam_bijective 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   304
by (safe_tac (ZF_cs addSEs [sumE]));
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   305
by (ALLGOALS
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   306
    (asm_simp_tac (case_ss addsimps [succI2, if_type, mem_imp_not_eq])));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   307
qed "prod_succ_eqpoll";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   308
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   309
(*Unconditional version requires AC*)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   310
goalw CardinalArith.thy [cmult_def, cadd_def]
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   311
    "!!m n. [| Ord(m);  Ord(n) |] ==> succ(m) |*| n = n |+| (m |*| n)";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   312
by (rtac (prod_succ_eqpoll RS cardinal_cong RS trans) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   313
by (rtac (cardinal_cong RS sym) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   314
by (rtac ([eqpoll_refl, well_ord_cardinal_eqpoll] MRS sum_eqpoll_cong) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   315
by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   316
qed "cmult_succ_lemma";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   317
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   318
val [mnat,nnat] = goal CardinalArith.thy
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   319
    "[| m: nat;  n: nat |] ==> m |*| n = m#*n";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   320
by (cut_facts_tac [nnat] 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   321
by (nat_ind_tac "m" [mnat] 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   322
by (asm_simp_tac (arith_ss addsimps [cmult_0]) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   323
by (asm_simp_tac (arith_ss addsimps [nat_into_Ord, cmult_succ_lemma,
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   324
				     nat_cadd_eq_add]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   325
qed "nat_cmult_eq_mult";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   326
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   327
(*Needs Krzysztof Grabczewski's macro "2" == "succ(1)"*)
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   328
goal CardinalArith.thy "!!m n. Card(n) ==> succ(1) |*| n = n |+| n";
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   329
by (asm_simp_tac 
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   330
    (ZF_ss addsimps [Ord_0, Ord_succ, cmult_0, cmult_succ_lemma, Card_is_Ord,
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   331
		     read_instantiate [("j","0")] cadd_commute, cadd_0]) 1);
782
200a16083201 added bind_thm for theorems defined by "standard ..."
clasohm
parents: 767
diff changeset
   332
qed "cmult_2";
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   333
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   334
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   335
(*** Infinite Cardinals are Limit Ordinals ***)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   336
571
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   337
(*This proof is modelled upon one assuming nat<=A, with injection
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   338
  lam z:cons(u,A). if(z=u, 0, if(z : nat, succ(z), z))  and inverse
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   339
  %y. if(y:nat, nat_case(u,%z.z,y), y).  If f: inj(nat,A) then
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   340
  range(f) behaves like the natural numbers.*)
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
   341
goalw CardinalArith.thy [lepoll_def]
571
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   342
    "!!i. nat lepoll A ==> cons(u,A) lepoll A";
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   343
by (etac exE 1);
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
   344
by (res_inst_tac [("x",
571
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   345
    "lam z:cons(u,A). if(z=u, f`0, 	\
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   346
\                        if(z: range(f), f`succ(converse(f)`z), z))")] exI 1);
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   347
by (res_inst_tac [("d", "%y. if(y: range(f), 	\
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   348
\                               nat_case(u, %z.f`z, converse(f)`y), y)")] 
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
   349
    lam_injective 1);
571
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   350
by (fast_tac (ZF_cs addSIs [if_type, nat_0I, nat_succI, apply_type]
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   351
                    addIs  [inj_is_fun, inj_converse_fun]) 1);
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
   352
by (asm_simp_tac 
571
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   353
    (ZF_ss addsimps [inj_is_fun RS apply_rangeI,
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   354
		     inj_converse_fun RS apply_rangeI,
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   355
		     inj_converse_fun RS apply_funtype,
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   356
		     left_inverse, right_inverse, nat_0I, nat_succI, 
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   357
		     nat_case_0, nat_case_succ]
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
   358
           setloop split_tac [expand_if]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   359
qed "nat_cons_lepoll";
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
   360
571
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   361
goal CardinalArith.thy "!!i. nat lepoll A ==> cons(u,A) eqpoll A";
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   362
by (etac (nat_cons_lepoll RS eqpollI) 1);
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   363
by (rtac (subset_consI RS subset_imp_lepoll) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   364
qed "nat_cons_eqpoll";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   365
571
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   366
(*Specialized version required below*)
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   367
goalw CardinalArith.thy [succ_def] "!!i. nat <= A ==> succ(A) eqpoll A";
0b03ce5b62f7 ZF/Cardinal: some results moved here from CardinalArith
lcp
parents: 523
diff changeset
   368
by (eresolve_tac [subset_imp_lepoll RS nat_cons_eqpoll] 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   369
qed "nat_succ_eqpoll";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   370
488
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents: 484
diff changeset
   371
goalw CardinalArith.thy [InfCard_def] "InfCard(nat)";
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents: 484
diff changeset
   372
by (fast_tac (ZF_cs addIs [Card_nat, le_refl, Card_is_Ord]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   373
qed "InfCard_nat";
488
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents: 484
diff changeset
   374
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   375
goalw CardinalArith.thy [InfCard_def] "!!K. InfCard(K) ==> Card(K)";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   376
by (etac conjunct1 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   377
qed "InfCard_is_Card";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   378
523
972119df615e ZF/CardinalArith/InfCard_Un: new
lcp
parents: 517
diff changeset
   379
goalw CardinalArith.thy [InfCard_def]
972119df615e ZF/CardinalArith/InfCard_Un: new
lcp
parents: 517
diff changeset
   380
    "!!K L. [| InfCard(K);  Card(L) |] ==> InfCard(K Un L)";
972119df615e ZF/CardinalArith/InfCard_Un: new
lcp
parents: 517
diff changeset
   381
by (asm_simp_tac (ZF_ss addsimps [Card_Un, Un_upper1_le RSN (2,le_trans), 
972119df615e ZF/CardinalArith/InfCard_Un: new
lcp
parents: 517
diff changeset
   382
				  Card_is_Ord]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   383
qed "InfCard_Un";
523
972119df615e ZF/CardinalArith/InfCard_Un: new
lcp
parents: 517
diff changeset
   384
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   385
(*Kunen's Lemma 10.11*)
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   386
goalw CardinalArith.thy [InfCard_def] "!!K. InfCard(K) ==> Limit(K)";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   387
by (etac conjE 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   388
by (rtac (ltI RS non_succ_LimitI) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   389
by (etac ([asm_rl, nat_0I] MRS (le_imp_subset RS subsetD)) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   390
by (etac Card_is_Ord 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   391
by (safe_tac (ZF_cs addSDs [Limit_nat RS Limit_le_succD]));
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   392
by (forward_tac [Card_is_Ord RS Ord_succD] 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   393
by (rewtac Card_def);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   394
by (res_inst_tac [("i", "succ(y)")] lt_irrefl 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   395
by (dtac (le_imp_subset RS nat_succ_eqpoll RS cardinal_cong) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   396
(*Tricky combination of substitutions; backtracking needed*)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   397
by (etac ssubst 1 THEN etac ssubst 1 THEN rtac Ord_cardinal_le 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   398
by (assume_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   399
qed "InfCard_is_Limit";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   400
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   401
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   402
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   403
(*** An infinite cardinal equals its square (Kunen, Thm 10.12, page 29) ***)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   404
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   405
(*A general fact about ordermap*)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   406
goalw Cardinal.thy [eqpoll_def]
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   407
    "!!A. [| well_ord(A,r);  x:A |] ==> ordermap(A,r)`x eqpoll pred(A,x,r)";
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   408
by (rtac exI 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   409
by (asm_simp_tac (ZF_ss addsimps [ordermap_eq_image, well_ord_is_wf]) 1);
467
92868dab2939 new cardinal arithmetic developments
lcp
parents: 437
diff changeset
   410
by (etac (ordermap_bij RS bij_is_inj RS restrict_bij RS bij_converse_bij) 1);
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   411
by (rtac pred_subset 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   412
qed "ordermap_eqpoll_pred";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   413
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   414
(** Establishing the well-ordering **)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   415
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   416
goalw CardinalArith.thy [inj_def]
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   417
 "!!K. Ord(K) ==>	\
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   418
\ (lam z:K*K. split(%x y. <x Un y, <x, y>>, z)) : inj(K*K, K*K*K)";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   419
by (safe_tac ZF_cs);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   420
by (fast_tac (ZF_cs addIs [lam_type, Un_least_lt RS ltD, ltI]
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   421
                    addSEs [split_type]) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   422
by (asm_full_simp_tac ZF_ss 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   423
qed "csquare_lam_inj";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   424
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   425
goalw CardinalArith.thy [csquare_rel_def]
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   426
 "!!K. Ord(K) ==> well_ord(K*K, csquare_rel(K))";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   427
by (rtac (csquare_lam_inj RS well_ord_rvimage) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   428
by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   429
qed "well_ord_csquare";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   430
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   431
(** Characterising initial segments of the well-ordering **)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   432
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   433
goalw CardinalArith.thy [csquare_rel_def]
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   434
 "!!K. [| x<K;  y<K;  z<K |] ==> \
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   435
\      <<x,y>, <z,z>> : csquare_rel(K) --> x le z & y le z";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   436
by (REPEAT (etac ltE 1));
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   437
by (asm_simp_tac (ZF_ss addsimps [rvimage_iff, rmult_iff, Memrel_iff,
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   438
                                  Un_absorb, Un_least_mem_iff, ltD]) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   439
by (safe_tac (ZF_cs addSEs [mem_irrefl] 
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   440
                    addSIs [Un_upper1_le, Un_upper2_le]));
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   441
by (ALLGOALS (asm_simp_tac (ZF_ss addsimps [lt_def, succI2, Ord_succ])));
800
23f55b829ccb Limit_csucc: moved to InfDatatype and proved explicitly in
lcp
parents: 782
diff changeset
   442
val csquareD_lemma = result();
23f55b829ccb Limit_csucc: moved to InfDatatype and proved explicitly in
lcp
parents: 782
diff changeset
   443
23f55b829ccb Limit_csucc: moved to InfDatatype and proved explicitly in
lcp
parents: 782
diff changeset
   444
bind_thm ("csquareD", csquareD_lemma RS mp);
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   445
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   446
goalw CardinalArith.thy [pred_def]
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   447
 "!!K. z<K ==> pred(K*K, <z,z>, csquare_rel(K)) <= succ(z)*succ(z)";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   448
by (safe_tac (lemmas_cs addSEs [SigmaE]));	(*avoids using succCI*)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   449
by (rtac (csquareD RS conjE) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   450
by (rewtac lt_def);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   451
by (assume_tac 4);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   452
by (ALLGOALS (fast_tac ZF_cs));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   453
qed "pred_csquare_subset";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   454
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   455
goalw CardinalArith.thy [csquare_rel_def]
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   456
 "!!K. [| x<z;  y<z;  z<K |] ==> \
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   457
\      <<x,y>, <z,z>> : csquare_rel(K)";
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   458
by (subgoals_tac ["x<K", "y<K"] 1);
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   459
by (REPEAT (eresolve_tac [asm_rl, lt_trans] 2));
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   460
by (REPEAT (etac ltE 1));
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   461
by (asm_simp_tac (ZF_ss addsimps [rvimage_iff, rmult_iff, Memrel_iff,
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   462
                                  Un_absorb, Un_least_mem_iff, ltD]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   463
qed "csquare_ltI";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   464
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   465
(*Part of the traditional proof.  UNUSED since it's harder to prove & apply *)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   466
goalw CardinalArith.thy [csquare_rel_def]
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   467
 "!!K. [| x le z;  y le z;  z<K |] ==> \
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   468
\      <<x,y>, <z,z>> : csquare_rel(K) | x=z & y=z";
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   469
by (subgoals_tac ["x<K", "y<K"] 1);
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   470
by (REPEAT (eresolve_tac [asm_rl, lt_trans1] 2));
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   471
by (REPEAT (etac ltE 1));
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   472
by (asm_simp_tac (ZF_ss addsimps [rvimage_iff, rmult_iff, Memrel_iff,
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   473
                                  Un_absorb, Un_least_mem_iff, ltD]) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   474
by (REPEAT_FIRST (etac succE));
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   475
by (ALLGOALS
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   476
    (asm_simp_tac (ZF_ss addsimps [subset_Un_iff RS iff_sym, 
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   477
				   subset_Un_iff2 RS iff_sym, OrdmemD])));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   478
qed "csquare_or_eqI";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   479
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   480
(** The cardinality of initial segments **)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   481
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   482
goal CardinalArith.thy
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   483
    "!!K. [| InfCard(K);  x<K;  y<K;  z=succ(x Un y) |] ==> \
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   484
\         ordermap(K*K, csquare_rel(K)) ` <x,y> lepoll 		\
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   485
\         ordermap(K*K, csquare_rel(K)) ` <z,z>";
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   486
by (subgoals_tac ["z<K", "well_ord(K*K, csquare_rel(K))"] 1);
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   487
by (etac (InfCard_is_Card RS Card_is_Ord RS well_ord_csquare) 2);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   488
by (fast_tac (ZF_cs addSIs [Un_least_lt, InfCard_is_Limit, Limit_has_succ]) 2);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   489
by (rtac (OrdmemD RS subset_imp_lepoll) 1);
467
92868dab2939 new cardinal arithmetic developments
lcp
parents: 437
diff changeset
   490
by (res_inst_tac [("z1","z")] (csquare_ltI RS ordermap_mono) 1);
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   491
by (etac well_ord_is_wf 4);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   492
by (ALLGOALS 
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   493
    (fast_tac (ZF_cs addSIs [Un_upper1_le, Un_upper2_le, Ord_ordermap] 
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   494
                     addSEs [ltE])));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   495
qed "ordermap_z_lepoll";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   496
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   497
(*Kunen: "each <x,y>: K*K has no more than z*z predecessors..." (page 29) *)
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   498
goalw CardinalArith.thy [cmult_def]
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   499
  "!!K. [| InfCard(K);  x<K;  y<K;  z=succ(x Un y) |] ==> \
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   500
\       | ordermap(K*K, csquare_rel(K)) ` <x,y> | le  |succ(z)| |*| |succ(z)|";
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   501
by (rtac (well_ord_rmult RS well_ord_lepoll_imp_Card_le) 1);
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   502
by (REPEAT (ares_tac [Ord_cardinal, well_ord_Memrel] 1));
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   503
by (subgoals_tac ["z<K"] 1);
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   504
by (fast_tac (ZF_cs addSIs [Un_least_lt, InfCard_is_Limit, 
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   505
                            Limit_has_succ]) 2);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   506
by (rtac (ordermap_z_lepoll RS lepoll_trans) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   507
by (REPEAT_SOME assume_tac);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   508
by (rtac (ordermap_eqpoll_pred RS eqpoll_imp_lepoll RS lepoll_trans) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   509
by (etac (InfCard_is_Card RS Card_is_Ord RS well_ord_csquare) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   510
by (fast_tac (ZF_cs addIs [ltD]) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   511
by (rtac (pred_csquare_subset RS subset_imp_lepoll RS lepoll_trans) 1 THEN
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   512
    assume_tac 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   513
by (REPEAT_FIRST (etac ltE));
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   514
by (rtac (prod_eqpoll_cong RS eqpoll_sym RS eqpoll_imp_lepoll) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   515
by (REPEAT_FIRST (etac (Ord_succ RS Ord_cardinal_eqpoll)));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   516
qed "ordermap_csquare_le";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   517
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   518
(*Kunen: "... so the order type <= K" *)
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   519
goal CardinalArith.thy
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   520
    "!!K. [| InfCard(K);  ALL y:K. InfCard(y) --> y |*| y = y |]  ==>  \
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   521
\         ordertype(K*K, csquare_rel(K)) le K";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   522
by (forward_tac [InfCard_is_Card RS Card_is_Ord] 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   523
by (rtac all_lt_imp_le 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   524
by (assume_tac 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   525
by (etac (well_ord_csquare RS Ord_ordertype) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   526
by (rtac Card_lt_imp_lt 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   527
by (etac InfCard_is_Card 3);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   528
by (etac ltE 2 THEN assume_tac 2);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   529
by (asm_full_simp_tac (ZF_ss addsimps [ordertype_unfold]) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   530
by (safe_tac (ZF_cs addSEs [ltE]));
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   531
by (subgoals_tac ["Ord(xb)", "Ord(y)"] 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   532
by (REPEAT (eresolve_tac [asm_rl, Ord_in_Ord] 2));
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   533
by (rtac (ordermap_csquare_le RS lt_trans1) 1  THEN
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   534
    REPEAT (ares_tac [refl] 1 ORELSE etac ltI 1));
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   535
by (res_inst_tac [("i","xb Un y"), ("j","nat")] Ord_linear2 1  THEN
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   536
    REPEAT (ares_tac [Ord_Un, Ord_nat] 1));
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   537
(*the finite case: xb Un y < nat *)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   538
by (res_inst_tac [("j", "nat")] lt_trans2 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   539
by (asm_full_simp_tac (FOL_ss addsimps [InfCard_def]) 2);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   540
by (asm_full_simp_tac
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   541
    (ZF_ss addsimps [lt_def, nat_cmult_eq_mult, nat_succI, mult_type,
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   542
		     nat_into_Card RS Card_cardinal_eq, Ord_nat]) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   543
(*case nat le (xb Un y), equivalently InfCard(xb Un y)  *)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   544
by (asm_full_simp_tac
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   545
    (ZF_ss addsimps [le_imp_subset RS nat_succ_eqpoll RS cardinal_cong,
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   546
		     le_succ_iff, InfCard_def, Card_cardinal, Un_least_lt, 
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   547
		     Ord_Un, ltI, nat_le_cardinal,
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   548
		     Ord_cardinal_le RS lt_trans1 RS ltD]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   549
qed "ordertype_csquare_le";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   550
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   551
(*This lemma can easily be generalized to premise well_ord(A*A,r) *)
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   552
goalw CardinalArith.thy [cmult_def]
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   553
    "!!K. Ord(K) ==> K |*| K  =  |ordertype(K*K, csquare_rel(K))|";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   554
by (rtac cardinal_cong 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   555
by (rewtac eqpoll_def);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   556
by (rtac exI 1);
467
92868dab2939 new cardinal arithmetic developments
lcp
parents: 437
diff changeset
   557
by (etac (well_ord_csquare RS ordermap_bij) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   558
qed "csquare_eq_ordertype";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   559
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   560
(*Main result: Kunen's Theorem 10.12*)
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   561
goal CardinalArith.thy "!!K. InfCard(K) ==> K |*| K = K";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   562
by (forward_tac [InfCard_is_Card RS Card_is_Ord] 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   563
by (etac rev_mp 1);
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   564
by (trans_ind_tac "K" [] 1);
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   565
by (rtac impI 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   566
by (rtac le_anti_sym 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   567
by (etac (InfCard_is_Card RS cmult_square_le) 2);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   568
by (rtac (ordertype_csquare_le RSN (2, le_trans)) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   569
by (assume_tac 2);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   570
by (assume_tac 2);
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   571
by (asm_simp_tac 
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   572
    (ZF_ss addsimps [csquare_eq_ordertype, Ord_cardinal_le,
435875e4b21d modifications for cardinal arithmetic
lcp
parents:
diff changeset
   573
                     well_ord_csquare RS Ord_ordertype]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   574
qed "InfCard_csquare_eq";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   575
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   576
(*Corollary for arbitrary well-ordered sets (all sets, assuming AC)*)
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   577
goal CardinalArith.thy
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   578
    "!!A. [| well_ord(A,r);  InfCard(|A|) |] ==> A*A eqpoll A";
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   579
by (resolve_tac [prod_eqpoll_cong RS eqpoll_trans] 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   580
by (REPEAT (etac (well_ord_cardinal_eqpoll RS eqpoll_sym) 1));
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   581
by (resolve_tac [well_ord_cardinal_eqE] 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   582
by (REPEAT (ares_tac [Ord_cardinal, well_ord_rmult, well_ord_Memrel] 1));
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   583
by (asm_simp_tac (ZF_ss addsimps [symmetric cmult_def, InfCard_csquare_eq]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   584
qed "well_ord_InfCard_square_eq";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   585
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   586
(** Toward's Kunen's Corollary 10.13 (1) **)
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   587
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   588
goal CardinalArith.thy "!!K. [| InfCard(K);  L le K;  0<L |] ==> K |*| L = K";
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   589
by (resolve_tac [le_anti_sym] 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   590
by (eresolve_tac [ltE] 2 THEN
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   591
    REPEAT (ares_tac [cmult_le_self, InfCard_is_Card] 2));
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   592
by (forward_tac [InfCard_is_Card RS Card_is_Ord RS le_refl] 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   593
by (resolve_tac [cmult_le_mono RS le_trans] 1 THEN REPEAT (assume_tac 1));
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   594
by (asm_simp_tac (ZF_ss addsimps [InfCard_csquare_eq]) 1);
782
200a16083201 added bind_thm for theorems defined by "standard ..."
clasohm
parents: 767
diff changeset
   595
qed "InfCard_le_cmult_eq";
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   596
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   597
(*Corollary 10.13 (1), for cardinal multiplication*)
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   598
goal CardinalArith.thy
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   599
    "!!K. [| InfCard(K);  InfCard(L) |] ==> K |*| L = K Un L";
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   600
by (res_inst_tac [("i","K"),("j","L")] Ord_linear_le 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   601
by (typechk_tac [InfCard_is_Card, Card_is_Ord]);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   602
by (resolve_tac [cmult_commute RS ssubst] 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   603
by (resolve_tac [Un_commute RS ssubst] 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   604
by (ALLGOALS
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   605
    (asm_simp_tac 
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   606
     (ZF_ss addsimps [InfCard_is_Limit RS Limit_has_0, InfCard_le_cmult_eq,
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   607
		      subset_Un_iff2 RS iffD1, le_imp_subset])));
782
200a16083201 added bind_thm for theorems defined by "standard ..."
clasohm
parents: 767
diff changeset
   608
qed "InfCard_cmult_eq";
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   609
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   610
(*This proof appear to be the simplest!*)
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   611
goal CardinalArith.thy "!!K. InfCard(K) ==> K |+| K = K";
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   612
by (asm_simp_tac
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   613
    (ZF_ss addsimps [cmult_2 RS sym, InfCard_is_Card, cmult_commute]) 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   614
by (resolve_tac [InfCard_le_cmult_eq] 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   615
by (typechk_tac [Ord_0, le_refl, leI]);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   616
by (typechk_tac [InfCard_is_Limit, Limit_has_0, Limit_has_succ]);
782
200a16083201 added bind_thm for theorems defined by "standard ..."
clasohm
parents: 767
diff changeset
   617
qed "InfCard_cdouble_eq";
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   618
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   619
(*Corollary 10.13 (1), for cardinal addition*)
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   620
goal CardinalArith.thy "!!K. [| InfCard(K);  L le K |] ==> K |+| L = K";
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   621
by (resolve_tac [le_anti_sym] 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   622
by (eresolve_tac [ltE] 2 THEN
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   623
    REPEAT (ares_tac [cadd_le_self, InfCard_is_Card] 2));
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   624
by (forward_tac [InfCard_is_Card RS Card_is_Ord RS le_refl] 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   625
by (resolve_tac [cadd_le_mono RS le_trans] 1 THEN REPEAT (assume_tac 1));
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   626
by (asm_simp_tac (ZF_ss addsimps [InfCard_cdouble_eq]) 1);
782
200a16083201 added bind_thm for theorems defined by "standard ..."
clasohm
parents: 767
diff changeset
   627
qed "InfCard_le_cadd_eq";
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   628
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   629
goal CardinalArith.thy
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   630
    "!!K. [| InfCard(K);  InfCard(L) |] ==> K |+| L = K Un L";
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   631
by (res_inst_tac [("i","K"),("j","L")] Ord_linear_le 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   632
by (typechk_tac [InfCard_is_Card, Card_is_Ord]);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   633
by (resolve_tac [cadd_commute RS ssubst] 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   634
by (resolve_tac [Un_commute RS ssubst] 1);
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   635
by (ALLGOALS
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   636
    (asm_simp_tac 
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   637
     (ZF_ss addsimps [InfCard_le_cadd_eq,
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   638
		      subset_Un_iff2 RS iffD1, le_imp_subset])));
782
200a16083201 added bind_thm for theorems defined by "standard ..."
clasohm
parents: 767
diff changeset
   639
qed "InfCard_cadd_eq";
767
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   640
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   641
(*The other part, Corollary 10.13 (2), refers to the cardinality of the set
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   642
  of all n-tuples of elements of K.  A better version for the Isabelle theory
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   643
  might be  InfCard(K) ==> |list(K)| = K.
a4fce3b94065 sum_lepoll_self, cadd_le_self, prod_lepoll_self,
lcp
parents: 760
diff changeset
   644
*)
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   645
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   646
(*** For every cardinal number there exists a greater one
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   647
     [Kunen's Theorem 10.16, which would be trivial using AC] ***)
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   648
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   649
goalw CardinalArith.thy [jump_cardinal_def] "Ord(jump_cardinal(K))";
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   650
by (rtac (Ord_is_Transset RSN (2,OrdI)) 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   651
by (safe_tac (ZF_cs addSIs [Ord_ordertype]));
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   652
bw Transset_def;
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   653
by (safe_tac ZF_cs);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   654
by (rtac (ordertype_subset RS exE) 1 THEN REPEAT (assume_tac 1));
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   655
by (resolve_tac [UN_I] 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   656
by (resolve_tac [ReplaceI] 2);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   657
by (ALLGOALS (fast_tac (ZF_cs addSEs [well_ord_subset])));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   658
qed "Ord_jump_cardinal";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   659
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   660
(*Allows selective unfolding.  Less work than deriving intro/elim rules*)
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   661
goalw CardinalArith.thy [jump_cardinal_def]
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   662
     "i : jump_cardinal(K) <->   \
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   663
\         (EX r X. r <= K*K & X <= K & well_ord(X,r) & i = ordertype(X,r))";
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   664
by (fast_tac subset_cs 1);	(*It's vital to avoid reasoning about <=*)
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   665
qed "jump_cardinal_iff";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   666
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   667
(*The easy part of Theorem 10.16: jump_cardinal(K) exceeds K*)
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   668
goal CardinalArith.thy "!!K. Ord(K) ==> K < jump_cardinal(K)";
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   669
by (resolve_tac [Ord_jump_cardinal RSN (2,ltI)] 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   670
by (resolve_tac [jump_cardinal_iff RS iffD2] 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   671
by (REPEAT_FIRST (ares_tac [exI, conjI, well_ord_Memrel]));
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   672
by (resolve_tac [subset_refl] 2);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   673
by (asm_simp_tac (ZF_ss addsimps [Memrel_def, subset_iff]) 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   674
by (asm_simp_tac (ZF_ss addsimps [ordertype_Memrel]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   675
qed "K_lt_jump_cardinal";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   676
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   677
(*The proof by contradiction: the bijection f yields a wellordering of X
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   678
  whose ordertype is jump_cardinal(K).  *)
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   679
goal CardinalArith.thy
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   680
    "!!K. [| well_ord(X,r);  r <= K * K;  X <= K;	\
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   681
\            f : bij(ordertype(X,r), jump_cardinal(K)) 	\
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   682
\	  |] ==> jump_cardinal(K) : jump_cardinal(K)";
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   683
by (subgoal_tac "f O ordermap(X,r): bij(X, jump_cardinal(K))" 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   684
by (REPEAT (ares_tac [comp_bij, ordermap_bij] 2));
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   685
by (resolve_tac [jump_cardinal_iff RS iffD2] 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   686
by (REPEAT_FIRST (resolve_tac [exI, conjI]));
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   687
by (rtac ([rvimage_type, Sigma_mono] MRS subset_trans) 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   688
by (REPEAT (assume_tac 1));
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   689
by (etac (bij_is_inj RS well_ord_rvimage) 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   690
by (rtac (Ord_jump_cardinal RS well_ord_Memrel) 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   691
by (asm_simp_tac
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   692
    (ZF_ss addsimps [well_ord_Memrel RSN (2, bij_ordertype_vimage), 
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   693
		     ordertype_Memrel, Ord_jump_cardinal]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   694
qed "Card_jump_cardinal_lemma";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   695
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   696
(*The hard part of Theorem 10.16: jump_cardinal(K) is itself a cardinal*)
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   697
goal CardinalArith.thy "Card(jump_cardinal(K))";
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   698
by (rtac (Ord_jump_cardinal RS CardI) 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   699
by (rewrite_goals_tac [eqpoll_def]);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   700
by (safe_tac (ZF_cs addSDs [ltD, jump_cardinal_iff RS iffD1]));
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   701
by (REPEAT (ares_tac [Card_jump_cardinal_lemma RS mem_irrefl] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   702
qed "Card_jump_cardinal";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   703
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   704
(*** Basic properties of successor cardinals ***)
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   705
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   706
goalw CardinalArith.thy [csucc_def]
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   707
    "!!K. Ord(K) ==> Card(csucc(K)) & K < csucc(K)";
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   708
by (rtac LeastI 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   709
by (REPEAT (ares_tac [conjI, Card_jump_cardinal, K_lt_jump_cardinal,
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   710
		      Ord_jump_cardinal] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   711
qed "csucc_basic";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   712
800
23f55b829ccb Limit_csucc: moved to InfDatatype and proved explicitly in
lcp
parents: 782
diff changeset
   713
bind_thm ("Card_csucc", csucc_basic RS conjunct1);
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   714
800
23f55b829ccb Limit_csucc: moved to InfDatatype and proved explicitly in
lcp
parents: 782
diff changeset
   715
bind_thm ("lt_csucc", csucc_basic RS conjunct2);
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   716
517
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   717
goal CardinalArith.thy "!!K. Ord(K) ==> 0 < csucc(K)";
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   718
by (resolve_tac [[Ord_0_le, lt_csucc] MRS lt_trans1] 1);
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   719
by (REPEAT (assume_tac 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   720
qed "Ord_0_lt_csucc";
517
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   721
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   722
goalw CardinalArith.thy [csucc_def]
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   723
    "!!K L. [| Card(L);  K<L |] ==> csucc(K) le L";
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   724
by (rtac Least_le 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   725
by (REPEAT (ares_tac [conjI, Card_is_Ord] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   726
qed "csucc_le";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   727
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   728
goal CardinalArith.thy
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   729
    "!!K. [| Ord(i); Card(K) |] ==> i < csucc(K) <-> |i| le K";
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   730
by (resolve_tac [iffI] 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   731
by (resolve_tac [Card_lt_imp_lt] 2);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   732
by (eresolve_tac [lt_trans1] 2);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   733
by (REPEAT (ares_tac [lt_csucc, Card_csucc, Card_is_Ord] 2));
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   734
by (resolve_tac [notI RS not_lt_imp_le] 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   735
by (resolve_tac [Card_cardinal RS csucc_le RS lt_trans1 RS lt_irrefl] 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   736
by (assume_tac 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   737
by (resolve_tac [Ord_cardinal_le RS lt_trans1] 1);
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   738
by (REPEAT (ares_tac [Ord_cardinal] 1
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   739
     ORELSE eresolve_tac [ltE, Card_is_Ord] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   740
qed "lt_csucc_iff";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   741
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   742
goal CardinalArith.thy
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   743
    "!!K' K. [| Card(K'); Card(K) |] ==> K' < csucc(K) <-> K' le K";
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   744
by (asm_simp_tac 
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   745
    (ZF_ss addsimps [lt_csucc_iff, Card_cardinal_eq, Card_is_Ord]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   746
qed "Card_lt_csucc_iff";
488
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents: 484
diff changeset
   747
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents: 484
diff changeset
   748
goalw CardinalArith.thy [InfCard_def]
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents: 484
diff changeset
   749
    "!!K. InfCard(K) ==> InfCard(csucc(K))";
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents: 484
diff changeset
   750
by (asm_simp_tac (ZF_ss addsimps [Card_csucc, Card_is_Ord, 
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents: 484
diff changeset
   751
				  lt_csucc RS leI RSN (2,le_trans)]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 571
diff changeset
   752
qed "InfCard_csucc";
517
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   753