src/ZF/Constructible/WFrec.thy
author paulson
Tue, 19 Nov 2002 10:41:20 +0100
changeset 13721 2cf506c09946
parent 13634 99a593b49b04
child 16417 9bc16273c2d4
permissions -rw-r--r--
stylistic tweaks
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13428
diff changeset
     1
(*  Title:      ZF/Constructible/WFrec.thy
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13428
diff changeset
     2
    ID:         $Id$
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13428
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13428
diff changeset
     4
*)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13428
diff changeset
     5
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents: 13299
diff changeset
     6
header{*Relativized Well-Founded Recursion*}
6eebcddee32b more internalized formulas and separation proofs
paulson
parents: 13299
diff changeset
     7
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
     8
theory WFrec = Wellorderings:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
     9
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    10
13506
acc18a5d2b1a Various tweaks of the presentation
paulson
parents: 13505
diff changeset
    11
subsection{*General Lemmas*}
acc18a5d2b1a Various tweaks of the presentation
paulson
parents: 13505
diff changeset
    12
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    13
(*Many of these might be useful in WF.thy*)
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    14
13269
3ba9be497c33 Tidying and introduction of various new theorems
paulson
parents: 13268
diff changeset
    15
lemma apply_recfun2:
3ba9be497c33 Tidying and introduction of various new theorems
paulson
parents: 13268
diff changeset
    16
    "[| is_recfun(r,a,H,f); <x,i>:f |] ==> i = H(x, restrict(f,r-``{x}))"
3ba9be497c33 Tidying and introduction of various new theorems
paulson
parents: 13268
diff changeset
    17
apply (frule apply_recfun) 
3ba9be497c33 Tidying and introduction of various new theorems
paulson
parents: 13268
diff changeset
    18
 apply (blast dest: is_recfun_type fun_is_rel) 
3ba9be497c33 Tidying and introduction of various new theorems
paulson
parents: 13268
diff changeset
    19
