src/ZF/Constructible/Separation.thy
author paulson
Fri, 16 Aug 2002 16:41:48 +0200
changeset 13505 52a16cb7fefb
parent 13440 cdde97e1db1c
child 13564 1500a2e48d44
permissions -rw-r--r--
Relativized right up to L satisfies V=L!
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13437
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
     1
(*  Title:      ZF/Constructible/Separation.thy
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
     2
    ID:         $Id$
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
     4
    Copyright   2002  University of Cambridge
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
     5
*)
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
     6
13339
0f89104dd377 Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents: 13324
diff changeset
     7
header{*Early Instances of Separation and Strong Replacement*}
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
     8
13324
39d1b3a4c6f4 more and simpler separation proofs
paulson
parents: 13323
diff changeset
     9
theory Separation = L_axioms + WF_absolute:
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    10
13339
0f89104dd377 Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents: 13324
diff changeset
    11
text{*This theory proves all instances needed for locale @{text "M_axioms"}*}
0f89104dd377 Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents: 13324
diff changeset
    12
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    13
text{*Helps us solve for de Bruijn indices!*}
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    14
lemma nth_ConsI: "[|nth(n,l) = x; n \<in> nat|] ==> nth(succ(n), Cons(a,l)) = x"
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    15
by simp
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    16
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
    17
lemmas nth_rules = nth_0 nth_ConsI nat_0I nat_succI
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
    18
lemmas sep_rules = nth_0 nth_ConsI FOL_iff_sats function_iff_sats
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
    19
                   fun_plus_iff_sats
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    20
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    21
lemma Collect_conj_in_DPow:
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
    22
     "[| {x\<in>A. P(x)} \<in> DPow(A);  {x\<in>A. Q(x)} \<in> DPow(A) |]
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    23
      ==> {x\<in>A. P(x) & Q(x)} \<in> DPow(A)"
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
    24
by (simp add: Int_in_DPow Collect_Int_Collect_eq [symmetric])
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    25
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    26
lemma Collect_conj_in_DPow_Lset:
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    27
     "[|z \<in> Lset(j); {x \<in> Lset(j). P(x)} \<in> DPow(Lset(j))|]
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    28
      ==> {x \<in> Lset(j). x \<in> z & P(x)} \<in> DPow(Lset(j))"
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    29
apply (frule mem_Lset_imp_subset_Lset)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
    30
apply (simp add: Collect_conj_in_DPow Collect_mem_eq
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    31
                 subset_Int_iff2 elem_subset_in_DPow)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    32
done
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    33
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    34
lemma separation_CollectI:
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    35
     "(\<And>z. L(z) ==> L({x \<in> z . P(x)})) ==> separation(L, \<lambda>x. P(x))"
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
    36
apply (unfold separation_def, clarify)
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
    37
apply (rule_tac x="{x\<in>z. P(x)}" in rexI)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    38
apply simp_all
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    39
done
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    40
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    41
text{*Reduces the original comprehension to the reflected one*}
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    42
lemma reflection_imp_L_separation:
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    43
      "[| \<forall>x\<in>Lset(j). P(x) <-> Q(x);
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
    44
          {x \<in> Lset(j) . Q(x)} \<in> DPow(Lset(j));
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    45
          Ord(j);  z \<in> Lset(j)|] ==> L({x \<in> z . P(x)})"
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    46
apply (rule_tac i = "succ(j)" in L_I)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    47
 prefer 2 apply simp
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    48
apply (subgoal_tac "{x \<in> z. P(x)} = {x \<in> Lset(j). x \<in> z & (Q(x))}")
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    49
 prefer 2
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
    50
 apply (blast dest: mem_Lset_imp_subset_Lset)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    51
apply (simp add: Lset_succ Collect_conj_in_DPow_Lset)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    52
done
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    53
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    54
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
    55
subsection{*Separation for Intersection*}
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    56
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    57
lemma Inter_Reflects:
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
    58
     "REFLECTS[\<lambda>x. \<forall>y[L]. y\<in>A --> x \<in> y,
13314
84b9de3cbc91 Defining a meta-existential quantifier.
paulson
parents: 13306
diff changeset
    59
               \<lambda>i x. \<forall>y\<in>Lset(i). y\<in>A --> x \<in> y]"
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
    60
by (intro FOL_reflections)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    61
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    62
lemma Inter_separation:
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    63
     "L(A) ==> separation(L, \<lambda>x. \<forall>y[L]. y\<in>A --> x\<in>y)"
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
    64
apply (rule separation_CollectI)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13440
diff changeset
    65
apply (rule_tac A="{A,z}" in subset_LsetE, blast)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    66
apply (rule ReflectsE [OF Inter_Reflects], assumption)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
    67
apply (drule subset_Lset_ltD, assumption)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    68
apply (erule reflection_imp_L_separation)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    69
  apply (simp_all add: lt_Ord2, clarify)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
    70
apply (rule DPow_LsetI)
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
    71
apply (rule ball_iff_sats)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    72
apply (rule imp_iff_sats)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    73
apply (rule_tac [2] i=1 and j=0 and env="[y,x,A]" in mem_iff_sats)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    74
apply (rule_tac i=0 and j=2 in mem_iff_sats)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    75
apply (simp_all add: succ_Un_distrib [symmetric])
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    76
done
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    77
13437
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
    78
subsection{*Separation for Set Difference*}
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
    79
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
    80
lemma Diff_Reflects:
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
    81
     "REFLECTS[\<lambda>x. x \<notin> B, \<lambda>i x. x \<notin> B]"
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
    82
by (intro FOL_reflections)  
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
    83
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
    84
lemma Diff_separation:
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
    85
     "L(B) ==> separation(L, \<lambda>x. x \<notin> B)"
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
    86
apply (rule separation_CollectI) 
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13440
diff changeset
    87
