src/ZF/Constructible/Separation.thy
author paulson
Wed Oct 30 12:44:18 2002 +0100 (2002-10-30)
changeset 13687 22dce9134953
parent 13634 99a593b49b04
child 13691 a6bc3001106a
permissions -rw-r--r--
simpler separation/replacement proofs
paulson@13437
     1
(*  Title:      ZF/Constructible/Separation.thy
paulson@13437
     2
    ID:         $Id$
paulson@13437
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
paulson@13437
     4
*)
paulson@13437
     5
paulson@13339
     6
header{*Early Instances of Separation and Strong Replacement*}
paulson@13323
     7
paulson@13324
     8
theory Separation = L_axioms + WF_absolute:
paulson@13306
     9
paulson@13564
    10
text{*This theory proves all instances needed for locale @{text "M_basic"}*}
paulson@13339
    11
paulson@13306
    12
text{*Helps us solve for de Bruijn indices!*}
paulson@13306
    13
lemma nth_ConsI: "[|nth(n,l) = x; n \<in> nat|] ==> nth(succ(n), Cons(a,l)) = x"
paulson@13306
    14
by simp
paulson@13306
    15
paulson@13316
    16
lemmas nth_rules = nth_0 nth_ConsI nat_0I nat_succI
wenzelm@13428
    17
lemmas sep_rules = nth_0 nth_ConsI FOL_iff_sats function_iff_sats
paulson@13323
    18
                   fun_plus_iff_sats
paulson@13306
    19
paulson@13306
    20
lemma Collect_conj_in_DPow:
wenzelm@13428
    21
     "[| {x\<in>A. P(x)} \<in> DPow(A);  {x\<in>A. Q(x)} \<in> DPow(A) |]
paulson@13306
    22
      ==> {x\<in>A. P(x) & Q(x)} \<in> DPow(A)"
wenzelm@13428
    23
by (simp add: Int_in_DPow Collect_Int_Collect_eq [symmetric])
paulson@13306
    24
paulson@13306
    25
lemma Collect_conj_in_DPow_Lset:
paulson@13306
    26
     "[|z \<in> Lset(j); {x \<in> Lset(j). P(x)} \<in> DPow(Lset(j))|]
paulson@13306
    27
      ==> {x \<in> Lset(j). x \<in> z & P(x)} \<in> DPow(Lset(j))"
paulson@13306
    28
apply (frule mem_Lset_imp_subset_Lset)
wenzelm@13428
    29
apply (simp add: Collect_conj_in_DPow Collect_mem_eq
paulson@13306
    30
                 subset_Int_iff2 elem_subset_in_DPow)
paulson@13306
    31
done
paulson@13306
    32
paulson@13306
    33
lemma separation_CollectI:
paulson@13306
    34
     "(\<And>z. L(z) ==> L({x \<in> z . P(x)})) ==> separation(L, \<lambda>x. P(x))"
wenzelm@13428
    35
apply (unfold separation_def, clarify)
wenzelm@13428
    36
apply (rule_tac x="{x\<in>z. P(x)}" in rexI)
paulson@13306
    37
apply simp_all
paulson@13306
    38
done
paulson@13306
    39
paulson@13306
    40
text{*Reduces the original comprehension to the reflected one*}
paulson@13306
    41
lemma reflection_imp_L_separation:
paulson@13306
    42
      "[| \<forall>x\<in>Lset(j). P(x) <-> Q(x);
wenzelm@13428
    43
          {x \<in> Lset(j) . Q(x)} \<in> DPow(Lset(j));
paulson@13306
    44
          Ord(j);  z \<in> Lset(j)|] ==> L({x \<in> z . P(x)})"
paulson@13306
    45
apply (rule_tac i = "succ(j)" in L_I)
paulson@13306
    46
 prefer 2 apply simp
paulson@13306
    47
apply (subgoal_tac "{x \<in> z. P(x)} = {x \<in> Lset(j). x \<in> z & (Q(x))}")
paulson@13306
    48
 prefer 2
wenzelm@13428
    49
 apply (blast dest: mem_Lset_imp_subset_Lset)
paulson@13306
    50
apply (simp add: Lset_succ Collect_conj_in_DPow_Lset)
paulson@13306
    51
done
paulson@13306
    52
paulson@13566
    53
text{*Encapsulates the standard proof script for proving instances of 
paulson@13687
    54
      Separation.*}
paulson@13566
    55
