src/ZF/Constructible/WF_absolute.thy
author wenzelm
Mon Dec 07 10:23:50 2015 +0100 (2015-12-07)
changeset 61798 27f3c10b0b50
parent 60770 240563fbf41d
child 67443 3abf6a722518
permissions -rw-r--r--
isabelle update_cartouches -c -t;
paulson@13505
     1
(*  Title:      ZF/Constructible/WF_absolute.thy
paulson@13505
     2
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
paulson@13505
     3
*)
paulson@13505
     4
wenzelm@60770
     5
section \<open>Absoluteness of Well-Founded Recursion\<close>
paulson@13306
     6
haftmann@16417
     7
theory WF_absolute imports WFrec begin
paulson@13223
     8
wenzelm@60770
     9
subsection\<open>Transitive closure without fixedpoints\<close>
paulson@13223
    10
wenzelm@21233
    11
definition
wenzelm@21404
    12
  rtrancl_alt :: "[i,i]=>i" where
paulson@13251
    13
    "rtrancl_alt(A,r) ==
paulson@13223
    14
       {p \<in> A*A. \<exists>n\<in>nat. \<exists>f \<in> succ(n) -> A.
paulson@13242
    15
                 (\<exists>x y. p = <x,y> &  f`0 = x & f`n = y) &
paulson@13223
    16
                       (\<forall>i\<in>n. <f`i, f`succ(i)> \<in> r)}"
paulson@13223
    17
paulson@13251
    18
lemma alt_rtrancl_lemma1 [rule_format]:
paulson@13223
    19
    "n \<in> nat
paulson@13251
    20
     ==> \<forall>f \<in> succ(n) -> field(r).
paulson@46823
    21
         (\<forall>i\<in>n. \<langle>f`i, f ` succ(i)\<rangle> \<in> r) \<longrightarrow> \<langle>f`0, f`n\<rangle> \<in> r^*"
paulson@13251
    22
apply (induct_tac n)
paulson@13251
    23
apply (simp_all add: apply_funtype rtrancl_refl, clarify)
paulson@13251
    24
apply (rename_tac n f)
paulson@13251
    25
apply (rule rtrancl_into_rtrancl)
paulson@13223
    26
 prefer 2 apply assumption
paulson@13223
    27
apply (drule_tac x="restrict(f,succ(n))" in bspec)
paulson@13251
    28
 apply (blast intro: restrict_type2)
paulson@13251
    29
apply (simp add: Ord_succ_mem_iff nat_0_le [THEN ltD] leI [THEN ltD] ltI)
paulson@13223
    30
done
paulson@13223
    31
paulson@46823
    32
lemma rtrancl_alt_subset_rtrancl: "rtrancl_alt(field(r),r) \<subseteq> r^*"
paulson@13223
    33
apply (simp add: rtrancl_alt_def)
paulson@13251
    34
apply (blast intro: alt_rtrancl_lemma1)
paulson@13223
    35
done
paulson@13223
    36
paulson@46823
    37
lemma rtrancl_subset_rtrancl_alt: "r^* \<subseteq> rtrancl_alt(field(r),r)"
paulson@13251
    38
apply (simp add: rtrancl_alt_def, clarify)
paulson@13251
    39
apply (frule rtrancl_type [THEN subsetD], clarify, simp)
paulson@13251
    40
apply (erule rtrancl_induct)
wenzelm@60770
    41
 txt\<open>Base case, trivial\<close>
paulson@13251
    42
 apply (rule_tac x=0 in bexI)
paulson@46823
    43
  apply (rule_tac x="\<lambda>x\<in>1. xa" in bexI)
paulson@13251
    44
   apply simp_all
wenzelm@60770
    45
txt\<open>Inductive step\<close>
paulson@13251
    46
apply clarify
paulson@13251
    47
apply (rename_tac n f)
paulson@13251
    48
apply (rule_tac x="succ(n)" in bexI)
paulson@46823
    49
 apply (rule_tac x="\<lambda>i\<in>succ(succ(n)). if i=succ(n) then z else f`i" in bexI)
paulson@13251
    50
  apply (simp add: Ord_succ_mem_iff nat_0_le [THEN ltD] leI [THEN ltD] ltI)
paulson@13251
    51
  apply (blast intro: mem_asym)
paulson@13251
    52
 apply typecheck