apply (rule_tac A="{B,z}" in subset_LsetE, blast) 
13437
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
    88
apply (rule ReflectsE [OF Diff_Reflects], assumption)
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
    89
apply (drule subset_Lset_ltD, assumption) 
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
    90
apply (erule reflection_imp_L_separation)
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
    91
  apply (simp_all add: lt_Ord2, clarify)
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
    92
apply (rule DPow_LsetI) 
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
    93
apply (rule not_iff_sats) 
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
    94
apply (rule_tac env="[x,B]" in mem_iff_sats)
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
    95
apply (rule sep_rules | simp)+
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
    96
done
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
    97
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
    98
subsection{*Separation for Cartesian Product*}
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
    99
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   100
lemma cartprod_Reflects:
13314
84b9de3cbc91 Defining a meta-existential quantifier.
paulson
parents: 13306
diff changeset
   101
     "REFLECTS[\<lambda>z. \<exists>x[L]. x\<in>A & (\<exists>y[L]. y\<in>B & pair(L,x,y,z)),
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   102
                \<lambda>i z. \<exists>x\<in>Lset(i). x\<in>A & (\<exists>y\<in>Lset(i). y\<in>B &
13314
84b9de3cbc91 Defining a meta-existential quantifier.
paulson
parents: 13306
diff changeset
   103
                                   pair(**Lset(i),x,y,z))]"
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   104
by (intro FOL_reflections function_reflections)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   105
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   106
lemma cartprod_separation:
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   107
     "[| L(A); L(B) |]
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   108
      ==> separation(L, \<lambda>z. \<exists>x[L]. x\<in>A & (\<exists>y[L]. y\<in>B & pair(L,x,y,z)))"
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   109
apply (rule separation_CollectI)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13440
diff changeset
   110
apply (rule_tac A="{A,B,z}" in subset_LsetE, blast)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   111
apply (rule ReflectsE [OF cartprod_Reflects], assumption)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   112
apply (drule subset_Lset_ltD, assumption)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   113
apply (erule reflection_imp_L_separation)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   114
  apply (simp_all add: lt_Ord2, clarify)
13385
31df66ca0780 Expressing Lset and L without using length and arity; simplifies Separation
paulson
parents: 13363
diff changeset
   115
apply (rule DPow_LsetI)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   116
apply (rename_tac u)
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   117
apply (rule bex_iff_sats)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   118
apply (rule conj_iff_sats)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   119
apply (rule_tac i=0 and j=2 and env="[x,u,A,B]" in mem_iff_sats, simp_all)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   120
apply (rule sep_rules | simp)+
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   121
done
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   122
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   123
subsection{*Separation for Image*}
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   124
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   125
lemma image_Reflects:
13314
84b9de3cbc91 Defining a meta-existential quantifier.
paulson
parents: 13306
diff changeset
   126
     "REFLECTS[\<lambda>y. \<exists>p[L]. p\<in>r & (\<exists>x[L]. x\<in>A & pair(L,x,y,p)),
84b9de3cbc91 Defining a meta-existential quantifier.
paulson
parents: 13306
diff changeset
   127
           \<lambda>i y. \<exists>p\<in>Lset(i). p\<in>r & (\<exists>x\<in>Lset(i). x\<in>A & pair(**Lset(i),x,y,p))]"
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   128
by (intro FOL_reflections function_reflections)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   129
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   130
lemma image_separation:
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   131
     "[| L(A); L(r) |]
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   132
      ==> separation(L, \<lambda>y. \<exists>p[L]. p\<in>r & (\<exists>x[L]. x\<in>A & pair(L,x,y,p)))"
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   133
apply (rule separation_CollectI)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13440
diff changeset
   134
apply (rule_tac A="{A,r,z}" in subset_LsetE, blast)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   135
apply (rule ReflectsE [OF image_Reflects], assumption)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   136
apply (drule subset_Lset_ltD, assumption)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   137
apply (erule reflection_imp_L_separation)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   138
  apply (simp_all add: lt_Ord2, clarify)
13385
31df66ca0780 Expressing Lset and L without using length and arity; simplifies Separation
paulson
parents: 13363
diff changeset
   139
apply (rule DPow_LsetI)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   140
apply (rule bex_iff_sats)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   141
apply (rule conj_iff_sats)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   142
apply (rule_tac env="[p,y,A,r]" in mem_iff_sats)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   143
apply (rule sep_rules | simp)+
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   144
done
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   145
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   146
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   147
subsection{*Separation for Converse*}
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   148
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   149
lemma converse_Reflects:
13314
84b9de3cbc91 Defining a meta-existential quantifier.
paulson
parents: 13306
diff changeset
   150
  "REFLECTS[\<lambda>z. \<exists>p[L]. p\<in>r & (\<exists>x[L]. \<exists>y[L]. pair(L,x,y,p) & pair(L,y,x,z)),
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   151
     \<lambda>i z. \<exists>p\<in>Lset(i). p\<in>r & (\<exists>x\<in>Lset(i). \<exists>y\<in>Lset(i).
13314
84b9de3cbc91 Defining a meta-existential quantifier.
paulson
parents: 13306
diff changeset
   152
                     pair(**Lset(i),x,y,p) & pair(**Lset(i),y,x,z))]"
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   153
by (intro FOL_reflections function_reflections)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   154
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   155
lemma converse_separation:
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   156
     "L(r) ==> separation(L,
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   157
         \<lambda>z. \<exists>p[L]. p\<in>r & (\<exists>x[L]. \<exists>y[L]. pair(L,x,y,p) & pair(L,y,x,z)))"
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   158
apply (rule separation_CollectI)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13440
diff changeset
   159
apply (rule_tac A="{r,z}" in subset_LsetE, blast)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   160
apply (rule ReflectsE [OF converse_Reflects], assumption)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   161
apply (drule subset_Lset_ltD, assumption)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   162
apply (erule reflection_imp_L_separation)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   163
  apply (simp_all add: lt_Ord2, clarify)