lemma gen_separation:
paulson@13566
    56
 assumes reflection: "REFLECTS [P,Q]"
paulson@13566
    57
     and Lu:         "L(u)"
paulson@13566
    58
     and collI: "!!j. u \<in> Lset(j)
paulson@13566
    59
                \<Longrightarrow> Collect(Lset(j), Q(j)) \<in> DPow(Lset(j))"
paulson@13566
    60
 shows "separation(L,P)"
paulson@13566
    61
apply (rule separation_CollectI)
paulson@13566
    62
apply (rule_tac A="{u,z}" in subset_LsetE, blast intro: Lu)
paulson@13566
    63
apply (rule ReflectsE [OF reflection], assumption)
paulson@13566
    64
apply (drule subset_Lset_ltD, assumption)
paulson@13566
    65
apply (erule reflection_imp_L_separation)
paulson@13566
    66
  apply (simp_all add: lt_Ord2, clarify)
paulson@13566
    67
apply (rule collI)
paulson@13687
    68
apply assumption
paulson@13687
    69
done
paulson@13687
    70
paulson@13687
    71
text{*As above, but typically @{term u} is a finite enumeration such as
paulson@13687
    72
  @{term "{a,b}"}; thus the new subgoal gets the assumption
paulson@13687
    73
  @{term "{a,b} \<subseteq> Lset(i)"}, which is logically equivalent to 
paulson@13687
    74
  @{term "a \<in> Lset(i)"} and @{term "b \<in> Lset(i)"}.*}
paulson@13687
    75
lemma gen_separation_multi:
paulson@13687
    76
 assumes reflection: "REFLECTS [P,Q]"
paulson@13687
    77
     and Lu:         "L(u)"
paulson@13687
    78
     and collI: "!!j. u \<subseteq> Lset(j)
paulson@13687
    79
                \<Longrightarrow> Collect(Lset(j), Q(j)) \<in> DPow(Lset(j))"
paulson@13687
    80
 shows "separation(L,P)"
paulson@13687
    81
apply (rule gen_separation [OF reflection Lu])
paulson@13687
    82
apply (drule mem_Lset_imp_subset_Lset)
paulson@13687
    83
apply (erule collI) 
paulson@13566
    84
done
paulson@13566
    85
paulson@13306
    86
paulson@13316
    87
subsection{*Separation for Intersection*}
paulson@13306
    88
paulson@13306
    89
lemma Inter_Reflects:
wenzelm@13428
    90
     "REFLECTS[\<lambda>x. \<forall>y[L]. y\<in>A --> x \<in> y,
paulson@13314
    91
               \<lambda>i x. \<forall>y\<in>Lset(i). y\<in>A --> x \<in> y]"
wenzelm@13428
    92
by (intro FOL_reflections)
paulson@13306
    93
paulson@13306
    94
lemma Inter_separation:
paulson@13306
    95
     "L(A) ==> separation(L, \<lambda>x. \<forall>y[L]. y\<in>A --> x\<in>y)"
paulson@13566
    96
apply (rule gen_separation [OF Inter_Reflects], simp)
wenzelm@13428
    97
apply (rule DPow_LsetI)
paulson@13687
    98
 txt{*I leave this one example of a manual proof.  The tedium of manually
paulson@13687
    99
      instantiating @{term i}, @{term j} and @{term env} is obvious. *}
wenzelm@13428
   100
apply (rule ball_iff_sats)
paulson@13306
   101
apply (rule imp_iff_sats)
paulson@13306
   102
apply (rule_tac [2] i=1 and j=0 and env="[y,x,A]" in mem_iff_sats)
paulson@13306
   103
apply (rule_tac i=0 and j=2 in mem_iff_sats)
paulson@13306
   104
apply (simp_all add: succ_Un_distrib [symmetric])
paulson@13306
   105
done
paulson@13306
   106
paulson@13437
   107
subsection{*Separation for Set Difference*}
paulson@13437
   108
paulson@13437
   109
lemma Diff_Reflects:
paulson@13437
   110
     "REFLECTS[\<lambda>x. x \<notin> B, \<lambda>i x. x \<notin> B]"
paulson@13437
   111
by (intro FOL_reflections)  
paulson@13437
   112
paulson@13437
   113
lemma Diff_separation:
paulson@13437
   114
     "L(B) ==> separation(L, \<lambda>x. x \<notin> B)"
paulson@13566
   115
apply (rule gen_separation [OF Diff_Reflects], simp)
paulson@13687
   116
