src/ZF/Constructible/Satisfies_absolute.thy
author paulson
Wed, 14 Aug 2002 14:33:26 +0200
changeset 13502 da43ebc02f17
parent 13496 6f0c57def6d5
child 13503 d93f41fe35d2
permissions -rw-r--r--
Finished absoluteness of "satisfies"!!
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
     1
(*  Title:      ZF/Constructible/Satisfies_absolute.thy
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
     2
    ID:         $Id$
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
     4
    Copyright   2002  University of Cambridge
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
     5
*)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
     6
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
     7
header {*Absoluteness for the Satisfies Relation on Formulas*}
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
     8
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
     9
theory Satisfies_absolute = Datatype_absolute + Rec_Separation: 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
    10
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
    11
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    12
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    13
subsubsection{*The Formula @{term is_list_N}, Internalized*}
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
    14
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    15
(* "is_list_N(M,A,n,Z) == 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    16
      \<exists>zero[M]. \<exists>sn[M]. \<exists>msn[M]. 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    17
       empty(M,zero) & 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    18
       successor(M,n,sn) & membership(M,sn,msn) &
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    19
       is_wfrec(M, iterates_MH(M, is_list_functor(M,A),zero), msn, n, Z)" *)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    20
  
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    21
constdefs list_N_fm :: "[i,i,i]=>i"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    22
  "list_N_fm(A,n,Z) == 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    23
     Exists(Exists(Exists(
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    24
       And(empty_fm(2),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    25
         And(succ_fm(n#+3,1),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    26
          And(Memrel_fm(1,0),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    27
              is_wfrec_fm(iterates_MH_fm(list_functor_fm(A#+9#+3,1,0),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    28
                                         7,2,1,0), 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    29
                           0, n#+3, Z#+3)))))))"
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
    30
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    31
lemma list_N_fm_type [TC]:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    32
 "[| x \<in> nat; y \<in> nat; z \<in> nat |] ==> list_N_fm(x,y,z) \<in> formula"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    33
by (simp add: list_N_fm_def)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    34
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    35
lemma sats_list_N_fm [simp]:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    36
   "[| x \<in> nat; y < length(env); z < length(env); env \<in> list(A)|]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    37
    ==> sats(A, list_N_fm(x,y,z), env) <->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    38
        is_list_N(**A, nth(x,env), nth(y,env), nth(z,env))"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    39
apply (frule_tac x=z in lt_length_in_nat, assumption)  
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    40
apply (frule_tac x=y in lt_length_in_nat, assumption)  
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    41
apply (simp add: list_N_fm_def is_list_N_def sats_is_wfrec_fm 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    42
                 sats_iterates_MH_fm) 
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
    43
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
    44
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    45
lemma list_N_iff_sats:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    46
      "[| nth(i,env) = x; nth(j,env) = y; nth(k,env) = z;
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    47
          i \<in> nat; j < length(env); k < length(env); env \<in> list(A)|]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    48
       ==> is_list_N(**A, x, y, z) <-> sats(A, list_N_fm(i,j,k), env)"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    49
by (simp add: sats_list_N_fm)
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
    50
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    51
theorem list_N_reflection:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    52
     "REFLECTS[\<lambda>x. is_list_N(L, f(x), g(x), h(x)),  
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    53
               \<lambda>i x. is_list_N(**Lset(i), f(x), g(x), h(x))]"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    54
apply (simp only: is_list_N_def setclass_simps)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    55
apply (intro FOL_reflections function_reflections is_wfrec_reflection 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    56
             iterates_MH_reflection list_functor_reflection) 
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
    57
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
    58
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
    59
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    60
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    61
subsubsection{*The Predicate ``Is A List''*}
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
    62
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    63
(* mem_list(M,A,l) == 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    64
      \<exists>n[M]. \<exists>listn[M]. 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    65
       finite_ordinal(M,n) & is_list_N(M,A,n,listn) & l \<in> listn *)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    66
constdefs mem_list_fm :: "[i,i]=>i"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    67
    "mem_list_fm(x,y) ==
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    68
       Exists(Exists(
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    69
         And(finite_ordinal_fm(1),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    70
           And(list_N_fm(x#+2,1,0), Member(y#+2,0)))))"
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
    71
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    72
lemma mem_list_type [TC]:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    73
     "[| x \<in> nat; y \<in> nat |] ==> mem_list_fm(x,y) \<in> formula"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    74
by (simp add: mem_list_fm_def)
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
    75
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    76
lemma sats_mem_list_fm [simp]:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    77
   "[| x \<in> nat; y \<in> nat; env \<in> list(A)|]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    78
    ==> sats(A, mem_list_fm(x,y), env) <-> mem_list(**A, nth(x,env), nth(y,env))"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    79
by (simp add: mem_list_fm_def mem_list_def)
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
    80
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    81
lemma mem_list_iff_sats:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    82
      "[| nth(i,env) = x; nth(j,env) = y;
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    83
          i \<in> nat; j \<in> nat; env \<in> list(A)|]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    84
       ==> mem_list(**A, x, y) <-> sats(A, mem_list_fm(i,j), env)"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    85
by simp
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
    86
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    87
theorem mem_list_reflection:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    88
     "REFLECTS[\<lambda>x. mem_list(L,f(x),g(x)),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    89
               \<lambda>i x. mem_list(**Lset(i),f(x),g(x))]"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    90
apply (simp only: mem_list_def setclass_simps)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    91
apply (intro FOL_reflections finite_ordinal_reflection list_N_reflection)
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
    92
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
    93
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
    94
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    95
subsubsection{*The Predicate ``Is @{term "list(A)"}''*}
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
    96
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    97
(* is_list(M,A,Z) == \<forall>l[M]. l \<in> Z <-> mem_list(M,A,l) *)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    98
constdefs is_list_fm :: "[i,i]=>i"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
    99
    "is_list_fm(A,Z) ==
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   100
       Forall(Iff(Member(0,succ(Z)), mem_list_fm(succ(A),0)))"
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   101
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   102
lemma is_list_type [TC]:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   103
     "[| x \<in> nat; y \<in> nat |] ==> is_list_fm(x,y) \<in> formula"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   104
by (simp add: is_list_fm_def)
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   105
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   106
lemma sats_is_list_fm [simp]:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   107
   "[| x \<in> nat; y \<in> nat; env \<in> list(A)|]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   108
    ==> sats(A, is_list_fm(x,y), env) <-> is_list(**A, nth(x,env), nth(y,env))"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   109
by (simp add: is_list_fm_def is_list_def)
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   110
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   111
lemma is_list_iff_sats:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   112
      "[| nth(i,env) = x; nth(j,env) = y;
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   113
          i \<in> nat; j \<in> nat; env \<in> list(A)|]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   114
       ==> is_list(**A, x, y) <-> sats(A, is_list_fm(i,j), env)"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   115
by simp
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   116
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   117
theorem is_list_reflection:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   118
     "REFLECTS[\<lambda>x. is_list(L,f(x),g(x)),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   119
               \<lambda>i x. is_list(**Lset(i),f(x),g(x))]"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   120
apply (simp only: is_list_def setclass_simps)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   121
apply (intro FOL_reflections mem_list_reflection)
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   122
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   123
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   124
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   125
subsubsection{*The Formula @{term is_formula_N}, Internalized*}
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   126
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   127
(* "is_formula_N(M,n,Z) == 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   128
      \<exists>zero[M]. \<exists>sn[M]. \<exists>msn[M]. 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   129
          2       1       0
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   130
       empty(M,zero) & 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   131
       successor(M,n,sn) & membership(M,sn,msn) &
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   132
       is_wfrec(M, iterates_MH(M, is_formula_functor(M),zero), msn, n, Z)" *) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   133
constdefs formula_N_fm :: "[i,i]=>i"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   134
  "formula_N_fm(n,Z) == 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   135
     Exists(Exists(Exists(
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   136
       And(empty_fm(2),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   137
         And(succ_fm(n#+3,1),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   138
          And(Memrel_fm(1,0),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   139
              is_wfrec_fm(iterates_MH_fm(formula_functor_fm(1,0),7,2,1,0), 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   140
                           0, n#+3, Z#+3)))))))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   141
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   142
lemma formula_N_fm_type [TC]:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   143
 "[| x \<in> nat; y \<in> nat |] ==> formula_N_fm(x,y) \<in> formula"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   144
by (simp add: formula_N_fm_def)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   145
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   146
lemma sats_formula_N_fm [simp]:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   147
   "[| x < length(env); y < length(env); env \<in> list(A)|]
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   148
    ==> sats(A, formula_N_fm(x,y), env) <->
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   149
        is_formula_N(**A, nth(x,env), nth(y,env))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   150
apply (frule_tac x=y in lt_length_in_nat, assumption)  
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   151
apply (frule lt_length_in_nat, assumption)  
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   152
apply (simp add: formula_N_fm_def is_formula_N_def sats_is_wfrec_fm sats_iterates_MH_fm) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   153
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   154
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   155
lemma formula_N_iff_sats:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   156
      "[| nth(i,env) = x; nth(j,env) = y; 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   157
          i < length(env); j < length(env); env \<in> list(A)|]
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   158
       ==> is_formula_N(**A, x, y) <-> sats(A, formula_N_fm(i,j), env)"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   159
by (simp add: sats_formula_N_fm)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   160
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   161
theorem formula_N_reflection:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   162
     "REFLECTS[\<lambda>x. is_formula_N(L, f(x), g(x)),  
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   163
               \<lambda>i x. is_formula_N(**Lset(i), f(x), g(x))]"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   164
apply (simp only: is_formula_N_def setclass_simps)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   165
apply (intro FOL_reflections function_reflections is_wfrec_reflection 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   166
             iterates_MH_reflection formula_functor_reflection) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   167
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   168
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   169
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   170
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   171
subsubsection{*The Predicate ``Is A Formula''*}
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   172
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   173
(*  mem_formula(M,p) == 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   174
      \<exists>n[M]. \<exists>formn[M]. 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   175
       finite_ordinal(M,n) & is_formula_N(M,n,formn) & p \<in> formn *)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   176
constdefs mem_formula_fm :: "i=>i"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   177
    "mem_formula_fm(x) ==
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   178
       Exists(Exists(
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   179
         And(finite_ordinal_fm(1),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   180
           And(formula_N_fm(1,0), Member(x#+2,0)))))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   181
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   182
lemma mem_formula_type [TC]:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   183
     "x \<in> nat ==> mem_formula_fm(x) \<in> formula"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   184
by (simp add: mem_formula_fm_def)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   185
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   186
lemma sats_mem_formula_fm [simp]:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   187
   "[| x \<in> nat; env \<in> list(A)|]
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   188
    ==> sats(A, mem_formula_fm(x), env) <-> mem_formula(**A, nth(x,env))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   189
by (simp add: mem_formula_fm_def mem_formula_def)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   190
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   191
lemma mem_formula_iff_sats:
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   192
      "[| nth(i,env) = x; i \<in> nat; env \<in> list(A)|]
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   193
       ==> mem_formula(**A, x) <-> sats(A, mem_formula_fm(i), env)"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   194
by simp
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   195
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   196
theorem mem_formula_reflection:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   197
     "REFLECTS[\<lambda>x. mem_formula(L,f(x)),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   198
               \<lambda>i x. mem_formula(**Lset(i),f(x))]"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   199
apply (simp only: mem_formula_def setclass_simps)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   200
apply (intro FOL_reflections finite_ordinal_reflection formula_N_reflection)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   201
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   202
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   203
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   204
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   205
subsubsection{*The Predicate ``Is @{term "formula"}''*}
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   206
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   207
(* is_formula(M,Z) == \<forall>p[M]. p \<in> Z <-> mem_formula(M,p) *)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   208
constdefs is_formula_fm :: "i=>i"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   209
    "is_formula_fm(Z) == Forall(Iff(Member(0,succ(Z)), mem_formula_fm(0)))"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   210
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   211
lemma is_formula_type [TC]:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   212
     "x \<in> nat ==> is_formula_fm(x) \<in> formula"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   213
by (simp add: is_formula_fm_def)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   214
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   215
lemma sats_is_formula_fm [simp]:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   216
   "[| x \<in> nat; env \<in> list(A)|]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   217
    ==> sats(A, is_formula_fm(x), env) <-> is_formula(**A, nth(x,env))"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   218
by (simp add: is_formula_fm_def is_formula_def)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   219
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   220
lemma is_formula_iff_sats:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   221
      "[| nth(i,env) = x; i \<in> nat; env \<in> list(A)|]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   222
       ==> is_formula(**A, x) <-> sats(A, is_formula_fm(i), env)"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   223
by simp
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   224
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   225
theorem is_formula_reflection:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   226
     "REFLECTS[\<lambda>x. is_formula(L,f(x)),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   227
               \<lambda>i x. is_formula(**Lset(i),f(x))]"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   228
apply (simp only: is_formula_def setclass_simps)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   229
apply (intro FOL_reflections mem_formula_reflection)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   230
done
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   231
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   232
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   233
subsubsection{*The Formula @{term is_depth}, Internalized*}
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   234
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   235
(*    "is_depth(M,p,n) == 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   236
       \<exists>sn[M]. \<exists>formula_n[M]. \<exists>formula_sn[M]. 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   237
         2          1                0
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   238
        is_formula_N(M,n,formula_n) & p \<notin> formula_n &
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   239
        successor(M,n,sn) & is_formula_N(M,sn,formula_sn) & p \<in> formula_sn" *)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   240
constdefs depth_fm :: "[i,i]=>i"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   241
  "depth_fm(p,n) == 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   242
     Exists(Exists(Exists(
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   243
       And(formula_N_fm(n#+3,1),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   244
         And(Neg(Member(p#+3,1)),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   245
          And(succ_fm(n#+3,2),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   246
           And(formula_N_fm(2,0), Member(p#+3,0))))))))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   247
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   248
lemma depth_fm_type [TC]:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   249
 "[| x \<in> nat; y \<in> nat |] ==> depth_fm(x,y) \<in> formula"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   250
by (simp add: depth_fm_def)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   251
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   252
lemma sats_depth_fm [simp]:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   253
   "[| x \<in> nat; y < length(env); env \<in> list(A)|]
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   254
    ==> sats(A, depth_fm(x,y), env) <->
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   255
        is_depth(**A, nth(x,env), nth(y,env))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   256
apply (frule_tac x=y in lt_length_in_nat, assumption)  
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   257
apply (simp add: depth_fm_def is_depth_def) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   258
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   259
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   260
lemma depth_iff_sats:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   261
      "[| nth(i,env) = x; nth(j,env) = y; 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   262
          i \<in> nat; j < length(env); env \<in> list(A)|]
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   263
       ==> is_depth(**A, x, y) <-> sats(A, depth_fm(i,j), env)"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   264
by (simp add: sats_depth_fm)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   265
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   266
theorem depth_reflection:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   267
     "REFLECTS[\<lambda>x. is_depth(L, f(x), g(x)),  
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   268
               \<lambda>i x. is_depth(**Lset(i), f(x), g(x))]"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   269
apply (simp only: is_depth_def setclass_simps)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   270
apply (intro FOL_reflections function_reflections formula_N_reflection) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   271
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   272
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   273
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   274
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   275
subsubsection{*The Operator @{term is_formula_case}*}
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   276
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   277
text{*The arguments of @{term is_a} are always 2, 1, 0, and the formula
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   278
      will be enclosed by three quantifiers.*}
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   279
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   280
(* is_formula_case :: 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   281
    "[i=>o, [i,i,i]=>o, [i,i,i]=>o, [i,i,i]=>o, [i,i]=>o, i, i] => o"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   282
  "is_formula_case(M, is_a, is_b, is_c, is_d, v, z) == 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   283
      (\<forall>x[M]. \<forall>y[M]. x\<in>nat --> y\<in>nat --> is_Member(M,x,y,v) --> is_a(x,y,z)) &
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   284
      (\<forall>x[M]. \<forall>y[M]. x\<in>nat --> y\<in>nat --> is_Equal(M,x,y,v) --> is_b(x,y,z)) &
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   285
      (\<forall>x[M]. \<forall>y[M]. x\<in>formula --> y\<in>formula --> 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   286
                     is_Nand(M,x,y,v) --> is_c(x,y,z)) &
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   287
      (\<forall>x[M]. x\<in>formula --> is_Forall(M,x,v) --> is_d(x,z))" *)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   288
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   289
constdefs formula_case_fm :: "[i, i, i, i, i, i]=>i"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   290
 "formula_case_fm(is_a, is_b, is_c, is_d, v, z) == 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   291
        And(Forall(Forall(Implies(finite_ordinal_fm(1), 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   292
                           Implies(finite_ordinal_fm(0), 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   293
                            Implies(Member_fm(1,0,v#+2), 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   294
                             Forall(Implies(Equal(0,z#+3), is_a))))))),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   295
        And(Forall(Forall(Implies(finite_ordinal_fm(1), 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   296
                           Implies(finite_ordinal_fm(0), 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   297
                            Implies(Equal_fm(1,0,v#+2), 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   298
                             Forall(Implies(Equal(0,z#+3), is_b))))))),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   299
        And(Forall(Forall(Implies(mem_formula_fm(1), 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   300
                           Implies(mem_formula_fm(0), 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   301
                            Implies(Nand_fm(1,0,v#+2), 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   302
                             Forall(Implies(Equal(0,z#+3), is_c))))))),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   303
        Forall(Implies(mem_formula_fm(0), 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   304
                       Implies(Forall_fm(0,succ(v)), 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   305
                             Forall(Implies(Equal(0,z#+2), is_d))))))))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   306
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   307
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   308
lemma is_formula_case_type [TC]:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   309
     "[| is_a \<in> formula;  is_b \<in> formula;  is_c \<in> formula;  is_d \<in> formula;  
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   310
         x \<in> nat; y \<in> nat |] 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   311
      ==> formula_case_fm(is_a, is_b, is_c, is_d, x, y) \<in> formula"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   312
by (simp add: formula_case_fm_def)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   313
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   314
lemma sats_formula_case_fm:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   315
  assumes is_a_iff_sats: 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   316
      "!!a0 a1 a2. 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   317
        [|a0\<in>A; a1\<in>A; a2\<in>A|]  
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   318
        ==> ISA(a2, a1, a0) <-> sats(A, is_a, Cons(a0,Cons(a1,Cons(a2,env))))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   319
  and is_b_iff_sats: 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   320
      "!!a0 a1 a2. 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   321
        [|a0\<in>A; a1\<in>A; a2\<in>A|]  
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   322
        ==> ISB(a2, a1, a0) <-> sats(A, is_b, Cons(a0,Cons(a1,Cons(a2,env))))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   323
  and is_c_iff_sats: 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   324
      "!!a0 a1 a2. 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   325
        [|a0\<in>A; a1\<in>A; a2\<in>A|]  
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   326
        ==> ISC(a2, a1, a0) <-> sats(A, is_c, Cons(a0,Cons(a1,Cons(a2,env))))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   327
  and is_d_iff_sats: 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   328
      "!!a0 a1. 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   329
        [|a0\<in>A; a1\<in>A|]  
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   330
        ==> ISD(a1, a0) <-> sats(A, is_d, Cons(a0,Cons(a1,env)))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   331
  shows 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   332
      "[|x \<in> nat; y < length(env); env \<in> list(A)|]
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   333
       ==> sats(A, formula_case_fm(is_a,is_b,is_c,is_d,x,y), env) <->
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   334
           is_formula_case(**A, ISA, ISB, ISC, ISD, nth(x,env), nth(y,env))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   335
apply (frule_tac x=y in lt_length_in_nat, assumption)  
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   336
apply (simp add: formula_case_fm_def is_formula_case_def 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   337
                 is_a_iff_sats [THEN iff_sym] is_b_iff_sats [THEN iff_sym]
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   338
                 is_c_iff_sats [THEN iff_sym] is_d_iff_sats [THEN iff_sym])
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   339
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   340
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   341
lemma formula_case_iff_sats:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   342
  assumes is_a_iff_sats: 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   343
      "!!a0 a1 a2. 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   344
        [|a0\<in>A; a1\<in>A; a2\<in>A|]  
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   345
        ==> ISA(a2, a1, a0) <-> sats(A, is_a, Cons(a0,Cons(a1,Cons(a2,env))))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   346
  and is_b_iff_sats: 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   347
      "!!a0 a1 a2. 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   348
        [|a0\<in>A; a1\<in>A; a2\<in>A|]  
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   349
        ==> ISB(a2, a1, a0) <-> sats(A, is_b, Cons(a0,Cons(a1,Cons(a2,env))))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   350
  and is_c_iff_sats: 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   351
      "!!a0 a1 a2. 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   352
        [|a0\<in>A; a1\<in>A; a2\<in>A|]  
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   353
        ==> ISC(a2, a1, a0) <-> sats(A, is_c, Cons(a0,Cons(a1,Cons(a2,env))))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   354
  and is_d_iff_sats: 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   355
      "!!a0 a1. 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   356
        [|a0\<in>A; a1\<in>A|]  
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   357
        ==> ISD(a1, a0) <-> sats(A, is_d, Cons(a0,Cons(a1,env)))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   358
  shows 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   359
      "[|nth(i,env) = x; nth(j,env) = y; 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   360
      i \<in> nat; j < length(env); env \<in> list(A)|]
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   361
       ==> is_formula_case(**A, ISA, ISB, ISC, ISD, x, y) <->
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   362
           sats(A, formula_case_fm(is_a,is_b,is_c,is_d,i,j), env)"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   363
by (simp add: sats_formula_case_fm [OF is_a_iff_sats is_b_iff_sats 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   364
                                       is_c_iff_sats is_d_iff_sats])
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   365
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   366
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   367
text{*The second argument of @{term is_a} gives it direct access to @{term x},
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   368
  which is essential for handling free variable references.  Treatment is
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   369
  based on that of @{text is_nat_case_reflection}.*}
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   370
theorem is_formula_case_reflection:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   371
  assumes is_a_reflection:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   372
    "!!h f g g'. REFLECTS[\<lambda>x. is_a(L, h(x), f(x), g(x), g'(x)),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   373
                     \<lambda>i x. is_a(**Lset(i), h(x), f(x), g(x), g'(x))]"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   374
  and is_b_reflection:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   375
    "!!h f g g'. REFLECTS[\<lambda>x. is_b(L, h(x), f(x), g(x), g'(x)),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   376
                     \<lambda>i x. is_b(**Lset(i), h(x), f(x), g(x), g'(x))]"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   377
  and is_c_reflection:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   378
    "!!h f g g'. REFLECTS[\<lambda>x. is_c(L, h(x), f(x), g(x), g'(x)),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   379
                     \<lambda>i x. is_c(**Lset(i), h(x), f(x), g(x), g'(x))]"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   380
  and is_d_reflection:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   381
    "!!h f g g'. REFLECTS[\<lambda>x. is_d(L, h(x), f(x), g(x)),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   382
                     \<lambda>i x. is_d(**Lset(i), h(x), f(x), g(x))]"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   383
  shows "REFLECTS[\<lambda>x. is_formula_case(L, is_a(L,x), is_b(L,x), is_c(L,x), is_d(L,x), g(x), h(x)),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   384
               \<lambda>i x. is_formula_case(**Lset(i), is_a(**Lset(i), x), is_b(**Lset(i), x), is_c(**Lset(i), x), is_d(**Lset(i), x), g(x), h(x))]"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   385
apply (simp (no_asm_use) only: is_formula_case_def setclass_simps)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   386
apply (intro FOL_reflections function_reflections finite_ordinal_reflection
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   387
         mem_formula_reflection
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   388
         Member_reflection Equal_reflection Nand_reflection Forall_reflection
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   389
         is_a_reflection is_b_reflection is_c_reflection is_d_reflection)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   390
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   391
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   392
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   393
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   394
subsection {*Absoluteness for @{term formula_rec}*}
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   395
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   396
constdefs
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   397
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   398
  formula_rec_case :: "[[i,i]=>i, [i,i]=>i, [i,i,i,i]=>i, [i,i]=>i, i, i] => i"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   399
    --{* the instance of @{term formula_case} in @{term formula_rec}*}
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   400
   "formula_rec_case(a,b,c,d,h) ==
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   401
        formula_case (a, b,
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   402
                \<lambda>u v. c(u, v, h ` succ(depth(u)) ` u, 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   403
                              h ` succ(depth(v)) ` v),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   404
                \<lambda>u. d(u, h ` succ(depth(u)) ` u))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   405
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   406
  is_formula_rec :: "[i=>o, [i,i,i]=>o, i, i] => o"
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   407
    --{* predicate to relative the functional @{term formula_rec}*}
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   408
   "is_formula_rec(M,MH,p,z)  ==
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   409
    \<exists>i[M]. \<exists>f[M]. i = succ(depth(p)) & fun_apply(M,f,p,z) &
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   410
                  is_transrec(M,MH,i,f)"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   411
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   412
text{*Unfold @{term formula_rec} to @{term formula_rec_case}*}
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   413
lemma (in M_triv_axioms) formula_rec_eq2:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   414
  "p \<in> formula ==>
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   415
   formula_rec(a,b,c,d,p) = 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   416
   transrec (succ(depth(p)),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   417
             \<lambda>x h. Lambda (formula, formula_rec_case(a,b,c,d,h))) ` p"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   418
by (simp add: formula_rec_eq  formula_rec_case_def)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   419
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   420
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   421
text{*Sufficient conditions to relative the instance of @{term formula_case}
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   422
      in @{term formula_rec}*}
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   423
lemma (in M_datatypes) Relativize1_formula_rec_case:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   424
     "[|Relativize2(M, nat, nat, is_a, a);
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   425
        Relativize2(M, nat, nat, is_b, b);
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   426
        Relativize2 (M, formula, formula, 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   427
           is_c, \<lambda>u v. c(u, v, h`succ(depth(u))`u, h`succ(depth(v))`v));
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   428
        Relativize1(M, formula, 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   429
           is_d, \<lambda>u. d(u, h ` succ(depth(u)) ` u));
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   430
 	M(h) |] 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   431
      ==> Relativize1(M, formula,
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   432
                         is_formula_case (M, is_a, is_b, is_c, is_d),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   433
                         formula_rec_case(a, b, c, d, h))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   434
apply (simp (no_asm) add: formula_rec_case_def Relativize1_def) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   435
apply (simp add: formula_case_abs) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   436
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   437
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   438
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   439
text{*This locale packages the premises of the following theorems,
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   440
      which is the normal purpose of locales.  It doesn't accumulate
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   441
      constraints on the class @{term M}, as in most of this deveopment.*}
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   442
locale M_formula_rec = M_eclose +
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   443
  fixes a and is_a and b and is_b and c and is_c and d and is_d and MH
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   444
  defines
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   445
      "MH(u::i,f,z) ==
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   446
	\<forall>fml[M]. is_formula(M,fml) -->
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   447
             is_lambda
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   448
	 (M, fml, is_formula_case (M, is_a, is_b, is_c(f), is_d(f)), z)"
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   449
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   450
  assumes a_closed: "[|x\<in>nat; y\<in>nat|] ==> M(a(x,y))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   451
      and a_rel:    "Relativize2(M, nat, nat, is_a, a)"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   452
      and b_closed: "[|x\<in>nat; y\<in>nat|] ==> M(b(x,y))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   453
      and b_rel:    "Relativize2(M, nat, nat, is_b, b)"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   454
      and c_closed: "[|x \<in> formula; y \<in> formula; M(gx); M(gy)|]
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   455
                     ==> M(c(x, y, gx, gy))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   456
      and c_rel:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   457
         "M(f) ==> 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   458
          Relativize2 (M, formula, formula, is_c(f),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   459
             \<lambda>u v. c(u, v, f ` succ(depth(u)) ` u, f ` succ(depth(v)) ` v))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   460
      and d_closed: "[|x \<in> formula; M(gx)|] ==> M(d(x, gx))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   461
      and d_rel:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   462
         "M(f) ==> 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   463
          Relativize1(M, formula, is_d(f), \<lambda>u. d(u, f ` succ(depth(u)) ` u))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   464
      and fr_replace: "n \<in> nat ==> transrec_replacement(M,MH,n)"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   465
      and fr_lam_replace:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   466
           "M(g) ==>
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   467
            strong_replacement
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   468
	      (M, \<lambda>x y. x \<in> formula &
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   469
		  y = \<langle>x, formula_rec_case(a,b,c,d,g,x)\<rangle>)";
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   470
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   471
lemma (in M_formula_rec) formula_rec_case_closed:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   472
    "[|M(g); p \<in> formula|] ==> M(formula_rec_case(a, b, c, d, g, p))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   473
by (simp add: formula_rec_case_def a_closed b_closed c_closed d_closed) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   474
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   475
lemma (in M_formula_rec) formula_rec_lam_closed:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   476
    "M(g) ==> M(Lambda (formula, formula_rec_case(a,b,c,d,g)))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   477
by (simp add: lam_closed2 fr_lam_replace formula_rec_case_closed)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   478
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   479
lemma (in M_formula_rec) MH_rel2:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   480
     "relativize2 (M, MH,
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   481
             \<lambda>x h. Lambda (formula, formula_rec_case(a,b,c,d,h)))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   482
apply (simp add: relativize2_def MH_def, clarify) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   483
apply (rule lambda_abs2) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   484
apply (rule fr_lam_replace, assumption)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   485
apply (rule Relativize1_formula_rec_case)  
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   486
apply (simp_all add: a_rel b_rel c_rel d_rel formula_rec_case_closed) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   487
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   488
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   489
lemma (in M_formula_rec) fr_transrec_closed:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   490
    "n \<in> nat
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   491
     ==> M(transrec
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   492
          (n, \<lambda>x h. Lambda(formula, formula_rec_case(a, b, c, d, h))))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   493
by (simp add: transrec_closed [OF fr_replace MH_rel2]  
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   494
              nat_into_M formula_rec_lam_closed) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   495
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   496
text{*The main two results: @{term formula_rec} is absolute for @{term M}.*}
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   497
theorem (in M_formula_rec) formula_rec_closed:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   498
    "p \<in> formula ==> M(formula_rec(a,b,c,d,p))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   499
by (simp add: formula_rec_eq2 fr_transrec_closed 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   500
              transM [OF _ formula_closed])
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   501
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   502
theorem (in M_formula_rec) formula_rec_abs:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   503
  "[| p \<in> formula; M(z)|] 
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   504
   ==> is_formula_rec(M,MH,p,z) <-> z = formula_rec(a,b,c,d,p)" 
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   505
by (simp add: is_formula_rec_def formula_rec_eq2 transM [OF _ formula_closed]
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   506
              transrec_abs [OF fr_replace MH_rel2] 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   507
              fr_transrec_closed formula_rec_lam_closed eq_commute)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   508
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   509
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   510
subsection {*Absoluteness for the Function @{term satisfies}*}
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   511
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   512
constdefs
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   513
  is_depth_apply :: "[i=>o,i,i,i] => o"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   514
   --{*Merely a useful abbreviation for the sequel.*}
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   515
   "is_depth_apply(M,h,p,z) ==
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   516
    \<exists>dp[M]. \<exists>sdp[M]. \<exists>hsdp[M]. 
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   517
	finite_ordinal(M,dp) & is_depth(M,p,dp) & successor(M,dp,sdp) &
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   518
	fun_apply(M,h,sdp,hsdp) & fun_apply(M,hsdp,p,z)"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   519
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   520
lemma (in M_datatypes) is_depth_apply_abs [simp]:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   521
     "[|M(h); p \<in> formula; M(z)|] 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   522
      ==> is_depth_apply(M,h,p,z) <-> z = h ` succ(depth(p)) ` p"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   523
by (simp add: is_depth_apply_def formula_into_M depth_type eq_commute)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   524
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   525
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   526
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   527
text{*There is at present some redundancy between the relativizations in
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   528
 e.g. @{text satisfies_is_a} and those in e.g. @{text Member_replacement}.*}
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   529
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   530
text{*These constants let us instantiate the parameters @{term a}, @{term b},
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   531
      @{term c}, @{term d}, etc., of the locale @{text M_formula_rec}.*}
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   532
constdefs
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   533
  satisfies_a :: "[i,i,i]=>i"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   534
   "satisfies_a(A) == 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   535
    \<lambda>x y. \<lambda>env \<in> list(A). bool_of_o (nth(x,env) \<in> nth(y,env))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   536
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   537
  satisfies_is_a :: "[i=>o,i,i,i,i]=>o"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   538
   "satisfies_is_a(M,A) == 
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   539
    \<lambda>x y zz. \<forall>lA[M]. is_list(M,A,lA) -->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   540
             is_lambda(M, lA, 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   541
		\<lambda>env z. is_bool_of_o(M, 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   542
                      \<exists>nx[M]. \<exists>ny[M]. 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   543
 		       is_nth(M,x,env,nx) & is_nth(M,y,env,ny) & nx \<in> ny, z),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   544
                zz)"
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   545
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   546
  satisfies_b :: "[i,i,i]=>i"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   547
   "satisfies_b(A) ==
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   548
    \<lambda>x y. \<lambda>env \<in> list(A). bool_of_o (nth(x,env) = nth(y,env))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   549
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   550
  satisfies_is_b :: "[i=>o,i,i,i,i]=>o"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   551
   --{*We simplify the formula to have just @{term nx} rather than 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   552
       introducing @{term ny} with  @{term "nx=ny"} *}
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   553
   "satisfies_is_b(M,A) == 
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   554
    \<lambda>x y zz. \<forall>lA[M]. is_list(M,A,lA) -->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   555
             is_lambda(M, lA, 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   556
                \<lambda>env z. is_bool_of_o(M, 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   557
                      \<exists>nx[M]. is_nth(M,x,env,nx) & is_nth(M,y,env,nx), z),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   558
                zz)"
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   559
 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   560
  satisfies_c :: "[i,i,i,i,i]=>i"
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   561
   "satisfies_c(A) == \<lambda>p q rp rq. \<lambda>env \<in> list(A). not(rp ` env and rq ` env)"
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   562
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   563
  satisfies_is_c :: "[i=>o,i,i,i,i,i]=>o"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   564
   "satisfies_is_c(M,A,h) == 
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   565
    \<lambda>p q zz. \<forall>lA[M]. is_list(M,A,lA) -->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   566
             is_lambda(M, lA, \<lambda>env z. \<exists>hp[M]. \<exists>hq[M]. 
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   567
		 (\<exists>rp[M]. is_depth_apply(M,h,p,rp) & fun_apply(M,rp,env,hp)) & 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   568
		 (\<exists>rq[M]. is_depth_apply(M,h,q,rq) & fun_apply(M,rq,env,hq)) & 
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   569
                 (\<exists>pq[M]. is_and(M,hp,hq,pq) & is_not(M,pq,z)),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   570
                zz)"
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   571
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   572
  satisfies_d :: "[i,i,i]=>i"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   573
   "satisfies_d(A) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   574
    == \<lambda>p rp. \<lambda>env \<in> list(A). bool_of_o (\<forall>x\<in>A. rp ` (Cons(x,env)) = 1)"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   575
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   576
  satisfies_is_d :: "[i=>o,i,i,i,i]=>o"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   577
   "satisfies_is_d(M,A,h) == 
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   578
    \<lambda>p zz. \<forall>lA[M]. is_list(M,A,lA) -->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   579
             is_lambda(M, lA, 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   580
                \<lambda>env z. \<exists>rp[M]. is_depth_apply(M,h,p,rp) & 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   581
                    is_bool_of_o(M, 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   582
                           \<forall>x[M]. \<forall>xenv[M]. \<forall>hp[M]. 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   583
                              x\<in>A --> is_Cons(M,x,env,xenv) --> 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   584
                              fun_apply(M,rp,xenv,hp) --> number1(M,hp),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   585
                  z),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   586
               zz)"
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   587
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   588
  satisfies_MH :: "[i=>o,i,i,i,i]=>o"
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   589
    --{*The variable @{term u} is unused, but gives @{term satisfies_MH} 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   590
        the correct arity.*}
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   591
   "satisfies_MH == 
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   592
    \<lambda>M A u f z. 
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   593
         \<forall>fml[M]. is_formula(M,fml) -->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   594
             is_lambda (M, fml, 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   595
               is_formula_case (M, satisfies_is_a(M,A), 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   596
                                satisfies_is_b(M,A), 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   597
                                satisfies_is_c(M,A,f), satisfies_is_d(M,A,f)),
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   598
               z)"
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   599
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   600
  is_satisfies :: "[i=>o,i,i,i]=>o"
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   601
   "is_satisfies(M,A) == 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   602
      is_formula_rec (M, \<lambda>u f z.
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   603
        \<forall>fml[M].
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   604
           is_formula(M,fml) \<longrightarrow>
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   605
           is_lambda
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   606
            (M, fml,
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   607
             is_formula_case
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   608
              (M, satisfies_is_a(M,A), satisfies_is_b(M,A),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   609
               satisfies_is_c(M,A,f), satisfies_is_d(M,A,f)), z))"
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   610
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   611
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   612
text{*This lemma relates the fragments defined above to the original primitive
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   613
      recursion in @{term satisfies}.
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   614
      Induction is not required: the definitions are directly equal!*}
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   615
lemma satisfies_eq:
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   616
  "satisfies(A,p) = 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   617
   formula_rec (satisfies_a(A), satisfies_b(A), 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   618
                satisfies_c(A), satisfies_d(A), p)"
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   619
by (simp add: satisfies_formula_def satisfies_a_def satisfies_b_def 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   620
              satisfies_c_def satisfies_d_def) 
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   621
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   622
text{*Further constraints on the class @{term M} in order to prove
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   623
      absoluteness for the constants defined above.  The ultimate goal
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   624
      is the absoluteness of the function @{term satisfies}. *}
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   625
locale M_satisfies = M_eclose +
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   626
 assumes 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   627
   Member_replacement:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   628
    "[|M(A); x \<in> nat; y \<in> nat|]
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   629
     ==> strong_replacement
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   630
	 (M, \<lambda>env z. \<exists>bo[M]. \<exists>nx[M]. \<exists>ny[M]. 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   631
              env \<in> list(A) & is_nth(M,x,env,nx) & is_nth(M,y,env,ny) & 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   632
              is_bool_of_o(M, nx \<in> ny, bo) &
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   633
              pair(M, env, bo, z))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   634
 and
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   635
   Equal_replacement:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   636
    "[|M(A); x \<in> nat; y \<in> nat|]
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   637
     ==> strong_replacement
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   638
	 (M, \<lambda>env z. \<exists>bo[M]. \<exists>nx[M]. \<exists>ny[M]. 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   639
              env \<in> list(A) & is_nth(M,x,env,nx) & is_nth(M,y,env,ny) & 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   640
              is_bool_of_o(M, nx = ny, bo) &
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   641
              pair(M, env, bo, z))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   642
 and
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   643
   Nand_replacement:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   644
    "[|M(A); M(rp); M(rq)|]
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   645
     ==> strong_replacement
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   646
	 (M, \<lambda>env z. \<exists>rpe[M]. \<exists>rqe[M]. \<exists>andpq[M]. \<exists>notpq[M]. 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   647
               fun_apply(M,rp,env,rpe) & fun_apply(M,rq,env,rqe) & 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   648
               is_and(M,rpe,rqe,andpq) & is_not(M,andpq,notpq) & 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   649
               env \<in> list(A) & pair(M, env, notpq, z))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   650
 and
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   651
  Forall_replacement:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   652
   "[|M(A); M(rp)|]
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   653
    ==> strong_replacement
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   654
	(M, \<lambda>env z. \<exists>bo[M]. 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   655
	      env \<in> list(A) & 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   656
	      is_bool_of_o (M, 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   657
			    \<forall>a[M]. \<forall>co[M]. \<forall>rpco[M]. 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   658
			       a\<in>A --> is_Cons(M,a,env,co) -->
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   659
			       fun_apply(M,rp,co,rpco) --> number1(M, rpco), 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   660
                            bo) &
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   661
	      pair(M,env,bo,z))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   662
 and
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   663
  formula_rec_replacement: 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   664
      --{*For the @{term transrec}*}
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   665
   "[|n \<in> nat; M(A)|] ==> transrec_replacement(M, satisfies_MH(M,A), n)"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   666
 and
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   667
  formula_rec_lambda_replacement:  
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   668
      --{*For the @{text "\<lambda>-abstraction"} in the @{term transrec} body*}
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   669
   "[|M(g); M(A)|] ==>
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   670
    strong_replacement (M, 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   671
       \<lambda>x y. mem_formula(M,x) &
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   672
             (\<exists>c[M]. is_formula_case(M, satisfies_is_a(M,A),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   673
                                  satisfies_is_b(M,A),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   674
                                  satisfies_is_c(M,A,g),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   675
                                  satisfies_is_d(M,A,g), x, c) &
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   676
             pair(M, x, c, y)))"
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   677
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   678
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   679
lemma (in M_satisfies) Member_replacement':
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   680
    "[|M(A); x \<in> nat; y \<in> nat|]
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   681
     ==> strong_replacement
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   682
	 (M, \<lambda>env z. env \<in> list(A) &
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   683
		     z = \<langle>env, bool_of_o(nth(x, env) \<in> nth(y, env))\<rangle>)"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   684
by (insert Member_replacement, simp) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   685
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   686
lemma (in M_satisfies) Equal_replacement':
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   687
    "[|M(A); x \<in> nat; y \<in> nat|]
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   688
     ==> strong_replacement
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   689
	 (M, \<lambda>env z. env \<in> list(A) &
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   690
		     z = \<langle>env, bool_of_o(nth(x, env) = nth(y, env))\<rangle>)"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   691
by (insert Equal_replacement, simp) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   692
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   693
lemma (in M_satisfies) Nand_replacement':
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   694
    "[|M(A); M(rp); M(rq)|]
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   695
     ==> strong_replacement
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   696
	 (M, \<lambda>env z. env \<in> list(A) & z = \<langle>env, not(rp`env and rq`env)\<rangle>)"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   697
by (insert Nand_replacement, simp) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   698
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   699
lemma (in M_satisfies) Forall_replacement':
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   700
   "[|M(A); M(rp)|]
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   701
    ==> strong_replacement
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   702
	(M, \<lambda>env z.
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   703
	       env \<in> list(A) &
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   704
	       z = \<langle>env, bool_of_o (\<forall>a\<in>A. rp ` Cons(a,env) = 1)\<rangle>)"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   705
by (insert Forall_replacement, simp) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   706
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   707
lemma (in M_satisfies) a_closed:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   708
     "[|M(A); x\<in>nat; y\<in>nat|] ==> M(satisfies_a(A,x,y))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   709
apply (simp add: satisfies_a_def) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   710
apply (blast intro: lam_closed2 Member_replacement') 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   711
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   712
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   713
lemma (in M_satisfies) a_rel:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   714
     "M(A) ==> Relativize2(M, nat, nat, satisfies_is_a(M,A), satisfies_a(A))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   715
apply (simp add: Relativize2_def satisfies_is_a_def satisfies_a_def)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   716
apply (simp add: lambda_abs2 [OF Member_replacement'] Relativize1_def)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   717
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   718
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   719
lemma (in M_satisfies) b_closed:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   720
     "[|M(A); x\<in>nat; y\<in>nat|] ==> M(satisfies_b(A,x,y))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   721
apply (simp add: satisfies_b_def) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   722
apply (blast intro: lam_closed2 Equal_replacement') 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   723
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   724
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   725
lemma (in M_satisfies) b_rel:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   726
     "M(A) ==> Relativize2(M, nat, nat, satisfies_is_b(M,A), satisfies_b(A))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   727
apply (simp add: Relativize2_def satisfies_is_b_def satisfies_b_def)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   728
apply (simp add: lambda_abs2 [OF Equal_replacement'] Relativize1_def)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   729
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   730
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   731
lemma (in M_satisfies) c_closed:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   732
     "[|M(A); x \<in> formula; y \<in> formula; M(rx); M(ry)|] 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   733
      ==> M(satisfies_c(A,x,y,rx,ry))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   734
apply (simp add: satisfies_c_def) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   735
apply (rule lam_closed2) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   736
apply (rule Nand_replacement') 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   737
apply (simp_all add: formula_into_M list_into_M [of _ A])
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   738
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   739
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   740
lemma (in M_satisfies) c_rel:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   741
 "[|M(A); M(f)|] ==> 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   742
  Relativize2 (M, formula, formula, 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   743
               satisfies_is_c(M,A,f),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   744
	       \<lambda>u v. satisfies_c(A, u, v, f ` succ(depth(u)) ` u, 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   745
					  f ` succ(depth(v)) ` v))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   746
apply (simp add: Relativize2_def satisfies_is_c_def satisfies_c_def)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   747
apply (simp add: lambda_abs2 [OF Nand_replacement' triv_Relativize1] 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   748
                 formula_into_M)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   749
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   750
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   751
lemma (in M_satisfies) d_closed:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   752
     "[|M(A); x \<in> formula; M(rx)|] ==> M(satisfies_d(A,x,rx))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   753
apply (simp add: satisfies_d_def) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   754
apply (rule lam_closed2) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   755
apply (rule Forall_replacement') 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   756
apply (simp_all add: formula_into_M list_into_M [of _ A])
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   757
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   758
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   759
lemma (in M_satisfies) d_rel:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   760
 "[|M(A); M(f)|] ==> 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   761
  Relativize1(M, formula, satisfies_is_d(M,A,f), 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   762
     \<lambda>u. satisfies_d(A, u, f ` succ(depth(u)) ` u))"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   763
apply (simp del: rall_abs 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   764
            add: Relativize1_def satisfies_is_d_def satisfies_d_def)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   765
apply (simp add: lambda_abs2 [OF Forall_replacement' triv_Relativize1] 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   766
                 formula_into_M)
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   767
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   768
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   769
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   770
lemma (in M_satisfies) fr_replace:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   771
      "[|n \<in> nat; M(A)|] ==> transrec_replacement(M,satisfies_MH(M,A),n)" 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   772
by (blast intro: formula_rec_replacement) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   773
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   774
lemma (in M_satisfies) formula_case_satisfies_closed:
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   775
 "[|M(g); M(A); x \<in> formula|] ==>
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   776
  M(formula_case (satisfies_a(A), satisfies_b(A),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   777
       \<lambda>u v. satisfies_c(A, u, v, 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   778
                         g ` succ(depth(u)) ` u, g ` succ(depth(v)) ` v),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   779
       \<lambda>u. satisfies_d (A, u, g ` succ(depth(u)) ` u),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   780
       x))"
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   781
by (blast intro: formula_case_closed a_closed b_closed c_closed d_closed) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   782
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   783
lemma (in M_satisfies) fr_lam_replace:
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   784
   "[|M(g); M(A)|] ==>
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   785
    strong_replacement (M, \<lambda>x y. x \<in> formula &
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   786
            y = \<langle>x, 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   787
                 formula_rec_case(satisfies_a(A),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   788
                                  satisfies_b(A),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   789
                                  satisfies_c(A),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   790
                                  satisfies_d(A), g, x)\<rangle>)"
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   791
apply (insert formula_rec_lambda_replacement) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   792
apply (simp add: formula_rec_case_def formula_case_satisfies_closed
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   793
                 formula_case_abs [OF a_rel b_rel c_rel d_rel]) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   794
done
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   795
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   796
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   797
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   798
text{*Instantiate locale @{text M_formula_rec} for the 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   799
      Function @{term satisfies}*}
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   800
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   801
lemma (in M_satisfies) M_formula_rec_axioms_M:
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   802
   "M(A) ==>
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   803
    M_formula_rec_axioms(M, satisfies_a(A), satisfies_is_a(M,A), 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   804
                            satisfies_b(A), satisfies_is_b(M,A), 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   805
                            satisfies_c(A), satisfies_is_c(M,A), 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   806
                            satisfies_d(A), satisfies_is_d(M,A))"
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   807
apply (rule M_formula_rec_axioms.intro)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   808
apply (assumption | 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   809
       rule a_closed a_rel b_closed b_rel c_closed c_rel d_closed d_rel
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   810
       fr_replace [unfolded satisfies_MH_def]
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   811
       fr_lam_replace) +
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   812
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   813
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   814
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   815
theorem (in M_satisfies) M_formula_rec_M: 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   816
    "M(A) ==>
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   817
     PROP M_formula_rec(M, satisfies_a(A), satisfies_is_a(M,A), 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   818
                            satisfies_b(A), satisfies_is_b(M,A), 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   819
                            satisfies_c(A), satisfies_is_c(M,A), 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   820
                            satisfies_d(A), satisfies_is_d(M,A))"
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   821
apply (rule M_formula_rec.intro, assumption+)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   822
apply (erule M_formula_rec_axioms_M) 
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   823
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   824
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   825
lemmas (in M_satisfies) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   826
   satisfies_closed = M_formula_rec.formula_rec_closed [OF M_formula_rec_M]
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   827
and
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   828
   satisfies_abs = M_formula_rec.formula_rec_abs [OF M_formula_rec_M];
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   829
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   830
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   831
lemma (in M_satisfies) satisfies_closed:
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   832
  "[|M(A); p \<in> formula|] ==> M(satisfies(A,p))"
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   833
by (simp add: M_formula_rec.formula_rec_closed [OF M_formula_rec_M]  
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   834
              satisfies_eq) 
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   835
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   836
lemma (in M_satisfies) satisfies_abs:
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   837
  "[|M(A); M(z); p \<in> formula|] 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   838
   ==> is_satisfies(M,A,p,z) <-> z = satisfies(A,p)"
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   839
by (simp only: M_formula_rec.formula_rec_abs [OF M_formula_rec_M]  
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   840
               satisfies_eq is_satisfies_def)
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   841
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   842
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
   843
subsection{*Internalizations Needed to Instantiate @{text "M_satisfies"}*}
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   844
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   845
subsubsection{*The Operator @{term is_depth_apply}, Internalized*}
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   846
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   847
(* is_depth_apply(M,h,p,z) ==
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   848
    \<exists>dp[M]. \<exists>sdp[M]. \<exists>hsdp[M]. 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   849
      2        1         0
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   850
	finite_ordinal(M,dp) & is_depth(M,p,dp) & successor(M,dp,sdp) &
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   851
	fun_apply(M,h,sdp,hsdp) & fun_apply(M,hsdp,p,z) *)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   852
constdefs depth_apply_fm :: "[i,i,i]=>i"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   853
    "depth_apply_fm(h,p,z) ==
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   854
       Exists(Exists(Exists(
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   855
        And(finite_ordinal_fm(2),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   856
         And(depth_fm(p#+3,2),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   857
          And(succ_fm(2,1),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   858
           And(fun_apply_fm(h#+3,1,0), fun_apply_fm(0,p#+3,z#+3))))))))"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   859
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   860
lemma depth_apply_type [TC]:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   861
     "[| x \<in> nat; y \<in> nat; z \<in> nat |] ==> depth_apply_fm(x,y,z) \<in> formula"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   862
by (simp add: depth_apply_fm_def)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   863
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   864
lemma sats_depth_apply_fm [simp]:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   865
   "[| x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   866
    ==> sats(A, depth_apply_fm(x,y,z), env) <->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   867
        is_depth_apply(**A, nth(x,env), nth(y,env), nth(z,env))"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   868
by (simp add: depth_apply_fm_def is_depth_apply_def)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   869
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   870
lemma depth_apply_iff_sats:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   871
    "[| nth(i,env) = x; nth(j,env) = y; nth(k,env) = z;
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   872
        i \<in> nat; j \<in> nat; k \<in> nat; env \<in> list(A)|]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   873
     ==> is_depth_apply(**A, x, y, z) <-> sats(A, depth_apply_fm(i,j,k), env)"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   874
by simp
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   875
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   876
lemma depth_apply_reflection:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   877
     "REFLECTS[\<lambda>x. is_depth_apply(L,f(x),g(x),h(x)),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   878
               \<lambda>i x. is_depth_apply(**Lset(i),f(x),g(x),h(x))]"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   879
apply (simp only: is_depth_apply_def setclass_simps)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   880
apply (intro FOL_reflections function_reflections depth_reflection 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   881
             finite_ordinal_reflection)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   882
done
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   883
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   884
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   885
subsubsection{*The Operator @{term satisfies_is_a}, Internalized*}
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   886
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   887
(* satisfies_is_a(M,A) == 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   888
    \<lambda>x y zz. \<forall>lA[M]. is_list(M,A,lA) -->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   889
             is_lambda(M, lA, 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   890
		\<lambda>env z. is_bool_of_o(M, 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   891
                      \<exists>nx[M]. \<exists>ny[M]. 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   892
 		       is_nth(M,x,env,nx) & is_nth(M,y,env,ny) & nx \<in> ny, z),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   893
                zz)  *)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   894
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   895
constdefs satisfies_is_a_fm :: "[i,i,i,i]=>i"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   896
 "satisfies_is_a_fm(A,x,y,z) ==
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   897
   Forall(
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   898
     Implies(is_list_fm(succ(A),0),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   899
       lambda_fm(
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   900
         bool_of_o_fm(Exists(
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   901
                       Exists(And(nth_fm(x#+6,3,1), 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   902
                               And(nth_fm(y#+6,3,0), 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   903
                                   Member(1,0))))), 0), 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   904
         0, succ(z))))"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   905
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   906
lemma satisfies_is_a_type [TC]:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   907
     "[| A \<in> nat; x \<in> nat; y \<in> nat; z \<in> nat |]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   908
      ==> satisfies_is_a_fm(A,x,y,z) \<in> formula"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   909
by (simp add: satisfies_is_a_fm_def)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   910
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   911
lemma sats_satisfies_is_a_fm [simp]:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   912
   "[| u \<in> nat; x < length(env); y < length(env); z \<in> nat; env \<in> list(A)|]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   913
    ==> sats(A, satisfies_is_a_fm(u,x,y,z), env) <->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   914
        satisfies_is_a(**A, nth(u,env), nth(x,env), nth(y,env), nth(z,env))"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   915
apply (frule_tac x=x in lt_length_in_nat, assumption)  
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   916
apply (frule_tac x=y in lt_length_in_nat, assumption)  
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   917
apply (simp add: satisfies_is_a_fm_def satisfies_is_a_def sats_lambda_fm 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   918
                 sats_bool_of_o_fm)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   919
done
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   920
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   921
lemma satisfies_is_a_iff_sats:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   922
  "[| nth(u,env) = nu; nth(x,env) = nx; nth(y,env) = ny; nth(z,env) = nz;
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   923
      u \<in> nat; x < length(env); y < length(env); z \<in> nat; env \<in> list(A)|]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   924
   ==> satisfies_is_a(**A,nu,nx,ny,nz) <->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   925
       sats(A, satisfies_is_a_fm(u,x,y,z), env)"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   926
by simp
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   927
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   928
theorem satisfies_is_a_reflection:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   929
     "REFLECTS[\<lambda>x. satisfies_is_a(L,f(x),g(x),h(x),g'(x)),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   930
               \<lambda>i x. satisfies_is_a(**Lset(i),f(x),g(x),h(x),g'(x))]"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   931
apply (unfold satisfies_is_a_def) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   932
apply (intro FOL_reflections is_lambda_reflection bool_of_o_reflection 
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   933
             nth_reflection is_list_reflection)
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   934
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   935
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   936
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   937
subsubsection{*The Operator @{term satisfies_is_b}, Internalized*}
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   938
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   939
(* satisfies_is_b(M,A) == 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   940
    \<lambda>x y zz. \<forall>lA[M]. is_list(M,A,lA) -->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   941
             is_lambda(M, lA, 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   942
                \<lambda>env z. is_bool_of_o(M, 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   943
                      \<exists>nx[M]. is_nth(M,x,env,nx) & is_nth(M,y,env,nx), z),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   944
                zz) *)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   945
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   946
constdefs satisfies_is_b_fm :: "[i,i,i,i]=>i"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   947
 "satisfies_is_b_fm(A,x,y,z) ==
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   948
   Forall(
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   949
     Implies(is_list_fm(succ(A),0),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   950
       lambda_fm(
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   951
         bool_of_o_fm(Exists(And(nth_fm(x#+5,2,0), nth_fm(y#+5,2,0))), 0), 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   952
         0, succ(z))))"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   953
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   954
lemma satisfies_is_b_type [TC]:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   955
     "[| A \<in> nat; x \<in> nat; y \<in> nat; z \<in> nat |]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   956
      ==> satisfies_is_b_fm(A,x,y,z) \<in> formula"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   957
by (simp add: satisfies_is_b_fm_def)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   958
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   959
lemma sats_satisfies_is_b_fm [simp]:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   960
   "[| u \<in> nat; x < length(env); y < length(env); z \<in> nat; env \<in> list(A)|]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   961
    ==> sats(A, satisfies_is_b_fm(u,x,y,z), env) <->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   962
        satisfies_is_b(**A, nth(u,env), nth(x,env), nth(y,env), nth(z,env))"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   963
apply (frule_tac x=x in lt_length_in_nat, assumption)  
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   964
apply (frule_tac x=y in lt_length_in_nat, assumption)  
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   965
apply (simp add: satisfies_is_b_fm_def satisfies_is_b_def sats_lambda_fm 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   966
                 sats_bool_of_o_fm)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   967
done
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   968
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   969
lemma satisfies_is_b_iff_sats:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   970
  "[| nth(u,env) = nu; nth(x,env) = nx; nth(y,env) = ny; nth(z,env) = nz;
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   971
      u \<in> nat; x < length(env); y < length(env); z \<in> nat; env \<in> list(A)|]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   972
   ==> satisfies_is_b(**A,nu,nx,ny,nz) <->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   973
       sats(A, satisfies_is_b_fm(u,x,y,z), env)"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   974
by simp
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   975
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   976
theorem satisfies_is_b_reflection:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   977
     "REFLECTS[\<lambda>x. satisfies_is_b(L,f(x),g(x),h(x),g'(x)),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   978
               \<lambda>i x. satisfies_is_b(**Lset(i),f(x),g(x),h(x),g'(x))]"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   979
apply (unfold satisfies_is_b_def) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   980
apply (intro FOL_reflections is_lambda_reflection bool_of_o_reflection 
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   981
             nth_reflection is_list_reflection)
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   982
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
   983
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   984
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   985
subsubsection{*The Operator @{term satisfies_is_c}, Internalized*}
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   986
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   987
(* satisfies_is_c(M,A,h) == 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   988
    \<lambda>p q zz. \<forall>lA[M]. is_list(M,A,lA) -->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   989
             is_lambda(M, lA, \<lambda>env z. \<exists>hp[M]. \<exists>hq[M]. 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   990
		 (\<exists>rp[M]. is_depth_apply(M,h,p,rp) & fun_apply(M,rp,env,hp)) & 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   991
		 (\<exists>rq[M]. is_depth_apply(M,h,q,rq) & fun_apply(M,rq,env,hq)) & 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   992
                 (\<exists>pq[M]. is_and(M,hp,hq,pq) & is_not(M,pq,z)),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   993
                zz) *)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   994
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   995
constdefs satisfies_is_c_fm :: "[i,i,i,i,i]=>i"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   996
 "satisfies_is_c_fm(A,h,p,q,zz) ==
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   997
   Forall(
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   998
     Implies(is_list_fm(succ(A),0),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
   999
       lambda_fm(
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1000
         Exists(Exists(
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1001
          And(Exists(And(depth_apply_fm(h#+7,p#+7,0), fun_apply_fm(0,4,2))),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1002
          And(Exists(And(depth_apply_fm(h#+7,q#+7,0), fun_apply_fm(0,4,1))),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1003
              Exists(And(and_fm(2,1,0), not_fm(0,3))))))),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1004
         0, succ(zz))))"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1005
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1006
lemma satisfies_is_c_type [TC]:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1007
     "[| A \<in> nat; h \<in> nat; x \<in> nat; y \<in> nat; z \<in> nat |]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1008
      ==> satisfies_is_c_fm(A,h,x,y,z) \<in> formula"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1009
by (simp add: satisfies_is_c_fm_def)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1010
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1011
lemma sats_satisfies_is_c_fm [simp]:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1012
   "[| u \<in> nat; v \<in> nat; x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1013
    ==> sats(A, satisfies_is_c_fm(u,v,x,y,z), env) <->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1014
        satisfies_is_c(**A, nth(u,env), nth(v,env), nth(x,env), 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1015
                            nth(y,env), nth(z,env))"  
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1016
by (simp add: satisfies_is_c_fm_def satisfies_is_c_def sats_lambda_fm)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1017
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1018
lemma satisfies_is_c_iff_sats:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1019
  "[| nth(u,env) = nu; nth(v,env) = nv; nth(x,env) = nx; nth(y,env) = ny; 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1020
      nth(z,env) = nz;
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1021
      u \<in> nat; v \<in> nat; x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1022
   ==> satisfies_is_c(**A,nu,nv,nx,ny,nz) <->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1023
       sats(A, satisfies_is_c_fm(u,v,x,y,z), env)"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1024
by simp
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1025
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1026
theorem satisfies_is_c_reflection:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1027
     "REFLECTS[\<lambda>x. satisfies_is_c(L,f(x),g(x),h(x),g'(x),h'(x)),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1028
               \<lambda>i x. satisfies_is_c(**Lset(i),f(x),g(x),h(x),g'(x),h'(x))]"
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1029
apply (unfold satisfies_is_c_def) 
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1030
apply (intro FOL_reflections function_reflections is_lambda_reflection
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1031
             extra_reflections nth_reflection depth_apply_reflection 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1032
             is_list_reflection)
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1033
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1034
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1035
subsubsection{*The Operator @{term satisfies_is_d}, Internalized*}
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1036
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1037
(* satisfies_is_d(M,A,h) == 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1038
    \<lambda>p zz. \<forall>lA[M]. is_list(M,A,lA) -->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1039
             is_lambda(M, lA, 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1040
                \<lambda>env z. \<exists>rp[M]. is_depth_apply(M,h,p,rp) & 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1041
                    is_bool_of_o(M, 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1042
                           \<forall>x[M]. \<forall>xenv[M]. \<forall>hp[M]. 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1043
                              x\<in>A --> is_Cons(M,x,env,xenv) --> 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1044
                              fun_apply(M,rp,xenv,hp) --> number1(M,hp),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1045
                  z),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1046
               zz) *)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1047
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1048
constdefs satisfies_is_d_fm :: "[i,i,i,i]=>i"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1049
 "satisfies_is_d_fm(A,h,p,zz) ==
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1050
   Forall(
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1051
     Implies(is_list_fm(succ(A),0),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1052
       lambda_fm(
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1053
         Exists(
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1054
           And(depth_apply_fm(h#+5,p#+5,0),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1055
               bool_of_o_fm(
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1056
                Forall(Forall(Forall(
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1057
                 Implies(Member(2,A#+8),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1058
                  Implies(Cons_fm(2,5,1),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1059
                   Implies(fun_apply_fm(3,1,0), number1_fm(0))))))), 1))),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1060
         0, succ(zz))))"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1061
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1062
lemma satisfies_is_d_type [TC]:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1063
     "[| A \<in> nat; h \<in> nat; x \<in> nat; z \<in> nat |]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1064
      ==> satisfies_is_d_fm(A,h,x,z) \<in> formula"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1065
by (simp add: satisfies_is_d_fm_def)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1066
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1067
lemma sats_satisfies_is_d_fm [simp]:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1068
   "[| u \<in> nat; x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1069
    ==> sats(A, satisfies_is_d_fm(u,x,y,z), env) <->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1070
        satisfies_is_d(**A, nth(u,env), nth(x,env), nth(y,env), nth(z,env))"  
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1071
by (simp add: satisfies_is_d_fm_def satisfies_is_d_def sats_lambda_fm
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1072
              sats_bool_of_o_fm)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1073
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1074
lemma satisfies_is_d_iff_sats:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1075
  "[| nth(u,env) = nu; nth(x,env) = nx; nth(y,env) = ny; nth(z,env) = nz;
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1076
      u \<in> nat; x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1077
   ==> satisfies_is_d(**A,nu,nx,ny,nz) <->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1078
       sats(A, satisfies_is_d_fm(u,x,y,z), env)"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1079
by simp
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1080
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1081
theorem satisfies_is_d_reflection:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1082
     "REFLECTS[\<lambda>x. satisfies_is_d(L,f(x),g(x),h(x),g'(x)),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1083
               \<lambda>i x. satisfies_is_d(**Lset(i),f(x),g(x),h(x),g'(x))]"
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1084
apply (unfold satisfies_is_d_def ) 
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1085
apply (intro FOL_reflections function_reflections is_lambda_reflection
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1086
             extra_reflections nth_reflection depth_apply_reflection 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1087
             is_list_reflection)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1088
done
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1089
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1090
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1091
subsubsection{*The Operator @{term satisfies_MH}, Internalized*}
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1092
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1093
(* satisfies_MH == 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1094
    \<lambda>M A u f zz. 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1095
         \<forall>fml[M]. is_formula(M,fml) -->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1096
             is_lambda (M, fml, 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1097
               is_formula_case (M, satisfies_is_a(M,A), 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1098
                                satisfies_is_b(M,A), 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1099
                                satisfies_is_c(M,A,f), satisfies_is_d(M,A,f)),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1100
               zz) *)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1101
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1102
constdefs satisfies_MH_fm :: "[i,i,i,i]=>i"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1103
 "satisfies_MH_fm(A,u,f,zz) ==
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1104
   Forall(
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1105
     Implies(is_formula_fm(0),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1106
       lambda_fm(
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1107
         formula_case_fm(satisfies_is_a_fm(A#+7,2,1,0), 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1108
                         satisfies_is_b_fm(A#+7,2,1,0), 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1109
                         satisfies_is_c_fm(A#+7,f#+7,2,1,0), 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1110
                         satisfies_is_d_fm(A#+6,f#+6,1,0), 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1111
                         1, 0),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1112
         0, succ(zz))))"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1113
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1114
lemma satisfies_MH_type [TC]:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1115
     "[| A \<in> nat; u \<in> nat; x \<in> nat; z \<in> nat |]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1116
      ==> satisfies_MH_fm(A,u,x,z) \<in> formula"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1117
by (simp add: satisfies_MH_fm_def)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1118
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1119
lemma sats_satisfies_MH_fm [simp]:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1120
   "[| u \<in> nat; x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1121
    ==> sats(A, satisfies_MH_fm(u,x,y,z), env) <->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1122
        satisfies_MH(**A, nth(u,env), nth(x,env), nth(y,env), nth(z,env))"  
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1123
by (simp add: satisfies_MH_fm_def satisfies_MH_def sats_lambda_fm
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1124
              sats_formula_case_fm)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1125
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1126
lemma satisfies_MH_iff_sats:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1127
  "[| nth(u,env) = nu; nth(x,env) = nx; nth(y,env) = ny; nth(z,env) = nz;
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1128
      u \<in> nat; x \<in> nat; y \<in> nat; z \<in> nat; env \<in> list(A)|]
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1129
   ==> satisfies_MH(**A,nu,nx,ny,nz) <->
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1130
       sats(A, satisfies_MH_fm(u,x,y,z), env)"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1131
by simp 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1132
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1133
lemmas satisfies_reflections =
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1134
       is_lambda_reflection is_formula_reflection 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1135
       is_formula_case_reflection
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1136
       satisfies_is_a_reflection satisfies_is_b_reflection 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1137
       satisfies_is_c_reflection satisfies_is_d_reflection
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1138
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1139
theorem satisfies_MH_reflection:
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1140
     "REFLECTS[\<lambda>x. satisfies_MH(L,f(x),g(x),h(x),g'(x)),
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1141
               \<lambda>i x. satisfies_MH(**Lset(i),f(x),g(x),h(x),g'(x))]"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1142
apply (unfold satisfies_MH_def) 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1143
apply (intro FOL_reflections satisfies_reflections)
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1144
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1145
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1146
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1147
subsection{*Lemmas for Instantiating the Locale @{text "M_satisfies"}*}
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1148
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1149
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1150
subsubsection{*The @{term "Member"} Case*}
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1151
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1152
lemma Member_Reflects:
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1153
 "REFLECTS[\<lambda>u. \<exists>v[L]. v \<in> B \<and> (\<exists>bo[L]. \<exists>nx[L]. \<exists>ny[L].
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1154
          v \<in> lstA \<and> is_nth(L,x,v,nx) \<and> is_nth(L,y,v,ny) \<and>
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1155
          is_bool_of_o(L, nx \<in> ny, bo) \<and> pair(L,v,bo,u)),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1156
   \<lambda>i u. \<exists>v \<in> Lset(i). v \<in> B \<and> (\<exists>bo \<in> Lset(i). \<exists>nx \<in> Lset(i). \<exists>ny \<in> Lset(i).
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1157
             v \<in> lstA \<and> is_nth(**Lset(i), x, v, nx) \<and> 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1158
             is_nth(**Lset(i), y, v, ny) \<and>
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1159
          is_bool_of_o(**Lset(i), nx \<in> ny, bo) \<and> pair(**Lset(i), v, bo, u))]"
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1160
by (intro FOL_reflections function_reflections nth_reflection 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1161
          bool_of_o_reflection)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1162
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1163
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1164
lemma Member_replacement:
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1165
    "[|L(A); x \<in> nat; y \<in> nat|]
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1166
     ==> strong_replacement
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1167
	 (L, \<lambda>env z. \<exists>bo[L]. \<exists>nx[L]. \<exists>ny[L]. 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1168
              env \<in> list(A) & is_nth(L,x,env,nx) & is_nth(L,y,env,ny) & 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1169
              is_bool_of_o(L, nx \<in> ny, bo) &
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1170
              pair(L, env, bo, z))"
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1171
apply (frule list_closed) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1172
apply (rule strong_replacementI) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1173
apply (rule rallI)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1174
apply (rename_tac B)  
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1175
apply (rule separation_CollectI) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1176
apply (rule_tac A="{list(A),B,x,y,z}" in subset_LsetE, blast ) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1177
apply (rule ReflectsE [OF Member_Reflects], assumption)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1178
apply (drule subset_Lset_ltD, assumption) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1179
apply (erule reflection_imp_L_separation)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1180
  apply (simp_all add: lt_Ord2)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1181
apply (simp add: is_nth_def is_wfrec_def is_bool_of_o_def)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1182
apply (rule DPow_LsetI)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1183
apply (rename_tac u) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1184
apply (rule bex_iff_sats conj_iff_sats conj_iff_sats)+
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1185
apply (rule_tac env = "[v,u,list(A),B,x,y,z]" in mem_iff_sats) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1186
apply (rule sep_rules is_nat_case_iff_sats iterates_MH_iff_sats
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1187
            is_recfun_iff_sats hd_iff_sats tl_iff_sats quasinat_iff_sats
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1188
     | simp)+
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1189
done
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1190
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1191
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1192
subsubsection{*The @{term "Equal"} Case*}
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1193
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1194
lemma Equal_Reflects:
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1195
 "REFLECTS[\<lambda>u. \<exists>v[L]. v \<in> B \<and> (\<exists>bo[L]. \<exists>nx[L]. \<exists>ny[L].
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1196
          v \<in> lstA \<and> is_nth(L, x, v, nx) \<and> is_nth(L, y, v, ny) \<and>
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1197
          is_bool_of_o(L, nx = ny, bo) \<and> pair(L, v, bo, u)),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1198
   \<lambda>i u. \<exists>v \<in> Lset(i). v \<in> B \<and> (\<exists>bo \<in> Lset(i). \<exists>nx \<in> Lset(i). \<exists>ny \<in> Lset(i).
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1199
             v \<in> lstA \<and> is_nth(**Lset(i), x, v, nx) \<and> 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1200
             is_nth(**Lset(i), y, v, ny) \<and>
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1201
          is_bool_of_o(**Lset(i), nx = ny, bo) \<and> pair(**Lset(i), v, bo, u))]"
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1202
by (intro FOL_reflections function_reflections nth_reflection 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1203
          bool_of_o_reflection)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1204
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1205
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1206
lemma Equal_replacement:
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1207
    "[|L(A); x \<in> nat; y \<in> nat|]
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1208
     ==> strong_replacement
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1209
	 (L, \<lambda>env z. \<exists>bo[L]. \<exists>nx[L]. \<exists>ny[L]. 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1210
              env \<in> list(A) & is_nth(L,x,env,nx) & is_nth(L,y,env,ny) & 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1211
              is_bool_of_o(L, nx = ny, bo) &
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1212
              pair(L, env, bo, z))"
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1213
apply (frule list_closed) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1214
apply (rule strong_replacementI) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1215
apply (rule rallI)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1216
apply (rename_tac B)  
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1217
apply (rule separation_CollectI) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1218
apply (rule_tac A="{list(A),B,x,y,z}" in subset_LsetE, blast ) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1219
apply (rule ReflectsE [OF Equal_Reflects], assumption)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1220
apply (drule subset_Lset_ltD, assumption) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1221
apply (erule reflection_imp_L_separation)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1222
  apply (simp_all add: lt_Ord2)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1223
apply (simp add: is_nth_def is_wfrec_def is_bool_of_o_def)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1224
apply (rule DPow_LsetI)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1225
apply (rename_tac u) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1226
apply (rule bex_iff_sats conj_iff_sats conj_iff_sats)+
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1227
apply (rule_tac env = "[v,u,list(A),B,x,y,z]" in mem_iff_sats) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1228
apply (rule sep_rules is_nat_case_iff_sats iterates_MH_iff_sats
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1229
            is_recfun_iff_sats hd_iff_sats tl_iff_sats quasinat_iff_sats
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1230
     | simp)+
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1231
done
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1232
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1233
subsubsection{*The @{term "Nand"} Case*}
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1234
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1235
lemma Nand_Reflects:
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1236
    "REFLECTS [\<lambda>x. \<exists>u[L]. u \<in> B \<and>
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1237
	       (\<exists>rpe[L]. \<exists>rqe[L]. \<exists>andpq[L]. \<exists>notpq[L].
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1238
		 fun_apply(L, rp, u, rpe) \<and> fun_apply(L, rq, u, rqe) \<and>
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1239
		 is_and(L, rpe, rqe, andpq) \<and> is_not(L, andpq, notpq) \<and>
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1240
		 u \<in> list(A) \<and> pair(L, u, notpq, x)),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1241
    \<lambda>i x. \<exists>u \<in> Lset(i). u \<in> B \<and>
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1242
     (\<exists>rpe \<in> Lset(i). \<exists>rqe \<in> Lset(i). \<exists>andpq \<in> Lset(i). \<exists>notpq \<in> Lset(i).
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1243
       fun_apply(**Lset(i), rp, u, rpe) \<and> fun_apply(**Lset(i), rq, u, rqe) \<and>
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1244
       is_and(**Lset(i), rpe, rqe, andpq) \<and> is_not(**Lset(i), andpq, notpq) \<and>
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1245
       u \<in> list(A) \<and> pair(**Lset(i), u, notpq, x))]"
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1246
apply (unfold is_and_def is_not_def) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1247
apply (intro FOL_reflections function_reflections)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1248
done
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1249
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1250
lemma Nand_replacement:
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1251
    "[|L(A); L(rp); L(rq)|]
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1252
     ==> strong_replacement
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1253
	 (L, \<lambda>env z. \<exists>rpe[L]. \<exists>rqe[L]. \<exists>andpq[L]. \<exists>notpq[L]. 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1254
               fun_apply(L,rp,env,rpe) & fun_apply(L,rq,env,rqe) & 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1255
               is_and(L,rpe,rqe,andpq) & is_not(L,andpq,notpq) & 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1256
               env \<in> list(A) & pair(L, env, notpq, z))"
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1257
apply (frule list_closed) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1258
apply (rule strong_replacementI) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1259
apply (rule rallI)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1260
apply (rename_tac B)  
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1261
apply (rule separation_CollectI) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1262
apply (rule_tac A="{list(A),B,rp,rq,z}" in subset_LsetE, blast ) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1263
apply (rule ReflectsE [OF Nand_Reflects], assumption)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1264
apply (drule subset_Lset_ltD, assumption) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1265
apply (erule reflection_imp_L_separation)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1266
  apply (simp_all add: lt_Ord2)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1267
apply (simp add: is_and_def is_not_def)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1268
apply (rule DPow_LsetI)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1269
apply (rename_tac v) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1270
apply (rule bex_iff_sats conj_iff_sats conj_iff_sats)+
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1271
apply (rule_tac env = "[u,v,list(A),B,rp,rq,z]" in mem_iff_sats) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1272
apply (rule sep_rules | simp)+
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1273
done
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1274
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1275
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1276
subsubsection{*The @{term "Forall"} Case*}
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1277
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1278
lemma Forall_Reflects:
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1279
 "REFLECTS [\<lambda>x. \<exists>u[L]. u \<in> B \<and> (\<exists>bo[L]. u \<in> list(A) \<and>
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1280
                 is_bool_of_o (L,
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1281
     \<forall>a[L]. \<forall>co[L]. \<forall>rpco[L]. a \<in> A \<longrightarrow>
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1282
                is_Cons(L,a,u,co) \<longrightarrow> fun_apply(L,rp,co,rpco) \<longrightarrow> 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1283
                number1(L,rpco),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1284
                           bo) \<and> pair(L,u,bo,x)),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1285
 \<lambda>i x. \<exists>u \<in> Lset(i). u \<in> B \<and> (\<exists>bo \<in> Lset(i). u \<in> list(A) \<and>
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1286
        is_bool_of_o (**Lset(i),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1287
 \<forall>a \<in> Lset(i). \<forall>co \<in> Lset(i). \<forall>rpco \<in> Lset(i). a \<in> A \<longrightarrow>
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1288
	    is_Cons(**Lset(i),a,u,co) \<longrightarrow> fun_apply(**Lset(i),rp,co,rpco) \<longrightarrow> 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1289
	    number1(**Lset(i),rpco),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1290
		       bo) \<and> pair(**Lset(i),u,bo,x))]"
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1291
apply (unfold is_bool_of_o_def) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1292
apply (intro FOL_reflections function_reflections Cons_reflection)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1293
done
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1294
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1295
lemma Forall_replacement:
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1296
   "[|L(A); L(rp)|]
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1297
    ==> strong_replacement
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1298
	(L, \<lambda>env z. \<exists>bo[L]. 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1299
	      env \<in> list(A) & 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1300
	      is_bool_of_o (L, 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1301
			    \<forall>a[L]. \<forall>co[L]. \<forall>rpco[L]. 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1302
			       a\<in>A --> is_Cons(L,a,env,co) -->
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1303
			       fun_apply(L,rp,co,rpco) --> number1(L, rpco), 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1304
                            bo) &
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1305
	      pair(L,env,bo,z))"
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1306
apply (frule list_closed) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1307
apply (rule strong_replacementI) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1308
apply (rule rallI)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1309
apply (rename_tac B)  
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1310
apply (rule separation_CollectI) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1311
apply (rule_tac A="{A,list(A),B,rp,z}" in subset_LsetE, blast ) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1312
apply (rule ReflectsE [OF Forall_Reflects], assumption)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1313
apply (drule subset_Lset_ltD, assumption) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1314
apply (erule reflection_imp_L_separation)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1315
  apply (simp_all add: lt_Ord2)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1316
apply (simp add: is_bool_of_o_def)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1317
apply (rule DPow_LsetI)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1318
apply (rename_tac v) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1319
apply (rule bex_iff_sats conj_iff_sats conj_iff_sats)+
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1320
apply (rule_tac env = "[u,v,A,list(A),B,rp,z]" in mem_iff_sats)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1321
apply (rule sep_rules Cons_iff_sats | simp)+
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1322
done
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1323
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1324
subsubsection{*The @{term "transrec_replacement"} Case*}
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1325
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1326
lemma formula_rec_replacement_Reflects:
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1327
 "REFLECTS [\<lambda>x. \<exists>u[L]. u \<in> B \<and> (\<exists>y[L]. pair(L, u, y, x) \<and>
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1328
             is_wfrec (L, satisfies_MH(L,A), mesa, u, y)),
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1329
    \<lambda>i x. \<exists>u \<in> Lset(i). u \<in> B \<and> (\<exists>y \<in> Lset(i). pair(**Lset(i), u, y, x) \<and>
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1330
             is_wfrec (**Lset(i), satisfies_MH(**Lset(i),A), mesa, u, y))]"
13496
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1331
by (intro FOL_reflections function_reflections satisfies_MH_reflection 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1332
          is_wfrec_reflection) 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1333
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1334
lemma formula_rec_replacement: 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1335
      --{*For the @{term transrec}*}
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1336
   "[|n \<in> nat; L(A)|] ==> transrec_replacement(L, satisfies_MH(L,A), n)"
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1337
apply (subgoal_tac "L(Memrel(eclose({n})))")
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1338
 prefer 2 apply (simp add: nat_into_M) 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1339
apply (rule transrec_replacementI) 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1340
apply (simp add: nat_into_M) 
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1341
apply (rule strong_replacementI)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1342
apply (rule rallI)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1343
apply (rename_tac B)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1344
apply (rule separation_CollectI)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1345
apply (rule_tac A="{B,A,n,z,Memrel(eclose({n}))}" in subset_LsetE, blast )
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1346
apply (rule ReflectsE [OF formula_rec_replacement_Reflects], assumption)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1347
apply (drule subset_Lset_ltD, assumption)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1348
apply (erule reflection_imp_L_separation)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1349
  apply (simp_all add: lt_Ord2 Memrel_closed)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1350
apply (elim conjE)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1351
apply (rule DPow_LsetI)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1352
apply (rename_tac v)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1353
apply (rule bex_iff_sats conj_iff_sats)+
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1354
apply (rule_tac env = "[u,v,A,n,B,Memrel(eclose({n}))]" in mem_iff_sats)
6f0c57def6d5 In ZF/Constructible, moved many results from Satisfies_absolute, etc., to
paulson
parents: 13494
diff changeset
  1355
apply (rule sep_rules satisfies_MH_iff_sats is_wfrec_iff_sats | simp)+
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1356
done
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1357
13502
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1358
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1359
subsubsection{*The Lambda Replacement Case*}
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1360
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1361
lemma formula_rec_lambda_replacement_Reflects:
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1362
 "REFLECTS [\<lambda>x. \<exists>u[L]. u \<in> B &
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1363
     mem_formula(L,u) &
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1364
     (\<exists>c[L].
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1365
	 is_formula_case
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1366
	  (L, satisfies_is_a(L,A), satisfies_is_b(L,A),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1367
	   satisfies_is_c(L,A,g), satisfies_is_d(L,A,g),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1368
	   u, c) &
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1369
	 pair(L,u,c,x)),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1370
  \<lambda>i x. \<exists>u \<in> Lset(i). u \<in> B & mem_formula(**Lset(i),u) &
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1371
     (\<exists>c \<in> Lset(i).
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1372
	 is_formula_case
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1373
	  (**Lset(i), satisfies_is_a(**Lset(i),A), satisfies_is_b(**Lset(i),A),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1374
	   satisfies_is_c(**Lset(i),A,g), satisfies_is_d(**Lset(i),A,g),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1375
	   u, c) &
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1376
	 pair(**Lset(i),u,c,x))]"
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1377
by (intro FOL_reflections function_reflections mem_formula_reflection
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1378
          is_formula_case_reflection satisfies_is_a_reflection
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1379
          satisfies_is_b_reflection satisfies_is_c_reflection
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1380
          satisfies_is_d_reflection)  
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1381
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1382
lemma formula_rec_lambda_replacement: 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1383
      --{*For the @{term transrec}*}
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1384
   "[|L(g); L(A)|] ==>
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1385
    strong_replacement (L, 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1386
       \<lambda>x y. mem_formula(L,x) &
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1387
             (\<exists>c[L]. is_formula_case(L, satisfies_is_a(L,A),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1388
                                  satisfies_is_b(L,A),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1389
                                  satisfies_is_c(L,A,g),
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1390
                                  satisfies_is_d(L,A,g), x, c) &
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1391
             pair(L, x, c, y)))" 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1392
apply (rule strong_replacementI)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1393
apply (rule rallI)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1394
apply (rename_tac B)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1395
apply (rule separation_CollectI)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1396
apply (rule_tac A="{B,A,g,z}" in subset_LsetE, blast)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1397
apply (rule ReflectsE [OF formula_rec_lambda_replacement_Reflects], assumption)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1398
apply (drule subset_Lset_ltD, assumption)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1399
apply (erule reflection_imp_L_separation)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1400
  apply (simp_all add: lt_Ord2 Memrel_closed)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1401
apply (elim conjE)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1402
apply (rule DPow_LsetI)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1403
apply (rename_tac v)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1404
apply (rule bex_iff_sats conj_iff_sats)+
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1405
apply (rule_tac env = "[u,v,A,g,B]" in mem_iff_sats)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1406
apply (rule sep_rules mem_formula_iff_sats
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1407
          formula_case_iff_sats satisfies_is_a_iff_sats
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1408
          satisfies_is_b_iff_sats satisfies_is_c_iff_sats
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1409
          satisfies_is_d_iff_sats | simp)+
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1410
done
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1411
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1412
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1413
subsection{*Instantiating @{text M_satisfies}*}
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1414
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1415
lemma M_satisfies_axioms_L: "M_satisfies_axioms(L)"
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1416
  apply (rule M_satisfies_axioms.intro)
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1417
       apply (assumption | rule
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1418
	 Member_replacement Equal_replacement 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1419
         Nand_replacement Forall_replacement
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1420
         formula_rec_replacement formula_rec_lambda_replacement)+
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1421
  done
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1422
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1423
theorem M_satisfies_L: "PROP M_satisfies(L)"
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1424
apply (rule M_satisfies.intro) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1425
     apply (rule M_eclose.axioms [OF M_eclose_L])+
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1426
apply (rule M_satisfies_axioms_L) 
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1427
done
da43ebc02f17 Finished absoluteness of "satisfies"!!
paulson
parents: 13496
diff changeset
  1428
13494
1c44289716ae new file Constructible/Satisfies_absolute.thy
paulson
parents:
diff changeset
  1429
end