author | wenzelm |
Wed, 08 Mar 2000 17:48:31 +0100 | |
changeset 8364 | 0eb9ee70c8f8 |
parent 5291 | 5706f0ef1d43 |
child 9245 | 428385c4bc50 |
permissions | -rw-r--r-- |
1461 | 1 |
(* Title: HOLCF/cfun2.thy |
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 |
Lemmas for cfun2.thy |
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 Cfun2; |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
10 |
|
2640 | 11 |
(* for compatibility with old HOLCF-Version *) |
5291 | 12 |
qed_goal "inst_cfun_po" thy "(op <<)=(%f1 f2. Rep_CFun f1 << Rep_CFun f2)" |
2640 | 13 |
(fn prems => |
14 |
[ |
|
3323
194ae2e0c193
eliminated the constant less by the introduction of the axclass sq_ord
slotosch
parents:
2838
diff
changeset
|
15 |
(fold_goals_tac [less_cfun_def]), |
2640 | 16 |
(rtac refl 1) |
17 |
]); |
|
18 |
||
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
19 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
20 |
(* access to less_cfun in class po *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
21 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
22 |
|
5291 | 23 |
qed_goal "less_cfun" thy "( f1 << f2 ) = (Rep_CFun(f1) << Rep_CFun(f2))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
24 |
(fn prems => |
1461 | 25 |
[ |
4098 | 26 |
(simp_tac (simpset() addsimps [inst_cfun_po]) 1) |
1461 | 27 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
28 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
29 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
30 |
(* Type 'a ->'b is pointed *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
31 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
32 |
|
5291 | 33 |
qed_goal "minimal_cfun" thy "Abs_CFun(% x. UU) << f" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
34 |
(fn prems => |
1461 | 35 |
[ |
2033 | 36 |
(stac less_cfun 1), |
37 |
(stac Abs_Cfun_inverse2 1), |
|
1461 | 38 |
(rtac cont_const 1), |
39 |
(rtac minimal_fun 1) |
|
40 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
41 |
|
2640 | 42 |
bind_thm ("UU_cfun_def",minimal_cfun RS minimal2UU RS sym); |
43 |
||
3842 | 44 |
qed_goal "least_cfun" thy "? x::'a->'b::pcpo.!y. x<<y" |
2640 | 45 |
(fn prems => |
46 |
[ |
|
5291 | 47 |
(res_inst_tac [("x","Abs_CFun(% x. UU)")] exI 1), |
2640 | 48 |
(rtac (minimal_cfun RS allI) 1) |
49 |
]); |
|
50 |
||
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
51 |
(* ------------------------------------------------------------------------ *) |
5291 | 52 |
(* Rep_CFun yields continuous functions in 'a => 'b *) |
53 |
(* this is continuity of Rep_CFun in its 'second' argument *) |
|
54 |
(* cont_Rep_CFun2 ==> monofun_Rep_CFun2 & contlub_Rep_CFun2 *) |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
55 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
56 |
|
5291 | 57 |
qed_goal "cont_Rep_CFun2" thy "cont(Rep_CFun(fo))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
58 |
(fn prems => |
1461 | 59 |
[ |
60 |
(res_inst_tac [("P","cont")] CollectD 1), |
|
2640 | 61 |
(fold_goals_tac [CFun_def]), |
1461 | 62 |
(rtac Rep_Cfun 1) |
63 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
64 |
|
5291 | 65 |
bind_thm ("monofun_Rep_CFun2", cont_Rep_CFun2 RS cont2mono); |
66 |
(* monofun(Rep_CFun(?fo1)) *) |
|
243
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 |
|
5291 | 69 |
bind_thm ("contlub_Rep_CFun2", cont_Rep_CFun2 RS cont2contlub); |
70 |
(* contlub(Rep_CFun(?fo1)) *) |
|
243
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 |
(* ------------------------------------------------------------------------ *) |
5291 | 73 |
(* expanded thms cont_Rep_CFun2, contlub_Rep_CFun2 *) |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
74 |
(* looks nice with mixfix syntac *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
75 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
76 |
|
5291 | 77 |
bind_thm ("cont_cfun_arg", (cont_Rep_CFun2 RS contE RS spec RS mp)); |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
78 |
(* chain(?x1) ==> range (%i. ?fo3`(?x1 i)) <<| ?fo3`(lub (range ?x1)) *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
79 |
|
5291 | 80 |
bind_thm ("contlub_cfun_arg", (contlub_Rep_CFun2 RS contlubE RS spec RS mp)); |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
81 |
(* chain(?x1) ==> ?fo4`(lub (range ?x1)) = lub (range (%i. ?fo4`(?x1 i))) *) |
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 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
84 |
(* ------------------------------------------------------------------------ *) |
5291 | 85 |
(* Rep_CFun is monotone in its 'first' argument *) |
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 |
|
5291 | 88 |
qed_goalw "monofun_Rep_CFun1" thy [monofun] "monofun(Rep_CFun)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
89 |
(fn prems => |
1461 | 90 |
[ |
91 |
(strip_tac 1), |
|
92 |
(etac (less_cfun RS subst) 1) |
|
93 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
94 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
95 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
96 |
(* ------------------------------------------------------------------------ *) |
5291 | 97 |
(* monotonicity of application Rep_CFun in mixfix syntax [_]_ *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
98 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
99 |
|
2640 | 100 |
qed_goal "monofun_cfun_fun" thy "f1 << f2 ==> f1`x << f2`x" |
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 |
(res_inst_tac [("x","x")] spec 1), |
|
105 |
(rtac (less_fun RS subst) 1), |
|
5291 | 106 |
(etac (monofun_Rep_CFun1 RS monofunE RS spec RS spec RS mp) 1) |
1461 | 107 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
108 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
109 |
|
5291 | 110 |
bind_thm ("monofun_cfun_arg", monofun_Rep_CFun2 RS monofunE RS spec RS spec RS mp); |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
111 |
(* ?x2 << ?x1 ==> ?fo5`?x2 << ?fo5`?x1 *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
112 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
113 |
(* ------------------------------------------------------------------------ *) |
5291 | 114 |
(* monotonicity of Rep_CFun in both arguments in mixfix syntax [_]_ *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
115 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
116 |
|
2640 | 117 |
qed_goal "monofun_cfun" thy |
1461 | 118 |
"[|f1<<f2;x1<<x2|] ==> f1`x1 << f2`x2" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
119 |
(fn prems => |
1461 | 120 |
[ |
121 |
(cut_facts_tac prems 1), |
|
122 |
(rtac trans_less 1), |
|
123 |
(etac monofun_cfun_arg 1), |
|
124 |
(etac monofun_cfun_fun 1) |
|
125 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
126 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
127 |
|
2640 | 128 |
qed_goal "strictI" thy "f`x = UU ==> f`UU = UU" (fn prems => [ |
2033 | 129 |
cut_facts_tac prems 1, |
130 |
rtac (eq_UU_iff RS iffD2) 1, |
|
131 |
etac subst 1, |
|
132 |
rtac (minimal RS monofun_cfun_arg) 1]); |
|
1989 | 133 |
|
134 |
||
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
135 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
136 |
(* ch2ch - rules for the type 'a -> 'b *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
137 |
(* use MF2 lemmas from Cont.ML *) |
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 |
|
5291 | 140 |
qed_goal "ch2ch_Rep_CFunR" thy |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
141 |
"chain(Y) ==> chain(%i. f`(Y i))" |
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), |
|
5291 | 145 |
(etac (monofun_Rep_CFun2 RS ch2ch_MF2R) 1) |
1461 | 146 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
147 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
148 |
|
5291 | 149 |
bind_thm ("ch2ch_Rep_CFunL", monofun_Rep_CFun1 RS ch2ch_MF2L); |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
150 |
(* chain(?F) ==> chain (%i. ?F i`?x) *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
151 |
|
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 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
154 |
(* the lub of a chain of continous functions is monotone *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
155 |
(* use MF2 lemmas from Cont.ML *) |
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_goal "lub_cfun_mono" thy |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
159 |
"chain(F) ==> monofun(% x. lub(range(% j.(F j)`x)))" |
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 |
(rtac lub_MF2_mono 1), |
|
5291 | 164 |
(rtac monofun_Rep_CFun1 1), |
165 |
(rtac (monofun_Rep_CFun2 RS allI) 1), |
|
1461 | 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 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
170 |
(* a lemma about the exchange of lubs for type 'a -> 'b *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
171 |
(* use MF2 lemmas from Cont.ML *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
172 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
173 |
|
2640 | 174 |
qed_goal "ex_lubcfun" thy |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
175 |
"[| chain(F); chain(Y) |] ==>\ |
1461 | 176 |
\ lub(range(%j. lub(range(%i. F(j)`(Y i))))) =\ |
177 |
\ lub(range(%i. lub(range(%j. F(j)`(Y i)))))" |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
178 |
(fn prems => |
1461 | 179 |
[ |
180 |
(cut_facts_tac prems 1), |
|
181 |
(rtac ex_lubMF2 1), |
|
5291 | 182 |
(rtac monofun_Rep_CFun1 1), |
183 |
(rtac (monofun_Rep_CFun2 RS allI) 1), |
|
1461 | 184 |
(atac 1), |
185 |
(atac 1) |
|
186 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
187 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
188 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
189 |
(* the lub of a chain of cont. functions is continuous *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
190 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
191 |
|
2640 | 192 |
qed_goal "cont_lubcfun" thy |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
193 |
"chain(F) ==> cont(% x. lub(range(% j. F(j)`x)))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
194 |
(fn prems => |
1461 | 195 |
[ |
196 |
(cut_facts_tac prems 1), |
|
197 |
(rtac monocontlub2cont 1), |
|
198 |
(etac lub_cfun_mono 1), |
|
199 |
(rtac contlubI 1), |
|
200 |
(strip_tac 1), |
|
2033 | 201 |
(stac (contlub_cfun_arg RS ext) 1), |
1461 | 202 |
(atac 1), |
203 |
(etac ex_lubcfun 1), |
|
204 |
(atac 1) |
|
205 |
]); |
|
243
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 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
208 |
(* type 'a -> 'b is chain complete *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
209 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
210 |
|
2640 | 211 |
qed_goal "lub_cfun" thy |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
212 |
"chain(CCF) ==> range(CCF) <<| (LAM x. lub(range(% i. CCF(i)`x)))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
213 |
(fn prems => |
1461 | 214 |
[ |
215 |
(cut_facts_tac prems 1), |
|
216 |
(rtac is_lubI 1), |
|
217 |
(rtac conjI 1), |
|
218 |
(rtac ub_rangeI 1), |
|
219 |
(rtac allI 1), |
|
2033 | 220 |
(stac less_cfun 1), |
221 |
(stac Abs_Cfun_inverse2 1), |
|
1461 | 222 |
(etac cont_lubcfun 1), |
223 |
(rtac (lub_fun RS is_lubE RS conjunct1 RS ub_rangeE RS spec) 1), |
|
5291 | 224 |
(etac (monofun_Rep_CFun1 RS ch2ch_monofun) 1), |
1461 | 225 |
(strip_tac 1), |
2033 | 226 |
(stac less_cfun 1), |
227 |
(stac Abs_Cfun_inverse2 1), |
|
1461 | 228 |
(etac cont_lubcfun 1), |
229 |
(rtac (lub_fun RS is_lubE RS conjunct2 RS spec RS mp) 1), |
|
5291 | 230 |
(etac (monofun_Rep_CFun1 RS ch2ch_monofun) 1), |
231 |
(etac (monofun_Rep_CFun1 RS ub2ub_monofun) 1) |
|
1461 | 232 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
233 |
|
1779 | 234 |
bind_thm ("thelub_cfun", lub_cfun RS thelubI); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
235 |
(* |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
236 |
chain(?CCF1) ==> lub (range ?CCF1) = (LAM x. lub (range (%i. ?CCF1 i`x))) |
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 |
|
2640 | 239 |
qed_goal "cpo_cfun" thy |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
240 |
"chain(CCF::nat=>('a->'b)) ==> ? x. range(CCF) <<| x" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
241 |
(fn prems => |
1461 | 242 |
[ |
243 |
(cut_facts_tac prems 1), |
|
244 |
(rtac exI 1), |
|
245 |
(etac lub_cfun 1) |
|
246 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
247 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
248 |
|
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 |
(* Extensionality in 'a -> 'b *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
251 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
252 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
253 |
qed_goal "ext_cfun" Cfun1.thy "(!!x. f`x = g`x) ==> f = g" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
254 |
(fn prems => |
1461 | 255 |
[ |
256 |
(res_inst_tac [("t","f")] (Rep_Cfun_inverse RS subst) 1), |
|
257 |
(res_inst_tac [("t","g")] (Rep_Cfun_inverse RS subst) 1), |
|
5291 | 258 |
(res_inst_tac [("f","Abs_CFun")] arg_cong 1), |
1461 | 259 |
(rtac ext 1), |
260 |
(resolve_tac prems 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 |
(* ------------------------------------------------------------------------ *) |
5291 | 264 |
(* Monotonicity of Abs_CFun *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
265 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
266 |
|
5291 | 267 |
qed_goal "semi_monofun_Abs_CFun" thy |
268 |
"[|cont(f);cont(g);f<<g|]==>Abs_CFun(f)<<Abs_CFun(g)" |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
269 |
(fn prems => |
1461 | 270 |
[ |
271 |
(rtac (less_cfun RS iffD2) 1), |
|
2033 | 272 |
(stac Abs_Cfun_inverse2 1), |
1461 | 273 |
(resolve_tac prems 1), |
2033 | 274 |
(stac Abs_Cfun_inverse2 1), |
1461 | 275 |
(resolve_tac prems 1), |
276 |
(resolve_tac prems 1) |
|
277 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
278 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
279 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
280 |
(* Extenionality wrt. << in 'a -> 'b *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
281 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
282 |
|
2640 | 283 |
qed_goal "less_cfun2" thy "(!!x. f`x << g`x) ==> f << g" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
284 |
(fn prems => |
1461 | 285 |
[ |
286 |
(res_inst_tac [("t","f")] (Rep_Cfun_inverse RS subst) 1), |
|
287 |
(res_inst_tac [("t","g")] (Rep_Cfun_inverse RS subst) 1), |
|
5291 | 288 |
(rtac semi_monofun_Abs_CFun 1), |
289 |
(rtac cont_Rep_CFun2 1), |
|
290 |
(rtac cont_Rep_CFun2 1), |
|
1461 | 291 |
(rtac (less_fun RS iffD2) 1), |
292 |
(rtac allI 1), |
|
293 |
(resolve_tac prems 1) |
|
294 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
295 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
296 |