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=>o,i,i,i]=>o, i] => o" |
278 M_is_recfun :: "[i=>o, i, i, [i,i,i]=>o, i] => o" |
279 "M_is_recfun(M,r,a,MH,f) == |
279 "M_is_recfun(M,r,a,MH,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(M, x, f_r_sx, y))" |
284 xa \<in> r & MH(x, f_r_sx, y))" |
285 |
285 |
286 lemma (in M_axioms) is_recfun_iff_M: |
286 lemma (in M_axioms) is_recfun_iff_M: |
287 "[| M(r); M(a); M(f); \<forall>x[M]. \<forall>g[M]. function(g) --> M(H(x,g)); |
287 "[| M(r); M(a); M(f); \<forall>x[M]. \<forall>g[M]. function(g) --> M(H(x,g)); |
288 \<forall>x g y. M(x) --> M(g) --> M(y) --> MH(M,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 is_recfun(r,a,H,f) <-> M_is_recfun(M,r,a,MH,f)" |
289 is_recfun(r,a,H,f) <-> M_is_recfun(M,r,a,MH,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(M,x,g,y) <-> MH'(M,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,r,a,MH,f) <-> M_is_recfun(M,r',a',MH',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 |
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, msj, x, |
312 %M x g y. \<exists>gx. M(gx) & 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 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) | |