author | wenzelm |
Wed, 26 Sep 2001 22:24:55 +0200 | |
changeset 11572 | 93da54c8a687 |
parent 10834 | a7897aebbffc |
child 12030 | 46d57d0290a2 |
permissions | -rw-r--r-- |
9169 | 1 |
(* Title: HOLCF/Ssum3.ML |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
2 |
ID: $Id$ |
1461 | 3 |
Author: Franz Regensburger |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
4 |
Copyright 1993 Technische Universitaet Muenchen |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
5 |
|
9169 | 6 |
Class instance of ++ for class pcpo |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
7 |
*) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
8 |
|
2640 | 9 |
(* for compatibility with old HOLCF-Version *) |
9169 | 10 |
Goal "UU = Isinl UU"; |
11 |
by (simp_tac (HOL_ss addsimps [UU_def,UU_ssum_def]) 1); |
|
12 |
qed "inst_ssum_pcpo"; |
|
2640 | 13 |
|
10198 | 14 |
Addsimps [inst_ssum_pcpo RS sym]; |
15 |
||
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
16 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
17 |
(* continuity for Isinl and Isinr *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
18 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
19 |
|
9169 | 20 |
Goal "contlub(Isinl)"; |
21 |
by (rtac contlubI 1); |
|
22 |
by (strip_tac 1); |
|
23 |
by (rtac trans 1); |
|
24 |
by (rtac (thelub_ssum1a RS sym) 2); |
|
25 |
by (rtac allI 3); |
|
26 |
by (rtac exI 3); |
|
27 |
by (rtac refl 3); |
|
28 |
by (etac (monofun_Isinl RS ch2ch_monofun) 2); |
|
29 |
by (case_tac "lub(range(Y))=UU" 1); |
|
30 |
by (res_inst_tac [("s","UU"),("t","lub(range(Y))")] ssubst 1); |
|
31 |
by (atac 1); |
|
32 |
by (res_inst_tac [("f","Isinl")] arg_cong 1); |
|
33 |
by (rtac (chain_UU_I_inverse RS sym) 1); |
|
34 |
by (rtac allI 1); |
|
35 |
by (res_inst_tac [("s","UU"),("t","Y(i)")] ssubst 1); |
|
36 |
by (etac (chain_UU_I RS spec ) 1); |
|
37 |
by (atac 1); |
|
38 |
by (rtac Iwhen1 1); |
|
39 |
by (res_inst_tac [("f","Isinl")] arg_cong 1); |
|
40 |
by (rtac lub_equal 1); |
|
41 |
by (atac 1); |
|
42 |
by (rtac (monofun_Iwhen3 RS ch2ch_monofun) 1); |
|
43 |
by (etac (monofun_Isinl RS ch2ch_monofun) 1); |
|
44 |
by (rtac allI 1); |
|
45 |
by (case_tac "Y(k)=UU" 1); |
|
46 |
by (asm_simp_tac Ssum0_ss 1); |
|
47 |
by (asm_simp_tac Ssum0_ss 1); |
|
48 |
qed "contlub_Isinl"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
49 |
|
9169 | 50 |
Goal "contlub(Isinr)"; |
51 |
by (rtac contlubI 1); |
|
52 |
by (strip_tac 1); |
|
53 |
by (rtac trans 1); |
|
54 |
by (rtac (thelub_ssum1b RS sym) 2); |
|
55 |
by (rtac allI 3); |
|
56 |
by (rtac exI 3); |
|
57 |
by (rtac refl 3); |
|
58 |
by (etac (monofun_Isinr RS ch2ch_monofun) 2); |
|
59 |
by (case_tac "lub(range(Y))=UU" 1); |
|
60 |
by (res_inst_tac [("s","UU"),("t","lub(range(Y))")] ssubst 1); |
|
61 |
by (atac 1); |
|
62 |
by ((rtac arg_cong 1) THEN (rtac (chain_UU_I_inverse RS sym) 1)); |
|
63 |
by (rtac allI 1); |
|
64 |
by (res_inst_tac [("s","UU"),("t","Y(i)")] ssubst 1); |
|
65 |
by (etac (chain_UU_I RS spec ) 1); |
|
66 |
by (atac 1); |
|
67 |
by (rtac (strict_IsinlIsinr RS subst) 1); |
|
68 |
by (rtac Iwhen1 1); |
|
69 |
by ((rtac arg_cong 1) THEN (rtac lub_equal 1)); |
|
70 |
by (atac 1); |
|
71 |
by (rtac (monofun_Iwhen3 RS ch2ch_monofun) 1); |
|
72 |
by (etac (monofun_Isinr RS ch2ch_monofun) 1); |
|
73 |
by (rtac allI 1); |
|
74 |
by (case_tac "Y(k)=UU" 1); |
|
75 |
by (asm_simp_tac Ssum0_ss 1); |
|
76 |
by (asm_simp_tac Ssum0_ss 1); |
|
77 |
qed "contlub_Isinr"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
78 |
|
9169 | 79 |
Goal "cont(Isinl)"; |
80 |
by (rtac monocontlub2cont 1); |
|
81 |
by (rtac monofun_Isinl 1); |
|
82 |
by (rtac contlub_Isinl 1); |
|
83 |
qed "cont_Isinl"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
84 |
|
9169 | 85 |
Goal "cont(Isinr)"; |
86 |
by (rtac monocontlub2cont 1); |
|
87 |
by (rtac monofun_Isinr 1); |
|
88 |
by (rtac contlub_Isinr 1); |
|
89 |
qed "cont_Isinr"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
90 |
|
9245 | 91 |
AddIffs [cont_Isinl, cont_Isinr]; |
92 |
||
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
93 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
94 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
95 |
(* continuity for Iwhen in the firts two arguments *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
96 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
97 |
|
9169 | 98 |
Goal "contlub(Iwhen)"; |
99 |
by (rtac contlubI 1); |
|
100 |
by (strip_tac 1); |
|
101 |
by (rtac trans 1); |
|
102 |
by (rtac (thelub_fun RS sym) 2); |
|
103 |
by (etac (monofun_Iwhen1 RS ch2ch_monofun) 2); |
|
104 |
by (rtac (expand_fun_eq RS iffD2) 1); |
|
105 |
by (strip_tac 1); |
|
106 |
by (rtac trans 1); |
|
107 |
by (rtac (thelub_fun RS sym) 2); |
|
108 |
by (rtac ch2ch_fun 2); |
|
109 |
by (etac (monofun_Iwhen1 RS ch2ch_monofun) 2); |
|
110 |
by (rtac (expand_fun_eq RS iffD2) 1); |
|
111 |
by (strip_tac 1); |
|
112 |
by (res_inst_tac [("p","xa")] IssumE 1); |
|
113 |
by (asm_simp_tac Ssum0_ss 1); |
|
114 |
by (rtac (lub_const RS thelubI RS sym) 1); |
|
115 |
by (asm_simp_tac Ssum0_ss 1); |
|
116 |
by (etac contlub_cfun_fun 1); |
|
117 |
by (asm_simp_tac Ssum0_ss 1); |
|
118 |
by (rtac (lub_const RS thelubI RS sym) 1); |
|
119 |
qed "contlub_Iwhen1"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
120 |
|
9169 | 121 |
Goal "contlub(Iwhen(f))"; |
122 |
by (rtac contlubI 1); |
|
123 |
by (strip_tac 1); |
|
124 |
by (rtac trans 1); |
|
125 |
by (rtac (thelub_fun RS sym) 2); |
|
126 |
by (etac (monofun_Iwhen2 RS ch2ch_monofun) 2); |
|
127 |
by (rtac (expand_fun_eq RS iffD2) 1); |
|
128 |
by (strip_tac 1); |
|
129 |
by (res_inst_tac [("p","x")] IssumE 1); |
|
130 |
by (asm_simp_tac Ssum0_ss 1); |
|
131 |
by (rtac (lub_const RS thelubI RS sym) 1); |
|
132 |
by (asm_simp_tac Ssum0_ss 1); |
|
133 |
by (rtac (lub_const RS thelubI RS sym) 1); |
|
134 |
by (asm_simp_tac Ssum0_ss 1); |
|
135 |
by (etac contlub_cfun_fun 1); |
|
136 |
qed "contlub_Iwhen2"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
137 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
138 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
139 |
(* continuity for Iwhen in its third argument *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
140 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
141 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
142 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
143 |
(* first 5 ugly lemmas *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
144 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
145 |
|
9169 | 146 |
Goal "[| chain(Y); lub(range(Y)) = Isinl(x)|] ==> !i.? x. Y(i)=Isinl(x)"; |
147 |
by (strip_tac 1); |
|
148 |
by (res_inst_tac [("p","Y(i)")] IssumE 1); |
|
149 |
by (etac exI 1); |
|
150 |
by (etac exI 1); |
|
151 |
by (res_inst_tac [("P","y=UU")] notE 1); |
|
152 |
by (atac 1); |
|
153 |
by (rtac (less_ssum3d RS iffD1) 1); |
|
154 |
by (etac subst 1); |
|
155 |
by (etac subst 1); |
|
156 |
by (etac is_ub_thelub 1); |
|
157 |
qed "ssum_lemma9"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
158 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
159 |
|
9169 | 160 |
Goal "[| chain(Y); lub(range(Y)) = Isinr(x)|] ==> !i.? x. Y(i)=Isinr(x)"; |
161 |
by (strip_tac 1); |
|
162 |
by (res_inst_tac [("p","Y(i)")] IssumE 1); |
|
163 |
by (rtac exI 1); |
|
164 |
by (etac trans 1); |
|
165 |
by (rtac strict_IsinlIsinr 1); |
|
166 |
by (etac exI 2); |
|
167 |
by (res_inst_tac [("P","xa=UU")] notE 1); |
|
168 |
by (atac 1); |
|
169 |
by (rtac (less_ssum3c RS iffD1) 1); |
|
170 |
by (etac subst 1); |
|
171 |
by (etac subst 1); |
|
172 |
by (etac is_ub_thelub 1); |
|
173 |
qed "ssum_lemma10"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
174 |
|
9169 | 175 |
Goal "[| chain(Y); lub(range(Y)) = Isinl(UU) |] ==>\ |
8161 | 176 |
\ Iwhen f g (lub(range Y)) = lub(range(%i. Iwhen f g (Y i)))"; |
177 |
by (asm_simp_tac Ssum0_ss 1); |
|
178 |
by (rtac (chain_UU_I_inverse RS sym) 1); |
|
179 |
by (rtac allI 1); |
|
180 |
by (res_inst_tac [("s","Isinl(UU)"),("t","Y(i)")] subst 1); |
|
181 |
by (rtac (inst_ssum_pcpo RS subst) 1); |
|
182 |
by (rtac (chain_UU_I RS spec RS sym) 1); |
|
183 |
by (atac 1); |
|
184 |
by (etac (inst_ssum_pcpo RS ssubst) 1); |
|
185 |
by (asm_simp_tac Ssum0_ss 1); |
|
186 |
qed "ssum_lemma11"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
187 |
|
9169 | 188 |
Goal "[| chain(Y); lub(range(Y)) = Isinl(x); x ~= UU |] ==>\ |
189 |
\ Iwhen f g (lub(range Y)) = lub(range(%i. Iwhen f g (Y i)))"; |
|
190 |
by (asm_simp_tac Ssum0_ss 1); |
|
191 |
by (res_inst_tac [("t","x")] subst 1); |
|
192 |
by (rtac inject_Isinl 1); |
|
193 |
by (rtac trans 1); |
|
194 |
by (atac 2); |
|
195 |
by (rtac (thelub_ssum1a RS sym) 1); |
|
196 |
by (atac 1); |
|
197 |
by (etac ssum_lemma9 1); |
|
198 |
by (atac 1); |
|
199 |
by (rtac trans 1); |
|
200 |
by (rtac contlub_cfun_arg 1); |
|
201 |
by (rtac (monofun_Iwhen3 RS ch2ch_monofun) 1); |
|
202 |
by (atac 1); |
|
203 |
by (rtac lub_equal2 1); |
|
204 |
by (rtac (chain_mono2 RS exE) 1); |
|
205 |
by (atac 2); |
|
206 |
by (rtac chain_UU_I_inverse2 1); |
|
207 |
by (stac inst_ssum_pcpo 1); |
|
10230 | 208 |
by (etac contrapos_np 1); |
9169 | 209 |
by (rtac inject_Isinl 1); |
210 |
by (rtac trans 1); |
|
211 |
by (etac sym 1); |
|
212 |
by (etac notnotD 1); |
|
213 |
by (rtac exI 1); |
|
214 |
by (strip_tac 1); |
|
215 |
by (rtac (ssum_lemma9 RS spec RS exE) 1); |
|
216 |
by (atac 1); |
|
217 |
by (atac 1); |
|
218 |
by (res_inst_tac [("t","Y(i)")] ssubst 1); |
|
219 |
by (atac 1); |
|
220 |
by (rtac trans 1); |
|
221 |
by (rtac cfun_arg_cong 1); |
|
222 |
by (rtac Iwhen2 1); |
|
10198 | 223 |
by (Force_tac 1); |
9169 | 224 |
by (res_inst_tac [("t","Y(i)")] ssubst 1); |
225 |
by (atac 1); |
|
10198 | 226 |
by Auto_tac; |
9169 | 227 |
by (stac Iwhen2 1); |
10198 | 228 |
by (Force_tac 1); |
9169 | 229 |
by (simp_tac (simpset_of Cfun3.thy) 1); |
230 |
by (rtac (monofun_Rep_CFun2 RS ch2ch_monofun) 1); |
|
231 |
by (etac (monofun_Iwhen3 RS ch2ch_monofun) 1); |
|
232 |
by (etac (monofun_Iwhen3 RS ch2ch_monofun) 1); |
|
233 |
qed "ssum_lemma12"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
234 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
235 |
|
9169 | 236 |
Goal "[| chain(Y); lub(range(Y)) = Isinr(x); x ~= UU |] ==>\ |
237 |
\ Iwhen f g (lub(range Y)) = lub(range(%i. Iwhen f g (Y i)))"; |
|
238 |
by (asm_simp_tac Ssum0_ss 1); |
|
239 |
by (res_inst_tac [("t","x")] subst 1); |
|
240 |
by (rtac inject_Isinr 1); |
|
241 |
by (rtac trans 1); |
|
242 |
by (atac 2); |
|
243 |
by (rtac (thelub_ssum1b RS sym) 1); |
|
244 |
by (atac 1); |
|
245 |
by (etac ssum_lemma10 1); |
|
246 |
by (atac 1); |
|
247 |
by (rtac trans 1); |
|
248 |
by (rtac contlub_cfun_arg 1); |
|
249 |
by (rtac (monofun_Iwhen3 RS ch2ch_monofun) 1); |
|
250 |
by (atac 1); |
|
251 |
by (rtac lub_equal2 1); |
|
252 |
by (rtac (chain_mono2 RS exE) 1); |
|
253 |
by (atac 2); |
|
254 |
by (rtac chain_UU_I_inverse2 1); |
|
255 |
by (stac inst_ssum_pcpo 1); |
|
10230 | 256 |
by (etac contrapos_np 1); |
9169 | 257 |
by (rtac inject_Isinr 1); |
258 |
by (rtac trans 1); |
|
259 |
by (etac sym 1); |
|
260 |
by (rtac (strict_IsinlIsinr RS subst) 1); |
|
261 |
by (etac notnotD 1); |
|
262 |
by (rtac exI 1); |
|
263 |
by (strip_tac 1); |
|
264 |
by (rtac (ssum_lemma10 RS spec RS exE) 1); |
|
265 |
by (atac 1); |
|
266 |
by (atac 1); |
|
267 |
by (res_inst_tac [("t","Y(i)")] ssubst 1); |
|
268 |
by (atac 1); |
|
269 |
by (rtac trans 1); |
|
270 |
by (rtac cfun_arg_cong 1); |
|
271 |
by (rtac Iwhen3 1); |
|
10198 | 272 |
by (Force_tac 1); |
9169 | 273 |
by (res_inst_tac [("t","Y(i)")] ssubst 1); |
274 |
by (atac 1); |
|
275 |
by (stac Iwhen3 1); |
|
10198 | 276 |
by (Force_tac 1); |
9169 | 277 |
by (res_inst_tac [("t","Y(i)")] ssubst 1); |
278 |
by (atac 1); |
|
279 |
by (simp_tac (simpset_of Cfun3.thy) 1); |
|
280 |
by (rtac (monofun_Rep_CFun2 RS ch2ch_monofun) 1); |
|
281 |
by (etac (monofun_Iwhen3 RS ch2ch_monofun) 1); |
|
282 |
by (etac (monofun_Iwhen3 RS ch2ch_monofun) 1); |
|
283 |
qed "ssum_lemma13"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
284 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
285 |
|
9169 | 286 |
Goal "contlub(Iwhen(f)(g))"; |
287 |
by (rtac contlubI 1); |
|
288 |
by (strip_tac 1); |
|
289 |
by (res_inst_tac [("p","lub(range(Y))")] IssumE 1); |
|
290 |
by (etac ssum_lemma11 1); |
|
291 |
by (atac 1); |
|
292 |
by (etac ssum_lemma12 1); |
|
293 |
by (atac 1); |
|
294 |
by (atac 1); |
|
295 |
by (etac ssum_lemma13 1); |
|
296 |
by (atac 1); |
|
297 |
by (atac 1); |
|
298 |
qed "contlub_Iwhen3"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
299 |
|
9169 | 300 |
Goal "cont(Iwhen)"; |
301 |
by (rtac monocontlub2cont 1); |
|
302 |
by (rtac monofun_Iwhen1 1); |
|
303 |
by (rtac contlub_Iwhen1 1); |
|
304 |
qed "cont_Iwhen1"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
305 |
|
9169 | 306 |
Goal "cont(Iwhen(f))"; |
307 |
by (rtac monocontlub2cont 1); |
|
308 |
by (rtac monofun_Iwhen2 1); |
|
309 |
by (rtac contlub_Iwhen2 1); |
|
310 |
qed "cont_Iwhen2"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
311 |
|
9169 | 312 |
Goal "cont(Iwhen(f)(g))"; |
313 |
by (rtac monocontlub2cont 1); |
|
314 |
by (rtac monofun_Iwhen3 1); |
|
315 |
by (rtac contlub_Iwhen3 1); |
|
316 |
qed "cont_Iwhen3"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
317 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
318 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
319 |
(* continuous versions of lemmas for 'a ++ 'b *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
320 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
321 |
|
10834 | 322 |
Goalw [sinl_def] "sinl$UU =UU"; |
9245 | 323 |
by (simp_tac (Ssum0_ss addsimps [cont_Isinl]) 1); |
324 |
by (rtac (inst_ssum_pcpo RS sym) 1); |
|
325 |
qed "strict_sinl"; |
|
10230 | 326 |
Addsimps [strict_sinl]; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
327 |
|
10834 | 328 |
Goalw [sinr_def] "sinr$UU=UU"; |
9245 | 329 |
by (simp_tac (Ssum0_ss addsimps [cont_Isinr]) 1); |
330 |
by (rtac (inst_ssum_pcpo RS sym) 1); |
|
331 |
qed "strict_sinr"; |
|
10230 | 332 |
Addsimps [strict_sinr]; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
333 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
334 |
Goalw [sinl_def,sinr_def] |
10834 | 335 |
"sinl$a=sinr$b ==> a=UU & b=UU"; |
10230 | 336 |
by (auto_tac (claset() addSDs [noteq_IsinlIsinr], simpset())); |
9245 | 337 |
qed "noteq_sinlsinr"; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
338 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
339 |
Goalw [sinl_def,sinr_def] |
10834 | 340 |
"sinl$a1=sinl$a2==> a1=a2"; |
10230 | 341 |
by Auto_tac; |
9245 | 342 |
qed "inject_sinl"; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
343 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
344 |
Goalw [sinl_def,sinr_def] |
10834 | 345 |
"sinr$a1=sinr$a2==> a1=a2"; |
10230 | 346 |
by Auto_tac; |
9245 | 347 |
qed "inject_sinr"; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
348 |
|
10230 | 349 |
AddSDs [inject_sinl, inject_sinr]; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
350 |
|
10834 | 351 |
Goal "x~=UU ==> sinl$x ~= UU"; |
10230 | 352 |
by (etac contrapos_nn 1); |
9169 | 353 |
by (rtac inject_sinl 1); |
10230 | 354 |
by Auto_tac; |
9169 | 355 |
qed "defined_sinl"; |
10230 | 356 |
Addsimps [defined_sinl]; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
357 |
|
10834 | 358 |
Goal "x~=UU ==> sinr$x ~= UU"; |
10230 | 359 |
by (etac contrapos_nn 1); |
9169 | 360 |
by (rtac inject_sinr 1); |
10230 | 361 |
by Auto_tac; |
9169 | 362 |
qed "defined_sinr"; |
10230 | 363 |
Addsimps [defined_sinr]; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
364 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
365 |
Goalw [sinl_def,sinr_def] |
10834 | 366 |
"z=UU | (? a. z=sinl$a & a~=UU) | (? b. z=sinr$b & b~=UU)"; |
9245 | 367 |
by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1); |
368 |
by (stac inst_ssum_pcpo 1); |
|
369 |
by (rtac Exh_Ssum 1); |
|
370 |
qed "Exh_Ssum1"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
371 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
372 |
|
9245 | 373 |
val [major,prem2,prem3] = Goalw [sinl_def,sinr_def] |
1461 | 374 |
"[|p=UU ==> Q ;\ |
10834 | 375 |
\ !!x.[|p=sinl$x; x~=UU |] ==> Q;\ |
376 |
\ !!y.[|p=sinr$y; y~=UU |] ==> Q|] ==> Q"; |
|
9245 | 377 |
by (rtac (major RS IssumE) 1); |
378 |
by (stac inst_ssum_pcpo 1); |
|
379 |
by (atac 1); |
|
380 |
by (rtac prem2 1); |
|
381 |
by (atac 2); |
|
382 |
by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1); |
|
383 |
by (rtac prem3 1); |
|
384 |
by (atac 2); |
|
385 |
by (Asm_simp_tac 1); |
|
386 |
qed "ssumE"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
387 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
388 |
|
9245 | 389 |
val [preml,premr] = Goalw [sinl_def,sinr_def] |
10834 | 390 |
"[|!!x.[|p=sinl$x|] ==> Q;\ |
391 |
\ !!y.[|p=sinr$y|] ==> Q|] ==> Q"; |
|
9245 | 392 |
by (rtac IssumE2 1); |
393 |
by (rtac preml 1); |
|
394 |
by (rtac premr 2); |
|
395 |
by Auto_tac; |
|
396 |
qed "ssumE2"; |
|
397 |
||
398 |
val tac = (REPEAT (resolve_tac (cont_lemmas1 @ [cont_Iwhen1,cont_Iwhen2, |
|
399 |
cont_Iwhen3,cont2cont_CF1L]) 1)); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
400 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
401 |
Goalw [sscase_def,sinl_def,sinr_def] |
10834 | 402 |
"sscase$f$g$UU = UU"; |
9245 | 403 |
by (stac inst_ssum_pcpo 1); |
404 |
by (stac beta_cfun 1); |
|
405 |
by tac; |
|
406 |
by (stac beta_cfun 1); |
|
407 |
by tac; |
|
408 |
by (stac beta_cfun 1); |
|
409 |
by tac; |
|
410 |
by (simp_tac Ssum0_ss 1); |
|
411 |
qed "sscase1"; |
|
10230 | 412 |
Addsimps [sscase1]; |
2566 | 413 |
|
414 |
||
415 |
val tac = (REPEAT (resolve_tac (cont_lemmas1 @ [cont_Iwhen1,cont_Iwhen2, |
|
416 |
cont_Iwhen3,cont_Isinl,cont_Isinr,cont2cont_CF1L]) 1)); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
417 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
418 |
Goalw [sscase_def,sinl_def,sinr_def] |
10834 | 419 |
"x~=UU==> sscase$f$g$(sinl$x) = f$x"; |
9245 | 420 |
by (stac beta_cfun 1); |
421 |
by tac; |
|
422 |
by (stac beta_cfun 1); |
|
423 |
by tac; |
|
424 |
by (stac beta_cfun 1); |
|
425 |
by tac; |
|
426 |
by (stac beta_cfun 1); |
|
427 |
by tac; |
|
428 |
by (asm_simp_tac Ssum0_ss 1); |
|
429 |
qed "sscase2"; |
|
10230 | 430 |
Addsimps [sscase2]; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
431 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
432 |
Goalw [sscase_def,sinl_def,sinr_def] |
10834 | 433 |
"x~=UU==> sscase$f$g$(sinr$x) = g$x"; |
9245 | 434 |
by (stac beta_cfun 1); |
435 |
by tac; |
|
436 |
by (stac beta_cfun 1); |
|
437 |
by tac; |
|
438 |
by (stac beta_cfun 1); |
|
439 |
by tac; |
|
440 |
by (stac beta_cfun 1); |
|
441 |
by tac; |
|
442 |
by (asm_simp_tac Ssum0_ss 1); |
|
443 |
qed "sscase3"; |
|
10230 | 444 |
Addsimps [sscase3]; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
445 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
446 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
447 |
Goalw [sinl_def,sinr_def] |
10834 | 448 |
"(sinl$x << sinl$y) = (x << y)"; |
9245 | 449 |
by (stac beta_cfun 1); |
450 |
by tac; |
|
451 |
by (stac beta_cfun 1); |
|
452 |
by tac; |
|
453 |
by (rtac less_ssum3a 1); |
|
454 |
qed "less_ssum4a"; |
|
455 |
||
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
456 |
Goalw [sinl_def,sinr_def] |
10834 | 457 |
"(sinr$x << sinr$y) = (x << y)"; |
9245 | 458 |
by (stac beta_cfun 1); |
459 |
by tac; |
|
460 |
by (stac beta_cfun 1); |
|
461 |
by tac; |
|
462 |
by (rtac less_ssum3b 1); |
|
463 |
qed "less_ssum4b"; |
|
464 |
||
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
465 |
Goalw [sinl_def,sinr_def] |
10834 | 466 |
"(sinl$x << sinr$y) = (x = UU)"; |
9245 | 467 |
by (stac beta_cfun 1); |
468 |
by tac; |
|
469 |
by (stac beta_cfun 1); |
|
470 |
by tac; |
|
471 |
by (rtac less_ssum3c 1); |
|
472 |
qed "less_ssum4c"; |
|
473 |
||
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
474 |
Goalw [sinl_def,sinr_def] |
10834 | 475 |
"(sinr$x << sinl$y) = (x = UU)"; |
9245 | 476 |
by (stac beta_cfun 1); |
477 |
by tac; |
|
478 |
by (stac beta_cfun 1); |
|
479 |
by tac; |
|
480 |
by (rtac less_ssum3d 1); |
|
481 |
qed "less_ssum4d"; |
|
482 |
||
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
483 |
Goalw [sinl_def,sinr_def] |
10834 | 484 |
"chain(Y) ==> (!i.? x.(Y i)=sinl$x)|(!i.? y.(Y i)=sinr$y)"; |
9245 | 485 |
by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1); |
486 |
by (etac ssum_lemma4 1); |
|
487 |
qed "ssum_chainE"; |
|
488 |
||
489 |
||
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
490 |
Goalw [sinl_def,sinr_def,sscase_def] |
10834 | 491 |
"[| chain(Y); !i.? x. Y(i) = sinl$x |] ==>\ |
492 |
\ lub(range(Y)) = sinl$(lub(range(%i. sscase$(LAM x. x)$(LAM y. UU)$(Y i))))"; |
|
9245 | 493 |
by (stac beta_cfun 1); |
494 |
by tac; |
|
495 |
by (stac beta_cfun 1); |
|
496 |
by tac; |
|
497 |
by (stac beta_cfun 1); |
|
498 |
by tac; |
|
499 |
by (stac (beta_cfun RS ext) 1); |
|
500 |
by tac; |
|
501 |
by (rtac thelub_ssum1a 1); |
|
502 |
by (atac 1); |
|
503 |
by (rtac allI 1); |
|
504 |
by (etac allE 1); |
|
505 |
by (etac exE 1); |
|
506 |
by (rtac exI 1); |
|
507 |
by (etac box_equals 1); |
|
508 |
by (rtac refl 1); |
|
509 |
by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinl]) 1); |
|
510 |
qed "thelub_ssum2a"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
511 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
512 |
Goalw [sinl_def,sinr_def,sscase_def] |
10834 | 513 |
"[| chain(Y); !i.? x. Y(i) = sinr$x |] ==>\ |
514 |
\ lub(range(Y)) = sinr$(lub(range(%i. sscase$(LAM y. UU)$(LAM x. x)$(Y i))))"; |
|
9245 | 515 |
by (stac beta_cfun 1); |
516 |
by tac; |
|
517 |
by (stac beta_cfun 1); |
|
518 |
by tac; |
|
519 |
by (stac beta_cfun 1); |
|
520 |
by tac; |
|
521 |
by (stac (beta_cfun RS ext) 1); |
|
522 |
by tac; |
|
523 |
by (rtac thelub_ssum1b 1); |
|
524 |
by (atac 1); |
|
525 |
by (rtac allI 1); |
|
526 |
by (etac allE 1); |
|
527 |
by (etac exE 1); |
|
528 |
by (rtac exI 1); |
|
529 |
by (etac box_equals 1); |
|
530 |
by (rtac refl 1); |
|
531 |
by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, cont_Iwhen3]) 1); |
|
532 |
qed "thelub_ssum2b"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
533 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
534 |
Goalw [sinl_def,sinr_def] |
10834 | 535 |
"[| chain(Y); lub(range(Y)) = sinl$x|] ==> !i.? x. Y(i)=sinl$x"; |
9245 | 536 |
by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, cont_Iwhen3]) 1); |
537 |
by (etac ssum_lemma9 1); |
|
538 |
by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, cont_Iwhen3]) 1); |
|
539 |
qed "thelub_ssum2a_rev"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
540 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
541 |
Goalw [sinl_def,sinr_def] |
10834 | 542 |
"[| chain(Y); lub(range(Y)) = sinr$x|] ==> !i.? x. Y(i)=sinr$x"; |
9245 | 543 |
by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, cont_Iwhen3]) 1); |
544 |
by (etac ssum_lemma10 1); |
|
545 |
by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, cont_Iwhen3]) 1); |
|
546 |
qed "thelub_ssum2b_rev"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
547 |
|
9169 | 548 |
Goal "chain(Y) ==>\ |
10834 | 549 |
\ lub(range(Y)) = sinl$(lub(range(%i. sscase$(LAM x. x)$(LAM y. UU)$(Y i))))\ |
550 |
\ | lub(range(Y)) = sinr$(lub(range(%i. sscase$(LAM y. UU)$(LAM x. x)$(Y i))))"; |
|
9169 | 551 |
by (rtac (ssum_chainE RS disjE) 1); |
552 |
by (atac 1); |
|
553 |
by (rtac disjI1 1); |
|
554 |
by (etac thelub_ssum2a 1); |
|
555 |
by (atac 1); |
|
556 |
by (rtac disjI2 1); |
|
557 |
by (etac thelub_ssum2b 1); |
|
558 |
by (atac 1); |
|
559 |
qed "thelub_ssum3"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
560 |
|
10834 | 561 |
Goal "sscase$sinl$sinr$z=z"; |
9169 | 562 |
by (res_inst_tac [("p","z")] ssumE 1); |
10230 | 563 |
by Auto_tac; |
9169 | 564 |
qed "sscase4"; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
565 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
566 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
567 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
568 |
(* install simplifier for Ssum *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
569 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
570 |
|
1274 | 571 |
val Ssum_rews = [strict_sinl,strict_sinr,defined_sinl,defined_sinr, |
5439 | 572 |
sscase1,sscase2,sscase3]; |