author | nipkow |
Thu, 22 Jul 2004 12:55:36 +0200 | |
changeset 15073 | 279c2daaf517 |
parent 14981 | e73f8140af78 |
child 15566 | eb3b1a5c304e |
permissions | -rw-r--r-- |
9245 | 1 |
(* Title: HOLCF/Cfun2 |
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 |
|
9245 | 5 |
Class Instance ->::(cpo,cpo)po |
243
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 |
|
2640 | 8 |
(* for compatibility with old HOLCF-Version *) |
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
9 |
Goal "(op <<)=(%f1 f2. Rep_CFun f1 << Rep_CFun f2)"; |
9245 | 10 |
by (fold_goals_tac [less_cfun_def]); |
11 |
by (rtac refl 1); |
|
12 |
qed "inst_cfun_po"; |
|
2640 | 13 |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
14 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
15 |
(* access to less_cfun in class po *) |
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 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
18 |
Goal "( f1 << f2 ) = (Rep_CFun(f1) << Rep_CFun(f2))"; |
9245 | 19 |
by (simp_tac (simpset() addsimps [inst_cfun_po]) 1); |
20 |
qed "less_cfun"; |
|
243
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 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
23 |
(* Type 'a ->'b is pointed *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
24 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
25 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
26 |
Goal "Abs_CFun(% x. UU) << f"; |
9245 | 27 |
by (stac less_cfun 1); |
28 |
by (stac Abs_Cfun_inverse2 1); |
|
29 |
by (rtac cont_const 1); |
|
30 |
by (rtac minimal_fun 1); |
|
31 |
qed "minimal_cfun"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
32 |
|
2640 | 33 |
bind_thm ("UU_cfun_def",minimal_cfun RS minimal2UU RS sym); |
34 |
||
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
35 |
Goal "? x::'a->'b::pcpo.!y. x<<y"; |
9245 | 36 |
by (res_inst_tac [("x","Abs_CFun(% x. UU)")] exI 1); |
37 |
by (rtac (minimal_cfun RS allI) 1); |
|
38 |
qed "least_cfun"; |
|
2640 | 39 |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
40 |
(* ------------------------------------------------------------------------ *) |
5291 | 41 |
(* Rep_CFun yields continuous functions in 'a => 'b *) |
42 |
(* this is continuity of Rep_CFun in its 'second' argument *) |
|
43 |
(* 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
|
44 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
45 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
46 |
Goal "cont(Rep_CFun(fo))"; |
9245 | 47 |
by (res_inst_tac [("P","cont")] CollectD 1); |
48 |
by (fold_goals_tac [CFun_def]); |
|
49 |
by (rtac Rep_Cfun 1); |
|
50 |
qed "cont_Rep_CFun2"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
51 |
|
5291 | 52 |
bind_thm ("monofun_Rep_CFun2", cont_Rep_CFun2 RS cont2mono); |
53 |
(* monofun(Rep_CFun(?fo1)) *) |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
54 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
55 |
|
5291 | 56 |
bind_thm ("contlub_Rep_CFun2", cont_Rep_CFun2 RS cont2contlub); |
57 |
(* contlub(Rep_CFun(?fo1)) *) |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
58 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
59 |
(* ------------------------------------------------------------------------ *) |
5291 | 60 |
(* 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
|
61 |
(* looks nice with mixfix syntac *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
62 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
63 |
|
5291 | 64 |
bind_thm ("cont_cfun_arg", (cont_Rep_CFun2 RS contE RS spec RS mp)); |
10834 | 65 |
(* 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
|
66 |
|
5291 | 67 |
bind_thm ("contlub_cfun_arg", (contlub_Rep_CFun2 RS contlubE RS spec RS mp)); |
10834 | 68 |
(* 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
|
69 |
|
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 |
(* ------------------------------------------------------------------------ *) |
5291 | 72 |
(* 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
|
73 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
74 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
75 |
Goalw [monofun] "monofun(Rep_CFun)"; |
9245 | 76 |
by (strip_tac 1); |
77 |
by (etac (less_cfun RS subst) 1); |
|
78 |
qed "monofun_Rep_CFun1"; |
|
243
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 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
81 |
(* ------------------------------------------------------------------------ *) |
5291 | 82 |
(* 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
|
83 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
84 |
|
10834 | 85 |
Goal "f1 << f2 ==> f1$x << f2$x"; |
9245 | 86 |
by (res_inst_tac [("x","x")] spec 1); |
87 |
by (rtac (less_fun RS subst) 1); |
|
88 |
by (etac (monofun_Rep_CFun1 RS monofunE RS spec RS spec RS mp) 1); |
|
89 |
qed "monofun_cfun_fun"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
90 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
91 |
|
5291 | 92 |
bind_thm ("monofun_cfun_arg", monofun_Rep_CFun2 RS monofunE RS spec RS spec RS mp); |
10834 | 93 |
(* ?x2 << ?x1 ==> ?fo5$?x2 << ?fo5$?x1 *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
94 |
|
11341 | 95 |
Goal "chain Y ==> chain (%i. f\\<cdot>(Y i))"; |
12484 | 96 |
by (rtac chainI 1); |
97 |
by (rtac monofun_cfun_arg 1); |
|
98 |
by (etac chainE 1); |
|
11341 | 99 |
qed "chain_monofun"; |
100 |
||
101 |
||
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
102 |
(* ------------------------------------------------------------------------ *) |
5291 | 103 |
(* 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
|
104 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
105 |
|
10834 | 106 |
Goal "[|f1<<f2;x1<<x2|] ==> f1$x1 << f2$x2"; |
9245 | 107 |
by (rtac trans_less 1); |
108 |
by (etac monofun_cfun_arg 1); |
|
109 |
by (etac monofun_cfun_fun 1); |
|
110 |
qed "monofun_cfun"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
111 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
112 |
|
10834 | 113 |
Goal "f$x = UU ==> f$UU = UU"; |
9245 | 114 |
by (rtac (eq_UU_iff RS iffD2) 1); |
115 |
by (etac subst 1); |
|
116 |
by (rtac (minimal RS monofun_cfun_arg) 1); |
|
117 |
qed "strictI"; |
|
1989 | 118 |
|
119 |
||
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
120 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
121 |
(* ch2ch - rules for the type 'a -> 'b *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
122 |
(* use MF2 lemmas from Cont.ML *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
123 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
124 |
|
10834 | 125 |
Goal "chain(Y) ==> chain(%i. f$(Y i))"; |
9245 | 126 |
by (etac (monofun_Rep_CFun2 RS ch2ch_MF2R) 1); |
127 |
qed "ch2ch_Rep_CFunR"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
128 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
129 |
|
5291 | 130 |
bind_thm ("ch2ch_Rep_CFunL", monofun_Rep_CFun1 RS ch2ch_MF2L); |
10834 | 131 |
(* chain(?F) ==> chain (%i. ?F i$?x) *) |
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 |
(* 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
|
136 |
(* use MF2 lemmas from Cont.ML *) |
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 |
|
10834 | 139 |
Goal "chain(F) ==> monofun(% x. lub(range(% j.(F j)$x)))"; |
9245 | 140 |
by (rtac lub_MF2_mono 1); |
141 |
by (rtac monofun_Rep_CFun1 1); |
|
142 |
by (rtac (monofun_Rep_CFun2 RS allI) 1); |
|
143 |
by (atac 1); |
|
144 |
qed "lub_cfun_mono"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
145 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
146 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
147 |
(* 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
|
148 |
(* use MF2 lemmas from Cont.ML *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
149 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
150 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
151 |
Goal "[| chain(F); chain(Y) |] ==>\ |
10834 | 152 |
\ lub(range(%j. lub(range(%i. F(j)$(Y i))))) =\ |
153 |
\ lub(range(%i. lub(range(%j. F(j)$(Y i)))))"; |
|
9245 | 154 |
by (rtac ex_lubMF2 1); |
155 |
by (rtac monofun_Rep_CFun1 1); |
|
156 |
by (rtac (monofun_Rep_CFun2 RS allI) 1); |
|
157 |
by (atac 1); |
|
158 |
by (atac 1); |
|
159 |
qed "ex_lubcfun"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
160 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
161 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
162 |
(* 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
|
163 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
164 |
|
10834 | 165 |
Goal "chain(F) ==> cont(% x. lub(range(% j. F(j)$x)))"; |
9245 | 166 |
by (rtac monocontlub2cont 1); |
167 |
by (etac lub_cfun_mono 1); |
|
168 |
by (rtac contlubI 1); |
|
169 |
by (strip_tac 1); |
|
170 |
by (stac (contlub_cfun_arg RS ext) 1); |
|
171 |
by (atac 1); |
|
172 |
by (etac ex_lubcfun 1); |
|
173 |
by (atac 1); |
|
174 |
qed "cont_lubcfun"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
175 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
176 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
177 |
(* type 'a -> 'b is chain complete *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
178 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
179 |
|
10834 | 180 |
Goal "chain(CCF) ==> range(CCF) <<| (LAM x. lub(range(% i. CCF(i)$x)))"; |
9245 | 181 |
by (rtac is_lubI 1); |
182 |
by (rtac ub_rangeI 1); |
|
183 |
by (stac less_cfun 1); |
|
184 |
by (stac Abs_Cfun_inverse2 1); |
|
185 |
by (etac cont_lubcfun 1); |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
186 |
by (rtac (lub_fun RS is_lubD1 RS ub_rangeD) 1); |
9245 | 187 |
by (etac (monofun_Rep_CFun1 RS ch2ch_monofun) 1); |
188 |
by (stac less_cfun 1); |
|
189 |
by (stac Abs_Cfun_inverse2 1); |
|
190 |
by (etac cont_lubcfun 1); |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
191 |
by (rtac (lub_fun RS is_lub_lub) 1); |
9245 | 192 |
by (etac (monofun_Rep_CFun1 RS ch2ch_monofun) 1); |
193 |
by (etac (monofun_Rep_CFun1 RS ub2ub_monofun) 1); |
|
194 |
qed "lub_cfun"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
195 |
|
1779 | 196 |
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
|
197 |
(* |
10834 | 198 |
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
|
199 |
*) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
200 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
201 |
Goal "chain(CCF::nat=>('a->'b)) ==> ? x. range(CCF) <<| x"; |
9245 | 202 |
by (rtac exI 1); |
203 |
by (etac lub_cfun 1); |
|
204 |
qed "cpo_cfun"; |
|
243
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 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
208 |
(* Extensionality in 'a -> 'b *) |
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 |
|
10834 | 211 |
val prems = Goal "(!!x. f$x = g$x) ==> f = g"; |
9245 | 212 |
by (res_inst_tac [("t","f")] (Rep_Cfun_inverse RS subst) 1); |
213 |
by (res_inst_tac [("t","g")] (Rep_Cfun_inverse RS subst) 1); |
|
214 |
by (res_inst_tac [("f","Abs_CFun")] arg_cong 1); |
|
215 |
by (rtac ext 1); |
|
216 |
by (resolve_tac prems 1); |
|
217 |
qed "ext_cfun"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
218 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
219 |
(* ------------------------------------------------------------------------ *) |
5291 | 220 |
(* Monotonicity of Abs_CFun *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
221 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
222 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
223 |
Goal "[| cont(f); cont(g); f<<g|] ==> Abs_CFun(f)<<Abs_CFun(g)"; |
9245 | 224 |
by (rtac (less_cfun RS iffD2) 1); |
225 |
by (stac Abs_Cfun_inverse2 1); |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
226 |
by (assume_tac 1); |
9245 | 227 |
by (stac Abs_Cfun_inverse2 1); |
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
228 |
by (assume_tac 1); |
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
229 |
by (assume_tac 1); |
9245 | 230 |
qed "semi_monofun_Abs_CFun"; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
231 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
232 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
233 |
(* Extenionality wrt. << in 'a -> 'b *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
234 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
235 |
|
10834 | 236 |
val prems = Goal "(!!x. f$x << g$x) ==> f << g"; |
9245 | 237 |
by (res_inst_tac [("t","f")] (Rep_Cfun_inverse RS subst) 1); |
238 |
by (res_inst_tac [("t","g")] (Rep_Cfun_inverse RS subst) 1); |
|
239 |
by (rtac semi_monofun_Abs_CFun 1); |
|
240 |
by (rtac cont_Rep_CFun2 1); |
|
241 |
by (rtac cont_Rep_CFun2 1); |
|
242 |
by (rtac (less_fun RS iffD2) 1); |
|
243 |
by (rtac allI 1); |
|
244 |
by (resolve_tac prems 1); |
|
245 |
qed "less_cfun2"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
246 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
247 |