apply (rule_tac env="[B]" in DPow_LsetI)
paulson@13437
   117
apply (rule sep_rules | simp)+
paulson@13437
   118
done
paulson@13437
   119
paulson@13316
   120
subsection{*Separation for Cartesian Product*}
paulson@13306
   121
paulson@13323
   122
lemma cartprod_Reflects:
paulson@13314
   123
     "REFLECTS[\<lambda>z. \<exists>x[L]. x\<in>A & (\<exists>y[L]. y\<in>B & pair(L,x,y,z)),
wenzelm@13428
   124
                \<lambda>i z. \<exists>x\<in>Lset(i). x\<in>A & (\<exists>y\<in>Lset(i). y\<in>B &
paulson@13314
   125
                                   pair(**Lset(i),x,y,z))]"
paulson@13323
   126
by (intro FOL_reflections function_reflections)
paulson@13306
   127
paulson@13306
   128
lemma cartprod_separation:
wenzelm@13428
   129
     "[| L(A); L(B) |]
paulson@13306
   130
      ==> separation(L, \<lambda>z. \<exists>x[L]. x\<in>A & (\<exists>y[L]. y\<in>B & pair(L,x,y,z)))"
paulson@13687
   131
apply (rule gen_separation_multi [OF cartprod_Reflects, of "{A,B}"], auto)
paulson@13687
   132
apply (rule_tac env="[A,B]" in DPow_LsetI)
paulson@13316
   133
apply (rule sep_rules | simp)+
paulson@13306
   134
done
paulson@13306
   135
paulson@13316
   136
subsection{*Separation for Image*}
paulson@13306
   137
paulson@13306
   138
lemma image_Reflects:
paulson@13314
   139
     "REFLECTS[\<lambda>y. \<exists>p[L]. p\<in>r & (\<exists>x[L]. x\<in>A & pair(L,x,y,p)),
paulson@13314
   140
           \<lambda>i y. \<exists>p\<in>Lset(i). p\<in>r & (\<exists>x\<in>Lset(i). x\<in>A & pair(**Lset(i),x,y,p))]"
paulson@13323
   141
by (intro FOL_reflections function_reflections)
paulson@13306
   142
paulson@13306
   143
lemma image_separation:
wenzelm@13428
   144
     "[| L(A); L(r) |]
paulson@13306
   145
      ==> separation(L, \<lambda>y. \<exists>p[L]. p\<in>r & (\<exists>x[L]. x\<in>A & pair(L,x,y,p)))"
paulson@13687
   146
apply (rule gen_separation_multi [OF image_Reflects, of "{A,r}"], auto)
paulson@13687
   147
apply (rule_tac env="[A,r]" in DPow_LsetI)
paulson@13316
   148
apply (rule sep_rules | simp)+
paulson@13306
   149
done
paulson@13306
   150
paulson@13306
   151
paulson@13316
   152
subsection{*Separation for Converse*}
paulson@13306
   153
paulson@13306
   154
lemma converse_Reflects:
paulson@13314
   155
  "REFLECTS[\<lambda>z. \<exists>p[L]. p\<in>r & (\<exists>x[L]. \<exists>y[L]. pair(L,x,y,p) & pair(L,y,x,z)),
wenzelm@13428
   156
     \<lambda>i z. \<exists>p\<in>Lset(i). p\<in>r & (\<exists>x\<in>Lset(i). \<exists>y\<in>Lset(i).
paulson@13314
   157
                     pair(**Lset(i),x,y,p) & pair(**Lset(i),y,x,z))]"
paulson@13323
   158
by (intro FOL_reflections function_reflections)
paulson@13306
   159
paulson@13306
   160
lemma converse_separation:
wenzelm@13428
   161
     "L(r) ==> separation(L,
paulson@13306
   162
         \<lambda>z. \<exists>p[L]. p\<in>r & (\<exists>x[L]. \<exists>y[L]. pair(L,x,y,p) & pair(L,y,x,z)))"
paulson@13566
   163
apply (rule gen_separation [OF converse_Reflects], simp)
paulson@13687
   164
apply (rule_tac env="[r]" in DPow_LsetI)
paulson@13316
   165
apply (rule sep_rules | simp)+
paulson@13306
   166
done
paulson@13306
   167
paulson@13306
   168
paulson@13316
   169
subsection{*Separation for Restriction*}
paulson@13306
   170
paulson@13306
   171
