(* Title: ZF/Epsilon.thy Author: Lawrence C Paulson, Cambridge University Computer Laboratory Copyright 1993 University of Cambridge
*)
section\<open>Epsilon Induction and Recursion\<close>
theory Epsilon imports Nat begin
definition
eclose :: "i\i" where "eclose(A) \ \n\nat. nat_rec(n, A, \m r. \(r))"
definition
transrec :: "[i, [i,i]\i] \i" where "transrec(a,H) \ wfrec(Memrel(eclose({a})), a, H)"
definition
rank :: "i\i" where "rank(a) \ transrec(a, \x f. \y\x. succ(f`y))"
definition
transrec2 :: "[i, i, [i,i]\i] \i" where "transrec2(k, a, b) \
transrec(k, \<lambda>i r. if(i=0, a, if(\<exists>j. i=succ(j),
b(THE j. i=succ(j), r`(THE j. i=succ(j))), \<Union>j<i. r`j)))"
definition
recursor :: "[i, [i,i]\i, i]\i" where "recursor(a,b,k) \ transrec(k, \n f. nat_case(a, \m. b(m, f`m), n))"
definition
rec :: "[i, i, [i,i]\i]\i" where "rec(k,a,b) \ recursor(a,b,k)"
subsection\<open>Basic Closure Properties\<close>
lemma arg_subset_eclose: "A \ eclose(A)" unfolding eclose_def apply (rule nat_rec_0 [THEN equalityD2, THEN subset_trans]) apply (rule nat_0I [THEN UN_upper]) done
(*Unused...*) lemma mem_eclose_trans: "\A \ eclose(B); B \ eclose(C)\ \ A \ eclose(C)" by (rule eclose_least [OF Transset_eclose eclose_subset, THEN subsetD],
assumption+)
(*Variant of the previous lemma in a useable form for the sequel*) lemma mem_eclose_sing_trans: "\A \ eclose({B}); B \ eclose({C})\ \ A \ eclose({C})" by (rule eclose_least [OF Transset_eclose singleton_subsetI, THEN subsetD],
assumption+)
lemma rank_pair2: "rank(b) < rank(\a,b\)" unfolding Pair_def apply (rule consI1 [THEN consI2, THEN rank_lt, THEN lt_trans]) apply (rule consI1 [THEN consI2, THEN rank_lt]) done
(*Not clear how to remove the P(a) condition, since the "then" part
must refer to "a"*) lemma the_equality_if: "P(a) \ (THE x. P(x)) = (if (\!x. P(x)) then a else 0)" by (simp add: the_0 the_equality2)
(*The first premise not only fixs i but ensures @{term"f\<noteq>0"}. The second premise is now essential. Consider otherwise the relation r = {\<langle>0,0\<rangle>,\<langle>0,1\<rangle>,\<langle>0,2\<rangle>,...}. Then f`0 = \<Union>(f``{0}) = \<Union>(nat) = nat,
whose rank equals that of r.*) lemma rank_apply: "\i \ domain(f); function(f)\ \ rank(f`i) < rank(f)" apply clarify apply (simp add: function_apply_equality) apply (blast intro: lt_trans rank_lt rank_pair2) done
subsection\<open>Corollaries of Leastness\<close>
lemma mem_eclose_subset: "A \ B \ eclose(A)<=eclose(B)" apply (rule Transset_eclose [THEN eclose_least]) apply (erule arg_into_eclose [THEN eclose_subset]) done
lemma rec_type: "\n \ nat;
a \<in> C(0); \<And>m z. \<lbrakk>m \<in> nat; z \<in> C(m)\<rbrakk> \<Longrightarrow> b(m,z): C(succ(m))\<rbrakk> \<Longrightarrow> rec(n,a,b) \<in> C(n)" by (erule nat_induct, auto)
end
¤ 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.0.19Bemerkung:
(vorverarbeitet)
¤
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.