src/ZF/Constructible/Reflection.thy
author kleing
Wed, 07 Jan 2004 07:52:12 +0100
changeset 14343 6bc647f472b9
parent 14171 0cab06e3bbd0
child 16417 9bc16273c2d4
permissions -rw-r--r--
map_idI
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13505
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13434
diff changeset
     1
(*  Title:      ZF/Constructible/Reflection.thy
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13434
diff changeset
     2
    ID:         $Id$
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13434
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13434
diff changeset
     4
*)
52a16cb7fefb Relativized right up to L satisfies V=L!
paulson
parents: 13434
diff changeset
     5
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
     6
header {* The Reflection Theorem*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
     7
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
     8
theory Reflection = Normal:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
     9
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    10
lemma all_iff_not_ex_not: "(\<forall>x. P(x)) <-> (~ (\<exists>x. ~ P(x)))";
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    11
by blast
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    12
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    13
lemma ball_iff_not_bex_not: "(\<forall>x\<in>A. P(x)) <-> (~ (\<exists>x\<in>A. ~ P(x)))";
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    14
by blast
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    15
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    16
text{*From the notes of A. S. Kechris, page 6, and from 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    17
      Andrzej Mostowski, \emph{Constructible Sets with Applications},
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    18
      North-Holland, 1969, page 23.*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    19
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    20
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    21
subsection{*Basic Definitions*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    22
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    23
text{*First part: the cumulative hierarchy defining the class @{text M}.  
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    24
To avoid handling multiple arguments, we assume that @{text "Mset(l)"} is
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    25
closed under ordered pairing provided @{text l} is limit.  Possibly this
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    26
could be avoided: the induction hypothesis @{term Cl_reflects} 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    27
(in locale @{text ex_reflection}) could be weakened to
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    28
@{term "\<forall>y\<in>Mset(a). \<forall>z\<in>Mset(a). P(<y,z>) <-> Q(a,<y,z>)"}, removing most
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    29
uses of @{term Pair_in_Mset}.  But there isn't much point in doing so, since 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    30
ultimately the @{text ex_reflection} proof is packaged up using the
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    31
predicate @{text Reflects}.
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    32
*}
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13382
diff changeset
    33
locale reflection =
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    34
  fixes Mset and M and Reflects
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    35
  assumes Mset_mono_le : "mono_le_subset(Mset)"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    36
      and Mset_cont    : "cont_Ord(Mset)"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    37
      and Pair_in_Mset : "[| x \<in> Mset(a); y \<in> Mset(a); Limit(a) |] 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    38
                          ==> <x,y> \<in> Mset(a)"
13563
paulson
parents: 13505
diff changeset
    39
  defines "M(x) == \<exists>a. Ord(a) & x \<in> Mset(a)"
paulson
parents: 13505
diff changeset
    40
      and "Reflects(Cl,P,Q) == Closed_Unbounded(Cl) &
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    41
                              (\<forall>a. Cl(a) --> (\<forall>x\<in>Mset(a). P(x) <-> Q(a,x)))"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    42
  fixes F0 --{*ordinal for a specific value @{term y}*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    43
  fixes FF --{*sup over the whole level, @{term "y\<in>Mset(a)"}*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    44
  fixes ClEx --{*Reflecting ordinals for the formula @{term "\<exists>z. P"}*}
14171
0cab06e3bbd0 Extended the notion of letter and digit, such that now one may use greek,
skalberg
parents: 13634
diff changeset
    45
  defines "F0(P,y) == \<mu> b. (\<exists>z. M(z) & P(<y,z>)) --> 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    46
                               (\<exists>z\<in>Mset(b). P(<y,z>))"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    47
      and "FF(P)   == \<lambda>a. \<Union>y\<in>Mset(a). F0(P,y)"
13563
paulson
parents: 13505
diff changeset
    48
      and "ClEx(P,a) == Limit(a) & normalize(FF(P),a) = a"
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    49
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    50
lemma (in reflection) Mset_mono: "i\<le>j ==> Mset(i) <= Mset(j)"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    51
apply (insert Mset_mono_le) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    52
apply (simp add: mono_le_subset_def leI) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    53
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    54
13434
78b93a667c01 better sats rules for higher-order operators
paulson
parents: 13428
diff changeset
    55
text{*Awkward: we need a version of @{text ClEx_def} as an equality
78b93a667c01 better sats rules for higher-order operators
paulson
parents: 13428
diff changeset
    56
      at the level of classes, which do not really exist*}
78b93a667c01 better sats rules for higher-order operators
paulson
parents: 13428
diff changeset
    57
lemma (in reflection) ClEx_eq:
13563
paulson
parents: 13505
diff changeset
    58
     "ClEx(P) == \<lambda>a. Limit(a) & normalize(FF(P),a) = a"
13434
78b93a667c01 better sats rules for higher-order operators
paulson
parents: 13428
diff changeset
    59
by (simp add: ClEx_def [symmetric]) 
78b93a667c01 better sats rules for higher-order operators
paulson
parents: 13428
diff changeset
    60
78b93a667c01 better sats rules for higher-order operators
paulson
parents: 13428
diff changeset
    61
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    62
subsection{*Easy Cases of the Reflection Theorem*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    63
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    64
theorem (in reflection) Triv_reflection [intro]:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    65
     "Reflects(Ord, P, \<lambda>a x. P(x))"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    66
by (simp add: Reflects_def)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    67
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    68
theorem (in reflection) Not_reflection [intro]:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    69
     "Reflects(Cl,P,Q) ==> Reflects(Cl, \<lambda>x. ~P(x), \<lambda>a x. ~Q(a,x))"
13268
240509babf00 more use of relativized quantifiers
paulson
parents: 13223
diff changeset
    70
by (simp add: Reflects_def) 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    71
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    72
theorem (in reflection) And_reflection [intro]:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    73
     "[| Reflects(Cl,P,Q); Reflects(C',P',Q') |] 
13563
paulson
parents: 13505
diff changeset
    74
      ==> Reflects(\<lambda>a. Cl(a) & C'(a), \<lambda>x. P(x) & P'(x), 
paulson
parents: 13505
diff changeset
    75
                                      \<lambda>a x. Q(a,x) & Q'(a,x))"
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    76
by (simp add: Reflects_def Closed_Unbounded_Int, blast)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    77
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    78
theorem (in reflection) Or_reflection [intro]:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    79
     "[| Reflects(Cl,P,Q); Reflects(C',P',Q') |] 
13563
paulson
parents: 13505
diff changeset
    80
      ==> Reflects(\<lambda>a. Cl(a) & C'(a), \<lambda>x. P(x) | P'(x), 
paulson
parents: 13505
diff changeset
    81
                                      \<lambda>a x. Q(a,x) | Q'(a,x))"
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    82
by (simp add: Reflects_def Closed_Unbounded_Int, blast)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    83
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    84
theorem (in reflection) Imp_reflection [intro]:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    85
     "[| Reflects(Cl,P,Q); Reflects(C',P',Q') |] 
13563
paulson
parents: 13505
diff changeset
    86
      ==> Reflects(\<lambda>a. Cl(a) & C'(a), 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    87
                   \<lambda>x. P(x) --> P'(x), 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    88
                   \<lambda>a x. Q(a,x) --> Q'(a,x))"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    89
by (simp add: Reflects_def Closed_Unbounded_Int, blast)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    90
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    91
theorem (in reflection) Iff_reflection [intro]:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    92
     "[| Reflects(Cl,P,Q); Reflects(C',P',Q') |] 
13563
paulson
parents: 13505
diff changeset
    93
      ==> Reflects(\<lambda>a. Cl(a) & C'(a), 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    94
                   \<lambda>x. P(x) <-> P'(x), 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    95
                   \<lambda>a x. Q(a,x) <-> Q'(a,x))"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    96
by (simp add: Reflects_def Closed_Unbounded_Int, blast) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    97
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    98
subsection{*Reflection for Existential Quantifiers*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
    99
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   100
lemma (in reflection) F0_works:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   101
     "[| y\<in>Mset(a); Ord(a); M(z); P(<y,z>) |] ==> \<exists>z\<in>Mset(F0(P,y)). P(<y,z>)"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   102
apply (unfold F0_def M_def, clarify)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   103
apply (rule LeastI2)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   104
  apply (blast intro: Mset_mono [THEN subsetD])
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   105
 apply (blast intro: lt_Ord2, blast)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   106
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   107
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   108
lemma (in reflection) Ord_F0 [intro,simp]: "Ord(F0(P,y))"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   109
by (simp add: F0_def)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   110
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   111
lemma (in reflection) Ord_FF [intro,simp]: "Ord(FF(P,y))"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   112
by (simp add: FF_def)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   113
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   114
lemma (in reflection) cont_Ord_FF: "cont_Ord(FF(P))"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   115
apply (insert Mset_cont)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   116
apply (simp add: cont_Ord_def FF_def, blast)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   117
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   118
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   119
text{*Recall that @{term F0} depends upon @{term "y\<in>Mset(a)"}, 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   120
while @{term FF} depends only upon @{term a}. *}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   121
lemma (in reflection) FF_works:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   122
     "[| M(z); y\<in>Mset(a); P(<y,z>); Ord(a) |] ==> \<exists>z\<in>Mset(FF(P,a)). P(<y,z>)"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   123
apply (simp add: FF_def)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   124
apply (simp_all add: cont_Ord_Union [of concl: Mset] 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   125
                     Mset_cont Mset_mono_le not_emptyI Ord_F0)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   126
apply (blast intro: F0_works)  
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   127
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   128
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   129
lemma (in reflection) FFN_works:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   130
     "[| M(z); y\<in>Mset(a); P(<y,z>); Ord(a) |] 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   131
      ==> \<exists>z\<in>Mset(normalize(FF(P),a)). P(<y,z>)"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   132
apply (drule FF_works [of concl: P], assumption+) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   133
apply (blast intro: cont_Ord_FF le_normalize [THEN Mset_mono, THEN subsetD])
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   134
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   135
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   136
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   137
text{*Locale for the induction hypothesis*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   138
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13382
diff changeset
   139
locale ex_reflection = reflection +
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   140
  fixes P  --"the original formula"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   141
  fixes Q  --"the reflected formula"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   142
  fixes Cl --"the class of reflecting ordinals"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   143
  assumes Cl_reflects: "[| Cl(a); Ord(a) |] ==> \<forall>x\<in>Mset(a). P(x) <-> Q(a,x)"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   144
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   145
lemma (in ex_reflection) ClEx_downward:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   146
     "[| M(z); y\<in>Mset(a); P(<y,z>); Cl(a); ClEx(P,a) |] 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   147
      ==> \<exists>z\<in>Mset(a). Q(a,<y,z>)"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   148
apply (simp add: ClEx_def, clarify) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   149
apply (frule Limit_is_Ord) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   150
apply (frule FFN_works [of concl: P], assumption+) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   151
apply (drule Cl_reflects, assumption+) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   152
apply (auto simp add: Limit_is_Ord Pair_in_Mset)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   153
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   154
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   155
lemma (in ex_reflection) ClEx_upward:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   156
     "[| z\<in>Mset(a); y\<in>Mset(a); Q(a,<y,z>); Cl(a); ClEx(P,a) |] 
13563
paulson
parents: 13505
diff changeset
   157
      ==> \<exists>z. M(z) & P(<y,z>)"
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   158
apply (simp add: ClEx_def M_def)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   159
apply (blast dest: Cl_reflects
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   160
	     intro: Limit_is_Ord Pair_in_Mset)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   161
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   162
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   163
text{*Class @{text ClEx} indeed consists of reflecting ordinals...*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   164
lemma (in ex_reflection) ZF_ClEx_iff:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   165
     "[| y\<in>Mset(a); Cl(a); ClEx(P,a) |] 
13563
paulson
parents: 13505
diff changeset
   166
      ==> (\<exists>z. M(z) & P(<y,z>)) <-> (\<exists>z\<in>Mset(a). Q(a,<y,z>))"
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   167
by (blast intro: dest: ClEx_downward ClEx_upward) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   168
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   169
text{*...and it is closed and unbounded*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   170
lemma (in ex_reflection) ZF_Closed_Unbounded_ClEx:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   171
     "Closed_Unbounded(ClEx(P))"
13434
78b93a667c01 better sats rules for higher-order operators
paulson
parents: 13428
diff changeset
   172
apply (simp add: ClEx_eq)
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   173
apply (fast intro: Closed_Unbounded_Int Normal_imp_fp_Closed_Unbounded
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   174
                   Closed_Unbounded_Limit Normal_normalize)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   175
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   176
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   177
text{*The same two theorems, exported to locale @{text reflection}.*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   178
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   179
text{*Class @{text ClEx} indeed consists of reflecting ordinals...*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   180
lemma (in reflection) ClEx_iff:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   181
     "[| y\<in>Mset(a); Cl(a); ClEx(P,a);
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   182
        !!a. [| Cl(a); Ord(a) |] ==> \<forall>x\<in>Mset(a). P(x) <-> Q(a,x) |] 
13563
paulson
parents: 13505
diff changeset
   183
      ==> (\<exists>z. M(z) & P(<y,z>)) <-> (\<exists>z\<in>Mset(a). Q(a,<y,z>))"
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   184
apply (unfold ClEx_def FF_def F0_def M_def)
13428
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13382
diff changeset
   185
apply (rule ex_reflection.ZF_ClEx_iff
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13382
diff changeset
   186
  [OF ex_reflection.intro, OF reflection.intro ex_reflection_axioms.intro,
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13382
diff changeset
   187
    of Mset Cl])
99e52e78eb65 eliminate open locales and special ML code;
wenzelm
parents: 13382
diff changeset
   188
apply (simp_all add: Mset_mono_le Mset_cont Pair_in_Mset)
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   189
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   190
13434
78b93a667c01 better sats rules for higher-order operators
paulson
parents: 13428
diff changeset
   191
(*Alternative proof, less unfolding:
78b93a667c01 better sats rules for higher-order operators
paulson
parents: 13428
diff changeset
   192
apply (rule Reflection.ZF_ClEx_iff [of Mset _ _ Cl, folded M_def])
78b93a667c01 better sats rules for higher-order operators
paulson
parents: 13428
diff changeset
   193
apply (fold ClEx_def FF_def F0_def)
78b93a667c01 better sats rules for higher-order operators
paulson
parents: 13428
diff changeset
   194
apply (rule ex_reflection.intro, assumption)
78b93a667c01 better sats rules for higher-order operators
paulson
parents: 13428
diff changeset
   195
apply (simp add: ex_reflection_axioms.intro, assumption+)
78b93a667c01 better sats rules for higher-order operators
paulson
parents: 13428
diff changeset
   196
*)
78b93a667c01 better sats rules for higher-order operators
paulson
parents: 13428
diff changeset
   197
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   198
lemma (in reflection) Closed_Unbounded_ClEx:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   199
     "(!!a. [| Cl(a); Ord(a) |] ==> \<forall>x\<in>Mset(a). P(x) <-> Q(a,x))
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   200
      ==> Closed_Unbounded(ClEx(P))"
13434
78b93a667c01 better sats rules for higher-order operators
paulson
parents: 13428
diff changeset
   201
apply (unfold ClEx_eq FF_def F0_def M_def) 
78b93a667c01 better sats rules for higher-order operators
paulson
parents: 13428
diff changeset
   202
apply (rule Reflection.ZF_Closed_Unbounded_ClEx [of Mset _ _ Cl])
78b93a667c01 better sats rules for higher-order operators
paulson
parents: 13428
diff changeset
   203
apply (rule ex_reflection.intro, assumption)
78b93a667c01 better sats rules for higher-order operators
paulson
parents: 13428
diff changeset
   204
apply (blast intro: ex_reflection_axioms.intro)
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   205
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   206
13292
f504f5d284d3 reflection for rall and rex
paulson
parents: 13268
diff changeset
   207
subsection{*Packaging the Quantifier Reflection Rules*}
f504f5d284d3 reflection for rall and rex
paulson
parents: 13268
diff changeset
   208
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   209
lemma (in reflection) Ex_reflection_0:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   210
     "Reflects(Cl,P0,Q0) 
13563
paulson
parents: 13505
diff changeset
   211
      ==> Reflects(\<lambda>a. Cl(a) & ClEx(P0,a), 
paulson
parents: 13505
diff changeset
   212
                   \<lambda>x. \<exists>z. M(z) & P0(<x,z>), 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   213
                   \<lambda>a x. \<exists>z\<in>Mset(a). Q0(a,<x,z>))" 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   214
apply (simp add: Reflects_def) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   215
apply (intro conjI Closed_Unbounded_Int)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   216
  apply blast 
13382
b37764a46b16 adapted locales;
wenzelm
parents: 13292
diff changeset
   217
 apply (rule Closed_Unbounded_ClEx [of Cl P0 Q0], blast, clarify) 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   218
apply (rule_tac Cl=Cl in  ClEx_iff, assumption+, blast) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   219
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   220
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   221
lemma (in reflection) All_reflection_0:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   222
     "Reflects(Cl,P0,Q0) 
13563
paulson
parents: 13505
diff changeset
   223
      ==> Reflects(\<lambda>a. Cl(a) & ClEx(\<lambda>x.~P0(x), a), 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   224
                   \<lambda>x. \<forall>z. M(z) --> P0(<x,z>), 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   225
                   \<lambda>a x. \<forall>z\<in>Mset(a). Q0(a,<x,z>))" 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   226
apply (simp only: all_iff_not_ex_not ball_iff_not_bex_not) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   227
apply (rule Not_reflection, drule Not_reflection, simp) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   228
apply (erule Ex_reflection_0)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   229
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   230
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   231
theorem (in reflection) Ex_reflection [intro]:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   232
     "Reflects(Cl, \<lambda>x. P(fst(x),snd(x)), \<lambda>a x. Q(a,fst(x),snd(x))) 
13563
paulson
parents: 13505
diff changeset
   233
      ==> Reflects(\<lambda>a. Cl(a) & ClEx(\<lambda>x. P(fst(x),snd(x)), a), 
paulson
parents: 13505
diff changeset
   234
                   \<lambda>x. \<exists>z. M(z) & P(x,z), 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   235
                   \<lambda>a x. \<exists>z\<in>Mset(a). Q(a,x,z))"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   236
by (rule Ex_reflection_0 [of _ " \<lambda>x. P(fst(x),snd(x))" 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   237
                               "\<lambda>a x. Q(a,fst(x),snd(x))", simplified])
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   238
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   239
theorem (in reflection) All_reflection [intro]:
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   240
     "Reflects(Cl,  \<lambda>x. P(fst(x),snd(x)), \<lambda>a x. Q(a,fst(x),snd(x)))
13563
paulson
parents: 13505
diff changeset
   241
      ==> Reflects(\<lambda>a. Cl(a) & ClEx(\<lambda>x. ~P(fst(x),snd(x)), a), 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   242
                   \<lambda>x. \<forall>z. M(z) --> P(x,z), 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   243
                   \<lambda>a x. \<forall>z\<in>Mset(a). Q(a,x,z))" 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   244
by (rule All_reflection_0 [of _ "\<lambda>x. P(fst(x),snd(x))" 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   245
                                "\<lambda>a x. Q(a,fst(x),snd(x))", simplified])
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   246
13292
f504f5d284d3 reflection for rall and rex
paulson
parents: 13268
diff changeset
   247
text{*And again, this time using class-bounded quantifiers*}
f504f5d284d3 reflection for rall and rex
paulson
parents: 13268
diff changeset
   248
f504f5d284d3 reflection for rall and rex
paulson
parents: 13268
diff changeset
   249
theorem (in reflection) Rex_reflection [intro]:
f504f5d284d3 reflection for rall and rex
paulson
parents: 13268
diff changeset
   250
     "Reflects(Cl, \<lambda>x. P(fst(x),snd(x)), \<lambda>a x. Q(a,fst(x),snd(x))) 
13563
paulson
parents: 13505
diff changeset
   251
      ==> Reflects(\<lambda>a. Cl(a) & ClEx(\<lambda>x. P(fst(x),snd(x)), a), 
13292
f504f5d284d3 reflection for rall and rex
paulson
parents: 13268
diff changeset
   252
                   \<lambda>x. \<exists>z[M]. P(x,z), 
f504f5d284d3 reflection for rall and rex
paulson
parents: 13268
diff changeset
   253
                   \<lambda>a x. \<exists>z\<in>Mset(a). Q(a,x,z))"
f504f5d284d3 reflection for rall and rex
paulson
parents: 13268
diff changeset
   254
by (unfold rex_def, blast) 
f504f5d284d3 reflection for rall and rex
paulson
parents: 13268
diff changeset
   255
f504f5d284d3 reflection for rall and rex
paulson
parents: 13268
diff changeset
   256
theorem (in reflection) Rall_reflection [intro]:
f504f5d284d3 reflection for rall and rex
paulson
parents: 13268
diff changeset
   257
     "Reflects(Cl,  \<lambda>x. P(fst(x),snd(x)), \<lambda>a x. Q(a,fst(x),snd(x)))
13563
paulson
parents: 13505
diff changeset
   258
      ==> Reflects(\<lambda>a. Cl(a) & ClEx(\<lambda>x. ~P(fst(x),snd(x)), a), 
13292
f504f5d284d3 reflection for rall and rex
paulson
parents: 13268
diff changeset
   259
                   \<lambda>x. \<forall>z[M]. P(x,z), 
f504f5d284d3 reflection for rall and rex
paulson
parents: 13268
diff changeset
   260
                   \<lambda>a x. \<forall>z\<in>Mset(a). Q(a,x,z))" 
f504f5d284d3 reflection for rall and rex
paulson
parents: 13268
diff changeset
   261
by (unfold rall_def, blast) 
f504f5d284d3 reflection for rall and rex
paulson
parents: 13268
diff changeset
   262
f504f5d284d3 reflection for rall and rex
paulson
parents: 13268
diff changeset
   263
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   264
text{*No point considering bounded quantifiers, where reflection is trivial.*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   265
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   266
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   267
subsection{*Simple Examples of Reflection*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   268
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   269
text{*Example 1: reflecting a simple formula.  The reflecting class is first
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   270
given as the variable @{text ?Cl} and later retrieved from the final 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   271
proof state.*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   272
lemma (in reflection) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   273
     "Reflects(?Cl,
13563
paulson
parents: 13505
diff changeset
   274
               \<lambda>x. \<exists>y. M(y) & x \<in> y, 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   275
               \<lambda>a x. \<exists>y\<in>Mset(a). x \<in> y)"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   276
by fast
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   277
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   278
text{*Problem here: there needs to be a conjunction (class intersection)
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   279
in the class of reflecting ordinals.  The @{term "Ord(a)"} is redundant,
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   280
though harmless.*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   281
lemma (in reflection) 
13563
paulson
parents: 13505
diff changeset
   282
     "Reflects(\<lambda>a. Ord(a) & ClEx(\<lambda>x. fst(x) \<in> snd(x), a),   
paulson
parents: 13505
diff changeset
   283
               \<lambda>x. \<exists>y. M(y) & x \<in> y, 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   284
               \<lambda>a x. \<exists>y\<in>Mset(a). x \<in> y)" 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   285
by fast
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   286
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   287
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   288
text{*Example 2*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   289
lemma (in reflection) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   290
     "Reflects(?Cl,
13563
paulson
parents: 13505
diff changeset
   291
               \<lambda>x. \<exists>y. M(y) & (\<forall>z. M(z) --> z \<subseteq> x --> z \<in> y), 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   292
               \<lambda>a x. \<exists>y\<in>Mset(a). \<forall>z\<in>Mset(a). z \<subseteq> x --> z \<in> y)" 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   293
by fast
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   294
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   295
text{*Example 2'.  We give the reflecting class explicitly. *}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   296
lemma (in reflection) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   297
  "Reflects
13563
paulson
parents: 13505
diff changeset
   298
    (\<lambda>a. (Ord(a) &
paulson
parents: 13505
diff changeset
   299
          ClEx(\<lambda>x. ~ (snd(x) \<subseteq> fst(fst(x)) --> snd(x) \<in> snd(fst(x))), a)) &
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   300
          ClEx(\<lambda>x. \<forall>z. M(z) --> z \<subseteq> fst(x) --> z \<in> snd(x), a),
13563
paulson
parents: 13505
diff changeset
   301
	    \<lambda>x. \<exists>y. M(y) & (\<forall>z. M(z) --> z \<subseteq> x --> z \<in> y), 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   302
	    \<lambda>a x. \<exists>y\<in>Mset(a). \<forall>z\<in>Mset(a). z \<subseteq> x --> z \<in> y)" 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   303
by fast
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   304
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   305
text{*Example 2''.  We expand the subset relation.*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   306
lemma (in reflection) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   307
  "Reflects(?Cl,
13563
paulson
parents: 13505
diff changeset
   308
        \<lambda>x. \<exists>y. M(y) & (\<forall>z. M(z) --> (\<forall>w. M(w) --> w\<in>z --> w\<in>x) --> z\<in>y),
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   309
        \<lambda>a x. \<exists>y\<in>Mset(a). \<forall>z\<in>Mset(a). (\<forall>w\<in>Mset(a). w\<in>z --> w\<in>x) --> z\<in>y)"
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   310
by fast
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   311
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   312
text{*Example 2'''.  Single-step version, to reveal the reflecting class.*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   313
lemma (in reflection) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   314
     "Reflects(?Cl,
13563
paulson
parents: 13505
diff changeset
   315
               \<lambda>x. \<exists>y. M(y) & (\<forall>z. M(z) --> z \<subseteq> x --> z \<in> y), 
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   316
               \<lambda>a x. \<exists>y\<in>Mset(a). \<forall>z\<in>Mset(a). z \<subseteq> x --> z \<in> y)" 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   317
apply (rule Ex_reflection) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   318
txt{*
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   319
@{goals[display,indent=0,margin=60]}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   320
*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   321
apply (rule All_reflection) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   322
txt{*
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   323
@{goals[display,indent=0,margin=60]}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   324
*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   325
apply (rule Triv_reflection) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   326
txt{*
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   327
@{goals[display,indent=0,margin=60]}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   328
*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   329
done
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   330
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   331
text{*Example 3.  Warning: the following examples make sense only
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   332
if @{term P} is quantifier-free, since it is not being relativized.*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   333
lemma (in reflection) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   334
     "Reflects(?Cl,
13563
paulson
parents: 13505
diff changeset
   335
               \<lambda>x. \<exists>y. M(y) & (\<forall>z. M(z) --> z \<in> y <-> z \<in> x & P(z)), 
paulson
parents: 13505
diff changeset
   336
               \<lambda>a x. \<exists>y\<in>Mset(a). \<forall>z\<in>Mset(a). z \<in> y <-> z \<in> x & P(z))"
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   337
by fast
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   338
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   339
text{*Example 3'*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   340
lemma (in reflection) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   341
     "Reflects(?Cl,
13563
paulson
parents: 13505
diff changeset
   342
               \<lambda>x. \<exists>y. M(y) & y = Collect(x,P),
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   343
               \<lambda>a x. \<exists>y\<in>Mset(a). y = Collect(x,P))";
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   344
by fast
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   345
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   346
text{*Example 3''*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   347
lemma (in reflection) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   348
     "Reflects(?Cl,
13563
paulson
parents: 13505
diff changeset
   349
               \<lambda>x. \<exists>y. M(y) & y = Replace(x,P),
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   350
               \<lambda>a x. \<exists>y\<in>Mset(a). y = Replace(x,P))";
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   351
by fast
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   352
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   353
text{*Example 4: Axiom of Choice.  Possibly wrong, since @{text \<Pi>} needs
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   354
to be relativized.*}
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   355
lemma (in reflection) 
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   356
     "Reflects(?Cl,
14171
0cab06e3bbd0 Extended the notion of letter and digit, such that now one may use greek,
skalberg
parents: 13634
diff changeset
   357
               \<lambda>A. 0\<notin>A --> (\<exists>f. M(f) & f \<in> (\<Pi> X \<in> A. X)),
0cab06e3bbd0 Extended the notion of letter and digit, such that now one may use greek,
skalberg
parents: 13634
diff changeset
   358
               \<lambda>a A. 0\<notin>A --> (\<exists>f\<in>Mset(a). f \<in> (\<Pi> X \<in> A. X)))"
13223
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   359
by fast
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   360
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   361
end
45be08fbdcff new theory of inner models
paulson
parents:
diff changeset
   362