paulson@13251
    53
 apply auto
paulson@13223
    54
done
paulson@13223
    55
paulson@13223
    56
lemma rtrancl_alt_eq_rtrancl: "rtrancl_alt(field(r),r) = r^*"
paulson@13223
    57
by (blast del: subsetI
wenzelm@32960
    58
          intro: rtrancl_alt_subset_rtrancl rtrancl_subset_rtrancl_alt)
paulson@13223
    59
paulson@13223
    60
wenzelm@21233
    61
definition
wenzelm@21404
    62
  rtran_closure_mem :: "[i=>o,i,i,i] => o" where
wenzelm@61798
    63
    \<comment>\<open>The property of belonging to \<open>rtran_closure(r)\<close>\<close>
paulson@13324
    64
    "rtran_closure_mem(M,A,r,p) ==
wenzelm@32960
    65
              \<exists>nnat[M]. \<exists>n[M]. \<exists>n'[M]. 
paulson@13324
    66
               omega(M,nnat) & n\<in>nnat & successor(M,n,n') &
wenzelm@32960
    67
               (\<exists>f[M]. typed_function(M,n',A,f) &
wenzelm@32960
    68
                (\<exists>x[M]. \<exists>y[M]. \<exists>zero[M]. pair(M,x,y,p) & empty(M,zero) &
wenzelm@32960
    69
                  fun_apply(M,f,zero,x) & fun_apply(M,f,n,y)) &
paulson@46823
    70
                  (\<forall>j[M]. j\<in>n \<longrightarrow> 
wenzelm@32960
    71
                    (\<exists>fj[M]. \<exists>sj[M]. \<exists>fsj[M]. \<exists>ffp[M]. 
wenzelm@32960
    72
                      fun_apply(M,f,j,fj) & successor(M,j,sj) &
wenzelm@32960
    73
                      fun_apply(M,f,sj,fsj) & pair(M,fj,fsj,ffp) & ffp \<in> r)))"
paulson@13324
    74
wenzelm@21404
    75
definition
wenzelm@21404
    76
  rtran_closure :: "[i=>o,i,i] => o" where
paulson@13324
    77
    "rtran_closure(M,r,s) == 
paulson@46823
    78
        \<forall>A[M]. is_field(M,r,A) \<longrightarrow>
paulson@46823
    79
         (\<forall>p[M]. p \<in> s \<longleftrightarrow> rtran_closure_mem(M,A,r,p))"
paulson@13242
    80
wenzelm@21404
    81
definition
wenzelm@21404
    82
  tran_closure :: "[i=>o,i,i] => o" where
paulson@13251
    83
    "tran_closure(M,r,t) ==
paulson@13268
    84
         \<exists>s[M]. rtran_closure(M,r,s) & composition(M,r,s,t)"
paulson@13242
    85
paulson@13564
    86
lemma (in M_basic) rtran_closure_mem_iff:
paulson@13324
    87
     "[|M(A); M(r); M(p)|]
paulson@46823
    88
      ==> rtran_closure_mem(M,A,r,p) \<longleftrightarrow>
paulson@13324
    89
          (\<exists>n[M]. n\<in>nat & 
paulson@13324
    90
           (\<exists>f[M]. f \<in> succ(n) -> A &
paulson@13324
    91
            (\<exists>x[M]. \<exists>y[M]. p = <x,y> & f`0 = x & f`n = y) &
paulson@13324
    92
                           (\<forall>i\<in>n. <f`i, f`succ(i)> \<in> r)))"
paulson@13352
    93
by (simp add: rtran_closure_mem_def Ord_succ_mem_iff nat_0_le [THEN ltD]) 
paulson@13352
    94
paulson@13242
    95
paulson@13564
    96
locale M_trancl = M_basic +
paulson@13242
    97
  assumes rtrancl_separation:
wenzelm@32960
    98
         "[| M(r); M(A) |] ==> separation (M, rtran_closure_mem(M,A,r))"
paulson@13242
    99
      and wellfounded_trancl_separation:
wenzelm@32960
   100
         "[| M(r); M(Z) |] ==> 
wenzelm@32960
   101
          separation (M, \<lambda>x. 
wenzelm@32960
   102
              \<exists>w[M]. \<exists>wx[M]. \<exists>rp[M]. 
wenzelm@32960
   103
               w \<in> Z & pair(M,w,x,wx) & tran_closure(M,r,rp) & wx \<in> rp)"
paulson@13242
   104
paulson@13242
   105
paulson@13251
   106
lemma (in M_trancl) rtran_closure_rtrancl:
paulson@13242
   107
     "M(r) ==> rtran_closure(M,r,rtrancl(r))"
paulson@13324
   108
apply (simp add: rtran_closure_def rtran_closure_mem_iff 
paulson@13324
   109
                 rtrancl_alt_eq_rtrancl [symmetric] rtrancl_alt_def)
paulson@13339
   110
apply (auto simp add: nat_0_le [THEN ltD] apply_funtype) 
paulson@13242
   111
done
paulson@13242
   112
paulson@13251
   113
lemma (in M_trancl) rtrancl_closed [intro,simp]:
paulson@13242
   114
     "M(r) ==> M(rtrancl(r))"
paulson@13251
   115
apply (insert rtrancl_separation [of r "field(r)"])
paulson@13251
   116
apply (simp add: rtrancl_alt_eq_rtrancl [symmetric]
paulson@13324
   117
                 rtrancl_alt_def rtran_closure_mem_iff)
paulson@13242
   118
done
paulson@13242
   119
paulson@13251
   120
lemma (in M_trancl) rtrancl_abs [simp]:
paulson@46823
   121
     "[| M(r); M(z) |] ==> rtran_closure(M,r,z) \<longleftrightarrow> z = rtrancl(r)"
paulson@13242
   122
apply (rule iffI)
wenzelm@60770
   123
 txt\<open>Proving the right-to-left implication\<close>
paulson@13251
   124
 prefer 2 apply (blast intro: rtran_closure_rtrancl)
paulson@13242
   125
apply (rule M_equalityI)
paulson@13251
   126
apply (simp add: rtran_closure_def rtrancl_alt_eq_rtrancl [symmetric]
paulson@13324
   127
                 rtrancl_alt_def rtran_closure_mem_iff)
paulson@13339
   128
apply (auto simp add: nat_0_le [THEN ltD] apply_funtype) 
paulson@13242
   129
done
paulson@13242
   130
paulson@13251
   131
lemma (in M_trancl) trancl_closed [intro,simp]:
paulson@13242
   132
     "M(r) ==> M(trancl(r))"
paulson@13251
   133
by (simp add: trancl_def comp_closed rtrancl_closed)
paulson@13242
   134
paulson@13251
   135
lemma (in M_trancl) trancl_abs [simp]:
paulson@46823
   136
     "[| M(r); M(z) |] ==> tran_closure(M,r,z) \<longleftrightarrow> z = trancl(r)"
paulson@13251
   137
by (simp add: tran_closure_def trancl_def)
paulson@13242
   138
paulson@13323
   139
lemma (in M_trancl) wellfounded_trancl_separation':
paulson@13323
   140
     "[| M(r); M(Z) |] ==> separation (M, \<lambda>x. \<exists>w[M]. w \<in> Z & <w,x> \<in> r^+)"
paulson@13323
   141
by (insert wellfounded_trancl_separation [of r Z], simp) 
paulson@13242
   142
wenzelm@61798
   143
text\<open>Alternative proof of \<open>wf_on_trancl\<close>; inspiration for the
wenzelm@60770
   144
      relativized version.  Original version is on theory WF.\<close>
paulson@46823
   145
lemma "[| wf[A](r);  r-``A \<subseteq> A |] ==> wf[A](r^+)"
paulson@13251
   146
apply (simp add: wf_on_def wf_def)
paulson@13242
   147
apply (safe intro!: equalityI)
paulson@13251
   148
apply (drule_tac x = "{x\<in>A. \<exists>w. \<langle>w,x\<rangle> \<in> r^+ & w \<in> Z}" in spec)
paulson@13251
   149
apply (blast elim: tranclE)
paulson@13242
   150
done
paulson@13242
   151
paulson@13242
   152
lemma (in M_trancl) wellfounded_on_trancl:
paulson@46823
   153
     "[| wellfounded_on(M,A,r);  r-``A \<subseteq> A; M(r); M(A) |]
paulson@13251
   154
      ==> wellfounded_on(M,A,r^+)"
paulson@13251
   155
apply (simp add: wellfounded_on_def)
paulson@13242
   156
apply (safe intro!: equalityI)
paulson@13242
   157
apply (rename_tac Z x)
paulson@13268
   158
apply (subgoal_tac "M({x\<in>A. \<exists>w[M]. w \<in> Z & \<langle>w,x\<rangle> \<in> r^+})")
paulson@13251
   159
 prefer 2
paulson@13323
   160
 apply (blast intro: wellfounded_trancl_separation') 
paulson@13299
   161
apply (drule_tac x = "{x\<in>A. \<exists>w[M]. w \<in> Z & \<langle>w,x\<rangle> \<in> r^+}" in rspec, safe)
paulson@13251
   162
apply (blast dest: transM, simp)
paulson@13251
   163
apply (rename_tac y w)
paulson@13242
   164
apply (drule_tac x=w in bspec, assumption, clarify)
paulson@13242
   165
apply (erule tranclE)
paulson@13242
   166
  apply (blast dest: transM)   (*transM is needed to prove M(xa)*)
paulson@13251
   167
 apply blast
paulson@13242
   168
done
paulson@13242
   169
paulson@13251
   170
lemma (in M_trancl) wellfounded_trancl:
paulson@13251
   171
     "[|wellfounded(M,r); M(r)|] ==> wellfounded(M,r^+)"
paulson@13251
   172
apply (simp add: wellfounded_iff_wellfounded_on_field)
paulson@13251
   173
apply (rule wellfounded_on_subset_A, erule wellfounded_on_trancl)
paulson@13251
   174
   apply blast
paulson@13251
   175
  apply (simp_all add: trancl_type [THEN field_rel_subset])
paulson@13251
   176
done
paulson@13242
   177
paulson@13223
   178
wenzelm@60770
   179
text\<open>Absoluteness for wfrec-defined functions.\<close>
paulson@13254
   180
paulson@13254
   181
(*first use is_recfun, then M_is_recfun*)
paulson@13254
   182
paulson@13254
   183
lemma (in M_trancl) wfrec_relativize:
paulson@13254
   184
  "[|wf(r); M(a); M(r);  
paulson@13268
   185
     strong_replacement(M, \<lambda>x z. \<exists>y[M]. \<exists>g[M].
paulson@13254
   186
          pair(M,x,y,z) & 
paulson@13254
   187
          is_recfun(r^+, x, \<lambda>x f. H(x, restrict(f, r -`` {x})), g) & 
paulson@13254
   188
          y = H(x, restrict(g, r -`` {x}))); 
paulson@46823
   189
     \<forall>x[M]. \<forall>g[M]. function(g) \<longrightarrow> M(H(x,g))|] 
paulson@46823
   190
   ==> wfrec(r,a,H) = z \<longleftrightarrow> 
paulson@13268
   191
       (\<exists>f[M]. is_recfun(r^+, a, \<lambda>x f. H(x, restrict(f, r -`` {x})), f) & 
paulson@13254
   192
            z = H(a,restrict(f,r-``{a})))"
paulson@13254
   193
apply (frule wf_trancl) 
paulson@13254
   194
apply (simp add: wftrec_def wfrec_def, safe)
paulson@13254
   195
 apply (frule wf_exists_is_recfun 
paulson@13254
   196
              [of concl: "r^+" a "\<lambda>x f. H(x, restrict(f, r -`` {x}))"]) 
paulson@13254
   197
      apply (simp_all add: trans_trancl function_restrictI trancl_subset_times)
paulson@13268
   198
 apply (clarify, rule_tac x=x in rexI) 
paulson@13254
   199
 apply (simp_all add: the_recfun_eq trans_trancl trancl_subset_times)
paulson@13254
   200
done
paulson@13254
   201
paulson@13254
   202
wenzelm@61798
   203
text\<open>Assuming @{term r} is transitive simplifies the occurrences of \<open>H\<close>.
paulson@13254
   204
      The premise @{term "relation(r)"} is necessary 
wenzelm@60770
   205
      before we can replace @{term "r^+"} by @{term r}.\<close>
paulson@13254
   206
theorem (in M_trancl) trans_wfrec_relativize:
paulson@13254
   207
  "[|wf(r);  trans(r);  relation(r);  M(r);  M(a);
paulson@13634
   208
     wfrec_replacement(M,MH,r);  relation2(M,MH,H);
paulson@46823
   209
     \<forall>x[M]. \<forall>g[M]. function(g) \<longrightarrow> M(H(x,g))|] 
paulson@46823
   210
   ==> wfrec(r,a,H) = z \<longleftrightarrow> (\<exists>f[M]. is_recfun(r,a,H,f) & z = H(a,f))" 
paulson@13353
   211
apply (frule wfrec_replacement', assumption+) 
paulson@13353
   212
apply (simp cong: is_recfun_cong
paulson@13353
   213
           add: wfrec_relativize trancl_eq_r
paulson@13353
   214
                is_recfun_restrict_idem domain_restrict_idem)
paulson@13353
   215
done
paulson@13254
   216
paulson@13353
   217
theorem (in M_trancl) trans_wfrec_abs:
paulson@13353
   218
  "[|wf(r);  trans(r);  relation(r);  M(r);  M(a);  M(z);
paulson@13634
   219
     wfrec_replacement(M,MH,r);  relation2(M,MH,H);
paulson@46823
   220
     \<forall>x[M]. \<forall>g[M]. function(g) \<longrightarrow> M(H(x,g))|] 
paulson@46823
   221
   ==> is_wfrec(M,MH,r,a,z) \<longleftrightarrow> z=wfrec(r,a,H)" 
paulson@13634
   222
by (simp add: trans_wfrec_relativize [THEN iff_sym] is_wfrec_abs, blast) 
paulson@13634
   223
paulson@13254
   224
paulson@13254
   225
lemma (in M_trancl) trans_eq_pair_wfrec_iff:
paulson@13254
   226
  "[|wf(r);  trans(r); relation(r); M(r);  M(y); 
paulson@13634
   227
     wfrec_replacement(M,MH,r);  relation2(M,MH,H);
paulson@46823
   228
     \<forall>x[M]. \<forall>g[M]. function(g) \<longrightarrow> M(H(x,g))|] 
