src/ZF/Constructible/L_axioms.thy
author paulson
Thu Jul 04 16:59:54 2002 +0200 (2002-07-04)
changeset 13298 b4f370679c65
parent 13291 a73ab154f75c
child 13299 3a932abf97e8
permissions -rw-r--r--
Constructible: some separation axioms
paulson@13223
     1
header {* The class L satisfies the axioms of ZF*}
paulson@13223
     2
paulson@13269
     3
theory L_axioms = Formula + Relative + Reflection:
paulson@13223
     4
paulson@13223
     5
paulson@13223
     6
text {* The class L satisfies the premises of locale @{text M_axioms} *}
paulson@13223
     7
paulson@13223
     8
lemma transL: "[| y\<in>x; L(x) |] ==> L(y)"
paulson@13223
     9
apply (insert Transset_Lset) 
paulson@13223
    10
apply (simp add: Transset_def L_def, blast) 
paulson@13223
    11
done
paulson@13223
    12
paulson@13223
    13
lemma nonempty: "L(0)"
paulson@13223
    14
apply (simp add: L_def) 
paulson@13223
    15
apply (blast intro: zero_in_Lset) 
paulson@13223
    16
done
paulson@13223
    17
paulson@13223
    18
lemma upair_ax: "upair_ax(L)"
paulson@13223
    19
apply (simp add: upair_ax_def upair_def, clarify)
paulson@13223
    20
apply (rule_tac x="{x,y}" in exI)  
paulson@13223
    21
apply (simp add: doubleton_in_L) 
paulson@13223
    22
done
paulson@13223
    23
paulson@13223
    24
lemma Union_ax: "Union_ax(L)"
paulson@13223
    25
apply (simp add: Union_ax_def big_union_def, clarify)
paulson@13223
    26
apply (rule_tac x="Union(x)" in exI)  
paulson@13223
    27
apply (simp add: Union_in_L, auto) 
paulson@13223
    28
apply (blast intro: transL) 
paulson@13223
    29
done
paulson@13223
    30
paulson@13223
    31
lemma power_ax: "power_ax(L)"
paulson@13223
    32
apply (simp add: power_ax_def powerset_def Relative.subset_def, clarify)
paulson@13223
    33
apply (rule_tac x="{y \<in> Pow(x). L(y)}" in exI)  
paulson@13223
    34
apply (simp add: LPow_in_L, auto)
paulson@13223
    35
apply (blast intro: transL) 
paulson@13223
    36
done
paulson@13223
    37
paulson@13223
    38
subsubsection{*For L to satisfy Replacement *}
paulson@13223
    39
paulson@13223
    40
(*Can't move these to Formula unless the definition of univalent is moved
paulson@13223
    41
there too!*)
paulson@13223
    42
paulson@13223
    43
lemma LReplace_in_Lset:
paulson@13223
    44
     "[|X \<in> Lset(i); univalent(L,X,Q); Ord(i)|] 
paulson@13223
    45
      ==> \<exists>j. Ord(j) & Replace(X, %x y. Q(x,y) & L(y)) \<subseteq> Lset(j)"
paulson@13223
    46
apply (rule_tac x="\<Union>y \<in> Replace(X, %x y. Q(x,y) & L(y)). succ(lrank(y))" 
paulson@13223
    47
       in exI)
paulson@13223
    48
apply simp
paulson@13223
    49
apply clarify 
paulson@13223
    50
apply (rule_tac a="x" in UN_I)  
paulson@13223
    51
 apply (simp_all add: Replace_iff univalent_def) 
paulson@13223
    52
apply (blast dest: transL L_I) 
paulson@13223
    53
done
paulson@13223
    54
paulson@13223
    55
lemma LReplace_in_L: 
paulson@13223
    56
     "[|L(X); univalent(L,X,Q)|] 
paulson@13223
    57
      ==> \<exists>Y. L(Y) & Replace(X, %x y. Q(x,y) & L(y)) \<subseteq> Y"
paulson@13223
    58
apply (drule L_D, clarify) 
paulson@13223
    59
apply (drule LReplace_in_Lset, assumption+)
paulson@13223
    60
apply (blast intro: L_I Lset_in_Lset_succ)
paulson@13223
    61
done
paulson@13223
    62
paulson@13223
    63
lemma replacement: "replacement(L,P)"
paulson@13223
    64
apply (simp add: replacement_def, clarify)
paulson@13268
    65
apply (frule LReplace_in_L, assumption+, clarify) 
paulson@13223
    66
apply (rule_tac x=Y in exI)   
paulson@13223
    67
apply (simp add: Replace_iff univalent_def, blast) 
paulson@13223
    68
done
paulson@13223
    69
paulson@13291
    70
subsection{*Instantiation of the locale @{text M_triv_axioms}*}
paulson@13291
    71
paulson@13291
    72
lemma Lset_mono_le: "mono_le_subset(Lset)"
paulson@13291
    73
by (simp add: mono_le_subset_def le_imp_subset Lset_mono) 
paulson@13291
    74
paulson@13291
    75
lemma Lset_cont: "cont_Ord(Lset)"
paulson@13291
    76
by (simp add: cont_Ord_def Limit_Lset_eq OUnion_def Limit_is_Ord) 
paulson@13291
    77
paulson@13291
    78
lemmas Pair_in_Lset = Formula.Pair_in_LLimit;
paulson@13291
    79
paulson@13291
    80
lemmas L_nat = Ord_in_L [OF Ord_nat];
paulson@13291
    81
paulson@13291
    82
