author | wenzelm |
Sat, 24 Oct 1998 20:22:45 +0200 | |
changeset 5764 | ea464976a00f |
parent 5618 | 721671c68324 |
child 6153 | bff90585cce5 |
permissions | -rw-r--r-- |
1461 | 1 |
(* Title: ZF/OrderType.ML |
435 | 2 |
ID: $Id$ |
1461 | 3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
435 | 4 |
Copyright 1994 University of Cambridge |
5 |
||
849 | 6 |
Order types and ordinal arithmetic in Zermelo-Fraenkel Set Theory |
7 |
||
8 |
Ordinal arithmetic is traditionally defined in terms of order types, as here. |
|
9 |
But a definition by transfinite recursion would be much simpler! |
|
435 | 10 |
*) |
11 |
||
12 |
||
13 |
open OrderType; |
|
14 |
||
849 | 15 |
(**** Proofs needing the combination of Ordinal.thy and Order.thy ****) |
814
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
16 |
|
849 | 17 |
val [prem] = goal OrderType.thy "j le i ==> well_ord(j, Memrel(i))"; |
814
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
18 |
by (rtac well_ordI 1); |
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
19 |
by (rtac (wf_Memrel RS wf_imp_wf_on) 1); |
849 | 20 |
by (resolve_tac [prem RS ltE] 1); |
4091 | 21 |
by (asm_simp_tac (simpset() addsimps [linear_def, Memrel_iff, |
5268 | 22 |
[ltI, prem] MRS lt_trans2 RS ltD]) 1); |
849 | 23 |
by (REPEAT (resolve_tac [ballI, Ord_linear] 1)); |
24 |
by (REPEAT (eresolve_tac [asm_rl, Ord_in_Ord] 1)); |
|
25 |
qed "le_well_ord_Memrel"; |
|
26 |
||
27 |
(*"Ord(i) ==> well_ord(i, Memrel(i))"*) |
|
28 |
bind_thm ("well_ord_Memrel", le_refl RS le_well_ord_Memrel); |
|
814
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
29 |
|
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
30 |
(*Kunen's Theorem 7.3 (i), page 16; see also Ordinal/Ord_in_Ord |
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
31 |
The smaller ordinal is an initial segment of the larger *) |
5067 | 32 |
Goalw [pred_def, lt_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
33 |
"j<i ==> pred(i, j, Memrel(i)) = j"; |
4091 | 34 |
by (asm_simp_tac (simpset() addsimps [Memrel_iff]) 1); |
35 |
by (blast_tac (claset() addIs [Ord_trans]) 1); |
|
849 | 36 |
qed "lt_pred_Memrel"; |
814
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
37 |
|
5067 | 38 |
Goalw [pred_def,Memrel_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
39 |
"x:A ==> pred(A, x, Memrel(A)) = A Int x"; |
2925 | 40 |
by (Blast_tac 1); |
831 | 41 |
qed "pred_Memrel"; |
42 |
||
5268 | 43 |
Goal "[| j<i; f: ord_iso(i,Memrel(i),j,Memrel(j)) |] ==> R"; |
849 | 44 |
by (forward_tac [lt_pred_Memrel] 1); |
814
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
45 |
by (etac ltE 1); |
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
46 |
by (rtac (well_ord_Memrel RS well_ord_iso_predE) 1 THEN |
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
47 |
assume_tac 3 THEN assume_tac 1); |
4091 | 48 |
by (asm_full_simp_tac (simpset() addsimps [ord_iso_def]) 1); |
814
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
49 |
(*Combining the two simplifications causes looping*) |
4091 | 50 |
by (asm_simp_tac (simpset() addsimps [Memrel_iff]) 1); |
51 |
by (fast_tac (claset() addSEs [bij_is_fun RS apply_type] addEs [Ord_trans]) 1); |
|
814
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
52 |
qed "Ord_iso_implies_eq_lemma"; |
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
53 |
|
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
54 |
(*Kunen's Theorem 7.3 (ii), page 16. Isomorphic ordinals are equal*) |
5268 | 55 |
Goal "[| Ord(i); Ord(j); f: ord_iso(i,Memrel(i),j,Memrel(j)) \ |
814
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
56 |
\ |] ==> i=j"; |
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
57 |
by (res_inst_tac [("i","i"),("j","j")] Ord_linear_lt 1); |
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
58 |
by (REPEAT (eresolve_tac [asm_rl, ord_iso_sym, Ord_iso_implies_eq_lemma] 1)); |
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
59 |
qed "Ord_iso_implies_eq"; |
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
60 |
|
849 | 61 |
|
62 |
(**** Ordermap and ordertype ****) |
|
814
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
63 |
|
5067 | 64 |
Goalw [ordermap_def,ordertype_def] |
437 | 65 |
"ordermap(A,r) : A -> ordertype(A,r)"; |
66 |
by (rtac lam_type 1); |
|
67 |
by (rtac (lamI RS imageI) 1); |
|
68 |
by (REPEAT (assume_tac 1)); |
|
760 | 69 |
qed "ordermap_type"; |
437 | 70 |
|
849 | 71 |
(*** Unfolding of ordermap ***) |
435 | 72 |
|
437 | 73 |
(*Useful for cardinality reasoning; see CardinalArith.ML*) |
5067 | 74 |
Goalw [ordermap_def, pred_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
75 |
"[| wf[A](r); x:A |] ==> \ |
437 | 76 |
\ ordermap(A,r) ` x = ordermap(A,r) `` pred(A,x,r)"; |
2469 | 77 |
by (Asm_simp_tac 1); |
437 | 78 |
by (etac (wfrec_on RS trans) 1); |
79 |
by (assume_tac 1); |
|
4091 | 80 |
by (asm_simp_tac (simpset() addsimps [subset_iff, image_lam, |
437 | 81 |
vimage_singleton_iff]) 1); |
760 | 82 |
qed "ordermap_eq_image"; |
437 | 83 |
|
467 | 84 |
(*Useful for rewriting PROVIDED pred is not unfolded until later!*) |
5268 | 85 |
Goal "[| wf[A](r); x:A |] ==> \ |
435 | 86 |
\ ordermap(A,r) ` x = {ordermap(A,r)`y . y : pred(A,x,r)}"; |
4091 | 87 |
by (asm_simp_tac (simpset() addsimps [ordermap_eq_image, pred_subset, |
1461 | 88 |
ordermap_type RS image_fun]) 1); |
760 | 89 |
qed "ordermap_pred_unfold"; |
435 | 90 |
|
91 |
(*pred-unfolded version. NOT suitable for rewriting -- loops!*) |
|
92 |
val ordermap_unfold = rewrite_rule [pred_def] ordermap_pred_unfold; |
|
93 |
||
849 | 94 |
(*** Showing that ordermap, ordertype yield ordinals ***) |
435 | 95 |
|
96 |
fun ordermap_elim_tac i = |
|
97 |
EVERY [etac (ordermap_unfold RS equalityD1 RS subsetD RS RepFunE) i, |
|
1461 | 98 |
assume_tac (i+1), |
99 |
assume_tac i]; |
|
435 | 100 |
|
5067 | 101 |
Goalw [well_ord_def, tot_ord_def, part_ord_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
102 |
"[| well_ord(A,r); x:A |] ==> Ord(ordermap(A,r) ` x)"; |
4152 | 103 |
by Safe_tac; |
435 | 104 |
by (wf_on_ind_tac "x" [] 1); |
4091 | 105 |
by (asm_simp_tac (simpset() addsimps [ordermap_pred_unfold]) 1); |
435 | 106 |
by (rtac (Ord_is_Transset RSN (2,OrdI)) 1); |
437 | 107 |
by (rewrite_goals_tac [pred_def,Transset_def]); |
2925 | 108 |
by (Blast_tac 2); |
4152 | 109 |
by Safe_tac; |
435 | 110 |
by (ordermap_elim_tac 1); |
4091 | 111 |
by (fast_tac (claset() addSEs [trans_onD]) 1); |
760 | 112 |
qed "Ord_ordermap"; |
435 | 113 |
|
5067 | 114 |
Goalw [ordertype_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
115 |
"well_ord(A,r) ==> Ord(ordertype(A,r))"; |
2033 | 116 |
by (stac ([ordermap_type, subset_refl] MRS image_fun) 1); |
435 | 117 |
by (rtac (Ord_is_Transset RSN (2,OrdI)) 1); |
4091 | 118 |
by (blast_tac (claset() addIs [Ord_ordermap]) 2); |
437 | 119 |
by (rewrite_goals_tac [Transset_def,well_ord_def]); |
4152 | 120 |
by Safe_tac; |
435 | 121 |
by (ordermap_elim_tac 1); |
2925 | 122 |
by (Blast_tac 1); |
760 | 123 |
qed "Ord_ordertype"; |
435 | 124 |
|
849 | 125 |
(*** ordermap preserves the orderings in both directions ***) |
435 | 126 |
|
5268 | 127 |
Goal "[| <w,x>: r; wf[A](r); w: A; x: A |] ==> \ |
435 | 128 |
\ ordermap(A,r)`w : ordermap(A,r)`x"; |
129 |
by (eres_inst_tac [("x1", "x")] (ordermap_unfold RS ssubst) 1); |
|
437 | 130 |
by (assume_tac 1); |
2925 | 131 |
by (Blast_tac 1); |
760 | 132 |
qed "ordermap_mono"; |
435 | 133 |
|
134 |
(*linearity of r is crucial here*) |
|
5067 | 135 |
Goalw [well_ord_def, tot_ord_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
136 |
"[| ordermap(A,r)`w : ordermap(A,r)`x; well_ord(A,r); \ |
435 | 137 |
\ w: A; x: A |] ==> <w,x>: r"; |
4152 | 138 |
by Safe_tac; |
435 | 139 |
by (linear_case_tac 1); |
4091 | 140 |
by (blast_tac (claset() addSEs [mem_not_refl RS notE]) 1); |
467 | 141 |
by (dtac ordermap_mono 1); |
435 | 142 |
by (REPEAT_SOME assume_tac); |
437 | 143 |
by (etac mem_asym 1); |
144 |
by (assume_tac 1); |
|
760 | 145 |
qed "converse_ordermap_mono"; |
435 | 146 |
|
803
4c8333ab3eae
changed useless "qed" calls for lemmas back to uses of "result",
lcp
parents:
788
diff
changeset
|
147 |
bind_thm ("ordermap_surj", |
1461 | 148 |
rewrite_rule [symmetric ordertype_def] |
149 |
(ordermap_type RS surj_image)); |
|
435 | 150 |
|
5067 | 151 |
Goalw [well_ord_def, tot_ord_def, bij_def, inj_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
152 |
"well_ord(A,r) ==> ordermap(A,r) : bij(A, ordertype(A,r))"; |
4091 | 153 |
by (fast_tac (claset() addSIs [ordermap_type, ordermap_surj] |
3016 | 154 |
addEs [linearE] |
155 |
addDs [ordermap_mono] |
|
4091 | 156 |
addss (simpset() addsimps [mem_not_refl])) 1); |
760 | 157 |
qed "ordermap_bij"; |
435 | 158 |
|
849 | 159 |
(*** Isomorphisms involving ordertype ***) |
814
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
160 |
|
5067 | 161 |
Goalw [ord_iso_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
162 |
"well_ord(A,r) ==> \ |
435 | 163 |
\ ordermap(A,r) : ord_iso(A,r, ordertype(A,r), Memrel(ordertype(A,r)))"; |
4091 | 164 |
by (safe_tac (claset() addSEs [well_ord_is_wf] |
2925 | 165 |
addSIs [ordermap_type RS apply_type, |
166 |
ordermap_mono, ordermap_bij])); |
|
4091 | 167 |
by (blast_tac (claset() addSDs [converse_ordermap_mono]) 1); |
760 | 168 |
qed "ordertype_ord_iso"; |
435 | 169 |
|
5268 | 170 |
Goal "[| f: ord_iso(A,r,B,s); well_ord(B,s) |] ==> \ |
814
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
171 |
\ ordertype(A,r) = ordertype(B,s)"; |
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
172 |
by (forward_tac [well_ord_ord_iso] 1 THEN assume_tac 1); |
1461 | 173 |
by (rtac Ord_iso_implies_eq 1 |
174 |
THEN REPEAT (etac Ord_ordertype 1)); |
|
4091 | 175 |
by (deepen_tac (claset() addIs [ord_iso_trans, ord_iso_sym] |
831 | 176 |
addSEs [ordertype_ord_iso]) 0 1); |
814
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
177 |
qed "ordertype_eq"; |
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
178 |
|
5268 | 179 |
Goal "[| ordertype(A,r) = ordertype(B,s); \ |
849 | 180 |
\ well_ord(A,r); well_ord(B,s) \ |
181 |
\ |] ==> EX f. f: ord_iso(A,r,B,s)"; |
|
1461 | 182 |
by (rtac exI 1); |
849 | 183 |
by (resolve_tac [ordertype_ord_iso RS ord_iso_trans] 1); |
184 |
by (assume_tac 1); |
|
1461 | 185 |
by (etac ssubst 1); |
849 | 186 |
by (eresolve_tac [ordertype_ord_iso RS ord_iso_sym] 1); |
187 |
qed "ordertype_eq_imp_ord_iso"; |
|
435 | 188 |
|
849 | 189 |
(*** Basic equalities for ordertype ***) |
467 | 190 |
|
814
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
191 |
(*Ordertype of Memrel*) |
5137 | 192 |
Goal "j le i ==> ordertype(j,Memrel(i)) = j"; |
814
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
193 |
by (resolve_tac [Ord_iso_implies_eq RS sym] 1); |
1461 | 194 |
by (etac ltE 1); |
849 | 195 |
by (REPEAT (ares_tac [le_well_ord_Memrel, Ord_ordertype] 1)); |
1461 | 196 |
by (rtac ord_iso_trans 1); |
849 | 197 |
by (eresolve_tac [le_well_ord_Memrel RS ordertype_ord_iso] 2); |
198 |
by (resolve_tac [id_bij RS ord_isoI] 1); |
|
4091 | 199 |
by (asm_simp_tac (simpset() addsimps [id_conv, Memrel_iff]) 1); |
200 |
by (fast_tac (claset() addEs [ltE, Ord_in_Ord, Ord_trans]) 1); |
|
849 | 201 |
qed "le_ordertype_Memrel"; |
202 |
||
203 |
(*"Ord(i) ==> ordertype(i, Memrel(i)) = i"*) |
|
204 |
bind_thm ("ordertype_Memrel", le_refl RS le_ordertype_Memrel); |
|
467 | 205 |
|
5067 | 206 |
Goal "ordertype(0,r) = 0"; |
849 | 207 |
by (resolve_tac [id_bij RS ord_isoI RS ordertype_eq RS trans] 1); |
208 |
by (etac emptyE 1); |
|
1461 | 209 |
by (rtac well_ord_0 1); |
849 | 210 |
by (resolve_tac [Ord_0 RS ordertype_Memrel] 1); |
211 |
qed "ordertype_0"; |
|
212 |
||
2469 | 213 |
Addsimps [ordertype_0]; |
214 |
||
849 | 215 |
(*Ordertype of rvimage: [| f: bij(A,B); well_ord(B,s) |] ==> |
216 |
ordertype(A, rvimage(A,f,s)) = ordertype(B,s) *) |
|
814
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
217 |
bind_thm ("bij_ordertype_vimage", ord_iso_rvimage RS ordertype_eq); |
467 | 218 |
|
849 | 219 |
(*** A fundamental unfolding law for ordertype. ***) |
220 |
||
814
a32b420c33d4
Moved well_ord_Memrel, lt_eq_pred, Ord_iso_implies_eq_lemma,
lcp
parents:
807
diff
changeset
|
221 |
(*Ordermap returns the same result if applied to an initial segment*) |
5268 | 222 |
Goal "[| well_ord(A,r); y:A; z: pred(A,y,r) |] ==> \ |
1461 | 223 |
\ ordermap(pred(A,y,r), r) ` z = ordermap(A, r) ` z"; |
467 | 224 |
by (forward_tac [[well_ord_is_wf, pred_subset] MRS wf_on_subset_A] 1); |
225 |
by (wf_on_ind_tac "z" [] 1); |
|
4091 | 226 |
by (safe_tac (claset() addSEs [predE])); |
467 | 227 |
by (asm_simp_tac |
4091 | 228 |
(simpset() addsimps [ordermap_pred_unfold, well_ord_is_wf, pred_iff]) 1); |
467 | 229 |
(*combining these two simplifications LOOPS! *) |
4091 | 230 |
by (asm_simp_tac (simpset() addsimps [pred_pred_eq]) 1); |
231 |
by (asm_full_simp_tac (simpset() addsimps [pred_def]) 1); |
|
807 | 232 |
by (rtac (refl RSN (2,RepFun_cong)) 1); |
233 |
by (dtac well_ord_is_trans_on 1); |
|
4091 | 234 |
by (fast_tac (claset() addSEs [trans_onD]) 1); |
760 | 235 |
qed "ordermap_pred_eq_ordermap"; |
467 | 236 |
|
5067 | 237 |
Goalw [ordertype_def] |
849 | 238 |
"ordertype(A,r) = {ordermap(A,r)`y . y : A}"; |
239 |
by (rtac ([ordermap_type, subset_refl] MRS image_fun) 1); |
|
240 |
qed "ordertype_unfold"; |
|
241 |
||
242 |
(** Theorems by Krzysztof Grabczewski; proofs simplified by lcp **) |
|
243 |
||
5268 | 244 |
Goal "[| well_ord(A,r); x:A |] ==> \ |
849 | 245 |
\ ordertype(pred(A,x,r),r) <= ordertype(A,r)"; |
4091 | 246 |
by (asm_simp_tac (simpset() addsimps [ordertype_unfold, |
849 | 247 |
pred_subset RSN (2, well_ord_subset)]) 1); |
4091 | 248 |
by (fast_tac (claset() addIs [ordermap_pred_eq_ordermap] |
2925 | 249 |
addEs [predE]) 1); |
849 | 250 |
qed "ordertype_pred_subset"; |
251 |
||
5268 | 252 |
Goal "[| well_ord(A,r); x:A |] ==> \ |
849 | 253 |
\ ordertype(pred(A,x,r),r) < ordertype(A,r)"; |
254 |
by (resolve_tac [ordertype_pred_subset RS subset_imp_le RS leE] 1); |
|
255 |
by (REPEAT (ares_tac [Ord_ordertype, well_ord_subset, pred_subset] 1)); |
|
256 |
by (eresolve_tac [sym RS ordertype_eq_imp_ord_iso RS exE] 1); |
|
1461 | 257 |
by (etac well_ord_iso_predE 3); |
849 | 258 |
by (REPEAT (ares_tac [pred_subset, well_ord_subset] 1)); |
259 |
qed "ordertype_pred_lt"; |
|
260 |
||
261 |
(*May rewrite with this -- provided no rules are supplied for proving that |
|
1461 | 262 |
well_ord(pred(A,x,r), r) *) |
5268 | 263 |
Goal "well_ord(A,r) ==> \ |
849 | 264 |
\ ordertype(A,r) = {ordertype(pred(A,x,r),r). x:A}"; |
2493 | 265 |
by (rtac equalityI 1); |
4091 | 266 |
by (safe_tac (claset() addSIs [ordertype_pred_lt RS ltD])); |
984 | 267 |
by (fast_tac |
4091 | 268 |
(claset() addss |
269 |
(simpset() addsimps [ordertype_def, |
|
1461 | 270 |
well_ord_is_wf RS ordermap_eq_image, |
271 |
ordermap_type RS image_fun, |
|
272 |
ordermap_pred_eq_ordermap, |
|
273 |
pred_subset])) |
|
984 | 274 |
1); |
849 | 275 |
qed "ordertype_pred_unfold"; |
276 |
||
277 |
||
278 |
(**** Alternative definition of ordinal ****) |
|
279 |
||
280 |
(*proof by Krzysztof Grabczewski*) |
|
5137 | 281 |
Goalw [Ord_alt_def] "Ord(i) ==> Ord_alt(i)"; |
1461 | 282 |
by (rtac conjI 1); |
283 |
by (etac well_ord_Memrel 1); |
|
849 | 284 |
by (rewrite_goals_tac [Ord_def, Transset_def, pred_def, Memrel_def]); |
4091 | 285 |
by (Blast.depth_tac (claset()) 8 1); |
849 | 286 |
qed "Ord_is_Ord_alt"; |
287 |
||
288 |
(*proof by lcp*) |
|
5067 | 289 |
Goalw [Ord_alt_def, Ord_def, Transset_def, well_ord_def, |
1461 | 290 |
tot_ord_def, part_ord_def, trans_on_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
291 |
"Ord_alt(i) ==> Ord(i)"; |
4091 | 292 |
by (asm_full_simp_tac (simpset() addsimps [Memrel_iff, pred_Memrel]) 1); |
293 |
by (blast_tac (claset() addSEs [equalityE]) 1); |
|
849 | 294 |
qed "Ord_alt_is_Ord"; |
295 |
||
296 |
||
297 |
(**** Ordinal Addition ****) |
|
298 |
||
299 |
(*** Order Type calculations for radd ***) |
|
300 |
||
301 |
(** Addition with 0 **) |
|
302 |
||
5067 | 303 |
Goal "(lam z:A+0. case(%x. x, %y. y, z)) : bij(A+0, A)"; |
849 | 304 |
by (res_inst_tac [("d", "Inl")] lam_bijective 1); |
4152 | 305 |
by Safe_tac; |
2925 | 306 |
by (ALLGOALS Asm_simp_tac); |
849 | 307 |
qed "bij_sum_0"; |
308 |
||
5268 | 309 |
Goal "well_ord(A,r) ==> ordertype(A+0, radd(A,r,0,s)) = ordertype(A,r)"; |
849 | 310 |
by (resolve_tac [bij_sum_0 RS ord_isoI RS ordertype_eq] 1); |
311 |
by (assume_tac 2); |
|
4091 | 312 |
by (fast_tac (claset() addss (simpset() addsimps [radd_Inl_iff, Memrel_iff])) 1); |
849 | 313 |
qed "ordertype_sum_0_eq"; |
314 |
||
5067 | 315 |
Goal "(lam z:0+A. case(%x. x, %y. y, z)) : bij(0+A, A)"; |
849 | 316 |
by (res_inst_tac [("d", "Inr")] lam_bijective 1); |
4152 | 317 |
by Safe_tac; |
2925 | 318 |
by (ALLGOALS Asm_simp_tac); |
849 | 319 |
qed "bij_0_sum"; |
320 |
||
5268 | 321 |
Goal "well_ord(A,r) ==> ordertype(0+A, radd(0,s,A,r)) = ordertype(A,r)"; |
849 | 322 |
by (resolve_tac [bij_0_sum RS ord_isoI RS ordertype_eq] 1); |
323 |
by (assume_tac 2); |
|
4091 | 324 |
by (fast_tac (claset() addss (simpset() addsimps [radd_Inr_iff, Memrel_iff])) 1); |
849 | 325 |
qed "ordertype_0_sum_eq"; |
326 |
||
327 |
(** Initial segments of radd. Statements by Grabczewski **) |
|
328 |
||
329 |
(*In fact, pred(A+B, Inl(a), radd(A,r,B,s)) = pred(A,a,r)+0 *) |
|
5067 | 330 |
Goalw [pred_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
331 |
"a:A ==> \ |
1461 | 332 |
\ (lam x:pred(A,a,r). Inl(x)) \ |
849 | 333 |
\ : bij(pred(A,a,r), pred(A+B, Inl(a), radd(A,r,B,s)))"; |
3840 | 334 |
by (res_inst_tac [("d", "case(%x. x, %y. y)")] lam_bijective 1); |
4152 | 335 |
by Safe_tac; |
849 | 336 |
by (ALLGOALS |
337 |
(asm_full_simp_tac |
|
4091 | 338 |
(simpset() addsimps [radd_Inl_iff, radd_Inr_Inl_iff]))); |
849 | 339 |
qed "pred_Inl_bij"; |
340 |
||
5268 | 341 |
Goal "[| a:A; well_ord(A,r) |] ==> \ |
849 | 342 |
\ ordertype(pred(A+B, Inl(a), radd(A,r,B,s)), radd(A,r,B,s)) = \ |
343 |
\ ordertype(pred(A,a,r), r)"; |
|
344 |
by (resolve_tac [pred_Inl_bij RS ord_isoI RS ord_iso_sym RS ordertype_eq] 1); |
|
345 |
by (REPEAT_FIRST (ares_tac [pred_subset, well_ord_subset])); |
|
4091 | 346 |
by (asm_full_simp_tac (simpset() addsimps [radd_Inl_iff, pred_def]) 1); |
849 | 347 |
qed "ordertype_pred_Inl_eq"; |
348 |
||
5067 | 349 |
Goalw [pred_def, id_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
350 |
"b:B ==> \ |
1461 | 351 |
\ id(A+pred(B,b,s)) \ |
849 | 352 |
\ : bij(A+pred(B,b,s), pred(A+B, Inr(b), radd(A,r,B,s)))"; |
3840 | 353 |
by (res_inst_tac [("d", "%z. z")] lam_bijective 1); |
4152 | 354 |
by Safe_tac; |
2469 | 355 |
by (ALLGOALS (Asm_full_simp_tac)); |
849 | 356 |
qed "pred_Inr_bij"; |
357 |
||
5268 | 358 |
Goal "[| b:B; well_ord(A,r); well_ord(B,s) |] ==> \ |
849 | 359 |
\ ordertype(pred(A+B, Inr(b), radd(A,r,B,s)), radd(A,r,B,s)) = \ |
360 |
\ ordertype(A+pred(B,b,s), radd(A,r,pred(B,b,s),s))"; |
|
361 |
by (resolve_tac [pred_Inr_bij RS ord_isoI RS ord_iso_sym RS ordertype_eq] 1); |
|
4091 | 362 |
by (fast_tac (claset() addss (simpset() addsimps [pred_def, id_def])) 2); |
849 | 363 |
by (REPEAT_FIRST (ares_tac [well_ord_radd, pred_subset, well_ord_subset])); |
364 |
qed "ordertype_pred_Inr_eq"; |
|
365 |
||
366 |
(*** Basic laws for ordinal addition ***) |
|
367 |
||
5067 | 368 |
Goalw [oadd_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
369 |
"[| Ord(i); Ord(j) |] ==> Ord(i++j)"; |
849 | 370 |
by (REPEAT (ares_tac [Ord_ordertype, well_ord_radd, well_ord_Memrel] 1)); |
371 |
qed "Ord_oadd"; |
|
372 |
||
373 |
(** Ordinal addition with zero **) |
|
374 |
||
5137 | 375 |
Goalw [oadd_def] "Ord(i) ==> i++0 = i"; |
4091 | 376 |
by (asm_simp_tac (simpset() addsimps [Memrel_0, ordertype_sum_0_eq, |
1461 | 377 |
ordertype_Memrel, well_ord_Memrel]) 1); |
849 | 378 |
qed "oadd_0"; |
379 |
||
5137 | 380 |
Goalw [oadd_def] "Ord(i) ==> 0++i = i"; |
4091 | 381 |
by (asm_simp_tac (simpset() addsimps [Memrel_0, ordertype_0_sum_eq, |
1461 | 382 |
ordertype_Memrel, well_ord_Memrel]) 1); |
849 | 383 |
qed "oadd_0_left"; |
384 |
||
2469 | 385 |
Addsimps [oadd_0, oadd_0_left]; |
849 | 386 |
|
387 |
(*** Further properties of ordinal addition. Statements by Grabczewski, |
|
388 |
proofs by lcp. ***) |
|
389 |
||
5137 | 390 |
Goalw [oadd_def] "[| k<i; Ord(j) |] ==> k < i++j"; |
1461 | 391 |
by (rtac ltE 1 THEN assume_tac 1); |
392 |
by (rtac ltI 1); |
|
849 | 393 |
by (REPEAT (ares_tac [Ord_ordertype, well_ord_radd, well_ord_Memrel] 2)); |
394 |
by (asm_simp_tac |
|
4091 | 395 |
(simpset() addsimps [ordertype_pred_unfold, |
2493 | 396 |
well_ord_radd, well_ord_Memrel, |
397 |
ordertype_pred_Inl_eq, |
|
398 |
lt_pred_Memrel, leI RS le_ordertype_Memrel] |
|
2469 | 399 |
setloop rtac (InlI RSN (2,bexI))) 1); |
849 | 400 |
qed "lt_oadd1"; |
401 |
||
1032
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
402 |
(*Thus also we obtain the rule i++j = k ==> i le k *) |
5137 | 403 |
Goal "[| Ord(i); Ord(j) |] ==> i le i++j"; |
1461 | 404 |
by (rtac all_lt_imp_le 1); |
849 | 405 |
by (REPEAT (ares_tac [Ord_oadd, lt_oadd1] 1)); |
406 |
qed "oadd_le_self"; |
|
407 |
||
408 |
(** A couple of strange but necessary results! **) |
|
409 |
||
5268 | 410 |
Goal "A<=B ==> id(A) : ord_iso(A, Memrel(A), A, Memrel(B))"; |
849 | 411 |
by (resolve_tac [id_bij RS ord_isoI] 1); |
4091 | 412 |
by (asm_simp_tac (simpset() addsimps [id_conv, Memrel_iff]) 1); |
2925 | 413 |
by (Blast_tac 1); |
849 | 414 |
qed "id_ord_iso_Memrel"; |
415 |
||
5268 | 416 |
Goal "[| well_ord(A,r); k<j |] ==> \ |
1461 | 417 |
\ ordertype(A+k, radd(A, r, k, Memrel(j))) = \ |
849 | 418 |
\ ordertype(A+k, radd(A, r, k, Memrel(k)))"; |
1461 | 419 |
by (etac ltE 1); |
849 | 420 |
by (resolve_tac [ord_iso_refl RS sum_ord_iso_cong RS ordertype_eq] 1); |
421 |
by (eresolve_tac [OrdmemD RS id_ord_iso_Memrel RS ord_iso_sym] 1); |
|
422 |
by (REPEAT_FIRST (ares_tac [well_ord_radd, well_ord_Memrel])); |
|
423 |
qed "ordertype_sum_Memrel"; |
|
424 |
||
5137 | 425 |
Goalw [oadd_def] "[| k<j; Ord(i) |] ==> i++k < i++j"; |
1461 | 426 |
by (rtac ltE 1 THEN assume_tac 1); |
849 | 427 |
by (resolve_tac [ordertype_pred_unfold RS equalityD2 RS subsetD RS ltI] 1); |
428 |
by (REPEAT_FIRST (ares_tac [Ord_ordertype, well_ord_radd, well_ord_Memrel])); |
|
1461 | 429 |
by (rtac RepFun_eqI 1); |
430 |
by (etac InrI 2); |
|
849 | 431 |
by (asm_simp_tac |
4091 | 432 |
(simpset() addsimps [ordertype_pred_Inr_eq, well_ord_Memrel, |
1461 | 433 |
lt_pred_Memrel, leI RS le_ordertype_Memrel, |
434 |
ordertype_sum_Memrel]) 1); |
|
849 | 435 |
qed "oadd_lt_mono2"; |
436 |
||
5268 | 437 |
Goal "[| i++j < i++k; Ord(i); Ord(j); Ord(k) |] ==> j<k"; |
1032
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
438 |
by (rtac Ord_linear_lt 1); |
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
439 |
by (REPEAT_SOME assume_tac); |
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
440 |
by (ALLGOALS |
4091 | 441 |
(blast_tac (claset() addDs [oadd_lt_mono2] addEs [lt_irrefl, lt_asym]))); |
1032
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
442 |
qed "oadd_lt_cancel2"; |
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
443 |
|
5268 | 444 |
Goal "[| Ord(i); Ord(j); Ord(k) |] ==> i++j < i++k <-> j<k"; |
4091 | 445 |
by (blast_tac (claset() addSIs [oadd_lt_mono2] addSDs [oadd_lt_cancel2]) 1); |
1032
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
446 |
qed "oadd_lt_iff2"; |
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
447 |
|
5268 | 448 |
Goal "[| i++j = i++k; Ord(i); Ord(j); Ord(k) |] ==> j=k"; |
849 | 449 |
by (rtac Ord_linear_lt 1); |
450 |
by (REPEAT_SOME assume_tac); |
|
451 |
by (ALLGOALS |
|
4091 | 452 |
(fast_tac (claset() addDs [oadd_lt_mono2] |
453 |
addss (simpset() addsimps [lt_not_refl])))); |
|
849 | 454 |
qed "oadd_inject"; |
455 |
||
5067 | 456 |
Goalw [oadd_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
457 |
"[| k < i++j; Ord(i); Ord(j) |] ==> k<i | (EX l:j. k = i++l )"; |
849 | 458 |
(*Rotate the hypotheses so that simplification will work*) |
459 |
by (etac revcut_rl 1); |
|
460 |
by (asm_full_simp_tac |
|
4091 | 461 |
(simpset() addsimps [ordertype_pred_unfold, well_ord_radd, |
1461 | 462 |
well_ord_Memrel]) 1); |
849 | 463 |
by (eresolve_tac [ltD RS RepFunE] 1); |
4091 | 464 |
by (fast_tac (claset() addss |
465 |
(simpset() addsimps [ordertype_pred_Inl_eq, well_ord_Memrel, |
|
1461 | 466 |
ltI, lt_pred_Memrel, le_ordertype_Memrel, leI, |
467 |
ordertype_pred_Inr_eq, |
|
468 |
ordertype_sum_Memrel])) 1); |
|
849 | 469 |
qed "lt_oadd_disj"; |
470 |
||
471 |
||
472 |
(*** Ordinal addition with successor -- via associativity! ***) |
|
473 |
||
5067 | 474 |
Goalw [oadd_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
475 |
"[| Ord(i); Ord(j); Ord(k) |] ==> (i++j)++k = i++(j++k)"; |
849 | 476 |
by (resolve_tac [ordertype_eq RS trans] 1); |
477 |
by (rtac ([ordertype_ord_iso RS ord_iso_sym, ord_iso_refl] MRS |
|
1461 | 478 |
sum_ord_iso_cong) 1); |
849 | 479 |
by (REPEAT (ares_tac [well_ord_radd, well_ord_Memrel, Ord_ordertype] 1)); |
480 |
by (resolve_tac [sum_assoc_ord_iso RS ordertype_eq RS trans] 1); |
|
481 |
by (rtac ([ord_iso_refl, ordertype_ord_iso] MRS sum_ord_iso_cong RS |
|
1461 | 482 |
ordertype_eq) 2); |
849 | 483 |
by (REPEAT (ares_tac [well_ord_radd, well_ord_Memrel, Ord_ordertype] 1)); |
484 |
qed "oadd_assoc"; |
|
485 |
||
5268 | 486 |
Goal "[| Ord(i); Ord(j) |] ==> i++j = i Un (UN k:j. {i++k})"; |
849 | 487 |
by (rtac (subsetI RS equalityI) 1); |
488 |
by (eresolve_tac [ltI RS lt_oadd_disj RS disjE] 1); |
|
489 |
by (REPEAT (ares_tac [Ord_oadd] 1)); |
|
4091 | 490 |
by (fast_tac (claset() addIs [lt_oadd1, oadd_lt_mono2] |
491 |
addss (simpset() addsimps [Ord_mem_iff_lt, Ord_oadd])) 3); |
|
2925 | 492 |
by (Blast_tac 2); |
4091 | 493 |
by (blast_tac (claset() addSEs [ltE]) 1); |
849 | 494 |
qed "oadd_unfold"; |
495 |
||
5137 | 496 |
Goal "Ord(i) ==> i++1 = succ(i)"; |
4091 | 497 |
by (asm_simp_tac (simpset() addsimps [oadd_unfold, Ord_1, oadd_0]) 1); |
2925 | 498 |
by (Blast_tac 1); |
849 | 499 |
qed "oadd_1"; |
500 |
||
5268 | 501 |
Goal "[| Ord(i); Ord(j) |] ==> i++succ(j) = succ(i++j)"; |
2493 | 502 |
(*ZF_ss prevents looping*) |
2469 | 503 |
by (asm_simp_tac (ZF_ss addsimps [Ord_oadd, oadd_1 RS sym]) 1); |
4091 | 504 |
by (asm_simp_tac (simpset() addsimps [oadd_1, oadd_assoc, Ord_1]) 1); |
849 | 505 |
qed "oadd_succ"; |
506 |
||
507 |
||
508 |
(** Ordinal addition with limit ordinals **) |
|
509 |
||
5268 | 510 |
val prems = |
511 |
Goal "[| Ord(i); !!x. x:A ==> Ord(j(x)); a:A |] ==> \ |
|
512 |
\ i ++ (UN x:A. j(x)) = (UN x:A. i++j(x))"; |
|
5618 | 513 |
by (blast_tac (claset() addIs prems @ [ltI, Ord_UN, Ord_oadd, |
514 |
lt_oadd1 RS ltD, oadd_lt_mono2 RS ltD] |
|
515 |
addSEs [ltE, ltI RS lt_oadd_disj RS disjE]) 1); |
|
849 | 516 |
qed "oadd_UN"; |
517 |
||
5268 | 518 |
Goal "[| Ord(i); Limit(j) |] ==> i++j = (UN k:j. i++k)"; |
849 | 519 |
by (forward_tac [Limit_has_0 RS ltD] 1); |
4091 | 520 |
by (asm_simp_tac (simpset() addsimps [Limit_is_Ord RS Ord_in_Ord, |
1461 | 521 |
oadd_UN RS sym, Union_eq_UN RS sym, |
522 |
Limit_Union_eq]) 1); |
|
849 | 523 |
qed "oadd_Limit"; |
524 |
||
525 |
(** Order/monotonicity properties of ordinal addition **) |
|
526 |
||
5137 | 527 |
Goal "[| Ord(i); Ord(j) |] ==> i le j++i"; |
849 | 528 |
by (eres_inst_tac [("i","i")] trans_induct3 1); |
4091 | 529 |
by (asm_simp_tac (simpset() addsimps [Ord_0_le]) 1); |
530 |
by (asm_simp_tac (simpset() addsimps [oadd_succ, succ_leI]) 1); |
|
531 |
by (asm_simp_tac (simpset() addsimps [oadd_Limit]) 1); |
|
1461 | 532 |
by (rtac le_trans 1); |
533 |
by (rtac le_implies_UN_le_UN 2); |
|
2925 | 534 |
by (Blast_tac 2); |
4091 | 535 |
by (asm_simp_tac (simpset() addsimps [Union_eq_UN RS sym, Limit_Union_eq, |
2493 | 536 |
le_refl, Limit_is_Ord]) 1); |
849 | 537 |
qed "oadd_le_self2"; |
538 |
||
5137 | 539 |
Goal "[| k le j; Ord(i) |] ==> k++i le j++i"; |
849 | 540 |
by (forward_tac [lt_Ord] 1); |
541 |
by (forward_tac [le_Ord2] 1); |
|
1461 | 542 |
by (etac trans_induct3 1); |
2469 | 543 |
by (Asm_simp_tac 1); |
4091 | 544 |
by (asm_simp_tac (simpset() addsimps [oadd_succ, succ_le_iff]) 1); |
545 |
by (asm_simp_tac (simpset() addsimps [oadd_Limit]) 1); |
|
1461 | 546 |
by (rtac le_implies_UN_le_UN 1); |
2925 | 547 |
by (Blast_tac 1); |
849 | 548 |
qed "oadd_le_mono1"; |
549 |
||
5137 | 550 |
Goal "[| i' le i; j'<j |] ==> i'++j' < i++j"; |
1461 | 551 |
by (rtac lt_trans1 1); |
849 | 552 |
by (REPEAT (eresolve_tac [asm_rl, oadd_le_mono1, oadd_lt_mono2, ltE, |
1461 | 553 |
Ord_succD] 1)); |
849 | 554 |
qed "oadd_lt_mono"; |
555 |
||
5137 | 556 |
Goal "[| i' le i; j' le j |] ==> i'++j' le i++j"; |
4091 | 557 |
by (asm_simp_tac (simpset() addsimps [oadd_succ RS sym, le_Ord2, oadd_lt_mono]) 1); |
849 | 558 |
qed "oadd_le_mono"; |
559 |
||
5268 | 560 |
Goal "[| Ord(i); Ord(j); Ord(k) |] ==> i++j le i++k <-> j le k"; |
4091 | 561 |
by (asm_simp_tac (simpset() addsimps [oadd_lt_iff2, oadd_succ RS sym, |
1461 | 562 |
Ord_succ]) 1); |
1032
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
563 |
qed "oadd_le_iff2"; |
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
564 |
|
849 | 565 |
|
566 |
(** Ordinal subtraction; the difference is ordertype(j-i, Memrel(j)). |
|
567 |
Probably simpler to define the difference recursively! |
|
568 |
**) |
|
569 |
||
5268 | 570 |
Goal "A<=B ==> (lam y:B. if(y:A, Inl(y), Inr(y))) : bij(B, A+(B-A))"; |
3840 | 571 |
by (res_inst_tac [("d", "case(%x. x, %y. y)")] lam_bijective 1); |
4091 | 572 |
by (blast_tac (claset() addSIs [if_type]) 1); |
573 |
by (fast_tac (claset() addSIs [case_type]) 1); |
|
1461 | 574 |
by (etac sumE 2); |
5137 | 575 |
by (ALLGOALS Asm_simp_tac); |
849 | 576 |
qed "bij_sum_Diff"; |
577 |
||
5268 | 578 |
Goal "i le j ==> \ |
1461 | 579 |
\ ordertype(i+(j-i), radd(i,Memrel(j),j-i,Memrel(j))) = \ |
849 | 580 |
\ ordertype(j, Memrel(j))"; |
4091 | 581 |
by (safe_tac (claset() addSDs [le_subset_iff RS iffD1])); |
849 | 582 |
by (resolve_tac [bij_sum_Diff RS ord_isoI RS ord_iso_sym RS ordertype_eq] 1); |
1461 | 583 |
by (etac well_ord_Memrel 3); |
849 | 584 |
by (assume_tac 1); |
5137 | 585 |
by (asm_simp_tac (simpset() addsimps [Memrel_iff]) 1); |
849 | 586 |
by (forw_inst_tac [("j", "y")] Ord_in_Ord 1 THEN assume_tac 1); |
587 |
by (forw_inst_tac [("j", "x")] Ord_in_Ord 1 THEN assume_tac 1); |
|
4091 | 588 |
by (asm_simp_tac (simpset() addsimps [Ord_mem_iff_lt, lt_Ord, not_lt_iff_le]) 1); |
589 |
by (blast_tac (claset() addIs [lt_trans2, lt_trans]) 1); |
|
849 | 590 |
qed "ordertype_sum_Diff"; |
591 |
||
5067 | 592 |
Goalw [oadd_def, odiff_def] |
5268 | 593 |
"i le j \ |
594 |
\ ==> i ++ (j--i) = ordertype(i+(j-i), radd(i,Memrel(j),j-i,Memrel(j)))"; |
|
4091 | 595 |
by (safe_tac (claset() addSDs [le_subset_iff RS iffD1])); |
849 | 596 |
by (resolve_tac [sum_ord_iso_cong RS ordertype_eq] 1); |
1461 | 597 |
by (etac id_ord_iso_Memrel 1); |
849 | 598 |
by (resolve_tac [ordertype_ord_iso RS ord_iso_sym] 1); |
599 |
by (REPEAT (ares_tac [well_ord_radd, well_ord_Memrel RS well_ord_subset, |
|
1461 | 600 |
Diff_subset] 1)); |
849 | 601 |
qed "oadd_ordertype_Diff"; |
602 |
||
5137 | 603 |
Goal "i le j ==> i ++ (j--i) = j"; |
4091 | 604 |
by (asm_simp_tac (simpset() addsimps [oadd_ordertype_Diff, ordertype_sum_Diff, |
1461 | 605 |
ordertype_Memrel, lt_Ord2 RS Ord_succD]) 1); |
1032
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
606 |
qed "oadd_odiff_inverse"; |
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
607 |
|
5067 | 608 |
Goalw [odiff_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
609 |
"[| Ord(i); Ord(j) |] ==> Ord(i--j)"; |
1032
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
610 |
by (REPEAT (ares_tac [Ord_ordertype, well_ord_Memrel RS well_ord_subset, |
1461 | 611 |
Diff_subset] 1)); |
1032
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
612 |
qed "Ord_odiff"; |
849 | 613 |
|
1032
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
614 |
(*By oadd_inject, the difference between i and j is unique. Note that we get |
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
615 |
i++j = k ==> j = k--i. *) |
5268 | 616 |
Goal "[| Ord(i); Ord(j) |] ==> (i++j) -- i = j"; |
1461 | 617 |
by (rtac oadd_inject 1); |
1032
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
618 |
by (REPEAT (ares_tac [Ord_ordertype, Ord_oadd, Ord_odiff] 2)); |
4091 | 619 |
by (asm_simp_tac (simpset() addsimps [oadd_odiff_inverse, oadd_le_self]) 1); |
1032
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
620 |
qed "odiff_oadd_inverse"; |
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
621 |
|
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
622 |
val [i_lt_j, k_le_i] = goal OrderType.thy |
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
623 |
"[| i<j; k le i |] ==> i--k < j--k"; |
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
624 |
by (rtac (k_le_i RS lt_Ord RSN (2,oadd_lt_cancel2)) 1); |
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
625 |
by (simp_tac |
4091 | 626 |
(simpset() addsimps [i_lt_j, k_le_i, [k_le_i, leI] MRS le_trans, |
5268 | 627 |
oadd_odiff_inverse]) 1); |
1032
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
628 |
by (REPEAT (resolve_tac (Ord_odiff :: |
1461 | 629 |
([i_lt_j, k_le_i] RL [lt_Ord, lt_Ord2])) 1)); |
1032
54b9f670c67e
Proved odiff_oadd_inverse, oadd_lt_cancel2, oadd_lt_iff2,
lcp
parents:
984
diff
changeset
|
630 |
qed "odiff_lt_mono2"; |
849 | 631 |
|
632 |
||
633 |
(**** Ordinal Multiplication ****) |
|
634 |
||
5067 | 635 |
Goalw [omult_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
636 |
"[| Ord(i); Ord(j) |] ==> Ord(i**j)"; |
849 | 637 |
by (REPEAT (ares_tac [Ord_ordertype, well_ord_rmult, well_ord_Memrel] 1)); |
638 |
qed "Ord_omult"; |
|
639 |
||
640 |
(*** A useful unfolding law ***) |
|
641 |
||
5067 | 642 |
Goalw [pred_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
643 |
"[| a:A; b:B |] ==> \ |
1461 | 644 |
\ pred(A*B, <a,b>, rmult(A,r,B,s)) = \ |
849 | 645 |
\ pred(A,a,r)*B Un ({a} * pred(B,b,s))"; |
2493 | 646 |
by (rtac equalityI 1); |
4152 | 647 |
by Safe_tac; |
4091 | 648 |
by (ALLGOALS (asm_full_simp_tac (simpset() addsimps [rmult_iff]))); |
2925 | 649 |
by (ALLGOALS (Blast_tac)); |
849 | 650 |
qed "pred_Pair_eq"; |
651 |
||
5268 | 652 |
Goal "[| a:A; b:B; well_ord(A,r); well_ord(B,s) |] ==> \ |
849 | 653 |
\ ordertype(pred(A*B, <a,b>, rmult(A,r,B,s)), rmult(A,r,B,s)) = \ |
3016 | 654 |
\ ordertype(pred(A,a,r)*B + pred(B,b,s), \ |
849 | 655 |
\ radd(A*B, rmult(A,r,B,s), B, s))"; |
4091 | 656 |
by (asm_simp_tac (simpset() addsimps [pred_Pair_eq]) 1); |
849 | 657 |
by (resolve_tac [ordertype_eq RS sym] 1); |
1461 | 658 |
by (rtac prod_sum_singleton_ord_iso 1); |
984 | 659 |
by (REPEAT_FIRST (ares_tac [pred_subset, well_ord_rmult RS well_ord_subset])); |
4091 | 660 |
by (blast_tac (claset() addSEs [predE]) 1); |
849 | 661 |
qed "ordertype_pred_Pair_eq"; |
662 |
||
5067 | 663 |
Goalw [oadd_def, omult_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
664 |
"[| i'<i; j'<j |] ==> \ |
849 | 665 |
\ ordertype(pred(i*j, <i',j'>, rmult(i,Memrel(i),j,Memrel(j))), \ |
3016 | 666 |
\ rmult(i,Memrel(i),j,Memrel(j))) = \ |
849 | 667 |
\ j**i' ++ j'"; |
4091 | 668 |
by (asm_simp_tac (simpset() addsimps [ordertype_pred_Pair_eq, lt_pred_Memrel, |
3016 | 669 |
ltD, lt_Ord2, well_ord_Memrel]) 1); |
1461 | 670 |
by (rtac trans 1); |
849 | 671 |
by (resolve_tac [ordertype_ord_iso RS sum_ord_iso_cong RS ordertype_eq] 2); |
1461 | 672 |
by (rtac ord_iso_refl 3); |
849 | 673 |
by (resolve_tac [id_bij RS ord_isoI RS ordertype_eq] 1); |
674 |
by (REPEAT_FIRST (eresolve_tac [SigmaE, sumE, ltE, ssubst])); |
|
675 |
by (REPEAT_FIRST (ares_tac [well_ord_rmult, well_ord_radd, well_ord_Memrel, |
|
1461 | 676 |
Ord_ordertype])); |
4091 | 677 |
by (ALLGOALS (asm_simp_tac (simpset() addsimps [Memrel_iff]))); |
4152 | 678 |
by Safe_tac; |
4091 | 679 |
by (ALLGOALS (blast_tac (claset() addIs [Ord_trans]))); |
849 | 680 |
qed "ordertype_pred_Pair_lemma"; |
681 |
||
5067 | 682 |
Goalw [omult_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
683 |
"[| Ord(i); Ord(j); k<j**i |] ==> \ |
849 | 684 |
\ EX j' i'. k = j**i' ++ j' & j'<j & i'<i"; |
4091 | 685 |
by (asm_full_simp_tac (simpset() addsimps [ordertype_pred_unfold, |
1461 | 686 |
well_ord_rmult, well_ord_Memrel]) 1); |
4091 | 687 |
by (safe_tac (claset() addSEs [ltE])); |
688 |
by (asm_simp_tac (simpset() addsimps [ordertype_pred_Pair_lemma, ltI, |
|
3736
39ee3d31cfbc
Much tidying including step_tac -> clarify_tac or safe_tac; sometimes
paulson
parents:
3016
diff
changeset
|
689 |
symmetric omult_def]) 1); |
4091 | 690 |
by (blast_tac (claset() addIs [ltI]) 1); |
849 | 691 |
qed "lt_omult"; |
692 |
||
5067 | 693 |
Goalw [omult_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
694 |
"[| j'<j; i'<i |] ==> j**i' ++ j' < j**i"; |
1461 | 695 |
by (rtac ltI 1); |
984 | 696 |
by (asm_simp_tac |
4091 | 697 |
(simpset() addsimps [Ord_ordertype, well_ord_rmult, well_ord_Memrel, |
2493 | 698 |
lt_Ord2]) 2); |
984 | 699 |
by (asm_simp_tac |
4091 | 700 |
(simpset() addsimps [ordertype_pred_unfold, |
1461 | 701 |
well_ord_rmult, well_ord_Memrel, lt_Ord2]) 1); |
2469 | 702 |
by (rtac bexI 1); |
4091 | 703 |
by (blast_tac (claset() addSEs [ltE]) 2); |
849 | 704 |
by (asm_simp_tac |
4091 | 705 |
(simpset() addsimps [ordertype_pred_Pair_lemma, ltI, |
2493 | 706 |
symmetric omult_def]) 1); |
849 | 707 |
qed "omult_oadd_lt"; |
708 |
||
5268 | 709 |
Goal "[| Ord(i); Ord(j) |] ==> j**i = (UN j':j. UN i':i. {j**i' ++ j'})"; |
849 | 710 |
by (rtac (subsetI RS equalityI) 1); |
711 |
by (resolve_tac [lt_omult RS exE] 1); |
|
1461 | 712 |
by (etac ltI 3); |
849 | 713 |
by (REPEAT (ares_tac [Ord_omult] 1)); |
4091 | 714 |
by (blast_tac (claset() addSEs [ltE]) 1); |
715 |
by (blast_tac (claset() addIs [omult_oadd_lt RS ltD, ltI]) 1); |
|
849 | 716 |
qed "omult_unfold"; |
717 |
||
718 |
(*** Basic laws for ordinal multiplication ***) |
|
719 |
||
720 |
(** Ordinal multiplication by zero **) |
|
721 |
||
5067 | 722 |
Goalw [omult_def] "i**0 = 0"; |
2469 | 723 |
by (Asm_simp_tac 1); |
849 | 724 |
qed "omult_0"; |
725 |
||
5067 | 726 |
Goalw [omult_def] "0**i = 0"; |
2469 | 727 |
by (Asm_simp_tac 1); |
849 | 728 |
qed "omult_0_left"; |
729 |
||
2469 | 730 |
Addsimps [omult_0, omult_0_left]; |
731 |
||
849 | 732 |
(** Ordinal multiplication by 1 **) |
733 |
||
5137 | 734 |
Goalw [omult_def] "Ord(i) ==> i**1 = i"; |
849 | 735 |
by (resolve_tac [ord_isoI RS ordertype_eq RS trans] 1); |
736 |
by (res_inst_tac [("c", "snd"), ("d", "%z.<0,z>")] lam_bijective 1); |
|
737 |
by (REPEAT_FIRST (eresolve_tac [snd_type, SigmaE, succE, emptyE, |
|
1461 | 738 |
well_ord_Memrel, ordertype_Memrel])); |
4091 | 739 |
by (ALLGOALS (asm_simp_tac (simpset() addsimps [rmult_iff, Memrel_iff]))); |
849 | 740 |
qed "omult_1"; |
741 |
||
5137 | 742 |
Goalw [omult_def] "Ord(i) ==> 1**i = i"; |
849 | 743 |
by (resolve_tac [ord_isoI RS ordertype_eq RS trans] 1); |
744 |
by (res_inst_tac [("c", "fst"), ("d", "%z.<z,0>")] lam_bijective 1); |
|
745 |
by (REPEAT_FIRST (eresolve_tac [fst_type, SigmaE, succE, emptyE, |
|
1461 | 746 |
well_ord_Memrel, ordertype_Memrel])); |
4091 | 747 |
by (ALLGOALS (asm_simp_tac (simpset() addsimps [rmult_iff, Memrel_iff]))); |
849 | 748 |
qed "omult_1_left"; |
749 |
||
2469 | 750 |
Addsimps [omult_1, omult_1_left]; |
751 |
||
849 | 752 |
(** Distributive law for ordinal multiplication and addition **) |
753 |
||
5067 | 754 |
Goalw [omult_def, oadd_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
755 |
"[| Ord(i); Ord(j); Ord(k) |] ==> i**(j++k) = (i**j)++(i**k)"; |
849 | 756 |
by (resolve_tac [ordertype_eq RS trans] 1); |
757 |
by (rtac ([ordertype_ord_iso RS ord_iso_sym, ord_iso_refl] MRS |
|
1461 | 758 |
prod_ord_iso_cong) 1); |
849 | 759 |
by (REPEAT (ares_tac [well_ord_rmult, well_ord_radd, well_ord_Memrel, |
1461 | 760 |
Ord_ordertype] 1)); |
849 | 761 |
by (rtac (sum_prod_distrib_ord_iso RS ordertype_eq RS trans) 1); |
762 |
by (rtac ordertype_eq 2); |
|
763 |
by (rtac ([ordertype_ord_iso, ordertype_ord_iso] MRS sum_ord_iso_cong) 2); |
|
764 |
by (REPEAT (ares_tac [well_ord_rmult, well_ord_radd, well_ord_Memrel, |
|
1461 | 765 |
Ord_ordertype] 1)); |
849 | 766 |
qed "oadd_omult_distrib"; |
767 |
||
5137 | 768 |
Goal "[| Ord(i); Ord(j) |] ==> i**succ(j) = (i**j)++i"; |
2493 | 769 |
(*ZF_ss prevents looping*) |
2469 | 770 |
by (asm_simp_tac (ZF_ss addsimps [oadd_1 RS sym]) 1); |
849 | 771 |
by (asm_simp_tac |
4091 | 772 |
(simpset() addsimps [omult_1, oadd_omult_distrib, Ord_1]) 1); |
849 | 773 |
qed "omult_succ"; |
774 |
||
775 |
(** Associative law **) |
|
776 |
||
5067 | 777 |
Goalw [omult_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
778 |
"[| Ord(i); Ord(j); Ord(k) |] ==> (i**j)**k = i**(j**k)"; |
849 | 779 |
by (resolve_tac [ordertype_eq RS trans] 1); |
780 |
by (rtac ([ord_iso_refl, ordertype_ord_iso RS ord_iso_sym] MRS |
|
1461 | 781 |
prod_ord_iso_cong) 1); |
849 | 782 |
by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel] 1)); |
783 |
by (resolve_tac [prod_assoc_ord_iso RS ord_iso_sym RS |
|
1461 | 784 |
ordertype_eq RS trans] 1); |
849 | 785 |
by (rtac ([ordertype_ord_iso, ord_iso_refl] MRS prod_ord_iso_cong RS |
1461 | 786 |
ordertype_eq) 2); |
849 | 787 |
by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel, Ord_ordertype] 1)); |
788 |
qed "omult_assoc"; |
|
789 |
||
790 |
||
791 |
(** Ordinal multiplication with limit ordinals **) |
|
792 |
||
5268 | 793 |
val prems = |
794 |
Goal "[| Ord(i); !!x. x:A ==> Ord(j(x)) |] ==> \ |
|
795 |
\ i ** (UN x:A. j(x)) = (UN x:A. i**j(x))"; |
|
5529 | 796 |
by (asm_simp_tac (simpset() addsimps prems @ [Ord_UN, omult_unfold]) 1); |
2925 | 797 |
by (Blast_tac 1); |
849 | 798 |
qed "omult_UN"; |
467 | 799 |
|
5268 | 800 |
Goal "[| Ord(i); Limit(j) |] ==> i**j = (UN k:j. i**k)"; |
849 | 801 |
by (asm_simp_tac |
4091 | 802 |
(simpset() addsimps [Limit_is_Ord RS Ord_in_Ord, omult_UN RS sym, |
1461 | 803 |
Union_eq_UN RS sym, Limit_Union_eq]) 1); |
849 | 804 |
qed "omult_Limit"; |
805 |
||
806 |
||
807 |
(*** Ordering/monotonicity properties of ordinal multiplication ***) |
|
808 |
||
809 |
(*As a special case we have "[| 0<i; 0<j |] ==> 0 < i**j" *) |
|
5137 | 810 |
Goal "[| k<i; 0<j |] ==> k < i**j"; |
4091 | 811 |
by (safe_tac (claset() addSEs [ltE] addSIs [ltI, Ord_omult])); |
812 |
by (asm_simp_tac (simpset() addsimps [omult_unfold]) 1); |
|
2469 | 813 |
by (REPEAT_FIRST (ares_tac [bexI])); |
814 |
by (Asm_simp_tac 1); |
|
849 | 815 |
qed "lt_omult1"; |
816 |
||
5137 | 817 |
Goal "[| Ord(i); 0<j |] ==> i le i**j"; |
1461 | 818 |
by (rtac all_lt_imp_le 1); |
849 | 819 |
by (REPEAT (ares_tac [Ord_omult, lt_omult1, lt_Ord2] 1)); |
820 |
qed "omult_le_self"; |
|
821 |
||
5137 | 822 |
Goal "[| k le j; Ord(i) |] ==> k**i le j**i"; |
849 | 823 |
by (forward_tac [lt_Ord] 1); |
824 |
by (forward_tac [le_Ord2] 1); |
|
1461 | 825 |
by (etac trans_induct3 1); |
4091 | 826 |
by (asm_simp_tac (simpset() addsimps [le_refl, Ord_0]) 1); |
827 |
by (asm_simp_tac (simpset() addsimps [omult_succ, oadd_le_mono]) 1); |
|
828 |
by (asm_simp_tac (simpset() addsimps [omult_Limit]) 1); |
|
1461 | 829 |
by (rtac le_implies_UN_le_UN 1); |
2925 | 830 |
by (Blast_tac 1); |
849 | 831 |
qed "omult_le_mono1"; |
832 |
||
5137 | 833 |
Goal "[| k<j; 0<i |] ==> i**k < i**j"; |
1461 | 834 |
by (rtac ltI 1); |
4091 | 835 |
by (asm_simp_tac (simpset() addsimps [omult_unfold, lt_Ord2]) 1); |
836 |
by (safe_tac (claset() addSEs [ltE] addSIs [Ord_omult])); |
|
2469 | 837 |
by (REPEAT_FIRST (ares_tac [bexI])); |
4091 | 838 |
by (asm_simp_tac (simpset() addsimps [Ord_omult]) 1); |
849 | 839 |
qed "omult_lt_mono2"; |
840 |
||
5137 | 841 |
Goal "[| k le j; Ord(i) |] ==> i**k le i**j"; |
1461 | 842 |
by (rtac subset_imp_le 1); |
4091 | 843 |
by (safe_tac (claset() addSEs [ltE, make_elim Ord_succD] addSIs [Ord_omult])); |
844 |
by (asm_full_simp_tac (simpset() addsimps [omult_unfold]) 1); |
|
845 |
by (deepen_tac (claset() addEs [Ord_trans]) 0 1); |
|
849 | 846 |
qed "omult_le_mono2"; |
847 |
||
5137 | 848 |
Goal "[| i' le i; j' le j |] ==> i'**j' le i**j"; |
1461 | 849 |
by (rtac le_trans 1); |
849 | 850 |
by (REPEAT (eresolve_tac [asm_rl, omult_le_mono1, omult_le_mono2, ltE, |
1461 | 851 |
Ord_succD] 1)); |
849 | 852 |
qed "omult_le_mono"; |
853 |
||
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
854 |
Goal "[| i' le i; j'<j; 0<i |] ==> i'**j' < i**j"; |
1461 | 855 |
by (rtac lt_trans1 1); |
849 | 856 |
by (REPEAT (eresolve_tac [asm_rl, omult_le_mono1, omult_lt_mono2, ltE, |
1461 | 857 |
Ord_succD] 1)); |
849 | 858 |
qed "omult_lt_mono"; |
859 |
||
5137 | 860 |
Goal "[| Ord(i); 0<j |] ==> i le j**i"; |
849 | 861 |
by (forward_tac [lt_Ord2] 1); |
862 |
by (eres_inst_tac [("i","i")] trans_induct3 1); |
|
4091 | 863 |
by (asm_simp_tac (simpset() addsimps [omult_0, Ord_0 RS le_refl]) 1); |
864 |
by (asm_simp_tac (simpset() addsimps [omult_succ, succ_le_iff]) 1); |
|
1461 | 865 |
by (etac lt_trans1 1); |
849 | 866 |
by (res_inst_tac [("b", "j**x")] (oadd_0 RS subst) 1 THEN |
867 |
rtac oadd_lt_mono2 2); |
|
868 |
by (REPEAT (ares_tac [Ord_omult] 1)); |
|
4091 | 869 |
by (asm_simp_tac (simpset() addsimps [omult_Limit]) 1); |
1461 | 870 |
by (rtac le_trans 1); |
871 |
by (rtac le_implies_UN_le_UN 2); |
|
2925 | 872 |
by (Blast_tac 2); |
4091 | 873 |
by (asm_simp_tac (simpset() addsimps [Union_eq_UN RS sym, Limit_Union_eq, |
2493 | 874 |
Limit_is_Ord RS le_refl]) 1); |
849 | 875 |
qed "omult_le_self2"; |
876 |
||
877 |
||
878 |
(** Further properties of ordinal multiplication **) |
|
879 |
||
5137 | 880 |
Goal "[| i**j = i**k; 0<i; Ord(j); Ord(k) |] ==> j=k"; |
849 | 881 |
by (rtac Ord_linear_lt 1); |
882 |
by (REPEAT_SOME assume_tac); |
|
883 |
by (ALLGOALS |
|
4091 | 884 |
(best_tac (claset() addDs [omult_lt_mono2] |
885 |
addss (simpset() addsimps [lt_not_refl])))); |
|
849 | 886 |
qed "omult_inject"; |
887 |
||
888 |