author | nipkow |
Fri, 04 Apr 1997 16:33:28 +0200 | |
changeset 2912 | 3fac3e8d5d3e |
parent 2842 | 143ebf752e78 |
child 3031 | c51ee445605d |
permissions | -rw-r--r-- |
1461 | 1 |
(* Title: HOLCF/cfun3.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 |
*) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
6 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
7 |
open Cfun3; |
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 *) |
10 |
qed_goal "inst_cfun_pcpo" thy "UU = fabs(%x.UU)" |
|
11 |
(fn prems => |
|
12 |
[ |
|
13 |
(simp_tac (HOL_ss addsimps [UU_def,UU_cfun_def]) 1) |
|
14 |
]); |
|
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 |
(* the contlub property for fapp its 'first' argument *) |
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 |
|
2640 | 20 |
qed_goal "contlub_fapp1" thy "contlub(fapp)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
21 |
(fn prems => |
1461 | 22 |
[ |
23 |
(rtac contlubI 1), |
|
24 |
(strip_tac 1), |
|
25 |
(rtac (expand_fun_eq RS iffD2) 1), |
|
26 |
(strip_tac 1), |
|
2033 | 27 |
(stac thelub_cfun 1), |
1461 | 28 |
(atac 1), |
2033 | 29 |
(stac Cfunapp2 1), |
1461 | 30 |
(etac cont_lubcfun 1), |
2033 | 31 |
(stac thelub_fun 1), |
1461 | 32 |
(etac (monofun_fapp1 RS ch2ch_monofun) 1), |
33 |
(rtac refl 1) |
|
34 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
35 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
36 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
37 |
(* ------------------------------------------------------------------------ *) |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
38 |
(* the cont property for fapp in its first argument *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
39 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
40 |
|
2640 | 41 |
qed_goal "cont_fapp1" thy "cont(fapp)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
42 |
(fn prems => |
1461 | 43 |
[ |
44 |
(rtac monocontlub2cont 1), |
|
45 |
(rtac monofun_fapp1 1), |
|
46 |
(rtac contlub_fapp1 1) |
|
47 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
48 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
49 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
50 |
(* ------------------------------------------------------------------------ *) |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
51 |
(* contlub, cont properties of fapp in its first argument in mixfix _[_] *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
52 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
53 |
|
2640 | 54 |
qed_goal "contlub_cfun_fun" thy |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
55 |
"is_chain(FY) ==>\ |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
56 |
\ lub(range FY)`x = lub(range (%i.FY(i)`x))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
57 |
(fn prems => |
1461 | 58 |
[ |
59 |
(cut_facts_tac prems 1), |
|
60 |
(rtac trans 1), |
|
61 |
(etac (contlub_fapp1 RS contlubE RS spec RS mp RS fun_cong) 1), |
|
2033 | 62 |
(stac thelub_fun 1), |
1461 | 63 |
(etac (monofun_fapp1 RS ch2ch_monofun) 1), |
64 |
(rtac refl 1) |
|
65 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
66 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
67 |
|
2640 | 68 |
qed_goal "cont_cfun_fun" thy |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
69 |
"is_chain(FY) ==>\ |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
70 |
\ range(%i.FY(i)`x) <<| lub(range FY)`x" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
71 |
(fn prems => |
1461 | 72 |
[ |
73 |
(cut_facts_tac prems 1), |
|
74 |
(rtac thelubE 1), |
|
75 |
(etac ch2ch_fappL 1), |
|
76 |
(etac (contlub_cfun_fun RS sym) 1) |
|
77 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
78 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
79 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
80 |
(* ------------------------------------------------------------------------ *) |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
81 |
(* contlub, cont properties of fapp in both argument in mixfix _[_] *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
82 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
83 |
|
2640 | 84 |
qed_goal "contlub_cfun" thy |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
85 |
"[|is_chain(FY);is_chain(TY)|] ==>\ |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
86 |
\ (lub(range FY))`(lub(range TY)) = lub(range(%i.FY(i)`(TY i)))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
87 |
(fn prems => |
1461 | 88 |
[ |
89 |
(cut_facts_tac prems 1), |
|
90 |
(rtac contlub_CF2 1), |
|
91 |
(rtac cont_fapp1 1), |
|
92 |
(rtac allI 1), |
|
93 |
(rtac cont_fapp2 1), |
|
94 |
(atac 1), |
|
95 |
(atac 1) |
|
96 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
97 |
|
2640 | 98 |
qed_goal "cont_cfun" thy |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
99 |
"[|is_chain(FY);is_chain(TY)|] ==>\ |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
100 |
\ range(%i.(FY i)`(TY i)) <<| (lub (range FY))`(lub(range TY))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
101 |
(fn prems => |
1461 | 102 |
[ |
103 |
(cut_facts_tac prems 1), |
|
104 |
(rtac thelubE 1), |
|
105 |
(rtac (monofun_fapp1 RS ch2ch_MF2LR) 1), |
|
106 |
(rtac allI 1), |
|
107 |
(rtac monofun_fapp2 1), |
|
108 |
(atac 1), |
|
109 |
(atac 1), |
|
110 |
(etac (contlub_cfun RS sym) 1), |
|
111 |
(atac 1) |
|
112 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
113 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
114 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
115 |
(* ------------------------------------------------------------------------ *) |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
116 |
(* cont2cont lemma for fapp *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
117 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
118 |
|
2640 | 119 |
qed_goal "cont2cont_fapp" thy |
1461 | 120 |
"[|cont(%x.ft x);cont(%x.tt x)|] ==> cont(%x. (ft x)`(tt x))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
121 |
(fn prems => |
1461 | 122 |
[ |
123 |
(cut_facts_tac prems 1), |
|
124 |
(rtac cont2cont_app2 1), |
|
125 |
(rtac cont2cont_app2 1), |
|
126 |
(rtac cont_const 1), |
|
127 |
(rtac cont_fapp1 1), |
|
128 |
(atac 1), |
|
129 |
(rtac cont_fapp2 1), |
|
130 |
(atac 1) |
|
131 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
132 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
133 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
134 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
135 |
(* ------------------------------------------------------------------------ *) |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
136 |
(* cont2mono Lemma for %x. LAM y. c1(x)(y) *) |
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 |
|
2640 | 139 |
qed_goal "cont2mono_LAM" thy |
2842 | 140 |
"[| !!x.cont(c1 x); !!y.monofun(%x.c1 x y)|] ==> monofun(%x. LAM y. c1 x y)" |
141 |
(fn [p1,p2] => |
|
1461 | 142 |
[ |
143 |
(rtac monofunI 1), |
|
144 |
(strip_tac 1), |
|
2033 | 145 |
(stac less_cfun 1), |
146 |
(stac less_fun 1), |
|
1461 | 147 |
(rtac allI 1), |
2033 | 148 |
(stac beta_cfun 1), |
2842 | 149 |
(rtac p1 1), |
2033 | 150 |
(stac beta_cfun 1), |
2842 | 151 |
(rtac p1 1), |
152 |
(etac (p2 RS monofunE RS spec RS spec RS mp) 1) |
|
1461 | 153 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
154 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
155 |
(* ------------------------------------------------------------------------ *) |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
156 |
(* cont2cont Lemma for %x. LAM y. c1 x y) *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
157 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
158 |
|
2640 | 159 |
qed_goal "cont2cont_LAM" thy |
2842 | 160 |
"[| !!x.cont(c1 x); !!y.cont(%x.c1 x y) |] ==> cont(%x. LAM y. c1 x y)" |
161 |
(fn [p1,p2] => |
|
1461 | 162 |
[ |
163 |
(rtac monocontlub2cont 1), |
|
2842 | 164 |
(rtac (p1 RS cont2mono_LAM) 1), |
165 |
(rtac (p2 RS cont2mono) 1), |
|
1461 | 166 |
(rtac contlubI 1), |
167 |
(strip_tac 1), |
|
2033 | 168 |
(stac thelub_cfun 1), |
2842 | 169 |
(rtac (p1 RS cont2mono_LAM RS ch2ch_monofun) 1), |
170 |
(rtac (p2 RS cont2mono) 1), |
|
1461 | 171 |
(atac 1), |
172 |
(res_inst_tac [("f","fabs")] arg_cong 1), |
|
173 |
(rtac ext 1), |
|
2842 | 174 |
(stac (p1 RS beta_cfun RS ext) 1), |
175 |
(etac (p2 RS cont2contlub RS contlubE RS spec RS mp) 1) |
|
1461 | 176 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
177 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
178 |
(* ------------------------------------------------------------------------ *) |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
179 |
(* cont2cont tactic *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
180 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
181 |
|
2566 | 182 |
val cont_lemmas1 = [cont_const, cont_id, cont_fapp2, |
2842 | 183 |
cont2cont_fapp,cont2cont_LAM]; |
2566 | 184 |
|
185 |
Addsimps cont_lemmas1; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
186 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
187 |
|
2566 | 188 |
(*val cont_tac = (fn i => (resolve_tac cont_lemmas i));*) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
189 |
|
2566 | 190 |
(*val cont_tacR = (fn i => (REPEAT (cont_tac i)));*) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
191 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
192 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
193 |
(* function application _[_] is strict in its first arguments *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
194 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
195 |
|
2841
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2640
diff
changeset
|
196 |
qed_goal "strict_fapp1" thy "(UU::'a::cpo->'b)`x = (UU::'b)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
197 |
(fn prems => |
1461 | 198 |
[ |
2033 | 199 |
(stac inst_cfun_pcpo 1), |
200 |
(stac beta_cfun 1), |
|
2566 | 201 |
(Simp_tac 1), |
1461 | 202 |
(rtac refl 1) |
203 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
204 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
205 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
206 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
207 |
(* results about strictify *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
208 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
209 |
|
2640 | 210 |
qed_goalw "Istrictify1" thy [Istrictify_def] |
1461 | 211 |
"Istrictify(f)(UU)= (UU)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
212 |
(fn prems => |
1461 | 213 |
[ |
214 |
(Simp_tac 1) |
|
215 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
216 |
|
2640 | 217 |
qed_goalw "Istrictify2" thy [Istrictify_def] |
1461 | 218 |
"~x=UU ==> Istrictify(f)(x)=f`x" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
219 |
(fn prems => |
1461 | 220 |
[ |
221 |
(cut_facts_tac prems 1), |
|
222 |
(Asm_simp_tac 1) |
|
223 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
224 |
|
2640 | 225 |
qed_goal "monofun_Istrictify1" thy "monofun(Istrictify)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
226 |
(fn prems => |
1461 | 227 |
[ |
228 |
(rtac monofunI 1), |
|
229 |
(strip_tac 1), |
|
230 |
(rtac (less_fun RS iffD2) 1), |
|
231 |
(strip_tac 1), |
|
232 |
(res_inst_tac [("Q","xa=UU")] (excluded_middle RS disjE) 1), |
|
2033 | 233 |
(stac Istrictify2 1), |
1461 | 234 |
(atac 1), |
2033 | 235 |
(stac Istrictify2 1), |
1461 | 236 |
(atac 1), |
237 |
(rtac monofun_cfun_fun 1), |
|
238 |
(atac 1), |
|
239 |
(hyp_subst_tac 1), |
|
2033 | 240 |
(stac Istrictify1 1), |
241 |
(stac Istrictify1 1), |
|
1461 | 242 |
(rtac refl_less 1) |
243 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
244 |
|
2640 | 245 |
qed_goal "monofun_Istrictify2" thy "monofun(Istrictify(f))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
246 |
(fn prems => |
1461 | 247 |
[ |
248 |
(rtac monofunI 1), |
|
249 |
(strip_tac 1), |
|
250 |
(res_inst_tac [("Q","x=UU")] (excluded_middle RS disjE) 1), |
|
2033 | 251 |
(stac Istrictify2 1), |
1461 | 252 |
(etac notUU_I 1), |
253 |
(atac 1), |
|
2033 | 254 |
(stac Istrictify2 1), |
1461 | 255 |
(atac 1), |
256 |
(rtac monofun_cfun_arg 1), |
|
257 |
(atac 1), |
|
258 |
(hyp_subst_tac 1), |
|
2033 | 259 |
(stac Istrictify1 1), |
1461 | 260 |
(rtac minimal 1) |
261 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
262 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
263 |
|
2640 | 264 |
qed_goal "contlub_Istrictify1" thy "contlub(Istrictify)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
265 |
(fn prems => |
1461 | 266 |
[ |
267 |
(rtac contlubI 1), |
|
268 |
(strip_tac 1), |
|
269 |
(rtac (expand_fun_eq RS iffD2) 1), |
|
270 |
(strip_tac 1), |
|
2033 | 271 |
(stac thelub_fun 1), |
1461 | 272 |
(etac (monofun_Istrictify1 RS ch2ch_monofun) 1), |
273 |
(res_inst_tac [("Q","x=UU")] (excluded_middle RS disjE) 1), |
|
2033 | 274 |
(stac Istrictify2 1), |
1461 | 275 |
(atac 1), |
2033 | 276 |
(stac (Istrictify2 RS ext) 1), |
1461 | 277 |
(atac 1), |
2033 | 278 |
(stac thelub_cfun 1), |
1461 | 279 |
(atac 1), |
2033 | 280 |
(stac beta_cfun 1), |
1461 | 281 |
(rtac cont_lubcfun 1), |
282 |
(atac 1), |
|
283 |
(rtac refl 1), |
|
284 |
(hyp_subst_tac 1), |
|
2033 | 285 |
(stac Istrictify1 1), |
286 |
(stac (Istrictify1 RS ext) 1), |
|
1461 | 287 |
(rtac (chain_UU_I_inverse RS sym) 1), |
288 |
(rtac (refl RS allI) 1) |
|
289 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
290 |
|
2640 | 291 |
qed_goal "contlub_Istrictify2" thy "contlub(Istrictify(f::'a -> 'b))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
292 |
(fn prems => |
1461 | 293 |
[ |
294 |
(rtac contlubI 1), |
|
295 |
(strip_tac 1), |
|
1675 | 296 |
(case_tac "lub(range(Y))=(UU::'a)" 1), |
1461 | 297 |
(res_inst_tac [("t","lub(range(Y))")] subst 1), |
298 |
(rtac sym 1), |
|
299 |
(atac 1), |
|
2033 | 300 |
(stac Istrictify1 1), |
1461 | 301 |
(rtac sym 1), |
302 |
(rtac chain_UU_I_inverse 1), |
|
303 |
(strip_tac 1), |
|
304 |
(res_inst_tac [("t","Y(i)"),("s","UU::'a")] subst 1), |
|
305 |
(rtac sym 1), |
|
306 |
(rtac (chain_UU_I RS spec) 1), |
|
307 |
(atac 1), |
|
308 |
(atac 1), |
|
309 |
(rtac Istrictify1 1), |
|
2033 | 310 |
(stac Istrictify2 1), |
1461 | 311 |
(atac 1), |
312 |
(res_inst_tac [("s","lub(range(%i. f`(Y i)))")] trans 1), |
|
313 |
(rtac contlub_cfun_arg 1), |
|
314 |
(atac 1), |
|
315 |
(rtac lub_equal2 1), |
|
316 |
(rtac (chain_mono2 RS exE) 1), |
|
317 |
(atac 2), |
|
318 |
(rtac chain_UU_I_inverse2 1), |
|
319 |
(atac 1), |
|
320 |
(rtac exI 1), |
|
321 |
(strip_tac 1), |
|
322 |
(rtac (Istrictify2 RS sym) 1), |
|
323 |
(fast_tac HOL_cs 1), |
|
324 |
(rtac ch2ch_monofun 1), |
|
325 |
(rtac monofun_fapp2 1), |
|
326 |
(atac 1), |
|
327 |
(rtac ch2ch_monofun 1), |
|
328 |
(rtac monofun_Istrictify2 1), |
|
329 |
(atac 1) |
|
330 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
331 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
332 |
|
1779 | 333 |
bind_thm ("cont_Istrictify1", contlub_Istrictify1 RS |
1461 | 334 |
(monofun_Istrictify1 RS monocontlub2cont)); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
335 |
|
1779 | 336 |
bind_thm ("cont_Istrictify2", contlub_Istrictify2 RS |
1461 | 337 |
(monofun_Istrictify2 RS monocontlub2cont)); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
338 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
339 |
|
2640 | 340 |
qed_goalw "strictify1" thy [strictify_def] "strictify`f`UU=UU" (fn _ => [ |
2033 | 341 |
(stac beta_cfun 1), |
2566 | 342 |
(simp_tac (!simpset addsimps [cont_Istrictify2,cont_Istrictify1, |
343 |
cont2cont_CF1L]) 1), |
|
2033 | 344 |
(stac beta_cfun 1), |
1461 | 345 |
(rtac cont_Istrictify2 1), |
346 |
(rtac Istrictify1 1) |
|
347 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
348 |
|
2640 | 349 |
qed_goalw "strictify2" thy [strictify_def] |
2566 | 350 |
"~x=UU ==> strictify`f`x=f`x" (fn prems => [ |
2033 | 351 |
(stac beta_cfun 1), |
2566 | 352 |
(simp_tac (!simpset addsimps [cont_Istrictify2,cont_Istrictify1, |
353 |
cont2cont_CF1L]) 1), |
|
2033 | 354 |
(stac beta_cfun 1), |
1461 | 355 |
(rtac cont_Istrictify2 1), |
356 |
(rtac Istrictify2 1), |
|
357 |
(resolve_tac prems 1) |
|
358 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
359 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
360 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
361 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
362 |
(* Instantiate the simplifier *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
363 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
364 |
|
1267 | 365 |
Addsimps [minimal,refl_less,beta_cfun,strict_fapp1,strictify1, strictify2]; |
366 |
||
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
367 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
368 |
(* ------------------------------------------------------------------------ *) |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
369 |
(* use cont_tac as autotac. *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
370 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
371 |
|
2566 | 372 |
(*simpset := !simpset addsolver (K (DEPTH_SOLVE_1 o cont_tac));*) |