ML
paulson@13291
    83
{*
paulson@13291
    84
val transL = thm "transL";
paulson@13291
    85
val nonempty = thm "nonempty";
paulson@13291
    86
val upair_ax = thm "upair_ax";
paulson@13291
    87
val Union_ax = thm "Union_ax";
paulson@13291
    88
val power_ax = thm "power_ax";
paulson@13291
    89
val replacement = thm "replacement";
paulson@13291
    90
val L_nat = thm "L_nat";
paulson@13291
    91
paulson@13291
    92
fun kill_flex_triv_prems st = Seq.hd ((REPEAT_FIRST assume_tac) st);
paulson@13291
    93
paulson@13291
    94
fun trivaxL th =
paulson@13291
    95
    kill_flex_triv_prems 
paulson@13291
    96
       ([transL, nonempty, upair_ax, Union_ax, power_ax, replacement, L_nat] 
paulson@13291
    97
        MRS (inst "M" "L" th));
paulson@13291
    98
paulson@13291
    99
bind_thm ("ball_abs", trivaxL (thm "M_triv_axioms.ball_abs"));
paulson@13291
   100
bind_thm ("rall_abs", trivaxL (thm "M_triv_axioms.rall_abs"));
paulson@13291
   101
bind_thm ("bex_abs", trivaxL (thm "M_triv_axioms.bex_abs"));
paulson@13291
   102
bind_thm ("rex_abs", trivaxL (thm "M_triv_axioms.rex_abs"));
paulson@13291
   103
bind_thm ("ball_iff_equiv", trivaxL (thm "M_triv_axioms.ball_iff_equiv"));
paulson@13291
   104
bind_thm ("M_equalityI", trivaxL (thm "M_triv_axioms.M_equalityI"));
paulson@13291
   105
bind_thm ("empty_abs", trivaxL (thm "M_triv_axioms.empty_abs"));
paulson@13291
   106
bind_thm ("subset_abs", trivaxL (thm "M_triv_axioms.subset_abs"));
paulson@13291
   107
bind_thm ("upair_abs", trivaxL (thm "M_triv_axioms.upair_abs"));
paulson@13291
   108
bind_thm ("upair_in_M_iff", trivaxL (thm "M_triv_axioms.upair_in_M_iff"));
paulson@13291
   109
bind_thm ("singleton_in_M_iff", trivaxL (thm "M_triv_axioms.singleton_in_M_iff"));
paulson@13291
   110
bind_thm ("pair_abs", trivaxL (thm "M_triv_axioms.pair_abs"));
paulson@13291
   111
bind_thm ("pair_in_M_iff", trivaxL (thm "M_triv_axioms.pair_in_M_iff"));
paulson@13291
   112
bind_thm ("pair_components_in_M", trivaxL (thm "M_triv_axioms.pair_components_in_M"));
paulson@13291
   113
bind_thm ("cartprod_abs", trivaxL (thm "M_triv_axioms.cartprod_abs"));
paulson@13291
   114
bind_thm ("union_abs", trivaxL (thm "M_triv_axioms.union_abs"));
paulson@13291
   115
bind_thm ("inter_abs", trivaxL (thm "M_triv_axioms.inter_abs"));
paulson@13291
   116
bind_thm ("setdiff_abs", trivaxL (thm "M_triv_axioms.setdiff_abs"));
paulson@13291
   117
bind_thm ("Union_abs", trivaxL (thm "M_triv_axioms.Union_abs"));
paulson@13291
   118
bind_thm ("Union_closed", trivaxL (thm "M_triv_axioms.Union_closed"));
paulson@13291
   119
bind_thm ("Un_closed", trivaxL (thm "M_triv_axioms.Un_closed"));
paulson@13291
   120
bind_thm ("cons_closed", trivaxL (thm "M_triv_axioms.cons_closed"));
paulson@13291
   121
bind_thm ("successor_abs", trivaxL (thm "M_triv_axioms.successor_abs"));
paulson@13291
   122
bind_thm ("succ_in_M_iff", trivaxL (thm "M_triv_axioms.succ_in_M_iff"));
paulson@13291
   123
bind_thm ("separation_closed", trivaxL (thm "M_triv_axioms.separation_closed"));
paulson@13291
   124
bind_thm ("strong_replacementI", trivaxL (thm "M_triv_axioms.strong_replacementI"));
paulson@13291
   125
bind_thm ("strong_replacement_closed", trivaxL (thm "M_triv_axioms.strong_replacement_closed"));
paulson@13291
   126
bind_thm ("RepFun_closed", trivaxL (thm "M_triv_axioms.RepFun_closed"));
paulson@13291
   127
bind_thm ("lam_closed", trivaxL (thm "M_triv_axioms.lam_closed"));
paulson@13291
   128
bind_thm ("image_abs", trivaxL (thm "M_triv_axioms.image_abs"));
paulson@13291
   129
bind_thm ("powerset_Pow", trivaxL (thm "M_triv_axioms.powerset_Pow"));
paulson@13291
   130
bind_thm ("powerset_imp_subset_Pow", trivaxL (thm "M_triv_axioms.powerset_imp_subset_Pow"));
paulson@13291
   131
bind_thm ("nat_into_M", trivaxL (thm "M_triv_axioms.nat_into_M"));
paulson@13291
   132
bind_thm ("nat_case_closed", trivaxL (thm "M_triv_axioms.nat_case_closed"));
paulson@13291
   133
bind_thm ("Inl_in_M_iff", trivaxL (thm "M_triv_axioms.Inl_in_M_iff"));
paulson@13291
   134
bind_thm ("Inr_in_M_iff", trivaxL (thm "M_triv_axioms.Inr_in_M_iff"));
paulson@13291
   135
bind_thm ("lt_closed", trivaxL (thm "M_triv_axioms.lt_closed"));
paulson@13291
   136
bind_thm ("transitive_set_abs", trivaxL (thm "M_triv_axioms.transitive_set_abs"));
paulson@13291
   137
bind_thm ("ordinal_abs", trivaxL (thm "M_triv_axioms.ordinal_abs"));
paulson@13291
   138
bind_thm ("limit_ordinal_abs", trivaxL (thm "M_triv_axioms.limit_ordinal_abs"));
paulson@13291
   139
bind_thm ("successor_ordinal_abs", trivaxL (thm "M_triv_axioms.successor_ordinal_abs"));
paulson@13291
   140
bind_thm ("finite_ordinal_abs", trivaxL (thm "M_triv_axioms.finite_ordinal_abs"));
paulson@13291
   141
bind_thm ("omega_abs", trivaxL (thm "M_triv_axioms.omega_abs"));
paulson@13291
   142
bind_thm ("number1_abs", trivaxL (thm "M_triv_axioms.number1_abs"));
paulson@13291
   143
bind_thm ("number1_abs", trivaxL (thm "M_triv_axioms.number1_abs"));
paulson@13291
   144
bind_thm ("number3_abs", trivaxL (thm "M_triv_axioms.number3_abs"));
paulson@13291
   145
*}
paulson@13291
   146
paulson@13291
   147
declare ball_abs [simp] 
paulson@13291
   148
declare rall_abs [simp] 
paulson@13291
   149
declare bex_abs [simp] 
paulson@13291
   150
declare rex_abs [simp] 
paulson@13291
   151
declare empty_abs [simp] 
paulson@13291
   152
declare subset_abs [simp] 
paulson@13291
   153
declare upair_abs [simp] 
paulson@13291
   154
declare upair_in_M_iff [iff]
paulson@13291
   155
declare singleton_in_M_iff [iff]
paulson@13291
   156