lemma restrict_Reflects:
paulson@13314
   172
     "REFLECTS[\<lambda>z. \<exists>x[L]. x\<in>A & (\<exists>y[L]. pair(L,x,y,z)),
paulson@13314
   173
        \<lambda>i z. \<exists>x\<in>Lset(i). x\<in>A & (\<exists>y\<in>Lset(i). pair(**Lset(i),x,y,z))]"
paulson@13323
   174
by (intro FOL_reflections function_reflections)
paulson@13306
   175
paulson@13306
   176
lemma restrict_separation:
paulson@13306
   177
   "L(A) ==> separation(L, \<lambda>z. \<exists>x[L]. x\<in>A & (\<exists>y[L]. pair(L,x,y,z)))"
paulson@13566
   178
apply (rule gen_separation [OF restrict_Reflects], simp)
paulson@13687
   179
apply (rule_tac env="[A]" in DPow_LsetI)
paulson@13316
   180
apply (rule sep_rules | simp)+
paulson@13306
   181
done
paulson@13306
   182
paulson@13306
   183
paulson@13316
   184
subsection{*Separation for Composition*}
paulson@13306
   185
paulson@13306
   186
lemma comp_Reflects:
wenzelm@13428
   187
     "REFLECTS[\<lambda>xz. \<exists>x[L]. \<exists>y[L]. \<exists>z[L]. \<exists>xy[L]. \<exists>yz[L].
wenzelm@13428
   188
                  pair(L,x,z,xz) & pair(L,x,y,xy) & pair(L,y,z,yz) &
paulson@13306
   189
                  xy\<in>s & yz\<in>r,
wenzelm@13428
   190
        \<lambda>i xz. \<exists>x\<in>Lset(i). \<exists>y\<in>Lset(i). \<exists>z\<in>Lset(i). \<exists>xy\<in>Lset(i). \<exists>yz\<in>Lset(i).
wenzelm@13428
   191
                  pair(**Lset(i),x,z,xz) & pair(**Lset(i),x,y,xy) &
paulson@13314
   192
                  pair(**Lset(i),y,z,yz) & xy\<in>s & yz\<in>r]"
paulson@13323
   193
by (intro FOL_reflections function_reflections)
paulson@13306
   194
paulson@13306
   195
lemma comp_separation:
paulson@13306
   196
     "[| L(r); L(s) |]
wenzelm@13428
   197
      ==> separation(L, \<lambda>xz. \<exists>x[L]. \<exists>y[L]. \<exists>z[L]. \<exists>xy[L]. \<exists>yz[L].
wenzelm@13428
   198
                  pair(L,x,z,xz) & pair(L,x,y,xy) & pair(L,y,z,yz) &
paulson@13306
   199
                  xy\<in>s & yz\<in>r)"
paulson@13687
   200
apply (rule gen_separation_multi [OF comp_Reflects, of "{r,s}"], auto)
paulson@13687
   201
txt{*Subgoals after applying general ``separation'' rule:
paulson@13687
   202
     @{subgoals[display,indent=0,margin=65]}*}
paulson@13687
   203
apply (rule_tac env="[r,s]" in DPow_LsetI)
paulson@13687
   204
txt{*Subgoals ready for automatic synthesis of a formula:
paulson@13687
   205
     @{subgoals[display,indent=0,margin=65]}*}
paulson@13316
   206
apply (rule sep_rules | simp)+
paulson@13306
   207
done
paulson@13306
   208
paulson@13687
   209
paulson@13316
   210
subsection{*Separation for Predecessors in an Order*}
paulson@13306
   211
paulson@13306
   212
lemma pred_Reflects:
paulson@13314
   213
     "REFLECTS[\<lambda>y. \<exists>p[L]. p\<in>r & pair(L,y,x,p),
paulson@13314
   214
                    \<lambda>i y. \<exists>p \<in> Lset(i). p\<in>r & pair(**Lset(i),y,x,p)]"
paulson@13323
   215
by (intro FOL_reflections function_reflections)
paulson@13306
   216
paulson@13306
   217
lemma pred_separation:
paulson@13306
   218
     "[| L(r); L(x) |] ==> separation(L, \<lambda>y. \<exists>p[L]. p\<in>r & pair(L,y,x,p))"
paulson@13687
   219
apply (rule gen_separation_multi [OF pred_Reflects, of "{r,x}"], auto)
paulson@13687
   220
apply (rule_tac env="[r,x]" in DPow_LsetI)
paulson@13316
   221
