src/ZF/Constructible/WFrec.thy
changeset 13352 3cd767f8d78b
parent 13350 626b79677dfa
child 13353 1800e7134d2e
equal deleted inserted replaced
13351:bc1fb6941b54 13352:3cd767f8d78b
    67 lemma (in M_axioms) is_recfun_separation':
    67 lemma (in M_axioms) is_recfun_separation':
    68     "[| f \<in> r -`` {a} \<rightarrow> range(f); g \<in> r -`` {b} \<rightarrow> range(g);
    68     "[| f \<in> r -`` {a} \<rightarrow> range(f); g \<in> r -`` {b} \<rightarrow> range(g);
    69         M(r); M(f); M(g); M(a); M(b) |] 
    69         M(r); M(f); M(g); M(a); M(b) |] 
    70      ==> separation(M, \<lambda>x. \<not> (\<langle>x, a\<rangle> \<in> r \<longrightarrow> \<langle>x, b\<rangle> \<in> r \<longrightarrow> f ` x = g ` x))"
    70      ==> separation(M, \<lambda>x. \<not> (\<langle>x, a\<rangle> \<in> r \<longrightarrow> \<langle>x, b\<rangle> \<in> r \<longrightarrow> f ` x = g ` x))"
    71 apply (insert is_recfun_separation [of r f g a b]) 
    71 apply (insert is_recfun_separation [of r f g a b]) 
    72 apply (simp add: typed_apply_abs vimage_singleton_iff)
    72 apply (simp add: vimage_singleton_iff)
    73 done
    73 done
    74 
    74 
    75 text{*Stated using @{term "trans(r)"} rather than
    75 text{*Stated using @{term "trans(r)"} rather than
    76       @{term "transitive_rel(M,A,r)"} because the latter rewrites to
    76       @{term "transitive_rel(M,A,r)"} because the latter rewrites to
    77       the former anyway, by @{text transitive_rel_abs}.
    77       the former anyway, by @{text transitive_rel_abs}.
   273 apply (rule exists_is_recfun_indstep) 
   273 apply (rule exists_is_recfun_indstep) 
   274       apply (blast dest: transM del: rev_rallE, assumption+)
   274       apply (blast dest: transM del: rev_rallE, assumption+)
   275 done
   275 done
   276 
   276 
   277 constdefs
   277 constdefs
   278  M_is_recfun :: "[i=>o, i, i, [i,i,i]=>o, i] => o"
   278  M_is_recfun :: "[i=>o, [i,i,i]=>o, i, i, i] => o"
   279    "M_is_recfun(M,r,a,MH,f) == 
   279    "M_is_recfun(M,MH,r,a,f) == 
   280      \<forall>z[M]. z \<in> f <-> 
   280      \<forall>z[M]. z \<in> f <-> 
   281             (\<exists>x[M]. \<exists>y[M]. \<exists>xa[M]. \<exists>sx[M]. \<exists>r_sx[M]. \<exists>f_r_sx[M]. 
   281             (\<exists>x[M]. \<exists>y[M]. \<exists>xa[M]. \<exists>sx[M]. \<exists>r_sx[M]. \<exists>f_r_sx[M]. 
   282 	       pair(M,x,y,z) & pair(M,x,a,xa) & upair(M,x,x,sx) &
   282 	       pair(M,x,y,z) & pair(M,x,a,xa) & upair(M,x,x,sx) &
   283                pre_image(M,r,sx,r_sx) & restriction(M,f,r_sx,f_r_sx) &
   283                pre_image(M,r,sx,r_sx) & restriction(M,f,r_sx,f_r_sx) &
   284                xa \<in> r & MH(x, f_r_sx, y))"
   284                xa \<in> r & MH(x, f_r_sx, y))"
   285 
   285 
   286 lemma (in M_axioms) is_recfun_abs:
   286 lemma (in M_axioms) is_recfun_abs:
   287      "[| \<forall>x[M]. \<forall>g[M]. function(g) --> M(H(x,g));  M(r); M(a); M(f); 
   287      "[| \<forall>x[M]. \<forall>g[M]. function(g) --> M(H(x,g));  M(r); M(a); M(f); 
   288          \<forall>x g y. M(x) --> M(g) --> M(y) --> MH(x,g,y) <-> y = H(x,g) |] 
   288          \<forall>x g y. M(x) --> M(g) --> M(y) --> MH(x,g,y) <-> y = H(x,g) |] 
   289       ==> M_is_recfun(M,r,a,MH,f) <-> is_recfun(r,a,H,f)"
   289       ==> M_is_recfun(M,MH,r,a,f) <-> is_recfun(r,a,H,f)"
   290 apply (simp add: M_is_recfun_def is_recfun_relativize)
   290 apply (simp add: M_is_recfun_def is_recfun_relativize)
   291 apply (rule rall_cong)
   291 apply (rule rall_cong)
   292 apply (blast dest: transM)
   292 apply (blast dest: transM)
   293 done
   293 done
   294 
   294 
   295 lemma M_is_recfun_cong [cong]:
   295 lemma M_is_recfun_cong [cong]:
   296      "[| r = r'; a = a'; f = f'; 
   296      "[| r = r'; a = a'; f = f'; 
   297        !!x g y. [| M(x); M(g); M(y) |] ==> MH(x,g,y) <-> MH'(x,g,y) |]
   297        !!x g y. [| M(x); M(g); M(y) |] ==> MH(x,g,y) <-> MH'(x,g,y) |]
   298       ==> M_is_recfun(M,r,a,MH,f) <-> M_is_recfun(M,r',a',MH',f')"
   298       ==> M_is_recfun(M,MH,r,a,f) <-> M_is_recfun(M,MH',r',a',f')"
   299 by (simp add: M_is_recfun_def) 
   299 by (simp add: M_is_recfun_def) 
   300 
   300 
   301 
   301 
   302 constdefs
   302 constdefs
   303  (*This expresses ordinal addition in the language of ZF.  It also 
   303  (*This expresses ordinal addition in the language of ZF.  It also 
   306    Memrel(succ(j)), while x determines the domain of f.*)
   306    Memrel(succ(j)), while x determines the domain of f.*)
   307  is_oadd_fun :: "[i=>o,i,i,i,i] => o"
   307  is_oadd_fun :: "[i=>o,i,i,i,i] => o"
   308     "is_oadd_fun(M,i,j,x,f) == 
   308     "is_oadd_fun(M,i,j,x,f) == 
   309        (\<forall>sj msj. M(sj) --> M(msj) --> 
   309        (\<forall>sj msj. M(sj) --> M(msj) --> 
   310                  successor(M,j,sj) --> membership(M,sj,msj) --> 
   310                  successor(M,j,sj) --> membership(M,sj,msj) --> 
   311 	         M_is_recfun(M, msj, x, 
   311 	         M_is_recfun(M, 
   312 		     %x g y. \<exists>gx[M]. image(M,g,x,gx) & union(M,i,gx,y),
   312 		     %x g y. \<exists>gx[M]. image(M,g,x,gx) & union(M,i,gx,y),
   313 		     f))"
   313 		     msj, x, f))"
   314 
   314 
   315  is_oadd :: "[i=>o,i,i,i] => o"
   315  is_oadd :: "[i=>o,i,i,i] => o"
   316     "is_oadd(M,i,j,k) == 
   316     "is_oadd(M,i,j,k) == 
   317         (~ ordinal(M,i) & ~ ordinal(M,j) & k=0) |
   317         (~ ordinal(M,i) & ~ ordinal(M,j) & k=0) |
   318         (~ ordinal(M,i) & ordinal(M,j) & k=j) |
   318         (~ ordinal(M,i) & ordinal(M,j) & k=j) |
   420 apply (subgoal_tac "\<forall>k\<in>x. k<J")
   420 apply (subgoal_tac "\<forall>k\<in>x. k<J")
   421  apply (simp (no_asm_simp) add: is_oadd_def oadd_unfold is_oadd_fun_apply)
   421  apply (simp (no_asm_simp) add: is_oadd_def oadd_unfold is_oadd_fun_apply)
   422 apply (blast intro: lt_trans ltI lt_Ord) 
   422 apply (blast intro: lt_trans ltI lt_Ord) 
   423 done
   423 done
   424 
   424 
   425 lemma (in M_ord_arith) oadd_abs_fun_apply_iff:
       
   426     "[| M(i); M(J); M(f); M(k); j<J; is_oadd_fun(M,i,J,J,f) |] 
       
   427      ==> fun_apply(M,f,j,k) <-> f`j = k"
       
   428 by (force simp add: lt_def is_oadd_fun_iff subsetD typed_apply_abs) 
       
   429 
       
   430 lemma (in M_ord_arith) Ord_oadd_abs:
   425 lemma (in M_ord_arith) Ord_oadd_abs:
   431     "[| M(i); M(j); M(k); Ord(i); Ord(j) |] ==> is_oadd(M,i,j,k) <-> k = i++j"
   426     "[| M(i); M(j); M(k); Ord(i); Ord(j) |] ==> is_oadd(M,i,j,k) <-> k = i++j"
   432 apply (simp add: is_oadd_def oadd_abs_fun_apply_iff is_oadd_fun_iff_oadd)
   427 apply (simp add: is_oadd_def is_oadd_fun_iff_oadd)
   433 apply (frule exists_oadd_fun [of j i], blast+)
   428 apply (frule exists_oadd_fun [of j i], blast+)
   434 done
   429 done
   435 
   430 
   436 lemma (in M_ord_arith) oadd_abs:
   431 lemma (in M_ord_arith) oadd_abs:
   437     "[| M(i); M(j); M(k) |] ==> is_oadd(M,i,j,k) <-> k = i++j"
   432     "[| M(i); M(j); M(k) |] ==> is_oadd(M,i,j,k) <-> k = i++j"
   545 apply (subgoal_tac "\<forall>k\<in>x. k<J")
   540 apply (subgoal_tac "\<forall>k\<in>x. k<J")
   546  apply (simp add: is_omult_fun_apply_Limit omult_Limit) 
   541  apply (simp add: is_omult_fun_apply_Limit omult_Limit) 
   547 apply (blast intro: lt_trans ltI lt_Ord) 
   542 apply (blast intro: lt_trans ltI lt_Ord) 
   548 done
   543 done
   549 
   544 
   550 lemma (in M_ord_arith) omult_abs_fun_apply_iff:
       
   551     "[| M(i); M(J); M(f); M(k); j<J; is_omult_fun(M,i,J,f) |] 
       
   552      ==> fun_apply(M,f,j,k) <-> f`j = k"
       
   553 by (auto simp add: lt_def is_omult_fun_def subsetD apply_abs) 
       
   554 
       
   555 lemma (in M_ord_arith) omult_abs:
   545 lemma (in M_ord_arith) omult_abs:
   556     "[| M(i); M(j); M(k); Ord(i); Ord(j) |] ==> is_omult(M,i,j,k) <-> k = i**j"
   546     "[| M(i); M(j); M(k); Ord(i); Ord(j) |] ==> is_omult(M,i,j,k) <-> k = i**j"
   557 apply (simp add: is_omult_def omult_abs_fun_apply_iff is_omult_fun_eq_omult)
   547 apply (simp add: is_omult_def is_omult_fun_eq_omult)
   558 apply (frule exists_omult_fun [of j i], blast+)
   548 apply (frule exists_omult_fun [of j i], blast+)
   559 done
   549 done
   560 
   550 
   561 end
   551 end
   562 
   552