declare pair_abs [simp] 
paulson@13291
   157
declare pair_in_M_iff [iff]
paulson@13291
   158
declare cartprod_abs [simp] 
paulson@13291
   159
declare union_abs [simp] 
paulson@13291
   160
declare inter_abs [simp] 
paulson@13291
   161
declare setdiff_abs [simp] 
paulson@13291
   162
declare Union_abs [simp] 
paulson@13291
   163
declare Union_closed [intro,simp]
paulson@13291
   164
declare Un_closed [intro,simp]
paulson@13291
   165
declare cons_closed [intro,simp]
paulson@13291
   166
declare successor_abs [simp] 
paulson@13291
   167
declare succ_in_M_iff [iff]
paulson@13291
   168
declare separation_closed [intro,simp]
paulson@13291
   169
declare strong_replacementI [rule_format]
paulson@13291
   170
declare strong_replacement_closed [intro,simp]
paulson@13291
   171
declare RepFun_closed [intro,simp]
paulson@13291
   172
declare lam_closed [intro,simp]
paulson@13291
   173
declare image_abs [simp] 
paulson@13291
   174
declare nat_into_M [intro]
paulson@13291
   175
declare Inl_in_M_iff [iff]
paulson@13291
   176
declare Inr_in_M_iff [iff]
paulson@13291
   177
declare transitive_set_abs [simp] 
paulson@13291
   178
declare ordinal_abs [simp] 
paulson@13291
   179
declare limit_ordinal_abs [simp] 
paulson@13291
   180
declare successor_ordinal_abs [simp] 
paulson@13291
   181
declare finite_ordinal_abs [simp] 
paulson@13291
   182
declare omega_abs [simp] 
paulson@13291
   183
declare number1_abs [simp] 
paulson@13291
   184
declare number1_abs [simp] 
paulson@13291
   185
declare number3_abs [simp]
paulson@13291
   186
paulson@13291
   187
paulson@13291
   188
subsection{*Instantiation of the locale @{text reflection}*}
paulson@13291
   189
paulson@13291
   190
text{*instances of locale constants*}
paulson@13291
   191
constdefs
paulson@13291
   192
  L_Reflects :: "[i=>o,i=>o,[i,i]=>o] => o"
paulson@13291
   193
    "L_Reflects(Cl,P,Q) == Closed_Unbounded(Cl) &
paulson@13291
   194
                           (\<forall>a. Cl(a) --> (\<forall>x \<in> Lset(a). P(x) <-> Q(a,x)))"
paulson@13291
   195
paulson@13291
   196
  L_F0 :: "[i=>o,i] => i"
paulson@13291
   197
    "L_F0(P,y) == \<mu>b. (\<exists>z. L(z) \<and> P(<y,z>)) --> (\<exists>z\<in>Lset(b). P(<y,z>))"
paulson@13291
   198
paulson@13291
   199
  L_FF :: "[i=>o,i] => i"
paulson@13291
   200
    "L_FF(P)   == \<lambda>a. \<Union>y\<in>Lset(a). L_F0(P,y)"
paulson@13291
   201
paulson@13291
   202
  L_ClEx :: "[i=>o,i] => o"
paulson@13291
   203
    "L_ClEx(P) == \<lambda>a. Limit(a) \<and> normalize(L_FF(P),a) = a"
paulson@13291
   204
paulson@13291
   205
theorem Triv_reflection [intro]:
paulson@13291
   206
     "L_Reflects(Ord, P, \<lambda>a x. P(x))"
paulson@13291
   207
by (simp add: L_Reflects_def)
paulson@13291
   208
paulson@13291
   209
theorem Not_reflection [intro]:
paulson@13291
   210
     "L_Reflects(Cl,P,Q) ==> L_Reflects(Cl, \<lambda>x. ~P(x), \<lambda>a x. ~Q(a,x))"
paulson@13291
   211
by (simp add: L_Reflects_def) 
paulson@13291
   212
paulson@13291
   213
theorem And_reflection [intro]:
paulson@13291
   214
     "[| L_Reflects(Cl,P,Q); L_Reflects(C',P',Q') |] 
