author | haftmann |
Fri, 17 Jun 2005 16:12:49 +0200 | |
changeset 16417 | 9bc16273c2d4 |
parent 13702 | c7cf8fa66534 |
child 21233 | 5a5c8ea5f66a |
permissions | -rw-r--r-- |
13505 | 1 |
(* Title: ZF/Constructible/Relative.thy |
2 |
ID: $Id$ |
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
|
4 |
*) |
|
5 |
||
13223 | 6 |
header {*Relativization and Absoluteness*} |
7 |
||
16417 | 8 |
theory Relative imports Main begin |
13223 | 9 |
|
10 |
subsection{* Relativized versions of standard set-theoretic concepts *} |
|
11 |
||
12 |
constdefs |
|
13 |
empty :: "[i=>o,i] => o" |
|
13254 | 14 |
"empty(M,z) == \<forall>x[M]. x \<notin> z" |
13223 | 15 |
|
16 |
subset :: "[i=>o,i,i] => o" |
|
13298 | 17 |
"subset(M,A,B) == \<forall>x[M]. x\<in>A --> x \<in> B" |
13223 | 18 |
|
19 |
upair :: "[i=>o,i,i,i] => o" |
|
13298 | 20 |
"upair(M,a,b,z) == a \<in> z & b \<in> z & (\<forall>x[M]. x\<in>z --> x = a | x = b)" |
13223 | 21 |
|
22 |
pair :: "[i=>o,i,i,i] => o" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
23 |
"pair(M,a,b,z) == \<exists>x[M]. upair(M,a,a,x) & |
13254 | 24 |
(\<exists>y[M]. upair(M,a,b,y) & upair(M,x,y,z))" |
13223 | 25 |
|
13306 | 26 |
|
13245 | 27 |
union :: "[i=>o,i,i,i] => o" |
13254 | 28 |
"union(M,a,b,z) == \<forall>x[M]. x \<in> z <-> x \<in> a | x \<in> b" |
13245 | 29 |
|
13306 | 30 |
is_cons :: "[i=>o,i,i,i] => o" |
31 |
"is_cons(M,a,b,z) == \<exists>x[M]. upair(M,a,a,x) & union(M,x,b,z)" |
|
32 |
||
13223 | 33 |
successor :: "[i=>o,i,i] => o" |
13306 | 34 |
"successor(M,a,z) == is_cons(M,a,a,z)" |
13223 | 35 |
|
13363 | 36 |
number1 :: "[i=>o,i] => o" |
13436 | 37 |
"number1(M,a) == \<exists>x[M]. empty(M,x) & successor(M,x,a)" |
13363 | 38 |
|
39 |
number2 :: "[i=>o,i] => o" |
|
13436 | 40 |
"number2(M,a) == \<exists>x[M]. number1(M,x) & successor(M,x,a)" |
13363 | 41 |
|
42 |
number3 :: "[i=>o,i] => o" |
|
13436 | 43 |
"number3(M,a) == \<exists>x[M]. number2(M,x) & successor(M,x,a)" |
13363 | 44 |
|
13223 | 45 |
powerset :: "[i=>o,i,i] => o" |
13254 | 46 |
"powerset(M,A,z) == \<forall>x[M]. x \<in> z <-> subset(M,x,A)" |
13223 | 47 |
|
13436 | 48 |
is_Collect :: "[i=>o,i,i=>o,i] => o" |
49 |
"is_Collect(M,A,P,z) == \<forall>x[M]. x \<in> z <-> x \<in> A & P(x)" |
|
50 |
||
13505 | 51 |
is_Replace :: "[i=>o,i,[i,i]=>o,i] => o" |
52 |
"is_Replace(M,A,P,z) == \<forall>u[M]. u \<in> z <-> (\<exists>x[M]. x\<in>A & P(x,u))" |
|
53 |
||
13223 | 54 |
inter :: "[i=>o,i,i,i] => o" |
13254 | 55 |
"inter(M,a,b,z) == \<forall>x[M]. x \<in> z <-> x \<in> a & x \<in> b" |
13223 | 56 |
|
57 |
setdiff :: "[i=>o,i,i,i] => o" |
|
13254 | 58 |
"setdiff(M,a,b,z) == \<forall>x[M]. x \<in> z <-> x \<in> a & x \<notin> b" |
13223 | 59 |
|
60 |
big_union :: "[i=>o,i,i] => o" |
|
13298 | 61 |
"big_union(M,A,z) == \<forall>x[M]. x \<in> z <-> (\<exists>y[M]. y\<in>A & x \<in> y)" |
13223 | 62 |
|
63 |
big_inter :: "[i=>o,i,i] => o" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
64 |
"big_inter(M,A,z) == |
13223 | 65 |
(A=0 --> z=0) & |
13298 | 66 |
(A\<noteq>0 --> (\<forall>x[M]. x \<in> z <-> (\<forall>y[M]. y\<in>A --> x \<in> y)))" |
13223 | 67 |
|
68 |
cartprod :: "[i=>o,i,i,i] => o" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
69 |
"cartprod(M,A,B,z) == |
13298 | 70 |
\<forall>u[M]. u \<in> z <-> (\<exists>x[M]. x\<in>A & (\<exists>y[M]. y\<in>B & pair(M,x,y,u)))" |
13223 | 71 |
|
13350 | 72 |
is_sum :: "[i=>o,i,i,i] => o" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
73 |
"is_sum(M,A,B,Z) == |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
74 |
\<exists>A0[M]. \<exists>n1[M]. \<exists>s1[M]. \<exists>B1[M]. |
13350 | 75 |
number1(M,n1) & cartprod(M,n1,A,A0) & upair(M,n1,n1,s1) & |
76 |
cartprod(M,s1,B,B1) & union(M,A0,B1,Z)" |
|
77 |
||
13397 | 78 |
is_Inl :: "[i=>o,i,i] => o" |
79 |
"is_Inl(M,a,z) == \<exists>zero[M]. empty(M,zero) & pair(M,zero,a,z)" |
|
80 |
||
81 |
is_Inr :: "[i=>o,i,i] => o" |
|
82 |
"is_Inr(M,a,z) == \<exists>n1[M]. number1(M,n1) & pair(M,n1,a,z)" |
|
83 |
||
13223 | 84 |
is_converse :: "[i=>o,i,i] => o" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
85 |
"is_converse(M,r,z) == |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
86 |
\<forall>x[M]. x \<in> z <-> |
13299 | 87 |
(\<exists>w[M]. w\<in>r & (\<exists>u[M]. \<exists>v[M]. pair(M,u,v,w) & pair(M,v,u,x)))" |
13223 | 88 |
|
89 |
pre_image :: "[i=>o,i,i,i] => o" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
90 |
"pre_image(M,r,A,z) == |
13299 | 91 |
\<forall>x[M]. x \<in> z <-> (\<exists>w[M]. w\<in>r & (\<exists>y[M]. y\<in>A & pair(M,x,y,w)))" |
13223 | 92 |
|
93 |
is_domain :: "[i=>o,i,i] => o" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
94 |
"is_domain(M,r,z) == |
13436 | 95 |
\<forall>x[M]. x \<in> z <-> (\<exists>w[M]. w\<in>r & (\<exists>y[M]. pair(M,x,y,w)))" |
13223 | 96 |
|
97 |
image :: "[i=>o,i,i,i] => o" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
98 |
"image(M,r,A,z) == |
13436 | 99 |
\<forall>y[M]. y \<in> z <-> (\<exists>w[M]. w\<in>r & (\<exists>x[M]. x\<in>A & pair(M,x,y,w)))" |
13223 | 100 |
|
101 |
is_range :: "[i=>o,i,i] => o" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
102 |
--{*the cleaner |
13299 | 103 |
@{term "\<exists>r'[M]. is_converse(M,r,r') & is_domain(M,r',z)"} |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
104 |
unfortunately needs an instance of separation in order to prove |
13223 | 105 |
@{term "M(converse(r))"}.*} |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
106 |
"is_range(M,r,z) == |
13436 | 107 |
\<forall>y[M]. y \<in> z <-> (\<exists>w[M]. w\<in>r & (\<exists>x[M]. pair(M,x,y,w)))" |
13223 | 108 |
|
13245 | 109 |
is_field :: "[i=>o,i,i] => o" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
110 |
"is_field(M,r,z) == |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
111 |
\<exists>dr[M]. \<exists>rr[M]. is_domain(M,r,dr) & is_range(M,r,rr) & |
13436 | 112 |
union(M,dr,rr,z)" |
13245 | 113 |
|
13223 | 114 |
is_relation :: "[i=>o,i] => o" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
115 |
"is_relation(M,r) == |
13298 | 116 |
(\<forall>z[M]. z\<in>r --> (\<exists>x[M]. \<exists>y[M]. pair(M,x,y,z)))" |
13223 | 117 |
|
118 |
is_function :: "[i=>o,i] => o" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
119 |
"is_function(M,r) == |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
120 |
\<forall>x[M]. \<forall>y[M]. \<forall>y'[M]. \<forall>p[M]. \<forall>p'[M]. |
13299 | 121 |
pair(M,x,y,p) --> pair(M,x,y',p') --> p\<in>r --> p'\<in>r --> y=y'" |
13223 | 122 |
|
123 |
fun_apply :: "[i=>o,i,i,i] => o" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
124 |
"fun_apply(M,f,x,y) == |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
125 |
(\<exists>xs[M]. \<exists>fxs[M]. |
13352 | 126 |
upair(M,x,x,xs) & image(M,f,xs,fxs) & big_union(M,fxs,y))" |
13223 | 127 |
|
128 |
typed_function :: "[i=>o,i,i,i] => o" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
129 |
"typed_function(M,A,B,r) == |
13223 | 130 |
is_function(M,r) & is_relation(M,r) & is_domain(M,r,A) & |
13306 | 131 |
(\<forall>u[M]. u\<in>r --> (\<forall>x[M]. \<forall>y[M]. pair(M,x,y,u) --> y\<in>B))" |
13223 | 132 |
|
13268 | 133 |
is_funspace :: "[i=>o,i,i,i] => o" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
134 |
"is_funspace(M,A,B,F) == |
13268 | 135 |
\<forall>f[M]. f \<in> F <-> typed_function(M,A,B,f)" |
136 |
||
13245 | 137 |
composition :: "[i=>o,i,i,i] => o" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
138 |
"composition(M,r,s,t) == |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
139 |
\<forall>p[M]. p \<in> t <-> |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
140 |
(\<exists>x[M]. \<exists>y[M]. \<exists>z[M]. \<exists>xy[M]. \<exists>yz[M]. |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
141 |
pair(M,x,z,p) & pair(M,x,y,xy) & pair(M,y,z,yz) & |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13319
diff
changeset
|
142 |
xy \<in> s & yz \<in> r)" |
13245 | 143 |
|
13223 | 144 |
injection :: "[i=>o,i,i,i] => o" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
145 |
"injection(M,A,B,f) == |
13223 | 146 |
typed_function(M,A,B,f) & |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
147 |
(\<forall>x[M]. \<forall>x'[M]. \<forall>y[M]. \<forall>p[M]. \<forall>p'[M]. |
13306 | 148 |
pair(M,x,y,p) --> pair(M,x',y,p') --> p\<in>f --> p'\<in>f --> x=x')" |
13223 | 149 |
|
150 |
surjection :: "[i=>o,i,i,i] => o" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
151 |
"surjection(M,A,B,f) == |
13223 | 152 |
typed_function(M,A,B,f) & |
13299 | 153 |
(\<forall>y[M]. y\<in>B --> (\<exists>x[M]. x\<in>A & fun_apply(M,f,x,y)))" |
13223 | 154 |
|
155 |
bijection :: "[i=>o,i,i,i] => o" |
|
156 |
"bijection(M,A,B,f) == injection(M,A,B,f) & surjection(M,A,B,f)" |
|
157 |
||
158 |
restriction :: "[i=>o,i,i,i] => o" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
159 |
"restriction(M,r,A,z) == |
13306 | 160 |
\<forall>x[M]. x \<in> z <-> (x \<in> r & (\<exists>u[M]. u\<in>A & (\<exists>v[M]. pair(M,u,v,x))))" |
13223 | 161 |
|
162 |
transitive_set :: "[i=>o,i] => o" |
|
13299 | 163 |
"transitive_set(M,a) == \<forall>x[M]. x\<in>a --> subset(M,x,a)" |
13223 | 164 |
|
165 |
ordinal :: "[i=>o,i] => o" |
|
166 |
--{*an ordinal is a transitive set of transitive sets*} |
|
13299 | 167 |
"ordinal(M,a) == transitive_set(M,a) & (\<forall>x[M]. x\<in>a --> transitive_set(M,x))" |
13223 | 168 |
|
169 |
limit_ordinal :: "[i=>o,i] => o" |
|
170 |
--{*a limit ordinal is a non-empty, successor-closed ordinal*} |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
171 |
"limit_ordinal(M,a) == |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
172 |
ordinal(M,a) & ~ empty(M,a) & |
13299 | 173 |
(\<forall>x[M]. x\<in>a --> (\<exists>y[M]. y\<in>a & successor(M,x,y)))" |
13223 | 174 |
|
175 |
successor_ordinal :: "[i=>o,i] => o" |
|
176 |
--{*a successor ordinal is any ordinal that is neither empty nor limit*} |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
177 |
"successor_ordinal(M,a) == |
13223 | 178 |
ordinal(M,a) & ~ empty(M,a) & ~ limit_ordinal(M,a)" |
179 |
||
180 |
finite_ordinal :: "[i=>o,i] => o" |
|
181 |
--{*an ordinal is finite if neither it nor any of its elements are limit*} |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
182 |
"finite_ordinal(M,a) == |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
183 |
ordinal(M,a) & ~ limit_ordinal(M,a) & |
13299 | 184 |
(\<forall>x[M]. x\<in>a --> ~ limit_ordinal(M,x))" |
13223 | 185 |
|
186 |
omega :: "[i=>o,i] => o" |
|
187 |
--{*omega is a limit ordinal none of whose elements are limit*} |
|
13299 | 188 |
"omega(M,a) == limit_ordinal(M,a) & (\<forall>x[M]. x\<in>a --> ~ limit_ordinal(M,x))" |
13223 | 189 |
|
13350 | 190 |
is_quasinat :: "[i=>o,i] => o" |
191 |
"is_quasinat(M,z) == empty(M,z) | (\<exists>m[M]. successor(M,m,z))" |
|
192 |
||
193 |
is_nat_case :: "[i=>o, i, [i,i]=>o, i, i] => o" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
194 |
"is_nat_case(M, a, is_b, k, z) == |
13350 | 195 |
(empty(M,k) --> z=a) & |
196 |
(\<forall>m[M]. successor(M,m,k) --> is_b(m,z)) & |
|
13363 | 197 |
(is_quasinat(M,k) | empty(M,z))" |
13350 | 198 |
|
13634 | 199 |
relation1 :: "[i=>o, [i,i]=>o, i=>i] => o" |
200 |
"relation1(M,is_f,f) == \<forall>x[M]. \<forall>y[M]. is_f(x,y) <-> y = f(x)" |
|
13353 | 201 |
|
13634 | 202 |
Relation1 :: "[i=>o, i, [i,i]=>o, i=>i] => o" |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
203 |
--{*as above, but typed*} |
13634 | 204 |
"Relation1(M,A,is_f,f) == |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
205 |
\<forall>x[M]. \<forall>y[M]. x\<in>A --> is_f(x,y) <-> y = f(x)" |
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
206 |
|
13634 | 207 |
relation2 :: "[i=>o, [i,i,i]=>o, [i,i]=>i] => o" |
208 |
"relation2(M,is_f,f) == \<forall>x[M]. \<forall>y[M]. \<forall>z[M]. is_f(x,y,z) <-> z = f(x,y)" |
|
13353 | 209 |
|
13634 | 210 |
Relation2 :: "[i=>o, i, i, [i,i,i]=>o, [i,i]=>i] => o" |
211 |
"Relation2(M,A,B,is_f,f) == |
|
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
212 |
\<forall>x[M]. \<forall>y[M]. \<forall>z[M]. x\<in>A --> y\<in>B --> is_f(x,y,z) <-> z = f(x,y)" |
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
213 |
|
13634 | 214 |
relation3 :: "[i=>o, [i,i,i,i]=>o, [i,i,i]=>i] => o" |
215 |
"relation3(M,is_f,f) == |
|
13353 | 216 |
\<forall>x[M]. \<forall>y[M]. \<forall>z[M]. \<forall>u[M]. is_f(x,y,z,u) <-> u = f(x,y,z)" |
217 |
||
13634 | 218 |
Relation3 :: "[i=>o, i, i, i, [i,i,i,i]=>o, [i,i,i]=>i] => o" |
219 |
"Relation3(M,A,B,C,is_f,f) == |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
220 |
\<forall>x[M]. \<forall>y[M]. \<forall>z[M]. \<forall>u[M]. |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
221 |
x\<in>A --> y\<in>B --> z\<in>C --> is_f(x,y,z,u) <-> u = f(x,y,z)" |
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
222 |
|
13634 | 223 |
relation4 :: "[i=>o, [i,i,i,i,i]=>o, [i,i,i,i]=>i] => o" |
224 |
"relation4(M,is_f,f) == |
|
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
225 |
\<forall>u[M]. \<forall>x[M]. \<forall>y[M]. \<forall>z[M]. \<forall>a[M]. is_f(u,x,y,z,a) <-> a = f(u,x,y,z)" |
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
226 |
|
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
227 |
|
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
228 |
text{*Useful when absoluteness reasoning has replaced the predicates by terms*} |
13634 | 229 |
lemma triv_Relation1: |
230 |
"Relation1(M, A, \<lambda>x y. y = f(x), f)" |
|
231 |
by (simp add: Relation1_def) |
|
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
232 |
|
13634 | 233 |
lemma triv_Relation2: |
234 |
"Relation2(M, A, B, \<lambda>x y a. a = f(x,y), f)" |
|
235 |
by (simp add: Relation2_def) |
|
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
236 |
|
13223 | 237 |
|
238 |
subsection {*The relativized ZF axioms*} |
|
239 |
constdefs |
|
240 |
||
241 |
extensionality :: "(i=>o) => o" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
242 |
"extensionality(M) == |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
243 |
\<forall>x[M]. \<forall>y[M]. (\<forall>z[M]. z \<in> x <-> z \<in> y) --> x=y" |
13223 | 244 |
|
245 |
separation :: "[i=>o, i=>o] => o" |
|
13563 | 246 |
--{*The formula @{text P} should only involve parameters |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
247 |
belonging to @{text M} and all its quantifiers must be relativized |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
248 |
to @{text M}. We do not have separation as a scheme; every instance |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
249 |
that we need must be assumed (and later proved) separately.*} |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
250 |
"separation(M,P) == |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
251 |
\<forall>z[M]. \<exists>y[M]. \<forall>x[M]. x \<in> y <-> x \<in> z & P(x)" |
13223 | 252 |
|
253 |
upair_ax :: "(i=>o) => o" |
|
13563 | 254 |
"upair_ax(M) == \<forall>x[M]. \<forall>y[M]. \<exists>z[M]. upair(M,x,y,z)" |
13223 | 255 |
|
256 |
Union_ax :: "(i=>o) => o" |
|
13514 | 257 |
"Union_ax(M) == \<forall>x[M]. \<exists>z[M]. big_union(M,x,z)" |
13223 | 258 |
|
259 |
power_ax :: "(i=>o) => o" |
|
13514 | 260 |
"power_ax(M) == \<forall>x[M]. \<exists>z[M]. powerset(M,x,z)" |
13223 | 261 |
|
262 |
univalent :: "[i=>o, i, [i,i]=>o] => o" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
263 |
"univalent(M,A,P) == |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
264 |
\<forall>x[M]. x\<in>A --> (\<forall>y[M]. \<forall>z[M]. P(x,y) & P(x,z) --> y=z)" |
13223 | 265 |
|
266 |
replacement :: "[i=>o, [i,i]=>o] => o" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
267 |
"replacement(M,P) == |
13299 | 268 |
\<forall>A[M]. univalent(M,A,P) --> |
13514 | 269 |
(\<exists>Y[M]. \<forall>b[M]. (\<exists>x[M]. x\<in>A & P(x,b)) --> b \<in> Y)" |
13223 | 270 |
|
271 |
strong_replacement :: "[i=>o, [i,i]=>o] => o" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
272 |
"strong_replacement(M,P) == |
13299 | 273 |
\<forall>A[M]. univalent(M,A,P) --> |
13514 | 274 |
(\<exists>Y[M]. \<forall>b[M]. b \<in> Y <-> (\<exists>x[M]. x\<in>A & P(x,b)))" |
13223 | 275 |
|
276 |
foundation_ax :: "(i=>o) => o" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
277 |
"foundation_ax(M) == |
13563 | 278 |
\<forall>x[M]. (\<exists>y[M]. y\<in>x) --> (\<exists>y[M]. y\<in>x & ~(\<exists>z[M]. z\<in>x & z \<in> y))" |
13223 | 279 |
|
280 |
||
281 |
subsection{*A trivial consistency proof for $V_\omega$ *} |
|
282 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
283 |
text{*We prove that $V_\omega$ |
13223 | 284 |
(or @{text univ} in Isabelle) satisfies some ZF axioms. |
285 |
Kunen, Theorem IV 3.13, page 123.*} |
|
286 |
||
287 |
lemma univ0_downwards_mem: "[| y \<in> x; x \<in> univ(0) |] ==> y \<in> univ(0)" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
288 |
apply (insert Transset_univ [OF Transset_0]) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
289 |
apply (simp add: Transset_def, blast) |
13223 | 290 |
done |
291 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
292 |
lemma univ0_Ball_abs [simp]: |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
293 |
"A \<in> univ(0) ==> (\<forall>x\<in>A. x \<in> univ(0) --> P(x)) <-> (\<forall>x\<in>A. P(x))" |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
294 |
by (blast intro: univ0_downwards_mem) |
13223 | 295 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
296 |
lemma univ0_Bex_abs [simp]: |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
297 |
"A \<in> univ(0) ==> (\<exists>x\<in>A. x \<in> univ(0) & P(x)) <-> (\<exists>x\<in>A. P(x))" |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
298 |
by (blast intro: univ0_downwards_mem) |
13223 | 299 |
|
300 |
text{*Congruence rule for separation: can assume the variable is in @{text M}*} |
|
13254 | 301 |
lemma separation_cong [cong]: |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
302 |
"(!!x. M(x) ==> P(x) <-> P'(x)) |
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
303 |
==> separation(M, %x. P(x)) <-> separation(M, %x. P'(x))" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
304 |
by (simp add: separation_def) |
13223 | 305 |
|
13254 | 306 |
lemma univalent_cong [cong]: |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
307 |
"[| A=A'; !!x y. [| x\<in>A; M(x); M(y) |] ==> P(x,y) <-> P'(x,y) |] |
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
308 |
==> univalent(M, A, %x y. P(x,y)) <-> univalent(M, A', %x y. P'(x,y))" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
309 |
by (simp add: univalent_def) |
13223 | 310 |
|
13505 | 311 |
lemma univalent_triv [intro,simp]: |
312 |
"univalent(M, A, \<lambda>x y. y = f(x))" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
313 |
by (simp add: univalent_def) |
13505 | 314 |
|
315 |
lemma univalent_conjI2 [intro,simp]: |
|
316 |
"univalent(M,A,Q) ==> univalent(M, A, \<lambda>x y. P(x,y) & Q(x,y))" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
317 |
by (simp add: univalent_def, blast) |
13505 | 318 |
|
319 |
text{*Congruence rule for replacement*} |
|
13254 | 320 |
lemma strong_replacement_cong [cong]: |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
321 |
"[| !!x y. [| M(x); M(y) |] ==> P(x,y) <-> P'(x,y) |] |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
322 |
==> strong_replacement(M, %x y. P(x,y)) <-> |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
323 |
strong_replacement(M, %x y. P'(x,y))" |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
324 |
by (simp add: strong_replacement_def) |
13223 | 325 |
|
326 |
text{*The extensionality axiom*} |
|
327 |
lemma "extensionality(\<lambda>x. x \<in> univ(0))" |
|
328 |
apply (simp add: extensionality_def) |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
329 |
apply (blast intro: univ0_downwards_mem) |
13223 | 330 |
done |
331 |
||
332 |
text{*The separation axiom requires some lemmas*} |
|
333 |
lemma Collect_in_Vfrom: |
|
334 |
"[| X \<in> Vfrom(A,j); Transset(A) |] ==> Collect(X,P) \<in> Vfrom(A, succ(j))" |
|
335 |
apply (drule Transset_Vfrom) |
|
336 |
apply (rule subset_mem_Vfrom) |
|
337 |
apply (unfold Transset_def, blast) |
|
338 |
done |
|
339 |
||
340 |
lemma Collect_in_VLimit: |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
341 |
"[| X \<in> Vfrom(A,i); Limit(i); Transset(A) |] |
13223 | 342 |
==> Collect(X,P) \<in> Vfrom(A,i)" |
343 |
apply (rule Limit_VfromE, assumption+) |
|
344 |
apply (blast intro: Limit_has_succ VfromI Collect_in_Vfrom) |
|
345 |
done |
|
346 |
||
347 |
lemma Collect_in_univ: |
|
348 |
"[| X \<in> univ(A); Transset(A) |] ==> Collect(X,P) \<in> univ(A)" |
|
349 |
by (simp add: univ_def Collect_in_VLimit Limit_nat) |
|
350 |
||
351 |
lemma "separation(\<lambda>x. x \<in> univ(0), P)" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
352 |
apply (simp add: separation_def, clarify) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
353 |
apply (rule_tac x = "Collect(z,P)" in bexI) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
354 |
apply (blast intro: Collect_in_univ Transset_0)+ |
13223 | 355 |
done |
356 |
||
357 |
text{*Unordered pairing axiom*} |
|
358 |
lemma "upair_ax(\<lambda>x. x \<in> univ(0))" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
359 |
apply (simp add: upair_ax_def upair_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
360 |
apply (blast intro: doubleton_in_univ) |
13223 | 361 |
done |
362 |
||
363 |
text{*Union axiom*} |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
364 |
lemma "Union_ax(\<lambda>x. x \<in> univ(0))" |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
365 |
apply (simp add: Union_ax_def big_union_def, clarify) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
366 |
apply (rule_tac x="\<Union>x" in bexI) |
13299 | 367 |
apply (blast intro: univ0_downwards_mem) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
368 |
apply (blast intro: Union_in_univ Transset_0) |
13223 | 369 |
done |
370 |
||
371 |
text{*Powerset axiom*} |
|
372 |
||
373 |
lemma Pow_in_univ: |
|
374 |
"[| X \<in> univ(A); Transset(A) |] ==> Pow(X) \<in> univ(A)" |
|
375 |
apply (simp add: univ_def Pow_in_VLimit Limit_nat) |
|
376 |
done |
|
377 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
378 |
lemma "power_ax(\<lambda>x. x \<in> univ(0))" |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
379 |
apply (simp add: power_ax_def powerset_def subset_def, clarify) |
13299 | 380 |
apply (rule_tac x="Pow(x)" in bexI) |
381 |
apply (blast intro: univ0_downwards_mem) |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
382 |
apply (blast intro: Pow_in_univ Transset_0) |
13223 | 383 |
done |
384 |
||
385 |
text{*Foundation axiom*} |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
386 |
lemma "foundation_ax(\<lambda>x. x \<in> univ(0))" |
13223 | 387 |
apply (simp add: foundation_ax_def, clarify) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
388 |
apply (cut_tac A=x in foundation) |
13299 | 389 |
apply (blast intro: univ0_downwards_mem) |
13223 | 390 |
done |
391 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
392 |
lemma "replacement(\<lambda>x. x \<in> univ(0), P)" |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
393 |
apply (simp add: replacement_def, clarify) |
13223 | 394 |
oops |
395 |
text{*no idea: maybe prove by induction on the rank of A?*} |
|
396 |
||
397 |
text{*Still missing: Replacement, Choice*} |
|
398 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
399 |
subsection{*Lemmas Needed to Reduce Some Set Constructions to Instances |
13223 | 400 |
of Separation*} |
401 |
||
402 |
lemma image_iff_Collect: "r `` A = {y \<in> Union(Union(r)). \<exists>p\<in>r. \<exists>x\<in>A. p=<x,y>}" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
403 |
apply (rule equalityI, auto) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
404 |
apply (simp add: Pair_def, blast) |
13223 | 405 |
done |
406 |
||
407 |
lemma vimage_iff_Collect: |
|
408 |
"r -`` A = {x \<in> Union(Union(r)). \<exists>p\<in>r. \<exists>y\<in>A. p=<x,y>}" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
409 |
apply (rule equalityI, auto) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
410 |
apply (simp add: Pair_def, blast) |
13223 | 411 |
done |
412 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
413 |
text{*These two lemmas lets us prove @{text domain_closed} and |
13223 | 414 |
@{text range_closed} without new instances of separation*} |
415 |
||
416 |
lemma domain_eq_vimage: "domain(r) = r -`` Union(Union(r))" |
|
417 |
apply (rule equalityI, auto) |
|
418 |
apply (rule vimageI, assumption) |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
419 |
apply (simp add: Pair_def, blast) |
13223 | 420 |
done |
421 |
||
422 |
lemma range_eq_image: "range(r) = r `` Union(Union(r))" |
|
423 |
apply (rule equalityI, auto) |
|
424 |
apply (rule imageI, assumption) |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
425 |
apply (simp add: Pair_def, blast) |
13223 | 426 |
done |
427 |
||
428 |
lemma replacementD: |
|
429 |
"[| replacement(M,P); M(A); univalent(M,A,P) |] |
|
13299 | 430 |
==> \<exists>Y[M]. (\<forall>b[M]. ((\<exists>x[M]. x\<in>A & P(x,b)) --> b \<in> Y))" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
431 |
by (simp add: replacement_def) |
13223 | 432 |
|
433 |
lemma strong_replacementD: |
|
434 |
"[| strong_replacement(M,P); M(A); univalent(M,A,P) |] |
|
13299 | 435 |
==> \<exists>Y[M]. (\<forall>b[M]. (b \<in> Y <-> (\<exists>x[M]. x\<in>A & P(x,b))))" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
436 |
by (simp add: strong_replacement_def) |
13223 | 437 |
|
438 |
lemma separationD: |
|
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
439 |
"[| separation(M,P); M(z) |] ==> \<exists>y[M]. \<forall>x[M]. x \<in> y <-> x \<in> z & P(x)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
440 |
by (simp add: separation_def) |
13223 | 441 |
|
442 |
||
443 |
text{*More constants, for order types*} |
|
444 |
constdefs |
|
445 |
||
446 |
order_isomorphism :: "[i=>o,i,i,i,i,i] => o" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
447 |
"order_isomorphism(M,A,r,B,s,f) == |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
448 |
bijection(M,A,B,f) & |
13306 | 449 |
(\<forall>x[M]. x\<in>A --> (\<forall>y[M]. y\<in>A --> |
450 |
(\<forall>p[M]. \<forall>fx[M]. \<forall>fy[M]. \<forall>q[M]. |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
451 |
pair(M,x,y,p) --> fun_apply(M,f,x,fx) --> fun_apply(M,f,y,fy) --> |
13306 | 452 |
pair(M,fx,fy,q) --> (p\<in>r <-> q\<in>s))))" |
13223 | 453 |
|
454 |
pred_set :: "[i=>o,i,i,i,i] => o" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
455 |
"pred_set(M,A,x,r,B) == |
13299 | 456 |
\<forall>y[M]. y \<in> B <-> (\<exists>p[M]. p\<in>r & y \<in> A & pair(M,y,x,p))" |
13223 | 457 |
|
458 |
membership :: "[i=>o,i,i] => o" --{*membership relation*} |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
459 |
"membership(M,A,r) == |
13306 | 460 |
\<forall>p[M]. p \<in> r <-> (\<exists>x[M]. x\<in>A & (\<exists>y[M]. y\<in>A & x\<in>y & pair(M,x,y,p)))" |
13223 | 461 |
|
462 |
||
13418
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
463 |
subsection{*Introducing a Transitive Class Model*} |
13223 | 464 |
|
465 |
text{*The class M is assumed to be transitive and to satisfy some |
|
466 |
relativized ZF axioms*} |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
467 |
locale M_trivial = |
13223 | 468 |
fixes M |
469 |
assumes transM: "[| y\<in>x; M(x) |] ==> M(y)" |
|
470 |
and upair_ax: "upair_ax(M)" |
|
471 |
and Union_ax: "Union_ax(M)" |
|
472 |
and power_ax: "power_ax(M)" |
|
473 |
and replacement: "replacement(M,P)" |
|
13268 | 474 |
and M_nat [iff]: "M(nat)" (*i.e. the axiom of infinity*) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
475 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
476 |
|
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
477 |
text{*Automatically discovers the proof using @{text transM}, @{text nat_0I} |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
478 |
and @{text M_nat}.*} |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
479 |
lemma (in M_trivial) nonempty [simp]: "M(0)" |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
480 |
by (blast intro: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
481 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
482 |
lemma (in M_trivial) rall_abs [simp]: |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
483 |
"M(A) ==> (\<forall>x[M]. x\<in>A --> P(x)) <-> (\<forall>x\<in>A. P(x))" |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
484 |
by (blast intro: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
485 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
486 |
lemma (in M_trivial) rex_abs [simp]: |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
487 |
"M(A) ==> (\<exists>x[M]. x\<in>A & P(x)) <-> (\<exists>x\<in>A. P(x))" |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
488 |
by (blast intro: transM) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
489 |
|
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
490 |
lemma (in M_trivial) ball_iff_equiv: |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
491 |
"M(A) ==> (\<forall>x[M]. (x\<in>A <-> P(x))) <-> |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
492 |
(\<forall>x\<in>A. P(x)) & (\<forall>x. P(x) --> M(x) --> x\<in>A)" |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
493 |
by (blast intro: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
494 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
495 |
text{*Simplifies proofs of equalities when there's an iff-equality |
13702 | 496 |
available for rewriting, universally quantified over M. |
497 |
But it's not the only way to prove such equalities: its |
|
498 |
premises @{term "M(A)"} and @{term "M(B)"} can be too strong.*} |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
499 |
lemma (in M_trivial) M_equalityI: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
500 |
"[| !!x. M(x) ==> x\<in>A <-> x\<in>B; M(A); M(B) |] ==> A=B" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
501 |
by (blast intro!: equalityI dest: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
502 |
|
13418
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
503 |
|
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
504 |
subsubsection{*Trivial Absoluteness Proofs: Empty Set, Pairs, etc.*} |
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
505 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
506 |
lemma (in M_trivial) empty_abs [simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
507 |
"M(z) ==> empty(M,z) <-> z=0" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
508 |
apply (simp add: empty_def) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
509 |
apply (blast intro: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
510 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
511 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
512 |
lemma (in M_trivial) subset_abs [simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
513 |
"M(A) ==> subset(M,A,B) <-> A \<subseteq> B" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
514 |
apply (simp add: subset_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
515 |
apply (blast intro: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
516 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
517 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
518 |
lemma (in M_trivial) upair_abs [simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
519 |
"M(z) ==> upair(M,a,b,z) <-> z={a,b}" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
520 |
apply (simp add: upair_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
521 |
apply (blast intro: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
522 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
523 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
524 |
lemma (in M_trivial) upair_in_M_iff [iff]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
525 |
"M({a,b}) <-> M(a) & M(b)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
526 |
apply (insert upair_ax, simp add: upair_ax_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
527 |
apply (blast intro: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
528 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
529 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
530 |
lemma (in M_trivial) singleton_in_M_iff [iff]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
531 |
"M({a}) <-> M(a)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
532 |
by (insert upair_in_M_iff [of a a], simp) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
533 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
534 |
lemma (in M_trivial) pair_abs [simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
535 |
"M(z) ==> pair(M,a,b,z) <-> z=<a,b>" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
536 |
apply (simp add: pair_def ZF.Pair_def) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
537 |
apply (blast intro: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
538 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
539 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
540 |
lemma (in M_trivial) pair_in_M_iff [iff]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
541 |
"M(<a,b>) <-> M(a) & M(b)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
542 |
by (simp add: ZF.Pair_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
543 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
544 |
lemma (in M_trivial) pair_components_in_M: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
545 |
"[| <x,y> \<in> A; M(A) |] ==> M(x) & M(y)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
546 |
apply (simp add: Pair_def) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
547 |
apply (blast dest: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
548 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
549 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
550 |
lemma (in M_trivial) cartprod_abs [simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
551 |
"[| M(A); M(B); M(z) |] ==> cartprod(M,A,B,z) <-> z = A*B" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
552 |
apply (simp add: cartprod_def) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
553 |
apply (rule iffI) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
554 |
apply (blast intro!: equalityI intro: transM dest!: rspec) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
555 |
apply (blast dest: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
556 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
557 |
|
13418
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
558 |
subsubsection{*Absoluteness for Unions and Intersections*} |
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
559 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
560 |
lemma (in M_trivial) union_abs [simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
561 |
"[| M(a); M(b); M(z) |] ==> union(M,a,b,z) <-> z = a Un b" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
562 |
apply (simp add: union_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
563 |
apply (blast intro: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
564 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
565 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
566 |
lemma (in M_trivial) inter_abs [simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
567 |
"[| M(a); M(b); M(z) |] ==> inter(M,a,b,z) <-> z = a Int b" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
568 |
apply (simp add: inter_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
569 |
apply (blast intro: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
570 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
571 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
572 |
lemma (in M_trivial) setdiff_abs [simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
573 |
"[| M(a); M(b); M(z) |] ==> setdiff(M,a,b,z) <-> z = a-b" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
574 |
apply (simp add: setdiff_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
575 |
apply (blast intro: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
576 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
577 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
578 |
lemma (in M_trivial) Union_abs [simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
579 |
"[| M(A); M(z) |] ==> big_union(M,A,z) <-> z = Union(A)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
580 |
apply (simp add: big_union_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
581 |
apply (blast intro!: equalityI dest: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
582 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
583 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
584 |
lemma (in M_trivial) Union_closed [intro,simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
585 |
"M(A) ==> M(Union(A))" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
586 |
by (insert Union_ax, simp add: Union_ax_def) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
587 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
588 |
lemma (in M_trivial) Un_closed [intro,simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
589 |
"[| M(A); M(B) |] ==> M(A Un B)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
590 |
by (simp only: Un_eq_Union, blast) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
591 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
592 |
lemma (in M_trivial) cons_closed [intro,simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
593 |
"[| M(a); M(A) |] ==> M(cons(a,A))" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
594 |
by (subst cons_eq [symmetric], blast) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
595 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
596 |
lemma (in M_trivial) cons_abs [simp]: |
13306 | 597 |
"[| M(b); M(z) |] ==> is_cons(M,a,b,z) <-> z = cons(a,b)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
598 |
by (simp add: is_cons_def, blast intro: transM) |
13306 | 599 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
600 |
lemma (in M_trivial) successor_abs [simp]: |
13306 | 601 |
"[| M(a); M(z) |] ==> successor(M,a,z) <-> z = succ(a)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
602 |
by (simp add: successor_def, blast) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
603 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
604 |
lemma (in M_trivial) succ_in_M_iff [iff]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
605 |
"M(succ(a)) <-> M(a)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
606 |
apply (simp add: succ_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
607 |
apply (blast intro: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
608 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
609 |
|
13418
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
610 |
subsubsection{*Absoluteness for Separation and Replacement*} |
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
611 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
612 |
lemma (in M_trivial) separation_closed [intro,simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
613 |
"[| separation(M,P); M(A) |] ==> M(Collect(A,P))" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
614 |
apply (insert separation, simp add: separation_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
615 |
apply (drule rspec, assumption, clarify) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
616 |
apply (subgoal_tac "y = Collect(A,P)", blast) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
617 |
apply (blast dest: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
618 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
619 |
|
13436 | 620 |
lemma separation_iff: |
621 |
"separation(M,P) <-> (\<forall>z[M]. \<exists>y[M]. is_Collect(M,z,P,y))" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
622 |
by (simp add: separation_def is_Collect_def) |
13436 | 623 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
624 |
lemma (in M_trivial) Collect_abs [simp]: |
13436 | 625 |
"[| M(A); M(z) |] ==> is_Collect(M,A,P,z) <-> z = Collect(A,P)" |
626 |
apply (simp add: is_Collect_def) |
|
627 |
apply (blast intro!: equalityI dest: transM) |
|
628 |
done |
|
629 |
||
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
630 |
text{*Probably the premise and conclusion are equivalent*} |
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
631 |
lemma (in M_trivial) strong_replacementI [rule_format]: |
13687 | 632 |
"[| \<forall>B[M]. separation(M, %u. \<exists>x[M]. x\<in>B & P(x,u)) |] |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
633 |
==> strong_replacement(M,P)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
634 |
apply (simp add: strong_replacement_def, clarify) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
635 |
apply (frule replacementD [OF replacement], assumption, clarify) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
636 |
apply (drule_tac x=A in rspec, clarify) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
637 |
apply (drule_tac z=Y in separationD, assumption, clarify) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
638 |
apply (rule_tac x=y in rexI, force, assumption) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
639 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
640 |
|
13505 | 641 |
subsubsection{*The Operator @{term is_Replace}*} |
642 |
||
643 |
||
644 |
lemma is_Replace_cong [cong]: |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
645 |
"[| A=A'; |
13505 | 646 |
!!x y. [| M(x); M(y) |] ==> P(x,y) <-> P'(x,y); |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
647 |
z=z' |] |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
648 |
==> is_Replace(M, A, %x y. P(x,y), z) <-> |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
649 |
is_Replace(M, A', %x y. P'(x,y), z')" |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
650 |
by (simp add: is_Replace_def) |
13505 | 651 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
652 |
lemma (in M_trivial) univalent_Replace_iff: |
13505 | 653 |
"[| M(A); univalent(M,A,P); |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
654 |
!!x y. [| x\<in>A; P(x,y) |] ==> M(y) |] |
13505 | 655 |
==> u \<in> Replace(A,P) <-> (\<exists>x. x\<in>A & P(x,u))" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
656 |
apply (simp add: Replace_iff univalent_def) |
13505 | 657 |
apply (blast dest: transM) |
658 |
done |
|
659 |
||
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
660 |
(*The last premise expresses that P takes M to M*) |
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
661 |
lemma (in M_trivial) strong_replacement_closed [intro,simp]: |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
662 |
"[| strong_replacement(M,P); M(A); univalent(M,A,P); |
13505 | 663 |
!!x y. [| x\<in>A; P(x,y) |] ==> M(y) |] ==> M(Replace(A,P))" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
664 |
apply (simp add: strong_replacement_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
665 |
apply (drule_tac x=A in rspec, safe) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
666 |
apply (subgoal_tac "Replace(A,P) = Y") |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
667 |
apply simp |
13505 | 668 |
apply (rule equality_iffI) |
669 |
apply (simp add: univalent_Replace_iff) |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
670 |
apply (blast dest: transM) |
13505 | 671 |
done |
672 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
673 |
lemma (in M_trivial) Replace_abs: |
13702 | 674 |
"[| M(A); M(z); univalent(M,A,P); |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
675 |
!!x y. [| x\<in>A; P(x,y) |] ==> M(y) |] |
13505 | 676 |
==> is_Replace(M,A,P,z) <-> z = Replace(A,P)" |
677 |
apply (simp add: is_Replace_def) |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
678 |
apply (rule iffI) |
13702 | 679 |
apply (rule equality_iffI) |
680 |
apply (simp_all add: univalent_Replace_iff) |
|
681 |
apply (blast dest: transM)+ |
|
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
682 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
683 |
|
13702 | 684 |
|
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
685 |
(*The first premise can't simply be assumed as a schema. |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
686 |
It is essential to take care when asserting instances of Replacement. |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
687 |
Let K be a nonconstructible subset of nat and define |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
688 |
f(x) = x if x:K and f(x)=0 otherwise. Then RepFun(nat,f) = cons(0,K), a |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
689 |
nonconstructible set. So we cannot assume that M(X) implies M(RepFun(X,f)) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
690 |
even for f : M -> M. |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
691 |
*) |
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
692 |
lemma (in M_trivial) RepFun_closed: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
693 |
"[| strong_replacement(M, \<lambda>x y. y = f(x)); M(A); \<forall>x\<in>A. M(f(x)) |] |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
694 |
==> M(RepFun(A,f))" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
695 |
apply (simp add: RepFun_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
696 |
apply (rule strong_replacement_closed) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
697 |
apply (auto dest: transM simp add: univalent_def) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
698 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
699 |
|
13353 | 700 |
lemma Replace_conj_eq: "{y . x \<in> A, x\<in>A & y=f(x)} = {y . x\<in>A, y=f(x)}" |
701 |
by simp |
|
702 |
||
703 |
text{*Better than @{text RepFun_closed} when having the formula @{term "x\<in>A"} |
|
704 |
makes relativization easier.*} |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
705 |
lemma (in M_trivial) RepFun_closed2: |
13353 | 706 |
"[| strong_replacement(M, \<lambda>x y. x\<in>A & y = f(x)); M(A); \<forall>x\<in>A. M(f(x)) |] |
707 |
==> M(RepFun(A, %x. f(x)))" |
|
708 |
apply (simp add: RepFun_def) |
|
709 |
apply (frule strong_replacement_closed, assumption) |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
710 |
apply (auto dest: transM simp add: Replace_conj_eq univalent_def) |
13353 | 711 |
done |
712 |
||
13418
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
713 |
subsubsection {*Absoluteness for @{term Lambda}*} |
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
714 |
|
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
715 |
constdefs |
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
716 |
is_lambda :: "[i=>o, i, [i,i]=>o, i] => o" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
717 |
"is_lambda(M, A, is_b, z) == |
13418
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
718 |
\<forall>p[M]. p \<in> z <-> |
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
719 |
(\<exists>u[M]. \<exists>v[M]. u\<in>A & pair(M,u,v,p) & is_b(u,v))" |
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
720 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
721 |
lemma (in M_trivial) lam_closed: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
722 |
"[| strong_replacement(M, \<lambda>x y. y = <x,b(x)>); M(A); \<forall>x\<in>A. M(b(x)) |] |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
723 |
==> M(\<lambda>x\<in>A. b(x))" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
724 |
by (simp add: lam_def, blast intro: RepFun_closed dest: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
725 |
|
13418
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
726 |
text{*Better than @{text lam_closed}: has the formula @{term "x\<in>A"}*} |
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
727 |
lemma (in M_trivial) lam_closed2: |
13418
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
728 |
"[|strong_replacement(M, \<lambda>x y. x\<in>A & y = \<langle>x, b(x)\<rangle>); |
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
729 |
M(A); \<forall>m[M]. m\<in>A --> M(b(m))|] ==> M(Lambda(A,b))" |
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
730 |
apply (simp add: lam_def) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
731 |
apply (blast intro: RepFun_closed2 dest: transM) |
13418
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
732 |
done |
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
733 |
|
13702 | 734 |
lemma (in M_trivial) lambda_abs2: |
735 |
"[| Relation1(M,A,is_b,b); M(A); \<forall>m[M]. m\<in>A --> M(b(m)); M(z) |] |
|
13418
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
736 |
==> is_lambda(M,A,is_b,z) <-> z = Lambda(A,b)" |
13634 | 737 |
apply (simp add: Relation1_def is_lambda_def) |
13418
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
738 |
apply (rule iffI) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
739 |
prefer 2 apply (simp add: lam_def) |
13702 | 740 |
apply (rule equality_iffI) |
741 |
apply (simp add: lam_def) |
|
742 |
apply (rule iffI) |
|
743 |
apply (blast dest: transM) |
|
744 |
apply (auto simp add: transM [of _ A]) |
|
13418
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
745 |
done |
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
746 |
|
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
747 |
lemma is_lambda_cong [cong]: |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
748 |
"[| A=A'; z=z'; |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
749 |
!!x y. [| x\<in>A; M(x); M(y) |] ==> is_b(x,y) <-> is_b'(x,y) |] |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
750 |
==> is_lambda(M, A, %x y. is_b(x,y), z) <-> |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
751 |
is_lambda(M, A', %x y. is_b'(x,y), z')" |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
752 |
by (simp add: is_lambda_def) |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
753 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
754 |
lemma (in M_trivial) image_abs [simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
755 |
"[| M(r); M(A); M(z) |] ==> image(M,r,A,z) <-> z = r``A" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
756 |
apply (simp add: image_def) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
757 |
apply (rule iffI) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
758 |
apply (blast intro!: equalityI dest: transM, blast) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
759 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
760 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
761 |
text{*What about @{text Pow_abs}? Powerset is NOT absolute! |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
762 |
This result is one direction of absoluteness.*} |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
763 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
764 |
lemma (in M_trivial) powerset_Pow: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
765 |
"powerset(M, x, Pow(x))" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
766 |
by (simp add: powerset_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
767 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
768 |
text{*But we can't prove that the powerset in @{text M} includes the |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
769 |
real powerset.*} |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
770 |
lemma (in M_trivial) powerset_imp_subset_Pow: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
771 |
"[| powerset(M,x,y); M(y) |] ==> y <= Pow(x)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
772 |
apply (simp add: powerset_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
773 |
apply (blast dest: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
774 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
775 |
|
13418
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
776 |
subsubsection{*Absoluteness for the Natural Numbers*} |
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
777 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
778 |
lemma (in M_trivial) nat_into_M [intro]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
779 |
"n \<in> nat ==> M(n)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
780 |
by (induct n rule: nat_induct, simp_all) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
781 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
782 |
lemma (in M_trivial) nat_case_closed [intro,simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
783 |
"[|M(k); M(a); \<forall>m[M]. M(b(m))|] ==> M(nat_case(a,b,k))" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
784 |
apply (case_tac "k=0", simp) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
785 |
apply (case_tac "\<exists>m. k = succ(m)", force) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
786 |
apply (simp add: nat_case_def) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
787 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
788 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
789 |
lemma (in M_trivial) quasinat_abs [simp]: |
13350 | 790 |
"M(z) ==> is_quasinat(M,z) <-> quasinat(z)" |
791 |
by (auto simp add: is_quasinat_def quasinat_def) |
|
792 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
793 |
lemma (in M_trivial) nat_case_abs [simp]: |
13634 | 794 |
"[| relation1(M,is_b,b); M(k); M(z) |] |
13353 | 795 |
==> is_nat_case(M,a,is_b,k,z) <-> z = nat_case(a,b,k)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
796 |
apply (case_tac "quasinat(k)") |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
797 |
prefer 2 |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
798 |
apply (simp add: is_nat_case_def non_nat_case) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
799 |
apply (force simp add: quasinat_def) |
13350 | 800 |
apply (simp add: quasinat_def is_nat_case_def) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
801 |
apply (elim disjE exE) |
13634 | 802 |
apply (simp_all add: relation1_def) |
13350 | 803 |
done |
804 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
805 |
(*NOT for the simplifier. The assumption M(z') is apparently necessary, but |
13363 | 806 |
causes the error "Failed congruence proof!" It may be better to replace |
807 |
is_nat_case by nat_case before attempting congruence reasoning.*) |
|
13434 | 808 |
lemma is_nat_case_cong: |
13352 | 809 |
"[| a = a'; k = k'; z = z'; M(z'); |
810 |
!!x y. [| M(x); M(y) |] ==> is_b(x,y) <-> is_b'(x,y) |] |
|
811 |
==> is_nat_case(M, a, is_b, k, z) <-> is_nat_case(M, a', is_b', k', z')" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
812 |
by (simp add: is_nat_case_def) |
13352 | 813 |
|
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
814 |
|
13418
7c0ba9dba978
tweaks, aiming towards relativization of "satisfies"
paulson
parents:
13397
diff
changeset
|
815 |
subsection{*Absoluteness for Ordinals*} |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
816 |
text{*These results constitute Theorem IV 5.1 of Kunen (page 126).*} |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
817 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
818 |
lemma (in M_trivial) lt_closed: |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
819 |
"[| j<i; M(i) |] ==> M(j)" |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
820 |
by (blast dest: ltD intro: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
821 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
822 |
lemma (in M_trivial) transitive_set_abs [simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
823 |
"M(a) ==> transitive_set(M,a) <-> Transset(a)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
824 |
by (simp add: transitive_set_def Transset_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
825 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
826 |
lemma (in M_trivial) ordinal_abs [simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
827 |
"M(a) ==> ordinal(M,a) <-> Ord(a)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
828 |
by (simp add: ordinal_def Ord_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
829 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
830 |
lemma (in M_trivial) limit_ordinal_abs [simp]: |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
831 |
"M(a) ==> limit_ordinal(M,a) <-> Limit(a)" |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
832 |
apply (unfold Limit_def limit_ordinal_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
833 |
apply (simp add: Ord_0_lt_iff) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
834 |
apply (simp add: lt_def, blast) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
835 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
836 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
837 |
lemma (in M_trivial) successor_ordinal_abs [simp]: |
13299 | 838 |
"M(a) ==> successor_ordinal(M,a) <-> Ord(a) & (\<exists>b[M]. a = succ(b))" |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
839 |
apply (simp add: successor_ordinal_def, safe) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
840 |
apply (drule Ord_cases_disj, auto) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
841 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
842 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
843 |
lemma finite_Ord_is_nat: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
844 |
"[| Ord(a); ~ Limit(a); \<forall>x\<in>a. ~ Limit(x) |] ==> a \<in> nat" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
845 |
by (induct a rule: trans_induct3, simp_all) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
846 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
847 |
lemma (in M_trivial) finite_ordinal_abs [simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
848 |
"M(a) ==> finite_ordinal(M,a) <-> a \<in> nat" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
849 |
apply (simp add: finite_ordinal_def) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
850 |
apply (blast intro: finite_Ord_is_nat intro: nat_into_Ord |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
851 |
dest: Ord_trans naturals_not_limit) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
852 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
853 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
854 |
lemma Limit_non_Limit_implies_nat: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
855 |
"[| Limit(a); \<forall>x\<in>a. ~ Limit(x) |] ==> a = nat" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
856 |
apply (rule le_anti_sym) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
857 |
apply (rule all_lt_imp_le, blast, blast intro: Limit_is_Ord) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
858 |
apply (simp add: lt_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
859 |
apply (blast intro: Ord_in_Ord Ord_trans finite_Ord_is_nat) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
860 |
apply (erule nat_le_Limit) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
861 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
862 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
863 |
lemma (in M_trivial) omega_abs [simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
864 |
"M(a) ==> omega(M,a) <-> a = nat" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
865 |
apply (simp add: omega_def) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
866 |
apply (blast intro: Limit_non_Limit_implies_nat dest: naturals_not_limit) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
867 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
868 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
869 |
lemma (in M_trivial) number1_abs [simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
870 |
"M(a) ==> number1(M,a) <-> a = 1" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
871 |
by (simp add: number1_def) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
872 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
873 |
lemma (in M_trivial) number2_abs [simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
874 |
"M(a) ==> number2(M,a) <-> a = succ(1)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
875 |
by (simp add: number2_def) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
876 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
877 |
lemma (in M_trivial) number3_abs [simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
878 |
"M(a) ==> number3(M,a) <-> a = succ(succ(1))" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
879 |
by (simp add: number3_def) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
880 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
881 |
text{*Kunen continued to 20...*} |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
882 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
883 |
(*Could not get this to work. The \<lambda>x\<in>nat is essential because everything |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
884 |
but the recursion variable must stay unchanged. But then the recursion |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
885 |
equations only hold for x\<in>nat (or in some other set) and not for the |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
886 |
whole of the class M. |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
887 |
consts |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
888 |
natnumber_aux :: "[i=>o,i] => i" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
889 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
890 |
primrec |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
891 |
"natnumber_aux(M,0) = (\<lambda>x\<in>nat. if empty(M,x) then 1 else 0)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
892 |
"natnumber_aux(M,succ(n)) = |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
893 |
(\<lambda>x\<in>nat. if (\<exists>y[M]. natnumber_aux(M,n)`y=1 & successor(M,y,x)) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
894 |
then 1 else 0)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
895 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
896 |
constdefs |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
897 |
natnumber :: "[i=>o,i,i] => o" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
898 |
"natnumber(M,n,x) == natnumber_aux(M,n)`x = 1" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
899 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
900 |
lemma (in M_trivial) [simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
901 |
"natnumber(M,0,x) == x=0" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
902 |
*) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
903 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
904 |
subsection{*Some instances of separation and strong replacement*} |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
905 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
906 |
locale M_basic = M_trivial + |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
907 |
assumes Inter_separation: |
13268 | 908 |
"M(A) ==> separation(M, \<lambda>x. \<forall>y[M]. y\<in>A --> x\<in>y)" |
13436 | 909 |
and Diff_separation: |
910 |
"M(B) ==> separation(M, \<lambda>x. x \<notin> B)" |
|
13223 | 911 |
and cartprod_separation: |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
912 |
"[| M(A); M(B) |] |
13298 | 913 |
==> separation(M, \<lambda>z. \<exists>x[M]. x\<in>A & (\<exists>y[M]. y\<in>B & pair(M,x,y,z)))" |
13223 | 914 |
and image_separation: |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
915 |
"[| M(A); M(r) |] |
13268 | 916 |
==> separation(M, \<lambda>y. \<exists>p[M]. p\<in>r & (\<exists>x[M]. x\<in>A & pair(M,x,y,p)))" |
13223 | 917 |
and converse_separation: |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
918 |
"M(r) ==> separation(M, |
13298 | 919 |
\<lambda>z. \<exists>p[M]. p\<in>r & (\<exists>x[M]. \<exists>y[M]. pair(M,x,y,p) & pair(M,y,x,z)))" |
13223 | 920 |
and restrict_separation: |
13268 | 921 |
"M(A) ==> separation(M, \<lambda>z. \<exists>x[M]. x\<in>A & (\<exists>y[M]. pair(M,x,y,z)))" |
13223 | 922 |
and comp_separation: |
923 |
"[| M(r); M(s) |] |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
924 |
==> separation(M, \<lambda>xz. \<exists>x[M]. \<exists>y[M]. \<exists>z[M]. \<exists>xy[M]. \<exists>yz[M]. |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
925 |
pair(M,x,z,xz) & pair(M,x,y,xy) & pair(M,y,z,yz) & |
13268 | 926 |
xy\<in>s & yz\<in>r)" |
13223 | 927 |
and pred_separation: |
13298 | 928 |
"[| M(r); M(x) |] ==> separation(M, \<lambda>y. \<exists>p[M]. p\<in>r & pair(M,y,x,p))" |
13223 | 929 |
and Memrel_separation: |
13298 | 930 |
"separation(M, \<lambda>z. \<exists>x[M]. \<exists>y[M]. pair(M,x,y,z) & x \<in> y)" |
13268 | 931 |
and funspace_succ_replacement: |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
932 |
"M(n) ==> |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
933 |
strong_replacement(M, \<lambda>p z. \<exists>f[M]. \<exists>b[M]. \<exists>nb[M]. \<exists>cnbf[M]. |
13306 | 934 |
pair(M,f,b,p) & pair(M,n,b,nb) & is_cons(M,nb,f,cnbf) & |
935 |
upair(M,cnbf,cnbf,z))" |
|
13223 | 936 |
and is_recfun_separation: |
13634 | 937 |
--{*for well-founded recursion: used to prove @{text is_recfun_equal}*} |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
938 |
"[| M(r); M(f); M(g); M(a); M(b) |] |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
939 |
==> separation(M, |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
940 |
\<lambda>x. \<exists>xa[M]. \<exists>xb[M]. |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
941 |
pair(M,x,a,xa) & xa \<in> r & pair(M,x,b,xb) & xb \<in> r & |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
942 |
(\<exists>fx[M]. \<exists>gx[M]. fun_apply(M,f,x,fx) & fun_apply(M,g,x,gx) & |
13319 | 943 |
fx \<noteq> gx))" |
13223 | 944 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
945 |
lemma (in M_basic) cartprod_iff_lemma: |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
946 |
"[| M(C); \<forall>u[M]. u \<in> C <-> (\<exists>x\<in>A. \<exists>y\<in>B. u = {{x}, {x,y}}); |
13254 | 947 |
powerset(M, A \<union> B, p1); powerset(M, p1, p2); M(p2) |] |
13223 | 948 |
==> C = {u \<in> p2 . \<exists>x\<in>A. \<exists>y\<in>B. u = {{x}, {x,y}}}" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
949 |
apply (simp add: powerset_def) |
13254 | 950 |
apply (rule equalityI, clarify, simp) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
951 |
apply (frule transM, assumption) |
13611 | 952 |
apply (frule transM, assumption, simp (no_asm_simp)) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
953 |
apply blast |
13223 | 954 |
apply clarify |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
955 |
apply (frule transM, assumption, force) |
13223 | 956 |
done |
957 |
||
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
958 |
lemma (in M_basic) cartprod_iff: |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
959 |
"[| M(A); M(B); M(C) |] |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
960 |
==> cartprod(M,A,B,C) <-> |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
961 |
(\<exists>p1[M]. \<exists>p2[M]. powerset(M,A Un B,p1) & powerset(M,p1,p2) & |
13223 | 962 |
C = {z \<in> p2. \<exists>x\<in>A. \<exists>y\<in>B. z = <x,y>})" |
963 |
apply (simp add: Pair_def cartprod_def, safe) |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
964 |
defer 1 |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
965 |
apply (simp add: powerset_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
966 |
apply blast |
13223 | 967 |
txt{*Final, difficult case: the left-to-right direction of the theorem.*} |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
968 |
apply (insert power_ax, simp add: power_ax_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
969 |
apply (frule_tac x="A Un B" and P="\<lambda>x. rex(M,?Q(x))" in rspec) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
970 |
apply (blast, clarify) |
13299 | 971 |
apply (drule_tac x=z and P="\<lambda>x. rex(M,?Q(x))" in rspec) |
972 |
apply assumption |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
973 |
apply (blast intro: cartprod_iff_lemma) |
13223 | 974 |
done |
975 |
||
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
976 |
lemma (in M_basic) cartprod_closed_lemma: |
13299 | 977 |
"[| M(A); M(B) |] ==> \<exists>C[M]. cartprod(M,A,B,C)" |
13223 | 978 |
apply (simp del: cartprod_abs add: cartprod_iff) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
979 |
apply (insert power_ax, simp add: power_ax_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
980 |
apply (frule_tac x="A Un B" and P="\<lambda>x. rex(M,?Q(x))" in rspec) |
13299 | 981 |
apply (blast, clarify) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
982 |
apply (drule_tac x=z and P="\<lambda>x. rex(M,?Q(x))" in rspec, auto) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
983 |
apply (intro rexI conjI, simp+) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
984 |
apply (insert cartprod_separation [of A B], simp) |
13223 | 985 |
done |
986 |
||
987 |
text{*All the lemmas above are necessary because Powerset is not absolute. |
|
988 |
I should have used Replacement instead!*} |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
989 |
lemma (in M_basic) cartprod_closed [intro,simp]: |
13223 | 990 |
"[| M(A); M(B) |] ==> M(A*B)" |
991 |
by (frule cartprod_closed_lemma, assumption, force) |
|
992 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
993 |
lemma (in M_basic) sum_closed [intro,simp]: |
13268 | 994 |
"[| M(A); M(B) |] ==> M(A+B)" |
995 |
by (simp add: sum_def) |
|
996 |
||
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
997 |
lemma (in M_basic) sum_abs [simp]: |
13350 | 998 |
"[| M(A); M(B); M(Z) |] ==> is_sum(M,A,B,Z) <-> (Z = A+B)" |
999 |
by (simp add: is_sum_def sum_def singleton_0 nat_into_M) |
|
1000 |
||
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1001 |
lemma (in M_trivial) Inl_in_M_iff [iff]: |
13397 | 1002 |
"M(Inl(a)) <-> M(a)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1003 |
by (simp add: Inl_def) |
13397 | 1004 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1005 |
lemma (in M_trivial) Inl_abs [simp]: |
13397 | 1006 |
"M(Z) ==> is_Inl(M,a,Z) <-> (Z = Inl(a))" |
1007 |
by (simp add: is_Inl_def Inl_def) |
|
1008 |
||
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1009 |
lemma (in M_trivial) Inr_in_M_iff [iff]: |
13397 | 1010 |
"M(Inr(a)) <-> M(a)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1011 |
by (simp add: Inr_def) |
13397 | 1012 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1013 |
lemma (in M_trivial) Inr_abs [simp]: |
13397 | 1014 |
"M(Z) ==> is_Inr(M,a,Z) <-> (Z = Inr(a))" |
1015 |
by (simp add: is_Inr_def Inr_def) |
|
1016 |
||
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1017 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1018 |
subsubsection {*converse of a relation*} |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1019 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1020 |
lemma (in M_basic) M_converse_iff: |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1021 |
"M(r) ==> |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1022 |
converse(r) = |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1023 |
{z \<in> Union(Union(r)) * Union(Union(r)). |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1024 |
\<exists>p\<in>r. \<exists>x[M]. \<exists>y[M]. p = \<langle>x,y\<rangle> & z = \<langle>y,x\<rangle>}" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1025 |
apply (rule equalityI) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1026 |
prefer 2 apply (blast dest: transM, clarify, simp) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1027 |
apply (simp add: Pair_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1028 |
apply (blast dest: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1029 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1030 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1031 |
lemma (in M_basic) converse_closed [intro,simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1032 |
"M(r) ==> M(converse(r))" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1033 |
apply (simp add: M_converse_iff) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1034 |
apply (insert converse_separation [of r], simp) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1035 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1036 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1037 |
lemma (in M_basic) converse_abs [simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1038 |
"[| M(r); M(z) |] ==> is_converse(M,r,z) <-> z = converse(r)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1039 |
apply (simp add: is_converse_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1040 |
apply (rule iffI) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1041 |
prefer 2 apply blast |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1042 |
apply (rule M_equalityI) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1043 |
apply simp |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1044 |
apply (blast dest: transM)+ |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1045 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1046 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1047 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1048 |
subsubsection {*image, preimage, domain, range*} |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1049 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1050 |
lemma (in M_basic) image_closed [intro,simp]: |
13223 | 1051 |
"[| M(A); M(r) |] ==> M(r``A)" |
1052 |
apply (simp add: image_iff_Collect) |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1053 |
apply (insert image_separation [of A r], simp) |
13223 | 1054 |
done |
1055 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1056 |
lemma (in M_basic) vimage_abs [simp]: |
13223 | 1057 |
"[| M(r); M(A); M(z) |] ==> pre_image(M,r,A,z) <-> z = r-``A" |
1058 |
apply (simp add: pre_image_def) |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1059 |
apply (rule iffI) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1060 |
apply (blast intro!: equalityI dest: transM, blast) |
13223 | 1061 |
done |
1062 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1063 |
lemma (in M_basic) vimage_closed [intro,simp]: |
13223 | 1064 |
"[| M(A); M(r) |] ==> M(r-``A)" |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1065 |
by (simp add: vimage_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1066 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1067 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1068 |
subsubsection{*Domain, range and field*} |
13223 | 1069 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1070 |
lemma (in M_basic) domain_abs [simp]: |
13223 | 1071 |
"[| M(r); M(z) |] ==> is_domain(M,r,z) <-> z = domain(r)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1072 |
apply (simp add: is_domain_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1073 |
apply (blast intro!: equalityI dest: transM) |
13223 | 1074 |
done |
1075 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1076 |
lemma (in M_basic) domain_closed [intro,simp]: |
13223 | 1077 |
"M(r) ==> M(domain(r))" |
1078 |
apply (simp add: domain_eq_vimage) |
|
1079 |
done |
|
1080 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1081 |
lemma (in M_basic) range_abs [simp]: |
13223 | 1082 |
"[| M(r); M(z) |] ==> is_range(M,r,z) <-> z = range(r)" |
1083 |
apply (simp add: is_range_def) |
|
1084 |
apply (blast intro!: equalityI dest: transM) |
|
1085 |
done |
|
1086 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1087 |
lemma (in M_basic) range_closed [intro,simp]: |
13223 | 1088 |
"M(r) ==> M(range(r))" |
1089 |
apply (simp add: range_eq_image) |
|
1090 |
done |
|
1091 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1092 |
lemma (in M_basic) field_abs [simp]: |
13245 | 1093 |
"[| M(r); M(z) |] ==> is_field(M,r,z) <-> z = field(r)" |
1094 |
by (simp add: domain_closed range_closed is_field_def field_def) |
|
1095 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1096 |
lemma (in M_basic) field_closed [intro,simp]: |
13245 | 1097 |
"M(r) ==> M(field(r))" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1098 |
by (simp add: domain_closed range_closed Un_closed field_def) |
13245 | 1099 |
|
1100 |
||
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1101 |
subsubsection{*Relations, functions and application*} |
13254 | 1102 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1103 |
lemma (in M_basic) relation_abs [simp]: |
13223 | 1104 |
"M(r) ==> is_relation(M,r) <-> relation(r)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1105 |
apply (simp add: is_relation_def relation_def) |
13223 | 1106 |
apply (blast dest!: bspec dest: pair_components_in_M)+ |
1107 |
done |
|
1108 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1109 |
lemma (in M_basic) function_abs [simp]: |
13223 | 1110 |
"M(r) ==> is_function(M,r) <-> function(r)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1111 |
apply (simp add: is_function_def function_def, safe) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1112 |
apply (frule transM, assumption) |
13223 | 1113 |
apply (blast dest: pair_components_in_M)+ |
1114 |
done |
|
1115 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1116 |
lemma (in M_basic) apply_closed [intro,simp]: |
13223 | 1117 |
"[|M(f); M(a)|] ==> M(f`a)" |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1118 |
by (simp add: apply_def) |
13223 | 1119 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1120 |
lemma (in M_basic) apply_abs [simp]: |
13352 | 1121 |
"[| M(f); M(x); M(y) |] ==> fun_apply(M,f,x,y) <-> f`x = y" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1122 |
apply (simp add: fun_apply_def apply_def, blast) |
13223 | 1123 |
done |
1124 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1125 |
lemma (in M_basic) typed_function_abs [simp]: |
13223 | 1126 |
"[| M(A); M(f) |] ==> typed_function(M,A,B,f) <-> f \<in> A -> B" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1127 |
apply (auto simp add: typed_function_def relation_def Pi_iff) |
13223 | 1128 |
apply (blast dest: pair_components_in_M)+ |
1129 |
done |
|
1130 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1131 |
lemma (in M_basic) injection_abs [simp]: |
13223 | 1132 |
"[| M(A); M(f) |] ==> injection(M,A,B,f) <-> f \<in> inj(A,B)" |
1133 |
apply (simp add: injection_def apply_iff inj_def apply_closed) |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1134 |
apply (blast dest: transM [of _ A]) |
13223 | 1135 |
done |
1136 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1137 |
lemma (in M_basic) surjection_abs [simp]: |
13223 | 1138 |
"[| M(A); M(B); M(f) |] ==> surjection(M,A,B,f) <-> f \<in> surj(A,B)" |
13352 | 1139 |
by (simp add: surjection_def surj_def) |
13223 | 1140 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1141 |
lemma (in M_basic) bijection_abs [simp]: |
13223 | 1142 |
"[| M(A); M(B); M(f) |] ==> bijection(M,A,B,f) <-> f \<in> bij(A,B)" |
1143 |
by (simp add: bijection_def bij_def) |
|
1144 |
||
1145 |
||
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1146 |
subsubsection{*Composition of relations*} |
13223 | 1147 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1148 |
lemma (in M_basic) M_comp_iff: |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1149 |
"[| M(r); M(s) |] |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1150 |
==> r O s = |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1151 |
{xz \<in> domain(s) * range(r). |
13268 | 1152 |
\<exists>x[M]. \<exists>y[M]. \<exists>z[M]. xz = \<langle>x,z\<rangle> & \<langle>x,y\<rangle> \<in> s & \<langle>y,z\<rangle> \<in> r}" |
13223 | 1153 |
apply (simp add: comp_def) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1154 |
apply (rule equalityI) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1155 |
apply clarify |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1156 |
apply simp |
13223 | 1157 |
apply (blast dest: transM)+ |
1158 |
done |
|
1159 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1160 |
lemma (in M_basic) comp_closed [intro,simp]: |
13223 | 1161 |
"[| M(r); M(s) |] ==> M(r O s)" |
1162 |
apply (simp add: M_comp_iff) |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1163 |
apply (insert comp_separation [of r s], simp) |
13245 | 1164 |
done |
1165 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1166 |
lemma (in M_basic) composition_abs [simp]: |
13702 | 1167 |
"[| M(r); M(s); M(t) |] ==> composition(M,r,s,t) <-> t = r O s" |
13247 | 1168 |
apply safe |
13245 | 1169 |
txt{*Proving @{term "composition(M, r, s, r O s)"}*} |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1170 |
prefer 2 |
13245 | 1171 |
apply (simp add: composition_def comp_def) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1172 |
apply (blast dest: transM) |
13245 | 1173 |
txt{*Opposite implication*} |
1174 |
apply (rule M_equalityI) |
|
1175 |
apply (simp add: composition_def comp_def) |
|
1176 |
apply (blast del: allE dest: transM)+ |
|
13223 | 1177 |
done |
1178 |
||
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1179 |
text{*no longer needed*} |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1180 |
lemma (in M_basic) restriction_is_function: |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1181 |
"[| restriction(M,f,A,z); function(f); M(f); M(A); M(z) |] |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1182 |
==> function(z)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1183 |
apply (simp add: restriction_def ball_iff_equiv) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1184 |
apply (unfold function_def, blast) |
13269 | 1185 |
done |
1186 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1187 |
lemma (in M_basic) restriction_abs [simp]: |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1188 |
"[| M(f); M(A); M(z) |] |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1189 |
==> restriction(M,f,A,z) <-> z = restrict(f,A)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1190 |
apply (simp add: ball_iff_equiv restriction_def restrict_def) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1191 |
apply (blast intro!: equalityI dest: transM) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1192 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1193 |
|
13223 | 1194 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1195 |
lemma (in M_basic) M_restrict_iff: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1196 |
"M(r) ==> restrict(r,A) = {z \<in> r . \<exists>x\<in>A. \<exists>y[M]. z = \<langle>x, y\<rangle>}" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1197 |
by (simp add: restrict_def, blast dest: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1198 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1199 |
lemma (in M_basic) restrict_closed [intro,simp]: |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1200 |
"[| M(A); M(r) |] ==> M(restrict(r,A))" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1201 |
apply (simp add: M_restrict_iff) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1202 |
apply (insert restrict_separation [of A], simp) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1203 |
done |
13223 | 1204 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1205 |
lemma (in M_basic) Inter_abs [simp]: |
13223 | 1206 |
"[| M(A); M(z) |] ==> big_inter(M,A,z) <-> z = Inter(A)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1207 |
apply (simp add: big_inter_def Inter_def) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1208 |
apply (blast intro!: equalityI dest: transM) |
13223 | 1209 |
done |
1210 |
||
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1211 |
lemma (in M_basic) Inter_closed [intro,simp]: |
13223 | 1212 |
"M(A) ==> M(Inter(A))" |
13245 | 1213 |
by (insert Inter_separation, simp add: Inter_def) |
13223 | 1214 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1215 |
lemma (in M_basic) Int_closed [intro,simp]: |
13223 | 1216 |
"[| M(A); M(B) |] ==> M(A Int B)" |
1217 |
apply (subgoal_tac "M({A,B})") |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1218 |
apply (frule Inter_closed, force+) |
13223 | 1219 |
done |
1220 |
||
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1221 |
lemma (in M_basic) Diff_closed [intro,simp]: |
13436 | 1222 |
"[|M(A); M(B)|] ==> M(A-B)" |
1223 |
by (insert Diff_separation, simp add: Diff_def) |
|
1224 |
||
1225 |
subsubsection{*Some Facts About Separation Axioms*} |
|
1226 |
||
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1227 |
lemma (in M_basic) separation_conj: |
13436 | 1228 |
"[|separation(M,P); separation(M,Q)|] ==> separation(M, \<lambda>z. P(z) & Q(z))" |
1229 |
by (simp del: separation_closed |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1230 |
add: separation_iff Collect_Int_Collect_eq [symmetric]) |
13436 | 1231 |
|
1232 |
(*???equalities*) |
|
1233 |
lemma Collect_Un_Collect_eq: |
|
1234 |
"Collect(A,P) Un Collect(A,Q) = Collect(A, %x. P(x) | Q(x))" |
|
1235 |
by blast |
|
1236 |
||
1237 |
lemma Diff_Collect_eq: |
|
1238 |
"A - Collect(A,P) = Collect(A, %x. ~ P(x))" |
|
1239 |
by blast |
|
1240 |
||
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1241 |
lemma (in M_trivial) Collect_rall_eq: |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1242 |
"M(Y) ==> Collect(A, %x. \<forall>y[M]. y\<in>Y --> P(x,y)) = |
13436 | 1243 |
(if Y=0 then A else (\<Inter>y \<in> Y. {x \<in> A. P(x,y)}))" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1244 |
apply simp |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1245 |
apply (blast intro!: equalityI dest: transM) |
13436 | 1246 |
done |
1247 |
||
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1248 |
lemma (in M_basic) separation_disj: |
13436 | 1249 |
"[|separation(M,P); separation(M,Q)|] ==> separation(M, \<lambda>z. P(z) | Q(z))" |
1250 |
by (simp del: separation_closed |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1251 |
add: separation_iff Collect_Un_Collect_eq [symmetric]) |
13436 | 1252 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1253 |
lemma (in M_basic) separation_neg: |
13436 | 1254 |
"separation(M,P) ==> separation(M, \<lambda>z. ~P(z))" |
1255 |
by (simp del: separation_closed |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1256 |
add: separation_iff Diff_Collect_eq [symmetric]) |
13436 | 1257 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1258 |
lemma (in M_basic) separation_imp: |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1259 |
"[|separation(M,P); separation(M,Q)|] |
13436 | 1260 |
==> separation(M, \<lambda>z. P(z) --> Q(z))" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1261 |
by (simp add: separation_neg separation_disj not_disj_iff_imp [symmetric]) |
13436 | 1262 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1263 |
text{*This result is a hint of how little can be done without the Reflection |
13436 | 1264 |
Theorem. The quantifier has to be bounded by a set. We also need another |
1265 |
instance of Separation!*} |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1266 |
lemma (in M_basic) separation_rall: |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1267 |
"[|M(Y); \<forall>y[M]. separation(M, \<lambda>x. P(x,y)); |
13436 | 1268 |
\<forall>z[M]. strong_replacement(M, \<lambda>x y. y = {u \<in> z . P(u,x)})|] |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1269 |
==> separation(M, \<lambda>x. \<forall>y[M]. y\<in>Y --> P(x,y))" |
13436 | 1270 |
apply (simp del: separation_closed rall_abs |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1271 |
add: separation_iff Collect_rall_eq) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1272 |
apply (blast intro!: Inter_closed RepFun_closed dest: transM) |
13436 | 1273 |
done |
1274 |
||
1275 |
||
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1276 |
subsubsection{*Functions and function space*} |
13268 | 1277 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1278 |
text{*The assumption @{term "M(A->B)"} is unusual, but essential: in |
13268 | 1279 |
all but trivial cases, A->B cannot be expected to belong to @{term M}.*} |
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1280 |
lemma (in M_basic) is_funspace_abs [simp]: |
13268 | 1281 |
"[|M(A); M(B); M(F); M(A->B)|] ==> is_funspace(M,A,B,F) <-> F = A->B"; |
1282 |
apply (simp add: is_funspace_def) |
|
1283 |
apply (rule iffI) |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1284 |
prefer 2 apply blast |
13268 | 1285 |
apply (rule M_equalityI) |
1286 |
apply simp_all |
|
1287 |
done |
|
1288 |
||
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1289 |
lemma (in M_basic) succ_fun_eq2: |
13268 | 1290 |
"[|M(B); M(n->B)|] ==> |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1291 |
succ(n) -> B = |
13268 | 1292 |
\<Union>{z. p \<in> (n->B)*B, \<exists>f[M]. \<exists>b[M]. p = <f,b> & z = {cons(<n,b>, f)}}" |
1293 |
apply (simp add: succ_fun_eq) |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1294 |
apply (blast dest: transM) |
13268 | 1295 |
done |
1296 |
||
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1297 |
lemma (in M_basic) funspace_succ: |
13268 | 1298 |
"[|M(n); M(B); M(n->B) |] ==> M(succ(n) -> B)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1299 |
apply (insert funspace_succ_replacement [of n], simp) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1300 |
apply (force simp add: succ_fun_eq2 univalent_def) |
13268 | 1301 |
done |
1302 |
||
1303 |
text{*@{term M} contains all finite function spaces. Needed to prove the |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1304 |
absoluteness of transitive closure. See the definition of |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1305 |
@{text rtrancl_alt} in in @{text WF_absolute.thy}.*} |
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1306 |
lemma (in M_basic) finite_funspace_closed [intro,simp]: |
13268 | 1307 |
"[|n\<in>nat; M(B)|] ==> M(n->B)" |
1308 |
apply (induct_tac n, simp) |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1309 |
apply (simp add: funspace_succ nat_into_M) |
13268 | 1310 |
done |
1311 |
||
13350 | 1312 |
|
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1313 |
subsection{*Relativization and Absoluteness for Boolean Operators*} |
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1314 |
|
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1315 |
constdefs |
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1316 |
is_bool_of_o :: "[i=>o, o, i] => o" |
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1317 |
"is_bool_of_o(M,P,z) == (P & number1(M,z)) | (~P & empty(M,z))" |
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1318 |
|
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1319 |
is_not :: "[i=>o, i, i] => o" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1320 |
"is_not(M,a,z) == (number1(M,a) & empty(M,z)) | |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1321 |
(~number1(M,a) & number1(M,z))" |
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1322 |
|
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1323 |
is_and :: "[i=>o, i, i, i] => o" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1324 |
"is_and(M,a,b,z) == (number1(M,a) & z=b) | |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1325 |
(~number1(M,a) & empty(M,z))" |
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1326 |
|
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1327 |
is_or :: "[i=>o, i, i, i] => o" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1328 |
"is_or(M,a,b,z) == (number1(M,a) & number1(M,z)) | |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1329 |
(~number1(M,a) & z=b)" |
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1330 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1331 |
lemma (in M_trivial) bool_of_o_abs [simp]: |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1332 |
"M(z) ==> is_bool_of_o(M,P,z) <-> z = bool_of_o(P)" |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1333 |
by (simp add: is_bool_of_o_def bool_of_o_def) |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1334 |
|
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1335 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1336 |
lemma (in M_trivial) not_abs [simp]: |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1337 |
"[| M(a); M(z)|] ==> is_not(M,a,z) <-> z = not(a)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1338 |
by (simp add: Bool.not_def cond_def is_not_def) |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1339 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1340 |
lemma (in M_trivial) and_abs [simp]: |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1341 |
"[| M(a); M(b); M(z)|] ==> is_and(M,a,b,z) <-> z = a and b" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1342 |
by (simp add: Bool.and_def cond_def is_and_def) |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1343 |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1344 |
lemma (in M_trivial) or_abs [simp]: |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1345 |
"[| M(a); M(b); M(z)|] ==> is_or(M,a,b,z) <-> z = a or b" |
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1346 |
by (simp add: Bool.or_def cond_def is_or_def) |
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1347 |
|
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1348 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1349 |
lemma (in M_trivial) bool_of_o_closed [intro,simp]: |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1350 |
"M(bool_of_o(P))" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1351 |
by (simp add: bool_of_o_def) |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1352 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1353 |
lemma (in M_trivial) and_closed [intro,simp]: |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1354 |
"[| M(p); M(q) |] ==> M(p and q)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1355 |
by (simp add: and_def cond_def) |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1356 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1357 |
lemma (in M_trivial) or_closed [intro,simp]: |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1358 |
"[| M(p); M(q) |] ==> M(p or q)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1359 |
by (simp add: or_def cond_def) |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1360 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1361 |
lemma (in M_trivial) not_closed [intro,simp]: |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1362 |
"M(p) ==> M(not(p))" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1363 |
by (simp add: Bool.not_def cond_def) |
13423
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1364 |
|
7ec771711c09
More lemmas, working towards relativization of "satisfies"
paulson
parents:
13418
diff
changeset
|
1365 |
|
13397 | 1366 |
subsection{*Relativization and Absoluteness for List Operators*} |
1367 |
||
1368 |
constdefs |
|
1369 |
||
1370 |
is_Nil :: "[i=>o, i] => o" |
|
1371 |
--{* because @{term "[] \<equiv> Inl(0)"}*} |
|
1372 |
"is_Nil(M,xs) == \<exists>zero[M]. empty(M,zero) & is_Inl(M,zero,xs)" |
|
1373 |
||
1374 |
is_Cons :: "[i=>o,i,i,i] => o" |
|
1375 |
--{* because @{term "Cons(a, l) \<equiv> Inr(\<langle>a,l\<rangle>)"}*} |
|
1376 |
"is_Cons(M,a,l,Z) == \<exists>p[M]. pair(M,a,l,p) & is_Inr(M,p,Z)" |
|
1377 |
||
1378 |
||
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1379 |
lemma (in M_trivial) Nil_in_M [intro,simp]: "M(Nil)" |
13397 | 1380 |
by (simp add: Nil_def) |
1381 |
||
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1382 |
lemma (in M_trivial) Nil_abs [simp]: "M(Z) ==> is_Nil(M,Z) <-> (Z = Nil)" |
13397 | 1383 |
by (simp add: is_Nil_def Nil_def) |
1384 |
||
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1385 |
lemma (in M_trivial) Cons_in_M_iff [iff]: "M(Cons(a,l)) <-> M(a) & M(l)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1386 |
by (simp add: Cons_def) |
13397 | 1387 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1388 |
lemma (in M_trivial) Cons_abs [simp]: |
13397 | 1389 |
"[|M(a); M(l); M(Z)|] ==> is_Cons(M,a,l,Z) <-> (Z = Cons(a,l))" |
1390 |
by (simp add: is_Cons_def Cons_def) |
|
1391 |
||
1392 |
||
1393 |
constdefs |
|
1394 |
||
1395 |
quasilist :: "i => o" |
|
1396 |
"quasilist(xs) == xs=Nil | (\<exists>x l. xs = Cons(x,l))" |
|
1397 |
||
1398 |
is_quasilist :: "[i=>o,i] => o" |
|
1399 |
"is_quasilist(M,z) == is_Nil(M,z) | (\<exists>x[M]. \<exists>l[M]. is_Cons(M,x,l,z))" |
|
1400 |
||
1401 |
list_case' :: "[i, [i,i]=>i, i] => i" |
|
1402 |
--{*A version of @{term list_case} that's always defined.*} |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1403 |
"list_case'(a,b,xs) == |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1404 |
if quasilist(xs) then list_case(a,b,xs) else 0" |
13397 | 1405 |
|
1406 |
is_list_case :: "[i=>o, i, [i,i,i]=>o, i, i] => o" |
|
1407 |
--{*Returns 0 for non-lists*} |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1408 |
"is_list_case(M, a, is_b, xs, z) == |
13397 | 1409 |
(is_Nil(M,xs) --> z=a) & |
1410 |
(\<forall>x[M]. \<forall>l[M]. is_Cons(M,x,l,xs) --> is_b(x,l,z)) & |
|
1411 |
(is_quasilist(M,xs) | empty(M,z))" |
|
1412 |
||
1413 |
hd' :: "i => i" |
|
1414 |
--{*A version of @{term hd} that's always defined.*} |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1415 |
"hd'(xs) == if quasilist(xs) then hd(xs) else 0" |
13397 | 1416 |
|
1417 |
tl' :: "i => i" |
|
1418 |
--{*A version of @{term tl} that's always defined.*} |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1419 |
"tl'(xs) == if quasilist(xs) then tl(xs) else 0" |
13397 | 1420 |
|
1421 |
is_hd :: "[i=>o,i,i] => o" |
|
1422 |
--{* @{term "hd([]) = 0"} no constraints if not a list. |
|
1423 |
Avoiding implication prevents the simplifier's looping.*} |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1424 |
"is_hd(M,xs,H) == |
13397 | 1425 |
(is_Nil(M,xs) --> empty(M,H)) & |
1426 |
(\<forall>x[M]. \<forall>l[M]. ~ is_Cons(M,x,l,xs) | H=x) & |
|
1427 |
(is_quasilist(M,xs) | empty(M,H))" |
|
1428 |
||
1429 |
is_tl :: "[i=>o,i,i] => o" |
|
1430 |
--{* @{term "tl([]) = []"}; see comments about @{term is_hd}*} |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1431 |
"is_tl(M,xs,T) == |
13397 | 1432 |
(is_Nil(M,xs) --> T=xs) & |
1433 |
(\<forall>x[M]. \<forall>l[M]. ~ is_Cons(M,x,l,xs) | T=l) & |
|
1434 |
(is_quasilist(M,xs) | empty(M,T))" |
|
1435 |
||
1436 |
subsubsection{*@{term quasilist}: For Case-Splitting with @{term list_case'}*} |
|
1437 |
||
1438 |
lemma [iff]: "quasilist(Nil)" |
|
1439 |
by (simp add: quasilist_def) |
|
1440 |
||
1441 |
lemma [iff]: "quasilist(Cons(x,l))" |
|
1442 |
by (simp add: quasilist_def) |
|
1443 |
||
1444 |
lemma list_imp_quasilist: "l \<in> list(A) ==> quasilist(l)" |
|
1445 |
by (erule list.cases, simp_all) |
|
1446 |
||
1447 |
subsubsection{*@{term list_case'}, the Modified Version of @{term list_case}*} |
|
1448 |
||
1449 |
lemma list_case'_Nil [simp]: "list_case'(a,b,Nil) = a" |
|
1450 |
by (simp add: list_case'_def quasilist_def) |
|
1451 |
||
1452 |
lemma list_case'_Cons [simp]: "list_case'(a,b,Cons(x,l)) = b(x,l)" |
|
1453 |
by (simp add: list_case'_def quasilist_def) |
|
1454 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1455 |
lemma non_list_case: "~ quasilist(x) ==> list_case'(a,b,x) = 0" |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1456 |
by (simp add: quasilist_def list_case'_def) |
13397 | 1457 |
|
1458 |
lemma list_case'_eq_list_case [simp]: |
|
1459 |
"xs \<in> list(A) ==>list_case'(a,b,xs) = list_case(a,b,xs)" |
|
1460 |
by (erule list.cases, simp_all) |
|
1461 |
||
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1462 |
lemma (in M_basic) list_case'_closed [intro,simp]: |
13397 | 1463 |
"[|M(k); M(a); \<forall>x[M]. \<forall>y[M]. M(b(x,y))|] ==> M(list_case'(a,b,k))" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1464 |
apply (case_tac "quasilist(k)") |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1465 |
apply (simp add: quasilist_def, force) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1466 |
apply (simp add: non_list_case) |
13397 | 1467 |
done |
1468 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1469 |
lemma (in M_trivial) quasilist_abs [simp]: |
13397 | 1470 |
"M(z) ==> is_quasilist(M,z) <-> quasilist(z)" |
1471 |
by (auto simp add: is_quasilist_def quasilist_def) |
|
1472 |
||
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1473 |
lemma (in M_trivial) list_case_abs [simp]: |
13634 | 1474 |
"[| relation2(M,is_b,b); M(k); M(z) |] |
13397 | 1475 |
==> is_list_case(M,a,is_b,k,z) <-> z = list_case'(a,b,k)" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1476 |
apply (case_tac "quasilist(k)") |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1477 |
prefer 2 |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1478 |
apply (simp add: is_list_case_def non_list_case) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1479 |
apply (force simp add: quasilist_def) |
13397 | 1480 |
apply (simp add: quasilist_def is_list_case_def) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1481 |
apply (elim disjE exE) |
13634 | 1482 |
apply (simp_all add: relation2_def) |
13397 | 1483 |
done |
1484 |
||
1485 |
||
1486 |
subsubsection{*The Modified Operators @{term hd'} and @{term tl'}*} |
|
1487 |
||
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1488 |
lemma (in M_trivial) is_hd_Nil: "is_hd(M,[],Z) <-> empty(M,Z)" |
13505 | 1489 |
by (simp add: is_hd_def) |
13397 | 1490 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1491 |
lemma (in M_trivial) is_hd_Cons: |
13397 | 1492 |
"[|M(a); M(l)|] ==> is_hd(M,Cons(a,l),Z) <-> Z = a" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1493 |
by (force simp add: is_hd_def) |
13397 | 1494 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1495 |
lemma (in M_trivial) hd_abs [simp]: |
13397 | 1496 |
"[|M(x); M(y)|] ==> is_hd(M,x,y) <-> y = hd'(x)" |
1497 |
apply (simp add: hd'_def) |
|
1498 |
apply (intro impI conjI) |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1499 |
prefer 2 apply (force simp add: is_hd_def) |
13505 | 1500 |
apply (simp add: quasilist_def is_hd_def) |
13397 | 1501 |
apply (elim disjE exE, auto) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1502 |
done |
13397 | 1503 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1504 |
lemma (in M_trivial) is_tl_Nil: "is_tl(M,[],Z) <-> Z = []" |
13505 | 1505 |
by (simp add: is_tl_def) |
13397 | 1506 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1507 |
lemma (in M_trivial) is_tl_Cons: |
13397 | 1508 |
"[|M(a); M(l)|] ==> is_tl(M,Cons(a,l),Z) <-> Z = l" |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1509 |
by (force simp add: is_tl_def) |
13397 | 1510 |
|
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1511 |
lemma (in M_trivial) tl_abs [simp]: |
13397 | 1512 |
"[|M(x); M(y)|] ==> is_tl(M,x,y) <-> y = tl'(x)" |
1513 |
apply (simp add: tl'_def) |
|
1514 |
apply (intro impI conjI) |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1515 |
prefer 2 apply (force simp add: is_tl_def) |
13505 | 1516 |
apply (simp add: quasilist_def is_tl_def) |
13397 | 1517 |
apply (elim disjE exE, auto) |
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1518 |
done |
13397 | 1519 |
|
13634 | 1520 |
lemma (in M_trivial) relation1_tl: "relation1(M, is_tl(M), tl')" |
1521 |
by (simp add: relation1_def) |
|
13397 | 1522 |
|
1523 |
lemma hd'_Nil: "hd'([]) = 0" |
|
1524 |
by (simp add: hd'_def) |
|
1525 |
||
1526 |
lemma hd'_Cons: "hd'(Cons(a,l)) = a" |
|
1527 |
by (simp add: hd'_def) |
|
1528 |
||
1529 |
lemma tl'_Nil: "tl'([]) = []" |
|
1530 |
by (simp add: tl'_def) |
|
1531 |
||
1532 |
lemma tl'_Cons: "tl'(Cons(a,l)) = l" |
|
1533 |
by (simp add: tl'_def) |
|
1534 |
||
1535 |
lemma iterates_tl_Nil: "n \<in> nat ==> tl'^n ([]) = []" |
|
13628
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1536 |
apply (induct_tac n) |
87482b5e3f2e
Various simplifications of the Constructible theories
paulson
parents:
13615
diff
changeset
|
1537 |
apply (simp_all add: tl'_Nil) |
13397 | 1538 |
done |
1539 |
||
13564
1500a2e48d44
renamed M_triv_axioms to M_trivial and M_axioms to M_basic
paulson
parents:
13563
diff
changeset
|
1540 |
lemma (in M_basic) tl'_closed: "M(x) ==> M(tl'(x))" |
13397 | 1541 |
apply (simp add: tl'_def) |
1542 |
apply (force simp add: quasilist_def) |
|
1543 |
done |
|
1544 |
||
1545 |
||
13223 | 1546 |
end |