paulson@46823
   229
   ==> y = <x, wfrec(r, x, H)> \<longleftrightarrow> 
paulson@13268
   230
       (\<exists>f[M]. is_recfun(r,x,H,f) & y = <x, H(x,f)>)"
paulson@13293
   231
apply safe 
paulson@13293
   232
 apply (simp add: trans_wfrec_relativize [THEN iff_sym, of concl: _ x]) 
wenzelm@60770
   233
txt\<open>converse direction\<close>
paulson@13254
   234
apply (rule sym)
paulson@13254
   235
apply (simp add: trans_wfrec_relativize, blast) 
paulson@13254
   236
done
paulson@13254
   237
paulson@13254
   238
wenzelm@60770
   239
subsection\<open>M is closed under well-founded recursion\<close>
paulson@13254
   240
wenzelm@61798
   241
text\<open>Lemma with the awkward premise mentioning \<open>wfrec\<close>.\<close>
paulson@13634
   242
lemma (in M_trancl) wfrec_closed_lemma [rule_format]:
paulson@13254
   243
     "[|wf(r); M(r); 
paulson@13254
   244
        strong_replacement(M, \<lambda>x y. y = \<langle>x, wfrec(r, x, H)\<rangle>);
paulson@46823
   245
        \<forall>x[M]. \<forall>g[M]. function(g) \<longrightarrow> M(H(x,g)) |] 
