author | paulson |
Sat, 29 Jun 2002 22:46:56 +0200 | |
changeset 13260 | ea36a40c004f |
parent 12030 | 46d57d0290a2 |
child 14981 | e73f8140af78 |
permissions | -rw-r--r-- |
9245 | 1 |
(* Title: HOLCF/Sprod3 |
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 |
12030 | 4 |
License: GPL (GNU GENERAL PUBLIC LICENSE) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
5 |
|
9245 | 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 *) |
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
10 |
Goal "UU = Ispair UU UU"; |
9245 | 11 |
by (simp_tac (HOL_ss addsimps [UU_def,UU_sprod_def]) 1); |
12 |
qed "inst_sprod_pcpo"; |
|
13 |
||
14 |
Addsimps [inst_sprod_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 of Ispair, Isfst, Issnd *) |
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 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
20 |
Goal |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
21 |
"[| chain(Y); x~= UU; lub(range(Y))~= UU |] ==>\ |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
1043
diff
changeset
|
22 |
\ Ispair (lub(range Y)) x =\ |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
1043
diff
changeset
|
23 |
\ Ispair (lub(range(%i. Isfst(Ispair(Y i) x)))) \ |
9245 | 24 |
\ (lub(range(%i. Issnd(Ispair(Y i) x))))"; |
25 |
by (res_inst_tac [("f1","Ispair")] (arg_cong RS cong) 1); |
|
26 |
by (rtac lub_equal 1); |
|
27 |
by (atac 1); |
|
28 |
by (rtac (monofun_Isfst RS ch2ch_monofun) 1); |
|
29 |
by (rtac ch2ch_fun 1); |
|
30 |
by (rtac (monofun_Ispair1 RS ch2ch_monofun) 1); |
|
31 |
by (atac 1); |
|
32 |
by (rtac allI 1); |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
33 |
by (Asm_simp_tac 1); |
9245 | 34 |
by (rtac sym 1); |
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
35 |
by (dtac chain_UU_I_inverse2 1); |
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
36 |
by (etac exE 1); |
9245 | 37 |
by (rtac lub_chain_maxelem 1); |
38 |
by (etac Issnd2 1); |
|
39 |
by (rtac allI 1); |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
40 |
by (rename_tac "j" 1); |
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
41 |
by (case_tac "Y(j)=UU" 1); |
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
42 |
by Auto_tac; |
9245 | 43 |
qed "sprod3_lemma1"; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
44 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
45 |
Goal |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
46 |
"[| chain(Y); x ~= UU; lub(range(Y)) = UU |] ==>\ |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
1043
diff
changeset
|
47 |
\ Ispair (lub(range Y)) x =\ |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
1043
diff
changeset
|
48 |
\ Ispair (lub(range(%i. Isfst(Ispair(Y i) x))))\ |
9245 | 49 |
\ (lub(range(%i. Issnd(Ispair(Y i) x))))"; |
50 |
by (res_inst_tac [("s","UU"),("t","lub(range(Y))")] ssubst 1); |
|
51 |
by (atac 1); |
|
52 |
by (rtac trans 1); |
|
53 |
by (rtac strict_Ispair1 1); |
|
54 |
by (rtac (strict_Ispair RS sym) 1); |
|
55 |
by (rtac disjI1 1); |
|
56 |
by (rtac chain_UU_I_inverse 1); |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
57 |
by Auto_tac; |
9245 | 58 |
by (etac (chain_UU_I RS spec) 1); |
59 |
by (atac 1); |
|
60 |
qed "sprod3_lemma2"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
61 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
62 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
63 |
Goal |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
64 |
"[| chain(Y); x = UU |] ==>\ |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
1043
diff
changeset
|
65 |
\ Ispair (lub(range Y)) x =\ |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
1043
diff
changeset
|
66 |
\ Ispair (lub(range(%i. Isfst(Ispair (Y i) x))))\ |
9245 | 67 |
\ (lub(range(%i. Issnd(Ispair (Y i) x))))"; |
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
68 |
by (etac ssubst 1); |
9245 | 69 |
by (rtac trans 1); |
70 |
by (rtac strict_Ispair2 1); |
|
71 |
by (rtac (strict_Ispair RS sym) 1); |
|
72 |
by (rtac disjI1 1); |
|
73 |
by (rtac chain_UU_I_inverse 1); |
|
74 |
by (rtac allI 1); |
|
75 |
by (simp_tac Sprod0_ss 1); |
|
76 |
qed "sprod3_lemma3"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
77 |
|
9245 | 78 |
Goal "contlub(Ispair)"; |
79 |
by (rtac contlubI 1); |
|
80 |
by (strip_tac 1); |
|
81 |
by (rtac (expand_fun_eq RS iffD2) 1); |
|
82 |
by (strip_tac 1); |
|
83 |
by (stac (lub_fun RS thelubI) 1); |
|
84 |
by (etac (monofun_Ispair1 RS ch2ch_monofun) 1); |
|
85 |
by (rtac trans 1); |
|
86 |
by (rtac (thelub_sprod RS sym) 2); |
|
87 |
by (rtac ch2ch_fun 2); |
|
88 |
by (etac (monofun_Ispair1 RS ch2ch_monofun) 2); |
|
89 |
by (res_inst_tac [("Q","x=UU")] (excluded_middle RS disjE) 1); |
|
90 |
by (res_inst_tac [("Q","lub(range(Y))=UU")] (excluded_middle RS disjE) 1); |
|
91 |
by (etac sprod3_lemma1 1); |
|
92 |
by (atac 1); |
|
93 |
by (atac 1); |
|
94 |
by (etac sprod3_lemma2 1); |
|
95 |
by (atac 1); |
|
96 |
by (atac 1); |
|
97 |
by (etac sprod3_lemma3 1); |
|
98 |
by (atac 1); |
|
99 |
qed "contlub_Ispair1"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
100 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
101 |
Goal |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
102 |
"[| chain(Y); x ~= UU; lub(range(Y)) ~= UU |] ==>\ |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
1043
diff
changeset
|
103 |
\ Ispair x (lub(range Y)) =\ |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
1043
diff
changeset
|
104 |
\ Ispair (lub(range(%i. Isfst (Ispair x (Y i)))))\ |
9245 | 105 |
\ (lub(range(%i. Issnd (Ispair x (Y i)))))"; |
106 |
by (res_inst_tac [("f1","Ispair")] (arg_cong RS cong) 1); |
|
107 |
by (rtac sym 1); |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
108 |
by (dtac chain_UU_I_inverse2 1); |
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
109 |
by (etac exE 1); |
9245 | 110 |
by (rtac lub_chain_maxelem 1); |
111 |
by (etac Isfst2 1); |
|
112 |
by (rtac allI 1); |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
113 |
by (rename_tac "j" 1); |
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
114 |
by (case_tac "Y(j)=UU" 1); |
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
115 |
by Auto_tac; |
9245 | 116 |
qed "sprod3_lemma4"; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
117 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
118 |
Goal |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
119 |
"[| chain(Y); x ~= UU; lub(range(Y)) = UU |] ==>\ |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
1043
diff
changeset
|
120 |
\ Ispair x (lub(range Y)) =\ |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
1043
diff
changeset
|
121 |
\ Ispair (lub(range(%i. Isfst(Ispair x (Y i)))))\ |
9245 | 122 |
\ (lub(range(%i. Issnd(Ispair x (Y i)))))"; |
123 |
by (res_inst_tac [("s","UU"),("t","lub(range(Y))")] ssubst 1); |
|
124 |
by (atac 1); |
|
125 |
by (rtac trans 1); |
|
126 |
by (rtac strict_Ispair2 1); |
|
127 |
by (rtac (strict_Ispair RS sym) 1); |
|
128 |
by (rtac disjI2 1); |
|
129 |
by (rtac chain_UU_I_inverse 1); |
|
130 |
by (rtac allI 1); |
|
131 |
by (asm_simp_tac Sprod0_ss 1); |
|
132 |
by (etac (chain_UU_I RS spec) 1); |
|
133 |
by (atac 1); |
|
134 |
qed "sprod3_lemma5"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
135 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
136 |
Goal |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
137 |
"[| chain(Y); x = UU |] ==>\ |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
1043
diff
changeset
|
138 |
\ Ispair x (lub(range Y)) =\ |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
1043
diff
changeset
|
139 |
\ Ispair (lub(range(%i. Isfst (Ispair x (Y i)))))\ |
9245 | 140 |
\ (lub(range(%i. Issnd (Ispair x (Y i)))))"; |
141 |
by (res_inst_tac [("s","UU"),("t","x")] ssubst 1); |
|
142 |
by (atac 1); |
|
143 |
by (rtac trans 1); |
|
144 |
by (rtac strict_Ispair1 1); |
|
145 |
by (rtac (strict_Ispair RS sym) 1); |
|
146 |
by (rtac disjI1 1); |
|
147 |
by (rtac chain_UU_I_inverse 1); |
|
148 |
by (rtac allI 1); |
|
149 |
by (simp_tac Sprod0_ss 1); |
|
150 |
qed "sprod3_lemma6"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
151 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
152 |
Goal "contlub(Ispair(x))"; |
9245 | 153 |
by (rtac contlubI 1); |
154 |
by (strip_tac 1); |
|
155 |
by (rtac trans 1); |
|
156 |
by (rtac (thelub_sprod RS sym) 2); |
|
157 |
by (etac (monofun_Ispair2 RS ch2ch_monofun) 2); |
|
158 |
by (res_inst_tac [("Q","x=UU")] (excluded_middle RS disjE) 1); |
|
159 |
by (res_inst_tac [("Q","lub(range(Y))=UU")] (excluded_middle RS disjE) 1); |
|
160 |
by (etac sprod3_lemma4 1); |
|
161 |
by (atac 1); |
|
162 |
by (atac 1); |
|
163 |
by (etac sprod3_lemma5 1); |
|
164 |
by (atac 1); |
|
165 |
by (atac 1); |
|
166 |
by (etac sprod3_lemma6 1); |
|
167 |
by (atac 1); |
|
168 |
qed "contlub_Ispair2"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
169 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
170 |
Goal "cont(Ispair)"; |
9245 | 171 |
by (rtac monocontlub2cont 1); |
172 |
by (rtac monofun_Ispair1 1); |
|
173 |
by (rtac contlub_Ispair1 1); |
|
174 |
qed "cont_Ispair1"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
175 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
176 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
177 |
Goal "cont(Ispair(x))"; |
9245 | 178 |
by (rtac monocontlub2cont 1); |
179 |
by (rtac monofun_Ispair2 1); |
|
180 |
by (rtac contlub_Ispair2 1); |
|
181 |
qed "cont_Ispair2"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
182 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
183 |
Goal "contlub(Isfst)"; |
9245 | 184 |
by (rtac contlubI 1); |
185 |
by (strip_tac 1); |
|
186 |
by (stac (lub_sprod RS thelubI) 1); |
|
187 |
by (atac 1); |
|
188 |
by (res_inst_tac [("Q","lub(range(%i. Issnd(Y(i))))=UU")] (excluded_middle RS disjE) 1); |
|
189 |
by (asm_simp_tac Sprod0_ss 1); |
|
190 |
by (res_inst_tac [("s","UU"),("t","lub(range(%i. Issnd(Y(i))))")] ssubst 1); |
|
191 |
by (atac 1); |
|
192 |
by (rtac trans 1); |
|
193 |
by (asm_simp_tac Sprod0_ss 1); |
|
194 |
by (rtac sym 1); |
|
195 |
by (rtac chain_UU_I_inverse 1); |
|
196 |
by (rtac allI 1); |
|
197 |
by (rtac strict_Isfst 1); |
|
10230 | 198 |
by (rtac contrapos_np 1); |
9245 | 199 |
by (etac (defined_IsfstIssnd RS conjunct2) 2); |
200 |
by (fast_tac (HOL_cs addSDs [monofun_Issnd RS ch2ch_monofun RS chain_UU_I RS spec]) 1); |
|
201 |
qed "contlub_Isfst"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
202 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
203 |
Goal "contlub(Issnd)"; |
9245 | 204 |
by (rtac contlubI 1); |
205 |
by (strip_tac 1); |
|
206 |
by (stac (lub_sprod RS thelubI) 1); |
|
207 |
by (atac 1); |
|
208 |
by (res_inst_tac [("Q","lub(range(%i. Isfst(Y(i))))=UU")] (excluded_middle RS disjE) 1); |
|
209 |
by (asm_simp_tac Sprod0_ss 1); |
|
210 |
by (res_inst_tac [("s","UU"),("t","lub(range(%i. Isfst(Y(i))))")] ssubst 1); |
|
211 |
by (atac 1); |
|
212 |
by (asm_simp_tac Sprod0_ss 1); |
|
213 |
by (rtac sym 1); |
|
214 |
by (rtac chain_UU_I_inverse 1); |
|
215 |
by (rtac allI 1); |
|
216 |
by (rtac strict_Issnd 1); |
|
10230 | 217 |
by (rtac contrapos_np 1); |
9245 | 218 |
by (etac (defined_IsfstIssnd RS conjunct1) 2); |
219 |
by (fast_tac (HOL_cs addSDs [monofun_Isfst RS ch2ch_monofun RS chain_UU_I RS spec]) 1); |
|
220 |
qed "contlub_Issnd"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
221 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
222 |
Goal "cont(Isfst)"; |
9245 | 223 |
by (rtac monocontlub2cont 1); |
224 |
by (rtac monofun_Isfst 1); |
|
225 |
by (rtac contlub_Isfst 1); |
|
226 |
qed "cont_Isfst"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
227 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
228 |
Goal "cont(Issnd)"; |
9245 | 229 |
by (rtac monocontlub2cont 1); |
230 |
by (rtac monofun_Issnd 1); |
|
231 |
by (rtac contlub_Issnd 1); |
|
232 |
qed "cont_Issnd"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
233 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
234 |
Goal "[|x1=x2;y1=y2|] ==> (:x1,y1:) = (:x2,y2:)"; |
9245 | 235 |
by (fast_tac HOL_cs 1); |
236 |
qed "spair_eq"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
237 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
238 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
239 |
(* convert all lemmas to the continuous versions *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
240 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
241 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
242 |
Goalw [spair_def] |
10834 | 243 |
"(LAM x y. Ispair x y)$a$b = Ispair a b"; |
9245 | 244 |
by (stac beta_cfun 1); |
245 |
by (simp_tac (simpset() addsimps [cont_Ispair2, cont_Ispair1, cont2cont_CF1L]) 1); |
|
246 |
by (stac beta_cfun 1); |
|
247 |
by (rtac cont_Ispair2 1); |
|
248 |
by (rtac refl 1); |
|
249 |
qed "beta_cfun_sprod"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
250 |
|
9245 | 251 |
Addsimps [beta_cfun_sprod]; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
252 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
253 |
Goalw [spair_def] |
9245 | 254 |
"[| aa~=UU ; ba~=UU ; (:a,b:)=(:aa,ba:) |] ==> a=aa & b=ba"; |
255 |
by (etac inject_Ispair 1); |
|
256 |
by (atac 1); |
|
257 |
by (etac box_equals 1); |
|
258 |
by (rtac beta_cfun_sprod 1); |
|
259 |
by (rtac beta_cfun_sprod 1); |
|
260 |
qed "inject_spair"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
261 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
262 |
Goalw [spair_def] "UU = (:UU,UU:)"; |
9245 | 263 |
by (rtac sym 1); |
264 |
by (rtac trans 1); |
|
265 |
by (rtac beta_cfun_sprod 1); |
|
266 |
by (rtac sym 1); |
|
267 |
by (rtac inst_sprod_pcpo 1); |
|
268 |
qed "inst_sprod_pcpo2"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
269 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
270 |
Goalw [spair_def] |
9245 | 271 |
"(a=UU | b=UU) ==> (:a,b:)=UU"; |
272 |
by (rtac trans 1); |
|
273 |
by (rtac beta_cfun_sprod 1); |
|
274 |
by (rtac trans 1); |
|
275 |
by (rtac (inst_sprod_pcpo RS sym) 2); |
|
276 |
by (etac strict_Ispair 1); |
|
277 |
qed "strict_spair"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
278 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
279 |
Goalw [spair_def] "(:UU,b:) = UU"; |
9245 | 280 |
by (stac beta_cfun_sprod 1); |
281 |
by (rtac trans 1); |
|
282 |
by (rtac (inst_sprod_pcpo RS sym) 2); |
|
283 |
by (rtac strict_Ispair1 1); |
|
284 |
qed "strict_spair1"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
285 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
286 |
Goalw [spair_def] "(:a,UU:) = UU"; |
9245 | 287 |
by (stac beta_cfun_sprod 1); |
288 |
by (rtac trans 1); |
|
289 |
by (rtac (inst_sprod_pcpo RS sym) 2); |
|
290 |
by (rtac strict_Ispair2 1); |
|
291 |
qed "strict_spair2"; |
|
292 |
||
293 |
Addsimps [strict_spair1,strict_spair2]; |
|
294 |
||
295 |
Goalw [spair_def] "(:x,y:)~=UU ==> ~x=UU & ~y=UU"; |
|
296 |
by (rtac strict_Ispair_rev 1); |
|
297 |
by Auto_tac; |
|
298 |
qed "strict_spair_rev"; |
|
299 |
||
300 |
Goalw [spair_def] "(:a,b:) = UU ==> (a = UU | b = UU)"; |
|
301 |
by (rtac defined_Ispair_rev 1); |
|
302 |
by Auto_tac; |
|
303 |
qed "defined_spair_rev"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
304 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
305 |
Goalw [spair_def] |
9245 | 306 |
"[|a~=UU; b~=UU|] ==> (:a,b:) ~= UU"; |
307 |
by (stac beta_cfun_sprod 1); |
|
308 |
by (stac inst_sprod_pcpo 1); |
|
309 |
by (etac defined_Ispair 1); |
|
310 |
by (atac 1); |
|
311 |
qed "defined_spair"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
312 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
313 |
Goalw [spair_def] |
9245 | 314 |
"z=UU | (? a b. z=(:a,b:) & a~=UU & b~=UU)"; |
315 |
by (rtac (Exh_Sprod RS disjE) 1); |
|
316 |
by (rtac disjI1 1); |
|
317 |
by (stac inst_sprod_pcpo 1); |
|
318 |
by (atac 1); |
|
319 |
by (rtac disjI2 1); |
|
320 |
by (etac exE 1); |
|
321 |
by (etac exE 1); |
|
322 |
by (rtac exI 1); |
|
323 |
by (rtac exI 1); |
|
324 |
by (rtac conjI 1); |
|
325 |
by (stac beta_cfun_sprod 1); |
|
326 |
by (fast_tac HOL_cs 1); |
|
327 |
by (fast_tac HOL_cs 1); |
|
328 |
qed "Exh_Sprod2"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
329 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
330 |
|
9245 | 331 |
val [prem1,prem2] = Goalw [spair_def] |
332 |
"[|p=UU ==> Q; !!x y. [| p=(:x,y:); x~=UU; y~=UU|] ==> Q|] ==> Q"; |
|
333 |
by (rtac IsprodE 1); |
|
334 |
by (rtac prem1 1); |
|
335 |
by (stac inst_sprod_pcpo 1); |
|
336 |
by (atac 1); |
|
337 |
by (rtac prem2 1); |
|
338 |
by (atac 2); |
|
339 |
by (atac 2); |
|
340 |
by (stac beta_cfun_sprod 1); |
|
341 |
by (atac 1); |
|
342 |
qed "sprodE"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
343 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
344 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
345 |
Goalw [sfst_def] |
10834 | 346 |
"p=UU==>sfst$p=UU"; |
9245 | 347 |
by (stac beta_cfun 1); |
348 |
by (rtac cont_Isfst 1); |
|
349 |
by (rtac strict_Isfst 1); |
|
350 |
by (rtac (inst_sprod_pcpo RS subst) 1); |
|
351 |
by (atac 1); |
|
352 |
qed "strict_sfst"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
353 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
354 |
Goalw [sfst_def,spair_def] |
10834 | 355 |
"sfst$(:UU,y:) = UU"; |
9245 | 356 |
by (stac beta_cfun_sprod 1); |
357 |
by (stac beta_cfun 1); |
|
358 |
by (rtac cont_Isfst 1); |
|
359 |
by (rtac strict_Isfst1 1); |
|
360 |
qed "strict_sfst1"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
361 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
362 |
Goalw [sfst_def,spair_def] |
10834 | 363 |
"sfst$(:x,UU:) = UU"; |
9245 | 364 |
by (stac beta_cfun_sprod 1); |
365 |
by (stac beta_cfun 1); |
|
366 |
by (rtac cont_Isfst 1); |
|
367 |
by (rtac strict_Isfst2 1); |
|
368 |
qed "strict_sfst2"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
369 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
370 |
Goalw [ssnd_def] |
10834 | 371 |
"p=UU==>ssnd$p=UU"; |
9245 | 372 |
by (stac beta_cfun 1); |
373 |
by (rtac cont_Issnd 1); |
|
374 |
by (rtac strict_Issnd 1); |
|
375 |
by (rtac (inst_sprod_pcpo RS subst) 1); |
|
376 |
by (atac 1); |
|
377 |
qed "strict_ssnd"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
378 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
379 |
Goalw [ssnd_def,spair_def] |
10834 | 380 |
"ssnd$(:UU,y:) = UU"; |
9245 | 381 |
by (stac beta_cfun_sprod 1); |
382 |
by (stac beta_cfun 1); |
|
383 |
by (rtac cont_Issnd 1); |
|
384 |
by (rtac strict_Issnd1 1); |
|
385 |
qed "strict_ssnd1"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
386 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
387 |
Goalw [ssnd_def,spair_def] |
10834 | 388 |
"ssnd$(:x,UU:) = UU"; |
9245 | 389 |
by (stac beta_cfun_sprod 1); |
390 |
by (stac beta_cfun 1); |
|
391 |
by (rtac cont_Issnd 1); |
|
392 |
by (rtac strict_Issnd2 1); |
|
393 |
qed "strict_ssnd2"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
394 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
395 |
Goalw [sfst_def,spair_def] |
10834 | 396 |
"y~=UU ==>sfst$(:x,y:)=x"; |
9245 | 397 |
by (stac beta_cfun_sprod 1); |
398 |
by (stac beta_cfun 1); |
|
399 |
by (rtac cont_Isfst 1); |
|
400 |
by (etac Isfst2 1); |
|
401 |
qed "sfst2"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
402 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
403 |
Goalw [ssnd_def,spair_def] |
10834 | 404 |
"x~=UU ==>ssnd$(:x,y:)=y"; |
9245 | 405 |
by (stac beta_cfun_sprod 1); |
406 |
by (stac beta_cfun 1); |
|
407 |
by (rtac cont_Issnd 1); |
|
408 |
by (etac Issnd2 1); |
|
409 |
qed "ssnd2"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
410 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
411 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
412 |
Goalw [sfst_def,ssnd_def,spair_def] |
10834 | 413 |
"p~=UU ==> sfst$p ~=UU & ssnd$p ~=UU"; |
9245 | 414 |
by (stac beta_cfun 1); |
415 |
by (rtac cont_Issnd 1); |
|
416 |
by (stac beta_cfun 1); |
|
417 |
by (rtac cont_Isfst 1); |
|
418 |
by (rtac defined_IsfstIssnd 1); |
|
419 |
by (rtac (inst_sprod_pcpo RS subst) 1); |
|
420 |
by (atac 1); |
|
421 |
qed "defined_sfstssnd"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
422 |
|
10834 | 423 |
Goalw [sfst_def,ssnd_def,spair_def] "(:sfst$p , ssnd$p:) = p"; |
9245 | 424 |
by (stac beta_cfun_sprod 1); |
425 |
by (stac beta_cfun 1); |
|
426 |
by (rtac cont_Issnd 1); |
|
427 |
by (stac beta_cfun 1); |
|
428 |
by (rtac cont_Isfst 1); |
|
429 |
by (rtac (surjective_pairing_Sprod RS sym) 1); |
|
430 |
qed "surjective_pairing_Sprod2"; |
|
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 [sfst_def,ssnd_def,spair_def] |
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
433 |
"chain(S) ==> range(S) <<| \ |
10834 | 434 |
\ (: lub(range(%i. sfst$(S i))), lub(range(%i. ssnd$(S i))) :)"; |
9245 | 435 |
by (stac beta_cfun_sprod 1); |
436 |
by (stac (beta_cfun RS ext) 1); |
|
437 |
by (rtac cont_Issnd 1); |
|
438 |
by (stac (beta_cfun RS ext) 1); |
|
439 |
by (rtac cont_Isfst 1); |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
440 |
by (etac lub_sprod 1); |
9245 | 441 |
qed "lub_sprod2"; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
442 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
443 |
|
1779 | 444 |
bind_thm ("thelub_sprod2", lub_sprod2 RS thelubI); |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
1043
diff
changeset
|
445 |
(* |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
446 |
"chain ?S1 ==> |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
1043
diff
changeset
|
447 |
lub (range ?S1) = |
10834 | 448 |
(:lub (range (%i. sfst$(?S1 i))), lub (range (%i. ssnd$(?S1 i))):)" : thm |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
1043
diff
changeset
|
449 |
*) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
450 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
451 |
Goalw [ssplit_def] |
10834 | 452 |
"ssplit$f$UU=UU"; |
9245 | 453 |
by (stac beta_cfun 1); |
454 |
by (Simp_tac 1); |
|
455 |
by (stac strictify1 1); |
|
456 |
by (rtac refl 1); |
|
457 |
qed "ssplit1"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
458 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
459 |
Goalw [ssplit_def] |
10834 | 460 |
"[|x~=UU;y~=UU|] ==> ssplit$f$(:x,y:)= f$x$y"; |
9245 | 461 |
by (stac beta_cfun 1); |
462 |
by (Simp_tac 1); |
|
463 |
by (stac strictify2 1); |
|
464 |
by (rtac defined_spair 1); |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
465 |
by (assume_tac 1); |
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
466 |
by (assume_tac 1); |
9245 | 467 |
by (stac beta_cfun 1); |
468 |
by (Simp_tac 1); |
|
469 |
by (stac sfst2 1); |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
470 |
by (assume_tac 1); |
9245 | 471 |
by (stac ssnd2 1); |
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
472 |
by (assume_tac 1); |
9245 | 473 |
by (rtac refl 1); |
474 |
qed "ssplit2"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
475 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
476 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
477 |
Goalw [ssplit_def] |
10834 | 478 |
"ssplit$spair$z=z"; |
9245 | 479 |
by (stac beta_cfun 1); |
480 |
by (Simp_tac 1); |
|
481 |
by (case_tac "z=UU" 1); |
|
482 |
by (hyp_subst_tac 1); |
|
483 |
by (rtac strictify1 1); |
|
484 |
by (rtac trans 1); |
|
485 |
by (rtac strictify2 1); |
|
486 |
by (atac 1); |
|
487 |
by (stac beta_cfun 1); |
|
488 |
by (Simp_tac 1); |
|
489 |
by (rtac surjective_pairing_Sprod2 1); |
|
490 |
qed "ssplit3"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
491 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
492 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
493 |
(* install simplifier for Sprod *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
494 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
495 |
|
9245 | 496 |
val Sprod_rews = [strict_sfst1,strict_sfst2, |
1461 | 497 |
strict_ssnd1,strict_ssnd2,sfst2,ssnd2,defined_spair, |
498 |
ssplit1,ssplit2]; |
|
2640 | 499 |
Addsimps Sprod_rews; |
1274 | 500 |