definition
obase :: "[i\o,i,i] \ i" where \<comment> \<open>the domain of \<open>om\<close>, eventually shown to equal \<open>A\<close>\<close> "obase(M,A,r) \ {a\A. \x[M]. \g[M]. Ord(x) \
g \<in> ord_iso(Order.pred(A,a,r),r,x,Memrel(x))}"
definition
omap :: "[i\o,i,i,i] \ o" where \<comment> \<open>the function that maps wosets to order types\<close> "omap(M,A,r,f) \ \<forall>z[M].
z \<in> f \<longleftrightarrow> (\<exists>a\<in>A. \<exists>x[M]. \<exists>g[M]. z = \<langle>a,x\<rangle> \<and> Ord(x) \<and>
g \<in> ord_iso(Order.pred(A,a,r),r,x,Memrel(x)))"
definition
otype :: "[i\o,i,i,i] \ o" where \ \the order types themselves\ "otype(M,A,r,i) \ \f[M]. omap(M,A,r,f) \ is_range(M,f,i)"
text\<open>Can also be proved with the premise \<^term>\<open>M(z)\<close> instead of \<^term>\<open>M(f)\<close>, but that version is less useful. This lemma isalso more useful than the definition, \<open>omap_def\<close>.\<close> lemma (in M_ordertype) omap_iff: "\omap(M,A,r,f); M(A); M(f)\ \<Longrightarrow> z \<in> f \<longleftrightarrow>
(\<exists>a\<in>A. \<exists>x[M]. \<exists>g[M]. z = \<langle>a,x\<rangle> \<and> Ord(x) \<and>
g \<in> ord_iso(Order.pred(A,a,r),r,x,Memrel(x)))" apply (simp add: omap_def) apply (rule iffI) apply (drule_tac [2] x=z in rspec) apply (drule_tac x=z in rspec) apply (blast dest: transM)+ done
lemma (in M_ordertype) wellordered_omap_bij: "\wellordered(M,A,r); omap(M,A,r,f); otype(M,A,r,i);
M(A); M(r); M(f); M(i)\<rbrakk> \<Longrightarrow> f \<in> bij(obase(M,A,r),i)" apply (insert omap_funtype [of A r f i]) apply (auto simp add: bij_def inj_def) prefer 2 apply (blast intro: fun_is_surj dest: otype_eq_range) apply (frule_tac a=w in apply_Pair, assumption) apply (frule_tac a=x in apply_Pair, assumption) apply (simp add: omap_iff) apply (blast intro: wellordered_iso_pred_eq ord_iso_sym ord_iso_trans) done
text\<open>This is not the final result: we must show \<^term>\<open>oB(A,r) = A\<close>\<close> lemma (in M_ordertype) omap_ord_iso: "\wellordered(M,A,r); omap(M,A,r,f); otype(M,A,r,i);
M(A); M(r); M(f); M(i)\<rbrakk> \<Longrightarrow> f \<in> ord_iso(obase(M,A,r),r,i,Memrel(i))" apply (rule ord_isoI) apply (erule wellordered_omap_bij, assumption+) apply (insert omap_funtype [of A r f i], simp) apply (frule_tac a=x in apply_Pair, assumption) apply (frule_tac a=y in apply_Pair, assumption) apply (auto simp add: omap_iff) txt\<open>direction 1: assuming \<^term>\<open>\<langle>x,y\<rangle> \<in> r\<close>\<close> apply (blast intro: ltD ord_iso_pred_imp_lt) txt\<open>direction 2: proving \<^term>\<open>\<langle>x,y\<rangle> \<in> r\<close> using linearity of \<^term>\<open>r\<close>\<close> apply (rename_tac x y g ga) apply (frule wellordered_is_linear, assumption,
erule_tac x=x and y=y in linearE, assumption+) txt\<open>the case \<^term>\<open>x=y\<close> leads to immediate contradiction\<close> apply (blast elim: mem_irrefl) txt\<open>the case \<^term>\<open>\<langle>y,x\<rangle> \<in> r\<close>: handle like the opposite direction\<close> apply (blast dest: ord_iso_pred_imp_lt ltD elim: mem_asym) done
lemma (in M_ordertype) Ord_omap_image_pred: "\wellordered(M,A,r); omap(M,A,r,f); otype(M,A,r,i);
M(A); M(r); M(f); M(i); b \<in> A\<rbrakk> \<Longrightarrow> Ord(f `` Order.pred(A,b,r))" apply (frule wellordered_is_trans_on, assumption) apply (rule OrdI) prefer 2 apply (simp add: image_iff omap_iff Ord_def, blast) txt\<open>Hard part is to show that the image is a transitive set.\<close> apply (simp add: Transset_def, clarify) apply (simp add: image_iff pred_iff apply_iff [OF omap_funtype [of A r f i]]) apply (rename_tac c j, clarify) apply (frule omap_funtype [of A r f, THEN apply_funtype], assumption+) apply (subgoal_tac "j \ i") prefer 2 apply (blast intro: Ord_trans Ord_otype) apply (subgoal_tac "converse(f) ` j \ obase(M,A,r)") prefer 2 apply (blast dest: wellordered_omap_bij [THEN bij_converse_bij, THEN bij_is_fun, THEN apply_funtype]) apply (rule_tac x="converse(f) ` j"in bexI) apply (simp add: right_inverse_bij [OF wellordered_omap_bij]) apply (intro predI conjI) apply (erule_tac b=c in trans_onD) apply (rule ord_iso_converse1 [OF omap_ord_iso [of A r f i]]) apply (auto simp add: obase_def) done
lemma (in M_ordertype) restrict_omap_ord_iso: "\wellordered(M,A,r); omap(M,A,r,f); otype(M,A,r,i);
D \<subseteq> obase(M,A,r); M(A); M(r); M(f); M(i)\<rbrakk> \<Longrightarrow> restrict(f,D) \<in> (\<langle>D,r\<rangle> \<cong> \<langle>f``D, Memrel(f``D)\<rangle>)" apply (frule ord_iso_restrict_image [OF omap_ord_iso [of A r f i]],
assumption+) apply (drule ord_iso_sym [THEN subset_ord_iso_Memrel]) apply (blast dest: subsetD [OF omap_subset]) apply (drule ord_iso_sym, simp) done
text\<open>(a) The notion of Wellordering is absolute\<close> theorem (in M_ordertype) well_ord_abs [simp]: "\M(A); M(r)\ \ wellordered(M,A,r) \ well_ord(A,r)" by (blast intro: well_ord_imp_relativized relativized_imp_well_ord)
text\<open>(b) Order types are absolute\<close> theorem (in M_ordertype) ordertypes_are_absolute: "\wellordered(M,A,r); f \ ord_iso(A, r, i, Memrel(i));
M(A); M(r); M(f); M(i); Ord(i)\<rbrakk> \<Longrightarrow> i = ordertype(A,r)" by (blast intro: Ord_ordertype relativized_imp_well_ord ordertype_ord_iso
Ord_iso_implies_eq ord_iso_sym ord_iso_trans)
subsection\<open>Ordinal Arithmetic: Two Examples of Recursion\<close>
text\<open>Note: the remainder of this theory is not needed elsewhere.\<close>
subsubsection\<open>Ordinal Addition\<close>
(*FIXME: update to use new techniques\<And>*) (*This expresses ordinal addition in the language of ZF. It also provides an abbreviation that can be used in the instance of strong replacement below. Here j is used to define the relation, namely
Memrel(succ(j)), while x determines the domain of f.*) definition
is_oadd_fun :: "[i\o,i,i,i,i] \ o" where "is_oadd_fun(M,i,j,x,f) \
(\<forall>sj msj. M(sj) \<longrightarrow> M(msj) \<longrightarrow>
successor(M,j,sj) \<longrightarrow> membership(M,sj,msj) \<longrightarrow>
M_is_recfun(M, \<lambda>x g y. \<exists>gx[M]. image(M,g,x,gx) \<and> union(M,i,gx,y),
msj, x, f))"
locale M_ord_arith = M_ordertype + assumes oadd_strong_replacement: "\M(i); M(j)\ \
strong_replacement(M, \<lambda>x z. \<exists>y[M]. pair(M,x,y,z) \<and>
(\<exists>f[M]. \<exists>fx[M]. is_oadd_fun(M,i,j,x,f) \<and>
image(M,f,x,fx) \<and> y = i \<union> fx))"
and omult_strong_replacement': "\M(i); M(j)\ \
strong_replacement(M, \<lambda>x z. \<exists>y[M]. z = \<langle>x,y\<rangle> \<and>
(\<exists>g[M]. is_recfun(Memrel(succ(j)),x,\<lambda>x g. THE z. omult_eqns(i,x,g,z),g) \<and>
y = (THE z. omult_eqns(i, x, g, z))))"
text\<open>\<open>is_oadd_fun\<close>: Relating the pure "language of set theory" to Isabelle/ZF\<close> lemma (in M_ord_arith) is_oadd_fun_iff: "\a\j; M(i); M(j); M(a); M(f)\ \<Longrightarrow> is_oadd_fun(M,i,j,a,f) \<longleftrightarrow>
f \<in> a \<rightarrow> range(f) \<and> (\<forall>x. M(x) \<longrightarrow> x < a \<longrightarrow> f`x = i \<union> f``x)" apply (frule lt_Ord) apply (simp add: is_oadd_fun_def
relation2_def is_recfun_abs [of "\x g. i \ g``x"]
is_recfun_iff_equation
Ball_def lt_trans [OF ltI, of _ a] lt_Memrel) apply (simp add: lt_def) apply (blast dest: transM) done
lemma (in M_ord_arith) oadd_strong_replacement': "\M(i); M(j)\ \
strong_replacement(M, \<lambda>x z. \<exists>y[M]. z = \<langle>x,y\<rangle> \<and>
(\<exists>g[M]. is_recfun(Memrel(succ(j)),x,\<lambda>x g. i \<union> g``x,g) \<and>
y = i \<union> g``x))" apply (insert oadd_strong_replacement [of i j]) apply (simp add: is_oadd_fun_def relation2_def
is_recfun_abs [of "\x g. i \ g``x"]) done
lemma (in M_ord_arith) exists_oadd: "\Ord(j); M(i); M(j)\ \<Longrightarrow> \<exists>f[M]. is_recfun(Memrel(succ(j)), j, \<lambda>x g. i \<union> g``x, f)" apply (rule wf_exists_is_recfun [OF wf_Memrel trans_Memrel]) apply (simp_all add: Memrel_type oadd_strong_replacement') done
subsection \<open>Absoluteness of Well-Founded Relations\<close>
text\<open>Relativized to \<^term>\<open>M\<close>: Every well-founded relation is a subset of some
inverse image of an ordinal. Key step is the construction (in\<^term>\<open>M\<close>) of a
rank function.\<close>
locale M_wfrank = M_trancl + assumes wfrank_separation: "M(r) \
separation (M, \<lambda>x. \<forall>rplus[M]. tran_closure(M,r,rplus) \<longrightarrow> \<not> (\<exists>f[M]. M_is_recfun(M, \<lambda>x f y. is_range(M,f,y), rplus, x, f)))" and wfrank_strong_replacement: "M(r) \
strong_replacement(M, \<lambda>x z. \<forall>rplus[M]. tran_closure(M,r,rplus) \<longrightarrow>
(\<exists>y[M]. \<exists>f[M]. pair(M,x,y,z) \<and>
M_is_recfun(M, \<lambda>x f y. is_range(M,f,y), rplus, x, f) \<and>
is_range(M,f,y)))" and Ord_wfrank_separation: "M(r) \
separation (M, \<lambda>x. \<forall>rplus[M]. tran_closure(M,r,rplus) \<longrightarrow> \<not> (\<forall>f[M]. \<forall>rangef[M].
is_range(M,f,rangef) \<longrightarrow>
M_is_recfun(M, \<lambda>x f y. is_range(M,f,y), rplus, x, f) \<longrightarrow>
ordinal(M,rangef)))"
text\<open>Proving that the relativized instances of Separation or Replacement
agree with the "real" ones.\<close>
text\<open>This function, defined using replacement, is a rank function for
well-founded relations within the class M.\<close> definition
wellfoundedrank :: "[i\o,i,i] \ i" where "wellfoundedrank(M,r,A) \
{p. x\<in>A, \<exists>y[M]. \<exists>f[M].
p = \<langle>x,y\<rangle> \<and> is_recfun(r^+, x, \<lambda>x f. range(f), f) \<and>
y = range(f)}"
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.