paulson@46823
   246
      ==> M(a) \<longrightarrow> M(wfrec(r,a,H))"
paulson@13254
   247
apply (rule_tac a=a in wf_induct, assumption+)
paulson@13254
   248
apply (subst wfrec, assumption, clarify)
paulson@13254
   249
apply (drule_tac x1=x and x="\<lambda>x\<in>r -`` {x}. wfrec(r, x, H)" 
paulson@13254
   250
       in rspec [THEN rspec]) 
paulson@13254
   251
apply (simp_all add: function_lam) 
paulson@13505
   252
apply (blast intro: lam_closed dest: pair_components_in_M) 
paulson@13254
   253
done
paulson@13254
   254
wenzelm@60770
   255
text\<open>Eliminates one instance of replacement.\<close>
paulson@13634
   256
lemma (in M_trancl) wfrec_replacement_iff:
paulson@13353
   257
     "strong_replacement(M, \<lambda>x z. 
paulson@46823
   258
          \<exists>y[M]. pair(M,x,y,z) & (\<exists>g[M]. is_recfun(r,x,H,g) & y = H(x,g))) \<longleftrightarrow>
paulson@13254
   259
      strong_replacement(M, 
paulson@13268
   260
           \<lambda>x y. \<exists>f[M]. is_recfun(r,x,H,f) & y = <x, H(x,f)>)"