13385
31df66ca0780 Expressing Lset and L without using length and arity; simplifies Separation
paulson
parents: 13363
diff changeset
   164
apply (rule DPow_LsetI)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   165
apply (rename_tac u)
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   166
apply (rule bex_iff_sats)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   167
apply (rule conj_iff_sats)
13339
0f89104dd377 Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents: 13324
diff changeset
   168
apply (rule_tac i=0 and j=2 and env="[p,u,r]" in mem_iff_sats, simp_all)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   169
apply (rule sep_rules | simp)+
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   170
done
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   171
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   172
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   173
subsection{*Separation for Restriction*}
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   174
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   175
lemma restrict_Reflects:
13314
84b9de3cbc91 Defining a meta-existential quantifier.
paulson
parents: 13306
diff changeset
   176
     "REFLECTS[\<lambda>z. \<exists>x[L]. x\<in>A & (\<exists>y[L]. pair(L,x,y,z)),
84b9de3cbc91 Defining a meta-existential quantifier.
paulson
parents: 13306
diff changeset
   177
        \<lambda>i z. \<exists>x\<in>Lset(i). x\<in>A & (\<exists>y\<in>Lset(i). pair(**Lset(i),x,y,z))]"
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   178
by (intro FOL_reflections function_reflections)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   179
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   180
lemma restrict_separation:
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   181
   "L(A) ==> separation(L, \<lambda>z. \<exists>x[L]. x\<in>A & (\<exists>y[L]. pair(L,x,y,z)))"
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   182
apply (rule separation_CollectI)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13440
diff changeset
   183
apply (rule_tac A="{A,z}" in subset_LsetE, blast)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   184
apply (rule ReflectsE [OF restrict_Reflects], assumption)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   185
apply (drule subset_Lset_ltD, assumption)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   186
apply (erule reflection_imp_L_separation)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   187
  apply (simp_all add: lt_Ord2, clarify)
13385
31df66ca0780 Expressing Lset and L without using length and arity; simplifies Separation
paulson
parents: 13363
diff changeset
   188
apply (rule DPow_LsetI)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   189
apply (rename_tac u)
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   190
apply (rule bex_iff_sats)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   191
apply (rule conj_iff_sats)
13339
0f89104dd377 Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents: 13324
diff changeset
   192
apply (rule_tac i=0 and j=2 and env="[x,u,A]" in mem_iff_sats, simp_all)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   193
apply (rule sep_rules | simp)+
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   194
done
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   195
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   196
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   197
subsection{*Separation for Composition*}
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   198
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   199
lemma comp_Reflects:
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   200
     "REFLECTS[\<lambda>xz. \<exists>x[L]. \<exists>y[L]. \<exists>z[L]. \<exists>xy[L]. \<exists>yz[L].
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   201
                  pair(L,x,z,xz) & pair(L,x,y,xy) & pair(L,y,z,yz) &
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   202
                  xy\<in>s & yz\<in>r,
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   203
        \<lambda>i xz. \<exists>x\<in>Lset(i). \<exists>y\<in>Lset(i). \<exists>z\<in>Lset(i). \<exists>xy\<in>Lset(i). \<exists>yz\<in>Lset(i).
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   204
                  pair(**Lset(i),x,z,xz) & pair(**Lset(i),x,y,xy) &
13314
84b9de3cbc91 Defining a meta-existential quantifier.
paulson
parents: 13306
diff changeset
   205
                  pair(**Lset(i),y,z,yz) & xy\<in>s & yz\<in>r]"
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   206
by (intro FOL_reflections function_reflections)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   207
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   208
lemma comp_separation:
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   209
     "[| L(r); L(s) |]
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   210
      ==> separation(L, \<lambda>xz. \<exists>x[L]. \<exists>y[L]. \<exists>z[L]. \<exists>xy[L]. \<exists>yz[L].
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   211
                  pair(L,x,z,xz) & pair(L,x,y,xy) & pair(L,y,z,yz) &
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   212
                  xy\<in>s & yz\<in>r)"
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   213
apply (rule separation_CollectI)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13440
diff changeset
   214
apply (rule_tac A="{r,s,z}" in subset_LsetE, blast)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   215
apply (rule ReflectsE [OF comp_Reflects], assumption)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   216
apply (drule subset_Lset_ltD, assumption)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   217
apply (erule reflection_imp_L_separation)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   218
  apply (simp_all add: lt_Ord2, clarify)
13385
31df66ca0780 Expressing Lset and L without using length and arity; simplifies Separation
paulson
parents: 13363
diff changeset
   219
apply (rule DPow_LsetI)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   220
apply (rename_tac u)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   221
apply (rule bex_iff_sats)+
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   222
apply (rename_tac x y z)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   223
apply (rule conj_iff_sats)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   224
apply (rule_tac env="[z,y,x,u,r,s]" in pair_iff_sats)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   225
apply (rule sep_rules | simp)+
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   226
done
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   227
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   228
subsection{*Separation for Predecessors in an Order*}
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   229
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   230
lemma pred_Reflects:
13314
84b9de3cbc91 Defining a meta-existential quantifier.
paulson
parents: 13306
diff changeset
   231
     "REFLECTS[\<lambda>y. \<exists>p[L]. p\<in>r & pair(L,y,x,p),
84b9de3cbc91 Defining a meta-existential quantifier.
paulson
parents: 13306
diff changeset
   232
                    \<lambda>i y. \<exists>p \<in> Lset(i). p\<in>r & pair(**Lset(i),y,x,p)]"
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   233
by (intro FOL_reflections function_reflections)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   234
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   235
lemma pred_separation:
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   236
     "[| L(r); L(x) |] ==> separation(L, \<lambda>y. \<exists>p[L]. p\<in>r & pair(L,y,x,p))"
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   237
apply (rule separation_CollectI)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13440
diff changeset
   238
