src/ZF/Constructible/DPow_absolute.thy
author paulson
Fri, 18 Oct 2002 17:50:13 +0200
changeset 13655 95b95cdb4704
parent 13634 99a593b49b04
child 13687 22dce9134953
permissions -rw-r--r--
Tidying up. New primitives is_iterates and is_iterates_fm.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13503
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
     1
(*  Title:      ZF/Constructible/DPow_absolute.thy
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
     2
    ID:         $Id$
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
     4
*)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
     5
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
     6
header {*Absoluteness for the Definable Powerset Function*}
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
     7
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
     8
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
     9
theory DPow_absolute = Satisfies_absolute:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    10
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    11
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    12
subsection{*Preliminary Internalizations*}
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    13
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    14
subsubsection{*The Operator @{term is_formula_rec}*}
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    15
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    16
text{*The three arguments of @{term p} are always 2, 1, 0.  It is buried
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    17
   within 11 quantifiers!!*}
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    18
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    19
(* is_formula_rec :: "[i=>o, [i,i,i]=>o, i, i] => o"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    20
   "is_formula_rec(M,MH,p,z)  ==
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    21
      \<exists>dp[M]. \<exists>i[M]. \<exists>f[M]. finite_ordinal(M,dp) & is_depth(M,p,dp) & 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    22
       2       1      0
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    23
             successor(M,dp,i) & fun_apply(M,f,p,z) & is_transrec(M,MH,i,f)"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    24
*)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    25
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    26
constdefs formula_rec_fm :: "[i, i, i]=>i"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    27
 "formula_rec_fm(mh,p,z) == 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    28
    Exists(Exists(Exists(
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    29
      And(finite_ordinal_fm(2),
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    30
       And(depth_fm(p#+3,2),
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    31
        And(succ_fm(2,1), 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    32
          And(fun_apply_fm(0,p#+3,z#+3), is_transrec_fm(mh,1,0))))))))"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    33
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    34
lemma is_formula_rec_type [TC]:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    35
     "[| p \<in> formula; x \<in> nat; z \<in> nat |] 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    36
      ==> formula_rec_fm(p,x,z) \<in> formula"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    37
by (simp add: formula_rec_fm_def) 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    38
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    39
lemma sats_formula_rec_fm:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    40
  assumes MH_iff_sats: 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    41
      "!!a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10. 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    42
        [|a0\<in>A; a1\<in>A; a2\<in>A; a3\<in>A; a4\<in>A; a5\<in>A; a6\<in>A; a7\<in>A; a8\<in>A; a9\<in>A; a10\<in>A|]
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    43
        ==> MH(a2, a1, a0) <-> 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    44
            sats(A, p, Cons(a0,Cons(a1,Cons(a2,Cons(a3,
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    45
                          Cons(a4,Cons(a5,Cons(a6,Cons(a7,
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    46
                                  Cons(a8,Cons(a9,Cons(a10,env))))))))))))"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    47
  shows 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    48
      "[|x \<in> nat; z \<in> nat; env \<in> list(A)|]
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    49
       ==> sats(A, formula_rec_fm(p,x,z), env) <-> 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    50
           is_formula_rec(**A, MH, nth(x,env), nth(z,env))"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    51
by (simp add: formula_rec_fm_def sats_is_transrec_fm is_formula_rec_def 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    52
              MH_iff_sats [THEN iff_sym])
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    53
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    54
lemma formula_rec_iff_sats:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    55
  assumes MH_iff_sats: 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    56
      "!!a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10. 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    57
        [|a0\<in>A; a1\<in>A; a2\<in>A; a3\<in>A; a4\<in>A; a5\<in>A; a6\<in>A; a7\<in>A; a8\<in>A; a9\<in>A; a10\<in>A|]
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    58
        ==> MH(a2, a1, a0) <-> 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    59
            sats(A, p, Cons(a0,Cons(a1,Cons(a2,Cons(a3,
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    60
                          Cons(a4,Cons(a5,Cons(a6,Cons(a7,
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    61
                                  Cons(a8,Cons(a9,Cons(a10,env))))))))))))"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    62
  shows
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    63
  "[|nth(i,env) = x; nth(k,env) = z; 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    64
      i \<in> nat; k \<in> nat; env \<in> list(A)|]
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    65
   ==> is_formula_rec(**A, MH, x, z) <-> sats(A, formula_rec_fm(p,i,k), env)" 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    66
by (simp add: sats_formula_rec_fm [OF MH_iff_sats])
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    67
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    68
theorem formula_rec_reflection:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    69
  assumes MH_reflection:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    70
    "!!f' f g h. REFLECTS[\<lambda>x. MH(L, f'(x), f(x), g(x), h(x)), 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    71
                     \<lambda>i x. MH(**Lset(i), f'(x), f(x), g(x), h(x))]"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    72
  shows "REFLECTS[\<lambda>x. is_formula_rec(L, MH(L,x), f(x), h(x)), 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    73
               \<lambda>i x. is_formula_rec(**Lset(i), MH(**Lset(i),x), f(x), h(x))]"
13655
95b95cdb4704 Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents: 13634
diff changeset
    74
apply (simp (no_asm_use) only: is_formula_rec_def)
13503
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    75
apply (intro FOL_reflections function_reflections fun_plus_reflections
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    76
             depth_reflection is_transrec_reflection MH_reflection)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    77
done
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    78
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    79
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    80
subsubsection{*The Operator @{term is_satisfies}*}
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    81
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    82
(* is_satisfies(M,A,p,z) == is_formula_rec (M, satisfies_MH(M,A), p, z) *)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    83
constdefs satisfies_fm :: "[i,i,i]=>i"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    84
    "satisfies_fm(x) == formula_rec_fm (satisfies_MH_fm(x#+5#+6, 2, 1, 0))"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    85
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    86
lemma is_satisfies_type [TC]:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    87
     "[| x \<in> nat; y \<in> nat; z \<in> nat |] ==> satisfies_fm(x,y,z) \<in> formula"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    88
by (simp add: satisfies_fm_def)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    89
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    90
lemma sats_satisfies_fm [simp]:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    91
   "[| x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|]
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    92
    ==> sats(A, satisfies_fm(x,y,z), env) <->
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    93
        is_satisfies(**A, nth(x,env), nth(y,env), nth(z,env))"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    94
by (simp add: satisfies_fm_def is_satisfies_def sats_satisfies_MH_fm
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    95
              sats_formula_rec_fm)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    96
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    97
lemma satisfies_iff_sats:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    98
      "[| nth(i,env) = x; nth(j,env) = y; nth(k,env) = z;
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
    99
          i \<in> nat; j \<in> nat; k \<in> nat; env \<in> list(A)|]
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   100
       ==> is_satisfies(**A, x, y, z) <-> sats(A, satisfies_fm(i,j,k), env)"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   101
by (simp add: sats_satisfies_fm)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   102
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   103
theorem satisfies_reflection:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   104
     "REFLECTS[\<lambda>x. is_satisfies(L,f(x),g(x),h(x)),
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   105
               \<lambda>i x. is_satisfies(**Lset(i),f(x),g(x),h(x))]"
13655
95b95cdb4704 Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents: 13634
diff changeset
   106
apply (simp only: is_satisfies_def)
13503
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   107
apply (intro formula_rec_reflection satisfies_MH_reflection)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   108
done
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   109
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   110
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   111
subsection {*Relativization of the Operator @{term DPow'}*}
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   112
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   113
lemma DPow'_eq: 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   114
  "DPow'(A) = Replace(list(A) * formula,
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   115
              %ep z. \<exists>env \<in> list(A). \<exists>p \<in> formula. 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   116
                     ep = <env,p> & z = {x\<in>A. sats(A, p, Cons(x,env))})"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   117
apply (simp add: DPow'_def, blast) 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   118
done
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   119
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   120
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   121
constdefs
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   122
  is_DPow_body :: "[i=>o,i,i,i,i] => o"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   123
   "is_DPow_body(M,A,env,p,x) ==
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   124
      \<forall>n1[M]. \<forall>e[M]. \<forall>sp[M]. 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   125
             is_satisfies(M,A,p,sp) --> is_Cons(M,x,env,e) --> 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   126
             fun_apply(M, sp, e, n1) --> number1(M, n1)"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   127
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   128
lemma (in M_satisfies) DPow_body_abs:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   129
    "[| M(A); env \<in> list(A); p \<in> formula; M(x) |]
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   130
    ==> is_DPow_body(M,A,env,p,x) <-> sats(A, p, Cons(x,env))"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   131
apply (subgoal_tac "M(env)") 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   132
 apply (simp add: is_DPow_body_def satisfies_closed satisfies_abs) 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   133
apply (blast dest: transM) 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   134
done
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   135
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   136
lemma (in M_satisfies) Collect_DPow_body_abs:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   137
    "[| M(A); env \<in> list(A); p \<in> formula |]
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   138
    ==> Collect(A, is_DPow_body(M,A,env,p)) = 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   139
        {x \<in> A. sats(A, p, Cons(x,env))}"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   140
by (simp add: DPow_body_abs transM [of _ A])
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   141
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   142
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   143
subsubsection{*The Operator @{term is_DPow_body}, Internalized*}
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   144
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   145
(* is_DPow_body(M,A,env,p,x) ==
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   146
      \<forall>n1[M]. \<forall>e[M]. \<forall>sp[M]. 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   147
             is_satisfies(M,A,p,sp) --> is_Cons(M,x,env,e) --> 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   148
             fun_apply(M, sp, e, n1) --> number1(M, n1) *)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   149
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   150
constdefs DPow_body_fm :: "[i,i,i,i]=>i"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   151
 "DPow_body_fm(A,env,p,x) ==
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   152
   Forall(Forall(Forall(
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   153
     Implies(satisfies_fm(A#+3,p#+3,0), 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   154
       Implies(Cons_fm(x#+3,env#+3,1), 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   155
         Implies(fun_apply_fm(0,1,2), number1_fm(2)))))))"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   156
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   157
lemma is_DPow_body_type [TC]:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   158
     "[| A \<in> nat; x \<in> nat; y \<in> nat; z \<in> nat |]
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   159
      ==> DPow_body_fm(A,x,y,z) \<in> formula"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   160
by (simp add: DPow_body_fm_def)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   161
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   162
lemma sats_DPow_body_fm [simp]:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   163
   "[| u \<in> nat; x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|]
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   164
    ==> sats(A, DPow_body_fm(u,x,y,z), env) <->
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   165
        is_DPow_body(**A, nth(u,env), nth(x,env), nth(y,env), nth(z,env))"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   166
by (simp add: DPow_body_fm_def is_DPow_body_def)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   167
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   168
lemma DPow_body_iff_sats:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   169
  "[| nth(u,env) = nu; nth(x,env) = nx; nth(y,env) = ny; nth(z,env) = nz;
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   170
      u \<in> nat; x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|]
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   171
   ==> is_DPow_body(**A,nu,nx,ny,nz) <->
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   172
       sats(A, DPow_body_fm(u,x,y,z), env)"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   173
by simp
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   174
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   175
theorem DPow_body_reflection:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   176
     "REFLECTS[\<lambda>x. is_DPow_body(L,f(x),g(x),h(x),g'(x)),
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   177
               \<lambda>i x. is_DPow_body(**Lset(i),f(x),g(x),h(x),g'(x))]"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   178
apply (unfold is_DPow_body_def) 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   179
apply (intro FOL_reflections function_reflections extra_reflections
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   180
             satisfies_reflection)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   181
done
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   182
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   183
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   184
subsection{*Additional Constraints on the Class Model @{term M}*}
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   185
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   186
locale M_DPow = M_satisfies +
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   187
 assumes sep:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   188
   "[| M(A); env \<in> list(A); p \<in> formula |]
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   189
    ==> separation(M, \<lambda>x. is_DPow_body(M,A,env,p,x))"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   190
 and rep: 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   191
    "M(A)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   192
    ==> strong_replacement (M, 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   193
         \<lambda>ep z. \<exists>env[M]. \<exists>p[M]. mem_formula(M,p) & mem_list(M,A,env) &
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   194
                  pair(M,env,p,ep) & 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   195
                  is_Collect(M, A, \<lambda>x. is_DPow_body(M,A,env,p,x), z))"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   196
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   197
lemma (in M_DPow) sep':
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   198
   "[| M(A); env \<in> list(A); p \<in> formula |]
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   199
    ==> separation(M, \<lambda>x. sats(A, p, Cons(x,env)))"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   200
by (insert sep [of A env p], simp add: DPow_body_abs)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   201
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   202
lemma (in M_DPow) rep':
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   203
   "M(A)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   204
    ==> strong_replacement (M, 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   205
         \<lambda>ep z. \<exists>env\<in>list(A). \<exists>p\<in>formula.
13504
59066e97b551 Tidying up
paulson
parents: 13503
diff changeset
   206
                  ep = <env,p> & z = {x \<in> A . sats(A, p, Cons(x, env))})" 
13503
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   207
by (insert rep [of A], simp add: Collect_DPow_body_abs) 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   208
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   209
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   210
lemma univalent_pair_eq:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   211
     "univalent (M, A, \<lambda>xy z. \<exists>x\<in>B. \<exists>y\<in>C. xy = \<langle>x,y\<rangle> \<and> z = f(x,y))"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   212
by (simp add: univalent_def, blast) 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   213
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   214
lemma (in M_DPow) DPow'_closed: "M(A) ==> M(DPow'(A))"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   215
apply (simp add: DPow'_eq)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   216
apply (fast intro: rep' sep' univalent_pair_eq)  
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   217
done
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   218
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   219
text{*Relativization of the Operator @{term DPow'}*}
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   220
constdefs 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   221
  is_DPow' :: "[i=>o,i,i] => o"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   222
    "is_DPow'(M,A,Z) == 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   223
       \<forall>X[M]. X \<in> Z <-> 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   224
         subset(M,X,A) & 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   225
           (\<exists>env[M]. \<exists>p[M]. mem_formula(M,p) & mem_list(M,A,env) &
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   226
                    is_Collect(M, A, is_DPow_body(M,A,env,p), X))"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   227
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   228
lemma (in M_DPow) DPow'_abs:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   229
    "[|M(A); M(Z)|] ==> is_DPow'(M,A,Z) <-> Z = DPow'(A)"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   230
apply (rule iffI)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   231
 prefer 2 apply (simp add: is_DPow'_def DPow'_def Collect_DPow_body_abs) 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   232
apply (rule M_equalityI) 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   233
apply (simp add: is_DPow'_def DPow'_def Collect_DPow_body_abs, assumption)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   234
apply (erule DPow'_closed)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   235
done
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   236
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   237
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   238
subsection{*Instantiating the Locale @{text M_DPow}*}
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   239
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   240
subsubsection{*The Instance of Separation*}
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   241
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   242
lemma DPow_separation:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   243
    "[| L(A); env \<in> list(A); p \<in> formula |]
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   244
     ==> separation(L, \<lambda>x. is_DPow_body(L,A,env,p,x))"
13566
52a419210d5c Streamlined proofs of instances of Separation
paulson
parents: 13505
diff changeset
   245
apply (rule gen_separation [OF DPow_body_reflection, of "{A,env,p}"], 
52a419210d5c Streamlined proofs of instances of Separation
paulson
parents: 13505
diff changeset
   246
       blast intro: transL)
52a419210d5c Streamlined proofs of instances of Separation
paulson
parents: 13505
diff changeset
   247
apply (drule mem_Lset_imp_subset_Lset, clarsimp)
13503
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   248
apply (rule DPow_LsetI)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   249
apply (rule_tac env = "[x,A,env,p]" in DPow_body_iff_sats)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   250
apply (rule sep_rules | simp)+
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   251
done
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   252
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   253
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   254
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   255
subsubsection{*The Instance of Replacement*}
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   256
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   257
lemma DPow_replacement_Reflects:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   258
 "REFLECTS [\<lambda>x. \<exists>u[L]. u \<in> B &
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   259
             (\<exists>env[L]. \<exists>p[L].
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   260
               mem_formula(L,p) & mem_list(L,A,env) & pair(L,env,p,u) &
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   261
               is_Collect (L, A, is_DPow_body(L,A,env,p), x)),
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   262
    \<lambda>i x. \<exists>u \<in> Lset(i). u \<in> B &
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   263
             (\<exists>env \<in> Lset(i). \<exists>p \<in> Lset(i).
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   264
               mem_formula(**Lset(i),p) & mem_list(**Lset(i),A,env) & 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   265
               pair(**Lset(i),env,p,u) &
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   266
               is_Collect (**Lset(i), A, is_DPow_body(**Lset(i),A,env,p), x))]"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   267
apply (unfold is_Collect_def) 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   268
apply (intro FOL_reflections function_reflections mem_formula_reflection
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   269
          mem_list_reflection DPow_body_reflection)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   270
done
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   271
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   272
lemma DPow_replacement:
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   273
    "L(A)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   274
    ==> strong_replacement (L, 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   275
         \<lambda>ep z. \<exists>env[L]. \<exists>p[L]. mem_formula(L,p) & mem_list(L,A,env) &
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   276
                  pair(L,env,p,ep) & 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   277
                  is_Collect(L, A, \<lambda>x. is_DPow_body(L,A,env,p,x), z))"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   278
apply (rule strong_replacementI)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   279
apply (rename_tac B)
13566
52a419210d5c Streamlined proofs of instances of Separation
paulson
parents: 13505
diff changeset
   280
apply (rule_tac u="{A,B}" in gen_separation [OF DPow_replacement_Reflects], 
52a419210d5c Streamlined proofs of instances of Separation
paulson
parents: 13505
diff changeset
   281
       simp)
52a419210d5c Streamlined proofs of instances of Separation
paulson
parents: 13505
diff changeset
   282
apply (drule mem_Lset_imp_subset_Lset, clarsimp)
52a419210d5c Streamlined proofs of instances of Separation
paulson
parents: 13505
diff changeset
   283
apply (unfold is_Collect_def) 
13503
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   284
apply (rule DPow_LsetI)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   285
apply (rule bex_iff_sats conj_iff_sats)+
13566
52a419210d5c Streamlined proofs of instances of Separation
paulson
parents: 13505
diff changeset
   286
apply (rule_tac env = "[u,x,A,B]" in mem_iff_sats)
13503
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   287
apply (rule sep_rules mem_formula_iff_sats mem_list_iff_sats 
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   288
            DPow_body_iff_sats | simp)+
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   289
done
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   290
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   291
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   292
subsubsection{*Actually Instantiating the Locale*}
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   293
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   294
lemma M_DPow_axioms_L: "M_DPow_axioms(L)"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   295
  apply (rule M_DPow_axioms.intro)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   296
   apply (assumption | rule DPow_separation DPow_replacement)+
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   297
  done
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   298
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   299
theorem M_DPow_L: "PROP M_DPow(L)"
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   300
  apply (rule M_DPow.intro)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   301
       apply (rule M_satisfies.axioms [OF M_satisfies_L])+
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   302
  apply (rule M_DPow_axioms_L)
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   303
  done
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   304
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   305
lemmas DPow'_closed [intro, simp] = M_DPow.DPow'_closed [OF M_DPow_L]
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   306
  and DPow'_abs [intro, simp] = M_DPow.DPow'_abs [OF M_DPow_L]
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   307
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   308
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   309
subsubsection{*The Operator @{term is_Collect}*}
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   310
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   311
text{*The formula @{term is_P} has one free variable, 0, and it is
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   312
enclosed within a single quantifier.*}
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   313
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   314
(* is_Collect :: "[i=>o,i,i=>o,i] => o"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   315
    "is_Collect(M,A,P,z) == \<forall>x[M]. x \<in> z <-> x \<in> A & P(x)" *)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   316
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   317
constdefs Collect_fm :: "[i, i, i]=>i"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   318
 "Collect_fm(A,is_P,z) == 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   319
        Forall(Iff(Member(0,succ(z)),
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   320
                   And(Member(0,succ(A)), is_P)))"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   321
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   322
lemma is_Collect_type [TC]:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   323
     "[| is_P \<in> formula; x \<in> nat; y \<in> nat |] 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   324
      ==> Collect_fm(x,is_P,y) \<in> formula"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   325
by (simp add: Collect_fm_def)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   326
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   327
lemma sats_Collect_fm:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   328
  assumes is_P_iff_sats: 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   329
      "!!a. a \<in> A ==> is_P(a) <-> sats(A, p, Cons(a, env))"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   330
  shows 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   331
      "[|x \<in> nat; y \<in> nat; env \<in> list(A)|]
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   332
       ==> sats(A, Collect_fm(x,p,y), env) <->
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   333
           is_Collect(**A, nth(x,env), is_P, nth(y,env))"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   334
by (simp add: Collect_fm_def is_Collect_def is_P_iff_sats [THEN iff_sym])
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   335
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   336
lemma Collect_iff_sats:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   337
  assumes is_P_iff_sats: 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   338
      "!!a. a \<in> A ==> is_P(a) <-> sats(A, p, Cons(a, env))"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   339
  shows 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   340
  "[| nth(i,env) = x; nth(j,env) = y;
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   341
      i \<in> nat; j \<in> nat; env \<in> list(A)|]
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   342
   ==> is_Collect(**A, x, is_P, y) <-> sats(A, Collect_fm(i,p,j), env)"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   343
by (simp add: sats_Collect_fm [OF is_P_iff_sats])
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   344
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   345
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   346
text{*The second argument of @{term is_P} gives it direct access to @{term x},
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   347
  which is essential for handling free variable references.*}
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   348
theorem Collect_reflection:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   349
  assumes is_P_reflection:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   350
    "!!h f g. REFLECTS[\<lambda>x. is_P(L, f(x), g(x)),
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   351
                     \<lambda>i x. is_P(**Lset(i), f(x), g(x))]"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   352
  shows "REFLECTS[\<lambda>x. is_Collect(L, f(x), is_P(L,x), g(x)),
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   353
               \<lambda>i x. is_Collect(**Lset(i), f(x), is_P(**Lset(i), x), g(x))]"
13655
95b95cdb4704 Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents: 13634
diff changeset
   354
apply (simp (no_asm_use) only: is_Collect_def)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   355
apply (intro FOL_reflections is_P_reflection)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   356
done
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   357
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   358
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   359
subsubsection{*The Operator @{term is_Replace}*}
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   360
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   361
text{*BEWARE!  The formula @{term is_P} has free variables 0, 1
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   362
 and not the usual 1, 0!  It is enclosed within two quantifiers.*}
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   363
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   364
(*  is_Replace :: "[i=>o,i,[i,i]=>o,i] => o"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   365
    "is_Replace(M,A,P,z) == \<forall>u[M]. u \<in> z <-> (\<exists>x[M]. x\<in>A & P(x,u))" *)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   366
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   367
constdefs Replace_fm :: "[i, i, i]=>i"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   368
 "Replace_fm(A,is_P,z) == 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   369
        Forall(Iff(Member(0,succ(z)),
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   370
                   Exists(And(Member(0,A#+2), is_P))))"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   371
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   372
lemma is_Replace_type [TC]:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   373
     "[| is_P \<in> formula; x \<in> nat; y \<in> nat |] 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   374
      ==> Replace_fm(x,is_P,y) \<in> formula"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   375
by (simp add: Replace_fm_def)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   376
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   377
lemma sats_Replace_fm:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   378
  assumes is_P_iff_sats: 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   379
      "!!a b. [|a \<in> A; b \<in> A|] 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   380
              ==> is_P(a,b) <-> sats(A, p, Cons(a,Cons(b,env)))"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   381
  shows 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   382
      "[|x \<in> nat; y \<in> nat; env \<in> list(A)|]
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   383
       ==> sats(A, Replace_fm(x,p,y), env) <->
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   384
           is_Replace(**A, nth(x,env), is_P, nth(y,env))"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   385
by (simp add: Replace_fm_def is_Replace_def is_P_iff_sats [THEN iff_sym])
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   386
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   387
lemma Replace_iff_sats:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   388
  assumes is_P_iff_sats: 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   389
      "!!a b. [|a \<in> A; b \<in> A|] 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   390
              ==> is_P(a,b) <-> sats(A, p, Cons(a,Cons(b,env)))"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   391
  shows 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   392
  "[| nth(i,env) = x; nth(j,env) = y;
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   393
      i \<in> nat; j \<in> nat; env \<in> list(A)|]
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   394
   ==> is_Replace(**A, x, is_P, y) <-> sats(A, Replace_fm(i,p,j), env)"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   395
by (simp add: sats_Replace_fm [OF is_P_iff_sats])
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   396
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   397
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   398
text{*The second argument of @{term is_P} gives it direct access to @{term x},
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   399
  which is essential for handling free variable references.*}
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   400
theorem Replace_reflection:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   401
  assumes is_P_reflection:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   402
    "!!h f g. REFLECTS[\<lambda>x. is_P(L, f(x), g(x), h(x)),
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   403
                     \<lambda>i x. is_P(**Lset(i), f(x), g(x), h(x))]"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   404
  shows "REFLECTS[\<lambda>x. is_Replace(L, f(x), is_P(L,x), g(x)),
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   405
               \<lambda>i x. is_Replace(**Lset(i), f(x), is_P(**Lset(i), x), g(x))]"
13655
95b95cdb4704 Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents: 13634
diff changeset
   406
apply (simp (no_asm_use) only: is_Replace_def)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   407
apply (intro FOL_reflections is_P_reflection)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   408
done
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   409
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   410
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   411
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   412
subsubsection{*The Operator @{term is_DPow'}, Internalized*}
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   413
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   414
(*  "is_DPow'(M,A,Z) == 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   415
       \<forall>X[M]. X \<in> Z <-> 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   416
         subset(M,X,A) & 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   417
           (\<exists>env[M]. \<exists>p[M]. mem_formula(M,p) & mem_list(M,A,env) &
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   418
                    is_Collect(M, A, is_DPow_body(M,A,env,p), X))" *)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   419
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   420
constdefs DPow'_fm :: "[i,i]=>i"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   421
    "DPow'_fm(A,Z) == 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   422
      Forall(
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   423
       Iff(Member(0,succ(Z)),
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   424
        And(subset_fm(0,succ(A)),
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   425
         Exists(Exists(
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   426
          And(mem_formula_fm(0),
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   427
           And(mem_list_fm(A#+3,1),
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   428
            Collect_fm(A#+3, 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   429
                       DPow_body_fm(A#+4, 2, 1, 0), 2))))))))"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   430
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   431
lemma is_DPow'_type [TC]:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   432
     "[| x \<in> nat; y \<in> nat |] ==> DPow'_fm(x,y) \<in> formula"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   433
by (simp add: DPow'_fm_def)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   434
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   435
lemma sats_DPow'_fm [simp]:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   436
   "[| x \<in> nat; y \<in> nat; env \<in> list(A)|]
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   437
    ==> sats(A, DPow'_fm(x,y), env) <->
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   438
        is_DPow'(**A, nth(x,env), nth(y,env))"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   439
by (simp add: DPow'_fm_def is_DPow'_def sats_subset_fm' sats_Collect_fm)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   440
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   441
lemma DPow'_iff_sats:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   442
      "[| nth(i,env) = x; nth(j,env) = y; 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   443
          i \<in> nat; j \<in> nat; env \<in> list(A)|]
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   444
       ==> is_DPow'(**A, x, y) <-> sats(A, DPow'_fm(i,j), env)"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   445
by (simp add: sats_DPow'_fm)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   446
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   447
theorem DPow'_reflection:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   448
     "REFLECTS[\<lambda>x. is_DPow'(L,f(x),g(x)),
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   449
               \<lambda>i x. is_DPow'(**Lset(i),f(x),g(x))]"
13655
95b95cdb4704 Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents: 13634
diff changeset
   450
apply (simp only: is_DPow'_def)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   451
apply (intro FOL_reflections function_reflections mem_formula_reflection
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   452
             mem_list_reflection Collect_reflection DPow_body_reflection)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   453
done
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   454
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   455
(*????????????????move up*)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   456
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   457
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   458
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   459
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   460
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   461
subsection{*Additional Constraints on the Class Model @{term M}*}
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   462
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   463
constdefs
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   464
  transrec_body :: "[i=>o,i,i,i,i] => o"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   465
    "transrec_body(M,g,x) ==
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   466
      \<lambda>y z. \<exists>gy[M]. y \<in> x & fun_apply(M,g,y,gy) & is_DPow'(M,gy,z)"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   467
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   468
lemma (in M_DPow) transrec_body_abs:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   469
     "[|M(x); M(g); M(z)|]
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   470
    ==> transrec_body(M,g,x,y,z) <-> y \<in> x & z = DPow'(g`y)"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   471
by (simp add: transrec_body_def DPow'_abs transM [of _ x])
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   472
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   473
locale M_Lset = M_DPow +
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   474
 assumes strong_rep:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   475
   "[|M(x); M(g)|] ==> strong_replacement(M, \<lambda>y z. transrec_body(M,g,x,y,z))"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   476
 and transrec_rep: 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   477
    "M(i) ==> transrec_replacement(M, \<lambda>x f u. 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   478
              \<exists>r[M]. is_Replace(M, x, transrec_body(M,f,x), r) & 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   479
                     big_union(M, r, u), i)"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   480
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   481
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   482
lemma (in M_Lset) strong_rep':
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   483
   "[|M(x); M(g)|]
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   484
    ==> strong_replacement(M, \<lambda>y z. y \<in> x & z = DPow'(g`y))"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   485
by (insert strong_rep [of x g], simp add: transrec_body_abs)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   486
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   487
lemma (in M_Lset) DPow_apply_closed:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   488
   "[|M(f); M(x); y\<in>x|] ==> M(DPow'(f`y))"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   489
by (blast intro: DPow'_closed dest: transM) 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   490
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   491
lemma (in M_Lset) RepFun_DPow_apply_closed:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   492
   "[|M(f); M(x)|] ==> M({DPow'(f`y). y\<in>x})"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   493
by (blast intro: DPow_apply_closed RepFun_closed2 strong_rep') 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   494
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   495
lemma (in M_Lset) RepFun_DPow_abs:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   496
     "[|M(x); M(f); M(r) |]
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   497
      ==> is_Replace(M, x, \<lambda>y z. transrec_body(M,f,x,y,z), r) <->
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   498
          r =  {DPow'(f`y). y\<in>x}"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   499
apply (simp add: transrec_body_abs RepFun_def) 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   500
apply (rule iff_trans) 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   501
apply (rule Replace_abs) 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   502
apply (simp_all add: DPow_apply_closed strong_rep') 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   503
done
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   504
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   505
lemma (in M_Lset) transrec_rep':
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   506
   "M(i) ==> transrec_replacement(M, \<lambda>x f u. u = (\<Union>y\<in>x. DPow'(f ` y)), i)"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   507
apply (insert transrec_rep [of i]) 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   508
apply (simp add: RepFun_DPow_apply_closed RepFun_DPow_abs 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   509
       transrec_replacement_def) 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   510
done
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   511
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   512
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   513
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   514
constdefs
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   515
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   516
  is_Lset :: "[i=>o, i, i] => o"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   517
   "is_Lset(M,a,z) == is_transrec(M, %x f u. u = (\<Union>y\<in>x. DPow'(f`y)), a, z)"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   518
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   519
lemma (in M_Lset) Lset_abs:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   520
  "[|Ord(i);  M(i);  M(z)|] 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   521
   ==> is_Lset(M,i,z) <-> z = Lset(i)"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   522
apply (simp add: is_Lset_def Lset_eq_transrec_DPow') 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   523
apply (rule transrec_abs)  
13634
99a593b49b04 Re-organization of Constructible theories
paulson
parents: 13566
diff changeset
   524
apply (simp_all add: transrec_rep' relation2_def RepFun_DPow_apply_closed)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   525
done
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   526
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   527
lemma (in M_Lset) Lset_closed:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   528
  "[|Ord(i);  M(i)|] ==> M(Lset(i))"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   529
apply (simp add: Lset_eq_transrec_DPow') 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   530
apply (rule transrec_closed [OF transrec_rep']) 
13634
99a593b49b04 Re-organization of Constructible theories
paulson
parents: 13566
diff changeset
   531
apply (simp_all add: relation2_def RepFun_DPow_apply_closed)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   532
done
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   533
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   534
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   535
subsection{*Instantiating the Locale @{text M_Lset}*}
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   536
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   537
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   538
subsubsection{*The First Instance of Replacement*}
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   539
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   540
lemma strong_rep_Reflects:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   541
 "REFLECTS [\<lambda>u. \<exists>v[L]. v \<in> B & (\<exists>gy[L].
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   542
                          v \<in> x & fun_apply(L,g,v,gy) & is_DPow'(L,gy,u)),
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   543
   \<lambda>i u. \<exists>v \<in> Lset(i). v \<in> B & (\<exists>gy \<in> Lset(i).
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   544
            v \<in> x & fun_apply(**Lset(i),g,v,gy) & is_DPow'(**Lset(i),gy,u))]"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   545
by (intro FOL_reflections function_reflections DPow'_reflection)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   546
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   547
lemma strong_rep:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   548
   "[|L(x); L(g)|] ==> strong_replacement(L, \<lambda>y z. transrec_body(L,g,x,y,z))"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   549
apply (unfold transrec_body_def)  
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   550
apply (rule strong_replacementI) 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   551
apply (rename_tac B)  
13566
52a419210d5c Streamlined proofs of instances of Separation
paulson
parents: 13505
diff changeset
   552
apply (rule_tac u="{x,g,B}" in gen_separation [OF strong_rep_Reflects], simp)
52a419210d5c Streamlined proofs of instances of Separation
paulson
parents: 13505
diff changeset
   553
apply (drule mem_Lset_imp_subset_Lset, clarsimp)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   554
apply (rule DPow_LsetI)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   555
apply (rule bex_iff_sats conj_iff_sats conj_iff_sats)+
13566
52a419210d5c Streamlined proofs of instances of Separation
paulson
parents: 13505
diff changeset
   556
apply (rule_tac env = "[v,u,x,g,B]" in mem_iff_sats) 
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   557
apply (rule sep_rules DPow'_iff_sats | simp)+
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   558
done
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   559
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   560
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   561
subsubsection{*The Second Instance of Replacement*}
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   562
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   563
lemma transrec_rep_Reflects:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   564
 "REFLECTS [\<lambda>x. \<exists>v[L]. v \<in> B &
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   565
              (\<exists>y[L]. pair(L,v,y,x) &
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   566
             is_wfrec (L, \<lambda>x f u. \<exists>r[L].
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   567
                is_Replace (L, x, \<lambda>y z. 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   568
                     \<exists>gy[L]. y \<in> x & fun_apply(L,f,y,gy) & 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   569
                      is_DPow'(L,gy,z), r) & big_union(L,r,u), mr, v, y)),
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   570
    \<lambda>i x. \<exists>v \<in> Lset(i). v \<in> B &
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   571
              (\<exists>y \<in> Lset(i). pair(**Lset(i),v,y,x) &
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   572
             is_wfrec (**Lset(i), \<lambda>x f u. \<exists>r \<in> Lset(i).
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   573
                is_Replace (**Lset(i), x, \<lambda>y z. 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   574
                     \<exists>gy \<in> Lset(i). y \<in> x & fun_apply(**Lset(i),f,y,gy) & 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   575
                      is_DPow'(**Lset(i),gy,z), r) & 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   576
                      big_union(**Lset(i),r,u), mr, v, y))]" 
13655
95b95cdb4704 Tidying up. New primitives is_iterates and is_iterates_fm.
paulson
parents: 13634
diff changeset
   577
apply (simp only: rex_setclass_is_bex [symmetric])
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   578
  --{*Convert @{text "\<exists>y\<in>Lset(i)"} to @{text "\<exists>y[**Lset(i)]"} within the body
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   579
       of the @{term is_wfrec} application. *}
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   580
apply (intro FOL_reflections function_reflections 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   581
          is_wfrec_reflection Replace_reflection DPow'_reflection) 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   582
done
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   583
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   584
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   585
lemma transrec_rep: 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   586
    "[|L(j)|]
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   587
    ==> transrec_replacement(L, \<lambda>x f u. 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   588
              \<exists>r[L]. is_Replace(L, x, transrec_body(L,f,x), r) & 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   589
                     big_union(L, r, u), j)"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   590
apply (rule transrec_replacementI, assumption)
13566
52a419210d5c Streamlined proofs of instances of Separation
paulson
parents: 13505
diff changeset
   591
apply (unfold transrec_body_def)  
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   592
apply (rule strong_replacementI)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   593
apply (rename_tac B)
13566
52a419210d5c Streamlined proofs of instances of Separation
paulson
parents: 13505
diff changeset
   594
apply (rule_tac u="{j,B,Memrel(eclose({j}))}" 
52a419210d5c Streamlined proofs of instances of Separation
paulson
parents: 13505
diff changeset
   595
         in gen_separation [OF transrec_rep_Reflects], simp)
52a419210d5c Streamlined proofs of instances of Separation
paulson
parents: 13505
diff changeset
   596
apply (drule mem_Lset_imp_subset_Lset, clarsimp)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   597
apply (rule DPow_LsetI)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   598
apply (rule bex_iff_sats conj_iff_sats)+
13566
52a419210d5c Streamlined proofs of instances of Separation
paulson
parents: 13505
diff changeset
   599
apply (rule_tac env = "[v,x,j,B,Memrel(eclose({j}))]" in mem_iff_sats)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   600
apply (rule sep_rules is_wfrec_iff_sats Replace_iff_sats DPow'_iff_sats | 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   601
       simp)+
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   602
done
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   603
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   604
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   605
subsubsection{*Actually Instantiating @{text M_Lset}*}
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   606
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   607
lemma M_Lset_axioms_L: "M_Lset_axioms(L)"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   608
  apply (rule M_Lset_axioms.intro)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   609
       apply (assumption | rule strong_rep transrec_rep)+
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   610
  done
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   611
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   612
theorem M_Lset_L: "PROP M_Lset(L)"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   613
apply (rule M_Lset.intro) 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   614
     apply (rule M_DPow.axioms [OF M_DPow_L])+
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   615
apply (rule M_Lset_axioms_L) 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   616
done
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   617
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   618
text{*Finally: the point of the whole theory!*}
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   619
lemmas Lset_closed = M_Lset.Lset_closed [OF M_Lset_L]
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   620
   and Lset_abs = M_Lset.Lset_abs [OF M_Lset_L]
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   621
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   622
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   623
subsection{*The Notion of Constructible Set*}
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   624
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   625
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   626
constdefs
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   627
  constructible :: "[i=>o,i] => o"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   628
    "constructible(M,x) ==
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   629
       \<exists>i[M]. \<exists>Li[M]. ordinal(M,i) & is_Lset(M,i,Li) & x \<in> Li"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   630
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   631
theorem V_equals_L_in_L:
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   632
  "L(x) ==> constructible(L,x)"
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   633
apply (simp add: constructible_def Lset_abs Lset_closed) 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   634
apply (simp add: L_def)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   635
apply (blast intro: Ord_in_L) 
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   636
done
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13504
diff changeset
   637
13503
d93f41fe35d2 Relativization and absoluteness for DPow!!
paulson
parents:
diff changeset
   638
end