author | wenzelm |
Thu, 28 Sep 2000 19:07:09 +0200 | |
changeset 10111 | 78a0397eaec1 |
parent 8201 | a81d18b0a9b1 |
child 12152 | 46f128d8133c |
permissions | -rw-r--r-- |
1461 | 1 |
(* Title: ZF/Order.ML |
435 | 2 |
ID: $Id$ |
1461 | 3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
435 | 4 |
Copyright 1994 University of Cambridge |
5 |
||
789 | 6 |
Orders in Zermelo-Fraenkel Set Theory |
7 |
||
8 |
Results from the book "Set Theory: an Introduction to Independence Proofs" |
|
1461 | 9 |
by Ken Kunen. Chapter 1, section 6. |
435 | 10 |
*) |
11 |
||
12 |
(** Basic properties of the definitions **) |
|
13 |
||
789 | 14 |
(*needed?*) |
5067 | 15 |
Goalw [part_ord_def, irrefl_def, trans_on_def, asym_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
16 |
"part_ord(A,r) ==> asym(r Int A*A)"; |
2925 | 17 |
by (Blast_tac 1); |
760 | 18 |
qed "part_ord_Imp_asym"; |
435 | 19 |
|
5268 | 20 |
val major::premx::premy::prems = Goalw [linear_def] |
789 | 21 |
"[| linear(A,r); x:A; y:A; \ |
22 |
\ <x,y>:r ==> P; x=y ==> P; <y,x>:r ==> P |] ==> P"; |
|
23 |
by (cut_facts_tac [major,premx,premy] 1); |
|
24 |
by (REPEAT_FIRST (eresolve_tac [ballE,disjE])); |
|
25 |
by (EVERY1 (map etac prems)); |
|
26 |
by (ALLGOALS contr_tac); |
|
27 |
qed "linearE"; |
|
28 |
||
29 |
(*Does the case analysis, deleting linear(A,r) and proving trivial subgoals*) |
|
30 |
val linear_case_tac = |
|
31 |
SELECT_GOAL (EVERY [etac linearE 1, assume_tac 1, assume_tac 1, |
|
1461 | 32 |
REPEAT_SOME (assume_tac ORELSE' contr_tac)]); |
789 | 33 |
|
34 |
(** General properties of well_ord **) |
|
35 |
||
5067 | 36 |
Goalw [irrefl_def, part_ord_def, tot_ord_def, |
1461 | 37 |
trans_on_def, well_ord_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
38 |
"[| wf[A](r); linear(A,r) |] ==> well_ord(A,r)"; |
4091 | 39 |
by (asm_simp_tac (simpset() addsimps [wf_on_not_refl]) 1); |
40 |
by (fast_tac (claset() addEs [linearE, wf_on_asym, wf_on_chain3]) 1); |
|
789 | 41 |
qed "well_ordI"; |
42 |
||
5067 | 43 |
Goalw [well_ord_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
44 |
"well_ord(A,r) ==> wf[A](r)"; |
4152 | 45 |
by Safe_tac; |
789 | 46 |
qed "well_ord_is_wf"; |
47 |
||
5067 | 48 |
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
|
49 |
"well_ord(A,r) ==> trans[A](r)"; |
4152 | 50 |
by Safe_tac; |
789 | 51 |
qed "well_ord_is_trans_on"; |
484 | 52 |
|
5067 | 53 |
Goalw [well_ord_def, tot_ord_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
54 |
"well_ord(A,r) ==> linear(A,r)"; |
2925 | 55 |
by (Blast_tac 1); |
789 | 56 |
qed "well_ord_is_linear"; |
57 |
||
58 |
||
59 |
(** Derived rules for pred(A,x,r) **) |
|
60 |
||
5067 | 61 |
Goalw [pred_def] "y : pred(A,x,r) <-> <y,x>:r & y:A"; |
2925 | 62 |
by (Blast_tac 1); |
789 | 63 |
qed "pred_iff"; |
64 |
||
65 |
bind_thm ("predI", conjI RS (pred_iff RS iffD2)); |
|
66 |
||
5268 | 67 |
val [major,minor] = Goalw [pred_def] |
789 | 68 |
"[| y: pred(A,x,r); [| y:A; <y,x>:r |] ==> P |] ==> P"; |
69 |
by (rtac (major RS CollectE) 1); |
|
70 |
by (REPEAT (ares_tac [minor] 1)); |
|
71 |
qed "predE"; |
|
72 |
||
5067 | 73 |
Goalw [pred_def] "pred(A,x,r) <= r -`` {x}"; |
2925 | 74 |
by (Blast_tac 1); |
789 | 75 |
qed "pred_subset_under"; |
76 |
||
5067 | 77 |
Goalw [pred_def] "pred(A,x,r) <= A"; |
2925 | 78 |
by (Blast_tac 1); |
789 | 79 |
qed "pred_subset"; |
80 |
||
5067 | 81 |
Goalw [pred_def] |
789 | 82 |
"pred(pred(A,x,r), y, r) = pred(A,x,r) Int pred(A,y,r)"; |
2925 | 83 |
by (Blast_tac 1); |
789 | 84 |
qed "pred_pred_eq"; |
85 |
||
5067 | 86 |
Goalw [trans_on_def, pred_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
87 |
"[| trans[A](r); <y,x>:r; x:A; y:A \ |
789 | 88 |
\ |] ==> pred(pred(A,x,r), y, r) = pred(A,y,r)"; |
2925 | 89 |
by (Blast_tac 1); |
789 | 90 |
qed "trans_pred_pred_eq"; |
91 |
||
836
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
92 |
|
789 | 93 |
(** The ordering's properties hold over all subsets of its domain |
94 |
[including initial segments of the form pred(A,x,r) **) |
|
484 | 95 |
|
96 |
(*Note: a relation s such that s<=r need not be a partial ordering*) |
|
5067 | 97 |
Goalw [part_ord_def, irrefl_def, trans_on_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
98 |
"[| part_ord(A,r); B<=A |] ==> part_ord(B,r)"; |
2925 | 99 |
by (Blast_tac 1); |
760 | 100 |
qed "part_ord_subset"; |
484 | 101 |
|
5067 | 102 |
Goalw [linear_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
103 |
"[| linear(A,r); B<=A |] ==> linear(B,r)"; |
2925 | 104 |
by (Blast_tac 1); |
760 | 105 |
qed "linear_subset"; |
484 | 106 |
|
5067 | 107 |
Goalw [tot_ord_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
108 |
"[| tot_ord(A,r); B<=A |] ==> tot_ord(B,r)"; |
4091 | 109 |
by (fast_tac (claset() addSEs [part_ord_subset, linear_subset]) 1); |
760 | 110 |
qed "tot_ord_subset"; |
484 | 111 |
|
5067 | 112 |
Goalw [well_ord_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
113 |
"[| well_ord(A,r); B<=A |] ==> well_ord(B,r)"; |
4091 | 114 |
by (fast_tac (claset() addSEs [tot_ord_subset, wf_on_subset_A]) 1); |
760 | 115 |
qed "well_ord_subset"; |
484 | 116 |
|
117 |
||
836
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
118 |
(** Relations restricted to a smaller domain, by Krzysztof Grabczewski **) |
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
119 |
|
5067 | 120 |
Goalw [irrefl_def] "irrefl(A,r Int A*A) <-> irrefl(A,r)"; |
2925 | 121 |
by (Blast_tac 1); |
836
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
122 |
qed "irrefl_Int_iff"; |
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
123 |
|
5067 | 124 |
Goalw [trans_on_def] "trans[A](r Int A*A) <-> trans[A](r)"; |
2925 | 125 |
by (Blast_tac 1); |
836
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
126 |
qed "trans_on_Int_iff"; |
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
127 |
|
5067 | 128 |
Goalw [part_ord_def] "part_ord(A,r Int A*A) <-> part_ord(A,r)"; |
4091 | 129 |
by (simp_tac (simpset() addsimps [irrefl_Int_iff, trans_on_Int_iff]) 1); |
836
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
130 |
qed "part_ord_Int_iff"; |
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
131 |
|
5067 | 132 |
Goalw [linear_def] "linear(A,r Int A*A) <-> linear(A,r)"; |
2925 | 133 |
by (Blast_tac 1); |
836
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
134 |
qed "linear_Int_iff"; |
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
135 |
|
5067 | 136 |
Goalw [tot_ord_def] "tot_ord(A,r Int A*A) <-> tot_ord(A,r)"; |
4091 | 137 |
by (simp_tac (simpset() addsimps [part_ord_Int_iff, linear_Int_iff]) 1); |
836
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
138 |
qed "tot_ord_Int_iff"; |
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
139 |
|
5067 | 140 |
Goalw [wf_on_def, wf_def] "wf[A](r Int A*A) <-> wf[A](r)"; |
4311
e220fb9bd4e5
Deleted some needless addSIs; got rid of a slow Blast_tac
paulson
parents:
4152
diff
changeset
|
141 |
by (Fast_tac 1); (*10 times faster than Blast_tac!*) |
836
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
142 |
qed "wf_on_Int_iff"; |
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
143 |
|
5067 | 144 |
Goalw [well_ord_def] "well_ord(A,r Int A*A) <-> well_ord(A,r)"; |
4091 | 145 |
by (simp_tac (simpset() addsimps [tot_ord_Int_iff, wf_on_Int_iff]) 1); |
836
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
146 |
qed "well_ord_Int_iff"; |
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
147 |
|
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
148 |
|
848 | 149 |
(** Relations over the Empty Set **) |
150 |
||
5067 | 151 |
Goalw [irrefl_def] "irrefl(0,r)"; |
2925 | 152 |
by (Blast_tac 1); |
848 | 153 |
qed "irrefl_0"; |
154 |
||
5067 | 155 |
Goalw [trans_on_def] "trans[0](r)"; |
2925 | 156 |
by (Blast_tac 1); |
848 | 157 |
qed "trans_on_0"; |
158 |
||
5067 | 159 |
Goalw [part_ord_def] "part_ord(0,r)"; |
4091 | 160 |
by (simp_tac (simpset() addsimps [irrefl_0, trans_on_0]) 1); |
848 | 161 |
qed "part_ord_0"; |
162 |
||
5067 | 163 |
Goalw [linear_def] "linear(0,r)"; |
2925 | 164 |
by (Blast_tac 1); |
848 | 165 |
qed "linear_0"; |
166 |
||
5067 | 167 |
Goalw [tot_ord_def] "tot_ord(0,r)"; |
4091 | 168 |
by (simp_tac (simpset() addsimps [part_ord_0, linear_0]) 1); |
848 | 169 |
qed "tot_ord_0"; |
170 |
||
5067 | 171 |
Goalw [wf_on_def, wf_def] "wf[0](r)"; |
2925 | 172 |
by (Blast_tac 1); |
848 | 173 |
qed "wf_on_0"; |
174 |
||
5067 | 175 |
Goalw [well_ord_def] "well_ord(0,r)"; |
4091 | 176 |
by (simp_tac (simpset() addsimps [tot_ord_0, wf_on_0]) 1); |
848 | 177 |
qed "well_ord_0"; |
836
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
178 |
|
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
179 |
|
5262 | 180 |
(** The unit set is well-ordered by the empty relation (Grabczewski) **) |
181 |
||
182 |
Goalw [irrefl_def, trans_on_def, part_ord_def, linear_def, tot_ord_def] |
|
183 |
"tot_ord({a},0)"; |
|
184 |
by (Simp_tac 1); |
|
185 |
qed "tot_ord_unit"; |
|
186 |
||
187 |
Goalw [wf_on_def, wf_def] "wf[{a}](0)"; |
|
188 |
by (Fast_tac 1); |
|
189 |
qed "wf_on_unit"; |
|
190 |
||
191 |
Goalw [well_ord_def] "well_ord({a},0)"; |
|
192 |
by (simp_tac (simpset() addsimps [tot_ord_unit, wf_on_unit]) 1); |
|
193 |
qed "well_ord_unit"; |
|
194 |
||
195 |
||
789 | 196 |
(** Order-preserving (monotone) maps **) |
197 |
||
5067 | 198 |
Goalw [mono_map_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
199 |
"f: mono_map(A,r,B,s) ==> f: A->B"; |
789 | 200 |
by (etac CollectD1 1); |
201 |
qed "mono_map_is_fun"; |
|
202 |
||
5067 | 203 |
Goalw [mono_map_def, inj_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
204 |
"[| linear(A,r); wf[B](s); f: mono_map(A,r,B,s) |] ==> f: inj(A,B)"; |
3736
39ee3d31cfbc
Much tidying including step_tac -> clarify_tac or safe_tac; sometimes
paulson
parents:
3207
diff
changeset
|
205 |
by (Clarify_tac 1); |
789 | 206 |
by (linear_case_tac 1); |
207 |
by (REPEAT |
|
208 |
(EVERY [eresolve_tac [wf_on_not_refl RS notE] 1, |
|
1461 | 209 |
etac ssubst 2, |
2469 | 210 |
Fast_tac 2, |
1461 | 211 |
REPEAT (ares_tac [apply_type] 1)])); |
789 | 212 |
qed "mono_map_is_inj"; |
213 |
||
214 |
||
215 |
(** Order-isomorphisms -- or similarities, as Suppes calls them **) |
|
216 |
||
5268 | 217 |
val prems = Goalw [ord_iso_def] |
1461 | 218 |
"[| f: bij(A, B); \ |
219 |
\ !!x y. [| x:A; y:A |] ==> <x, y> : r <-> <f`x, f`y> : s \ |
|
848 | 220 |
\ |] ==> f: ord_iso(A,r,B,s)"; |
4091 | 221 |
by (blast_tac (claset() addSIs prems) 1); |
848 | 222 |
qed "ord_isoI"; |
223 |
||
5067 | 224 |
Goalw [ord_iso_def, mono_map_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
225 |
"f: ord_iso(A,r,B,s) ==> f: mono_map(A,r,B,s)"; |
4091 | 226 |
by (blast_tac (claset() addSDs [bij_is_fun]) 1); |
789 | 227 |
qed "ord_iso_is_mono_map"; |
435 | 228 |
|
5067 | 229 |
Goalw [ord_iso_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
230 |
"f: ord_iso(A,r,B,s) ==> f: bij(A,B)"; |
435 | 231 |
by (etac CollectD1 1); |
760 | 232 |
qed "ord_iso_is_bij"; |
435 | 233 |
|
789 | 234 |
(*Needed? But ord_iso_converse is!*) |
5067 | 235 |
Goalw [ord_iso_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
236 |
"[| f: ord_iso(A,r,B,s); <x,y>: r; x:A; y:A |] ==> \ |
435 | 237 |
\ <f`x, f`y> : s"; |
2925 | 238 |
by (Blast_tac 1); |
760 | 239 |
qed "ord_iso_apply"; |
435 | 240 |
|
6176
707b6f9859d2
tidied, with left_inverse & right_inverse as default simprules
paulson
parents:
6153
diff
changeset
|
241 |
(*Rewriting with bijections and converse (function inverse)*) |
707b6f9859d2
tidied, with left_inverse & right_inverse as default simprules
paulson
parents:
6153
diff
changeset
|
242 |
val bij_inverse_ss = |
7570 | 243 |
simpset() setSolver (mk_solver "" |
244 |
(type_solver_tac (tcset() addTCs [ord_iso_is_bij, bij_is_inj, |
|
245 |
inj_is_fun, comp_fun, comp_bij]))) |
|
6176
707b6f9859d2
tidied, with left_inverse & right_inverse as default simprules
paulson
parents:
6153
diff
changeset
|
246 |
addsimps [right_inverse_bij]; |
707b6f9859d2
tidied, with left_inverse & right_inverse as default simprules
paulson
parents:
6153
diff
changeset
|
247 |
|
5067 | 248 |
Goalw [ord_iso_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
249 |
"[| f: ord_iso(A,r,B,s); <x,y>: s; x:B; y:B |] ==> \ |
435 | 250 |
\ <converse(f) ` x, converse(f) ` y> : r"; |
437 | 251 |
by (etac CollectE 1); |
252 |
by (etac (bspec RS bspec RS iffD2) 1); |
|
435 | 253 |
by (REPEAT (eresolve_tac [asm_rl, |
1461 | 254 |
bij_converse_bij RS bij_is_fun RS apply_type] 1)); |
6176
707b6f9859d2
tidied, with left_inverse & right_inverse as default simprules
paulson
parents:
6153
diff
changeset
|
255 |
by (asm_simp_tac bij_inverse_ss 1); |
760 | 256 |
qed "ord_iso_converse"; |
435 | 257 |
|
812
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
258 |
|
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
259 |
(** Symmetry and Transitivity Rules **) |
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
260 |
|
848 | 261 |
(*Reflexivity of similarity*) |
5067 | 262 |
Goal "id(A): ord_iso(A,r,A,r)"; |
848 | 263 |
by (resolve_tac [id_bij RS ord_isoI] 1); |
2469 | 264 |
by (Asm_simp_tac 1); |
848 | 265 |
qed "ord_iso_refl"; |
266 |
||
267 |
(*Symmetry of similarity*) |
|
6153 | 268 |
Goalw [ord_iso_def] "f: ord_iso(A,r,B,s) ==> converse(f): ord_iso(B,s,A,r)"; |
269 |
by (force_tac (claset(), bij_inverse_ss) 1); |
|
782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
769
diff
changeset
|
270 |
qed "ord_iso_sym"; |
769 | 271 |
|
848 | 272 |
(*Transitivity of similarity*) |
5067 | 273 |
Goalw [mono_map_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
274 |
"[| g: mono_map(A,r,B,s); f: mono_map(B,s,C,t) |] ==> \ |
812
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
275 |
\ (f O g): mono_map(A,r,C,t)"; |
6153 | 276 |
by (force_tac (claset(), bij_inverse_ss) 1); |
812
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
277 |
qed "mono_map_trans"; |
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
278 |
|
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
279 |
(*Transitivity of similarity: the order-isomorphism relation*) |
5067 | 280 |
Goalw [ord_iso_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
281 |
"[| g: ord_iso(A,r,B,s); f: ord_iso(B,s,C,t) |] ==> \ |
789 | 282 |
\ (f O g): ord_iso(A,r,C,t)"; |
6153 | 283 |
by (force_tac (claset(), bij_inverse_ss) 1); |
789 | 284 |
qed "ord_iso_trans"; |
285 |
||
286 |
(** Two monotone maps can make an order-isomorphism **) |
|
287 |
||
5067 | 288 |
Goalw [ord_iso_def, mono_map_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
289 |
"[| f: mono_map(A,r,B,s); g: mono_map(B,s,A,r); \ |
789 | 290 |
\ f O g = id(B); g O f = id(A) |] ==> f: ord_iso(A,r,B,s)"; |
4152 | 291 |
by Safe_tac; |
789 | 292 |
by (REPEAT_FIRST (ares_tac [fg_imp_bijective])); |
2925 | 293 |
by (Blast_tac 1); |
789 | 294 |
by (subgoal_tac "<g`(f`x), g`(f`y)> : r" 1); |
4091 | 295 |
by (blast_tac (claset() addIs [apply_funtype]) 2); |
296 |
by (asm_full_simp_tac (simpset() addsimps [comp_eq_id_iff RS iffD1]) 1); |
|
789 | 297 |
qed "mono_ord_isoI"; |
298 |
||
5268 | 299 |
Goal "[| well_ord(A,r); well_ord(B,s); \ |
1461 | 300 |
\ f: mono_map(A,r,B,s); converse(f): mono_map(B,s,A,r) \ |
789 | 301 |
\ |] ==> f: ord_iso(A,r,B,s)"; |
302 |
by (REPEAT (ares_tac [mono_ord_isoI] 1)); |
|
303 |
by (forward_tac [mono_map_is_fun RS fun_is_rel] 1); |
|
304 |
by (etac (converse_converse RS subst) 1 THEN rtac left_comp_inverse 1); |
|
305 |
by (DEPTH_SOLVE (ares_tac [mono_map_is_inj, left_comp_inverse] 1 |
|
306 |
ORELSE eresolve_tac [well_ord_is_linear, well_ord_is_wf] 1)); |
|
307 |
qed "well_ord_mono_ord_isoI"; |
|
308 |
||
309 |
||
310 |
(** Order-isomorphisms preserve the ordering's properties **) |
|
311 |
||
5067 | 312 |
Goalw [part_ord_def, irrefl_def, trans_on_def, ord_iso_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
313 |
"[| part_ord(B,s); f: ord_iso(A,r,B,s) |] ==> part_ord(A,r)"; |
2469 | 314 |
by (Asm_simp_tac 1); |
4091 | 315 |
by (fast_tac (claset() addIs [bij_is_fun RS apply_type]) 1); |
789 | 316 |
qed "part_ord_ord_iso"; |
435 | 317 |
|
5067 | 318 |
Goalw [linear_def, ord_iso_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
319 |
"[| linear(B,s); f: ord_iso(A,r,B,s) |] ==> linear(A,r)"; |
2469 | 320 |
by (Asm_simp_tac 1); |
4152 | 321 |
by Safe_tac; |
789 | 322 |
by (dres_inst_tac [("x1", "f`x"), ("x", "f`xa")] (bspec RS bspec) 1); |
4091 | 323 |
by (safe_tac (claset() addSEs [bij_is_fun RS apply_type])); |
789 | 324 |
by (dres_inst_tac [("t", "op `(converse(f))")] subst_context 1); |
6176
707b6f9859d2
tidied, with left_inverse & right_inverse as default simprules
paulson
parents:
6153
diff
changeset
|
325 |
by (asm_full_simp_tac bij_inverse_ss 1); |
789 | 326 |
qed "linear_ord_iso"; |
327 |
||
5067 | 328 |
Goalw [wf_on_def, wf_def, ord_iso_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
329 |
"[| wf[B](s); f: ord_iso(A,r,B,s) |] ==> wf[A](r)"; |
789 | 330 |
(*reversed &-congruence rule handles context of membership in A*) |
4091 | 331 |
by (asm_full_simp_tac (simpset() addcongs [conj_cong2]) 1); |
4152 | 332 |
by Safe_tac; |
789 | 333 |
by (dres_inst_tac [("x", "{f`z. z:Z Int A}")] spec 1); |
4091 | 334 |
by (safe_tac (claset() addSIs [equalityI])); |
2925 | 335 |
by (ALLGOALS (blast_tac |
4091 | 336 |
(claset() addSDs [equalityD1] addIs [bij_is_fun RS apply_type]))); |
789 | 337 |
qed "wf_on_ord_iso"; |
338 |
||
5067 | 339 |
Goalw [well_ord_def, tot_ord_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
340 |
"[| well_ord(B,s); f: ord_iso(A,r,B,s) |] ==> well_ord(A,r)"; |
789 | 341 |
by (fast_tac |
4091 | 342 |
(claset() addSEs [part_ord_ord_iso, linear_ord_iso, wf_on_ord_iso]) 1); |
789 | 343 |
qed "well_ord_ord_iso"; |
344 |
||
345 |
||
346 |
(*** Main results of Kunen, Chapter 1 section 6 ***) |
|
435 | 347 |
|
812
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
348 |
(*Inductive argument for Kunen's Lemma 6.1, etc. |
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
349 |
Simple proof from Halmos, page 72*) |
5067 | 350 |
Goalw [well_ord_def, ord_iso_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
351 |
"[| well_ord(A,r); f: ord_iso(A,r, A',r); A'<= A; y: A |] \ |
812
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
352 |
\ ==> ~ <f`y, y>: r"; |
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
353 |
by (REPEAT (eresolve_tac [conjE, CollectE] 1)); |
435 | 354 |
by (wf_on_ind_tac "y" [] 1); |
812
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
355 |
by (dres_inst_tac [("a","y1")] (bij_is_fun RS apply_type) 1); |
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
356 |
by (assume_tac 1); |
2925 | 357 |
by (Blast_tac 1); |
812
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
358 |
qed "well_ord_iso_subset_lemma"; |
435 | 359 |
|
360 |
(*Kunen's Lemma 6.1: there's no order-isomorphism to an initial segment |
|
361 |
of a well-ordering*) |
|
5268 | 362 |
Goal "[| well_ord(A,r); f : ord_iso(A, r, pred(A,x,r), r); x:A |] ==> P"; |
812
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
363 |
by (metacut_tac well_ord_iso_subset_lemma 1); |
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
364 |
by (REPEAT_FIRST (ares_tac [pred_subset])); |
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
365 |
(*Now we know f`x < x *) |
435 | 366 |
by (EVERY1 [dtac (ord_iso_is_bij RS bij_is_fun RS apply_type), |
1461 | 367 |
assume_tac]); |
812
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
368 |
(*Now we also know f`x : pred(A,x,r); contradiction! *) |
4091 | 369 |
by (asm_full_simp_tac (simpset() addsimps [well_ord_def, pred_def]) 1); |
789 | 370 |
qed "well_ord_iso_predE"; |
371 |
||
372 |
(*Simple consequence of Lemma 6.1*) |
|
5268 | 373 |
Goal "[| well_ord(A,r); f : ord_iso(pred(A,a,r), r, pred(A,c,r), r); \ |
6153 | 374 |
\ a:A; c:A |] ==> a=c"; |
7499 | 375 |
by (ftac well_ord_is_trans_on 1); |
376 |
by (ftac well_ord_is_linear 1); |
|
789 | 377 |
by (linear_case_tac 1); |
378 |
by (dtac ord_iso_sym 1); |
|
6153 | 379 |
(*two symmetric cases*) |
380 |
by (auto_tac (claset() addSEs [pred_subset RSN (2, well_ord_subset) RS |
|
381 |
well_ord_iso_predE] |
|
382 |
addSIs [predI], |
|
383 |
simpset() addsimps [trans_pred_pred_eq])); |
|
789 | 384 |
qed "well_ord_iso_pred_eq"; |
385 |
||
386 |
(*Does not assume r is a wellordering!*) |
|
5067 | 387 |
Goalw [ord_iso_def, pred_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
388 |
"[| f : ord_iso(A,r,B,s); a:A |] ==> \ |
789 | 389 |
\ f `` pred(A,a,r) = pred(B, f`a, s)"; |
390 |
by (etac CollectE 1); |
|
391 |
by (asm_simp_tac |
|
4091 | 392 |
(simpset() addsimps [[bij_is_fun, Collect_subset] MRS image_fun]) 1); |
2493 | 393 |
by (rtac equalityI 1); |
4091 | 394 |
by (safe_tac (claset() addSEs [bij_is_fun RS apply_type])); |
1461 | 395 |
by (rtac RepFun_eqI 1); |
4091 | 396 |
by (blast_tac (claset() addSIs [right_inverse_bij RS sym]) 1); |
812
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
397 |
by (asm_simp_tac bij_inverse_ss 1); |
789 | 398 |
qed "ord_iso_image_pred"; |
435 | 399 |
|
789 | 400 |
(*But in use, A and B may themselves be initial segments. Then use |
401 |
trans_pred_pred_eq to simplify the pred(pred...) terms. See just below.*) |
|
5268 | 402 |
Goal "[| f : ord_iso(A,r,B,s); a:A |] ==> \ |
789 | 403 |
\ restrict(f, pred(A,a,r)) : ord_iso(pred(A,a,r), r, pred(B, f`a, s), s)"; |
4091 | 404 |
by (asm_simp_tac (simpset() addsimps [ord_iso_image_pred RS sym]) 1); |
1461 | 405 |
by (rewtac ord_iso_def); |
848 | 406 |
by (etac CollectE 1); |
407 |
by (rtac CollectI 1); |
|
4091 | 408 |
by (asm_full_simp_tac (simpset() addsimps [pred_def]) 2); |
789 | 409 |
by (eresolve_tac [[bij_is_inj, pred_subset] MRS restrict_bij] 1); |
410 |
qed "ord_iso_restrict_pred"; |
|
411 |
||
412 |
(*Tricky; a lot of forward proof!*) |
|
5268 | 413 |
Goal "[| well_ord(A,r); well_ord(B,s); <a,c>: r; \ |
1461 | 414 |
\ f : ord_iso(pred(A,a,r), r, pred(B,b,s), s); \ |
415 |
\ g : ord_iso(pred(A,c,r), r, pred(B,d,s), s); \ |
|
789 | 416 |
\ a:A; c:A; b:B; d:B |] ==> <b,d>: s"; |
417 |
by (forward_tac [ord_iso_is_bij RS bij_is_fun RS apply_type] 1 THEN |
|
418 |
REPEAT1 (eresolve_tac [asm_rl, predI, predE] 1)); |
|
419 |
by (subgoal_tac "b = g`a" 1); |
|
2469 | 420 |
by (Asm_simp_tac 1); |
1461 | 421 |
by (rtac well_ord_iso_pred_eq 1); |
789 | 422 |
by (REPEAT_SOME assume_tac); |
7499 | 423 |
by (ftac ord_iso_restrict_pred 1 THEN |
789 | 424 |
REPEAT1 (eresolve_tac [asm_rl, predI] 1)); |
425 |
by (asm_full_simp_tac |
|
4091 | 426 |
(simpset() addsimps [well_ord_is_trans_on, trans_pred_pred_eq]) 1); |
789 | 427 |
by (eresolve_tac [ord_iso_sym RS ord_iso_trans] 1); |
428 |
by (assume_tac 1); |
|
429 |
qed "well_ord_iso_preserving"; |
|
435 | 430 |
|
4091 | 431 |
val bij_apply_cs = claset() addSIs [bij_converse_bij] |
2925 | 432 |
addIs [ord_iso_is_bij, bij_is_fun, apply_funtype]; |
2469 | 433 |
|
812
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
434 |
(*See Halmos, page 72*) |
5268 | 435 |
Goal "[| well_ord(A,r); \ |
435 | 436 |
\ f: ord_iso(A,r, B,s); g: ord_iso(A,r, B,s); y: A |] \ |
812
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
437 |
\ ==> ~ <g`y, f`y> : s"; |
7499 | 438 |
by (ftac well_ord_iso_subset_lemma 1); |
812
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
439 |
by (res_inst_tac [("f","converse(f)"), ("g","g")] ord_iso_trans 1); |
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
440 |
by (REPEAT_FIRST (ares_tac [subset_refl, ord_iso_sym])); |
4152 | 441 |
by Safe_tac; |
7499 | 442 |
by (ftac ord_iso_converse 1); |
2925 | 443 |
by (EVERY (map (blast_tac bij_apply_cs) [1,1,1])); |
435 | 444 |
by (asm_full_simp_tac bij_inverse_ss 1); |
760 | 445 |
qed "well_ord_iso_unique_lemma"; |
435 | 446 |
|
447 |
(*Kunen's Lemma 6.2: Order-isomorphisms between well-orderings are unique*) |
|
5268 | 448 |
Goal "[| well_ord(A,r); \ |
435 | 449 |
\ f: ord_iso(A,r, B,s); g: ord_iso(A,r, B,s) |] ==> f = g"; |
437 | 450 |
by (rtac fun_extension 1); |
812
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
451 |
by (REPEAT (etac (ord_iso_is_bij RS bij_is_fun) 1)); |
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
452 |
by (subgoals_tac ["f`x : B", "g`x : B", "linear(B,s)"] 1); |
2925 | 453 |
by (REPEAT (blast_tac bij_apply_cs 3)); |
812
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
454 |
by (dtac well_ord_ord_iso 2 THEN etac ord_iso_sym 2); |
4091 | 455 |
by (asm_full_simp_tac (simpset() addsimps [tot_ord_def, well_ord_def]) 2); |
812
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
456 |
by (linear_case_tac 1); |
bf4b7c37db2c
Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents:
794
diff
changeset
|
457 |
by (DEPTH_SOLVE (eresolve_tac [asm_rl, well_ord_iso_unique_lemma RS notE] 1)); |
760 | 458 |
qed "well_ord_iso_unique"; |
435 | 459 |
|
460 |
||
789 | 461 |
(** Towards Kunen's Theorem 6.3: linearity of the similarity relation **) |
462 |
||
5067 | 463 |
Goalw [ord_iso_map_def] "ord_iso_map(A,r,B,s) <= A*B"; |
2925 | 464 |
by (Blast_tac 1); |
789 | 465 |
qed "ord_iso_map_subset"; |
466 |
||
5067 | 467 |
Goalw [ord_iso_map_def] "domain(ord_iso_map(A,r,B,s)) <= A"; |
2925 | 468 |
by (Blast_tac 1); |
789 | 469 |
qed "domain_ord_iso_map"; |
470 |
||
5067 | 471 |
Goalw [ord_iso_map_def] "range(ord_iso_map(A,r,B,s)) <= B"; |
2925 | 472 |
by (Blast_tac 1); |
789 | 473 |
qed "range_ord_iso_map"; |
474 |
||
5067 | 475 |
Goalw [ord_iso_map_def] |
789 | 476 |
"converse(ord_iso_map(A,r,B,s)) = ord_iso_map(B,s,A,r)"; |
4091 | 477 |
by (blast_tac (claset() addIs [ord_iso_sym]) 1); |
789 | 478 |
qed "converse_ord_iso_map"; |
479 |
||
5067 | 480 |
Goalw [ord_iso_map_def, function_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
481 |
"well_ord(B,s) ==> function(ord_iso_map(A,r,B,s))"; |
4091 | 482 |
by (blast_tac (claset() addIs [well_ord_iso_pred_eq, |
2925 | 483 |
ord_iso_sym, ord_iso_trans]) 1); |
789 | 484 |
qed "function_ord_iso_map"; |
485 |
||
5268 | 486 |
Goal "well_ord(B,s) ==> ord_iso_map(A,r,B,s) \ |
789 | 487 |
\ : domain(ord_iso_map(A,r,B,s)) -> range(ord_iso_map(A,r,B,s))"; |
488 |
by (asm_simp_tac |
|
4091 | 489 |
(simpset() addsimps [Pi_iff, function_ord_iso_map, |
1461 | 490 |
ord_iso_map_subset RS domain_times_range]) 1); |
789 | 491 |
qed "ord_iso_map_fun"; |
435 | 492 |
|
5067 | 493 |
Goalw [mono_map_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
494 |
"[| well_ord(A,r); well_ord(B,s) |] ==> ord_iso_map(A,r,B,s) \ |
1461 | 495 |
\ : mono_map(domain(ord_iso_map(A,r,B,s)), r, \ |
496 |
\ range(ord_iso_map(A,r,B,s)), s)"; |
|
4091 | 497 |
by (asm_simp_tac (simpset() addsimps [ord_iso_map_fun]) 1); |
4152 | 498 |
by Safe_tac; |
789 | 499 |
by (subgoals_tac ["x:A", "xa:A", "y:B", "ya:B"] 1); |
500 |
by (REPEAT |
|
4091 | 501 |
(blast_tac (claset() addSEs [ord_iso_map_subset RS subsetD RS SigmaE]) 2)); |
2925 | 502 |
by (asm_simp_tac |
4091 | 503 |
(simpset() addsimps [ord_iso_map_fun RSN (2,apply_equality)]) 1); |
1461 | 504 |
by (rewtac ord_iso_map_def); |
5488 | 505 |
by Safe_tac; |
1461 | 506 |
by (rtac well_ord_iso_preserving 1 THEN REPEAT_FIRST assume_tac); |
789 | 507 |
qed "ord_iso_map_mono_map"; |
435 | 508 |
|
5067 | 509 |
Goalw [mono_map_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
510 |
"[| well_ord(A,r); well_ord(B,s) |] ==> ord_iso_map(A,r,B,s) \ |
1461 | 511 |
\ : ord_iso(domain(ord_iso_map(A,r,B,s)), r, \ |
512 |
\ range(ord_iso_map(A,r,B,s)), s)"; |
|
513 |
by (rtac well_ord_mono_ord_isoI 1); |
|
789 | 514 |
by (resolve_tac [converse_ord_iso_map RS subst] 4); |
515 |
by (asm_simp_tac |
|
4091 | 516 |
(simpset() addsimps [ord_iso_map_subset RS converse_converse]) 4); |
789 | 517 |
by (REPEAT (ares_tac [ord_iso_map_mono_map] 3)); |
518 |
by (ALLGOALS (etac well_ord_subset)); |
|
519 |
by (ALLGOALS (resolve_tac [domain_ord_iso_map, range_ord_iso_map])); |
|
520 |
qed "ord_iso_map_ord_iso"; |
|
467 | 521 |
|
789 | 522 |
(*One way of saying that domain(ord_iso_map(A,r,B,s)) is downwards-closed*) |
5067 | 523 |
Goalw [ord_iso_map_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
524 |
"[| well_ord(A,r); well_ord(B,s); \ |
1461 | 525 |
\ a: A; a ~: domain(ord_iso_map(A,r,B,s)) \ |
1015
75110179587d
Changed proof of domain_ord_iso_map_subset for new hyp_subst_tac
lcp
parents:
990
diff
changeset
|
526 |
\ |] ==> domain(ord_iso_map(A,r,B,s)) <= pred(A, a, r)"; |
4091 | 527 |
by (safe_tac (claset() addSIs [predI])); |
1015
75110179587d
Changed proof of domain_ord_iso_map_subset for new hyp_subst_tac
lcp
parents:
990
diff
changeset
|
528 |
(*Case analysis on xaa vs a in r *) |
789 | 529 |
by (forw_inst_tac [("A","A")] well_ord_is_linear 1); |
530 |
by (linear_case_tac 1); |
|
1015
75110179587d
Changed proof of domain_ord_iso_map_subset for new hyp_subst_tac
lcp
parents:
990
diff
changeset
|
531 |
(*Trivial case: a=xa*) |
2925 | 532 |
by (Blast_tac 2); |
1015
75110179587d
Changed proof of domain_ord_iso_map_subset for new hyp_subst_tac
lcp
parents:
990
diff
changeset
|
533 |
(*Harder case: <a, xa>: r*) |
789 | 534 |
by (forward_tac [ord_iso_is_bij RS bij_is_fun RS apply_type] 1 THEN |
535 |
REPEAT1 (eresolve_tac [asm_rl, predI, predE] 1)); |
|
7499 | 536 |
by (ftac ord_iso_restrict_pred 1 THEN |
789 | 537 |
REPEAT1 (eresolve_tac [asm_rl, predI] 1)); |
538 |
by (asm_full_simp_tac |
|
4091 | 539 |
(simpset() addsimps [well_ord_is_trans_on, trans_pred_pred_eq]) 1); |
2925 | 540 |
by (Blast_tac 1); |
789 | 541 |
qed "domain_ord_iso_map_subset"; |
435 | 542 |
|
789 | 543 |
(*For the 4-way case analysis in the main result*) |
5268 | 544 |
Goal "[| well_ord(A,r); well_ord(B,s) |] ==> \ |
1461 | 545 |
\ domain(ord_iso_map(A,r,B,s)) = A | \ |
789 | 546 |
\ (EX x:A. domain(ord_iso_map(A,r,B,s)) = pred(A,x,r))"; |
7499 | 547 |
by (ftac well_ord_is_wf 1); |
789 | 548 |
by (rewrite_goals_tac [wf_on_def, wf_def]); |
549 |
by (dres_inst_tac [("x", "A-domain(ord_iso_map(A,r,B,s))")] spec 1); |
|
3736
39ee3d31cfbc
Much tidying including step_tac -> clarify_tac or safe_tac; sometimes
paulson
parents:
3207
diff
changeset
|
550 |
by Safe_tac; |
789 | 551 |
(*The first case: the domain equals A*) |
552 |
by (rtac (domain_ord_iso_map RS equalityI) 1); |
|
553 |
by (etac (Diff_eq_0_iff RS iffD1) 1); |
|
554 |
(*The other case: the domain equals an initial segment*) |
|
555 |
by (swap_res_tac [bexI] 1); |
|
556 |
by (assume_tac 2); |
|
557 |
by (rtac equalityI 1); |
|
4091 | 558 |
(*not (claset()) below; that would use rules like domainE!*) |
559 |
by (blast_tac (claset() addSEs [predE]) 2); |
|
789 | 560 |
by (REPEAT (ares_tac [domain_ord_iso_map_subset] 1)); |
561 |
qed "domain_ord_iso_map_cases"; |
|
467 | 562 |
|
789 | 563 |
(*As above, by duality*) |
5268 | 564 |
Goal "[| well_ord(A,r); well_ord(B,s) |] ==> \ |
1461 | 565 |
\ range(ord_iso_map(A,r,B,s)) = B | \ |
789 | 566 |
\ (EX y:B. range(ord_iso_map(A,r,B,s))= pred(B,y,s))"; |
567 |
by (resolve_tac [converse_ord_iso_map RS subst] 1); |
|
8201 | 568 |
by (asm_simp_tac (simpset() addsimps [domain_ord_iso_map_cases]) 1); |
789 | 569 |
qed "range_ord_iso_map_cases"; |
570 |
||
571 |
(*Kunen's Theorem 6.3: Fundamental Theorem for Well-Ordered Sets*) |
|
5268 | 572 |
Goal "[| well_ord(A,r); well_ord(B,s) |] ==> \ |
1461 | 573 |
\ ord_iso_map(A,r,B,s) : ord_iso(A, r, B, s) | \ |
789 | 574 |
\ (EX x:A. ord_iso_map(A,r,B,s) : ord_iso(pred(A,x,r), r, B, s)) | \ |
575 |
\ (EX y:B. ord_iso_map(A,r,B,s) : ord_iso(A, r, pred(B,y,s), s))"; |
|
576 |
by (forw_inst_tac [("B","B")] domain_ord_iso_map_cases 1); |
|
577 |
by (forw_inst_tac [("B","B")] range_ord_iso_map_cases 2); |
|
578 |
by (REPEAT_FIRST (eresolve_tac [asm_rl, disjE, bexE])); |
|
1461 | 579 |
by (ALLGOALS (dtac ord_iso_map_ord_iso THEN' assume_tac THEN' |
4091 | 580 |
asm_full_simp_tac (simpset() addsimps [bexI]))); |
789 | 581 |
by (resolve_tac [wf_on_not_refl RS notE] 1); |
1461 | 582 |
by (etac well_ord_is_wf 1); |
789 | 583 |
by (assume_tac 1); |
584 |
by (subgoal_tac "<x,y>: ord_iso_map(A,r,B,s)" 1); |
|
1461 | 585 |
by (dtac rangeI 1); |
4091 | 586 |
by (asm_full_simp_tac (simpset() addsimps [pred_def]) 1); |
1461 | 587 |
by (rewtac ord_iso_map_def); |
2925 | 588 |
by (Blast_tac 1); |
789 | 589 |
qed "well_ord_trichotomy"; |
467 | 590 |
|
836
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
591 |
|
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
592 |
(*** Properties of converse(r), by Krzysztof Grabczewski ***) |
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
593 |
|
5067 | 594 |
Goalw [irrefl_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
595 |
"irrefl(A,r) ==> irrefl(A,converse(r))"; |
4311
e220fb9bd4e5
Deleted some needless addSIs; got rid of a slow Blast_tac
paulson
parents:
4152
diff
changeset
|
596 |
by (Blast_tac 1); |
836
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
597 |
qed "irrefl_converse"; |
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
598 |
|
5067 | 599 |
Goalw [trans_on_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
600 |
"trans[A](r) ==> trans[A](converse(r))"; |
4311
e220fb9bd4e5
Deleted some needless addSIs; got rid of a slow Blast_tac
paulson
parents:
4152
diff
changeset
|
601 |
by (Blast_tac 1); |
836
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
602 |
qed "trans_on_converse"; |
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
603 |
|
5067 | 604 |
Goalw [part_ord_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
605 |
"part_ord(A,r) ==> part_ord(A,converse(r))"; |
4091 | 606 |
by (blast_tac (claset() addSIs [irrefl_converse, trans_on_converse]) 1); |
836
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
607 |
qed "part_ord_converse"; |
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
608 |
|
5067 | 609 |
Goalw [linear_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
610 |
"linear(A,r) ==> linear(A,converse(r))"; |
4311
e220fb9bd4e5
Deleted some needless addSIs; got rid of a slow Blast_tac
paulson
parents:
4152
diff
changeset
|
611 |
by (Blast_tac 1); |
836
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
612 |
qed "linear_converse"; |
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
613 |
|
5067 | 614 |
Goalw [tot_ord_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
615 |
"tot_ord(A,r) ==> tot_ord(A,converse(r))"; |
4091 | 616 |
by (blast_tac (claset() addSIs [part_ord_converse, linear_converse]) 1); |
836
627f4842b020
Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents:
812
diff
changeset
|
617 |
qed "tot_ord_converse"; |
2469 | 618 |
|
619 |
||
620 |
(** By Krzysztof Grabczewski. |
|
621 |
Lemmas involving the first element of a well ordered set **) |
|
622 |
||
5137 | 623 |
Goalw [first_def] "first(b,B,r) ==> b:B"; |
2925 | 624 |
by (Blast_tac 1); |
2469 | 625 |
qed "first_is_elem"; |
626 |
||
5067 | 627 |
Goalw [well_ord_def, wf_on_def, wf_def, first_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
628 |
"[| well_ord(A,r); B<=A; B~=0 |] ==> (EX! b. first(b,B,r))"; |
2469 | 629 |
by (REPEAT (eresolve_tac [conjE,allE,disjE] 1)); |
630 |
by (contr_tac 1); |
|
631 |
by (etac bexE 1); |
|
632 |
by (res_inst_tac [("a","x")] ex1I 1); |
|
2925 | 633 |
by (Blast_tac 2); |
2469 | 634 |
by (rewrite_goals_tac [tot_ord_def, linear_def]); |
4091 | 635 |
by (Blast.depth_tac (claset()) 7 1); |
2469 | 636 |
qed "well_ord_imp_ex1_first"; |
637 |
||
5137 | 638 |
Goal "[| well_ord(A,r); B<=A; B~=0 |] ==> (THE b. first(b,B,r)) : B"; |
2469 | 639 |
by (dtac well_ord_imp_ex1_first 1 THEN REPEAT (assume_tac 1)); |
640 |
by (rtac first_is_elem 1); |
|
641 |
by (etac theI 1); |
|
642 |
qed "the_first_in"; |