apply (rule_tac A="{r,x,z}" in subset_LsetE, blast)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   239
apply (rule ReflectsE [OF pred_Reflects], assumption)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   240
apply (drule subset_Lset_ltD, assumption)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   241
apply (erule reflection_imp_L_separation)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   242
  apply (simp_all add: lt_Ord2, clarify)
13385
31df66ca0780 Expressing Lset and L without using length and arity; simplifies Separation
paulson
parents: 13363
diff changeset
   243
apply (rule DPow_LsetI)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   244
apply (rename_tac u)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   245
apply (rule bex_iff_sats)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   246
apply (rule conj_iff_sats)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   247
apply (rule_tac env = "[p,u,r,x]" in mem_iff_sats)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   248
apply (rule sep_rules | simp)+
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   249
done
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   250
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   251
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   252
subsection{*Separation for the Membership Relation*}
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   253
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   254
lemma Memrel_Reflects:
13314
84b9de3cbc91 Defining a meta-existential quantifier.
paulson
parents: 13306
diff changeset
   255
     "REFLECTS[\<lambda>z. \<exists>x[L]. \<exists>y[L]. pair(L,x,y,z) & x \<in> y,
84b9de3cbc91 Defining a meta-existential quantifier.
paulson
parents: 13306
diff changeset
   256
            \<lambda>i z. \<exists>x \<in> Lset(i). \<exists>y \<in> Lset(i). pair(**Lset(i),x,y,z) & x \<in> y]"
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   257
by (intro FOL_reflections function_reflections)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   258
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   259
lemma Memrel_separation:
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   260
     "separation(L, \<lambda>z. \<exists>x[L]. \<exists>y[L]. pair(L,x,y,z) & x \<in> y)"
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   261
apply (rule separation_CollectI)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13440
diff changeset
   262
apply (rule_tac A="{z}" in subset_LsetE, blast)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   263
apply (rule ReflectsE [OF Memrel_Reflects], assumption)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   264
apply (drule subset_Lset_ltD, assumption)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   265
apply (erule reflection_imp_L_separation)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   266
  apply (simp_all add: lt_Ord2)
13385
31df66ca0780 Expressing Lset and L without using length and arity; simplifies Separation
paulson
parents: 13363
diff changeset
   267
apply (rule DPow_LsetI)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   268
apply (rename_tac u)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   269
apply (rule bex_iff_sats conj_iff_sats)+
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   270
apply (rule_tac env = "[y,x,u]" in pair_iff_sats)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   271
apply (rule sep_rules | simp)+
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   272
done
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   273
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   274
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   275
subsection{*Replacement for FunSpace*}
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   276
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   277
lemma funspace_succ_Reflects:
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   278
 "REFLECTS[\<lambda>z. \<exists>p[L]. p\<in>A & (\<exists>f[L]. \<exists>b[L]. \<exists>nb[L]. \<exists>cnbf[L].
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   279
            pair(L,f,b,p) & pair(L,n,b,nb) & is_cons(L,nb,f,cnbf) &
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   280
            upair(L,cnbf,cnbf,z)),
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   281
        \<lambda>i z. \<exists>p \<in> Lset(i). p\<in>A & (\<exists>f \<in> Lset(i). \<exists>b \<in> Lset(i).
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   282
              \<exists>nb \<in> Lset(i). \<exists>cnbf \<in> Lset(i).
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   283
                pair(**Lset(i),f,b,p) & pair(**Lset(i),n,b,nb) &
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   284
                is_cons(**Lset(i),nb,f,cnbf) & upair(**Lset(i),cnbf,cnbf,z))]"
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   285
by (intro FOL_reflections function_reflections)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   286
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   287
lemma funspace_succ_replacement:
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   288
     "L(n) ==>
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   289
      strong_replacement(L, \<lambda>p z. \<exists>f[L]. \<exists>b[L]. \<exists>nb[L]. \<exists>cnbf[L].
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   290
                pair(L,f,b,p) & pair(L,n,b,nb) & is_cons(L,nb,f,cnbf) &
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   291
                upair(L,cnbf,cnbf,z))"
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   292
apply (rule strong_replacementI)
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   293
apply (rule rallI)
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   294
apply (rule separation_CollectI)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13440
diff changeset
   295
apply (rule_tac A="{n,A,z}" in subset_LsetE, blast)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   296
apply (rule ReflectsE [OF funspace_succ_Reflects], assumption)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   297
apply (drule subset_Lset_ltD, assumption)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   298
apply (erule reflection_imp_L_separation)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   299
  apply (simp_all add: lt_Ord2)
13385
31df66ca0780 Expressing Lset and L without using length and arity; simplifies Separation
paulson
parents: 13363
diff changeset
   300
apply (rule DPow_LsetI)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   301
apply (rename_tac u)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   302
apply (rule bex_iff_sats)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   303
apply (rule conj_iff_sats)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   304
apply (rule_tac env = "[p,u,n,A]" in mem_iff_sats)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   305
apply (rule sep_rules | simp)+
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   306
done
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   307
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   308
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   309
subsection{*Separation for Order-Isomorphisms*}
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   310
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   311
lemma well_ord_iso_Reflects:
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   312
  "REFLECTS[\<lambda>x. x\<in>A -->