apply (rule sep_rules | simp)+
paulson@13306
   222
done
paulson@13306
   223
paulson@13306
   224
paulson@13316
   225
subsection{*Separation for the Membership Relation*}
paulson@13306
   226
paulson@13306
   227
lemma Memrel_Reflects:
paulson@13314
   228
     "REFLECTS[\<lambda>z. \<exists>x[L]. \<exists>y[L]. pair(L,x,y,z) & x \<in> y,
paulson@13314
   229
            \<lambda>i z. \<exists>x \<in> Lset(i). \<exists>y \<in> Lset(i). pair(**Lset(i),x,y,z) & x \<in> y]"
paulson@13323
   230
by (intro FOL_reflections function_reflections)
paulson@13306
   231
paulson@13306
   232
lemma Memrel_separation:
paulson@13306
   233
     "separation(L, \<lambda>z. \<exists>x[L]. \<exists>y[L]. pair(L,x,y,z) & x \<in> y)"
paulson@13566
   234
apply (rule gen_separation [OF Memrel_Reflects nonempty])
paulson@13687
   235
apply (rule_tac env="[]" in DPow_LsetI)
paulson@13316
   236
apply (rule sep_rules | simp)+
paulson@13306
   237
done
paulson@13306
   238
paulson@13306
   239
paulson@13316
   240
subsection{*Replacement for FunSpace*}
wenzelm@13428
   241
paulson@13306
   242
lemma funspace_succ_Reflects:
wenzelm@13428
   243
 "REFLECTS[\<lambda>z. \<exists>p[L]. p\<in>A & (\<exists>f[L]. \<exists>b[L]. \<exists>nb[L]. \<exists>cnbf[L].
wenzelm@13428
   244
            pair(L,f,b,p) & pair(L,n,b,nb) & is_cons(L,nb,f,cnbf) &
wenzelm@13428
   245
            upair(L,cnbf,cnbf,z)),
wenzelm@13428
   246
        \<lambda>i z. \<exists>p \<in> Lset(i). p\<in>A & (\<exists>f \<in> Lset(i). \<exists>b \<in> Lset(i).
wenzelm@13428
   247
              \<exists>nb \<in> Lset(i). \<exists>cnbf \<in> Lset(i).
wenzelm@13428
   248
                pair(**Lset(i),f,b,p) & pair(**Lset(i),n,b,nb) &
wenzelm@13428
   249
                is_cons(**Lset(i),nb,f,cnbf) & upair(**Lset(i),cnbf,cnbf,z))]"
paulson@13323
   250
by (intro FOL_reflections function_reflections)
paulson@13306
   251
paulson@13306
   252
lemma funspace_succ_replacement:
wenzelm@13428
   253
     "L(n) ==>
wenzelm@13428
   254
      strong_replacement(L, \<lambda>p z. \<exists>f[L]. \<exists>b[L]. \<exists>nb[L]. \<exists>cnbf[L].
paulson@13306
   255
                pair(L,f,b,p) & pair(L,n,b,nb) & is_cons(L,nb,f,cnbf) &
paulson@13306
   256
                upair(L,cnbf,cnbf,z))"
wenzelm@13428
   257
apply (rule strong_replacementI)
paulson@13687
   258
apply (rule_tac u="{n,B}" in gen_separation_multi [OF funspace_succ_Reflects], 
paulson@13687
   259
       auto)
paulson@13687
   260
apply (rule_tac env="[n,B]" in DPow_LsetI)
paulson@13316
   261
apply (rule sep_rules | simp)+
paulson@13306
   262
done
paulson@13306
   263
paulson@13306
   264
paulson@13634
   265
subsection{*Separation for a Theorem about @{term "is_recfun"}*}
paulson@13323
   266
paulson@13323
   267
lemma is_recfun_reflects:
wenzelm@13428
   268
  "REFLECTS[\<lambda>x. \<exists>xa[L]. \<exists>xb[L].
wenzelm@13428
   269
                pair(L,x,a,xa) & xa \<in> r & pair(L,x,b,xb) & xb \<in> r &
wenzelm@13428
   270
                (\<exists>fx[L]. \<exists>gx[L]. fun_apply(L,f,x,fx) & fun_apply(L,g,x,gx) &
paulson@13323
   271
                                   fx \<noteq> gx),
wenzelm@13428
   272
   \<lambda>i x. \<exists>xa \<in> Lset(i). \<exists>xb \<in> Lset(i).