paulson@13291
   215
      ==> L_Reflects(\<lambda>a. Cl(a) \<and> C'(a), \<lambda>x. P(x) \<and> P'(x), 
paulson@13291
   216
                                      \<lambda>a x. Q(a,x) \<and> Q'(a,x))"
paulson@13291
   217
by (simp add: L_Reflects_def Closed_Unbounded_Int, blast)
paulson@13291
   218
paulson@13291
   219
theorem Or_reflection [intro]:
paulson@13291
   220
     "[| L_Reflects(Cl,P,Q); L_Reflects(C',P',Q') |] 
paulson@13291
   221
      ==> L_Reflects(\<lambda>a. Cl(a) \<and> C'(a), \<lambda>x. P(x) \<or> P'(x), 
paulson@13291
   222
                                      \<lambda>a x. Q(a,x) \<or> Q'(a,x))"
paulson@13291
   223
by (simp add: L_Reflects_def Closed_Unbounded_Int, blast)
paulson@13291
   224
paulson@13291
   225
theorem Imp_reflection [intro]:
paulson@13291
   226
     "[| L_Reflects(Cl,P,Q); L_Reflects(C',P',Q') |] 
paulson@13291
   227
      ==> L_Reflects(\<lambda>a. Cl(a) \<and> C'(a), 
paulson@13291
   228
                   \<lambda>x. P(x) --> P'(x), 
paulson@13291
   229
                   \<lambda>a x. Q(a,x) --> Q'(a,x))"
paulson@13291
   230
by (simp add: L_Reflects_def Closed_Unbounded_Int, blast)
paulson@13291
   231
paulson@13291
   232
theorem Iff_reflection [intro]:
paulson@13291
   233
     "[| L_Reflects(Cl,P,Q); L_Reflects(C',P',Q') |] 
paulson@13291
   234
      ==> L_Reflects(\<lambda>a. Cl(a) \<and> C'(a), 
paulson@13291
   235
                   \<lambda>x. P(x) <-> P'(x), 
paulson@13291
   236
                   \<lambda>a x. Q(a,x) <-> Q'(a,x))"
paulson@13291
   237
by (simp add: L_Reflects_def Closed_Unbounded_Int, blast) 
paulson@13291
   238
paulson@13291
   239
paulson@13291
   240
theorem Ex_reflection [intro]:
paulson@13291
   241
     "L_Reflects(Cl, \<lambda>x. P(fst(x),snd(x)), \<lambda>a x. Q(a,fst(x),snd(x))) 
paulson@13291
   242
      ==> L_Reflects(\<lambda>a. Cl(a) \<and> L_ClEx(\<lambda>x. P(fst(x),snd(x)), a), 
paulson@13291
   243
                   \<lambda>x. \<exists>z. L(z) \<and> P(x,z), 
paulson@13291
   244
                   \<lambda>a x. \<exists>z\<in>Lset(a). Q(a,x,z))"
paulson@13291
   245
apply (unfold L_Reflects_def L_ClEx_def L_FF_def L_F0_def L_def) 
paulson@13291
   246
apply (rule reflection.Ex_reflection [OF Lset_mono_le Lset_cont Pair_in_Lset],
paulson@13291
   247
       assumption+)
paulson@13291
   248
done
paulson@13291
   249
paulson@13291
   250
theorem All_reflection [intro]:
paulson@13291
   251
     "L_Reflects(Cl,  \<lambda>x. P(fst(x),snd(x)), \<lambda>a x. Q(a,fst(x),snd(x)))
paulson@13291
   252
      ==> L_Reflects(\<lambda>a. Cl(a) \<and> L_ClEx(\<lambda>x. ~P(fst(x),snd(x)), a), 
paulson@13291
   253
                   \<lambda>x. \<forall>z. L(z) --> P(x,z), 
paulson@13291
   254
                   \<lambda>a x. \<forall>z\<in>Lset(a). Q(a,x,z))" 
paulson@13291
   255
apply (unfold L_Reflects_def L_ClEx_def L_FF_def L_F0_def L_def) 
paulson@13291
   256
apply (rule reflection.All_reflection [OF Lset_mono_le Lset_cont Pair_in_Lset],
paulson@13291
   257
       assumption+)
paulson@13291
   258
done
paulson@13291
   259
paulson@13291
   260
theorem Rex_reflection [intro]:
paulson@13291
   261
     "L_Reflects(Cl, \<lambda>x. P(fst(x),snd(x)), \<lambda>a x. Q(a,fst(x),snd(x))) 
paulson@13291
   262
      ==> L_Reflects(\<lambda>a. Cl(a) \<and> L_ClEx(\<lambda>x. P(fst(x),snd(x)), a), 
paulson@13291
   263
                   \<lambda>x. \<exists>z[L]. P(x,z), 
paulson@13291
   264
                   \<lambda>a x. \<exists>z\<in>Lset(a). Q(a,x,z))"
paulson@13291
   265
by (unfold rex_def, blast) 
paulson@13291
   266
paulson@13291
   267
theorem Rall_reflection [intro]:
paulson@13291
   268
     "L_Reflects(Cl,  \<lambda>x. P(fst(x),snd(x)), \<lambda>a x. Q(a,fst(x),snd(x)))
paulson@13291
   269
      ==> L_Reflects(\<lambda>a. Cl(a) \<and> L_ClEx(\<lambda>x. ~P(fst(x),snd(x)), a), 
paulson@13291
   270
                   \<lambda>x. \<forall>z[L]. P(x,z), 
paulson@13291
   271
                   \<lambda>a x. \<forall>z\<in>Lset(a). Q(a,x,z))" 
paulson@13291
   272
by (unfold rall_def, blast) 
paulson@13291
   273
paulson@13291
   274
lemma ReflectsD:
paulson@13291
   275
     "[|L_Reflects(Cl,P,Q); Ord(i)|] 
paulson@13291
   276
      ==> \<exists>j. i<j & (\<forall>x \<in> Lset(j). P(x) <-> Q(j,x))"
paulson@13291
   277
apply (simp add: L_Reflects_def Closed_Unbounded_def, clarify)
paulson@13291
   278
apply (blast dest!: UnboundedD) 
paulson@13291
   279
done
paulson@13291
   280
paulson@13291
   281
lemma ReflectsE:
paulson@13291
   282
     "[| L_Reflects(Cl,P,Q); Ord(i);
paulson@13291
   283
         !!j. [|i<j;  \<forall>x \<in> Lset(j). P(x) <-> Q(j,x)|] ==> R |]
paulson@13291
   284
      ==> R"
paulson@13291
   285
by (blast dest!: ReflectsD) 
paulson@13291
   286
paulson@13291
   287
lemma Collect_mem_eq: "{x\<in>A. x\<in>B} = A \<inter> B";
paulson@13291
   288
by blast
paulson@13291
   289
paulson@13291
   290
paulson@13298
   291
subsection{*Internalized formulas for some relativized ones*}
paulson@13298
   292
paulson@13298
   293
subsubsection{*Unordered pairs*}
paulson@13298
   294
paulson@13298
   295
constdefs upair_fm :: "[i,i,i]=>i"
paulson@13298
   296
    "upair_fm(x,y,z) == 
paulson@13298
   297
       And(Member(x,z), 
paulson@13298
   298
           And(Member(y,z),
paulson@13298
   299
               Forall(Implies(Member(0,succ(z)), 
paulson@13298
   300
                              Or(Equal(0,succ(x)), Equal(0,succ(y)))))))"
paulson@13298
   301
paulson@13298
   302
lemma upair_type [TC]:
paulson@13298
   303
     "[| x \<in> nat; y \<in> nat; z \<in> nat |] ==> upair_fm(x,y,z) \<in> formula"
paulson@13298
   304
by (simp add: upair_fm_def) 
paulson@13298
   305
paulson@13298
   306
lemma arity_upair_fm [simp]:
paulson@13298
   307
     "[| x \<in> nat; y \<in> nat; z \<in> nat |] 
paulson@13298
   308
      ==> arity(upair_fm(x,y,z)) = succ(x) \<union> succ(y) \<union> succ(z)"
paulson@13298
   309
by (simp add: upair_fm_def succ_Un_distrib [symmetric] Un_ac) 
paulson@13298
   310
paulson@13298
   311
lemma sats_upair_fm [simp]:
paulson@13298
   312
   "[| x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|]
paulson@13298
   313
    ==> sats(A, upair_fm(x,y,z), env) <-> 
paulson@13298
   314
            upair(**A, nth(x,env), nth(y,env), nth(z,env))"
paulson@13298
   315
by (simp add: upair_fm_def upair_def)
paulson@13298
   316
paulson@13298
   317
lemma upair_iff_sats:
paulson@13298
   318
      "[| nth(i,env) = x; nth(j,env) = y; nth(k,env) = z; 
paulson@13298
   319
          i \<in> nat; j \<in> nat; k \<in> nat; env \<in> list(A)|]
paulson@13298
   320
       ==> upair(**A, x, y, z) <-> sats(A, upair_fm(i,j,k), env)"
paulson@13298
   321
by (simp add: sats_upair_fm)
paulson@13298
   322
paulson@13298
   323
text{*Useful? At least it refers to "real" unordered pairs*}
paulson@13298
   324
lemma sats_upair_fm2 [simp]:
paulson@13298
   325
   "[| x \<in> nat; y \<in> nat; z < length(env); env \<in> list(A); Transset(A)|]
paulson@13298
   326
    ==> sats(A, upair_fm(x,y,z), env) <-> 
paulson@13298
   327
        nth(z,env) = {nth(x,env), nth(y,env)}"
paulson@13298
   328
apply (frule lt_length_in_nat, assumption)  
paulson@13298
   329
apply (simp add: upair_fm_def Transset_def, auto) 
paulson@13298
   330
apply (blast intro: nth_type) 
paulson@13298
   331
done
paulson@13298
   332
paulson@13298
   333
subsubsection{*Ordered pairs*}
paulson@13298
   334
paulson@13298
   335
constdefs pair_fm :: "[i,i,i]=>i"
paulson@13298
   336
    "pair_fm(x,y,z) == 
paulson@13298
   337
       Exists(And(upair_fm(succ(x),succ(x),0),
paulson@13298
   338
              Exists(And(upair_fm(succ(succ(x)),succ(succ(y)),0),
paulson@13298
   339
                         upair_fm(1,0,succ(succ(z)))))))"
paulson@13298
   340
paulson@13298
   341
lemma pair_type [TC]:
paulson@13298
   342
     "[| x \<in> nat; y \<in> nat; z \<in> nat |] ==> pair_fm(x,y,z) \<in> formula"
paulson@13298
   343
by (simp add: pair_fm_def) 
paulson@13298
   344
paulson@13298
   345
lemma arity_pair_fm [simp]:
paulson@13298
   346
     "[| x \<in> nat; y \<in> nat; z \<in> nat |] 
paulson@13298
   347
      ==> arity(pair_fm(x,y,z)) = succ(x) \<union> succ(y) \<union> succ(z)"
paulson@13298
   348
by (simp add: pair_fm_def succ_Un_distrib [symmetric] Un_ac) 
paulson@13298
   349
paulson@13298
   350
lemma sats_pair_fm [simp]:
paulson@13298
   351
   "[| x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|]
paulson@13298
   352
    ==> sats(A, pair_fm(x,y,z), env) <-> 
paulson@13298
   353
        pair(**A, nth(x,env), nth(y,env), nth(z,env))"
paulson@13298
   354
by (simp add: pair_fm_def pair_def)
paulson@13298
   355
paulson@13298
   356
lemma pair_iff_sats:
paulson@13298
   357
      "[| nth(i,env) = x; nth(j,env) = y; nth(k,env) = z; 
paulson@13298
   358
          i \<in> nat; j \<in> nat; k \<in> nat; env \<in> list(A)|]
paulson@13298
   359
       ==> pair(**A, x, y, z) <-> sats(A, pair_fm(i,j,k), env)"
paulson@13298
   360
by (simp add: sats_pair_fm)
paulson@13298
   361
paulson@13298
   362
paulson@13298
   363
paulson@13298
   364
subsection{*Proving instances of Separation using Reflection!*}
paulson@13298
   365
paulson@13298
   366
text{*Helps us solve for de Bruijn indices!*}
paulson@13298
   367
lemma nth_ConsI: "[|nth(n,l) = x; n \<in> nat|] ==> nth(succ(n), Cons(a,l)) = x"
paulson@13298
   368
by simp
paulson@13298
   369
paulson@13298
   370
paulson@13298
   371
lemma Collect_conj_in_DPow:
paulson@13298
   372
     "[| {x\<in>A. P(x)} \<in> DPow(A);  {x\<in>A. Q(x)} \<in> DPow(A) |] 
paulson@13298
   373
      ==> {x\<in>A. P(x) & Q(x)} \<in> DPow(A)"
paulson@13298
   374
by (simp add: Int_in_DPow Collect_Int_Collect_eq [symmetric]) 
paulson@13298
   375
paulson@13298
   376
lemma Collect_conj_in_DPow_Lset:
paulson@13298
   377
     "[|z \<in> Lset(j); {x \<in> Lset(j). P(x)} \<in> DPow(Lset(j))|]
paulson@13298
   378
      ==> {x \<in> Lset(j). x \<in> z & P(x)} \<in> DPow(Lset(j))"
paulson@13298
   379
apply (frule mem_Lset_imp_subset_Lset)
paulson@13298
   380
apply (simp add: Collect_conj_in_DPow Collect_mem_eq 
paulson@13298
   381
                 subset_Int_iff2 elem_subset_in_DPow)
paulson@13298
   382
done
paulson@13298
   383
paulson@13298
   384
lemma separation_CollectI:
paulson@13298
   385
     "(\<And>z. L(z) ==> L({x \<in> z . P(x)})) ==> separation(L, \<lambda>x. P(x))"
paulson@13298
   386
apply (unfold separation_def, clarify) 
paulson@13298
   387
apply (rule_tac x="{x\<in>z. P(x)}" in rexI) 
paulson@13298
   388
apply simp_all
paulson@13298
   389
done
paulson@13298
   390
paulson@13298
   391
text{*Reduces the original comprehension to the reflected one*}
paulson@13298
   392
lemma reflection_imp_L_separation:
paulson@13298
   393
      "[| \<forall>x\<in>Lset(j). P(x) <-> Q(x);
paulson@13298
   394
          {x \<in> Lset(j) . Q(x)} \<in> DPow(Lset(j)); 
paulson@13298
   395
          Ord(j);  z \<in> Lset(j)|] ==> L({x \<in> z . P(x)})"