13314
84b9de3cbc91 Defining a meta-existential quantifier.
paulson
parents: 13306
diff changeset
   313
                (\<exists>y[L]. \<exists>p[L]. fun_apply(L,f,x,y) & pair(L,y,x,p) & p \<in> r),
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   314
        \<lambda>i x. x\<in>A --> (\<exists>y \<in> Lset(i). \<exists>p \<in> Lset(i).
13314
84b9de3cbc91 Defining a meta-existential quantifier.
paulson
parents: 13306
diff changeset
   315
                fun_apply(**Lset(i),f,x,y) & pair(**Lset(i),y,x,p) & p \<in> r)]"
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   316
by (intro FOL_reflections function_reflections)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   317
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   318
lemma well_ord_iso_separation:
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   319
     "[| L(A); L(f); L(r) |]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   320
      ==> separation (L, \<lambda>x. x\<in>A --> (\<exists>y[L]. (\<exists>p[L].
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   321
                     fun_apply(L,f,x,y) & pair(L,y,x,p) & p \<in> r)))"
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   322
apply (rule separation_CollectI)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13440
diff changeset
   323
apply (rule_tac A="{A,f,r,z}" in subset_LsetE, blast)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   324
apply (rule ReflectsE [OF well_ord_iso_Reflects], assumption)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   325
apply (drule subset_Lset_ltD, assumption)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   326
apply (erule reflection_imp_L_separation)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   327
  apply (simp_all add: lt_Ord2)
13385
31df66ca0780 Expressing Lset and L without using length and arity; simplifies Separation
paulson
parents: 13363
diff changeset
   328
apply (rule DPow_LsetI)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   329
apply (rename_tac u)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   330
apply (rule imp_iff_sats)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   331
apply (rule_tac env = "[u,A,f,r]" in mem_iff_sats)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   332
apply (rule sep_rules | simp)+
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   333
done
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   334
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   335
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   336
subsection{*Separation for @{term "obase"}*}
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   337
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   338
lemma obase_reflects:
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   339
  "REFLECTS[\<lambda>a. \<exists>x[L]. \<exists>g[L]. \<exists>mx[L]. \<exists>par[L].
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   340
             ordinal(L,x) & membership(L,x,mx) & pred_set(L,A,a,r,par) &
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   341
             order_isomorphism(L,par,r,x,mx,g),
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   342
        \<lambda>i a. \<exists>x \<in> Lset(i). \<exists>g \<in> Lset(i). \<exists>mx \<in> Lset(i). \<exists>par \<in> Lset(i).
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   343
             ordinal(**Lset(i),x) & membership(**Lset(i),x,mx) & pred_set(**Lset(i),A,a,r,par) &
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   344
             order_isomorphism(**Lset(i),par,r,x,mx,g)]"
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   345
by (intro FOL_reflections function_reflections fun_plus_reflections)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   346
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   347
lemma obase_separation:
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   348
     --{*part of the order type formalization*}
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   349
     "[| L(A); L(r) |]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   350
      ==> separation(L, \<lambda>a. \<exists>x[L]. \<exists>g[L]. \<exists>mx[L]. \<exists>par[L].
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   351
             ordinal(L,x) & membership(L,x,mx) & pred_set(L,A,a,r,par) &
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   352
             order_isomorphism(L,par,r,x,mx,g))"
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   353
apply (rule separation_CollectI)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13440
diff changeset
   354
apply (rule_tac A="{A,r,z}" in subset_LsetE, blast)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   355
apply (rule ReflectsE [OF obase_reflects], assumption)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   356
apply (drule subset_Lset_ltD, assumption)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   357
apply (erule reflection_imp_L_separation)
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   358
  apply (simp_all add: lt_Ord2)
13385
31df66ca0780 Expressing Lset and L without using length and arity; simplifies Separation
paulson
parents: 13363
diff changeset
   359
apply (rule DPow_LsetI)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   360
apply (rename_tac u)
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   361
apply (rule bex_iff_sats)
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   362
apply (rule conj_iff_sats)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   363
apply (rule_tac env = "[x,u,A,r]" in ordinal_iff_sats)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   364
apply (rule sep_rules | simp)+
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   365
done
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   366
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   367
13319
23de7b3af453 More Separation proofs
paulson
parents: 13316
diff changeset
   368
subsection{*Separation for a Theorem about @{term "obase"}*}
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   369
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   370
lemma obase_equals_reflects:
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   371
  "REFLECTS[\<lambda>x. x\<in>A --> ~(\<exists>y[L]. \<exists>g[L].
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   372
                ordinal(L,y) & (\<exists>my[L]. \<exists>pxr[L].
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   373
                membership(L,y,my) & pred_set(L,A,x,r,pxr) &
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   374
                order_isomorphism(L,pxr,r,y,my,g))),
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   375
        \<lambda>i x. x\<in>A --> ~(\<exists>y \<in> Lset(i). \<exists>g \<in> Lset(i).
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   376
                ordinal(**Lset(i),y) & (\<exists>my \<in> Lset(i). \<exists>pxr \<in> Lset(i).
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   377
                membership(**Lset(i),y,my) & pred_set(**Lset(i),A,x,r,pxr) &
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   378
                order_isomorphism(**Lset(i),pxr,r,y,my,g)))]"
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   379
by (intro FOL_reflections function_reflections fun_plus_reflections)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   380
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   381
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   382
lemma obase_equals_separation:
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   383
     "[| L(A); L(r) |]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   384
      ==> separation (L, \<lambda>x. x\<in>A --> ~(\<exists>y[L]. \<exists>g[L].
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   385
                              ordinal(L,y) & (\<exists>my[L]. \<exists>pxr[L].
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   386
                              membership(L,y,my) & pred_set(L,A,x,r,pxr) &
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   387
                              order_isomorphism(L,pxr,r,y,my,g))))"
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   388
apply (rule separation_CollectI)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13440
diff changeset
   389
apply (rule_tac A="{A,r,z}" in subset_LsetE, blast)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   390
apply (rule ReflectsE [OF obase_equals_reflects], assumption)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   391
apply (drule subset_Lset_ltD, assumption)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   392
apply (erule reflection_imp_L_separation)
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   393
  apply (simp_all add: lt_Ord2)
13385
31df66ca0780 Expressing Lset and L without using length and arity; simplifies Separation
paulson
parents: 13363
diff changeset
   394