paulson@13323
   273
          pair(**Lset(i),x,a,xa) & xa \<in> r & pair(**Lset(i),x,b,xb) & xb \<in> r &
wenzelm@13428
   274
                (\<exists>fx \<in> Lset(i). \<exists>gx \<in> Lset(i). fun_apply(**Lset(i),f,x,fx) &
paulson@13323
   275
                  fun_apply(**Lset(i),g,x,gx) & fx \<noteq> gx)]"
paulson@13323
   276
by (intro FOL_reflections function_reflections fun_plus_reflections)
paulson@13323
   277
paulson@13323
   278
lemma is_recfun_separation:
paulson@13323
   279
     --{*for well-founded recursion*}
wenzelm@13428
   280
     "[| L(r); L(f); L(g); L(a); L(b) |]
wenzelm@13428
   281
     ==> separation(L,
wenzelm@13428
   282
            \<lambda>x. \<exists>xa[L]. \<exists>xb[L].
wenzelm@13428
   283
                pair(L,x,a,xa) & xa \<in> r & pair(L,x,b,xb) & xb \<in> r &
wenzelm@13428
   284
                (\<exists>fx[L]. \<exists>gx[L]. fun_apply(L,f,x,fx) & fun_apply(L,g,x,gx) &
paulson@13323
   285
                                   fx \<noteq> gx))"
paulson@13687
   286
apply (rule gen_separation_multi [OF is_recfun_reflects, of "{r,f,g,a,b}"], 
paulson@13687
   287
            auto)
paulson@13687
   288
apply (rule_tac env="[r,f,g,a,b]" in DPow_LsetI)
paulson@13323
   289
apply (rule sep_rules | simp)+
paulson@13323
   290
done
paulson@13323
   291
paulson@13323
   292
paulson@13564
   293
subsection{*Instantiating the locale @{text M_basic}*}
paulson@13363
   294
text{*Separation (and Strong Replacement) for basic set-theoretic constructions
paulson@13363
   295
such as intersection, Cartesian Product and image.*}
paulson@13363
   296
paulson@13564
   297
lemma M_basic_axioms_L: "M_basic_axioms(L)"
paulson@13564
   298
  apply (rule M_basic_axioms.intro)
paulson@13437
   299
       apply (assumption | rule
paulson@13437
   300
	 Inter_separation Diff_separation cartprod_separation image_separation
paulson@13437
   301
	 converse_separation restrict_separation
paulson@13437
   302
	 comp_separation pred_separation Memrel_separation
paulson@13634
   303
	 funspace_succ_replacement is_recfun_separation)+
wenzelm@13428
   304
  done
paulson@13323
   305
paulson@13564
   306
theorem M_basic_L: "PROP M_basic(L)"
paulson@13564
   307
by (rule M_basic.intro [OF M_trivial_L M_basic_axioms_L])
paulson@13437
   308
paulson@13437
   309
paulson@13564
   310
lemmas cartprod_iff = M_basic.cartprod_iff [OF M_basic_L]
paulson@13564
   311
  and cartprod_closed = M_basic.cartprod_closed [OF M_basic_L]
paulson@13564
   312
  and sum_closed = M_basic.sum_closed [OF M_basic_L]
paulson@13564
   313
  and M_converse_iff = M_basic.M_converse_iff [OF M_basic_L]
paulson@13564
   314
  and converse_closed = M_basic.converse_closed [OF M_basic_L]
paulson@13564
   315
  and converse_abs = M_basic.converse_abs [OF M_basic_L]
paulson@13564
   316
  and image_closed = M_basic.image_closed [OF M_basic_L]
paulson@13564
   317
  and vimage_abs = M_basic.vimage_abs [OF M_basic_L]
paulson@13564
   318
  and vimage_closed = M_basic.vimage_closed [OF M_basic_L]
paulson@13564
   319
  and domain_abs = M_basic.domain_abs [OF M_basic_L]
paulson@13564
   320
  and domain_closed = M_basic.domain_closed [OF M_basic_L]
paulson@13564
   321
  and range_abs = M_basic.range_abs [OF M_basic_L]
paulson@13564
   322
  and range_closed = M_basic.range_closed [OF M_basic_L]
paulson@13564
   323
  and field_abs = M_basic.field_abs [OF M_basic_L]
paulson@13564
   324
  and field_closed = M_basic.field_closed [OF M_basic_L]
