author | wenzelm |
Wed, 01 Sep 1999 21:04:01 +0200 | |
changeset 7404 | e488cf3da60a |
parent 7322 | d16d7ddcc842 |
child 7499 | 23e090051cb8 |
permissions | -rw-r--r-- |
2640 | 1 |
(* Title: HOLCF/Cont.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 |
|
2640 | 6 |
Lemmas for Cont.thy |
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 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
9 |
open Cont; |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
10 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
11 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
12 |
(* access to definition *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
13 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
14 |
|
2640 | 15 |
qed_goalw "contlubI" thy [contlub] |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
16 |
"! Y. chain(Y) --> f(lub(range(Y))) = lub(range(%i. f(Y(i))))==>\ |
1461 | 17 |
\ contlub(f)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
18 |
(fn prems => |
1461 | 19 |
[ |
20 |
(cut_facts_tac prems 1), |
|
21 |
(atac 1) |
|
22 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
23 |
|
2640 | 24 |
qed_goalw "contlubE" thy [contlub] |
1461 | 25 |
" contlub(f)==>\ |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
26 |
\ ! Y. chain(Y) --> f(lub(range(Y))) = lub(range(%i. f(Y(i))))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
27 |
(fn prems => |
1461 | 28 |
[ |
29 |
(cut_facts_tac prems 1), |
|
30 |
(atac 1) |
|
31 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
32 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
33 |
|
2640 | 34 |
qed_goalw "contI" thy [cont] |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
35 |
"! Y. chain(Y) --> range(% i. f(Y(i))) <<| f(lub(range(Y))) ==> cont(f)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
36 |
(fn prems => |
1461 | 37 |
[ |
38 |
(cut_facts_tac prems 1), |
|
39 |
(atac 1) |
|
40 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
41 |
|
2640 | 42 |
qed_goalw "contE" thy [cont] |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
43 |
"cont(f) ==> ! Y. chain(Y) --> range(% i. f(Y(i))) <<| f(lub(range(Y)))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
44 |
(fn prems => |
1461 | 45 |
[ |
46 |
(cut_facts_tac prems 1), |
|
47 |
(atac 1) |
|
48 |
]); |
|
243
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 |
|
2640 | 51 |
qed_goalw "monofunI" thy [monofun] |
1461 | 52 |
"! x y. x << y --> f(x) << f(y) ==> monofun(f)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
53 |
(fn prems => |
1461 | 54 |
[ |
55 |
(cut_facts_tac prems 1), |
|
56 |
(atac 1) |
|
57 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
58 |
|
2640 | 59 |
qed_goalw "monofunE" thy [monofun] |
1461 | 60 |
"monofun(f) ==> ! x y. x << y --> f(x) << f(y)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
61 |
(fn prems => |
1461 | 62 |
[ |
63 |
(cut_facts_tac prems 1), |
|
64 |
(atac 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 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
68 |
(* the main purpose of cont.thy is to show: *) |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
69 |
(* monofun(f) & contlub(f) <==> cont(f) *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
70 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
71 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
72 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
73 |
(* monotone functions map chains to chains *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
74 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
75 |
|
2640 | 76 |
qed_goal "ch2ch_monofun" thy |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
77 |
"[| monofun(f); chain(Y) |] ==> chain(%i. f(Y(i)))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
78 |
(fn prems => |
1461 | 79 |
[ |
80 |
(cut_facts_tac prems 1), |
|
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
81 |
(rtac chainI 1), |
1461 | 82 |
(rtac allI 1), |
83 |
(etac (monofunE RS spec RS spec RS mp) 1), |
|
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
84 |
(etac (chainE RS spec) 1) |
1461 | 85 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
86 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
87 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
88 |
(* monotone functions map upper bound to upper bounds *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
89 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
90 |
|
2640 | 91 |
qed_goal "ub2ub_monofun" thy |
3842 | 92 |
"[| monofun(f); range(Y) <| u|] ==> range(%i. f(Y(i))) <| f(u)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
93 |
(fn prems => |
1461 | 94 |
[ |
95 |
(cut_facts_tac prems 1), |
|
96 |
(rtac ub_rangeI 1), |
|
97 |
(rtac allI 1), |
|
98 |
(etac (monofunE RS spec RS spec RS mp) 1), |
|
99 |
(etac (ub_rangeE RS spec) 1) |
|
100 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
101 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
102 |
(* ------------------------------------------------------------------------ *) |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
103 |
(* left to right: monofun(f) & contlub(f) ==> cont(f) *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
104 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
105 |
|
2640 | 106 |
qed_goalw "monocontlub2cont" thy [cont] |
1461 | 107 |
"[|monofun(f);contlub(f)|] ==> cont(f)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
108 |
(fn prems => |
1461 | 109 |
[ |
110 |
(cut_facts_tac prems 1), |
|
111 |
(strip_tac 1), |
|
112 |
(rtac thelubE 1), |
|
113 |
(etac ch2ch_monofun 1), |
|
114 |
(atac 1), |
|
115 |
(etac (contlubE RS spec RS mp RS sym) 1), |
|
116 |
(atac 1) |
|
117 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
118 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
119 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
120 |
(* first a lemma about binary chains *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
121 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
122 |
|
2640 | 123 |
qed_goal "binchain_cont" thy |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
124 |
"[| cont(f); x << y |] ==> range(%i. f(if i = 0 then x else y)) <<| f(y)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
125 |
(fn prems => |
1461 | 126 |
[ |
127 |
(cut_facts_tac prems 1), |
|
128 |
(rtac subst 1), |
|
129 |
(etac (contE RS spec RS mp) 2), |
|
130 |
(etac bin_chain 2), |
|
131 |
(res_inst_tac [("y","y")] arg_cong 1), |
|
132 |
(etac (lub_bin_chain RS thelubI) 1) |
|
133 |
]); |
|
243
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:
892
diff
changeset
|
136 |
(* right to left: cont(f) ==> monofun(f) & contlub(f) *) |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
137 |
(* part1: cont(f) ==> monofun(f *) |
243
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 |
|
2640 | 140 |
qed_goalw "cont2mono" thy [monofun] |
1461 | 141 |
"cont(f) ==> monofun(f)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
142 |
(fn prems => |
1461 | 143 |
[ |
144 |
(cut_facts_tac prems 1), |
|
145 |
(strip_tac 1), |
|
146 |
(res_inst_tac [("s","if 0 = 0 then x else y")] subst 1), |
|
147 |
(rtac (binchain_cont RS is_ub_lub) 2), |
|
148 |
(atac 2), |
|
149 |
(atac 2), |
|
150 |
(Simp_tac 1) |
|
151 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
152 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
153 |
(* ------------------------------------------------------------------------ *) |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
154 |
(* right to left: cont(f) ==> monofun(f) & contlub(f) *) |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
155 |
(* part2: cont(f) ==> contlub(f) *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
156 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
157 |
|
2640 | 158 |
qed_goalw "cont2contlub" thy [contlub] |
1461 | 159 |
"cont(f) ==> contlub(f)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
160 |
(fn prems => |
1461 | 161 |
[ |
162 |
(cut_facts_tac prems 1), |
|
163 |
(strip_tac 1), |
|
164 |
(rtac (thelubI RS sym) 1), |
|
165 |
(etac (contE RS spec RS mp) 1), |
|
166 |
(atac 1) |
|
167 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
168 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
169 |
(* ------------------------------------------------------------------------ *) |
2354 | 170 |
(* monotone functions map finite chains to finite chains *) |
171 |
(* ------------------------------------------------------------------------ *) |
|
172 |
||
2640 | 173 |
qed_goalw "monofun_finch2finch" thy [finite_chain_def] |
2354 | 174 |
"[| monofun f; finite_chain Y |] ==> finite_chain (%n. f (Y n))" |
175 |
(fn prems => |
|
176 |
[ |
|
177 |
cut_facts_tac prems 1, |
|
178 |
safe_tac HOL_cs, |
|
179 |
fast_tac (HOL_cs addSEs [ch2ch_monofun]) 1, |
|
180 |
fast_tac (HOL_cs addss (HOL_ss addsimps [max_in_chain_def])) 1 |
|
181 |
]); |
|
182 |
||
183 |
(* ------------------------------------------------------------------------ *) |
|
184 |
(* The same holds for continuous functions *) |
|
185 |
(* ------------------------------------------------------------------------ *) |
|
186 |
||
187 |
bind_thm ("cont_finch2finch", cont2mono RS monofun_finch2finch); |
|
188 |
(* [| cont ?f; finite_chain ?Y |] ==> finite_chain (%n. ?f (?Y n)) *) |
|
189 |
||
190 |
||
191 |
(* ------------------------------------------------------------------------ *) |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
192 |
(* The following results are about a curried function that is monotone *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
193 |
(* in both 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 |
|
2640 | 196 |
qed_goal "ch2ch_MF2L" thy |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
197 |
"[|monofun(MF2); chain(F)|] ==> chain(%i. MF2 (F i) x)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
198 |
(fn prems => |
1461 | 199 |
[ |
200 |
(cut_facts_tac prems 1), |
|
201 |
(etac (ch2ch_monofun RS ch2ch_fun) 1), |
|
202 |
(atac 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 |
|
2640 | 206 |
qed_goal "ch2ch_MF2R" thy |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
207 |
"[|monofun(MF2(f)); chain(Y)|] ==> chain(%i. MF2 f (Y i))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
208 |
(fn prems => |
1461 | 209 |
[ |
210 |
(cut_facts_tac prems 1), |
|
211 |
(etac ch2ch_monofun 1), |
|
212 |
(atac 1) |
|
213 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
214 |
|
2640 | 215 |
qed_goal "ch2ch_MF2LR" thy |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
216 |
"[|monofun(MF2); !f. monofun(MF2(f)); chain(F); chain(Y)|] ==> \ |
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
217 |
\ chain(%i. MF2(F(i))(Y(i)))" |
752
b89462f9d5f1
----------------------------------------------------------------------
regensbu
parents:
625
diff
changeset
|
218 |
(fn prems => |
1461 | 219 |
[ |
220 |
(cut_facts_tac prems 1), |
|
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
221 |
(rtac chainI 1), |
1461 | 222 |
(strip_tac 1 ), |
223 |
(rtac trans_less 1), |
|
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
224 |
(etac (ch2ch_MF2L RS chainE RS spec) 1), |
1461 | 225 |
(atac 1), |
226 |
((rtac (monofunE RS spec RS spec RS mp) 1) THEN (etac spec 1)), |
|
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
227 |
(etac (chainE RS spec) 1) |
1461 | 228 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
229 |
|
752
b89462f9d5f1
----------------------------------------------------------------------
regensbu
parents:
625
diff
changeset
|
230 |
|
2640 | 231 |
qed_goal "ch2ch_lubMF2R" thy |
2838
2e908f29bc3d
changed continuous functions from pcpo to cpo (including instances)
slotosch
parents:
2640
diff
changeset
|
232 |
"[|monofun(MF2::('a::po=>'b::po=>'c::cpo));\ |
3842 | 233 |
\ !f. monofun(MF2(f)::('b::po=>'c::cpo));\ |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
234 |
\ chain(F);chain(Y)|] ==> \ |
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
235 |
\ chain(%j. lub(range(%i. MF2 (F j) (Y i))))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
236 |
(fn prems => |
1461 | 237 |
[ |
238 |
(cut_facts_tac prems 1), |
|
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
239 |
(rtac (lub_mono RS allI RS chainI) 1), |
1461 | 240 |
((rtac ch2ch_MF2R 1) THEN (etac spec 1)), |
241 |
(atac 1), |
|
242 |
((rtac ch2ch_MF2R 1) THEN (etac spec 1)), |
|
243 |
(atac 1), |
|
244 |
(strip_tac 1), |
|
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
245 |
(rtac (chainE RS spec) 1), |
1461 | 246 |
(etac ch2ch_MF2L 1), |
247 |
(atac 1) |
|
248 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
249 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
250 |
|
2640 | 251 |
qed_goal "ch2ch_lubMF2L" thy |
2838
2e908f29bc3d
changed continuous functions from pcpo to cpo (including instances)
slotosch
parents:
2640
diff
changeset
|
252 |
"[|monofun(MF2::('a::po=>'b::po=>'c::cpo));\ |
3842 | 253 |
\ !f. monofun(MF2(f)::('b::po=>'c::cpo));\ |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
254 |
\ chain(F);chain(Y)|] ==> \ |
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
255 |
\ chain(%i. lub(range(%j. MF2 (F j) (Y i))))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
256 |
(fn prems => |
1461 | 257 |
[ |
258 |
(cut_facts_tac prems 1), |
|
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
259 |
(rtac (lub_mono RS allI RS chainI) 1), |
1461 | 260 |
(etac ch2ch_MF2L 1), |
261 |
(atac 1), |
|
262 |
(etac ch2ch_MF2L 1), |
|
263 |
(atac 1), |
|
264 |
(strip_tac 1), |
|
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
265 |
(rtac (chainE RS spec) 1), |
1461 | 266 |
((rtac ch2ch_MF2R 1) THEN (etac spec 1)), |
267 |
(atac 1) |
|
268 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
269 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
270 |
|
2640 | 271 |
qed_goal "lub_MF2_mono" thy |
2838
2e908f29bc3d
changed continuous functions from pcpo to cpo (including instances)
slotosch
parents:
2640
diff
changeset
|
272 |
"[|monofun(MF2::('a::po=>'b::po=>'c::cpo));\ |
3842 | 273 |
\ !f. monofun(MF2(f)::('b::po=>'c::cpo));\ |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
274 |
\ chain(F)|] ==> \ |
3842 | 275 |
\ monofun(% x. lub(range(% j. MF2 (F j) (x))))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
276 |
(fn prems => |
1461 | 277 |
[ |
278 |
(cut_facts_tac prems 1), |
|
279 |
(rtac monofunI 1), |
|
280 |
(strip_tac 1), |
|
281 |
(rtac lub_mono 1), |
|
282 |
(etac ch2ch_MF2L 1), |
|
283 |
(atac 1), |
|
284 |
(etac ch2ch_MF2L 1), |
|
285 |
(atac 1), |
|
286 |
(strip_tac 1), |
|
287 |
((rtac (monofunE RS spec RS spec RS mp) 1) THEN (etac spec 1)), |
|
288 |
(atac 1) |
|
289 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
290 |
|
2640 | 291 |
qed_goal "ex_lubMF2" thy |
2838
2e908f29bc3d
changed continuous functions from pcpo to cpo (including instances)
slotosch
parents:
2640
diff
changeset
|
292 |
"[|monofun(MF2::('a::po=>'b::po=>'c::cpo));\ |
3842 | 293 |
\ !f. monofun(MF2(f)::('b::po=>'c::cpo));\ |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
294 |
\ chain(F); chain(Y)|] ==> \ |
1461 | 295 |
\ lub(range(%j. lub(range(%i. MF2(F j) (Y i))))) =\ |
296 |
\ lub(range(%i. lub(range(%j. MF2(F j) (Y i)))))" |
|
752
b89462f9d5f1
----------------------------------------------------------------------
regensbu
parents:
625
diff
changeset
|
297 |
(fn prems => |
1461 | 298 |
[ |
299 |
(cut_facts_tac prems 1), |
|
300 |
(rtac antisym_less 1), |
|
301 |
(rtac (ub_rangeI RSN (2,is_lub_thelub)) 1), |
|
302 |
(etac ch2ch_lubMF2R 1), |
|
303 |
(REPEAT (atac 1)), |
|
304 |
(strip_tac 1), |
|
305 |
(rtac lub_mono 1), |
|
306 |
((rtac ch2ch_MF2R 1) THEN (etac spec 1)), |
|
307 |
(atac 1), |
|
308 |
(etac ch2ch_lubMF2L 1), |
|
309 |
(REPEAT (atac 1)), |
|
310 |
(strip_tac 1), |
|
311 |
(rtac is_ub_thelub 1), |
|
312 |
(etac ch2ch_MF2L 1), |
|
313 |
(atac 1), |
|
314 |
(rtac (ub_rangeI RSN (2,is_lub_thelub)) 1), |
|
315 |
(etac ch2ch_lubMF2L 1), |
|
316 |
(REPEAT (atac 1)), |
|
317 |
(strip_tac 1), |
|
318 |
(rtac lub_mono 1), |
|
319 |
(etac ch2ch_MF2L 1), |
|
320 |
(atac 1), |
|
321 |
(etac ch2ch_lubMF2R 1), |
|
322 |
(REPEAT (atac 1)), |
|
323 |
(strip_tac 1), |
|
324 |
(rtac is_ub_thelub 1), |
|
325 |
((rtac ch2ch_MF2R 1) THEN (etac spec 1)), |
|
326 |
(atac 1) |
|
327 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
328 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
329 |
|
2640 | 330 |
qed_goal "diag_lubMF2_1" thy |
2838
2e908f29bc3d
changed continuous functions from pcpo to cpo (including instances)
slotosch
parents:
2640
diff
changeset
|
331 |
"[|monofun(MF2::('a::po=>'b::po=>'c::cpo));\ |
3842 | 332 |
\ !f. monofun(MF2(f)::('b::po=>'c::cpo));\ |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
333 |
\ chain(FY);chain(TY)|] ==>\ |
752
b89462f9d5f1
----------------------------------------------------------------------
regensbu
parents:
625
diff
changeset
|
334 |
\ lub(range(%i. lub(range(%j. MF2(FY(j))(TY(i)))))) =\ |
b89462f9d5f1
----------------------------------------------------------------------
regensbu
parents:
625
diff
changeset
|
335 |
\ lub(range(%i. MF2(FY(i))(TY(i))))" |
625 | 336 |
(fn prems => |
1461 | 337 |
[ |
338 |
(cut_facts_tac prems 1), |
|
339 |
(rtac antisym_less 1), |
|
340 |
(rtac (ub_rangeI RSN (2,is_lub_thelub)) 1), |
|
341 |
(etac ch2ch_lubMF2L 1), |
|
342 |
(REPEAT (atac 1)), |
|
343 |
(strip_tac 1 ), |
|
344 |
(rtac lub_mono3 1), |
|
345 |
(etac ch2ch_MF2L 1), |
|
346 |
(REPEAT (atac 1)), |
|
347 |
(etac ch2ch_MF2LR 1), |
|
348 |
(REPEAT (atac 1)), |
|
349 |
(rtac allI 1), |
|
350 |
(res_inst_tac [("m","i"),("n","ia")] nat_less_cases 1), |
|
351 |
(res_inst_tac [("x","ia")] exI 1), |
|
352 |
(rtac (chain_mono RS mp) 1), |
|
353 |
(etac allE 1), |
|
354 |
(etac ch2ch_MF2R 1), |
|
355 |
(REPEAT (atac 1)), |
|
356 |
(hyp_subst_tac 1), |
|
357 |
(res_inst_tac [("x","ia")] exI 1), |
|
358 |
(rtac refl_less 1), |
|
359 |
(res_inst_tac [("x","i")] exI 1), |
|
360 |
(rtac (chain_mono RS mp) 1), |
|
361 |
(etac ch2ch_MF2L 1), |
|
362 |
(REPEAT (atac 1)), |
|
363 |
(rtac lub_mono 1), |
|
364 |
(etac ch2ch_MF2LR 1), |
|
365 |
(REPEAT(atac 1)), |
|
366 |
(etac ch2ch_lubMF2L 1), |
|
367 |
(REPEAT (atac 1)), |
|
368 |
(strip_tac 1 ), |
|
369 |
(rtac is_ub_thelub 1), |
|
370 |
(etac ch2ch_MF2L 1), |
|
371 |
(atac 1) |
|
372 |
]); |
|
625 | 373 |
|
2640 | 374 |
qed_goal "diag_lubMF2_2" thy |
2838
2e908f29bc3d
changed continuous functions from pcpo to cpo (including instances)
slotosch
parents:
2640
diff
changeset
|
375 |
"[|monofun(MF2::('a::po=>'b::po=>'c::cpo));\ |
3842 | 376 |
\ !f. monofun(MF2(f)::('b::po=>'c::cpo));\ |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
377 |
\ chain(FY);chain(TY)|] ==>\ |
752
b89462f9d5f1
----------------------------------------------------------------------
regensbu
parents:
625
diff
changeset
|
378 |
\ lub(range(%j. lub(range(%i. MF2(FY(j))(TY(i)))))) =\ |
b89462f9d5f1
----------------------------------------------------------------------
regensbu
parents:
625
diff
changeset
|
379 |
\ lub(range(%i. MF2(FY(i))(TY(i))))" |
625 | 380 |
(fn prems => |
1461 | 381 |
[ |
382 |
(cut_facts_tac prems 1), |
|
383 |
(rtac trans 1), |
|
384 |
(rtac ex_lubMF2 1), |
|
385 |
(REPEAT (atac 1)), |
|
386 |
(etac diag_lubMF2_1 1), |
|
387 |
(REPEAT (atac 1)) |
|
388 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
389 |
|
752
b89462f9d5f1
----------------------------------------------------------------------
regensbu
parents:
625
diff
changeset
|
390 |
|
b89462f9d5f1
----------------------------------------------------------------------
regensbu
parents:
625
diff
changeset
|
391 |
(* ------------------------------------------------------------------------ *) |
b89462f9d5f1
----------------------------------------------------------------------
regensbu
parents:
625
diff
changeset
|
392 |
(* The following results are about a curried function that is continuous *) |
b89462f9d5f1
----------------------------------------------------------------------
regensbu
parents:
625
diff
changeset
|
393 |
(* in both arguments *) |
b89462f9d5f1
----------------------------------------------------------------------
regensbu
parents:
625
diff
changeset
|
394 |
(* ------------------------------------------------------------------------ *) |
b89462f9d5f1
----------------------------------------------------------------------
regensbu
parents:
625
diff
changeset
|
395 |
|
2640 | 396 |
qed_goal "contlub_CF2" thy |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
397 |
"[|cont(CF2);!f. cont(CF2(f));chain(FY);chain(TY)|] ==>\ |
3842 | 398 |
\ CF2(lub(range(FY)))(lub(range(TY))) = lub(range(%i. CF2(FY(i))(TY(i))))" |
625 | 399 |
(fn prems => |
1461 | 400 |
[ |
401 |
(cut_facts_tac prems 1), |
|
2033 | 402 |
(stac ((hd prems) RS cont2contlub RS contlubE RS spec RS mp) 1), |
1461 | 403 |
(atac 1), |
2033 | 404 |
(stac thelub_fun 1), |
1461 | 405 |
(rtac ((hd prems) RS cont2mono RS ch2ch_monofun) 1), |
406 |
(atac 1), |
|
407 |
(rtac trans 1), |
|
408 |
(rtac (((hd (tl prems)) RS spec RS cont2contlub) RS contlubE RS spec RS mp RS ext RS arg_cong RS arg_cong) 1), |
|
409 |
(atac 1), |
|
410 |
(rtac diag_lubMF2_2 1), |
|
411 |
(etac cont2mono 1), |
|
412 |
(rtac allI 1), |
|
413 |
(etac allE 1), |
|
414 |
(etac cont2mono 1), |
|
415 |
(REPEAT (atac 1)) |
|
416 |
]); |
|
752
b89462f9d5f1
----------------------------------------------------------------------
regensbu
parents:
625
diff
changeset
|
417 |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
418 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
419 |
(* The following results are about application for functions in 'a=>'b *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
420 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
421 |
|
2640 | 422 |
qed_goal "monofun_fun_fun" thy |
1461 | 423 |
"f1 << f2 ==> f1(x) << f2(x)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
424 |
(fn prems => |
1461 | 425 |
[ |
426 |
(cut_facts_tac prems 1), |
|
427 |
(etac (less_fun RS iffD1 RS spec) 1) |
|
428 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
429 |
|
2640 | 430 |
qed_goal "monofun_fun_arg" thy |
1461 | 431 |
"[|monofun(f); x1 << x2|] ==> f(x1) << f(x2)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
432 |
(fn prems => |
1461 | 433 |
[ |
434 |
(cut_facts_tac prems 1), |
|
435 |
(etac (monofunE RS spec RS spec RS mp) 1), |
|
436 |
(atac 1) |
|
437 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
438 |
|
2640 | 439 |
qed_goal "monofun_fun" thy |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
440 |
"[|monofun(f1); monofun(f2); f1 << f2; x1 << x2|] ==> f1(x1) << f2(x2)" |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
441 |
(fn prems => |
1461 | 442 |
[ |
443 |
(cut_facts_tac prems 1), |
|
444 |
(rtac trans_less 1), |
|
445 |
(etac monofun_fun_arg 1), |
|
446 |
(atac 1), |
|
447 |
(etac monofun_fun_fun 1) |
|
448 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
449 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
450 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
451 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
452 |
(* The following results are about the propagation of monotonicity and *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
453 |
(* continuity *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
454 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
455 |
|
2640 | 456 |
qed_goal "mono2mono_MF1L" thy |
1461 | 457 |
"[|monofun(c1)|] ==> monofun(%x. c1 x y)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
458 |
(fn prems => |
1461 | 459 |
[ |
460 |
(cut_facts_tac prems 1), |
|
461 |
(rtac monofunI 1), |
|
462 |
(strip_tac 1), |
|
463 |
(etac (monofun_fun_arg RS monofun_fun_fun) 1), |
|
464 |
(atac 1) |
|
465 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
466 |
|
2640 | 467 |
qed_goal "cont2cont_CF1L" thy |
1461 | 468 |
"[|cont(c1)|] ==> cont(%x. c1 x y)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
469 |
(fn prems => |
1461 | 470 |
[ |
471 |
(cut_facts_tac prems 1), |
|
472 |
(rtac monocontlub2cont 1), |
|
473 |
(etac (cont2mono RS mono2mono_MF1L) 1), |
|
474 |
(rtac contlubI 1), |
|
475 |
(strip_tac 1), |
|
476 |
(rtac ((hd prems) RS cont2contlub RS |
|
477 |
contlubE RS spec RS mp RS ssubst) 1), |
|
478 |
(atac 1), |
|
2033 | 479 |
(stac thelub_fun 1), |
1461 | 480 |
(rtac ch2ch_monofun 1), |
481 |
(etac cont2mono 1), |
|
482 |
(atac 1), |
|
483 |
(rtac refl 1) |
|
484 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
485 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
486 |
(********* Note "(%x.%y.c1 x y) = c1" ***********) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
487 |
|
2640 | 488 |
qed_goal "mono2mono_MF1L_rev" thy |
3842 | 489 |
"!y. monofun(%x. c1 x y) ==> monofun(c1)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
490 |
(fn prems => |
1461 | 491 |
[ |
492 |
(cut_facts_tac prems 1), |
|
493 |
(rtac monofunI 1), |
|
494 |
(strip_tac 1), |
|
495 |
(rtac (less_fun RS iffD2) 1), |
|
496 |
(strip_tac 1), |
|
497 |
(rtac ((hd prems) RS spec RS monofunE RS spec RS spec RS mp) 1), |
|
498 |
(atac 1) |
|
499 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
500 |
|
2640 | 501 |
qed_goal "cont2cont_CF1L_rev" thy |
3842 | 502 |
"!y. cont(%x. c1 x y) ==> cont(c1)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
503 |
(fn prems => |
1461 | 504 |
[ |
505 |
(cut_facts_tac prems 1), |
|
506 |
(rtac monocontlub2cont 1), |
|
507 |
(rtac (cont2mono RS allI RS mono2mono_MF1L_rev ) 1), |
|
508 |
(etac spec 1), |
|
509 |
(rtac contlubI 1), |
|
510 |
(strip_tac 1), |
|
511 |
(rtac ext 1), |
|
2033 | 512 |
(stac thelub_fun 1), |
1461 | 513 |
(rtac (cont2mono RS allI RS mono2mono_MF1L_rev RS ch2ch_monofun) 1), |
514 |
(etac spec 1), |
|
515 |
(atac 1), |
|
516 |
(rtac |
|
517 |
((hd prems) RS spec RS cont2contlub RS contlubE RS spec RS mp) 1), |
|
518 |
(atac 1) |
|
519 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
520 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
521 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
522 |
(* What D.A.Schmidt calls continuity of abstraction *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
523 |
(* never used here *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
524 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
525 |
|
2640 | 526 |
qed_goal "contlub_abstraction" thy |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
527 |
"[|chain(Y::nat=>'a);!y. cont(%x.(c::'a::cpo=>'b::cpo=>'c::cpo) x y)|] ==>\ |
3842 | 528 |
\ (%y. lub(range(%i. c (Y i) y))) = (lub(range(%i.%y. c (Y i) y)))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
529 |
(fn prems => |
1461 | 530 |
[ |
531 |
(cut_facts_tac prems 1), |
|
532 |
(rtac trans 1), |
|
533 |
(rtac (cont2contlub RS contlubE RS spec RS mp) 2), |
|
534 |
(atac 3), |
|
535 |
(etac cont2cont_CF1L_rev 2), |
|
536 |
(rtac ext 1), |
|
537 |
(rtac (cont2contlub RS contlubE RS spec RS mp RS sym) 1), |
|
538 |
(etac spec 1), |
|
539 |
(atac 1) |
|
540 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
541 |
|
2640 | 542 |
qed_goal "mono2mono_app" thy |
3842 | 543 |
"[|monofun(ft);!x. monofun(ft(x));monofun(tt)|] ==>\ |
1461 | 544 |
\ monofun(%x.(ft(x))(tt(x)))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
545 |
(fn prems => |
1461 | 546 |
[ |
547 |
(cut_facts_tac prems 1), |
|
548 |
(rtac monofunI 1), |
|
549 |
(strip_tac 1), |
|
550 |
(res_inst_tac [("f1.0","ft(x)"),("f2.0","ft(y)")] monofun_fun 1), |
|
551 |
(etac spec 1), |
|
552 |
(etac spec 1), |
|
553 |
(etac (monofunE RS spec RS spec RS mp) 1), |
|
554 |
(atac 1), |
|
555 |
(etac (monofunE RS spec RS spec RS mp) 1), |
|
556 |
(atac 1) |
|
557 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
558 |
|
625 | 559 |
|
2640 | 560 |
qed_goal "cont2contlub_app" thy |
3842 | 561 |
"[|cont(ft);!x. cont(ft(x));cont(tt)|] ==> contlub(%x.(ft(x))(tt(x)))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
562 |
(fn prems => |
1461 | 563 |
[ |
564 |
(cut_facts_tac prems 1), |
|
565 |
(rtac contlubI 1), |
|
566 |
(strip_tac 1), |
|
567 |
(res_inst_tac [("f3","tt")] (contlubE RS spec RS mp RS ssubst) 1), |
|
568 |
(etac cont2contlub 1), |
|
569 |
(atac 1), |
|
570 |
(rtac contlub_CF2 1), |
|
571 |
(REPEAT (atac 1)), |
|
572 |
(etac (cont2mono RS ch2ch_monofun) 1), |
|
573 |
(atac 1) |
|
574 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
575 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
576 |
|
2640 | 577 |
qed_goal "cont2cont_app" thy |
3842 | 578 |
"[|cont(ft);!x. cont(ft(x));cont(tt)|] ==>\ |
1461 | 579 |
\ cont(%x.(ft(x))(tt(x)))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
580 |
(fn prems => |
1461 | 581 |
[ |
582 |
(rtac monocontlub2cont 1), |
|
583 |
(rtac mono2mono_app 1), |
|
584 |
(rtac cont2mono 1), |
|
585 |
(resolve_tac prems 1), |
|
586 |
(strip_tac 1), |
|
587 |
(rtac cont2mono 1), |
|
588 |
(cut_facts_tac prems 1), |
|
589 |
(etac spec 1), |
|
590 |
(rtac cont2mono 1), |
|
591 |
(resolve_tac prems 1), |
|
592 |
(rtac cont2contlub_app 1), |
|
593 |
(resolve_tac prems 1), |
|
594 |
(resolve_tac prems 1), |
|
595 |
(resolve_tac prems 1) |
|
596 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
597 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
598 |
|
1779 | 599 |
bind_thm ("cont2cont_app2", allI RSN (2,cont2cont_app)); |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
600 |
(* [| cont ?ft; !!x. cont (?ft x); cont ?tt |] ==> *) |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
601 |
(* cont (%x. ?ft x (?tt x)) *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
602 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
603 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
604 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
605 |
(* The identity function is continuous *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
606 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
607 |
|
3842 | 608 |
qed_goal "cont_id" thy "cont(% x. x)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
609 |
(fn prems => |
1461 | 610 |
[ |
611 |
(rtac contI 1), |
|
612 |
(strip_tac 1), |
|
613 |
(etac thelubE 1), |
|
614 |
(rtac refl 1) |
|
615 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
616 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
617 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
618 |
(* constant functions are continuous *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
619 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
620 |
|
3842 | 621 |
qed_goalw "cont_const" thy [cont] "cont(%x. c)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
622 |
(fn prems => |
1461 | 623 |
[ |
624 |
(strip_tac 1), |
|
625 |
(rtac is_lubI 1), |
|
626 |
(rtac conjI 1), |
|
627 |
(rtac ub_rangeI 1), |
|
628 |
(strip_tac 1), |
|
629 |
(rtac refl_less 1), |
|
630 |
(strip_tac 1), |
|
631 |
(dtac ub_rangeE 1), |
|
632 |
(etac spec 1) |
|
633 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
634 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
635 |
|
2640 | 636 |
qed_goal "cont2cont_app3" thy |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
637 |
"[|cont(f);cont(t) |] ==> cont(%x. f(t(x)))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
638 |
(fn prems => |
1461 | 639 |
[ |
640 |
(cut_facts_tac prems 1), |
|
641 |
(rtac cont2cont_app2 1), |
|
642 |
(rtac cont_const 1), |
|
643 |
(atac 1), |
|
644 |
(atac 1) |
|
645 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
646 |
|
2640 | 647 |
(* ------------------------------------------------------------------------ *) |
648 |
(* A non-emptyness result for Cfun *) |
|
649 |
(* ------------------------------------------------------------------------ *) |
|
650 |
||
651 |
qed_goal "CfunI" thy "?x:Collect cont" |
|
652 |
(fn prems => |
|
653 |
[ |
|
654 |
(rtac CollectI 1), |
|
655 |
(rtac cont_const 1) |
|
656 |
]); |
|
3326 | 657 |
|
658 |
(* ------------------------------------------------------------------------ *) |
|
659 |
(* some properties of flat *) |
|
660 |
(* ------------------------------------------------------------------------ *) |
|
661 |
||
662 |
qed_goalw "flatdom2monofun" thy [monofun] |
|
663 |
"f UU = UU ==> monofun (f::'a::flat=>'b::pcpo)" |
|
664 |
(fn prems => |
|
665 |
[ |
|
666 |
cut_facts_tac prems 1, |
|
667 |
strip_tac 1, |
|
668 |
dtac (ax_flat RS spec RS spec RS mp) 1, |
|
4098 | 669 |
fast_tac ((HOL_cs addss (simpset() addsimps [minimal]))) 1 |
3326 | 670 |
]); |
671 |
||
672 |
||
5297 | 673 |
Goal "monofun f ==> cont(f::'a::chfin=>'b::pcpo)"; |
7322 | 674 |
by (rtac monocontlub2cont 1); |
675 |
by ( atac 1); |
|
676 |
by (rtac contlubI 1); |
|
677 |
by (strip_tac 1); |
|
678 |
by (forward_tac [chfin2finch] 1); |
|
679 |
by (rtac antisym_less 1); |
|
680 |
by ( force_tac (HOL_cs addIs [is_ub_thelub,ch2ch_monofun], |
|
5297 | 681 |
HOL_ss addsimps [finite_chain_def,maxinch_is_thelub]) 1); |
7322 | 682 |
by (dtac (monofun_finch2finch COMP swap_prems_rl) 1); |
683 |
by ( atac 1); |
|
684 |
by (asm_full_simp_tac (HOL_ss addsimps [finite_chain_def]) 1); |
|
685 |
by (etac conjE 1); |
|
686 |
by (etac exE 1); |
|
687 |
by (asm_full_simp_tac (HOL_ss addsimps [maxinch_is_thelub]) 1); |
|
688 |
by (etac (monofunE RS spec RS spec RS mp) 1); |
|
689 |
by (etac is_ub_thelub 1); |
|
5297 | 690 |
qed "chfindom_monofun2cont"; |
3326 | 691 |
|
692 |
bind_thm ("flatdom_strict2cont",flatdom2monofun RS chfindom_monofun2cont); |
|
693 |
(* f UU = UU ==> cont (f::'a=>'b::pcpo)" *) |