author | oheimb |
Fri, 31 May 1996 20:14:42 +0200 | |
changeset 1780 | e6656a445a33 |
parent 1779 | 1155c06fa956 |
child 1872 | 206553e1a242 |
permissions | -rw-r--r-- |
1461 | 1 |
(* Title: HOLCF/fix.ML |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
2 |
ID: $Id$ |
1461 | 3 |
Author: Franz Regensburger |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
4 |
Copyright 1993 Technische Universitaet Muenchen |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
5 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
6 |
Lemmas for fix.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 Fix; |
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 |
(* derive inductive properties of iterate from primitive recursion *) |
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 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
15 |
qed_goal "iterate_0" Fix.thy "iterate 0 F x = x" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
16 |
(fn prems => |
1461 | 17 |
[ |
18 |
(resolve_tac (nat_recs iterate_def) 1) |
|
19 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
20 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
21 |
qed_goal "iterate_Suc" Fix.thy "iterate (Suc n) F x = F`(iterate n F x)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
22 |
(fn prems => |
1461 | 23 |
[ |
24 |
(resolve_tac (nat_recs iterate_def) 1) |
|
25 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
26 |
|
1267 | 27 |
Addsimps [iterate_0, iterate_Suc]; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
28 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
29 |
qed_goal "iterate_Suc2" Fix.thy "iterate (Suc n) F x = iterate n F (F`x)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
30 |
(fn prems => |
1461 | 31 |
[ |
32 |
(nat_ind_tac "n" 1), |
|
33 |
(Simp_tac 1), |
|
1675 | 34 |
(rtac (iterate_Suc RS ssubst) 1), |
35 |
(rtac (iterate_Suc RS ssubst) 1), |
|
36 |
(etac ssubst 1), |
|
37 |
(rtac refl 1) |
|
1461 | 38 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
39 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
40 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
41 |
(* the sequence of function itertaions is a chain *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
42 |
(* This property is essential since monotonicity of iterate makes no sense *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
43 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
44 |
|
892 | 45 |
qed_goalw "is_chain_iterate2" Fix.thy [is_chain] |
1461 | 46 |
" x << F`x ==> is_chain (%i.iterate i F x)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
47 |
(fn prems => |
1461 | 48 |
[ |
49 |
(cut_facts_tac prems 1), |
|
50 |
(strip_tac 1), |
|
51 |
(Simp_tac 1), |
|
52 |
(nat_ind_tac "i" 1), |
|
53 |
(Asm_simp_tac 1), |
|
54 |
(Asm_simp_tac 1), |
|
55 |
(etac monofun_cfun_arg 1) |
|
56 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
57 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
58 |
|
892 | 59 |
qed_goal "is_chain_iterate" Fix.thy |
1461 | 60 |
"is_chain (%i.iterate i F UU)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
61 |
(fn prems => |
1461 | 62 |
[ |
63 |
(rtac is_chain_iterate2 1), |
|
64 |
(rtac minimal 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 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
69 |
(* Kleene's fixed point theorems for continuous functions in pointed *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
70 |
(* omega cpo's *) |
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 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
74 |
qed_goalw "Ifix_eq" Fix.thy [Ifix_def] "Ifix F =F`(Ifix F)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
75 |
(fn prems => |
1461 | 76 |
[ |
77 |
(rtac (contlub_cfun_arg RS ssubst) 1), |
|
78 |
(rtac is_chain_iterate 1), |
|
79 |
(rtac antisym_less 1), |
|
80 |
(rtac lub_mono 1), |
|
81 |
(rtac is_chain_iterate 1), |
|
82 |
(rtac ch2ch_fappR 1), |
|
83 |
(rtac is_chain_iterate 1), |
|
84 |
(rtac allI 1), |
|
85 |
(rtac (iterate_Suc RS subst) 1), |
|
86 |
(rtac (is_chain_iterate RS is_chainE RS spec) 1), |
|
87 |
(rtac is_lub_thelub 1), |
|
88 |
(rtac ch2ch_fappR 1), |
|
89 |
(rtac is_chain_iterate 1), |
|
90 |
(rtac ub_rangeI 1), |
|
91 |
(rtac allI 1), |
|
92 |
(rtac (iterate_Suc RS subst) 1), |
|
93 |
(rtac is_ub_thelub 1), |
|
94 |
(rtac is_chain_iterate 1) |
|
95 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
96 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
97 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
98 |
qed_goalw "Ifix_least" Fix.thy [Ifix_def] "F`x=x ==> Ifix(F) << x" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
99 |
(fn prems => |
1461 | 100 |
[ |
101 |
(cut_facts_tac prems 1), |
|
102 |
(rtac is_lub_thelub 1), |
|
103 |
(rtac is_chain_iterate 1), |
|
104 |
(rtac ub_rangeI 1), |
|
105 |
(strip_tac 1), |
|
106 |
(nat_ind_tac "i" 1), |
|
107 |
(Asm_simp_tac 1), |
|
108 |
(Asm_simp_tac 1), |
|
109 |
(res_inst_tac [("t","x")] subst 1), |
|
110 |
(atac 1), |
|
111 |
(etac monofun_cfun_arg 1) |
|
112 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
113 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
114 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
115 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
116 |
(* monotonicity and continuity of iterate *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
117 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
118 |
|
892 | 119 |
qed_goalw "monofun_iterate" Fix.thy [monofun] "monofun(iterate(i))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
120 |
(fn prems => |
1461 | 121 |
[ |
122 |
(strip_tac 1), |
|
123 |
(nat_ind_tac "i" 1), |
|
124 |
(Asm_simp_tac 1), |
|
125 |
(Asm_simp_tac 1), |
|
126 |
(rtac (less_fun RS iffD2) 1), |
|
127 |
(rtac allI 1), |
|
128 |
(rtac monofun_cfun 1), |
|
129 |
(atac 1), |
|
130 |
(rtac (less_fun RS iffD1 RS spec) 1), |
|
131 |
(atac 1) |
|
132 |
]); |
|
243
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 following lemma uses contlub_cfun which itself is based on a *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
136 |
(* diagonalisation lemma for continuous functions with two arguments. *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
137 |
(* In this special case it is the application function fapp *) |
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 |
|
892 | 140 |
qed_goalw "contlub_iterate" Fix.thy [contlub] "contlub(iterate(i))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
141 |
(fn prems => |
1461 | 142 |
[ |
143 |
(strip_tac 1), |
|
144 |
(nat_ind_tac "i" 1), |
|
145 |
(Asm_simp_tac 1), |
|
146 |
(rtac (lub_const RS thelubI RS sym) 1), |
|
147 |
(Asm_simp_tac 1), |
|
148 |
(rtac ext 1), |
|
149 |
(rtac (thelub_fun RS ssubst) 1), |
|
150 |
(rtac is_chainI 1), |
|
151 |
(rtac allI 1), |
|
152 |
(rtac (less_fun RS iffD2) 1), |
|
153 |
(rtac allI 1), |
|
154 |
(rtac (is_chainE RS spec) 1), |
|
155 |
(rtac (monofun_fapp1 RS ch2ch_MF2LR) 1), |
|
156 |
(rtac allI 1), |
|
157 |
(rtac monofun_fapp2 1), |
|
158 |
(atac 1), |
|
159 |
(rtac ch2ch_fun 1), |
|
160 |
(rtac (monofun_iterate RS ch2ch_monofun) 1), |
|
161 |
(atac 1), |
|
162 |
(rtac (thelub_fun RS ssubst) 1), |
|
163 |
(rtac (monofun_iterate RS ch2ch_monofun) 1), |
|
164 |
(atac 1), |
|
165 |
(rtac contlub_cfun 1), |
|
166 |
(atac 1), |
|
167 |
(etac (monofun_iterate RS ch2ch_monofun RS ch2ch_fun) 1) |
|
168 |
]); |
|
243
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 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
171 |
qed_goal "cont_iterate" Fix.thy "cont(iterate(i))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
172 |
(fn prems => |
1461 | 173 |
[ |
174 |
(rtac monocontlub2cont 1), |
|
175 |
(rtac monofun_iterate 1), |
|
176 |
(rtac contlub_iterate 1) |
|
177 |
]); |
|
243
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 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
180 |
(* a lemma about continuity of iterate in its third argument *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
181 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
182 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
183 |
qed_goal "monofun_iterate2" Fix.thy "monofun(iterate n F)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
184 |
(fn prems => |
1461 | 185 |
[ |
186 |
(rtac monofunI 1), |
|
187 |
(strip_tac 1), |
|
188 |
(nat_ind_tac "n" 1), |
|
189 |
(Asm_simp_tac 1), |
|
190 |
(Asm_simp_tac 1), |
|
191 |
(etac monofun_cfun_arg 1) |
|
192 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
193 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
194 |
qed_goal "contlub_iterate2" Fix.thy "contlub(iterate n F)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
195 |
(fn prems => |
1461 | 196 |
[ |
197 |
(rtac contlubI 1), |
|
198 |
(strip_tac 1), |
|
199 |
(nat_ind_tac "n" 1), |
|
200 |
(Simp_tac 1), |
|
201 |
(Simp_tac 1), |
|
202 |
(res_inst_tac [("t","iterate n1 F (lub(range(%u. Y u)))"), |
|
203 |
("s","lub(range(%i. iterate n1 F (Y i)))")] ssubst 1), |
|
204 |
(atac 1), |
|
205 |
(rtac contlub_cfun_arg 1), |
|
206 |
(etac (monofun_iterate2 RS ch2ch_monofun) 1) |
|
207 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
208 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
209 |
qed_goal "cont_iterate2" Fix.thy "cont (iterate n F)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
210 |
(fn prems => |
1461 | 211 |
[ |
212 |
(rtac monocontlub2cont 1), |
|
213 |
(rtac monofun_iterate2 1), |
|
214 |
(rtac contlub_iterate2 1) |
|
215 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
216 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
217 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
218 |
(* monotonicity and continuity of Ifix *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
219 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
220 |
|
892 | 221 |
qed_goalw "monofun_Ifix" Fix.thy [monofun,Ifix_def] "monofun(Ifix)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
222 |
(fn prems => |
1461 | 223 |
[ |
224 |
(strip_tac 1), |
|
225 |
(rtac lub_mono 1), |
|
226 |
(rtac is_chain_iterate 1), |
|
227 |
(rtac is_chain_iterate 1), |
|
228 |
(rtac allI 1), |
|
229 |
(rtac (less_fun RS iffD1 RS spec) 1), |
|
230 |
(etac (monofun_iterate RS monofunE RS spec RS spec RS mp) 1) |
|
231 |
]); |
|
243
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 |
|
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 |
(* since iterate is not monotone in its first argument, special lemmas must *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
236 |
(* be derived for lubs in this argument *) |
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 |
|
892 | 239 |
qed_goal "is_chain_iterate_lub" Fix.thy |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
240 |
"is_chain(Y) ==> is_chain(%i. lub(range(%ia. iterate ia (Y i) UU)))" |
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 is_chainI 1), |
|
245 |
(strip_tac 1), |
|
246 |
(rtac lub_mono 1), |
|
247 |
(rtac is_chain_iterate 1), |
|
248 |
(rtac is_chain_iterate 1), |
|
249 |
(strip_tac 1), |
|
250 |
(etac (monofun_iterate RS ch2ch_monofun RS ch2ch_fun RS is_chainE |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
251 |
RS spec) 1) |
1461 | 252 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
253 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
254 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
255 |
(* this exchange lemma is analog to the one for monotone functions *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
256 |
(* observe that monotonicity is not really needed. The propagation of *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
257 |
(* chains is the essential argument which is usually derived from monot. *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
258 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
259 |
|
892 | 260 |
qed_goal "contlub_Ifix_lemma1" Fix.thy |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
261 |
"is_chain(Y) ==>iterate n (lub(range Y)) y = lub(range(%i. iterate n (Y i) y))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
262 |
(fn prems => |
1461 | 263 |
[ |
264 |
(cut_facts_tac prems 1), |
|
265 |
(rtac (thelub_fun RS subst) 1), |
|
266 |
(rtac (monofun_iterate RS ch2ch_monofun) 1), |
|
267 |
(atac 1), |
|
268 |
(rtac fun_cong 1), |
|
269 |
(rtac (contlub_iterate RS contlubE RS spec RS mp RS ssubst) 1), |
|
270 |
(atac 1), |
|
271 |
(rtac refl 1) |
|
272 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
273 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
274 |
|
892 | 275 |
qed_goal "ex_lub_iterate" Fix.thy "is_chain(Y) ==>\ |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
276 |
\ lub(range(%i. lub(range(%ia. iterate i (Y ia) UU)))) =\ |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
277 |
\ lub(range(%i. lub(range(%ia. iterate ia (Y i) UU))))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
278 |
(fn prems => |
1461 | 279 |
[ |
280 |
(cut_facts_tac prems 1), |
|
281 |
(rtac antisym_less 1), |
|
282 |
(rtac is_lub_thelub 1), |
|
283 |
(rtac (contlub_Ifix_lemma1 RS ext RS subst) 1), |
|
284 |
(atac 1), |
|
285 |
(rtac is_chain_iterate 1), |
|
286 |
(rtac ub_rangeI 1), |
|
287 |
(strip_tac 1), |
|
288 |
(rtac lub_mono 1), |
|
289 |
(etac (monofun_iterate RS ch2ch_monofun RS ch2ch_fun) 1), |
|
290 |
(etac is_chain_iterate_lub 1), |
|
291 |
(strip_tac 1), |
|
292 |
(rtac is_ub_thelub 1), |
|
293 |
(rtac is_chain_iterate 1), |
|
294 |
(rtac is_lub_thelub 1), |
|
295 |
(etac is_chain_iterate_lub 1), |
|
296 |
(rtac ub_rangeI 1), |
|
297 |
(strip_tac 1), |
|
298 |
(rtac lub_mono 1), |
|
299 |
(rtac is_chain_iterate 1), |
|
300 |
(rtac (contlub_Ifix_lemma1 RS ext RS subst) 1), |
|
301 |
(atac 1), |
|
302 |
(rtac is_chain_iterate 1), |
|
303 |
(strip_tac 1), |
|
304 |
(rtac is_ub_thelub 1), |
|
305 |
(etac (monofun_iterate RS ch2ch_monofun RS ch2ch_fun) 1) |
|
306 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
307 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
308 |
|
892 | 309 |
qed_goalw "contlub_Ifix" Fix.thy [contlub,Ifix_def] "contlub(Ifix)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
310 |
(fn prems => |
1461 | 311 |
[ |
312 |
(strip_tac 1), |
|
313 |
(rtac (contlub_Ifix_lemma1 RS ext RS ssubst) 1), |
|
314 |
(atac 1), |
|
315 |
(etac ex_lub_iterate 1) |
|
316 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
317 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
318 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
319 |
qed_goal "cont_Ifix" Fix.thy "cont(Ifix)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
320 |
(fn prems => |
1461 | 321 |
[ |
322 |
(rtac monocontlub2cont 1), |
|
323 |
(rtac monofun_Ifix 1), |
|
324 |
(rtac contlub_Ifix 1) |
|
325 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
326 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
327 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
328 |
(* propagate properties of Ifix to its continuous counterpart *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
329 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
330 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
331 |
qed_goalw "fix_eq" Fix.thy [fix_def] "fix`F = F`(fix`F)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
332 |
(fn prems => |
1461 | 333 |
[ |
334 |
(asm_simp_tac (!simpset addsimps [cont_Ifix]) 1), |
|
335 |
(rtac Ifix_eq 1) |
|
336 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
337 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
338 |
qed_goalw "fix_least" Fix.thy [fix_def] "F`x = x ==> fix`F << x" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
339 |
(fn prems => |
1461 | 340 |
[ |
341 |
(cut_facts_tac prems 1), |
|
342 |
(asm_simp_tac (!simpset addsimps [cont_Ifix]) 1), |
|
343 |
(etac Ifix_least 1) |
|
344 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
345 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
346 |
|
1274 | 347 |
qed_goal "fix_eqI" Fix.thy |
348 |
"[| F`x = x; !z. F`z = z --> x << z |] ==> x = fix`F" |
|
349 |
(fn prems => |
|
1461 | 350 |
[ |
351 |
(cut_facts_tac prems 1), |
|
352 |
(rtac antisym_less 1), |
|
353 |
(etac allE 1), |
|
354 |
(etac mp 1), |
|
355 |
(rtac (fix_eq RS sym) 1), |
|
356 |
(etac fix_least 1) |
|
357 |
]); |
|
1274 | 358 |
|
359 |
||
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
360 |
qed_goal "fix_eq2" Fix.thy "f == fix`F ==> f = F`f" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
361 |
(fn prems => |
1461 | 362 |
[ |
363 |
(rewrite_goals_tac prems), |
|
364 |
(rtac fix_eq 1) |
|
365 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
366 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
367 |
qed_goal "fix_eq3" Fix.thy "f == fix`F ==> f`x = F`f`x" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
368 |
(fn prems => |
1461 | 369 |
[ |
370 |
(rtac trans 1), |
|
371 |
(rtac ((hd prems) RS fix_eq2 RS cfun_fun_cong) 1), |
|
372 |
(rtac refl 1) |
|
373 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
374 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
375 |
fun fix_tac3 thm i = ((rtac trans i) THEN (rtac (thm RS fix_eq3) i)); |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
376 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
377 |
qed_goal "fix_eq4" Fix.thy "f = fix`F ==> f = F`f" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
378 |
(fn prems => |
1461 | 379 |
[ |
380 |
(cut_facts_tac prems 1), |
|
381 |
(hyp_subst_tac 1), |
|
382 |
(rtac fix_eq 1) |
|
383 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
384 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
385 |
qed_goal "fix_eq5" Fix.thy "f = fix`F ==> f`x = F`f`x" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
386 |
(fn prems => |
1461 | 387 |
[ |
388 |
(rtac trans 1), |
|
389 |
(rtac ((hd prems) RS fix_eq4 RS cfun_fun_cong) 1), |
|
390 |
(rtac refl 1) |
|
391 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
392 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
393 |
fun fix_tac5 thm i = ((rtac trans i) THEN (rtac (thm RS fix_eq5) i)); |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
394 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
395 |
fun fix_prover thy fixdef thm = prove_goal thy thm |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
396 |
(fn prems => |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
397 |
[ |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
398 |
(rtac trans 1), |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
399 |
(rtac (fixdef RS fix_eq4) 1), |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
400 |
(rtac trans 1), |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
401 |
(rtac beta_cfun 1), |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
402 |
(cont_tacR 1), |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
403 |
(rtac refl 1) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
404 |
]); |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
405 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
406 |
(* use this one for definitions! *) |
297 | 407 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
408 |
fun fix_prover2 thy fixdef thm = prove_goal thy thm |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
409 |
(fn prems => |
1461 | 410 |
[ |
411 |
(rtac trans 1), |
|
412 |
(rtac (fix_eq2) 1), |
|
413 |
(rtac fixdef 1), |
|
414 |
(rtac beta_cfun 1), |
|
415 |
(cont_tacR 1) |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
416 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
417 |
|
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 |
(* better access to definitions *) |
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 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
422 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
423 |
qed_goal "Ifix_def2" Fix.thy "Ifix=(%x. lub(range(%i. iterate i x UU)))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
424 |
(fn prems => |
1461 | 425 |
[ |
426 |
(rtac ext 1), |
|
427 |
(rewtac Ifix_def), |
|
428 |
(rtac refl 1) |
|
429 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
430 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
431 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
432 |
(* direct connection between fix and iteration without Ifix *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
433 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
434 |
|
892 | 435 |
qed_goalw "fix_def2" Fix.thy [fix_def] |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
436 |
"fix`F = lub(range(%i. iterate i F UU))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
437 |
(fn prems => |
1461 | 438 |
[ |
439 |
(fold_goals_tac [Ifix_def]), |
|
440 |
(asm_simp_tac (!simpset addsimps [cont_Ifix]) 1) |
|
441 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
442 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
443 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
444 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
445 |
(* Lemmas about admissibility and fixed point induction *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
446 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
447 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
448 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
449 |
(* access to definitions *) |
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 |
|
892 | 452 |
qed_goalw "adm_def2" Fix.thy [adm_def] |
1461 | 453 |
"adm(P) = (!Y. is_chain(Y) --> (!i.P(Y(i))) --> P(lub(range(Y))))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
454 |
(fn prems => |
1461 | 455 |
[ |
456 |
(rtac refl 1) |
|
457 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
458 |
|
892 | 459 |
qed_goalw "admw_def2" Fix.thy [admw_def] |
1461 | 460 |
"admw(P) = (!F.(!n.P(iterate n F UU)) -->\ |
461 |
\ P (lub(range(%i.iterate i F UU))))" |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
462 |
(fn prems => |
1461 | 463 |
[ |
464 |
(rtac refl 1) |
|
465 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
466 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
467 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
468 |
(* an admissible formula is also weak admissible *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
469 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
470 |
|
892 | 471 |
qed_goalw "adm_impl_admw" Fix.thy [admw_def] "adm(P)==>admw(P)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
472 |
(fn prems => |
1461 | 473 |
[ |
474 |
(cut_facts_tac prems 1), |
|
475 |
(strip_tac 1), |
|
476 |
(rtac (adm_def2 RS iffD1 RS spec RS mp RS mp) 1), |
|
477 |
(atac 1), |
|
478 |
(rtac is_chain_iterate 1), |
|
479 |
(atac 1) |
|
480 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
481 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
482 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
483 |
(* fixed point induction *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
484 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
485 |
|
892 | 486 |
qed_goal "fix_ind" Fix.thy |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
487 |
"[| adm(P);P(UU);!!x. P(x) ==> P(F`x)|] ==> P(fix`F)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
488 |
(fn prems => |
1461 | 489 |
[ |
490 |
(cut_facts_tac prems 1), |
|
491 |
(rtac (fix_def2 RS ssubst) 1), |
|
492 |
(rtac (adm_def2 RS iffD1 RS spec RS mp RS mp) 1), |
|
493 |
(atac 1), |
|
494 |
(rtac is_chain_iterate 1), |
|
495 |
(rtac allI 1), |
|
496 |
(nat_ind_tac "i" 1), |
|
497 |
(rtac (iterate_0 RS ssubst) 1), |
|
498 |
(atac 1), |
|
499 |
(rtac (iterate_Suc RS ssubst) 1), |
|
500 |
(resolve_tac prems 1), |
|
501 |
(atac 1) |
|
502 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
503 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
504 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
505 |
(* computational induction for weak admissible formulae *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
506 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
507 |
|
892 | 508 |
qed_goal "wfix_ind" Fix.thy |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
509 |
"[| admw(P); !n. P(iterate n F UU)|] ==> P(fix`F)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
510 |
(fn prems => |
1461 | 511 |
[ |
512 |
(cut_facts_tac prems 1), |
|
513 |
(rtac (fix_def2 RS ssubst) 1), |
|
514 |
(rtac (admw_def2 RS iffD1 RS spec RS mp) 1), |
|
515 |
(atac 1), |
|
516 |
(rtac allI 1), |
|
517 |
(etac spec 1) |
|
518 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
519 |
|
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 |
(* for chain-finite (easy) types every formula is admissible *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
522 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
523 |
|
892 | 524 |
qed_goalw "adm_max_in_chain" Fix.thy [adm_def] |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
525 |
"!Y. is_chain(Y::nat=>'a) --> (? n.max_in_chain n Y) ==> adm(P::'a=>bool)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
526 |
(fn prems => |
1461 | 527 |
[ |
528 |
(cut_facts_tac prems 1), |
|
529 |
(strip_tac 1), |
|
530 |
(rtac exE 1), |
|
531 |
(rtac mp 1), |
|
532 |
(etac spec 1), |
|
533 |
(atac 1), |
|
534 |
(rtac (lub_finch1 RS thelubI RS ssubst) 1), |
|
535 |
(atac 1), |
|
536 |
(atac 1), |
|
537 |
(etac spec 1) |
|
538 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
539 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
540 |
|
892 | 541 |
qed_goalw "adm_chain_finite" Fix.thy [chain_finite_def] |
1461 | 542 |
"chain_finite(x::'a) ==> adm(P::'a=>bool)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
543 |
(fn prems => |
1461 | 544 |
[ |
545 |
(cut_facts_tac prems 1), |
|
546 |
(etac adm_max_in_chain 1) |
|
547 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
548 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
549 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
550 |
(* flat types are chain_finite *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
551 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
552 |
|
1410
324aa8134639
changed predicate flat to is_flat in theory Fix.thy
regensbu
parents:
1274
diff
changeset
|
553 |
qed_goalw "flat_imp_chain_finite" Fix.thy [is_flat_def,chain_finite_def] |
1461 | 554 |
"is_flat(x::'a)==>chain_finite(x::'a)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
555 |
(fn prems => |
1461 | 556 |
[ |
557 |
(rewtac max_in_chain_def), |
|
558 |
(cut_facts_tac prems 1), |
|
559 |
(strip_tac 1), |
|
1675 | 560 |
(case_tac "!i.Y(i)=UU" 1), |
1461 | 561 |
(res_inst_tac [("x","0")] exI 1), |
562 |
(strip_tac 1), |
|
563 |
(rtac trans 1), |
|
564 |
(etac spec 1), |
|
565 |
(rtac sym 1), |
|
566 |
(etac spec 1), |
|
567 |
(rtac (chain_mono2 RS exE) 1), |
|
568 |
(fast_tac HOL_cs 1), |
|
569 |
(atac 1), |
|
570 |
(res_inst_tac [("x","Suc(x)")] exI 1), |
|
571 |
(strip_tac 1), |
|
572 |
(rtac disjE 1), |
|
573 |
(atac 3), |
|
574 |
(rtac mp 1), |
|
575 |
(dtac spec 1), |
|
576 |
(etac spec 1), |
|
577 |
(etac (le_imp_less_or_eq RS disjE) 1), |
|
578 |
(etac (chain_mono RS mp) 1), |
|
579 |
(atac 1), |
|
580 |
(hyp_subst_tac 1), |
|
581 |
(rtac refl_less 1), |
|
582 |
(res_inst_tac [("P","Y(Suc(x)) = UU")] notE 1), |
|
583 |
(atac 2), |
|
584 |
(rtac mp 1), |
|
585 |
(etac spec 1), |
|
586 |
(Asm_simp_tac 1) |
|
587 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
588 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
589 |
|
1779 | 590 |
bind_thm ("adm_flat", flat_imp_chain_finite RS adm_chain_finite); |
1410
324aa8134639
changed predicate flat to is_flat in theory Fix.thy
regensbu
parents:
1274
diff
changeset
|
591 |
(* is_flat(?x::?'a) ==> adm(?P::?'a => bool) *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
592 |
|
1410
324aa8134639
changed predicate flat to is_flat in theory Fix.thy
regensbu
parents:
1274
diff
changeset
|
593 |
qed_goalw "flat_void" Fix.thy [is_flat_def] "is_flat(UU::void)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
594 |
(fn prems => |
1461 | 595 |
[ |
596 |
(strip_tac 1), |
|
597 |
(rtac disjI1 1), |
|
598 |
(rtac unique_void2 1) |
|
599 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
600 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
601 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
602 |
(* continuous isomorphisms are strict *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
603 |
(* a prove for embedding projection pairs is similar *) |
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 |
|
892 | 606 |
qed_goal "iso_strict" Fix.thy |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
607 |
"!!f g.[|!y.f`(g`y)=(y::'b) ; !x.g`(f`x)=(x::'a) |] \ |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
608 |
\ ==> f`UU=UU & g`UU=UU" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
609 |
(fn prems => |
1461 | 610 |
[ |
611 |
(rtac conjI 1), |
|
612 |
(rtac UU_I 1), |
|
613 |
(res_inst_tac [("s","f`(g`(UU::'b))"),("t","UU::'b")] subst 1), |
|
614 |
(etac spec 1), |
|
615 |
(rtac (minimal RS monofun_cfun_arg) 1), |
|
616 |
(rtac UU_I 1), |
|
617 |
(res_inst_tac [("s","g`(f`(UU::'a))"),("t","UU::'a")] subst 1), |
|
618 |
(etac spec 1), |
|
619 |
(rtac (minimal RS monofun_cfun_arg) 1) |
|
620 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
621 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
622 |
|
892 | 623 |
qed_goal "isorep_defined" Fix.thy |
1461 | 624 |
"[|!x.rep`(abs`x)=x;!y.abs`(rep`y)=y; z~=UU|] ==> rep`z ~= UU" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
625 |
(fn prems => |
1461 | 626 |
[ |
627 |
(cut_facts_tac prems 1), |
|
628 |
(etac swap 1), |
|
629 |
(dtac notnotD 1), |
|
630 |
(dres_inst_tac [("f","abs")] cfun_arg_cong 1), |
|
631 |
(etac box_equals 1), |
|
632 |
(fast_tac HOL_cs 1), |
|
633 |
(etac (iso_strict RS conjunct1) 1), |
|
634 |
(atac 1) |
|
635 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
636 |
|
892 | 637 |
qed_goal "isoabs_defined" Fix.thy |
1461 | 638 |
"[|!x.rep`(abs`x) = x;!y.abs`(rep`y)=y ; z~=UU|] ==> abs`z ~= UU" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
639 |
(fn prems => |
1461 | 640 |
[ |
641 |
(cut_facts_tac prems 1), |
|
642 |
(etac swap 1), |
|
643 |
(dtac notnotD 1), |
|
644 |
(dres_inst_tac [("f","rep")] cfun_arg_cong 1), |
|
645 |
(etac box_equals 1), |
|
646 |
(fast_tac HOL_cs 1), |
|
647 |
(etac (iso_strict RS conjunct2) 1), |
|
648 |
(atac 1) |
|
649 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
650 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
651 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
652 |
(* propagation of flatness and chainfiniteness by continuous isomorphisms *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
653 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
654 |
|
892 | 655 |
qed_goalw "chfin2chfin" Fix.thy [chain_finite_def] |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
656 |
"!!f g.[|chain_finite(x::'a); !y.f`(g`y)=(y::'b) ; !x.g`(f`x)=(x::'a) |] \ |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
657 |
\ ==> chain_finite(y::'b)" |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
658 |
(fn prems => |
1461 | 659 |
[ |
660 |
(rewtac max_in_chain_def), |
|
661 |
(strip_tac 1), |
|
662 |
(rtac exE 1), |
|
663 |
(res_inst_tac [("P","is_chain(%i.g`(Y i))")] mp 1), |
|
664 |
(etac spec 1), |
|
665 |
(etac ch2ch_fappR 1), |
|
666 |
(rtac exI 1), |
|
667 |
(strip_tac 1), |
|
668 |
(res_inst_tac [("s","f`(g`(Y x))"),("t","Y(x)")] subst 1), |
|
669 |
(etac spec 1), |
|
670 |
(res_inst_tac [("s","f`(g`(Y j))"),("t","Y(j)")] subst 1), |
|
671 |
(etac spec 1), |
|
672 |
(rtac cfun_arg_cong 1), |
|
673 |
(rtac mp 1), |
|
674 |
(etac spec 1), |
|
675 |
(atac 1) |
|
676 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
677 |
|
1410
324aa8134639
changed predicate flat to is_flat in theory Fix.thy
regensbu
parents:
1274
diff
changeset
|
678 |
qed_goalw "flat2flat" Fix.thy [is_flat_def] |
324aa8134639
changed predicate flat to is_flat in theory Fix.thy
regensbu
parents:
1274
diff
changeset
|
679 |
"!!f g.[|is_flat(x::'a); !y.f`(g`y)=(y::'b) ; !x.g`(f`x)=(x::'a) |] \ |
324aa8134639
changed predicate flat to is_flat in theory Fix.thy
regensbu
parents:
1274
diff
changeset
|
680 |
\ ==> is_flat(y::'b)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
681 |
(fn prems => |
1461 | 682 |
[ |
683 |
(strip_tac 1), |
|
684 |
(rtac disjE 1), |
|
685 |
(res_inst_tac [("P","g`x<<g`y")] mp 1), |
|
686 |
(etac monofun_cfun_arg 2), |
|
687 |
(dtac spec 1), |
|
688 |
(etac spec 1), |
|
689 |
(rtac disjI1 1), |
|
690 |
(rtac trans 1), |
|
691 |
(res_inst_tac [("s","f`(g`x)"),("t","x")] subst 1), |
|
692 |
(etac spec 1), |
|
693 |
(etac cfun_arg_cong 1), |
|
694 |
(rtac (iso_strict RS conjunct1) 1), |
|
695 |
(atac 1), |
|
696 |
(atac 1), |
|
697 |
(rtac disjI2 1), |
|
698 |
(res_inst_tac [("s","f`(g`x)"),("t","x")] subst 1), |
|
699 |
(etac spec 1), |
|
700 |
(res_inst_tac [("s","f`(g`y)"),("t","y")] subst 1), |
|
701 |
(etac spec 1), |
|
702 |
(etac cfun_arg_cong 1) |
|
703 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
704 |
|
625 | 705 |
(* ------------------------------------------------------------------------- *) |
706 |
(* a result about functions with flat codomain *) |
|
707 |
(* ------------------------------------------------------------------------- *) |
|
708 |
||
1410
324aa8134639
changed predicate flat to is_flat in theory Fix.thy
regensbu
parents:
1274
diff
changeset
|
709 |
qed_goalw "flat_codom" Fix.thy [is_flat_def] |
324aa8134639
changed predicate flat to is_flat in theory Fix.thy
regensbu
parents:
1274
diff
changeset
|
710 |
"[|is_flat(y::'b);f`(x::'a)=(c::'b)|] ==> f`(UU::'a)=(UU::'b) | (!z.f`(z::'a)=c)" |
625 | 711 |
(fn prems => |
1461 | 712 |
[ |
713 |
(cut_facts_tac prems 1), |
|
1675 | 714 |
(case_tac "f`(x::'a)=(UU::'b)" 1), |
1461 | 715 |
(rtac disjI1 1), |
716 |
(rtac UU_I 1), |
|
717 |
(res_inst_tac [("s","f`(x)"),("t","UU::'b")] subst 1), |
|
718 |
(atac 1), |
|
719 |
(rtac (minimal RS monofun_cfun_arg) 1), |
|
1675 | 720 |
(case_tac "f`(UU::'a)=(UU::'b)" 1), |
1461 | 721 |
(etac disjI1 1), |
722 |
(rtac disjI2 1), |
|
723 |
(rtac allI 1), |
|
724 |
(res_inst_tac [("s","f`x"),("t","c")] subst 1), |
|
725 |
(atac 1), |
|
726 |
(res_inst_tac [("a","f`(UU::'a)")] (refl RS box_equals) 1), |
|
727 |
(etac allE 1),(etac allE 1), |
|
728 |
(dtac mp 1), |
|
1780 | 729 |
(res_inst_tac [("fo","f")] (minimal RS monofun_cfun_arg) 1), |
1461 | 730 |
(etac disjE 1), |
731 |
(contr_tac 1), |
|
732 |
(atac 1), |
|
733 |
(etac allE 1), |
|
734 |
(etac allE 1), |
|
735 |
(dtac mp 1), |
|
1780 | 736 |
(res_inst_tac [("fo","f")] (minimal RS monofun_cfun_arg) 1), |
1461 | 737 |
(etac disjE 1), |
738 |
(contr_tac 1), |
|
739 |
(atac 1) |
|
740 |
]); |
|
625 | 741 |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
742 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
743 |
(* admissibility of special formulae and propagation *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
744 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
745 |
|
892 | 746 |
qed_goalw "adm_less" Fix.thy [adm_def] |
1461 | 747 |
"[|cont u;cont v|]==> adm(%x.u x << v x)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
748 |
(fn prems => |
1461 | 749 |
[ |
750 |
(cut_facts_tac prems 1), |
|
751 |
(strip_tac 1), |
|
752 |
(etac (cont2contlub RS contlubE RS spec RS mp RS ssubst) 1), |
|
753 |
(atac 1), |
|
754 |
(etac (cont2contlub RS contlubE RS spec RS mp RS ssubst) 1), |
|
755 |
(atac 1), |
|
756 |
(rtac lub_mono 1), |
|
757 |
(cut_facts_tac prems 1), |
|
758 |
(etac (cont2mono RS ch2ch_monofun) 1), |
|
759 |
(atac 1), |
|
760 |
(cut_facts_tac prems 1), |
|
761 |
(etac (cont2mono RS ch2ch_monofun) 1), |
|
762 |
(atac 1), |
|
763 |
(atac 1) |
|
764 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
765 |
|
892 | 766 |
qed_goal "adm_conj" Fix.thy |
1461 | 767 |
"[| adm P; adm Q |] ==> adm(%x. P x & Q x)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
768 |
(fn prems => |
1461 | 769 |
[ |
770 |
(cut_facts_tac prems 1), |
|
771 |
(rtac (adm_def2 RS iffD2) 1), |
|
772 |
(strip_tac 1), |
|
773 |
(rtac conjI 1), |
|
774 |
(rtac (adm_def2 RS iffD1 RS spec RS mp RS mp) 1), |
|
775 |
(atac 1), |
|
776 |
(atac 1), |
|
777 |
(fast_tac HOL_cs 1), |
|
778 |
(rtac (adm_def2 RS iffD1 RS spec RS mp RS mp) 1), |
|
779 |
(atac 1), |
|
780 |
(atac 1), |
|
781 |
(fast_tac HOL_cs 1) |
|
782 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
783 |
|
892 | 784 |
qed_goal "adm_cong" Fix.thy |
1461 | 785 |
"(!x. P x = Q x) ==> adm P = adm Q " |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
786 |
(fn prems => |
1461 | 787 |
[ |
788 |
(cut_facts_tac prems 1), |
|
789 |
(res_inst_tac [("s","P"),("t","Q")] subst 1), |
|
790 |
(rtac refl 2), |
|
791 |
(rtac ext 1), |
|
792 |
(etac spec 1) |
|
793 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
794 |
|
892 | 795 |
qed_goalw "adm_not_free" Fix.thy [adm_def] "adm(%x.t)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
796 |
(fn prems => |
1461 | 797 |
[ |
798 |
(fast_tac HOL_cs 1) |
|
799 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
800 |
|
892 | 801 |
qed_goalw "adm_not_less" Fix.thy [adm_def] |
1461 | 802 |
"cont t ==> adm(%x.~ (t x) << u)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
803 |
(fn prems => |
1461 | 804 |
[ |
805 |
(cut_facts_tac prems 1), |
|
806 |
(strip_tac 1), |
|
807 |
(rtac contrapos 1), |
|
808 |
(etac spec 1), |
|
809 |
(rtac trans_less 1), |
|
810 |
(atac 2), |
|
811 |
(etac (cont2mono RS monofun_fun_arg) 1), |
|
812 |
(rtac is_ub_thelub 1), |
|
813 |
(atac 1) |
|
814 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
815 |
|
892 | 816 |
qed_goal "adm_all" Fix.thy |
1461 | 817 |
" !y.adm(P y) ==> adm(%x.!y.P y x)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
818 |
(fn prems => |
1461 | 819 |
[ |
820 |
(cut_facts_tac prems 1), |
|
821 |
(rtac (adm_def2 RS iffD2) 1), |
|
822 |
(strip_tac 1), |
|
823 |
(rtac (adm_def2 RS iffD1 RS spec RS mp RS mp) 1), |
|
824 |
(etac spec 1), |
|
825 |
(atac 1), |
|
826 |
(rtac allI 1), |
|
827 |
(dtac spec 1), |
|
828 |
(etac spec 1) |
|
829 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
830 |
|
1779 | 831 |
bind_thm ("adm_all2", allI RS adm_all); |
625 | 832 |
|
892 | 833 |
qed_goal "adm_subst" Fix.thy |
1461 | 834 |
"[|cont t; adm P|] ==> adm(%x. P (t x))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
835 |
(fn prems => |
1461 | 836 |
[ |
837 |
(cut_facts_tac prems 1), |
|
838 |
(rtac (adm_def2 RS iffD2) 1), |
|
839 |
(strip_tac 1), |
|
840 |
(rtac (cont2contlub RS contlubE RS spec RS mp RS ssubst) 1), |
|
841 |
(atac 1), |
|
842 |
(atac 1), |
|
843 |
(rtac (adm_def2 RS iffD1 RS spec RS mp RS mp) 1), |
|
844 |
(atac 1), |
|
845 |
(rtac (cont2mono RS ch2ch_monofun) 1), |
|
846 |
(atac 1), |
|
847 |
(atac 1), |
|
848 |
(atac 1) |
|
849 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
850 |
|
892 | 851 |
qed_goal "adm_UU_not_less" Fix.thy "adm(%x.~ UU << t(x))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
852 |
(fn prems => |
1461 | 853 |
[ |
854 |
(res_inst_tac [("P2","%x.False")] (adm_cong RS iffD1) 1), |
|
855 |
(Asm_simp_tac 1), |
|
856 |
(rtac adm_not_free 1) |
|
857 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
858 |
|
892 | 859 |
qed_goalw "adm_not_UU" Fix.thy [adm_def] |
1461 | 860 |
"cont(t)==> adm(%x.~ (t x) = UU)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
861 |
(fn prems => |
1461 | 862 |
[ |
863 |
(cut_facts_tac prems 1), |
|
864 |
(strip_tac 1), |
|
865 |
(rtac contrapos 1), |
|
866 |
(etac spec 1), |
|
867 |
(rtac (chain_UU_I RS spec) 1), |
|
868 |
(rtac (cont2mono RS ch2ch_monofun) 1), |
|
869 |
(atac 1), |
|
870 |
(atac 1), |
|
871 |
(rtac (cont2contlub RS contlubE RS spec RS mp RS subst) 1), |
|
872 |
(atac 1), |
|
873 |
(atac 1), |
|
874 |
(atac 1) |
|
875 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
876 |
|
892 | 877 |
qed_goal "adm_eq" Fix.thy |
1461 | 878 |
"[|cont u ; cont v|]==> adm(%x. u x = v x)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
879 |
(fn prems => |
1461 | 880 |
[ |
881 |
(rtac (adm_cong RS iffD1) 1), |
|
882 |
(rtac allI 1), |
|
883 |
(rtac iffI 1), |
|
884 |
(rtac antisym_less 1), |
|
885 |
(rtac antisym_less_inverse 3), |
|
886 |
(atac 3), |
|
887 |
(etac conjunct1 1), |
|
888 |
(etac conjunct2 1), |
|
889 |
(rtac adm_conj 1), |
|
890 |
(rtac adm_less 1), |
|
891 |
(resolve_tac prems 1), |
|
892 |
(resolve_tac prems 1), |
|
893 |
(rtac adm_less 1), |
|
894 |
(resolve_tac prems 1), |
|
895 |
(resolve_tac prems 1) |
|
896 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
897 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
898 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
899 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
900 |
(* admissibility for disjunction is hard to prove. It takes 10 Lemmas *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
901 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
902 |
|
892 | 903 |
qed_goal "adm_disj_lemma1" Pcpo.thy |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
904 |
"[| is_chain Y; !n.P (Y n) | Q(Y n)|]\ |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
905 |
\ ==> (? i.!j. i<j --> Q(Y(j))) | (!i.? j.i<j & P(Y(j)))" |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
906 |
(fn prems => |
1461 | 907 |
[ |
908 |
(cut_facts_tac prems 1), |
|
909 |
(fast_tac HOL_cs 1) |
|
910 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
911 |
|
892 | 912 |
qed_goal "adm_disj_lemma2" Fix.thy |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
913 |
"[| adm(Q); ? X.is_chain(X) & (!n.Q(X(n))) &\ |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
914 |
\ lub(range(Y))=lub(range(X))|] ==> Q(lub(range(Y)))" |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
915 |
(fn prems => |
1461 | 916 |
[ |
917 |
(cut_facts_tac prems 1), |
|
918 |
(etac exE 1), |
|
919 |
(etac conjE 1), |
|
920 |
(etac conjE 1), |
|
921 |
(res_inst_tac [("s","lub(range(X))"),("t","lub(range(Y))")] ssubst 1), |
|
922 |
(atac 1), |
|
923 |
(rtac (adm_def2 RS iffD1 RS spec RS mp RS mp) 1), |
|
924 |
(atac 1), |
|
925 |
(atac 1), |
|
926 |
(atac 1) |
|
927 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
928 |
|
892 | 929 |
qed_goal "adm_disj_lemma3" Fix.thy |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
930 |
"[| is_chain(Y); ! j. i < j --> Q(Y(j)) |] ==>\ |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
931 |
\ is_chain(%m. if m < Suc i then Y(Suc i) else Y m)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
932 |
(fn prems => |
1461 | 933 |
[ |
934 |
(cut_facts_tac prems 1), |
|
935 |
(rtac is_chainI 1), |
|
936 |
(rtac allI 1), |
|
937 |
(res_inst_tac [("m","i"),("n","ia")] nat_less_cases 1), |
|
938 |
(res_inst_tac [("s","False"),("t","ia < Suc(i)")] ssubst 1), |
|
939 |
(rtac iffI 1), |
|
940 |
(etac FalseE 2), |
|
941 |
(rtac notE 1), |
|
942 |
(rtac (not_less_eq RS iffD2) 1), |
|
943 |
(atac 1), |
|
944 |
(atac 1), |
|
945 |
(res_inst_tac [("s","False"),("t","Suc(ia) < Suc(i)")] ssubst 1), |
|
946 |
(Asm_simp_tac 1), |
|
947 |
(rtac iffI 1), |
|
948 |
(etac FalseE 2), |
|
949 |
(rtac notE 1), |
|
950 |
(etac less_not_sym 1), |
|
951 |
(atac 1), |
|
952 |
(Asm_simp_tac 1), |
|
953 |
(etac (is_chainE RS spec) 1), |
|
954 |
(hyp_subst_tac 1), |
|
955 |
(Asm_simp_tac 1), |
|
1675 | 956 |
(Asm_simp_tac 1), |
957 |
(asm_simp_tac (!simpset addsimps [less_Suc_eq]) 1) |
|
1461 | 958 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
959 |
|
892 | 960 |
qed_goal "adm_disj_lemma4" Fix.thy |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
961 |
"[| ! j. i < j --> Q(Y(j)) |] ==>\ |
1461 | 962 |
\ ! n. Q( if n < Suc i then Y(Suc i) else Y n)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
963 |
(fn prems => |
1461 | 964 |
[ |
965 |
(cut_facts_tac prems 1), |
|
966 |
(rtac allI 1), |
|
967 |
(res_inst_tac [("m","n"),("n","Suc(i)")] nat_less_cases 1), |
|
968 |
(res_inst_tac[("s","Y(Suc(i))"),("t","if n<Suc(i) then Y(Suc(i)) else Y n")] ssubst 1), |
|
969 |
(Asm_simp_tac 1), |
|
970 |
(etac allE 1), |
|
971 |
(rtac mp 1), |
|
972 |
(atac 1), |
|
973 |
(Asm_simp_tac 1), |
|
974 |
(res_inst_tac[("s","Y(n)"),("t","if n<Suc(i) then Y(Suc(i)) else Y(n)")] ssubst 1), |
|
975 |
(Asm_simp_tac 1), |
|
976 |
(hyp_subst_tac 1), |
|
977 |
(dtac spec 1), |
|
978 |
(rtac mp 1), |
|
979 |
(atac 1), |
|
980 |
(Asm_simp_tac 1), |
|
981 |
(res_inst_tac [("s","Y(n)"),("t","if n < Suc(i) then Y(Suc(i)) else Y(n)")] ssubst 1), |
|
982 |
(res_inst_tac [("s","False"),("t","n < Suc(i)")] ssubst 1), |
|
983 |
(rtac iffI 1), |
|
984 |
(etac FalseE 2), |
|
985 |
(rtac notE 1), |
|
986 |
(etac less_not_sym 1), |
|
987 |
(atac 1), |
|
988 |
(Asm_simp_tac 1), |
|
989 |
(dtac spec 1), |
|
990 |
(rtac mp 1), |
|
991 |
(atac 1), |
|
992 |
(etac Suc_lessD 1) |
|
993 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
994 |
|
892 | 995 |
qed_goal "adm_disj_lemma5" Fix.thy |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
996 |
"[| is_chain(Y::nat=>'a); ! j. i < j --> Q(Y(j)) |] ==>\ |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
997 |
\ lub(range(Y)) = lub(range(%m. if m< Suc(i) then Y(Suc(i)) else Y m))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
998 |
(fn prems => |
1461 | 999 |
[ |
1000 |
(cut_facts_tac prems 1), |
|
1001 |
(rtac lub_equal2 1), |
|
1002 |
(atac 2), |
|
1003 |
(rtac adm_disj_lemma3 2), |
|
1004 |
(atac 2), |
|
1005 |
(atac 2), |
|
1006 |
(res_inst_tac [("x","i")] exI 1), |
|
1007 |
(strip_tac 1), |
|
1008 |
(res_inst_tac [("s","False"),("t","ia < Suc(i)")] ssubst 1), |
|
1009 |
(rtac iffI 1), |
|
1010 |
(etac FalseE 2), |
|
1011 |
(rtac notE 1), |
|
1012 |
(rtac (not_less_eq RS iffD2) 1), |
|
1013 |
(atac 1), |
|
1014 |
(atac 1), |
|
1015 |
(rtac (if_False RS ssubst) 1), |
|
1016 |
(rtac refl 1) |
|
1017 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1018 |
|
892 | 1019 |
qed_goal "adm_disj_lemma6" Fix.thy |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1020 |
"[| is_chain(Y::nat=>'a); ? i. ! j. i < j --> Q(Y(j)) |] ==>\ |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1021 |
\ ? X. is_chain(X) & (! n. Q(X(n))) & lub(range(Y)) = lub(range(X))" |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1022 |
(fn prems => |
1461 | 1023 |
[ |
1024 |
(cut_facts_tac prems 1), |
|
1025 |
(etac exE 1), |
|
1026 |
(res_inst_tac [("x","%m.if m<Suc(i) then Y(Suc(i)) else Y m")] exI 1), |
|
1027 |
(rtac conjI 1), |
|
1028 |
(rtac adm_disj_lemma3 1), |
|
1029 |
(atac 1), |
|
1030 |
(atac 1), |
|
1031 |
(rtac conjI 1), |
|
1032 |
(rtac adm_disj_lemma4 1), |
|
1033 |
(atac 1), |
|
1034 |
(rtac adm_disj_lemma5 1), |
|
1035 |
(atac 1), |
|
1036 |
(atac 1) |
|
1037 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1038 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1039 |
|
892 | 1040 |
qed_goal "adm_disj_lemma7" Fix.thy |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1041 |
"[| is_chain(Y::nat=>'a); ! i. ? j. i < j & P(Y(j)) |] ==>\ |
1675 | 1042 |
\ is_chain(%m. Y(Least(%j. m<j & P(Y(j)))))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1043 |
(fn prems => |
1461 | 1044 |
[ |
1045 |
(cut_facts_tac prems 1), |
|
1046 |
(rtac is_chainI 1), |
|
1047 |
(rtac allI 1), |
|
1048 |
(rtac chain_mono3 1), |
|
1049 |
(atac 1), |
|
1675 | 1050 |
(rtac Least_le 1), |
1461 | 1051 |
(rtac conjI 1), |
1052 |
(rtac Suc_lessD 1), |
|
1053 |
(etac allE 1), |
|
1054 |
(etac exE 1), |
|
1675 | 1055 |
(rtac (LeastI RS conjunct1) 1), |
1461 | 1056 |
(atac 1), |
1057 |
(etac allE 1), |
|
1058 |
(etac exE 1), |
|
1675 | 1059 |
(rtac (LeastI RS conjunct2) 1), |
1461 | 1060 |
(atac 1) |
1061 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1062 |
|
892 | 1063 |
qed_goal "adm_disj_lemma8" Fix.thy |
1675 | 1064 |
"[| ! i. ? j. i < j & P(Y(j)) |] ==> ! m. P(Y(Least(%j. m<j & P(Y(j)))))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1065 |
(fn prems => |
1461 | 1066 |
[ |
1067 |
(cut_facts_tac prems 1), |
|
1068 |
(strip_tac 1), |
|
1069 |
(etac allE 1), |
|
1070 |
(etac exE 1), |
|
1675 | 1071 |
(etac (LeastI RS conjunct2) 1) |
1461 | 1072 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1073 |
|
892 | 1074 |
qed_goal "adm_disj_lemma9" Fix.thy |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1075 |
"[| is_chain(Y::nat=>'a); ! i. ? j. i < j & P(Y(j)) |] ==>\ |
1675 | 1076 |
\ lub(range(Y)) = lub(range(%m. Y(Least(%j. m<j & P(Y(j))))))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1077 |
(fn prems => |
1461 | 1078 |
[ |
1079 |
(cut_facts_tac prems 1), |
|
1080 |
(rtac antisym_less 1), |
|
1081 |
(rtac lub_mono 1), |
|
1082 |
(atac 1), |
|
1083 |
(rtac adm_disj_lemma7 1), |
|
1084 |
(atac 1), |
|
1085 |
(atac 1), |
|
1086 |
(strip_tac 1), |
|
1087 |
(rtac (chain_mono RS mp) 1), |
|
1088 |
(atac 1), |
|
1089 |
(etac allE 1), |
|
1090 |
(etac exE 1), |
|
1675 | 1091 |
(rtac (LeastI RS conjunct1) 1), |
1461 | 1092 |
(atac 1), |
1093 |
(rtac lub_mono3 1), |
|
1094 |
(rtac adm_disj_lemma7 1), |
|
1095 |
(atac 1), |
|
1096 |
(atac 1), |
|
1097 |
(atac 1), |
|
1098 |
(strip_tac 1), |
|
1099 |
(rtac exI 1), |
|
1100 |
(rtac (chain_mono RS mp) 1), |
|
1101 |
(atac 1), |
|
1102 |
(rtac lessI 1) |
|
1103 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1104 |
|
892 | 1105 |
qed_goal "adm_disj_lemma10" Fix.thy |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1106 |
"[| is_chain(Y::nat=>'a); ! i. ? j. i < j & P(Y(j)) |] ==>\ |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1107 |
\ ? X. is_chain(X) & (! n. P(X(n))) & lub(range(Y)) = lub(range(X))" |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1108 |
(fn prems => |
1461 | 1109 |
[ |
1110 |
(cut_facts_tac prems 1), |
|
1675 | 1111 |
(res_inst_tac [("x","%m. Y(Least(%j. m<j & P(Y(j))))")] exI 1), |
1461 | 1112 |
(rtac conjI 1), |
1113 |
(rtac adm_disj_lemma7 1), |
|
1114 |
(atac 1), |
|
1115 |
(atac 1), |
|
1116 |
(rtac conjI 1), |
|
1117 |
(rtac adm_disj_lemma8 1), |
|
1118 |
(atac 1), |
|
1119 |
(rtac adm_disj_lemma9 1), |
|
1120 |
(atac 1), |
|
1121 |
(atac 1) |
|
1122 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1123 |
|
430 | 1124 |
|
892 | 1125 |
qed_goal "adm_disj_lemma11" Fix.thy |
430 | 1126 |
"[| adm(P); is_chain(Y); ! i. ? j. i < j & P(Y(j)) |]==>P(lub(range(Y)))" |
1127 |
(fn prems => |
|
1461 | 1128 |
[ |
1129 |
(cut_facts_tac prems 1), |
|
1130 |
(etac adm_disj_lemma2 1), |
|
1131 |
(etac adm_disj_lemma10 1), |
|
1132 |
(atac 1) |
|
1133 |
]); |
|
430 | 1134 |
|
892 | 1135 |
qed_goal "adm_disj_lemma12" Fix.thy |
430 | 1136 |
"[| adm(P); is_chain(Y);? i. ! j. i < j --> P(Y(j))|]==>P(lub(range(Y)))" |
1137 |
(fn prems => |
|
1461 | 1138 |
[ |
1139 |
(cut_facts_tac prems 1), |
|
1140 |
(etac adm_disj_lemma2 1), |
|
1141 |
(etac adm_disj_lemma6 1), |
|
1142 |
(atac 1) |
|
1143 |
]); |
|
430 | 1144 |
|
892 | 1145 |
qed_goal "adm_disj" Fix.thy |
1461 | 1146 |
"[| adm P; adm Q |] ==> adm(%x.P x | Q x)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1147 |
(fn prems => |
1461 | 1148 |
[ |
1149 |
(cut_facts_tac prems 1), |
|
1150 |
(rtac (adm_def2 RS iffD2) 1), |
|
1151 |
(strip_tac 1), |
|
1152 |
(rtac (adm_disj_lemma1 RS disjE) 1), |
|
1153 |
(atac 1), |
|
1154 |
(atac 1), |
|
1155 |
(rtac disjI2 1), |
|
1156 |
(etac adm_disj_lemma12 1), |
|
1157 |
(atac 1), |
|
1158 |
(atac 1), |
|
1159 |
(rtac disjI1 1), |
|
1160 |
(etac adm_disj_lemma11 1), |
|
1161 |
(atac 1), |
|
1162 |
(atac 1) |
|
1163 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1164 |
|
430 | 1165 |
|
892 | 1166 |
qed_goal "adm_impl" Fix.thy |
1461 | 1167 |
"[| adm(%x.~(P x)); adm Q |] ==> adm(%x.P x --> Q x)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1168 |
(fn prems => |
1461 | 1169 |
[ |
1170 |
(cut_facts_tac prems 1), |
|
1171 |
(res_inst_tac [("P2","%x.~(P x)|Q x")] (adm_cong RS iffD1) 1), |
|
1172 |
(fast_tac HOL_cs 1), |
|
1173 |
(rtac adm_disj 1), |
|
1174 |
(atac 1), |
|
1175 |
(atac 1) |
|
1176 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1177 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1178 |
|
1675 | 1179 |
qed_goal "adm_not_conj" Fix.thy |
1681 | 1180 |
"[| adm (%x. ~ P x); adm (%x. ~ Q x) |] ==> adm (%x. ~ (P x & Q x))"(fn prems=>[ |
1675 | 1181 |
cut_facts_tac prems 1, |
1182 |
subgoal_tac |
|
1681 | 1183 |
"(%x. ~ (P x & Q x)) = (%x. ~ P x | ~ Q x)" 1, |
1675 | 1184 |
rtac ext 2, |
1185 |
fast_tac HOL_cs 2, |
|
1186 |
etac ssubst 1, |
|
1187 |
etac adm_disj 1, |
|
1188 |
atac 1]); |
|
1189 |
||
1190 |
qed_goalw "admI" Fix.thy [adm_def] |
|
1681 | 1191 |
"(!!Y. [| is_chain Y; !i. P (Y i); !i. ? j. i < j & Y i ~= Y j & Y i << Y j |]\ |
1192 |
\ ==> P(lub (range Y))) ==> adm P" |
|
1675 | 1193 |
(fn prems => [ |
1194 |
strip_tac 1, |
|
1195 |
case_tac "finite_chain Y" 1, |
|
1196 |
rewtac finite_chain_def, |
|
1197 |
safe_tac HOL_cs, |
|
1198 |
dtac lub_finch1 1, |
|
1199 |
atac 1, |
|
1200 |
dtac thelubI 1, |
|
1201 |
etac ssubst 1, |
|
1202 |
etac spec 1, |
|
1203 |
etac swap 1, |
|
1204 |
rewtac max_in_chain_def, |
|
1205 |
resolve_tac prems 1, atac 1, atac 1, |
|
1206 |
fast_tac (HOL_cs addDs [le_imp_less_or_eq] |
|
1207 |
addEs [chain_mono RS mp]) 1]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1208 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1209 |
val adm_thms = [adm_impl,adm_disj,adm_eq,adm_not_UU,adm_UU_not_less, |
1675 | 1210 |
adm_all2,adm_not_less,adm_not_free,adm_not_conj,adm_conj,adm_less |
1461 | 1211 |
]; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
1212 |