paulson@13564
   325
  and relation_abs = M_basic.relation_abs [OF M_basic_L]
paulson@13564
   326
  and function_abs = M_basic.function_abs [OF M_basic_L]
paulson@13564
   327
  and apply_closed = M_basic.apply_closed [OF M_basic_L]
paulson@13564
   328
  and apply_abs = M_basic.apply_abs [OF M_basic_L]
paulson@13564
   329
  and typed_function_abs = M_basic.typed_function_abs [OF M_basic_L]
paulson@13564
   330
  and injection_abs = M_basic.injection_abs [OF M_basic_L]
paulson@13564
   331
  and surjection_abs = M_basic.surjection_abs [OF M_basic_L]
paulson@13564
   332
  and bijection_abs = M_basic.bijection_abs [OF M_basic_L]
paulson@13564
   333
  and M_comp_iff = M_basic.M_comp_iff [OF M_basic_L]
paulson@13564
   334
  and comp_closed = M_basic.comp_closed [OF M_basic_L]
paulson@13564
   335
  and composition_abs = M_basic.composition_abs [OF M_basic_L]
paulson@13564
   336
  and restriction_is_function = M_basic.restriction_is_function [OF M_basic_L]
paulson@13564
   337
  and restriction_abs = M_basic.restriction_abs [OF M_basic_L]
paulson@13564
   338
  and M_restrict_iff = M_basic.M_restrict_iff [OF M_basic_L]
paulson@13564
   339
  and restrict_closed = M_basic.restrict_closed [OF M_basic_L]
paulson@13564
   340
  and Inter_abs = M_basic.Inter_abs [OF M_basic_L]
paulson@13564
   341
  and Inter_closed = M_basic.Inter_closed [OF M_basic_L]
paulson@13564
   342
  and Int_closed = M_basic.Int_closed [OF M_basic_L]
paulson@13564
   343
  and is_funspace_abs = M_basic.is_funspace_abs [OF M_basic_L]
paulson@13564
   344
  and succ_fun_eq2 = M_basic.succ_fun_eq2 [OF M_basic_L]
paulson@13564
   345
  and funspace_succ = M_basic.funspace_succ [OF M_basic_L]
paulson@13564
   346
  and finite_funspace_closed = M_basic.finite_funspace_closed [OF M_basic_L]
paulson@13323
   347
paulson@13564
   348
lemmas is_recfun_equal = M_basic.is_recfun_equal [OF M_basic_L]
paulson@13564
   349
  and is_recfun_cut = M_basic.is_recfun_cut [OF M_basic_L]
paulson@13564
   350
  and is_recfun_functional = M_basic.is_recfun_functional [OF M_basic_L]
paulson@13564
   351
  and is_recfun_relativize = M_basic.is_recfun_relativize [OF M_basic_L]
paulson@13564
   352
  and is_recfun_restrict = M_basic.is_recfun_restrict [OF M_basic_L]
paulson@13564
   353
  and univalent_is_recfun = M_basic.univalent_is_recfun [OF M_basic_L]
paulson@13564
   354
  and wellfounded_exists_is_recfun = M_basic.wellfounded_exists_is_recfun [OF M_basic_L]
paulson@13564
   355
  and wf_exists_is_recfun = M_basic.wf_exists_is_recfun [OF M_basic_L]
paulson@13564
   356
  and is_recfun_abs = M_basic.is_recfun_abs [OF M_basic_L]
paulson@13564
   357
  and irreflexive_abs = M_basic.irreflexive_abs [OF M_basic_L]
paulson@13564
   358
  and transitive_rel_abs = M_basic.transitive_rel_abs [OF M_basic_L]
paulson@13564
   359
  and linear_rel_abs = M_basic.linear_rel_abs [OF M_basic_L]
paulson@13564
   360
  and wellordered_is_trans_on = M_basic.wellordered_is_trans_on [OF M_basic_L]
paulson@13564
   361
  and wellordered_is_linear = M_basic.wellordered_is_linear [OF M_basic_L]
paulson@13564
   362
  and wellordered_is_wellfounded_on = M_basic.wellordered_is_wellfounded_on [OF M_basic_L]
paulson@13564
   363
  and wellfounded_imp_wellfounded_on = M_basic.wellfounded_imp_wellfounded_on [OF M_basic_L]
paulson@13564
   364
  and wellfounded_on_subset_A = M_basic.wellfounded_on_subset_A [OF M_basic_L]