paulson@13298
   396
apply (rule_tac i = "succ(j)" in L_I)
paulson@13298
   397
 prefer 2 apply simp
paulson@13298
   398
apply (subgoal_tac "{x \<in> z. P(x)} = {x \<in> Lset(j). x \<in> z & (Q(x))}")
paulson@13298
   399
 prefer 2
paulson@13298
   400
 apply (blast dest: mem_Lset_imp_subset_Lset) 
paulson@13298
   401
apply (simp add: Lset_succ Collect_conj_in_DPow_Lset)
paulson@13298
   402
done
paulson@13298
   403
paulson@13298
   404
paulson@13298
   405
subsubsection{*Separation for Intersection*}
paulson@13298
   406
paulson@13298
   407
lemma Inter_Reflects:
paulson@13298
   408
     "L_Reflects(?Cl, \<lambda>x. \<forall>y[L]. y\<in>A --> x \<in> y, 
paulson@13298
   409
               \<lambda>i x. \<forall>y\<in>Lset(i). y\<in>A --> x \<in> y)"
paulson@13298
   410
by fast
paulson@13298
   411
paulson@13298
   412
lemma Inter_separation:
paulson@13298
   413
     "L(A) ==> separation(L, \<lambda>x. \<forall>y[L]. y\<in>A --> x\<in>y)"