apply (rule DPow_LsetI)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   395
apply (rename_tac u)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   396
apply (rule imp_iff_sats ball_iff_sats disj_iff_sats not_iff_sats)+
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   397
apply (rule_tac env = "[u,A,r]" in mem_iff_sats)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   398
apply (rule sep_rules | simp)+
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   399
done
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   400
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   401
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   402
subsection{*Replacement for @{term "omap"}*}
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   403
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   404
lemma omap_reflects:
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   405
 "REFLECTS[\<lambda>z. \<exists>a[L]. a\<in>B & (\<exists>x[L]. \<exists>g[L]. \<exists>mx[L]. \<exists>par[L].
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   406
     ordinal(L,x) & pair(L,a,x,z) & membership(L,x,mx) &
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   407
     pred_set(L,A,a,r,par) & order_isomorphism(L,par,r,x,mx,g)),
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   408
 \<lambda>i z. \<exists>a \<in> Lset(i). a\<in>B & (\<exists>x \<in> Lset(i). \<exists>g \<in> Lset(i). \<exists>mx \<in> Lset(i).
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   409
        \<exists>par \<in> Lset(i).
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   410
         ordinal(**Lset(i),x) & pair(**Lset(i),a,x,z) &
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   411
         membership(**Lset(i),x,mx) & pred_set(**Lset(i),A,a,r,par) &
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   412
         order_isomorphism(**Lset(i),par,r,x,mx,g))]"
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   413
by (intro FOL_reflections function_reflections fun_plus_reflections)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   414
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   415
lemma omap_replacement:
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   416
     "[| L(A); L(r) |]
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   417
      ==> strong_replacement(L,
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   418
             \<lambda>a z. \<exists>x[L]. \<exists>g[L]. \<exists>mx[L]. \<exists>par[L].
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   419
             ordinal(L,x) & pair(L,a,x,z) & membership(L,x,mx) &
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   420
             pred_set(L,A,a,r,par) & order_isomorphism(L,par,r,x,mx,g))"
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   421
apply (rule strong_replacementI)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   422
apply (rule rallI)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   423
apply (rename_tac B)
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   424
apply (rule separation_CollectI)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13440
diff changeset
   425
apply (rule_tac A="{A,B,r,z}" in subset_LsetE, blast)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   426
apply (rule ReflectsE [OF omap_reflects], assumption)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   427
apply (drule subset_Lset_ltD, assumption)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   428
apply (erule reflection_imp_L_separation)
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   429
  apply (simp_all add: lt_Ord2)
13385
31df66ca0780 Expressing Lset and L without using length and arity; simplifies Separation
paulson
parents: 13363
diff changeset
   430
apply (rule DPow_LsetI)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   431
apply (rename_tac u)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   432
apply (rule bex_iff_sats conj_iff_sats)+
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   433
apply (rule_tac env = "[a,u,A,B,r]" in mem_iff_sats)
13316
d16629fd0f95 more and simpler separation proofs
paulson
parents: 13314
diff changeset
   434
apply (rule sep_rules | simp)+
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   435
done
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   436
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   437
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   438
subsection{*Separation for a Theorem about @{term "obase"}*}
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   439
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   440
lemma is_recfun_reflects:
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   441
  "REFLECTS[\<lambda>x. \<exists>xa[L]. \<exists>xb[L].
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   442
                pair(L,x,a,xa) & xa \<in> r & pair(L,x,b,xb) & xb \<in> r &
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   443
                (\<exists>fx[L]. \<exists>gx[L]. fun_apply(L,f,x,fx) & fun_apply(L,g,x,gx) &
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   444
                                   fx \<noteq> gx),
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   445
   \<lambda>i x. \<exists>xa \<in> Lset(i). \<exists>xb \<in> Lset(i).
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   446
          pair(**Lset(i),x,a,xa) & xa \<in> r & pair(**Lset(i),x,b,xb) & xb \<in> r &
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   447
                (\<exists>fx \<in> Lset(i). \<exists>gx \<in> Lset(i). fun_apply(**Lset(i),f,x,fx) &
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   448
                  fun_apply(**Lset(i),g,x,gx) & fx \<noteq> gx)]"
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   449
by (intro FOL_reflections function_reflections fun_plus_reflections)
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   450
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   451
lemma is_recfun_separation:
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   452
     --{*for well-founded recursion*}
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   453
     "[| L(r); L(f); L(g); L(a); L(b) |]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   454
     ==> separation(L,
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   455
            \<lambda>x. \<exists>xa[L]. \<exists>xb[L].
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   456
                pair(L,x,a,xa) & xa \<in> r & pair(L,x,b,xb) & xb \<in> r &
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   457
                (\<exists>fx[L]. \<exists>gx[L]. fun_apply(L,f,x,fx) & fun_apply(L,g,x,gx) &
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   458
                                   fx \<noteq> gx))"
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   459
apply (rule separation_CollectI)
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13440
diff changeset
   460
apply (rule_tac A="{r,f,g,a,b,z}" in subset_LsetE, blast)
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   461
apply (rule ReflectsE [OF is_recfun_reflects], assumption)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   462
apply (drule subset_Lset_ltD, assumption)
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   463
apply (erule reflection_imp_L_separation)
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   464
  apply (simp_all add: lt_Ord2)
13385
31df66ca0780 Expressing Lset and L without using length and arity; simplifies Separation
paulson
parents: 13363
diff changeset
   465
apply (rule DPow_LsetI)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   466
apply (rename_tac u)
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   467
apply (rule bex_iff_sats conj_iff_sats)+
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   468
apply (rule_tac env = "[xa,u,r,f,g,a,b]" in pair_iff_sats)
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   469
apply (rule sep_rules | simp)+
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   470
done
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   471
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   472
13363
c26eeb000470 instantiation of locales M_trancl and M_wfrank;
paulson
parents: 13352
diff changeset
   473
