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