paulson@13298
   414
apply (rule separation_CollectI) 
paulson@13298
   415
apply (rule_tac A="{A,z}" in subset_LsetE, blast ) 
paulson@13298
   416
apply (rule ReflectsE [OF Inter_Reflects], assumption)
paulson@13298
   417
apply (drule subset_Lset_ltD, assumption) 
paulson@13298
   418
apply (erule reflection_imp_L_separation)
paulson@13298
   419
  apply (simp_all add: lt_Ord2, clarify)
paulson@13298
   420
apply (rule DPowI2) 
paulson@13298
   421
apply (rule ball_iff_sats) 
paulson@13298
   422
apply (rule imp_iff_sats)
paulson@13298
   423
apply (rule_tac [2] i=1 and j=0 and env="[y,x,A]" in mem_iff_sats)
paulson@13298
   424
apply (rule_tac i=0 and j=2 in mem_iff_sats)
paulson@13298
   425
apply (simp_all add: succ_Un_distrib [symmetric])
paulson@13298
   426
done
paulson@13298
   427
paulson@13298
   428
subsubsection{*Separation for Cartesian Product*}
paulson@13298
   429
paulson@13298
   430
text{*The @{text simplified} attribute tidies up the reflecting class.*}
paulson@13298
   431
theorem upair_reflection [simplified,intro]:
paulson@13298
   432
     "L_Reflects(?Cl, \<lambda>x. upair(L,f(x),g(x),h(x)), 
paulson@13298
   433
                    \<lambda>i x. upair(**Lset(i),f(x),g(x),h(x)))" 
paulson@13298
   434
by (simp add: upair_def, fast) 
paulson@13298
   435
paulson@13298
   436
theorem pair_reflection [simplified,intro]:
paulson@13298
   437
     "L_Reflects(?Cl, \<lambda>x. pair(L,f(x),g(x),h(x)), 
paulson@13298
   438
                    \<lambda>i x. pair(**Lset(i),f(x),g(x),h(x)))"
paulson@13298
   439
by (simp only: pair_def rex_setclass_is_bex, fast) 
paulson@13298
   440
paulson@13298
   441
lemma cartprod_Reflects [simplified]:
paulson@13298
   442
     "L_Reflects(?Cl, \<lambda>z. \<exists>x[L]. x\<in>A & (\<exists>y[L]. y\<in>B & pair(L,x,y,z)),
paulson@13298
   443
                \<lambda>i z. \<exists>x\<in>Lset(i). x\<in>A & (\<exists>y\<in>Lset(i). y\<in>B & 
paulson@13298
   444
                               pair(**Lset(i),x,y,z)))"
paulson@13298
   445
by fast
paulson@13298
   446
paulson@13298
   447
lemma cartprod_separation:
paulson@13298
   448
     "[| L(A); L(B) |] 
paulson@13298
   449
      ==> separation(L, \<lambda>z. \<exists>x[L]. x\<in>A & (\<exists>y[L]. y\<in>B & pair(L,x,y,z)))"
paulson@13298
   450
apply (rule separation_CollectI) 
paulson@13298
   451
apply (rule_tac A="{A,B,z}" in subset_LsetE, blast ) 
paulson@13298
   452
apply (rule ReflectsE [OF cartprod_Reflects], assumption)
paulson@13298
   453
apply (drule subset_Lset_ltD, assumption) 
paulson@13298
   454
apply (erule reflection_imp_L_separation)
paulson@13298
   455
  apply (simp_all add: lt_Ord2, clarify) 
paulson@13298
   456
apply (rule DPowI2)
paulson@13298
   457
apply (rename_tac u)  
paulson@13298
   458
apply (rule bex_iff_sats) 
paulson@13298
   459
apply (rule conj_iff_sats)
paulson@13298
   460
apply (rule_tac i=0 and j=2 and env="[x,u,A,B]" in mem_iff_sats, simp_all)
paulson@13298
   461
apply (rule bex_iff_sats) 
paulson@13298
   462
apply (rule conj_iff_sats)
paulson@13298
   463
apply (rule mem_iff_sats)
paulson@13298
   464
apply (blast intro: nth_0 nth_ConsI) 
paulson@13298
   465
apply (blast intro: nth_0 nth_ConsI, simp_all)
paulson@13298
   466
apply (rule_tac i=1 and j=0 and k=2 in pair_iff_sats)
paulson@13298
   467
apply (simp_all add: succ_Un_distrib [symmetric])
paulson@13298
   468
done
paulson@13298
   469
paulson@13298
   470
subsubsection{*Separation for Image*}
paulson@13298
   471
paulson@13298
   472
text{*No @{text simplified} here: it simplifies the occurrence of 
paulson@13298
   473
      the predicate @{term pair}!*}
paulson@13298
   474
lemma image_Reflects:
paulson@13298
   475
     "L_Reflects(?Cl, \<lambda>y. \<exists>p[L]. p\<in>r & (\<exists>x[L]. x\<in>A & pair(L,x,y,p)),
paulson@13298
   476
           \<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@13298
   477
by fast
paulson@13298
   478
paulson@13298
   479
paulson@13298
   480
lemma image_separation:
paulson@13298
   481
     "[| L(A); L(r) |] 
paulson@13298
   482
      ==> separation(L, \<lambda>y. \<exists>p[L]. p\<in>r & (\<exists>x[L]. x\<in>A & pair(L,x,y,p)))"
paulson@13298
   483
apply (rule separation_CollectI) 
paulson@13298
   484
apply (rule_tac A="{A,r,z}" in subset_LsetE, blast ) 
paulson@13298
   485
apply (rule ReflectsE [OF image_Reflects], assumption)
paulson@13298
   486
apply (drule subset_Lset_ltD, assumption) 
paulson@13298
   487
apply (erule reflection_imp_L_separation)
paulson@13298
   488
  apply (simp_all add: lt_Ord2, clarify)
paulson@13298
   489
apply (rule DPowI2)
paulson@13298
   490
apply (rule bex_iff_sats) 
paulson@13298
   491