subsection{*Instantiating the locale @{text M_axioms}*}
c26eeb000470 instantiation of locales M_trancl and M_wfrank;
paulson
parents: 13352
diff changeset
   474
text{*Separation (and Strong Replacement) for basic set-theoretic constructions
c26eeb000470 instantiation of locales M_trancl and M_wfrank;
paulson
parents: 13352
diff changeset
   475
such as intersection, Cartesian Product and image.*}
c26eeb000470 instantiation of locales M_trancl and M_wfrank;
paulson
parents: 13352
diff changeset
   476
13437
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
   477
lemma M_axioms_axioms_L: "M_axioms_axioms(L)"
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   478
  apply (rule M_axioms_axioms.intro)
13437
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
   479
       apply (assumption | rule
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
   480
	 Inter_separation Diff_separation cartprod_separation image_separation
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
   481
	 converse_separation restrict_separation
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
   482
	 comp_separation pred_separation Memrel_separation
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
   483
	 funspace_succ_replacement well_ord_iso_separation
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
   484
	 obase_separation obase_equals_separation
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
   485
	 omap_replacement is_recfun_separation)+
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   486
  done
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   487
13437
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
   488
theorem M_axioms_L: "PROP M_axioms(L)"
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
   489
by (rule M_axioms.intro [OF M_triv_axioms_L M_axioms_axioms_L])
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
   490