paulson@13254
   261
apply simp 
paulson@13254
   262
apply (rule strong_replacement_cong, blast) 
paulson@13254
   263
done
paulson@13254
   264
wenzelm@60770
   265
text\<open>Useful version for transitive relations\<close>
paulson@13634
   266
theorem (in M_trancl) trans_wfrec_closed:
paulson@13254
   267
     "[|wf(r); trans(r); relation(r); M(r); M(a);
paulson@13634
   268
       wfrec_replacement(M,MH,r);  relation2(M,MH,H);
paulson@46823
   269
        \<forall>x[M]. \<forall>g[M]. function(g) \<longrightarrow> M(H(x,g)) |] 
paulson@13254
   270
      ==> M(wfrec(r,a,H))"
paulson@13353
   271
apply (frule wfrec_replacement', assumption+) 
paulson@13254
   272
apply (frule wfrec_replacement_iff [THEN iffD1]) 
paulson@13254
   273
apply (rule wfrec_closed_lemma, assumption+) 
paulson@13254
   274
apply (simp_all add: wfrec_replacement_iff trans_eq_pair_wfrec_iff) 
paulson@13254
   275
done
paulson@13254
   276
wenzelm@60770
   277
subsection\<open>Absoluteness without assuming transitivity\<close>
paulson@13254
   278
lemma (in M_trancl) eq_pair_wfrec_iff:
paulson@13254
   279
  "[|wf(r);  M(r);  M(y); 
paulson@13268
   280
     strong_replacement(M, \<lambda>x z. \<exists>y[M]. \<exists>g[M].
paulson@13254
   281
          pair(M,x,y,z) & 
paulson@13254
   282
          is_recfun(r^+, x, \<lambda>x f. H(x, restrict(f, r -`` {x})), g) & 
paulson@13254
   283
          y = H(x, restrict(g, r -`` {x}))); 
paulson@46823
   284
     \<forall>x[M]. \<forall>g[M]. function(g) \<longrightarrow> M(H(x,g))|] 