apply (rule conj_iff_sats)
paulson@13298
   492
apply (rule_tac env="[p,y,A,r]" in mem_iff_sats)
paulson@13298
   493
apply (blast intro: nth_0 nth_ConsI) 
paulson@13298
   494
apply (blast intro: nth_0 nth_ConsI, simp_all)
paulson@13298
   495
apply (rule bex_iff_sats) 
paulson@13298
   496
apply (rule conj_iff_sats)
paulson@13298
   497
apply (rule mem_iff_sats)
paulson@13298
   498
apply (blast intro: nth_0 nth_ConsI) 
paulson@13298
   499
apply (blast intro: nth_0 nth_ConsI, simp_all)
paulson@13298
   500
apply (rule pair_iff_sats)
paulson@13298
   501
apply (blast intro: nth_0 nth_ConsI) 
paulson@13298
   502
apply (blast intro: nth_0 nth_ConsI) 
paulson@13298
   503
apply (blast intro: nth_0 nth_ConsI)
paulson@13298
   504
apply (simp_all add: succ_Un_distrib [symmetric])
paulson@13298
   505
done
paulson@13298
   506
paulson@13298
   507
paulson@13298
   508
subsubsection{*Separation for Converse*}
paulson@13298
   509
paulson@13298
   510
lemma converse_Reflects:
paulson@13298
   511
     "L_Reflects(?Cl, 
paulson@13298
   512
        \<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@13298
   513
     \<lambda>i z. \<exists>p\<in>Lset(i). p\<in>r & (\<exists>x\<in>Lset(i). \<exists>y\<in>Lset(i). 
paulson@13298
   514
                     pair(**Lset(i),x,y,p) & pair(**Lset(i),y,x,z)))"
paulson@13298
   515
by fast
paulson@13298
   516
paulson@13298
   517
lemma converse_separation:
paulson@13298
   518
     "L(r) ==> separation(L, 
paulson@13298
   519
         \<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@13298
   520
apply (rule separation_CollectI) 
paulson@13298
   521
apply (rule_tac A="{r,z}" in subset_LsetE, blast ) 
paulson@13298
   522
apply (rule ReflectsE [OF converse_Reflects], assumption)
paulson@13298
   523
apply (drule subset_Lset_ltD, assumption) 
paulson@13298
   524
apply (erule reflection_imp_L_separation)
paulson@13298
   525
  apply (simp_all add: lt_Ord2, clarify)
paulson@13298
   526
apply (rule DPowI2)
paulson@13298
   527
apply (rename_tac u) 
paulson@13298
   528
apply (rule bex_iff_sats) 
paulson@13298
   529
apply (rule conj_iff_sats)
paulson@13298
   530
apply (rule_tac i=0 and j="2" and env="[p,u,r]" in mem_iff_sats, simp_all)
paulson@13298
   531
apply (rule bex_iff_sats) 
paulson@13298
   532
apply (rule bex_iff_sats) 
paulson@13298
   533
apply (rule conj_iff_sats)
paulson@13298
   534
apply (rule_tac i=1 and j=0 and k=2 in pair_iff_sats, simp_all)
paulson@13298
   535
apply (rule pair_iff_sats)
paulson@13298
   536
apply (blast intro: nth_0 nth_ConsI) 
paulson@13298
   537
apply (blast intro: nth_0 nth_ConsI) 
paulson@13298
   538
apply (blast intro: nth_0 nth_ConsI)
paulson@13298
   539
apply (simp_all add: succ_Un_distrib [symmetric])
paulson@13298
   540
done
paulson@13298
   541
paulson@13298
   542
paulson@13298
   543
subsubsection{*Separation for Restriction*}
paulson@13298
   544
paulson@13298
   545
lemma restrict_Reflects:
paulson@13298
   546
     "L_Reflects(?Cl, \<lambda>z. \<exists>x[L]. x\<in>A & (\<exists>y[L]. pair(L,x,y,z)),
paulson@13298
   547
        \<lambda>i z. \<exists>x\<in>Lset(i). x\<in>A & (\<exists>y\<in>Lset(i). pair(**Lset(i),x,y,z)))"
paulson@13298
   548
by fast
paulson@13298
   549
paulson@13298
   550
lemma restrict_separation:
paulson@13298
   551
   "L(A) ==> separation(L, \<lambda>z. \<exists>x[L]. x\<in>A & (\<exists>y[L]. pair(L,x,y,z)))"
paulson@13298
   552
apply (rule separation_CollectI) 
paulson@13298
   553
apply (rule_tac A="{A,z}" in subset_LsetE, blast ) 
paulson@13298
   554
apply (rule ReflectsE [OF restrict_Reflects], assumption)
paulson@13298
   555
apply (drule subset_Lset_ltD, assumption) 
paulson@13298
   556
apply (erule reflection_imp_L_separation)
paulson@13298
   557
  apply (simp_all add: lt_Ord2, clarify)
paulson@13298
   558
apply (rule DPowI2)
paulson@13298
   559
apply (rename_tac u) 
paulson@13298
   560
apply (rule bex_iff_sats) 
paulson@13298
   561
apply (rule conj_iff_sats)
paulson@13298
   562
apply (rule_tac i=0 and j="2" and env="[x,u,A]" in mem_iff_sats, simp_all)
paulson@13298
   563
apply (rule bex_iff_sats) 
paulson@13298
   564
apply (rule_tac i=1 and j=0 and k=2 in pair_iff_sats)
paulson@13298
   565
apply (simp_all add: succ_Un_distrib [symmetric])
paulson@13298
   566
done
paulson@13298
   567
paulson@13298
   568
paulson@13298
   569
subsubsection{*Separation for Composition*}
paulson@13298
   570
paulson@13298
   571
lemma comp_Reflects:
paulson@13298
   572
     "L_Reflects(?Cl, \<lambda>xz. \<exists>x[L]. \<exists>y[L]. \<exists>z[L]. \<exists>xy[L]. \<exists>yz[L]. 
paulson@13298
   573
		  pair(L,x,z,xz) & pair(L,x,y,xy) & pair(L,y,z,yz) & 
paulson@13298
   574
                  xy\<in>s & yz\<in>r,
paulson@13298
   575
        \<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). 
paulson@13298
   576
		  pair(**Lset(i),x,z,xz) & pair(**Lset(i),x,y,xy) & 
paulson@13298
   577
                  pair(**Lset(i),y,z,yz) & xy\<in>s & yz\<in>r)"
paulson@13298
   578
by fast
paulson@13298
   579
paulson@13298
   580
