91 |
91 |
92 text\<open>Following Kunen's Theorem I 7.6, page 17. Note that this material is |
92 text\<open>Following Kunen's Theorem I 7.6, page 17. Note that this material is |
93 not required elsewhere.\<close> |
93 not required elsewhere.\<close> |
94 |
94 |
95 text\<open>Can't use \<open>well_ord_iso_preserving\<close> because it needs the |
95 text\<open>Can't use \<open>well_ord_iso_preserving\<close> because it needs the |
96 strong premise @{term "well_ord(A,r)"}\<close> |
96 strong premise \<^term>\<open>well_ord(A,r)\<close>\<close> |
97 lemma (in M_ordertype) ord_iso_pred_imp_lt: |
97 lemma (in M_ordertype) ord_iso_pred_imp_lt: |
98 "[| f \<in> ord_iso(Order.pred(A,x,r), r, i, Memrel(i)); |
98 "[| f \<in> ord_iso(Order.pred(A,x,r), r, i, Memrel(i)); |
99 g \<in> ord_iso(Order.pred(A,y,r), r, j, Memrel(j)); |
99 g \<in> ord_iso(Order.pred(A,y,r), r, j, Memrel(j)); |
100 wellordered(M,A,r); x \<in> A; y \<in> A; M(A); M(r); M(f); M(g); M(j); |
100 wellordered(M,A,r); x \<in> A; y \<in> A; M(A); M(r); M(f); M(g); M(j); |
101 Ord(i); Ord(j); \<langle>x,y\<rangle> \<in> r |] |
101 Ord(i); Ord(j); \<langle>x,y\<rangle> \<in> r |] |
102 ==> i < j" |
102 ==> i < j" |
103 apply (frule wellordered_is_trans_on, assumption) |
103 apply (frule wellordered_is_trans_on, assumption) |
104 apply (frule_tac y=y in transM, assumption) |
104 apply (frule_tac y=y in transM, assumption) |
105 apply (rule_tac i=i and j=j in Ord_linear_lt, auto) |
105 apply (rule_tac i=i and j=j in Ord_linear_lt, auto) |
106 txt\<open>case @{term "i=j"} yields a contradiction\<close> |
106 txt\<open>case \<^term>\<open>i=j\<close> yields a contradiction\<close> |
107 apply (rule_tac x1=x and A1="Order.pred(A,y,r)" in |
107 apply (rule_tac x1=x and A1="Order.pred(A,y,r)" in |
108 wellordered_iso_predD [THEN notE]) |
108 wellordered_iso_predD [THEN notE]) |
109 apply (blast intro: wellordered_subset [OF _ pred_subset]) |
109 apply (blast intro: wellordered_subset [OF _ pred_subset]) |
110 apply (simp add: trans_pred_pred_eq) |
110 apply (simp add: trans_pred_pred_eq) |
111 apply (blast intro: Ord_iso_implies_eq ord_iso_sym ord_iso_trans) |
111 apply (blast intro: Ord_iso_implies_eq ord_iso_sym ord_iso_trans) |
112 apply (simp_all add: pred_iff pred_closed converse_closed comp_closed) |
112 apply (simp_all add: pred_iff pred_closed converse_closed comp_closed) |
113 txt\<open>case @{term "j<i"} also yields a contradiction\<close> |
113 txt\<open>case \<^term>\<open>j<i\<close> also yields a contradiction\<close> |
114 apply (frule restrict_ord_iso2, assumption+) |
114 apply (frule restrict_ord_iso2, assumption+) |
115 apply (frule ord_iso_sym [THEN ord_iso_is_bij, THEN bij_is_fun]) |
115 apply (frule ord_iso_sym [THEN ord_iso_is_bij, THEN bij_is_fun]) |
116 apply (frule apply_type, blast intro: ltD) |
116 apply (frule apply_type, blast intro: ltD) |
117 \<comment> \<open>thus @{term "converse(f)`j \<in> Order.pred(A,x,r)"}\<close> |
117 \<comment> \<open>thus \<^term>\<open>converse(f)`j \<in> Order.pred(A,x,r)\<close>\<close> |
118 apply (simp add: pred_iff) |
118 apply (simp add: pred_iff) |
119 apply (subgoal_tac |
119 apply (subgoal_tac |
120 "\<exists>h[M]. h \<in> ord_iso(Order.pred(A,y,r), r, |
120 "\<exists>h[M]. h \<in> ord_iso(Order.pred(A,y,r), r, |
121 Order.pred(A, converse(f)`j, r), r)") |
121 Order.pred(A, converse(f)`j, r), r)") |
122 apply (clarify, frule wellordered_iso_pred_eq, assumption+) |
122 apply (clarify, frule wellordered_iso_pred_eq, assumption+) |
152 definition |
152 definition |
153 otype :: "[i=>o,i,i,i] => o" where \<comment> \<open>the order types themselves\<close> |
153 otype :: "[i=>o,i,i,i] => o" where \<comment> \<open>the order types themselves\<close> |
154 "otype(M,A,r,i) == \<exists>f[M]. omap(M,A,r,f) & is_range(M,f,i)" |
154 "otype(M,A,r,i) == \<exists>f[M]. omap(M,A,r,f) & is_range(M,f,i)" |
155 |
155 |
156 |
156 |
157 text\<open>Can also be proved with the premise @{term "M(z)"} instead of |
157 text\<open>Can also be proved with the premise \<^term>\<open>M(z)\<close> instead of |
158 @{term "M(f)"}, but that version is less useful. This lemma |
158 \<^term>\<open>M(f)\<close>, but that version is less useful. This lemma |
159 is also more useful than the definition, \<open>omap_def\<close>.\<close> |
159 is also more useful than the definition, \<open>omap_def\<close>.\<close> |
160 lemma (in M_ordertype) omap_iff: |
160 lemma (in M_ordertype) omap_iff: |
161 "[| omap(M,A,r,f); M(A); M(f) |] |
161 "[| omap(M,A,r,f); M(A); M(f) |] |
162 ==> z \<in> f \<longleftrightarrow> |
162 ==> z \<in> f \<longleftrightarrow> |
163 (\<exists>a\<in>A. \<exists>x[M]. \<exists>g[M]. z = <a,x> & Ord(x) & |
163 (\<exists>a\<in>A. \<exists>x[M]. \<exists>g[M]. z = <a,x> & Ord(x) & |
254 apply (simp add: omap_iff) |
254 apply (simp add: omap_iff) |
255 apply (blast intro: wellordered_iso_pred_eq ord_iso_sym ord_iso_trans) |
255 apply (blast intro: wellordered_iso_pred_eq ord_iso_sym ord_iso_trans) |
256 done |
256 done |
257 |
257 |
258 |
258 |
259 text\<open>This is not the final result: we must show @{term "oB(A,r) = A"}\<close> |
259 text\<open>This is not the final result: we must show \<^term>\<open>oB(A,r) = A\<close>\<close> |
260 lemma (in M_ordertype) omap_ord_iso: |
260 lemma (in M_ordertype) omap_ord_iso: |
261 "[| wellordered(M,A,r); omap(M,A,r,f); otype(M,A,r,i); |
261 "[| wellordered(M,A,r); omap(M,A,r,f); otype(M,A,r,i); |
262 M(A); M(r); M(f); M(i) |] ==> f \<in> ord_iso(obase(M,A,r),r,i,Memrel(i))" |
262 M(A); M(r); M(f); M(i) |] ==> f \<in> ord_iso(obase(M,A,r),r,i,Memrel(i))" |
263 apply (rule ord_isoI) |
263 apply (rule ord_isoI) |
264 apply (erule wellordered_omap_bij, assumption+) |
264 apply (erule wellordered_omap_bij, assumption+) |
265 apply (insert omap_funtype [of A r f i], simp) |
265 apply (insert omap_funtype [of A r f i], simp) |
266 apply (frule_tac a=x in apply_Pair, assumption) |
266 apply (frule_tac a=x in apply_Pair, assumption) |
267 apply (frule_tac a=y in apply_Pair, assumption) |
267 apply (frule_tac a=y in apply_Pair, assumption) |
268 apply (auto simp add: omap_iff) |
268 apply (auto simp add: omap_iff) |
269 txt\<open>direction 1: assuming @{term "\<langle>x,y\<rangle> \<in> r"}\<close> |
269 txt\<open>direction 1: assuming \<^term>\<open>\<langle>x,y\<rangle> \<in> r\<close>\<close> |
270 apply (blast intro: ltD ord_iso_pred_imp_lt) |
270 apply (blast intro: ltD ord_iso_pred_imp_lt) |
271 txt\<open>direction 2: proving @{term "\<langle>x,y\<rangle> \<in> r"} using linearity of @{term r}\<close> |
271 txt\<open>direction 2: proving \<^term>\<open>\<langle>x,y\<rangle> \<in> r\<close> using linearity of \<^term>\<open>r\<close>\<close> |
272 apply (rename_tac x y g ga) |
272 apply (rename_tac x y g ga) |
273 apply (frule wellordered_is_linear, assumption, |
273 apply (frule wellordered_is_linear, assumption, |
274 erule_tac x=x and y=y in linearE, assumption+) |
274 erule_tac x=x and y=y in linearE, assumption+) |
275 txt\<open>the case @{term "x=y"} leads to immediate contradiction\<close> |
275 txt\<open>the case \<^term>\<open>x=y\<close> leads to immediate contradiction\<close> |
276 apply (blast elim: mem_irrefl) |
276 apply (blast elim: mem_irrefl) |
277 txt\<open>the case @{term "\<langle>y,x\<rangle> \<in> r"}: handle like the opposite direction\<close> |
277 txt\<open>the case \<^term>\<open>\<langle>y,x\<rangle> \<in> r\<close>: handle like the opposite direction\<close> |
278 apply (blast dest: ord_iso_pred_imp_lt ltD elim: mem_asym) |
278 apply (blast dest: ord_iso_pred_imp_lt ltD elim: mem_asym) |
279 done |
279 done |
280 |
280 |
281 lemma (in M_ordertype) Ord_omap_image_pred: |
281 lemma (in M_ordertype) Ord_omap_image_pred: |
282 "[| wellordered(M,A,r); omap(M,A,r,f); otype(M,A,r,i); |
282 "[| wellordered(M,A,r); omap(M,A,r,f); otype(M,A,r,i); |
329 apply (force simp add: pred_iff obase_def) |
329 apply (force simp add: pred_iff obase_def) |
330 done |
330 done |
331 |
331 |
332 |
332 |
333 |
333 |
334 text\<open>Main result: @{term om} gives the order-isomorphism |
334 text\<open>Main result: \<^term>\<open>om\<close> gives the order-isomorphism |
335 @{term "\<langle>A,r\<rangle> \<cong> \<langle>i, Memrel(i)\<rangle>"}\<close> |
335 \<^term>\<open>\<langle>A,r\<rangle> \<cong> \<langle>i, Memrel(i)\<rangle>\<close>\<close> |
336 theorem (in M_ordertype) omap_ord_iso_otype: |
336 theorem (in M_ordertype) omap_ord_iso_otype: |
337 "[| wellordered(M,A,r); omap(M,A,r,f); otype(M,A,r,i); |
337 "[| wellordered(M,A,r); omap(M,A,r,f); otype(M,A,r,i); |
338 M(A); M(r); M(f); M(i) |] ==> f \<in> ord_iso(A, r, i, Memrel(i))" |
338 M(A); M(r); M(f); M(i) |] ==> f \<in> ord_iso(A, r, i, Memrel(i))" |
339 apply (frule omap_ord_iso, assumption+) |
339 apply (frule omap_ord_iso, assumption+) |
340 apply (simp add: obase_equals) |
340 apply (simp add: obase_equals) |
764 ==> \<forall>f[M]. is_recfun(r^+, a, %x f. range(f), f) \<longrightarrow> Ord(range(f))" |
764 ==> \<forall>f[M]. is_recfun(r^+, a, %x f. range(f), f) \<longrightarrow> Ord(range(f))" |
765 apply (drule wellfounded_trancl, assumption) |
765 apply (drule wellfounded_trancl, assumption) |
766 apply (rule wellfounded_induct, assumption, erule (1) transM) |
766 apply (rule wellfounded_induct, assumption, erule (1) transM) |
767 apply simp |
767 apply simp |
768 apply (blast intro: Ord_wfrank_separation', clarify) |
768 apply (blast intro: Ord_wfrank_separation', clarify) |
769 txt\<open>The reasoning in both cases is that we get @{term y} such that |
769 txt\<open>The reasoning in both cases is that we get \<^term>\<open>y\<close> such that |
770 @{term "\<langle>y, x\<rangle> \<in> r^+"}. We find that |
770 \<^term>\<open>\<langle>y, x\<rangle> \<in> r^+\<close>. We find that |
771 @{term "f`y = restrict(f, r^+ -`` {y})"}.\<close> |
771 \<^term>\<open>f`y = restrict(f, r^+ -`` {y})\<close>.\<close> |
772 apply (rule OrdI [OF _ Ord_is_Transset]) |
772 apply (rule OrdI [OF _ Ord_is_Transset]) |
773 txt\<open>An ordinal is a transitive set...\<close> |
773 txt\<open>An ordinal is a transitive set...\<close> |
774 apply (simp add: Transset_def) |
774 apply (simp add: Transset_def) |
775 apply clarify |
775 apply clarify |
776 apply (frule apply_recfun2, assumption) |
776 apply (frule apply_recfun2, assumption) |