apply (simp add: function_apply_equality [OF _ is_recfun_imp_function])
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    20
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    21
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    22
text{*Expresses @{text is_recfun} as a recursion equation*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    23
lemma is_recfun_iff_equation:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    24
     "is_recfun(r,a,H,f) <->
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    25
	   f \<in> r -`` {a} \<rightarrow> range(f) &
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    26
	   (\<forall>x \<in> r-``{a}. f`x = H(x, restrict(f, r-``{x})))"  
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    27
apply (rule iffI) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    28
 apply (simp add: is_recfun_type apply_recfun Ball_def vimage_singleton_iff, 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    29
        clarify)  
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    30
apply (simp add: is_recfun_def) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    31
apply (rule fun_extension) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    32
  apply assumption
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    33
 apply (fast intro: lam_type, simp) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    34
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    35
13245
714f7a423a15 development and tweaks
paulson
parents: 13223
diff changeset
    36
lemma is_recfun_imp_in_r: "[|is_recfun(r,a,H,f); \<langle>x,i\<rangle> \<in> f|] ==> \<langle>x, a\<rangle> \<in> r"
13269
3ba9be497c33 Tidying and introduction of various new theorems
paulson
parents: 13268
diff changeset
    37
by (blast dest: is_recfun_type fun_is_rel)
13245
714f7a423a15 development and tweaks
paulson
parents: 13223
diff changeset
    38
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    39
lemma trans_Int_eq:
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    40
      "[| trans(r); <y,x> \<in> r |] ==> r -`` {x} \<inter> r -`` {y} = r -`` {y}"
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
    41
by (blast intro: transD) 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    42
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    43
lemma is_recfun_restrict_idem:
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    44
     "is_recfun(r,a,H,f) ==> restrict(f, r -`` {a}) = f"
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    45
apply (drule is_recfun_type)
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    46
apply (auto simp add: Pi_iff subset_Sigma_imp_relation restrict_idem)  
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    47
done
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    48
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    49
lemma is_recfun_cong_lemma:
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    50
  "[| is_recfun(r,a,H,f); r = r'; a = a'; f = f'; 
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    51
      !!x g. [| <x,a'> \<in> r'; relation(g); domain(g) <= r' -``{x} |] 
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    52
             ==> H(x,g) = H'(x,g) |]
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    53
   ==> is_recfun(r',a',H',f')"
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    54
apply (simp add: is_recfun_def) 
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    55
apply (erule trans) 
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    56
apply (rule lam_cong) 
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    57
apply (simp_all add: vimage_singleton_iff Int_lower2)  
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    58
done
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    59
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    60
text{*For @{text is_recfun} we need only pay attention to functions
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    61
      whose domains are initial segments of @{term r}.*}
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    62
lemma is_recfun_cong:
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    63
  "[| r = r'; a = a'; f = f'; 
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    64
      !!x g. [| <x,a'> \<in> r'; relation(g); domain(g) <= r' -``{x} |] 
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    65
             ==> H(x,g) = H'(x,g) |]
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    66
   ==> is_recfun(r,a,H,f) <-> is_recfun(r',a',H',f')"
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    67
apply (rule iffI)
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    68
txt{*Messy: fast and blast don't work for some reason*}
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    69
apply (erule is_recfun_cong_lemma, auto) 
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    70
apply (erule is_recfun_cong_lemma)
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    71
apply (blast intro: sym)+
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    72
done
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    73
13506
acc18a5d2b1a Various tweaks of the presentation
paulson
parents: 13505
diff changeset
    74
subsection{*Reworking of the Recursion Theory Within @{term M}*}
acc18a5d2b1a Various tweaks of the presentation
paulson
parents: 13505
diff changeset
    75
13564
1500a2e48d44 renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents: 13506
diff changeset
    76
lemma (in M_basic) is_recfun_separation':
13319
23de7b3af453 More Separation proofs
paulson
parents: 13306
diff changeset
    77
    "[| f \<in> r -`` {a} \<rightarrow> range(f); g \<in> r -`` {b} \<rightarrow> range(g);
23de7b3af453 More Separation proofs
paulson
parents: 13306
diff changeset
    78
        M(r); M(f); M(g); M(a); M(b) |] 
23de7b3af453 More Separation proofs
paulson
parents: 13306
diff changeset
    79
     ==> separation(M, \<lambda>x. \<not> (\<langle>x, a\<rangle> \<in> r \<longrightarrow> \<langle>x, b\<rangle> \<in> r \<longrightarrow> f ` x = g ` x))"
23de7b3af453 More Separation proofs
paulson
parents: 13306
diff changeset
    80
apply (insert is_recfun_separation [of r f g a b]) 
13352
3cd767f8d78b new definitions of fun_apply and M_is_recfun
paulson
parents: 13350
diff changeset
    81
apply (simp add: vimage_singleton_iff)
13319
23de7b3af453 More Separation proofs
paulson
parents: 13306
diff changeset
    82
done
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    83
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
    84
text{*Stated using @{term "trans(r)"} rather than
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    85
      @{term "transitive_rel(M,A,r)"} because the latter rewrites to
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    86
      the former anyway, by @{text transitive_rel_abs}.
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
    87
      As always, theorems should be expressed in simplified form.
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
    88
      The last three M-premises are redundant because of @{term "M(r)"}, 
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
    89
      but without them we'd have to undertake
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
    90
      more work to set up the induction formula.*}
13564
1500a2e48d44 renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents: 13506
diff changeset
    91
lemma (in M_basic) is_recfun_equal [rule_format]: 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    92
    "[|is_recfun(r,a,H,f);  is_recfun(r,b,H,g);  
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
    93
       wellfounded(M,r);  trans(r);
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
    94
       M(f); M(g); M(r); M(x); M(a); M(b) |] 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    95
     ==> <x,a> \<in> r --> <x,b> \<in> r --> f`x=g`x"
13339
0f89104dd377 Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents: 13319
diff changeset
    96
apply (frule_tac f=f in is_recfun_type) 
0f89104dd377 Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents: 13319
diff changeset
    97
apply (frule_tac f=g in is_recfun_type) 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    98
apply (simp add: is_recfun_def)
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
    99
apply (erule_tac a=x in wellfounded_induct, assumption+)
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   100
txt{*Separation to justify the induction*}
13319
23de7b3af453 More Separation proofs
paulson
parents: 13306
diff changeset
   101
 apply (blast intro: is_recfun_separation') 
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   102
txt{*Now the inductive argument itself*}
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   103
apply clarify 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   104
apply (erule ssubst)+
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   105
apply (simp (no_asm_simp) add: vimage_singleton_iff restrict_def)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   106
apply (rename_tac x1)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   107
apply (rule_tac t="%z. H(x1,z)" in subst_context) 
13721
2cf506c09946 stylistic tweaks
paulson
parents: 13634
diff changeset
   108
apply (subgoal_tac "\<forall>y \<in> r-``{x1}. ALL z. <y,z>\<in>f <-> <y,z>\<in>g")
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   109
 apply (blast intro: transD) 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   110
apply (simp add: apply_iff) 
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   111
apply (blast intro: transD sym) 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   112
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   113
13564
1500a2e48d44 renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents: 13506
diff changeset
   114
lemma (in M_basic) is_recfun_cut: 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   115
    "[|is_recfun(r,a,H,f);  is_recfun(r,b,H,g);  
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   116
       wellfounded(M,r); trans(r); 
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   117
       M(f); M(g); M(r); <b,a> \<in> r |]   
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   118
      ==> restrict(f, r-``{b}) = g"
13339
0f89104dd377 Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents: 13319
diff changeset
   119
apply (frule_tac f=f in is_recfun_type) 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   120
apply (rule fun_extension) 
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   121
apply (blast intro: transD restrict_type2) 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   122
apply (erule is_recfun_type, simp) 
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   123
apply (blast intro: is_recfun_equal transD dest: transM) 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   124
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   125
13564
1500a2e48d44 renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents: 13506
diff changeset
   126
lemma (in M_basic) is_recfun_functional:
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   127
     "[|is_recfun(r,a,H,f);  is_recfun(r,a,H,g);  
13268
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   128
       wellfounded(M,r); trans(r); M(f); M(g); M(r) |] ==> f=g"
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   129
apply (rule fun_extension)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   130
apply (erule is_recfun_type)+
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   131
apply (blast intro!: is_recfun_equal dest: transM) 
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   132
done 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   133
13295
ca2e9b273472 document setup;
wenzelm
parents: 13293
diff changeset
   134
text{*Tells us that @{text is_recfun} can (in principle) be relativized.*}
13564
1500a2e48d44 renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents: 13506
diff changeset
   135
lemma (in M_basic) is_recfun_relativize:
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   136
  "[| M(r); M(f); \<forall>x[M]. \<forall>g[M]. function(g) --> M(H(x,g)) |] 
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   137
   ==> is_recfun(r,a,H,f) <->
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   138
       (\<forall>z[M]. z \<in> f <-> 
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   139
        (\<exists>x[M]. <x,a> \<in> r & z = <x, H(x, restrict(f, r-``{x}))>))";
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   140
apply (simp add: is_recfun_def lam_def)
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   141
apply (safe intro!: equalityI) 
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   142
   apply (drule equalityD1 [THEN subsetD], assumption) 
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   143
   apply (blast dest: pair_components_in_M) 
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   144
  apply (blast elim!: equalityE dest: pair_components_in_M)
13615
449a70d88b38 Numerous cosmetic changes, prompted by the new simplifier
paulson
parents: 13564
diff changeset
   145
 apply (frule transM, assumption) 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   146
 apply simp  
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   147
 apply blast
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   148
apply (subgoal_tac "is_function(M,f)")
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   149
 txt{*We use @{term "is_function"} rather than @{term "function"} because
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   150
      the subgoal's easier to prove with relativized quantifiers!*}
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   151
 prefer 2 apply (simp add: is_function_def) 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   152
apply (frule pair_components_in_M, assumption) 
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   153
apply (simp add: is_recfun_imp_function function_restrictI) 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   154
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   155
13564
1500a2e48d44 renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents: 13506
diff changeset
   156
lemma (in M_basic) is_recfun_restrict:
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   157
     "[| wellfounded(M,r); trans(r); is_recfun(r,x,H,f); \<langle>y,x\<rangle> \<in> r; 
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   158
       M(r); M(f); 
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   159
       \<forall>x[M]. \<forall>g[M]. function(g) --> M(H(x,g)) |]
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   160
       ==> is_recfun(r, y, H, restrict(f, r -`` {y}))"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   161
apply (frule pair_components_in_M, assumption, clarify) 
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   162
apply (simp (no_asm_simp) add: is_recfun_relativize restrict_iff
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   163
           trans_Int_eq)
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   164
apply safe
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   165
  apply (simp_all add: vimage_singleton_iff is_recfun_type [THEN apply_iff]) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   166
  apply (frule_tac x=xa in pair_components_in_M, assumption)
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   167
  apply (frule_tac x=xa in apply_recfun, blast intro: transD)  
13247
e3c289f0724b towards absoluteness of wfrec-defined functions
paulson
parents: 13245
diff changeset
   168
  apply (simp add: is_recfun_type [THEN apply_iff] 
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   169
                   is_recfun_imp_function function_restrictI)
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   170
apply (blast intro: apply_recfun dest: transD)
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   171
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   172
 
13564
1500a2e48d44 renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents: 13506
diff changeset
   173
lemma (in M_basic) restrict_Y_lemma:
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   174
   "[| wellfounded(M,r); trans(r); M(r);
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   175
       \<forall>x[M]. \<forall>g[M]. function(g) --> M(H(x,g));  M(Y);
13299
3a932abf97e8 More use of relativized quantifiers
paulson
parents: 13295
diff changeset
   176
       \<forall>b[M]. 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   177
	   b \<in> Y <->
13299
3a932abf97e8 More use of relativized quantifiers
paulson
parents: 13295
diff changeset
   178
	   (\<exists>x[M]. <x,a1> \<in> r &
3a932abf97e8 More use of relativized quantifiers
paulson
parents: 13295
diff changeset
   179
            (\<exists>y[M]. b = \<langle>x,y\<rangle> & (\<exists>g[M]. is_recfun(r,x,H,g) \<and> y = H(x,g))));
3a932abf97e8 More use of relativized quantifiers
paulson
parents: 13295
diff changeset
   180
          \<langle>x,a1\<rangle> \<in> r; is_recfun(r,x,H,f); M(f) |]
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   181
       ==> restrict(Y, r -`` {x}) = f"
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   182
apply (subgoal_tac "\<forall>y \<in> r-``{x}. \<forall>z. <y,z>:Y <-> <y,z>:f") 
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   183
 apply (simp (no_asm_simp) add: restrict_def) 
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   184
 apply (thin_tac "rall(M,?P)")+  --{*essential for efficiency*}
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   185
 apply (frule is_recfun_type [THEN fun_is_rel], blast)
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   186
apply (frule pair_components_in_M, assumption, clarify) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   187
apply (rule iffI)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13428
diff changeset
   188
 apply (frule_tac y="<y,z>" in transM, assumption)
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   189
 apply (clarsimp simp add: vimage_singleton_iff is_recfun_type [THEN apply_iff]
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   190
			   apply_recfun is_recfun_cut) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   191
txt{*Opposite inclusion: something in f, show in Y*}
13293
paulson
parents: 13269
diff changeset
   192
apply (frule_tac y="<y,z>" in transM, assumption)  
paulson
parents: 13269
diff changeset
   193
apply (simp add: vimage_singleton_iff) 
paulson
parents: 13269
diff changeset
   194
apply (rule conjI) 
paulson
parents: 13269
diff changeset
   195
 apply (blast dest: transD) 
13268
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   196
apply (rule_tac x="restrict(f, r -`` {y})" in rexI) 
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   197
apply (simp_all add: is_recfun_restrict
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   198
                     apply_recfun is_recfun_type [THEN apply_iff]) 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   199
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   200
13245
714f7a423a15 development and tweaks
paulson
parents: 13223
diff changeset
   201
text{*For typical applications of Replacement for recursive definitions*}
13564
1500a2e48d44 renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents: 13506
diff changeset
   202
lemma (in M_basic) univalent_is_recfun:
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   203
     "[|wellfounded(M,r); trans(r); M(r)|]
13268
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   204
      ==> univalent (M, A, \<lambda>x p. 
13293
paulson
parents: 13269
diff changeset
   205
              \<exists>y[M]. p = \<langle>x,y\<rangle> & (\<exists>f[M]. is_recfun(r,x,H,f) & y = H(x,f)))"
13245
714f7a423a15 development and tweaks
paulson
parents: 13223
diff changeset
   206
apply (simp add: univalent_def) 
714f7a423a15 development and tweaks
paulson
parents: 13223
diff changeset
   207
apply (blast dest: is_recfun_functional) 
714f7a423a15 development and tweaks
paulson
parents: 13223
diff changeset
   208
done
714f7a423a15 development and tweaks
paulson
parents: 13223
diff changeset
   209
13299
3a932abf97e8 More use of relativized quantifiers
paulson
parents: 13295
diff changeset
   210
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   211
text{*Proof of the inductive step for @{text exists_is_recfun}, since
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   212
      we must prove two versions.*}
13564
1500a2e48d44 renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents: 13506
diff changeset
   213
lemma (in M_basic) exists_is_recfun_indstep:
13268
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   214
    "[|\<forall>y. \<langle>y, a1\<rangle> \<in> r --> (\<exists>f[M]. is_recfun(r, y, H, f)); 
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   215
       wellfounded(M,r); trans(r); M(r); M(a1);
13268
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   216
       strong_replacement(M, \<lambda>x z. 
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   217
              \<exists>y[M]. \<exists>g[M]. pair(M,x,y,z) & is_recfun(r,x,H,g) & y = H(x,g)); 
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   218
       \<forall>x[M]. \<forall>g[M]. function(g) --> M(H(x,g))|]   
13268
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   219
      ==> \<exists>f[M]. is_recfun(r,a1,H,f)"
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   220
apply (drule_tac A="r-``{a1}" in strong_replacementD)
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   221
  apply blast 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   222
 txt{*Discharge the "univalent" obligation of Replacement*}
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   223
 apply (simp add: univalent_is_recfun) 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   224
txt{*Show that the constructed object satisfies @{text is_recfun}*} 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   225
apply clarify 
13268
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   226
apply (rule_tac x=Y in rexI)  
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   227
txt{*Unfold only the top-level occurrence of @{term is_recfun}*}
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   228
apply (simp (no_asm_simp) add: is_recfun_relativize [of concl: _ a1])
13268
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   229
txt{*The big iff-formula defining @{term Y} is now redundant*}
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   230
apply safe 
13299
3a932abf97e8 More use of relativized quantifiers
paulson
parents: 13295
diff changeset
   231
 apply (simp add: vimage_singleton_iff restrict_Y_lemma [of r H _ a1]) 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   232
txt{*one more case*}
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   233
apply (simp (no_asm_simp) add: Bex_def vimage_singleton_iff)
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   234
apply (drule_tac x1=x in spec [THEN mp], assumption, clarify) 
13268
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   235
apply (rename_tac f) 
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   236
apply (rule_tac x=f in rexI) 
13293
paulson
parents: 13269
diff changeset
   237
apply (simp_all add: restrict_Y_lemma [of r H])
13299
3a932abf97e8 More use of relativized quantifiers
paulson
parents: 13295
diff changeset
   238
txt{*FIXME: should not be needed!*}
3a932abf97e8 More use of relativized quantifiers
paulson
parents: 13295
diff changeset
   239
apply (subst restrict_Y_lemma [of r H])
3a932abf97e8 More use of relativized quantifiers
paulson
parents: 13295
diff changeset
   240
apply (simp add: vimage_singleton_iff)+
3a932abf97e8 More use of relativized quantifiers
paulson
parents: 13295
diff changeset
   241
apply blast+
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   242
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   243
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   244
text{*Relativized version, when we have the (currently weaker) premise
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   245
      @{term "wellfounded(M,r)"}*}
13564
1500a2e48d44 renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents: 13506
diff changeset
   246
lemma (in M_basic) wellfounded_exists_is_recfun:
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   247
    "[|wellfounded(M,r);  trans(r);  
13268
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   248
       separation(M, \<lambda>x. ~ (\<exists>f[M]. is_recfun(r, x, H, f)));
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   249
       strong_replacement(M, \<lambda>x z. 
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   250
          \<exists>y[M]. \<exists>g[M]. pair(M,x,y,z) & is_recfun(r,x,H,g) & y = H(x,g)); 
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   251
       M(r);  M(a);  
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   252
       \<forall>x[M]. \<forall>g[M]. function(g) --> M(H(x,g)) |]   
13268
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   253
      ==> \<exists>f[M]. is_recfun(r,a,H,f)"
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   254
apply (rule wellfounded_induct, assumption+, clarify)
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   255
apply (rule exists_is_recfun_indstep, assumption+)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   256
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   257
13564
1500a2e48d44 renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents: 13506
diff changeset
   258
lemma (in M_basic) wf_exists_is_recfun [rule_format]:
13268
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   259
    "[|wf(r);  trans(r);  M(r);  
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   260
       strong_replacement(M, \<lambda>x z. 
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   261
         \<exists>y[M]. \<exists>g[M]. pair(M,x,y,z) & is_recfun(r,x,H,g) & y = H(x,g)); 
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   262
       \<forall>x[M]. \<forall>g[M]. function(g) --> M(H(x,g)) |]   
13268
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   263
      ==> M(a) --> (\<exists>f[M]. is_recfun(r,a,H,f))"
13251
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   264
apply (rule wf_induct, assumption+)
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   265
apply (frule wf_imp_relativized)
74cb2af8811e new treatment of wfrec, replacing wf[A](r) by wf(r)
paulson
parents: 13247
diff changeset
   266
apply (intro impI)
13268
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   267
apply (rule exists_is_recfun_indstep) 
240509babf00 more use of relativized quantifiers
paulson
parents: 13254
diff changeset
   268
      apply (blast dest: transM del: rev_rallE, assumption+)
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   269
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   270
13506
acc18a5d2b1a Various tweaks of the presentation
paulson
parents: 13505
diff changeset
   271
acc18a5d2b1a Various tweaks of the presentation
paulson
parents: 13505
diff changeset
   272
subsection{*Relativization of the ZF Predicate @{term is_recfun}*}
acc18a5d2b1a Various tweaks of the presentation
paulson
parents: 13505
diff changeset
   273
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   274
constdefs
13353
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   275
  M_is_recfun :: "[i=>o, [i,i,i]=>o, i, i, i] => o"
13352
3cd767f8d78b new definitions of fun_apply and M_is_recfun
paulson
parents: 13350
diff changeset
   276
   "M_is_recfun(M,MH,r,a,f) == 
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   277
     \<forall>z[M]. z \<in> f <-> 
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   278
            (\<exists>x[M]. \<exists>y[M]. \<exists>xa[M]. \<exists>sx[M]. \<exists>r_sx[M]. \<exists>f_r_sx[M]. 
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   279
	       pair(M,x,y,z) & pair(M,x,a,xa) & upair(M,x,x,sx) &
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   280
               pre_image(M,r,sx,r_sx) & restriction(M,f,r_sx,f_r_sx) &
13348
374d05460db4 Separation/Replacement up to M_wfrank!
paulson
parents: 13339
diff changeset
   281
               xa \<in> r & MH(x, f_r_sx, y))"
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   282
13353
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   283
  is_wfrec :: "[i=>o, [i,i,i]=>o, i, i, i] => o"
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   284
   "is_wfrec(M,MH,r,a,z) == 
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   285
      \<exists>f[M]. M_is_recfun(M,MH,r,a,f) & MH(a,f,z)"
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   286
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   287
  wfrec_replacement :: "[i=>o, [i,i,i]=>o, i] => o"
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   288
   "wfrec_replacement(M,MH,r) ==
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   289
        strong_replacement(M, 
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   290
             \<lambda>x z. \<exists>y[M]. pair(M,x,y,z) & is_wfrec(M,MH,r,x,y))"
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   291
13564
1500a2e48d44 renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents: 13506
diff changeset
   292
lemma (in M_basic) is_recfun_abs:
13350
paulson
parents: 13348
diff changeset
   293
     "[| \<forall>x[M]. \<forall>g[M]. function(g) --> M(H(x,g));  M(r); M(a); M(f); 
13634
99a593b49b04 Re-organization of Constructible theories
paulson
parents: 13615
diff changeset
   294
         relation2(M,MH,H) |] 
13352
3cd767f8d78b new definitions of fun_apply and M_is_recfun
paulson
parents: 13350
diff changeset
   295
      ==> M_is_recfun(M,MH,r,a,f) <-> is_recfun(r,a,H,f)"
13634
99a593b49b04 Re-organization of Constructible theories
paulson
parents: 13615
diff changeset
   296
apply (simp add: M_is_recfun_def relation2_def is_recfun_relativize)
13254
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   297
apply (rule rall_cong)
5146ccaedf42 class quantifiers (some)
paulson
parents: 13251
diff changeset
   298
apply (blast dest: transM)
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   299
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   300
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   301
lemma M_is_recfun_cong [cong]:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   302
     "[| r = r'; a = a'; f = f'; 
13348
374d05460db4 Separation/Replacement up to M_wfrank!
paulson
parents: 13339
diff changeset
   303
       !!x g y. [| M(x); M(g); M(y) |] ==> MH(x,g,y) <-> MH'(x,g,y) |]
13352
3cd767f8d78b new definitions of fun_apply and M_is_recfun
paulson
parents: 13350
diff changeset
   304
      ==> M_is_recfun(M,MH,r,a,f) <-> M_is_recfun(M,MH',r',a',f')"
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   305
by (simp add: M_is_recfun_def) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   306
13564
1500a2e48d44 renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents: 13506
diff changeset
   307
lemma (in M_basic) is_wfrec_abs:
13353
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   308
     "[| \<forall>x[M]. \<forall>g[M]. function(g) --> M(H(x,g)); 
13634
99a593b49b04 Re-organization of Constructible theories
paulson
parents: 13615
diff changeset
   309
         relation2(M,MH,H);  M(r); M(a); M(z) |]
13353
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   310
      ==> is_wfrec(M,MH,r,a,z) <-> 
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   311
          (\<exists>g[M]. is_recfun(r,a,H,g) & z = H(a,g))"
13634
99a593b49b04 Re-organization of Constructible theories
paulson
parents: 13615
diff changeset
   312
by (simp add: is_wfrec_def relation2_def is_recfun_abs)
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   313
13353
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   314
text{*Relating @{term wfrec_replacement} to native constructs*}
13564
1500a2e48d44 renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents: 13506
diff changeset
   315
lemma (in M_basic) wfrec_replacement':
13353
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   316
  "[|wfrec_replacement(M,MH,r);
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   317
     \<forall>x[M]. \<forall>g[M]. function(g) --> M(H(x,g)); 
13634
99a593b49b04 Re-organization of Constructible theories
paulson
parents: 13615
diff changeset
   318
     relation2(M,MH,H);  M(r)|] 
13353
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   319
   ==> strong_replacement(M, \<lambda>x z. \<exists>y[M]. 
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   320
                pair(M,x,y,z) & (\<exists>g[M]. is_recfun(r,x,H,g) & y = H(x,g)))"
13615
449a70d88b38 Numerous cosmetic changes, prompted by the new simplifier
paulson
parents: 13564
diff changeset
   321
by (simp add: wfrec_replacement_def is_wfrec_abs) 
13353
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   322
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   323
lemma wfrec_replacement_cong [cong]:
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   324
     "[| !!x y z. [| M(x); M(y); M(z) |] ==> MH(x,y,z) <-> MH'(x,y,z);
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   325
         r=r' |] 
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   326
      ==> wfrec_replacement(M, %x y. MH(x,y), r) <-> 
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   327
          wfrec_replacement(M, %x y. MH'(x,y), r')" 
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   328
by (simp add: is_wfrec_def wfrec_replacement_def) 
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   329
1800e7134d2e towards relativization of "iterates" and "wfrec"
paulson
parents: 13352
diff changeset
   330
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   331
end
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   332