lemma comp_separation:
paulson@13298
   581
     "[| L(r); L(s) |]
paulson@13298
   582
      ==> separation(L, \<lambda>xz. \<exists>x[L]. \<exists>y[L]. \<exists>z[L]. \<exists>xy[L]. \<exists>yz[L]. 
paulson@13298
   583
		  pair(L,x,z,xz) & pair(L,x,y,xy) & pair(L,y,z,yz) & 
paulson@13298
   584
                  xy\<in>s & yz\<in>r)"
paulson@13298
   585
apply (rule separation_CollectI) 
paulson@13298
   586
apply (rule_tac A="{r,s,z}" in subset_LsetE, blast ) 
paulson@13298
   587
apply (rule ReflectsE [OF comp_Reflects], assumption)
paulson@13298
   588
apply (drule subset_Lset_ltD, assumption) 
paulson@13298
   589
apply (erule reflection_imp_L_separation)
paulson@13298
   590
  apply (simp_all add: lt_Ord2, clarify)
paulson@13298
   591
apply (rule DPowI2)
paulson@13298
   592
apply (rename_tac u) 
paulson@13298
   593
apply (rule bex_iff_sats)+
paulson@13298
   594
apply (rename_tac x y z)  
paulson@13298
   595
apply (rule conj_iff_sats)
paulson@13298
   596
apply (rule_tac env="[z,y,x,u,r,s]" in pair_iff_sats)
paulson@13298
   597
apply (blast intro: nth_0 nth_ConsI) 
paulson@13298
   598
apply (blast intro: nth_0 nth_ConsI) 
paulson@13298
   599
apply (blast intro: nth_0 nth_ConsI, simp_all)
paulson@13298
   600
apply (rule bex_iff_sats) 
paulson@13298
   601
apply (rule conj_iff_sats)
paulson@13298
   602
apply (rule pair_iff_sats)
paulson@13298
   603
apply (blast intro: nth_0 nth_ConsI) 
paulson@13298
   604
apply (blast intro: nth_0 nth_ConsI) 
paulson@13298
   605
apply (blast intro: nth_0 nth_ConsI, simp_all)
paulson@13298
   606
apply (rule bex_iff_sats) 
paulson@13298
   607
apply (rule conj_iff_sats)
paulson@13298
   608
apply (rule pair_iff_sats)
paulson@13298
   609
apply (blast intro: nth_0 nth_ConsI) 
paulson@13298
   610
apply (blast intro: nth_0 nth_ConsI) 
paulson@13298
   611
apply (blast intro: nth_0 nth_ConsI, simp_all) 
paulson@13298
   612
apply (rule conj_iff_sats)
paulson@13298
   613
apply (rule mem_iff_sats) 
paulson@13298
   614
apply (blast intro: nth_0 nth_ConsI) 
paulson@13298
   615
apply (blast intro: nth_0 nth_ConsI, simp) 
paulson@13298
   616
apply (rule mem_iff_sats) 
paulson@13298
   617
apply (blast intro: nth_0 nth_ConsI) 
paulson@13298
   618
apply (blast intro: nth_0 nth_ConsI)
paulson@13298
   619
apply (simp_all add: succ_Un_distrib [symmetric])
paulson@13298
   620
done
paulson@13298
   621
paulson@13298
   622
paulson@13298
   623
paulson@13298
   624
paulson@13223
   625
end
paulson@13223
   626
paulson@13223
   627
(*
paulson@13223
   628
paulson@13223
   629
  and pred_separation:
paulson@13269
   630
     "[| L(r); L(x) |] ==> separation(L, \<lambda>y. \<exists>p\<in>r. L(p) & pair(L,y,x,p))"
paulson@13223
   631
  and Memrel_separation:
paulson@13269
   632
     "separation(L, \<lambda>z. \<exists>x y. L(x) & L(y) & pair(L,x,y,z) \<and> x \<in> y)"
paulson@13223
   633
  and obase_separation:
paulson@13223
   634
     --{*part of the order type formalization*}
paulson@13223
   635
     "[| L(A); L(r) |] 
paulson@13269
   636
      ==> separation(L, \<lambda>a. \<exists>x g mx par. L(x) & L(g) & L(mx) & L(par) & 
paulson@13269
   637
	     ordinal(L,x) & membership(L,x,mx) & pred_set(L,A,a,r,par) &
paulson@13269
   638
	     order_isomorphism(L,par,r,x,mx,g))"
paulson@13223
   639
  and well_ord_iso_separation:
paulson@13223
   640
     "[| L(A); L(f); L(r) |] 
paulson@13269
   641
      ==> separation (L, \<lambda>x. x\<in>A --> (\<exists>y. L(y) \<and> (\<exists>p. L(p) \<and> 
paulson@13269
   642
		     fun_apply(L,f,x,y) \<and> pair(L,y,x,p) \<and> p \<in> r)))"
paulson@13223
   643
  and obase_equals_separation:
paulson@13223
   644
     "[| L(A); L(r) |] 
paulson@13223
   645
      ==> separation
paulson@13269
   646
      (L, \<lambda>x. x\<in>A --> ~(\<exists>y. L(y) & (\<exists>g. L(g) &
paulson@13269
   647
	      ordinal(L,y) & (\<exists>my pxr. L(my) & L(pxr) &
paulson@13269
   648
	      membership(L,y,my) & pred_set(L,A,x,r,pxr) &
paulson@13269
   649
	      order_isomorphism(L,pxr,r,y,my,g)))))"
paulson@13223
   650
  and is_recfun_separation:
paulson@13223
   651
     --{*for well-founded recursion.  NEEDS RELATIVIZATION*}
paulson@13223
   652
     "[| L(A); L(f); L(g); L(a); L(b) |] 
paulson@13269
   653
     ==> separation(L, \<lambda>x. x \<in> A --> \<langle>x,a\<rangle> \<in> r \<and> \<langle>x,b\<rangle> \<in> r \<and> f`x \<noteq> g`x)"
paulson@13223
   654
  and omap_replacement:
paulson@13223
   655
     "[| L(A); L(r) |] 
paulson@13269
   656
      ==> strong_replacement(L,
paulson@13223
   657
             \<lambda>a z. \<exists>x g mx par. L(x) & L(g) & L(mx) & L(par) &
paulson@13269
   658
	     ordinal(L,x) & pair(L,a,x,z) & membership(L,x,mx) & 
paulson@13269
   659
	     pred_set(L,A,a,r,par) & order_isomorphism(L,par,r,x,mx,g))"
paulson@13223
   660
paulson@13223
   661
*)