author | paulson |
Wed, 10 Jul 2002 16:54:07 +0200 | |
changeset 13339 | 0f89104dd377 |
parent 13323 | 2c287f50c9f3 |
child 13348 | 374d05460db4 |
permissions | -rw-r--r-- |
13223 | 1 |
header {*Relativization and Absoluteness*} |
2 |
||
3 |
theory Relative = Main: |
|
4 |
||
5 |
subsection{* Relativized versions of standard set-theoretic concepts *} |
|
6 |
||
7 |
constdefs |
|
8 |
empty :: "[i=>o,i] => o" |
|
13254 | 9 |
"empty(M,z) == \<forall>x[M]. x \<notin> z" |
13223 | 10 |
|
11 |
subset :: "[i=>o,i,i] => o" |
|
13298 | 12 |
"subset(M,A,B) == \<forall>x[M]. x\<in>A --> x \<in> B" |
13223 | 13 |
|
14 |
upair :: "[i=>o,i,i,i] => o" |
|
13298 | 15 |
"upair(M,a,b,z) == a \<in> z & b \<in> z & (\<forall>x[M]. x\<in>z --> x = a | x = b)" |
13223 | 16 |
|
17 |
pair :: "[i=>o,i,i,i] => o" |
|
13254 | 18 |
"pair(M,a,b,z) == \<exists>x[M]. upair(M,a,a,x) & |
19 |
(\<exists>y[M]. upair(M,a,b,y) & upair(M,x,y,z))" |
|
13223 | 20 |
|
13306 | 21 |
|
13245 | 22 |
union :: "[i=>o,i,i,i] => o" |
13254 | 23 |
"union(M,a,b,z) == \<forall>x[M]. x \<in> z <-> x \<in> a | x \<in> b" |
13245 | 24 |
|
13306 | 25 |
is_cons :: "[i=>o,i,i,i] => o" |
26 |
"is_cons(M,a,b,z) == \<exists>x[M]. upair(M,a,a,x) & union(M,x,b,z)" |
|
27 |
||
13223 | 28 |
successor :: "[i=>o,i,i] => o" |
13306 | 29 |
"successor(M,a,z) == is_cons(M,a,a,z)" |
13223 | 30 |
|
31 |
powerset :: "[i=>o,i,i] => o" |
|
13254 | 32 |
"powerset(M,A,z) == \<forall>x[M]. x \<in> z <-> subset(M,x,A)" |
13223 | 33 |
|
34 |
inter :: "[i=>o,i,i,i] => o" |
|
13254 | 35 |
"inter(M,a,b,z) == \<forall>x[M]. x \<in> z <-> x \<in> a & x \<in> b" |
13223 | 36 |
|
37 |
setdiff :: "[i=>o,i,i,i] => o" |
|
13254 | 38 |
"setdiff(M,a,b,z) == \<forall>x[M]. x \<in> z <-> x \<in> a & x \<notin> b" |
13223 | 39 |
|
40 |
big_union :: "[i=>o,i,i] => o" |
|
13298 | 41 |
"big_union(M,A,z) == \<forall>x[M]. x \<in> z <-> (\<exists>y[M]. y\<in>A & x \<in> y)" |
13223 | 42 |
|
43 |
big_inter :: "[i=>o,i,i] => o" |
|
44 |
"big_inter(M,A,z) == |
|
45 |
(A=0 --> z=0) & |
|
13298 | 46 |
(A\<noteq>0 --> (\<forall>x[M]. x \<in> z <-> (\<forall>y[M]. y\<in>A --> x \<in> y)))" |
13223 | 47 |
|
48 |
cartprod :: "[i=>o,i,i,i] => o" |
|
49 |
"cartprod(M,A,B,z) == |
|
13298 | 50 |
\<forall>u[M]. u \<in> z <-> (\<exists>x[M]. x\<in>A & (\<exists>y[M]. y\<in>B & pair(M,x,y,u)))" |
13223 | 51 |
|
52 |
is_converse :: "[i=>o,i,i] => o" |
|
53 |
"is_converse(M,r,z) == |
|
13299 | 54 |
\<forall>x[M]. x \<in> z <-> |
55 |
(\<exists>w[M]. w\<in>r & (\<exists>u[M]. \<exists>v[M]. pair(M,u,v,w) & pair(M,v,u,x)))" |
|
13223 | 56 |
|
57 |
pre_image :: "[i=>o,i,i,i] => o" |
|
58 |
"pre_image(M,r,A,z) == |
|
13299 | 59 |
\<forall>x[M]. x \<in> z <-> (\<exists>w[M]. w\<in>r & (\<exists>y[M]. y\<in>A & pair(M,x,y,w)))" |
13223 | 60 |
|
61 |
is_domain :: "[i=>o,i,i] => o" |
|
62 |
"is_domain(M,r,z) == |
|
13299 | 63 |
\<forall>x[M]. (x \<in> z <-> (\<exists>w[M]. w\<in>r & (\<exists>y[M]. pair(M,x,y,w))))" |
13223 | 64 |
|
65 |
image :: "[i=>o,i,i,i] => o" |
|
66 |
"image(M,r,A,z) == |
|
13299 | 67 |
\<forall>y[M]. (y \<in> z <-> (\<exists>w[M]. w\<in>r & (\<exists>x[M]. x\<in>A & pair(M,x,y,w))))" |
13223 | 68 |
|
69 |
is_range :: "[i=>o,i,i] => o" |
|
70 |
--{*the cleaner |
|
13299 | 71 |
@{term "\<exists>r'[M]. is_converse(M,r,r') & is_domain(M,r',z)"} |
13223 | 72 |
unfortunately needs an instance of separation in order to prove |
73 |
@{term "M(converse(r))"}.*} |
|
74 |
"is_range(M,r,z) == |
|
13299 | 75 |
\<forall>y[M]. (y \<in> z <-> (\<exists>w[M]. w\<in>r & (\<exists>x[M]. pair(M,x,y,w))))" |
13223 | 76 |
|
13245 | 77 |
is_field :: "[i=>o,i,i] => o" |
78 |
"is_field(M,r,z) == |
|
13298 | 79 |
\<exists>dr[M]. is_domain(M,r,dr) & |
80 |
(\<exists>rr[M]. is_range(M,r,rr) & union(M,dr,rr,z))" |
|
13245 | 81 |
|
13223 | 82 |
is_relation :: "[i=>o,i] => o" |
83 |
"is_relation(M,r) == |
|
13298 | 84 |
(\<forall>z[M]. z\<in>r --> (\<exists>x[M]. \<exists>y[M]. pair(M,x,y,z)))" |
13223 | 85 |
|
86 |
is_function :: "[i=>o,i] => o" |
|
87 |
"is_function(M,r) == |
|
13299 | 88 |
\<forall>x[M]. \<forall>y[M]. \<forall>y'[M]. \<forall>p[M]. \<forall>p'[M]. |
89 |
pair(M,x,y,p) --> pair(M,x,y',p') --> p\<in>r --> p'\<in>r --> y=y'" |
|
13223 | 90 |
|
91 |
fun_apply :: "[i=>o,i,i,i] => o" |
|
92 |
"fun_apply(M,f,x,y) == |
|
13299 | 93 |
(\<forall>y'[M]. (\<exists>u[M]. u\<in>f & pair(M,x,y',u)) <-> y=y')" |
13223 | 94 |
|
95 |
typed_function :: "[i=>o,i,i,i] => o" |
|
96 |
"typed_function(M,A,B,r) == |
|
97 |
is_function(M,r) & is_relation(M,r) & is_domain(M,r,A) & |
|
13306 | 98 |
(\<forall>u[M]. u\<in>r --> (\<forall>x[M]. \<forall>y[M]. pair(M,x,y,u) --> y\<in>B))" |
13223 | 99 |
|
13268 | 100 |
is_funspace :: "[i=>o,i,i,i] => o" |
101 |
"is_funspace(M,A,B,F) == |
|
102 |
\<forall>f[M]. f \<in> F <-> typed_function(M,A,B,f)" |
|
103 |
||
13245 | 104 |
composition :: "[i=>o,i,i,i] => o" |
105 |
"composition(M,r,s,t) == |
|
13306 | 106 |
\<forall>p[M]. p \<in> t <-> |
13323
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13319
diff
changeset
|
107 |
(\<exists>x[M]. \<exists>y[M]. \<exists>z[M]. \<exists>xy[M]. \<exists>yz[M]. |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13319
diff
changeset
|
108 |
pair(M,x,z,p) & pair(M,x,y,xy) & pair(M,y,z,yz) & |
2c287f50c9f3
More relativization, reflection and proofs of separation
paulson
parents:
13319
diff
changeset
|
109 |
xy \<in> s & yz \<in> r)" |
13245 | 110 |
|
13223 | 111 |
injection :: "[i=>o,i,i,i] => o" |
112 |
"injection(M,A,B,f) == |
|
113 |
typed_function(M,A,B,f) & |
|
13306 | 114 |
(\<forall>x[M]. \<forall>x'[M]. \<forall>y[M]. \<forall>p[M]. \<forall>p'[M]. |
115 |
pair(M,x,y,p) --> pair(M,x',y,p') --> p\<in>f --> p'\<in>f --> x=x')" |
|
13223 | 116 |
|
117 |
surjection :: "[i=>o,i,i,i] => o" |
|
118 |
"surjection(M,A,B,f) == |
|
119 |
typed_function(M,A,B,f) & |
|
13299 | 120 |
(\<forall>y[M]. y\<in>B --> (\<exists>x[M]. x\<in>A & fun_apply(M,f,x,y)))" |
13223 | 121 |
|
122 |
bijection :: "[i=>o,i,i,i] => o" |
|
123 |
"bijection(M,A,B,f) == injection(M,A,B,f) & surjection(M,A,B,f)" |
|
124 |
||
125 |
restriction :: "[i=>o,i,i,i] => o" |
|
126 |
"restriction(M,r,A,z) == |
|
13306 | 127 |
\<forall>x[M]. x \<in> z <-> (x \<in> r & (\<exists>u[M]. u\<in>A & (\<exists>v[M]. pair(M,u,v,x))))" |
13223 | 128 |
|
129 |
transitive_set :: "[i=>o,i] => o" |
|
13299 | 130 |
"transitive_set(M,a) == \<forall>x[M]. x\<in>a --> subset(M,x,a)" |
13223 | 131 |
|
132 |
ordinal :: "[i=>o,i] => o" |
|
133 |
--{*an ordinal is a transitive set of transitive sets*} |
|
13299 | 134 |
"ordinal(M,a) == transitive_set(M,a) & (\<forall>x[M]. x\<in>a --> transitive_set(M,x))" |
13223 | 135 |
|
136 |
limit_ordinal :: "[i=>o,i] => o" |
|
137 |
--{*a limit ordinal is a non-empty, successor-closed ordinal*} |
|
138 |
"limit_ordinal(M,a) == |
|
139 |
ordinal(M,a) & ~ empty(M,a) & |
|
13299 | 140 |
(\<forall>x[M]. x\<in>a --> (\<exists>y[M]. y\<in>a & successor(M,x,y)))" |
13223 | 141 |
|
142 |
successor_ordinal :: "[i=>o,i] => o" |
|
143 |
--{*a successor ordinal is any ordinal that is neither empty nor limit*} |
|
144 |
"successor_ordinal(M,a) == |
|
145 |
ordinal(M,a) & ~ empty(M,a) & ~ limit_ordinal(M,a)" |
|
146 |
||
147 |
finite_ordinal :: "[i=>o,i] => o" |
|
148 |
--{*an ordinal is finite if neither it nor any of its elements are limit*} |
|
149 |
"finite_ordinal(M,a) == |
|
150 |
ordinal(M,a) & ~ limit_ordinal(M,a) & |
|
13299 | 151 |
(\<forall>x[M]. x\<in>a --> ~ limit_ordinal(M,x))" |
13223 | 152 |
|
153 |
omega :: "[i=>o,i] => o" |
|
154 |
--{*omega is a limit ordinal none of whose elements are limit*} |
|
13299 | 155 |
"omega(M,a) == limit_ordinal(M,a) & (\<forall>x[M]. x\<in>a --> ~ limit_ordinal(M,x))" |
13223 | 156 |
|
157 |
number1 :: "[i=>o,i] => o" |
|
13299 | 158 |
"number1(M,a) == (\<exists>x[M]. empty(M,x) & successor(M,x,a))" |
13223 | 159 |
|
160 |
number2 :: "[i=>o,i] => o" |
|
13299 | 161 |
"number2(M,a) == (\<exists>x[M]. number1(M,x) & successor(M,x,a))" |
13223 | 162 |
|
163 |
number3 :: "[i=>o,i] => o" |
|
13299 | 164 |
"number3(M,a) == (\<exists>x[M]. number2(M,x) & successor(M,x,a))" |
13223 | 165 |
|
166 |
||
167 |
subsection {*The relativized ZF axioms*} |
|
168 |
constdefs |
|
169 |
||
170 |
extensionality :: "(i=>o) => o" |
|
171 |
"extensionality(M) == |
|
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
172 |
\<forall>x[M]. \<forall>y[M]. (\<forall>z[M]. z \<in> x <-> z \<in> y) --> x=y" |
13223 | 173 |
|
174 |
separation :: "[i=>o, i=>o] => o" |
|
175 |
--{*Big problem: the formula @{text P} should only involve parameters |
|
176 |
belonging to @{text M}. Don't see how to enforce that.*} |
|
177 |
"separation(M,P) == |
|
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
178 |
\<forall>z[M]. \<exists>y[M]. \<forall>x[M]. x \<in> y <-> x \<in> z & P(x)" |
13223 | 179 |
|
180 |
upair_ax :: "(i=>o) => o" |
|
13299 | 181 |
"upair_ax(M) == \<forall>x y. M(x) --> M(y) --> (\<exists>z[M]. upair(M,x,y,z))" |
13223 | 182 |
|
183 |
Union_ax :: "(i=>o) => o" |
|
13299 | 184 |
"Union_ax(M) == \<forall>x[M]. (\<exists>z[M]. big_union(M,x,z))" |
13223 | 185 |
|
186 |
power_ax :: "(i=>o) => o" |
|
13299 | 187 |
"power_ax(M) == \<forall>x[M]. (\<exists>z[M]. powerset(M,x,z))" |
13223 | 188 |
|
189 |
univalent :: "[i=>o, i, [i,i]=>o] => o" |
|
190 |
"univalent(M,A,P) == |
|
13299 | 191 |
(\<forall>x[M]. x\<in>A --> (\<forall>y z. M(y) --> M(z) --> P(x,y) & P(x,z) --> y=z))" |
13223 | 192 |
|
193 |
replacement :: "[i=>o, [i,i]=>o] => o" |
|
194 |
"replacement(M,P) == |
|
13299 | 195 |
\<forall>A[M]. univalent(M,A,P) --> |
196 |
(\<exists>Y[M]. (\<forall>b[M]. ((\<exists>x[M]. x\<in>A & P(x,b)) --> b \<in> Y)))" |
|
13223 | 197 |
|
198 |
strong_replacement :: "[i=>o, [i,i]=>o] => o" |
|
199 |
"strong_replacement(M,P) == |
|
13299 | 200 |
\<forall>A[M]. univalent(M,A,P) --> |
201 |
(\<exists>Y[M]. (\<forall>b[M]. (b \<in> Y <-> (\<exists>x[M]. x\<in>A & P(x,b)))))" |
|
13223 | 202 |
|
203 |
foundation_ax :: "(i=>o) => o" |
|
204 |
"foundation_ax(M) == |
|
13299 | 205 |
\<forall>x[M]. (\<exists>y\<in>x. M(y)) |
206 |
--> (\<exists>y[M]. y\<in>x & ~(\<exists>z[M]. z\<in>x & z \<in> y))" |
|
13223 | 207 |
|
208 |
||
209 |
subsection{*A trivial consistency proof for $V_\omega$ *} |
|
210 |
||
211 |
text{*We prove that $V_\omega$ |
|
212 |
(or @{text univ} in Isabelle) satisfies some ZF axioms. |
|
213 |
Kunen, Theorem IV 3.13, page 123.*} |
|
214 |
||
215 |
lemma univ0_downwards_mem: "[| y \<in> x; x \<in> univ(0) |] ==> y \<in> univ(0)" |
|
216 |
apply (insert Transset_univ [OF Transset_0]) |
|
217 |
apply (simp add: Transset_def, blast) |
|
218 |
done |
|
219 |
||
220 |
lemma univ0_Ball_abs [simp]: |
|
221 |
"A \<in> univ(0) ==> (\<forall>x\<in>A. x \<in> univ(0) --> P(x)) <-> (\<forall>x\<in>A. P(x))" |
|
222 |
by (blast intro: univ0_downwards_mem) |
|
223 |
||
224 |
lemma univ0_Bex_abs [simp]: |
|
225 |
"A \<in> univ(0) ==> (\<exists>x\<in>A. x \<in> univ(0) & P(x)) <-> (\<exists>x\<in>A. P(x))" |
|
226 |
by (blast intro: univ0_downwards_mem) |
|
227 |
||
228 |
text{*Congruence rule for separation: can assume the variable is in @{text M}*} |
|
13254 | 229 |
lemma separation_cong [cong]: |
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
230 |
"(!!x. M(x) ==> P(x) <-> P'(x)) |
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
231 |
==> separation(M, %x. P(x)) <-> separation(M, %x. P'(x))" |
13223 | 232 |
by (simp add: separation_def) |
233 |
||
234 |
text{*Congruence rules for replacement*} |
|
13254 | 235 |
lemma univalent_cong [cong]: |
13223 | 236 |
"[| 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
|
237 |
==> univalent(M, A, %x y. P(x,y)) <-> univalent(M, A', %x y. P'(x,y))" |
13223 | 238 |
by (simp add: univalent_def) |
239 |
||
13254 | 240 |
lemma strong_replacement_cong [cong]: |
13223 | 241 |
"[| !!x y. [| 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
|
242 |
==> strong_replacement(M, %x y. P(x,y)) <-> |
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
243 |
strong_replacement(M, %x y. P'(x,y))" |
13223 | 244 |
by (simp add: strong_replacement_def) |
245 |
||
246 |
text{*The extensionality axiom*} |
|
247 |
lemma "extensionality(\<lambda>x. x \<in> univ(0))" |
|
248 |
apply (simp add: extensionality_def) |
|
249 |
apply (blast intro: univ0_downwards_mem) |
|
250 |
done |
|
251 |
||
252 |
text{*The separation axiom requires some lemmas*} |
|
253 |
lemma Collect_in_Vfrom: |
|
254 |
"[| X \<in> Vfrom(A,j); Transset(A) |] ==> Collect(X,P) \<in> Vfrom(A, succ(j))" |
|
255 |
apply (drule Transset_Vfrom) |
|
256 |
apply (rule subset_mem_Vfrom) |
|
257 |
apply (unfold Transset_def, blast) |
|
258 |
done |
|
259 |
||
260 |
lemma Collect_in_VLimit: |
|
261 |
"[| X \<in> Vfrom(A,i); Limit(i); Transset(A) |] |
|
262 |
==> Collect(X,P) \<in> Vfrom(A,i)" |
|
263 |
apply (rule Limit_VfromE, assumption+) |
|
264 |
apply (blast intro: Limit_has_succ VfromI Collect_in_Vfrom) |
|
265 |
done |
|
266 |
||
267 |
lemma Collect_in_univ: |
|
268 |
"[| X \<in> univ(A); Transset(A) |] ==> Collect(X,P) \<in> univ(A)" |
|
269 |
by (simp add: univ_def Collect_in_VLimit Limit_nat) |
|
270 |
||
271 |
lemma "separation(\<lambda>x. x \<in> univ(0), P)" |
|
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
272 |
apply (simp add: separation_def, clarify) |
13339
0f89104dd377
Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents:
13323
diff
changeset
|
273 |
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
|
274 |
apply (blast intro: Collect_in_univ Transset_0)+ |
13223 | 275 |
done |
276 |
||
277 |
text{*Unordered pairing axiom*} |
|
278 |
lemma "upair_ax(\<lambda>x. x \<in> univ(0))" |
|
279 |
apply (simp add: upair_ax_def upair_def) |
|
280 |
apply (blast intro: doubleton_in_univ) |
|
281 |
done |
|
282 |
||
283 |
text{*Union axiom*} |
|
284 |
lemma "Union_ax(\<lambda>x. x \<in> univ(0))" |
|
13299 | 285 |
apply (simp add: Union_ax_def big_union_def, clarify) |
286 |
apply (rule_tac x="\<Union>x" in bexI) |
|
287 |
apply (blast intro: univ0_downwards_mem) |
|
288 |
apply (blast intro: Union_in_univ Transset_0) |
|
13223 | 289 |
done |
290 |
||
291 |
text{*Powerset axiom*} |
|
292 |
||
293 |
lemma Pow_in_univ: |
|
294 |
"[| X \<in> univ(A); Transset(A) |] ==> Pow(X) \<in> univ(A)" |
|
295 |
apply (simp add: univ_def Pow_in_VLimit Limit_nat) |
|
296 |
done |
|
297 |
||
298 |
lemma "power_ax(\<lambda>x. x \<in> univ(0))" |
|
13299 | 299 |
apply (simp add: power_ax_def powerset_def subset_def, clarify) |
300 |
apply (rule_tac x="Pow(x)" in bexI) |
|
301 |
apply (blast intro: univ0_downwards_mem) |
|
302 |
apply (blast intro: Pow_in_univ Transset_0) |
|
13223 | 303 |
done |
304 |
||
305 |
text{*Foundation axiom*} |
|
306 |
lemma "foundation_ax(\<lambda>x. x \<in> univ(0))" |
|
307 |
apply (simp add: foundation_ax_def, clarify) |
|
13299 | 308 |
apply (cut_tac A=x in foundation) |
309 |
apply (blast intro: univ0_downwards_mem) |
|
13223 | 310 |
done |
311 |
||
312 |
lemma "replacement(\<lambda>x. x \<in> univ(0), P)" |
|
313 |
apply (simp add: replacement_def, clarify) |
|
314 |
oops |
|
315 |
text{*no idea: maybe prove by induction on the rank of A?*} |
|
316 |
||
317 |
text{*Still missing: Replacement, Choice*} |
|
318 |
||
319 |
subsection{*lemmas needed to reduce some set constructions to instances |
|
320 |
of Separation*} |
|
321 |
||
322 |
lemma image_iff_Collect: "r `` A = {y \<in> Union(Union(r)). \<exists>p\<in>r. \<exists>x\<in>A. p=<x,y>}" |
|
323 |
apply (rule equalityI, auto) |
|
324 |
apply (simp add: Pair_def, blast) |
|
325 |
done |
|
326 |
||
327 |
lemma vimage_iff_Collect: |
|
328 |
"r -`` A = {x \<in> Union(Union(r)). \<exists>p\<in>r. \<exists>y\<in>A. p=<x,y>}" |
|
329 |
apply (rule equalityI, auto) |
|
330 |
apply (simp add: Pair_def, blast) |
|
331 |
done |
|
332 |
||
333 |
text{*These two lemmas lets us prove @{text domain_closed} and |
|
334 |
@{text range_closed} without new instances of separation*} |
|
335 |
||
336 |
lemma domain_eq_vimage: "domain(r) = r -`` Union(Union(r))" |
|
337 |
apply (rule equalityI, auto) |
|
338 |
apply (rule vimageI, assumption) |
|
339 |
apply (simp add: Pair_def, blast) |
|
340 |
done |
|
341 |
||
342 |
lemma range_eq_image: "range(r) = r `` Union(Union(r))" |
|
343 |
apply (rule equalityI, auto) |
|
344 |
apply (rule imageI, assumption) |
|
345 |
apply (simp add: Pair_def, blast) |
|
346 |
done |
|
347 |
||
348 |
lemma replacementD: |
|
349 |
"[| replacement(M,P); M(A); univalent(M,A,P) |] |
|
13299 | 350 |
==> \<exists>Y[M]. (\<forall>b[M]. ((\<exists>x[M]. x\<in>A & P(x,b)) --> b \<in> Y))" |
13223 | 351 |
by (simp add: replacement_def) |
352 |
||
353 |
lemma strong_replacementD: |
|
354 |
"[| strong_replacement(M,P); M(A); univalent(M,A,P) |] |
|
13299 | 355 |
==> \<exists>Y[M]. (\<forall>b[M]. (b \<in> Y <-> (\<exists>x[M]. x\<in>A & P(x,b))))" |
13223 | 356 |
by (simp add: strong_replacement_def) |
357 |
||
358 |
lemma separationD: |
|
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
359 |
"[| separation(M,P); M(z) |] ==> \<exists>y[M]. \<forall>x[M]. x \<in> y <-> x \<in> z & P(x)" |
13223 | 360 |
by (simp add: separation_def) |
361 |
||
362 |
||
363 |
text{*More constants, for order types*} |
|
364 |
constdefs |
|
365 |
||
366 |
order_isomorphism :: "[i=>o,i,i,i,i,i] => o" |
|
367 |
"order_isomorphism(M,A,r,B,s,f) == |
|
368 |
bijection(M,A,B,f) & |
|
13306 | 369 |
(\<forall>x[M]. x\<in>A --> (\<forall>y[M]. y\<in>A --> |
370 |
(\<forall>p[M]. \<forall>fx[M]. \<forall>fy[M]. \<forall>q[M]. |
|
13223 | 371 |
pair(M,x,y,p) --> fun_apply(M,f,x,fx) --> fun_apply(M,f,y,fy) --> |
13306 | 372 |
pair(M,fx,fy,q) --> (p\<in>r <-> q\<in>s))))" |
13223 | 373 |
|
374 |
pred_set :: "[i=>o,i,i,i,i] => o" |
|
375 |
"pred_set(M,A,x,r,B) == |
|
13299 | 376 |
\<forall>y[M]. y \<in> B <-> (\<exists>p[M]. p\<in>r & y \<in> A & pair(M,y,x,p))" |
13223 | 377 |
|
378 |
membership :: "[i=>o,i,i] => o" --{*membership relation*} |
|
379 |
"membership(M,A,r) == |
|
13306 | 380 |
\<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 | 381 |
|
382 |
||
383 |
subsection{*Absoluteness for a transitive class model*} |
|
384 |
||
385 |
text{*The class M is assumed to be transitive and to satisfy some |
|
386 |
relativized ZF axioms*} |
|
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
387 |
locale M_triv_axioms = |
13223 | 388 |
fixes M |
389 |
assumes transM: "[| y\<in>x; M(x) |] ==> M(y)" |
|
390 |
and nonempty [simp]: "M(0)" |
|
391 |
and upair_ax: "upair_ax(M)" |
|
392 |
and Union_ax: "Union_ax(M)" |
|
393 |
and power_ax: "power_ax(M)" |
|
394 |
and replacement: "replacement(M,P)" |
|
13268 | 395 |
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
|
396 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
397 |
lemma (in M_triv_axioms) ball_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
398 |
"M(A) ==> (\<forall>x\<in>A. M(x) --> P(x)) <-> (\<forall>x\<in>A. P(x))" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
399 |
by (blast intro: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
400 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
401 |
lemma (in M_triv_axioms) rall_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
402 |
"M(A) ==> (\<forall>x[M]. x\<in>A --> P(x)) <-> (\<forall>x\<in>A. P(x))" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
403 |
by (blast intro: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
404 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
405 |
lemma (in M_triv_axioms) bex_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
406 |
"M(A) ==> (\<exists>x\<in>A. M(x) & P(x)) <-> (\<exists>x\<in>A. P(x))" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
407 |
by (blast intro: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
408 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
409 |
lemma (in M_triv_axioms) rex_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
410 |
"M(A) ==> (\<exists>x[M]. x\<in>A & P(x)) <-> (\<exists>x\<in>A. P(x))" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
411 |
by (blast intro: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
412 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
413 |
lemma (in M_triv_axioms) ball_iff_equiv: |
13299 | 414 |
"M(A) ==> (\<forall>x[M]. (x\<in>A <-> P(x))) <-> |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
415 |
(\<forall>x\<in>A. P(x)) & (\<forall>x. P(x) --> M(x) --> x\<in>A)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
416 |
by (blast intro: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
417 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
418 |
text{*Simplifies proofs of equalities when there's an iff-equality |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
419 |
available for rewriting, universally quantified over M. *} |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
420 |
lemma (in M_triv_axioms) M_equalityI: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
421 |
"[| !!x. M(x) ==> x\<in>A <-> x\<in>B; M(A); M(B) |] ==> A=B" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
422 |
by (blast intro!: equalityI dest: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
423 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
424 |
lemma (in M_triv_axioms) empty_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
425 |
"M(z) ==> empty(M,z) <-> z=0" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
426 |
apply (simp add: empty_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
427 |
apply (blast intro: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
428 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
429 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
430 |
lemma (in M_triv_axioms) subset_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
431 |
"M(A) ==> subset(M,A,B) <-> A \<subseteq> B" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
432 |
apply (simp add: subset_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
433 |
apply (blast intro: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
434 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
435 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
436 |
lemma (in M_triv_axioms) upair_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
437 |
"M(z) ==> upair(M,a,b,z) <-> z={a,b}" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
438 |
apply (simp add: upair_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
439 |
apply (blast intro: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
440 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
441 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
442 |
lemma (in M_triv_axioms) upair_in_M_iff [iff]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
443 |
"M({a,b}) <-> M(a) & M(b)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
444 |
apply (insert upair_ax, simp add: upair_ax_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
445 |
apply (blast intro: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
446 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
447 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
448 |
lemma (in M_triv_axioms) singleton_in_M_iff [iff]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
449 |
"M({a}) <-> M(a)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
450 |
by (insert upair_in_M_iff [of a a], simp) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
451 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
452 |
lemma (in M_triv_axioms) pair_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
453 |
"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
|
454 |
apply (simp add: pair_def ZF.Pair_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
455 |
apply (blast intro: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
456 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
457 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
458 |
lemma (in M_triv_axioms) pair_in_M_iff [iff]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
459 |
"M(<a,b>) <-> M(a) & M(b)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
460 |
by (simp add: ZF.Pair_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
461 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
462 |
lemma (in M_triv_axioms) pair_components_in_M: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
463 |
"[| <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
|
464 |
apply (simp add: Pair_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
465 |
apply (blast dest: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
466 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
467 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
468 |
lemma (in M_triv_axioms) cartprod_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
469 |
"[| 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
|
470 |
apply (simp add: cartprod_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
471 |
apply (rule iffI) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
472 |
apply (blast intro!: equalityI intro: transM dest!: rspec) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
473 |
apply (blast dest: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
474 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
475 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
476 |
lemma (in M_triv_axioms) union_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
477 |
"[| M(a); M(b); M(z) |] ==> union(M,a,b,z) <-> z = a Un b" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
478 |
apply (simp add: union_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
479 |
apply (blast intro: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
480 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
481 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
482 |
lemma (in M_triv_axioms) inter_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
483 |
"[| M(a); M(b); M(z) |] ==> inter(M,a,b,z) <-> z = a Int b" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
484 |
apply (simp add: inter_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
485 |
apply (blast intro: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
486 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
487 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
488 |
lemma (in M_triv_axioms) setdiff_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
489 |
"[| M(a); M(b); M(z) |] ==> setdiff(M,a,b,z) <-> z = a-b" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
490 |
apply (simp add: setdiff_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
491 |
apply (blast intro: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
492 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
493 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
494 |
lemma (in M_triv_axioms) Union_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
495 |
"[| M(A); M(z) |] ==> big_union(M,A,z) <-> z = Union(A)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
496 |
apply (simp add: big_union_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
497 |
apply (blast intro!: equalityI dest: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
498 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
499 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
500 |
lemma (in M_triv_axioms) Union_closed [intro,simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
501 |
"M(A) ==> M(Union(A))" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
502 |
by (insert Union_ax, simp add: Union_ax_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
503 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
504 |
lemma (in M_triv_axioms) Un_closed [intro,simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
505 |
"[| M(A); M(B) |] ==> M(A Un B)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
506 |
by (simp only: Un_eq_Union, blast) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
507 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
508 |
lemma (in M_triv_axioms) cons_closed [intro,simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
509 |
"[| M(a); M(A) |] ==> M(cons(a,A))" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
510 |
by (subst cons_eq [symmetric], blast) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
511 |
|
13306 | 512 |
lemma (in M_triv_axioms) cons_abs [simp]: |
513 |
"[| M(b); M(z) |] ==> is_cons(M,a,b,z) <-> z = cons(a,b)" |
|
514 |
by (simp add: is_cons_def, blast intro: transM) |
|
515 |
||
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
516 |
lemma (in M_triv_axioms) successor_abs [simp]: |
13306 | 517 |
"[| M(a); M(z) |] ==> successor(M,a,z) <-> z = succ(a)" |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
518 |
by (simp add: successor_def, blast) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
519 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
520 |
lemma (in M_triv_axioms) succ_in_M_iff [iff]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
521 |
"M(succ(a)) <-> M(a)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
522 |
apply (simp add: succ_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
523 |
apply (blast intro: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
524 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
525 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
526 |
lemma (in M_triv_axioms) separation_closed [intro,simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
527 |
"[| separation(M,P); M(A) |] ==> M(Collect(A,P))" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
528 |
apply (insert separation, simp add: separation_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
529 |
apply (drule rspec, assumption, clarify) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
530 |
apply (subgoal_tac "y = Collect(A,P)", blast) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
531 |
apply (blast dest: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
532 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
533 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
534 |
text{*Probably the premise and conclusion are equivalent*} |
13306 | 535 |
lemma (in M_triv_axioms) strong_replacementI [OF rallI]: |
536 |
"[| \<forall>A[M]. separation(M, %u. \<exists>x[M]. x\<in>A & P(x,u)) |] |
|
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
537 |
==> strong_replacement(M,P)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
538 |
apply (simp add: strong_replacement_def, clarify) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
539 |
apply (frule replacementD [OF replacement], assumption, clarify) |
13299 | 540 |
apply (drule_tac x=A in rspec, clarify) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
541 |
apply (drule_tac z=Y in separationD, assumption, clarify) |
13299 | 542 |
apply (rule_tac x=y in rexI) |
543 |
apply (blast dest: transM)+ |
|
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
544 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
545 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
546 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
547 |
(*The last premise expresses that P takes M to M*) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
548 |
lemma (in M_triv_axioms) strong_replacement_closed [intro,simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
549 |
"[| strong_replacement(M,P); M(A); univalent(M,A,P); |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
550 |
!!x y. [| x\<in>A; P(x,y); M(x) |] ==> M(y) |] ==> M(Replace(A,P))" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
551 |
apply (simp add: strong_replacement_def) |
13299 | 552 |
apply (drule rspec, auto) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
553 |
apply (subgoal_tac "Replace(A,P) = Y") |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
554 |
apply simp |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
555 |
apply (rule equality_iffI) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
556 |
apply (simp add: Replace_iff, safe) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
557 |
apply (blast dest: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
558 |
apply (frule transM, assumption) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
559 |
apply (simp add: univalent_def) |
13299 | 560 |
apply (drule rspec [THEN iffD1], assumption, assumption) |
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
561 |
apply (blast dest: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
562 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
563 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
564 |
(*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
|
565 |
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
|
566 |
Let K be a nonconstructible subset of nat and define |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
567 |
f(x) = x if x:K and f(x)=0 otherwise. Then RepFun(nat,f) = cons(0,K), a |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
568 |
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
|
569 |
even for f : M -> M. |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
570 |
*) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
571 |
lemma (in M_triv_axioms) RepFun_closed [intro,simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
572 |
"[| 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
|
573 |
==> M(RepFun(A,f))" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
574 |
apply (simp add: RepFun_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
575 |
apply (rule strong_replacement_closed) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
576 |
apply (auto dest: transM simp add: univalent_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
577 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
578 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
579 |
lemma (in M_triv_axioms) lam_closed [intro,simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
580 |
"[| 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
|
581 |
==> M(\<lambda>x\<in>A. b(x))" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
582 |
by (simp add: lam_def, blast dest: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
583 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
584 |
lemma (in M_triv_axioms) image_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
585 |
"[| 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
|
586 |
apply (simp add: image_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
587 |
apply (rule iffI) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
588 |
apply (blast intro!: equalityI dest: transM, blast) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
589 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
590 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
591 |
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
|
592 |
This result is one direction of absoluteness.*} |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
593 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
594 |
lemma (in M_triv_axioms) powerset_Pow: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
595 |
"powerset(M, x, Pow(x))" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
596 |
by (simp add: powerset_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
597 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
598 |
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
|
599 |
real powerset.*} |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
600 |
lemma (in M_triv_axioms) powerset_imp_subset_Pow: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
601 |
"[| powerset(M,x,y); M(y) |] ==> y <= Pow(x)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
602 |
apply (simp add: powerset_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
603 |
apply (blast dest: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
604 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
605 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
606 |
lemma (in M_triv_axioms) nat_into_M [intro]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
607 |
"n \<in> nat ==> M(n)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
608 |
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
|
609 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
610 |
lemma (in M_triv_axioms) nat_case_closed: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
611 |
"[|M(k); M(a); \<forall>m[M]. M(b(m))|] ==> M(nat_case(a,b,k))" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
612 |
apply (case_tac "k=0", simp) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
613 |
apply (case_tac "\<exists>m. k = succ(m)", force) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
614 |
apply (simp add: nat_case_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
615 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
616 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
617 |
lemma (in M_triv_axioms) Inl_in_M_iff [iff]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
618 |
"M(Inl(a)) <-> M(a)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
619 |
by (simp add: Inl_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
620 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
621 |
lemma (in M_triv_axioms) Inr_in_M_iff [iff]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
622 |
"M(Inr(a)) <-> M(a)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
623 |
by (simp add: Inr_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
624 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
625 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
626 |
subsection{*Absoluteness for ordinals*} |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
627 |
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
|
628 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
629 |
lemma (in M_triv_axioms) lt_closed: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
630 |
"[| j<i; M(i) |] ==> M(j)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
631 |
by (blast dest: ltD intro: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
632 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
633 |
lemma (in M_triv_axioms) transitive_set_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
634 |
"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
|
635 |
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
|
636 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
637 |
lemma (in M_triv_axioms) ordinal_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
638 |
"M(a) ==> ordinal(M,a) <-> Ord(a)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
639 |
by (simp add: ordinal_def Ord_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
640 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
641 |
lemma (in M_triv_axioms) limit_ordinal_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
642 |
"M(a) ==> limit_ordinal(M,a) <-> Limit(a)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
643 |
apply (simp add: limit_ordinal_def Ord_0_lt_iff Limit_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
644 |
apply (simp add: lt_def, blast) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
645 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
646 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
647 |
lemma (in M_triv_axioms) successor_ordinal_abs [simp]: |
13299 | 648 |
"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
|
649 |
apply (simp add: successor_ordinal_def, safe) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
650 |
apply (drule Ord_cases_disj, auto) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
651 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
652 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
653 |
lemma finite_Ord_is_nat: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
654 |
"[| 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
|
655 |
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
|
656 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
657 |
lemma naturals_not_limit: "a \<in> nat ==> ~ Limit(a)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
658 |
by (induct a rule: nat_induct, auto) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
659 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
660 |
lemma (in M_triv_axioms) finite_ordinal_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
661 |
"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
|
662 |
apply (simp add: finite_ordinal_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
663 |
apply (blast intro: finite_Ord_is_nat intro: nat_into_Ord |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
664 |
dest: Ord_trans naturals_not_limit) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
665 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
666 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
667 |
lemma Limit_non_Limit_implies_nat: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
668 |
"[| Limit(a); \<forall>x\<in>a. ~ Limit(x) |] ==> a = nat" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
669 |
apply (rule le_anti_sym) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
670 |
apply (rule all_lt_imp_le, blast, blast intro: Limit_is_Ord) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
671 |
apply (simp add: lt_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
672 |
apply (blast intro: Ord_in_Ord Ord_trans finite_Ord_is_nat) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
673 |
apply (erule nat_le_Limit) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
674 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
675 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
676 |
lemma (in M_triv_axioms) omega_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
677 |
"M(a) ==> omega(M,a) <-> a = nat" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
678 |
apply (simp add: omega_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
679 |
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
|
680 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
681 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
682 |
lemma (in M_triv_axioms) number1_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
683 |
"M(a) ==> number1(M,a) <-> a = 1" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
684 |
by (simp add: number1_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
685 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
686 |
lemma (in M_triv_axioms) number1_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
687 |
"M(a) ==> number2(M,a) <-> a = succ(1)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
688 |
by (simp add: number2_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
689 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
690 |
lemma (in M_triv_axioms) number3_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
691 |
"M(a) ==> number3(M,a) <-> a = succ(succ(1))" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
692 |
by (simp add: number3_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
693 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
694 |
text{*Kunen continued to 20...*} |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
695 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
696 |
(*Could not get this to work. The \<lambda>x\<in>nat is essential because everything |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
697 |
but the recursion variable must stay unchanged. But then the recursion |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
698 |
equations only hold for x\<in>nat (or in some other set) and not for the |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
699 |
whole of the class M. |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
700 |
consts |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
701 |
natnumber_aux :: "[i=>o,i] => i" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
702 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
703 |
primrec |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
704 |
"natnumber_aux(M,0) = (\<lambda>x\<in>nat. if empty(M,x) then 1 else 0)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
705 |
"natnumber_aux(M,succ(n)) = |
13299 | 706 |
(\<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
|
707 |
then 1 else 0)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
708 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
709 |
constdefs |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
710 |
natnumber :: "[i=>o,i,i] => o" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
711 |
"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
|
712 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
713 |
lemma (in M_triv_axioms) [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
714 |
"natnumber(M,0,x) == x=0" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
715 |
*) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
716 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
717 |
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
|
718 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
719 |
locale M_axioms = M_triv_axioms + |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
720 |
assumes Inter_separation: |
13268 | 721 |
"M(A) ==> separation(M, \<lambda>x. \<forall>y[M]. y\<in>A --> x\<in>y)" |
13223 | 722 |
and cartprod_separation: |
723 |
"[| M(A); M(B) |] |
|
13298 | 724 |
==> separation(M, \<lambda>z. \<exists>x[M]. x\<in>A & (\<exists>y[M]. y\<in>B & pair(M,x,y,z)))" |
13223 | 725 |
and image_separation: |
726 |
"[| M(A); M(r) |] |
|
13268 | 727 |
==> separation(M, \<lambda>y. \<exists>p[M]. p\<in>r & (\<exists>x[M]. x\<in>A & pair(M,x,y,p)))" |
13223 | 728 |
and converse_separation: |
13298 | 729 |
"M(r) ==> separation(M, |
730 |
\<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 | 731 |
and restrict_separation: |
13268 | 732 |
"M(A) ==> separation(M, \<lambda>z. \<exists>x[M]. x\<in>A & (\<exists>y[M]. pair(M,x,y,z)))" |
13223 | 733 |
and comp_separation: |
734 |
"[| M(r); M(s) |] |
|
13268 | 735 |
==> separation(M, \<lambda>xz. \<exists>x[M]. \<exists>y[M]. \<exists>z[M]. \<exists>xy[M]. \<exists>yz[M]. |
736 |
pair(M,x,z,xz) & pair(M,x,y,xy) & pair(M,y,z,yz) & |
|
737 |
xy\<in>s & yz\<in>r)" |
|
13223 | 738 |
and pred_separation: |
13298 | 739 |
"[| M(r); M(x) |] ==> separation(M, \<lambda>y. \<exists>p[M]. p\<in>r & pair(M,y,x,p))" |
13223 | 740 |
and Memrel_separation: |
13298 | 741 |
"separation(M, \<lambda>z. \<exists>x[M]. \<exists>y[M]. pair(M,x,y,z) & x \<in> y)" |
13268 | 742 |
and funspace_succ_replacement: |
743 |
"M(n) ==> |
|
13306 | 744 |
strong_replacement(M, \<lambda>p z. \<exists>f[M]. \<exists>b[M]. \<exists>nb[M]. \<exists>cnbf[M]. |
745 |
pair(M,f,b,p) & pair(M,n,b,nb) & is_cons(M,nb,f,cnbf) & |
|
746 |
upair(M,cnbf,cnbf,z))" |
|
13223 | 747 |
and well_ord_iso_separation: |
748 |
"[| M(A); M(f); M(r) |] |
|
13299 | 749 |
==> separation (M, \<lambda>x. x\<in>A --> (\<exists>y[M]. (\<exists>p[M]. |
13245 | 750 |
fun_apply(M,f,x,y) & pair(M,y,x,p) & p \<in> r)))" |
13306 | 751 |
and obase_separation: |
752 |
--{*part of the order type formalization*} |
|
753 |
"[| M(A); M(r) |] |
|
754 |
==> separation(M, \<lambda>a. \<exists>x[M]. \<exists>g[M]. \<exists>mx[M]. \<exists>par[M]. |
|
755 |
ordinal(M,x) & membership(M,x,mx) & pred_set(M,A,a,r,par) & |
|
756 |
order_isomorphism(M,par,r,x,mx,g))" |
|
13223 | 757 |
and obase_equals_separation: |
758 |
"[| M(A); M(r) |] |
|
13316 | 759 |
==> separation (M, \<lambda>x. x\<in>A --> ~(\<exists>y[M]. \<exists>g[M]. |
760 |
ordinal(M,y) & (\<exists>my[M]. \<exists>pxr[M]. |
|
761 |
membership(M,y,my) & pred_set(M,A,x,r,pxr) & |
|
762 |
order_isomorphism(M,pxr,r,y,my,g))))" |
|
13306 | 763 |
and omap_replacement: |
764 |
"[| M(A); M(r) |] |
|
765 |
==> strong_replacement(M, |
|
766 |
\<lambda>a z. \<exists>x[M]. \<exists>g[M]. \<exists>mx[M]. \<exists>par[M]. |
|
767 |
ordinal(M,x) & pair(M,a,x,z) & membership(M,x,mx) & |
|
768 |
pred_set(M,A,a,r,par) & order_isomorphism(M,par,r,x,mx,g))" |
|
13223 | 769 |
and is_recfun_separation: |
13319 | 770 |
--{*for well-founded recursion*} |
771 |
"[| M(r); M(f); M(g); M(a); M(b) |] |
|
772 |
==> separation(M, |
|
773 |
\<lambda>x. \<exists>xa[M]. \<exists>xb[M]. |
|
774 |
pair(M,x,a,xa) & xa \<in> r & pair(M,x,b,xb) & xb \<in> r & |
|
775 |
(\<exists>fx[M]. \<exists>gx[M]. fun_apply(M,f,x,fx) & fun_apply(M,g,x,gx) & |
|
776 |
fx \<noteq> gx))" |
|
13223 | 777 |
|
778 |
lemma (in M_axioms) cartprod_iff_lemma: |
|
13254 | 779 |
"[| M(C); \<forall>u[M]. u \<in> C <-> (\<exists>x\<in>A. \<exists>y\<in>B. u = {{x}, {x,y}}); |
780 |
powerset(M, A \<union> B, p1); powerset(M, p1, p2); M(p2) |] |
|
13223 | 781 |
==> C = {u \<in> p2 . \<exists>x\<in>A. \<exists>y\<in>B. u = {{x}, {x,y}}}" |
782 |
apply (simp add: powerset_def) |
|
13254 | 783 |
apply (rule equalityI, clarify, simp) |
784 |
apply (frule transM, assumption) |
|
13223 | 785 |
apply (frule transM, assumption, simp) |
786 |
apply blast |
|
787 |
apply clarify |
|
788 |
apply (frule transM, assumption, force) |
|
789 |
done |
|
790 |
||
791 |
lemma (in M_axioms) cartprod_iff: |
|
792 |
"[| M(A); M(B); M(C) |] |
|
793 |
==> cartprod(M,A,B,C) <-> |
|
794 |
(\<exists>p1 p2. M(p1) & M(p2) & powerset(M,A Un B,p1) & powerset(M,p1,p2) & |
|
795 |
C = {z \<in> p2. \<exists>x\<in>A. \<exists>y\<in>B. z = <x,y>})" |
|
796 |
apply (simp add: Pair_def cartprod_def, safe) |
|
797 |
defer 1 |
|
798 |
apply (simp add: powerset_def) |
|
799 |
apply blast |
|
800 |
txt{*Final, difficult case: the left-to-right direction of the theorem.*} |
|
801 |
apply (insert power_ax, simp add: power_ax_def) |
|
13299 | 802 |
apply (frule_tac x="A Un B" and P="\<lambda>x. rex(M,?Q(x))" in rspec) |
803 |
apply (blast, clarify) |
|
804 |
apply (drule_tac x=z and P="\<lambda>x. rex(M,?Q(x))" in rspec) |
|
805 |
apply assumption |
|
13223 | 806 |
apply (blast intro: cartprod_iff_lemma) |
807 |
done |
|
808 |
||
809 |
lemma (in M_axioms) cartprod_closed_lemma: |
|
13299 | 810 |
"[| M(A); M(B) |] ==> \<exists>C[M]. cartprod(M,A,B,C)" |
13223 | 811 |
apply (simp del: cartprod_abs add: cartprod_iff) |
812 |
apply (insert power_ax, simp add: power_ax_def) |
|
13299 | 813 |
apply (frule_tac x="A Un B" and P="\<lambda>x. rex(M,?Q(x))" in rspec) |
814 |
apply (blast, clarify) |
|
815 |
apply (drule_tac x=z and P="\<lambda>x. rex(M,?Q(x))" in rspec) |
|
816 |
apply (blast, clarify) |
|
817 |
apply (intro rexI exI conjI) |
|
818 |
prefer 5 apply (rule refl) |
|
819 |
prefer 3 apply assumption |
|
820 |
prefer 3 apply assumption |
|
13245 | 821 |
apply (insert cartprod_separation [of A B], auto) |
13223 | 822 |
done |
823 |
||
824 |
text{*All the lemmas above are necessary because Powerset is not absolute. |
|
825 |
I should have used Replacement instead!*} |
|
13245 | 826 |
lemma (in M_axioms) cartprod_closed [intro,simp]: |
13223 | 827 |
"[| M(A); M(B) |] ==> M(A*B)" |
828 |
by (frule cartprod_closed_lemma, assumption, force) |
|
829 |
||
13268 | 830 |
lemma (in M_axioms) sum_closed [intro,simp]: |
831 |
"[| M(A); M(B) |] ==> M(A+B)" |
|
832 |
by (simp add: sum_def) |
|
833 |
||
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
834 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
835 |
subsubsection {*converse of a relation*} |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
836 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
837 |
lemma (in M_axioms) M_converse_iff: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
838 |
"M(r) ==> |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
839 |
converse(r) = |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
840 |
{z \<in> Union(Union(r)) * Union(Union(r)). |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
841 |
\<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
|
842 |
apply (rule equalityI) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
843 |
prefer 2 apply (blast dest: transM, clarify, simp) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
844 |
apply (simp add: Pair_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
845 |
apply (blast dest: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
846 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
847 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
848 |
lemma (in M_axioms) converse_closed [intro,simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
849 |
"M(r) ==> M(converse(r))" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
850 |
apply (simp add: M_converse_iff) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
851 |
apply (insert converse_separation [of r], simp) |
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 (in M_axioms) converse_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
855 |
"[| 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
|
856 |
apply (simp add: is_converse_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
857 |
apply (rule iffI) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
858 |
prefer 2 apply blast |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
859 |
apply (rule M_equalityI) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
860 |
apply simp |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
861 |
apply (blast dest: transM)+ |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
862 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
863 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
864 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
865 |
subsubsection {*image, preimage, domain, range*} |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
866 |
|
13245 | 867 |
lemma (in M_axioms) image_closed [intro,simp]: |
13223 | 868 |
"[| M(A); M(r) |] ==> M(r``A)" |
869 |
apply (simp add: image_iff_Collect) |
|
13245 | 870 |
apply (insert image_separation [of A r], simp) |
13223 | 871 |
done |
872 |
||
873 |
lemma (in M_axioms) vimage_abs [simp]: |
|
874 |
"[| M(r); M(A); M(z) |] ==> pre_image(M,r,A,z) <-> z = r-``A" |
|
875 |
apply (simp add: pre_image_def) |
|
876 |
apply (rule iffI) |
|
877 |
apply (blast intro!: equalityI dest: transM, blast) |
|
878 |
done |
|
879 |
||
13245 | 880 |
lemma (in M_axioms) vimage_closed [intro,simp]: |
13223 | 881 |
"[| 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
|
882 |
by (simp add: vimage_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
883 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
884 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
885 |
subsubsection{*Domain, range and field*} |
13223 | 886 |
|
887 |
lemma (in M_axioms) domain_abs [simp]: |
|
888 |
"[| M(r); M(z) |] ==> is_domain(M,r,z) <-> z = domain(r)" |
|
889 |
apply (simp add: is_domain_def) |
|
890 |
apply (blast intro!: equalityI dest: transM) |
|
891 |
done |
|
892 |
||
13245 | 893 |
lemma (in M_axioms) domain_closed [intro,simp]: |
13223 | 894 |
"M(r) ==> M(domain(r))" |
895 |
apply (simp add: domain_eq_vimage) |
|
896 |
done |
|
897 |
||
898 |
lemma (in M_axioms) range_abs [simp]: |
|
899 |
"[| M(r); M(z) |] ==> is_range(M,r,z) <-> z = range(r)" |
|
900 |
apply (simp add: is_range_def) |
|
901 |
apply (blast intro!: equalityI dest: transM) |
|
902 |
done |
|
903 |
||
13245 | 904 |
lemma (in M_axioms) range_closed [intro,simp]: |
13223 | 905 |
"M(r) ==> M(range(r))" |
906 |
apply (simp add: range_eq_image) |
|
907 |
done |
|
908 |
||
13245 | 909 |
lemma (in M_axioms) field_abs [simp]: |
910 |
"[| M(r); M(z) |] ==> is_field(M,r,z) <-> z = field(r)" |
|
911 |
by (simp add: domain_closed range_closed is_field_def field_def) |
|
912 |
||
913 |
lemma (in M_axioms) field_closed [intro,simp]: |
|
914 |
"M(r) ==> M(field(r))" |
|
915 |
by (simp add: domain_closed range_closed Un_closed field_def) |
|
916 |
||
917 |
||
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
918 |
subsubsection{*Relations, functions and application*} |
13254 | 919 |
|
13223 | 920 |
lemma (in M_axioms) relation_abs [simp]: |
921 |
"M(r) ==> is_relation(M,r) <-> relation(r)" |
|
922 |
apply (simp add: is_relation_def relation_def) |
|
923 |
apply (blast dest!: bspec dest: pair_components_in_M)+ |
|
924 |
done |
|
925 |
||
926 |
lemma (in M_axioms) function_abs [simp]: |
|
927 |
"M(r) ==> is_function(M,r) <-> function(r)" |
|
928 |
apply (simp add: is_function_def function_def, safe) |
|
929 |
apply (frule transM, assumption) |
|
930 |
apply (blast dest: pair_components_in_M)+ |
|
931 |
done |
|
932 |
||
13245 | 933 |
lemma (in M_axioms) apply_closed [intro,simp]: |
13223 | 934 |
"[|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
|
935 |
by (simp add: apply_def) |
13223 | 936 |
|
937 |
lemma (in M_axioms) apply_abs: |
|
938 |
"[| function(f); M(f); M(y) |] |
|
939 |
==> fun_apply(M,f,x,y) <-> x \<in> domain(f) & f`x = y" |
|
940 |
apply (simp add: fun_apply_def) |
|
941 |
apply (blast intro: function_apply_equality function_apply_Pair) |
|
942 |
done |
|
943 |
||
944 |
lemma (in M_axioms) typed_apply_abs: |
|
945 |
"[| f \<in> A -> B; M(f); M(y) |] |
|
946 |
==> fun_apply(M,f,x,y) <-> x \<in> A & f`x = y" |
|
947 |
by (simp add: apply_abs fun_is_function domain_of_fun) |
|
948 |
||
949 |
lemma (in M_axioms) typed_function_abs [simp]: |
|
950 |
"[| M(A); M(f) |] ==> typed_function(M,A,B,f) <-> f \<in> A -> B" |
|
951 |
apply (auto simp add: typed_function_def relation_def Pi_iff) |
|
952 |
apply (blast dest: pair_components_in_M)+ |
|
953 |
done |
|
954 |
||
955 |
lemma (in M_axioms) injection_abs [simp]: |
|
956 |
"[| M(A); M(f) |] ==> injection(M,A,B,f) <-> f \<in> inj(A,B)" |
|
957 |
apply (simp add: injection_def apply_iff inj_def apply_closed) |
|
13247 | 958 |
apply (blast dest: transM [of _ A]) |
13223 | 959 |
done |
960 |
||
961 |
lemma (in M_axioms) surjection_abs [simp]: |
|
962 |
"[| M(A); M(B); M(f) |] ==> surjection(M,A,B,f) <-> f \<in> surj(A,B)" |
|
963 |
by (simp add: typed_apply_abs surjection_def surj_def) |
|
964 |
||
965 |
lemma (in M_axioms) bijection_abs [simp]: |
|
966 |
"[| M(A); M(B); M(f) |] ==> bijection(M,A,B,f) <-> f \<in> bij(A,B)" |
|
967 |
by (simp add: bijection_def bij_def) |
|
968 |
||
969 |
||
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
970 |
subsubsection{*Composition of relations*} |
13223 | 971 |
|
972 |
lemma (in M_axioms) M_comp_iff: |
|
973 |
"[| M(r); M(s) |] |
|
974 |
==> r O s = |
|
975 |
{xz \<in> domain(s) * range(r). |
|
13268 | 976 |
\<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 | 977 |
apply (simp add: comp_def) |
978 |
apply (rule equalityI) |
|
13247 | 979 |
apply clarify |
980 |
apply simp |
|
13223 | 981 |
apply (blast dest: transM)+ |
982 |
done |
|
983 |
||
13245 | 984 |
lemma (in M_axioms) comp_closed [intro,simp]: |
13223 | 985 |
"[| M(r); M(s) |] ==> M(r O s)" |
986 |
apply (simp add: M_comp_iff) |
|
13245 | 987 |
apply (insert comp_separation [of r s], simp) |
988 |
done |
|
989 |
||
990 |
lemma (in M_axioms) composition_abs [simp]: |
|
991 |
"[| M(r); M(s); M(t) |] |
|
992 |
==> composition(M,r,s,t) <-> t = r O s" |
|
13247 | 993 |
apply safe |
13245 | 994 |
txt{*Proving @{term "composition(M, r, s, r O s)"}*} |
995 |
prefer 2 |
|
996 |
apply (simp add: composition_def comp_def) |
|
997 |
apply (blast dest: transM) |
|
998 |
txt{*Opposite implication*} |
|
999 |
apply (rule M_equalityI) |
|
1000 |
apply (simp add: composition_def comp_def) |
|
1001 |
apply (blast del: allE dest: transM)+ |
|
13223 | 1002 |
done |
1003 |
||
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1004 |
text{*no longer needed*} |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1005 |
lemma (in M_axioms) restriction_is_function: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1006 |
"[| restriction(M,f,A,z); function(f); M(f); M(A); M(z) |] |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1007 |
==> function(z)" |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1008 |
apply (rotate_tac 1) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1009 |
apply (simp add: restriction_def ball_iff_equiv) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1010 |
apply (unfold function_def, blast) |
13269 | 1011 |
done |
1012 |
||
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1013 |
lemma (in M_axioms) restriction_abs [simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1014 |
"[| M(f); M(A); M(z) |] |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1015 |
==> 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
|
1016 |
apply (simp add: ball_iff_equiv restriction_def restrict_def) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1017 |
apply (blast intro!: equalityI dest: transM) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1018 |
done |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1019 |
|
13223 | 1020 |
|
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1021 |
lemma (in M_axioms) M_restrict_iff: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1022 |
"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
|
1023 |
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
|
1024 |
|
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1025 |
lemma (in M_axioms) restrict_closed [intro,simp]: |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1026 |
"[| 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
|
1027 |
apply (simp add: M_restrict_iff) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1028 |
apply (insert restrict_separation [of A], simp) |
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1029 |
done |
13223 | 1030 |
|
1031 |
lemma (in M_axioms) Inter_abs [simp]: |
|
1032 |
"[| M(A); M(z) |] ==> big_inter(M,A,z) <-> z = Inter(A)" |
|
1033 |
apply (simp add: big_inter_def Inter_def) |
|
1034 |
apply (blast intro!: equalityI dest: transM) |
|
1035 |
done |
|
1036 |
||
13245 | 1037 |
lemma (in M_axioms) Inter_closed [intro,simp]: |
13223 | 1038 |
"M(A) ==> M(Inter(A))" |
13245 | 1039 |
by (insert Inter_separation, simp add: Inter_def) |
13223 | 1040 |
|
13245 | 1041 |
lemma (in M_axioms) Int_closed [intro,simp]: |
13223 | 1042 |
"[| M(A); M(B) |] ==> M(A Int B)" |
1043 |
apply (subgoal_tac "M({A,B})") |
|
13247 | 1044 |
apply (frule Inter_closed, force+) |
13223 | 1045 |
done |
1046 |
||
13290
28ce81eff3de
separation of M_axioms into M_triv_axioms and M_axioms
paulson
parents:
13269
diff
changeset
|
1047 |
subsubsection{*Functions and function space*} |
13268 | 1048 |
|
13245 | 1049 |
text{*M contains all finite functions*} |
1050 |
lemma (in M_axioms) finite_fun_closed_lemma [rule_format]: |
|
1051 |
"[| n \<in> nat; M(A) |] ==> \<forall>f \<in> n -> A. M(f)" |
|
1052 |
apply (induct_tac n, simp) |
|
1053 |
apply (rule ballI) |
|
1054 |
apply (simp add: succ_def) |
|
1055 |
apply (frule fun_cons_restrict_eq) |
|
1056 |
apply (erule ssubst) |
|
1057 |
apply (subgoal_tac "M(f`x) & restrict(f,x) \<in> x -> A") |
|
1058 |
apply (simp add: cons_closed nat_into_M apply_closed) |
|
1059 |
apply (blast intro: apply_funtype transM restrict_type2) |
|
1060 |
done |
|
1061 |
||
1062 |
lemma (in M_axioms) finite_fun_closed [rule_format]: |
|
1063 |
"[| f \<in> n -> A; n \<in> nat; M(A) |] ==> M(f)" |
|
1064 |
by (blast intro: finite_fun_closed_lemma) |
|
1065 |
||
13268 | 1066 |
text{*The assumption @{term "M(A->B)"} is unusual, but essential: in |
1067 |
all but trivial cases, A->B cannot be expected to belong to @{term M}.*} |
|
1068 |
lemma (in M_axioms) is_funspace_abs [simp]: |
|
1069 |
"[|M(A); M(B); M(F); M(A->B)|] ==> is_funspace(M,A,B,F) <-> F = A->B"; |
|
1070 |
apply (simp add: is_funspace_def) |
|
1071 |
apply (rule iffI) |
|
1072 |
prefer 2 apply blast |
|
1073 |
apply (rule M_equalityI) |
|
1074 |
apply simp_all |
|
1075 |
done |
|
1076 |
||
1077 |
lemma (in M_axioms) succ_fun_eq2: |
|
1078 |
"[|M(B); M(n->B)|] ==> |
|
1079 |
succ(n) -> B = |
|
1080 |
\<Union>{z. p \<in> (n->B)*B, \<exists>f[M]. \<exists>b[M]. p = <f,b> & z = {cons(<n,b>, f)}}" |
|
1081 |
apply (simp add: succ_fun_eq) |
|
1082 |
apply (blast dest: transM) |
|
1083 |
done |
|
1084 |
||
1085 |
lemma (in M_axioms) funspace_succ: |
|
1086 |
"[|M(n); M(B); M(n->B) |] ==> M(succ(n) -> B)" |
|
13306 | 1087 |
apply (insert funspace_succ_replacement [of n], simp) |
13268 | 1088 |
apply (force simp add: succ_fun_eq2 univalent_def) |
1089 |
done |
|
1090 |
||
1091 |
text{*@{term M} contains all finite function spaces. Needed to prove the |
|
1092 |
absoluteness of transitive closure.*} |
|
1093 |
lemma (in M_axioms) finite_funspace_closed [intro,simp]: |
|
1094 |
"[|n\<in>nat; M(B)|] ==> M(n->B)" |
|
1095 |
apply (induct_tac n, simp) |
|
1096 |
apply (simp add: funspace_succ nat_into_M) |
|
1097 |
done |
|
1098 |
||
13223 | 1099 |
end |