paulson@13564
   365
  and wellfounded_on_iff_wellfounded = M_basic.wellfounded_on_iff_wellfounded [OF M_basic_L]
paulson@13564
   366
  and wellfounded_on_imp_wellfounded = M_basic.wellfounded_on_imp_wellfounded [OF M_basic_L]
paulson@13564
   367
  and wellfounded_on_field_imp_wellfounded = M_basic.wellfounded_on_field_imp_wellfounded [OF M_basic_L]
paulson@13564
   368
  and wellfounded_iff_wellfounded_on_field = M_basic.wellfounded_iff_wellfounded_on_field [OF M_basic_L]
paulson@13564
   369
  and wellfounded_induct = M_basic.wellfounded_induct [OF M_basic_L]
paulson@13564
   370
  and wellfounded_on_induct = M_basic.wellfounded_on_induct [OF M_basic_L]
paulson@13564
   371
  and linear_imp_relativized = M_basic.linear_imp_relativized [OF M_basic_L]
paulson@13564
   372
  and trans_on_imp_relativized = M_basic.trans_on_imp_relativized [OF M_basic_L]
paulson@13564
   373
  and wf_on_imp_relativized = M_basic.wf_on_imp_relativized [OF M_basic_L]
paulson@13564
   374
  and wf_imp_relativized = M_basic.wf_imp_relativized [OF M_basic_L]
paulson@13564
   375
  and well_ord_imp_relativized = M_basic.well_ord_imp_relativized [OF M_basic_L]
paulson@13564
   376
  and order_isomorphism_abs = M_basic.order_isomorphism_abs [OF M_basic_L]
paulson@13564
   377
  and pred_set_abs = M_basic.pred_set_abs [OF M_basic_L]
paulson@13323
   378
paulson@13564
   379
lemmas pred_closed = M_basic.pred_closed [OF M_basic_L]
paulson@13564
   380
  and membership_abs = M_basic.membership_abs [OF M_basic_L]
paulson@13564
   381
  and M_Memrel_iff = M_basic.M_Memrel_iff [OF M_basic_L]
paulson@13564
   382
  and Memrel_closed = M_basic.Memrel_closed [OF M_basic_L]
paulson@13564
   383
  and wellfounded_on_asym = M_basic.wellfounded_on_asym [OF M_basic_L]
paulson@13564
   384
  and wellordered_asym = M_basic.wellordered_asym [OF M_basic_L]
wenzelm@13428
   385
wenzelm@13429
   386
declare cartprod_closed [intro, simp]
wenzelm@13429
   387
declare sum_closed [intro, simp]
wenzelm@13429
   388
declare converse_closed [intro, simp]
paulson@13323
   389
declare converse_abs [simp]
wenzelm@13429
   390
declare image_closed [intro, simp]
paulson@13323
   391
declare vimage_abs [simp]
wenzelm@13429
   392
declare vimage_closed [intro, simp]
paulson@13323
   393
declare domain_abs [simp]
wenzelm@13429
   394
declare domain_closed [intro, simp]
paulson@13323
   395
declare range_abs [simp]
wenzelm@13429
   396
declare range_closed [intro, simp]
paulson@13323
   397
declare field_abs [simp]
wenzelm@13429
   398
declare field_closed [intro, simp]
paulson@13323
   399
declare relation_abs [simp]
paulson@13323
   400
declare function_abs [simp]
wenzelm@13429
   401
declare apply_closed [intro, simp]
paulson@13323
   402
declare typed_function_abs [simp]
paulson@13323
   403
declare injection_abs [simp]
paulson@13323
   404
declare surjection_abs [simp]
paulson@13323
   405
declare bijection_abs [simp]
wenzelm@13429
   406
declare comp_closed [intro, simp]
paulson@13323
   407
declare composition_abs [simp]
paulson@13323
   408
declare restriction_abs [simp]
wenzelm@13429
   409
declare restrict_closed [intro, simp]
paulson@13323
   410
declare Inter_abs [simp]
wenzelm@13429
   411
declare Inter_closed [intro, simp]
wenzelm@13429
   412
declare Int_closed [intro, simp]
paulson@13323
   413
declare is_funspace_abs [simp]
wenzelm@13429
   414
declare finite_funspace_closed [intro, simp]
paulson@13440
   415
declare membership_abs [simp] 
paulson@13440
   416
declare Memrel_closed  [intro,simp]
paulson@13323
   417
paulson@13306
   418
end