paulson@46823
   285
   ==> y = <x, wfrec(r, x, H)> \<longleftrightarrow> 
paulson@13268
   286
       (\<exists>f[M]. is_recfun(r^+, x, \<lambda>x f. H(x, restrict(f, r -`` {x})), f) & 
paulson@13254
   287
            y = <x, H(x,restrict(f,r-``{x}))>)"
paulson@13254
   288
apply safe  
paulson@13293
   289
 apply (simp add: wfrec_relativize [THEN iff_sym, of concl: _ x]) 
wenzelm@60770
   290
txt\<open>converse direction\<close>
paulson@13254
   291
apply (rule sym)
paulson@13254
   292
apply (simp add: wfrec_relativize, blast) 
paulson@13254
   293
done
paulson@13254
   294
wenzelm@60770
   295
text\<open>Full version not assuming transitivity, but maybe not very useful.\<close>
paulson@13634
   296
theorem (in M_trancl) wfrec_closed:
paulson@13254
   297
     "[|wf(r); M(r); M(a);
paulson@13353
   298
        wfrec_replacement(M,MH,r^+);  
paulson@13634
   299
        relation2(M,MH, \<lambda>x f. H(x, restrict(f, r -`` {x})));
paulson@46823
   300
        \<forall>x[M]. \<forall>g[M]. function(g) \<longrightarrow> M(H(x,g)) |] 
paulson@13254
   301
      ==> M(wfrec(r,a,H))"
paulson@13353
   302
apply (frule wfrec_replacement' 
paulson@13353
   303
               [of MH "r^+" "\<lambda>x f. H(x, restrict(f, r -`` {x}))"])
paulson@13353
   304
   prefer 4
paulson@13353
   305
   apply (frule wfrec_replacement_iff [THEN iffD1]) 
paulson@13353
   306
   apply (rule wfrec_closed_lemma, assumption+) 
paulson@13353
   307
     apply (simp_all add: eq_pair_wfrec_iff func.function_restrictI) 
paulson@13254
   308
done
paulson@13254
   309
paulson@13223
   310
end