01b3fc0cc1b8 separate "axioms" proofs: more flexible for locale reasoning
paulson
parents: 13429
diff changeset
   491
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   492
lemmas cartprod_iff = M_axioms.cartprod_iff [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   493
  and cartprod_closed = M_axioms.cartprod_closed [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   494
  and sum_closed = M_axioms.sum_closed [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   495
  and M_converse_iff = M_axioms.M_converse_iff [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   496
  and converse_closed = M_axioms.converse_closed [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   497
  and converse_abs = M_axioms.converse_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   498
  and image_closed = M_axioms.image_closed [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   499
  and vimage_abs = M_axioms.vimage_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   500
  and vimage_closed = M_axioms.vimage_closed [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   501
  and domain_abs = M_axioms.domain_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   502
  and domain_closed = M_axioms.domain_closed [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   503
  and range_abs = M_axioms.range_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   504
  and range_closed = M_axioms.range_closed [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   505
  and field_abs = M_axioms.field_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   506
  and field_closed = M_axioms.field_closed [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   507
  and relation_abs = M_axioms.relation_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   508
  and function_abs = M_axioms.function_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   509
  and apply_closed = M_axioms.apply_closed [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   510
  and apply_abs = M_axioms.apply_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   511
  and typed_function_abs = M_axioms.typed_function_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   512
  and injection_abs = M_axioms.injection_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   513
  and surjection_abs = M_axioms.surjection_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   514
  and bijection_abs = M_axioms.bijection_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   515
  and M_comp_iff = M_axioms.M_comp_iff [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   516
  and comp_closed = M_axioms.comp_closed [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   517
  and composition_abs = M_axioms.composition_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   518
  and restriction_is_function = M_axioms.restriction_is_function [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   519
  and restriction_abs = M_axioms.restriction_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   520
  and M_restrict_iff = M_axioms.M_restrict_iff [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   521
  and restrict_closed = M_axioms.restrict_closed [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   522
  and Inter_abs = M_axioms.Inter_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   523
  and Inter_closed = M_axioms.Inter_closed [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   524
  and Int_closed = M_axioms.Int_closed [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   525
  and finite_fun_closed = M_axioms.finite_fun_closed [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   526
  and is_funspace_abs = M_axioms.is_funspace_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   527
  and succ_fun_eq2 = M_axioms.succ_fun_eq2 [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   528
  and funspace_succ = M_axioms.funspace_succ [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   529
  and finite_funspace_closed = M_axioms.finite_funspace_closed [OF M_axioms_L]
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   530
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   531
lemmas is_recfun_equal = M_axioms.is_recfun_equal [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   532
  and is_recfun_cut = M_axioms.is_recfun_cut [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   533
  and is_recfun_functional = M_axioms.is_recfun_functional [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   534
  and is_recfun_relativize = M_axioms.is_recfun_relativize [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   535
  and is_recfun_restrict = M_axioms.is_recfun_restrict [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   536
  and univalent_is_recfun = M_axioms.univalent_is_recfun [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   537
  and exists_is_recfun_indstep = M_axioms.exists_is_recfun_indstep [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   538
  and wellfounded_exists_is_recfun = M_axioms.wellfounded_exists_is_recfun [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   539
  and wf_exists_is_recfun = M_axioms.wf_exists_is_recfun [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   540
  and is_recfun_abs = M_axioms.is_recfun_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   541
  and irreflexive_abs = M_axioms.irreflexive_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   542
  and transitive_rel_abs = M_axioms.transitive_rel_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   543
  and linear_rel_abs = M_axioms.linear_rel_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   544
  and wellordered_is_trans_on = M_axioms.wellordered_is_trans_on [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   545
  and wellordered_is_linear = M_axioms.wellordered_is_linear [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   546
  and wellordered_is_wellfounded_on = M_axioms.wellordered_is_wellfounded_on [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   547
  and wellfounded_imp_wellfounded_on = M_axioms.wellfounded_imp_wellfounded_on [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   548
  and wellfounded_on_subset_A = M_axioms.wellfounded_on_subset_A [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   549
  and wellfounded_on_iff_wellfounded = M_axioms.wellfounded_on_iff_wellfounded [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   550
  and wellfounded_on_imp_wellfounded = M_axioms.wellfounded_on_imp_wellfounded [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   551
  and wellfounded_on_field_imp_wellfounded = M_axioms.wellfounded_on_field_imp_wellfounded [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   552
  and wellfounded_iff_wellfounded_on_field = M_axioms.wellfounded_iff_wellfounded_on_field [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   553
  and wellfounded_induct = M_axioms.wellfounded_induct [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   554
  and wellfounded_on_induct = M_axioms.wellfounded_on_induct [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   555
  and wellfounded_on_induct2 = M_axioms.wellfounded_on_induct2 [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   556
  and linear_imp_relativized = M_axioms.linear_imp_relativized [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   557
  and trans_on_imp_relativized = M_axioms.trans_on_imp_relativized [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   558
  and wf_on_imp_relativized = M_axioms.wf_on_imp_relativized [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   559
  and wf_imp_relativized = M_axioms.wf_imp_relativized [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   560
  and well_ord_imp_relativized = M_axioms.well_ord_imp_relativized [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   561
  and order_isomorphism_abs = M_axioms.order_isomorphism_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   562
  and pred_set_abs = M_axioms.pred_set_abs [OF M_axioms_L]
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   563
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   564
lemmas pred_closed = M_axioms.pred_closed [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   565
  and membership_abs = M_axioms.membership_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   566
  and M_Memrel_iff = M_axioms.M_Memrel_iff [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   567
  and Memrel_closed = M_axioms.Memrel_closed [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   568
  and wellordered_iso_predD = M_axioms.wellordered_iso_predD [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   569
  and wellordered_iso_pred_eq = M_axioms.wellordered_iso_pred_eq [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   570
  and wellfounded_on_asym = M_axioms.wellfounded_on_asym [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   571
  and wellordered_asym = M_axioms.wellordered_asym [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   572
  and ord_iso_pred_imp_lt = M_axioms.ord_iso_pred_imp_lt [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   573
  and obase_iff = M_axioms.obase_iff [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   574
  and omap_iff = M_axioms.omap_iff [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   575
  and omap_unique = M_axioms.omap_unique [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   576
  and omap_yields_Ord = M_axioms.omap_yields_Ord [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   577
  and otype_iff = M_axioms.otype_iff [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   578
  and otype_eq_range = M_axioms.otype_eq_range [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   579
  and Ord_otype = M_axioms.Ord_otype [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   580
  and domain_omap = M_axioms.domain_omap [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   581
  and omap_subset = M_axioms.omap_subset [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   582
  and omap_funtype = M_axioms.omap_funtype [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   583
  and wellordered_omap_bij = M_axioms.wellordered_omap_bij [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   584
  and omap_ord_iso = M_axioms.omap_ord_iso [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   585
  and Ord_omap_image_pred = M_axioms.Ord_omap_image_pred [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   586
  and restrict_omap_ord_iso = M_axioms.restrict_omap_ord_iso [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   587
  and obase_equals = M_axioms.obase_equals [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   588
  and omap_ord_iso_otype = M_axioms.omap_ord_iso_otype [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   589
  and obase_exists = M_axioms.obase_exists [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   590
  and omap_exists = M_axioms.omap_exists [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   591
  and otype_exists = M_axioms.otype_exists [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   592
  and omap_ord_iso_otype' = M_axioms.omap_ord_iso_otype' [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   593
  and ordertype_exists = M_axioms.ordertype_exists [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   594
  and relativized_imp_well_ord = M_axioms.relativized_imp_well_ord [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   595
  and well_ord_abs = M_axioms.well_ord_abs [OF M_axioms_L]
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13385
diff changeset
   596
13429
wenzelm
parents: 13428
diff changeset
   597
declare cartprod_closed [intro, simp]
wenzelm
parents: 13428
diff changeset
   598
declare sum_closed [intro, simp]
wenzelm
parents: 13428
diff changeset
   599
declare converse_closed [intro, simp]
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   600
declare converse_abs [simp]
13429
wenzelm
parents: 13428
diff changeset
   601
declare image_closed [intro, simp]
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   602
declare vimage_abs [simp]
13429
wenzelm
parents: 13428
diff changeset
   603
declare vimage_closed [intro, simp]
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   604
declare domain_abs [simp]
13429
wenzelm
parents: 13428
diff changeset
   605
declare domain_closed [intro, simp]
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   606
declare range_abs [simp]
13429
wenzelm
parents: 13428
diff changeset
   607
declare range_closed [intro, simp]
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   608
declare field_abs [simp]
13429
wenzelm
parents: 13428
diff changeset
   609
declare field_closed [intro, simp]
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   610
declare relation_abs [simp]
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   611
declare function_abs [simp]
13429
wenzelm
parents: 13428
diff changeset
   612
declare apply_closed [intro, simp]
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   613
declare typed_function_abs [simp]
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   614
declare injection_abs [simp]
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   615
declare surjection_abs [simp]
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   616
declare bijection_abs [simp]
13429
wenzelm
parents: 13428
diff changeset
   617
declare comp_closed [intro, simp]
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   618
declare composition_abs [simp]
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   619
declare restriction_abs [simp]
13429
wenzelm
parents: 13428
diff changeset
   620
declare restrict_closed [intro, simp]
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   621
declare Inter_abs [simp]
13429
wenzelm
parents: 13428
diff changeset
   622
declare Inter_closed [intro, simp]
wenzelm
parents: 13428
diff changeset
   623
declare Int_closed [intro, simp]
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   624
declare is_funspace_abs [simp]
13429
wenzelm
parents: 13428
diff changeset
   625
declare finite_funspace_closed [intro, simp]
13440
cdde97e1db1c some progress towards "satisfies"
paulson
parents: 13437
diff changeset
   626
declare membership_abs [simp] 
cdde97e1db1c some progress towards "satisfies"
paulson
parents: 13437
diff changeset
   627
declare Memrel_closed  [intro,simp]
13323
2c287f50c9f3 More relativization, reflection and proofs of separation
paulson
parents: 13319
diff changeset
   628
13306
6eebcddee32b more internalized formulas and separation proofs
paulson
parents:
diff changeset
   629
end