src/ZF/Constructible/Rec_Separation.thy
author paulson
Thu Feb 06 11:01:05 2003 +0100 (2003-02-06)
changeset 13807 a28a8fbc76d4
parent 13687 22dce9134953
child 15766 b08feb003f3c
permissions -rw-r--r--
changed ** to ## to avoid conflict with new comment syntax
     1 (*  Title:      ZF/Constructible/Rec_Separation.thy
     2     ID:   $Id$
     3     Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
     4 *)
     5 
     6 header {*Separation for Facts About Recursion*}
     7 
     8 theory Rec_Separation = Separation + Internalize:
     9 
    10 text{*This theory proves all instances needed for locales @{text
    11 "M_trancl"} and @{text "M_datatypes"}*}
    12 
    13 lemma eq_succ_imp_lt: "[|i = succ(j); Ord(i)|] ==> j<i"
    14 by simp
    15 
    16 
    17 subsection{*The Locale @{text "M_trancl"}*}
    18 
    19 subsubsection{*Separation for Reflexive/Transitive Closure*}
    20 
    21 text{*First, The Defining Formula*}
    22 
    23 (* "rtran_closure_mem(M,A,r,p) ==
    24       \<exists>nnat[M]. \<exists>n[M]. \<exists>n'[M].
    25        omega(M,nnat) & n\<in>nnat & successor(M,n,n') &
    26        (\<exists>f[M]. typed_function(M,n',A,f) &
    27         (\<exists>x[M]. \<exists>y[M]. \<exists>zero[M]. pair(M,x,y,p) & empty(M,zero) &
    28           fun_apply(M,f,zero,x) & fun_apply(M,f,n,y)) &
    29         (\<forall>j[M]. j\<in>n -->
    30           (\<exists>fj[M]. \<exists>sj[M]. \<exists>fsj[M]. \<exists>ffp[M].
    31             fun_apply(M,f,j,fj) & successor(M,j,sj) &
    32             fun_apply(M,f,sj,fsj) & pair(M,fj,fsj,ffp) & ffp \<in> r)))"*)
    33 constdefs rtran_closure_mem_fm :: "[i,i,i]=>i"
    34  "rtran_closure_mem_fm(A,r,p) ==
    35    Exists(Exists(Exists(
    36     And(omega_fm(2),
    37      And(Member(1,2),
    38       And(succ_fm(1,0),
    39        Exists(And(typed_function_fm(1, A#+4, 0),
    40         And(Exists(Exists(Exists(
    41               And(pair_fm(2,1,p#+7),
    42                And(empty_fm(0),
    43                 And(fun_apply_fm(3,0,2), fun_apply_fm(3,5,1))))))),
    44             Forall(Implies(Member(0,3),
    45              Exists(Exists(Exists(Exists(
    46               And(fun_apply_fm(5,4,3),
    47                And(succ_fm(4,2),
    48                 And(fun_apply_fm(5,2,1),
    49                  And(pair_fm(3,1,0), Member(0,r#+9))))))))))))))))))))"
    50 
    51 
    52 lemma rtran_closure_mem_type [TC]:
    53  "[| x \<in> nat; y \<in> nat; z \<in> nat |] ==> rtran_closure_mem_fm(x,y,z) \<in> formula"
    54 by (simp add: rtran_closure_mem_fm_def)
    55 
    56 lemma sats_rtran_closure_mem_fm [simp]:
    57    "[| x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|]
    58     ==> sats(A, rtran_closure_mem_fm(x,y,z), env) <->
    59         rtran_closure_mem(##A, nth(x,env), nth(y,env), nth(z,env))"
    60 by (simp add: rtran_closure_mem_fm_def rtran_closure_mem_def)
    61 
    62 lemma rtran_closure_mem_iff_sats:
    63       "[| nth(i,env) = x; nth(j,env) = y; nth(k,env) = z;
    64           i \<in> nat; j \<in> nat; k \<in> nat; env \<in> list(A)|]
    65        ==> rtran_closure_mem(##A, x, y, z) <-> sats(A, rtran_closure_mem_fm(i,j,k), env)"
    66 by (simp add: sats_rtran_closure_mem_fm)
    67 
    68 lemma rtran_closure_mem_reflection:
    69      "REFLECTS[\<lambda>x. rtran_closure_mem(L,f(x),g(x),h(x)),
    70                \<lambda>i x. rtran_closure_mem(##Lset(i),f(x),g(x),h(x))]"
    71 apply (simp only: rtran_closure_mem_def)
    72 apply (intro FOL_reflections function_reflections fun_plus_reflections)
    73 done
    74 
    75 text{*Separation for @{term "rtrancl(r)"}.*}
    76 lemma rtrancl_separation:
    77      "[| L(r); L(A) |] ==> separation (L, rtran_closure_mem(L,A,r))"
    78 apply (rule gen_separation_multi [OF rtran_closure_mem_reflection, of "{r,A}"],
    79        auto)
    80 apply (rule_tac env="[r,A]" in DPow_LsetI)
    81 apply (rule rtran_closure_mem_iff_sats sep_rules | simp)+
    82 done
    83 
    84 
    85 subsubsection{*Reflexive/Transitive Closure, Internalized*}
    86 
    87 (*  "rtran_closure(M,r,s) ==
    88         \<forall>A[M]. is_field(M,r,A) -->
    89          (\<forall>p[M]. p \<in> s <-> rtran_closure_mem(M,A,r,p))" *)
    90 constdefs rtran_closure_fm :: "[i,i]=>i"
    91  "rtran_closure_fm(r,s) ==
    92    Forall(Implies(field_fm(succ(r),0),
    93                   Forall(Iff(Member(0,succ(succ(s))),
    94                              rtran_closure_mem_fm(1,succ(succ(r)),0)))))"
    95 
    96 lemma rtran_closure_type [TC]:
    97      "[| x \<in> nat; y \<in> nat |] ==> rtran_closure_fm(x,y) \<in> formula"
    98 by (simp add: rtran_closure_fm_def)
    99 
   100 lemma sats_rtran_closure_fm [simp]:
   101    "[| x \<in> nat; y \<in> nat; env \<in> list(A)|]
   102     ==> sats(A, rtran_closure_fm(x,y), env) <->
   103         rtran_closure(##A, nth(x,env), nth(y,env))"
   104 by (simp add: rtran_closure_fm_def rtran_closure_def)
   105 
   106 lemma rtran_closure_iff_sats:
   107       "[| nth(i,env) = x; nth(j,env) = y;
   108           i \<in> nat; j \<in> nat; env \<in> list(A)|]
   109        ==> rtran_closure(##A, x, y) <-> sats(A, rtran_closure_fm(i,j), env)"
   110 by simp
   111 
   112 theorem rtran_closure_reflection:
   113      "REFLECTS[\<lambda>x. rtran_closure(L,f(x),g(x)),
   114                \<lambda>i x. rtran_closure(##Lset(i),f(x),g(x))]"
   115 apply (simp only: rtran_closure_def)
   116 apply (intro FOL_reflections function_reflections rtran_closure_mem_reflection)
   117 done
   118 
   119 
   120 subsubsection{*Transitive Closure of a Relation, Internalized*}
   121 
   122 (*  "tran_closure(M,r,t) ==
   123          \<exists>s[M]. rtran_closure(M,r,s) & composition(M,r,s,t)" *)
   124 constdefs tran_closure_fm :: "[i,i]=>i"
   125  "tran_closure_fm(r,s) ==
   126    Exists(And(rtran_closure_fm(succ(r),0), composition_fm(succ(r),0,succ(s))))"
   127 
   128 lemma tran_closure_type [TC]:
   129      "[| x \<in> nat; y \<in> nat |] ==> tran_closure_fm(x,y) \<in> formula"
   130 by (simp add: tran_closure_fm_def)
   131 
   132 lemma sats_tran_closure_fm [simp]:
   133    "[| x \<in> nat; y \<in> nat; env \<in> list(A)|]
   134     ==> sats(A, tran_closure_fm(x,y), env) <->
   135         tran_closure(##A, nth(x,env), nth(y,env))"
   136 by (simp add: tran_closure_fm_def tran_closure_def)
   137 
   138 lemma tran_closure_iff_sats:
   139       "[| nth(i,env) = x; nth(j,env) = y;
   140           i \<in> nat; j \<in> nat; env \<in> list(A)|]
   141        ==> tran_closure(##A, x, y) <-> sats(A, tran_closure_fm(i,j), env)"
   142 by simp
   143 
   144 theorem tran_closure_reflection:
   145      "REFLECTS[\<lambda>x. tran_closure(L,f(x),g(x)),
   146                \<lambda>i x. tran_closure(##Lset(i),f(x),g(x))]"
   147 apply (simp only: tran_closure_def)
   148 apply (intro FOL_reflections function_reflections
   149              rtran_closure_reflection composition_reflection)
   150 done
   151 
   152 
   153 subsubsection{*Separation for the Proof of @{text "wellfounded_on_trancl"}*}
   154 
   155 lemma wellfounded_trancl_reflects:
   156   "REFLECTS[\<lambda>x. \<exists>w[L]. \<exists>wx[L]. \<exists>rp[L].
   157                  w \<in> Z & pair(L,w,x,wx) & tran_closure(L,r,rp) & wx \<in> rp,
   158    \<lambda>i x. \<exists>w \<in> Lset(i). \<exists>wx \<in> Lset(i). \<exists>rp \<in> Lset(i).
   159        w \<in> Z & pair(##Lset(i),w,x,wx) & tran_closure(##Lset(i),r,rp) &
   160        wx \<in> rp]"
   161 by (intro FOL_reflections function_reflections fun_plus_reflections
   162           tran_closure_reflection)
   163 
   164 lemma wellfounded_trancl_separation:
   165          "[| L(r); L(Z) |] ==>
   166           separation (L, \<lambda>x.
   167               \<exists>w[L]. \<exists>wx[L]. \<exists>rp[L].
   168                w \<in> Z & pair(L,w,x,wx) & tran_closure(L,r,rp) & wx \<in> rp)"
   169 apply (rule gen_separation_multi [OF wellfounded_trancl_reflects, of "{r,Z}"],
   170        auto)
   171 apply (rule_tac env="[r,Z]" in DPow_LsetI)
   172 apply (rule sep_rules tran_closure_iff_sats | simp)+
   173 done
   174 
   175 
   176 subsubsection{*Instantiating the locale @{text M_trancl}*}
   177 
   178 lemma M_trancl_axioms_L: "M_trancl_axioms(L)"
   179   apply (rule M_trancl_axioms.intro)
   180    apply (assumption | rule rtrancl_separation wellfounded_trancl_separation)+
   181   done
   182 
   183 theorem M_trancl_L: "PROP M_trancl(L)"
   184 by (rule M_trancl.intro
   185          [OF M_trivial_L M_basic_axioms_L M_trancl_axioms_L])
   186 
   187 lemmas iterates_abs = M_trancl.iterates_abs [OF M_trancl_L]
   188   and rtran_closure_rtrancl = M_trancl.rtran_closure_rtrancl [OF M_trancl_L]
   189   and trans_wfrec_abs = M_trancl.trans_wfrec_abs [OF M_trancl_L]
   190   and eq_pair_wfrec_iff = M_trancl.eq_pair_wfrec_iff [OF M_trancl_L]
   191 
   192 
   193 
   194 subsection{*@{term L} is Closed Under the Operator @{term list}*}
   195 
   196 subsubsection{*Instances of Replacement for Lists*}
   197 
   198 lemma list_replacement1_Reflects:
   199  "REFLECTS
   200    [\<lambda>x. \<exists>u[L]. u \<in> B \<and> (\<exists>y[L]. pair(L,u,y,x) \<and>
   201          is_wfrec(L, iterates_MH(L, is_list_functor(L,A), 0), memsn, u, y)),
   202     \<lambda>i x. \<exists>u \<in> Lset(i). u \<in> B \<and> (\<exists>y \<in> Lset(i). pair(##Lset(i), u, y, x) \<and>
   203          is_wfrec(##Lset(i),
   204                   iterates_MH(##Lset(i),
   205                           is_list_functor(##Lset(i), A), 0), memsn, u, y))]"
   206 by (intro FOL_reflections function_reflections is_wfrec_reflection
   207           iterates_MH_reflection list_functor_reflection)
   208 
   209 
   210 lemma list_replacement1:
   211    "L(A) ==> iterates_replacement(L, is_list_functor(L,A), 0)"
   212 apply (unfold iterates_replacement_def wfrec_replacement_def, clarify)
   213 apply (rule strong_replacementI)
   214 apply (rule_tac u="{B,A,n,0,Memrel(succ(n))}" 
   215          in gen_separation_multi [OF list_replacement1_Reflects], 
   216        auto simp add: nonempty)
   217 apply (rule_tac env="[B,A,n,0,Memrel(succ(n))]" in DPow_LsetI)
   218 apply (rule sep_rules is_nat_case_iff_sats list_functor_iff_sats
   219             is_wfrec_iff_sats iterates_MH_iff_sats quasinat_iff_sats | simp)+
   220 done
   221 
   222 
   223 lemma list_replacement2_Reflects:
   224  "REFLECTS
   225    [\<lambda>x. \<exists>u[L]. u \<in> B & u \<in> nat &
   226                 is_iterates(L, is_list_functor(L, A), 0, u, x),
   227     \<lambda>i x. \<exists>u \<in> Lset(i). u \<in> B & u \<in> nat &
   228                is_iterates(##Lset(i), is_list_functor(##Lset(i), A), 0, u, x)]"
   229 by (intro FOL_reflections 
   230           is_iterates_reflection list_functor_reflection)
   231 
   232 lemma list_replacement2:
   233    "L(A) ==> strong_replacement(L,
   234          \<lambda>n y. n\<in>nat & is_iterates(L, is_list_functor(L,A), 0, n, y))"
   235 apply (rule strong_replacementI)
   236 apply (rule_tac u="{A,B,0,nat}" 
   237          in gen_separation_multi [OF list_replacement2_Reflects], 
   238        auto simp add: L_nat nonempty)
   239 apply (rule_tac env="[A,B,0,nat]" in DPow_LsetI)
   240 apply (rule sep_rules list_functor_iff_sats is_iterates_iff_sats | simp)+
   241 done
   242 
   243 
   244 subsection{*@{term L} is Closed Under the Operator @{term formula}*}
   245 
   246 subsubsection{*Instances of Replacement for Formulas*}
   247 
   248 (*FIXME: could prove a lemma iterates_replacementI to eliminate the 
   249 need to expand iterates_replacement and wfrec_replacement*)
   250 lemma formula_replacement1_Reflects:
   251  "REFLECTS
   252    [\<lambda>x. \<exists>u[L]. u \<in> B & (\<exists>y[L]. pair(L,u,y,x) &
   253          is_wfrec(L, iterates_MH(L, is_formula_functor(L), 0), memsn, u, y)),
   254     \<lambda>i x. \<exists>u \<in> Lset(i). u \<in> B & (\<exists>y \<in> Lset(i). pair(##Lset(i), u, y, x) &
   255          is_wfrec(##Lset(i),
   256                   iterates_MH(##Lset(i),
   257                           is_formula_functor(##Lset(i)), 0), memsn, u, y))]"
   258 by (intro FOL_reflections function_reflections is_wfrec_reflection
   259           iterates_MH_reflection formula_functor_reflection)
   260 
   261 lemma formula_replacement1:
   262    "iterates_replacement(L, is_formula_functor(L), 0)"
   263 apply (unfold iterates_replacement_def wfrec_replacement_def, clarify)
   264 apply (rule strong_replacementI)
   265 apply (rule_tac u="{B,n,0,Memrel(succ(n))}" 
   266          in gen_separation_multi [OF formula_replacement1_Reflects], 
   267        auto simp add: nonempty)
   268 apply (rule_tac env="[n,B,0,Memrel(succ(n))]" in DPow_LsetI)
   269 apply (rule sep_rules is_nat_case_iff_sats formula_functor_iff_sats
   270             is_wfrec_iff_sats iterates_MH_iff_sats quasinat_iff_sats | simp)+
   271 done
   272 
   273 lemma formula_replacement2_Reflects:
   274  "REFLECTS
   275    [\<lambda>x. \<exists>u[L]. u \<in> B & u \<in> nat &
   276                 is_iterates(L, is_formula_functor(L), 0, u, x),
   277     \<lambda>i x. \<exists>u \<in> Lset(i). u \<in> B & u \<in> nat &
   278                is_iterates(##Lset(i), is_formula_functor(##Lset(i)), 0, u, x)]"
   279 by (intro FOL_reflections 
   280           is_iterates_reflection formula_functor_reflection)
   281 
   282 lemma formula_replacement2:
   283    "strong_replacement(L,
   284          \<lambda>n y. n\<in>nat & is_iterates(L, is_formula_functor(L), 0, n, y))"
   285 apply (rule strong_replacementI)
   286 apply (rule_tac u="{B,0,nat}" 
   287          in gen_separation_multi [OF formula_replacement2_Reflects], 
   288        auto simp add: nonempty L_nat)
   289 apply (rule_tac env="[B,0,nat]" in DPow_LsetI)
   290 apply (rule sep_rules formula_functor_iff_sats is_iterates_iff_sats | simp)+
   291 done
   292 
   293 text{*NB The proofs for type @{term formula} are virtually identical to those
   294 for @{term "list(A)"}.  It was a cut-and-paste job! *}
   295 
   296 
   297 subsubsection{*The Formula @{term is_nth}, Internalized*}
   298 
   299 (* "is_nth(M,n,l,Z) ==
   300       \<exists>X[M]. is_iterates(M, is_tl(M), l, n, X) & is_hd(M,X,Z)" *)
   301 constdefs nth_fm :: "[i,i,i]=>i"
   302     "nth_fm(n,l,Z) == 
   303        Exists(And(is_iterates_fm(tl_fm(1,0), succ(l), succ(n), 0), 
   304               hd_fm(0,succ(Z))))"
   305 
   306 lemma nth_fm_type [TC]:
   307  "[| x \<in> nat; y \<in> nat; z \<in> nat |] ==> nth_fm(x,y,z) \<in> formula"
   308 by (simp add: nth_fm_def)
   309 
   310 lemma sats_nth_fm [simp]:
   311    "[| x < length(env); y \<in> nat; z \<in> nat; env \<in> list(A)|]
   312     ==> sats(A, nth_fm(x,y,z), env) <->
   313         is_nth(##A, nth(x,env), nth(y,env), nth(z,env))"
   314 apply (frule lt_length_in_nat, assumption)  
   315 apply (simp add: nth_fm_def is_nth_def sats_is_iterates_fm) 
   316 done
   317 
   318 lemma nth_iff_sats:
   319       "[| nth(i,env) = x; nth(j,env) = y; nth(k,env) = z;
   320           i < length(env); j \<in> nat; k \<in> nat; env \<in> list(A)|]
   321        ==> is_nth(##A, x, y, z) <-> sats(A, nth_fm(i,j,k), env)"
   322 by (simp add: sats_nth_fm)
   323 
   324 theorem nth_reflection:
   325      "REFLECTS[\<lambda>x. is_nth(L, f(x), g(x), h(x)),  
   326                \<lambda>i x. is_nth(##Lset(i), f(x), g(x), h(x))]"
   327 apply (simp only: is_nth_def)
   328 apply (intro FOL_reflections is_iterates_reflection
   329              hd_reflection tl_reflection) 
   330 done
   331 
   332 
   333 subsubsection{*An Instance of Replacement for @{term nth}*}
   334 
   335 (*FIXME: could prove a lemma iterates_replacementI to eliminate the 
   336 need to expand iterates_replacement and wfrec_replacement*)
   337 lemma nth_replacement_Reflects:
   338  "REFLECTS
   339    [\<lambda>x. \<exists>u[L]. u \<in> B & (\<exists>y[L]. pair(L,u,y,x) &
   340          is_wfrec(L, iterates_MH(L, is_tl(L), z), memsn, u, y)),
   341     \<lambda>i x. \<exists>u \<in> Lset(i). u \<in> B & (\<exists>y \<in> Lset(i). pair(##Lset(i), u, y, x) &
   342          is_wfrec(##Lset(i),
   343                   iterates_MH(##Lset(i),
   344                           is_tl(##Lset(i)), z), memsn, u, y))]"
   345 by (intro FOL_reflections function_reflections is_wfrec_reflection
   346           iterates_MH_reflection tl_reflection)
   347 
   348 lemma nth_replacement:
   349    "L(w) ==> iterates_replacement(L, is_tl(L), w)"
   350 apply (unfold iterates_replacement_def wfrec_replacement_def, clarify)
   351 apply (rule strong_replacementI)
   352 apply (rule_tac u="{B,w,Memrel(succ(n))}" 
   353          in gen_separation_multi [OF nth_replacement_Reflects], 
   354        auto)
   355 apply (rule_tac env="[B,w,Memrel(succ(n))]" in DPow_LsetI)
   356 apply (rule sep_rules is_nat_case_iff_sats tl_iff_sats
   357             is_wfrec_iff_sats iterates_MH_iff_sats quasinat_iff_sats | simp)+
   358 done
   359 
   360 
   361 subsubsection{*Instantiating the locale @{text M_datatypes}*}
   362 
   363 lemma M_datatypes_axioms_L: "M_datatypes_axioms(L)"
   364   apply (rule M_datatypes_axioms.intro)
   365       apply (assumption | rule
   366         list_replacement1 list_replacement2
   367         formula_replacement1 formula_replacement2
   368         nth_replacement)+
   369   done
   370 
   371 theorem M_datatypes_L: "PROP M_datatypes(L)"
   372   apply (rule M_datatypes.intro)
   373       apply (rule M_trancl.axioms [OF M_trancl_L])+
   374  apply (rule M_datatypes_axioms_L) 
   375  done
   376 
   377 lemmas list_closed = M_datatypes.list_closed [OF M_datatypes_L]
   378   and formula_closed = M_datatypes.formula_closed [OF M_datatypes_L]
   379   and list_abs = M_datatypes.list_abs [OF M_datatypes_L]
   380   and formula_abs = M_datatypes.formula_abs [OF M_datatypes_L]
   381   and nth_abs = M_datatypes.nth_abs [OF M_datatypes_L]
   382 
   383 declare list_closed [intro,simp]
   384 declare formula_closed [intro,simp]
   385 declare list_abs [simp]
   386 declare formula_abs [simp]
   387 declare nth_abs [simp]
   388 
   389 
   390 subsection{*@{term L} is Closed Under the Operator @{term eclose}*}
   391 
   392 subsubsection{*Instances of Replacement for @{term eclose}*}
   393 
   394 lemma eclose_replacement1_Reflects:
   395  "REFLECTS
   396    [\<lambda>x. \<exists>u[L]. u \<in> B & (\<exists>y[L]. pair(L,u,y,x) &
   397          is_wfrec(L, iterates_MH(L, big_union(L), A), memsn, u, y)),
   398     \<lambda>i x. \<exists>u \<in> Lset(i). u \<in> B & (\<exists>y \<in> Lset(i). pair(##Lset(i), u, y, x) &
   399          is_wfrec(##Lset(i),
   400                   iterates_MH(##Lset(i), big_union(##Lset(i)), A),
   401                   memsn, u, y))]"
   402 by (intro FOL_reflections function_reflections is_wfrec_reflection
   403           iterates_MH_reflection)
   404 
   405 lemma eclose_replacement1:
   406    "L(A) ==> iterates_replacement(L, big_union(L), A)"
   407 apply (unfold iterates_replacement_def wfrec_replacement_def, clarify)
   408 apply (rule strong_replacementI)
   409 apply (rule_tac u="{B,A,n,Memrel(succ(n))}" 
   410          in gen_separation_multi [OF eclose_replacement1_Reflects], auto)
   411 apply (rule_tac env="[B,A,n,Memrel(succ(n))]" in DPow_LsetI)
   412 apply (rule sep_rules iterates_MH_iff_sats is_nat_case_iff_sats
   413              is_wfrec_iff_sats big_union_iff_sats quasinat_iff_sats | simp)+
   414 done
   415 
   416 
   417 lemma eclose_replacement2_Reflects:
   418  "REFLECTS
   419    [\<lambda>x. \<exists>u[L]. u \<in> B & u \<in> nat &
   420                 is_iterates(L, big_union(L), A, u, x),
   421     \<lambda>i x. \<exists>u \<in> Lset(i). u \<in> B & u \<in> nat &
   422                is_iterates(##Lset(i), big_union(##Lset(i)), A, u, x)]"
   423 by (intro FOL_reflections function_reflections is_iterates_reflection)
   424 
   425 lemma eclose_replacement2:
   426    "L(A) ==> strong_replacement(L,
   427          \<lambda>n y. n\<in>nat & is_iterates(L, big_union(L), A, n, y))"
   428 apply (rule strong_replacementI)
   429 apply (rule_tac u="{A,B,nat}" 
   430          in gen_separation_multi [OF eclose_replacement2_Reflects],
   431        auto simp add: L_nat)
   432 apply (rule_tac env="[A,B,nat]" in DPow_LsetI)
   433 apply (rule sep_rules is_iterates_iff_sats big_union_iff_sats | simp)+
   434 done
   435 
   436 
   437 subsubsection{*Instantiating the locale @{text M_eclose}*}
   438 
   439 lemma M_eclose_axioms_L: "M_eclose_axioms(L)"
   440   apply (rule M_eclose_axioms.intro)
   441    apply (assumption | rule eclose_replacement1 eclose_replacement2)+
   442   done
   443 
   444 theorem M_eclose_L: "PROP M_eclose(L)"
   445   apply (rule M_eclose.intro)
   446        apply (rule M_datatypes.axioms [OF M_datatypes_L])+
   447   apply (rule M_eclose_axioms_L)
   448   done
   449 
   450 lemmas eclose_closed [intro, simp] = M_eclose.eclose_closed [OF M_eclose_L]
   451   and eclose_abs [intro, simp] = M_eclose.eclose_abs [OF M_eclose_L]
   452   and transrec_replacementI = M_eclose.transrec_replacementI [OF M_eclose_L]
   453 
   454 end