author | wenzelm |
Mon, 22 Jun 1998 17:13:09 +0200 | |
changeset 5068 | fb28eaa07e01 |
parent 4721 | c8a8482a8124 |
child 5192 | 704dd3a6d47d |
permissions | -rw-r--r-- |
2640 | 1 |
(* Title: HOLCF/Porder.thy |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
2 |
ID: $Id$ |
1461 | 3 |
Author: Franz Regensburger |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
4 |
Copyright 1993 Technische Universitaet Muenchen |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
5 |
|
2640 | 6 |
Lemmas for theory Porder.thy |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
7 |
*) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
8 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
9 |
open Porder; |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
10 |
|
625 | 11 |
(* ------------------------------------------------------------------------ *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
12 |
(* lubs are unique *) |
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 |
|
4031 | 15 |
qed_goalw "unique_lub" thy [is_lub, is_ub] |
1461 | 16 |
"[| S <<| x ; S <<| y |] ==> x=y" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
17 |
( fn prems => |
1461 | 18 |
[ |
19 |
(cut_facts_tac prems 1), |
|
20 |
(etac conjE 1), |
|
21 |
(etac conjE 1), |
|
22 |
(rtac antisym_less 1), |
|
23 |
(rtac mp 1),((etac allE 1) THEN (atac 1) THEN (atac 1)), |
|
24 |
(rtac mp 1),((etac allE 1) THEN (atac 1) THEN (atac 1)) |
|
25 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
26 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
27 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
28 |
(* chains are monotone functions *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
29 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
30 |
|
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
31 |
qed_goalw "chain_mono" thy [chain] "chain F ==> x<y --> F x<<F y" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
32 |
( fn prems => |
1461 | 33 |
[ |
34 |
(cut_facts_tac prems 1), |
|
35 |
(nat_ind_tac "y" 1), |
|
36 |
(rtac impI 1), |
|
37 |
(etac less_zeroE 1), |
|
2033 | 38 |
(stac less_Suc_eq 1), |
1461 | 39 |
(strip_tac 1), |
40 |
(etac disjE 1), |
|
41 |
(rtac trans_less 1), |
|
42 |
(etac allE 2), |
|
43 |
(atac 2), |
|
44 |
(fast_tac HOL_cs 1), |
|
45 |
(hyp_subst_tac 1), |
|
46 |
(etac allE 1), |
|
47 |
(atac 1) |
|
48 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
49 |
|
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
50 |
qed_goal "chain_mono3" thy "[| chain F; x <= y |] ==> F x << F y" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
51 |
(fn prems => |
1461 | 52 |
[ |
53 |
(cut_facts_tac prems 1), |
|
54 |
(rtac (le_imp_less_or_eq RS disjE) 1), |
|
55 |
(atac 1), |
|
56 |
(etac (chain_mono RS mp) 1), |
|
57 |
(atac 1), |
|
58 |
(hyp_subst_tac 1), |
|
59 |
(rtac refl_less 1) |
|
60 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
61 |
|
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 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
64 |
(* The range of a chain is a totaly ordered << *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
65 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
66 |
|
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
67 |
qed_goalw "chain_tord" thy [tord] |
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
68 |
"!!F. chain(F) ==> tord(range(F))" |
1886 | 69 |
(fn _ => |
1461 | 70 |
[ |
3724 | 71 |
Safe_tac, |
1461 | 72 |
(rtac nat_less_cases 1), |
4098 | 73 |
(ALLGOALS (fast_tac (claset() addIs [refl_less, chain_mono RS mp])))]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
74 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
75 |
(* ------------------------------------------------------------------------ *) |
625 | 76 |
(* technical lemmas about lub and is_lub *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
77 |
(* ------------------------------------------------------------------------ *) |
2640 | 78 |
bind_thm("lub",lub_def RS meta_eq_to_obj_eq); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
79 |
|
2640 | 80 |
qed_goal "lubI" thy "? x. M <<| x ==> M <<| lub(M)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
81 |
(fn prems => |
1461 | 82 |
[ |
83 |
(cut_facts_tac prems 1), |
|
2033 | 84 |
(stac lub 1), |
1675 | 85 |
(etac (select_eq_Ex RS iffD2) 1) |
1461 | 86 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
87 |
|
2640 | 88 |
qed_goal "lubE" thy "M <<| lub(M) ==> ? x. M <<| x" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
89 |
(fn prems => |
1461 | 90 |
[ |
91 |
(cut_facts_tac prems 1), |
|
92 |
(etac exI 1) |
|
93 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
94 |
|
2640 | 95 |
qed_goal "lub_eq" thy "(? x. M <<| x) = M <<| lub(M)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
96 |
(fn prems => |
1461 | 97 |
[ |
2033 | 98 |
(stac lub 1), |
1461 | 99 |
(rtac (select_eq_Ex RS subst) 1), |
100 |
(rtac refl 1) |
|
101 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
102 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
103 |
|
2640 | 104 |
qed_goal "thelubI" thy "M <<| l ==> lub(M) = l" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
105 |
(fn prems => |
1461 | 106 |
[ |
107 |
(cut_facts_tac prems 1), |
|
108 |
(rtac unique_lub 1), |
|
2033 | 109 |
(stac lub 1), |
1461 | 110 |
(etac selectI 1), |
111 |
(atac 1) |
|
112 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
113 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
114 |
|
5068 | 115 |
Goal "lub{x} = x"; |
3018 | 116 |
by (rtac thelubI 1); |
4098 | 117 |
by (simp_tac (simpset() addsimps [is_lub,is_ub]) 1); |
2841
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2640
diff
changeset
|
118 |
qed "lub_singleton"; |
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2640
diff
changeset
|
119 |
Addsimps [lub_singleton]; |
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2640
diff
changeset
|
120 |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
121 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
122 |
(* access to some definition as inference rule *) |
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 |
|
2640 | 125 |
qed_goalw "is_lubE" thy [is_lub] |
1461 | 126 |
"S <<| x ==> S <| x & (! u. S <| u --> x << u)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
127 |
(fn prems => |
1461 | 128 |
[ |
129 |
(cut_facts_tac prems 1), |
|
130 |
(atac 1) |
|
131 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
132 |
|
2640 | 133 |
qed_goalw "is_lubI" thy [is_lub] |
1461 | 134 |
"S <| x & (! u. S <| u --> x << u) ==> S <<| x" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
135 |
(fn prems => |
1461 | 136 |
[ |
137 |
(cut_facts_tac prems 1), |
|
138 |
(atac 1) |
|
139 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
140 |
|
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
141 |
qed_goalw "chainE" thy [chain] "chain F ==> !i. F(i) << F(Suc(i))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
142 |
(fn prems => |
1461 | 143 |
[ |
144 |
(cut_facts_tac prems 1), |
|
145 |
(atac 1)]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
146 |
|
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
147 |
qed_goalw "chainI" thy [chain] "!i. F i << F(Suc i) ==> chain F" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
148 |
(fn prems => |
1461 | 149 |
[ |
150 |
(cut_facts_tac prems 1), |
|
151 |
(atac 1)]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
152 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
153 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
154 |
(* technical lemmas about (least) upper bounds of chains *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
155 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
156 |
|
2640 | 157 |
qed_goalw "ub_rangeE" thy [is_ub] "range S <| x ==> !i. S(i) << x" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
158 |
(fn prems => |
1461 | 159 |
[ |
160 |
(cut_facts_tac prems 1), |
|
161 |
(strip_tac 1), |
|
162 |
(rtac mp 1), |
|
163 |
(etac spec 1), |
|
164 |
(rtac rangeI 1) |
|
165 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
166 |
|
2640 | 167 |
qed_goalw "ub_rangeI" thy [is_ub] "!i. S i << x ==> range S <| x" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
168 |
(fn prems => |
1461 | 169 |
[ |
170 |
(cut_facts_tac prems 1), |
|
171 |
(strip_tac 1), |
|
172 |
(etac rangeE 1), |
|
173 |
(hyp_subst_tac 1), |
|
174 |
(etac spec 1) |
|
175 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
176 |
|
1779 | 177 |
bind_thm ("is_ub_lub", is_lubE RS conjunct1 RS ub_rangeE RS spec); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
178 |
(* range(?S1) <<| ?x1 ==> ?S1(?x) << ?x1 *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
179 |
|
1779 | 180 |
bind_thm ("is_lub_lub", is_lubE RS conjunct2 RS spec RS mp); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
181 |
(* [| ?S3 <<| ?x3; ?S3 <| ?x1 |] ==> ?x3 << ?x1 *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
182 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
183 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
184 |
(* results about finite chains *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
185 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
186 |
|
2640 | 187 |
qed_goalw "lub_finch1" thy [max_in_chain_def] |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
188 |
"[| chain C; max_in_chain i C|] ==> range C <<| C i" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
189 |
(fn prems => |
1461 | 190 |
[ |
191 |
(cut_facts_tac prems 1), |
|
192 |
(rtac is_lubI 1), |
|
193 |
(rtac conjI 1), |
|
194 |
(rtac ub_rangeI 1), |
|
195 |
(rtac allI 1), |
|
196 |
(res_inst_tac [("m","i")] nat_less_cases 1), |
|
197 |
(rtac (antisym_less_inverse RS conjunct2) 1), |
|
198 |
(etac (disjI1 RS less_or_eq_imp_le RS rev_mp) 1), |
|
199 |
(etac spec 1), |
|
200 |
(rtac (antisym_less_inverse RS conjunct2) 1), |
|
201 |
(etac (disjI2 RS less_or_eq_imp_le RS rev_mp) 1), |
|
202 |
(etac spec 1), |
|
203 |
(etac (chain_mono RS mp) 1), |
|
204 |
(atac 1), |
|
205 |
(strip_tac 1), |
|
206 |
(etac (ub_rangeE RS spec) 1) |
|
207 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
208 |
|
2640 | 209 |
qed_goalw "lub_finch2" thy [finite_chain_def] |
1461 | 210 |
"finite_chain(C) ==> range(C) <<| C(@ i. max_in_chain i C)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
211 |
(fn prems=> |
1461 | 212 |
[ |
213 |
(cut_facts_tac prems 1), |
|
214 |
(rtac lub_finch1 1), |
|
215 |
(etac conjunct1 1), |
|
1675 | 216 |
(rtac (select_eq_Ex RS iffD2) 1), |
1461 | 217 |
(etac conjunct2 1) |
218 |
]); |
|
243
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 |
|
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
221 |
qed_goal "bin_chain" thy "x<<y ==> chain (%i. if i=0 then x else y)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
222 |
(fn prems => |
1461 | 223 |
[ |
224 |
(cut_facts_tac prems 1), |
|
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
225 |
(rtac chainI 1), |
1461 | 226 |
(rtac allI 1), |
227 |
(nat_ind_tac "i" 1), |
|
228 |
(Asm_simp_tac 1), |
|
2841
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2640
diff
changeset
|
229 |
(Asm_simp_tac 1) |
1461 | 230 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
231 |
|
2640 | 232 |
qed_goalw "bin_chainmax" thy [max_in_chain_def,le_def] |
1461 | 233 |
"x<<y ==> max_in_chain (Suc 0) (%i. if (i=0) then x else y)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
234 |
(fn prems => |
1461 | 235 |
[ |
236 |
(cut_facts_tac prems 1), |
|
237 |
(rtac allI 1), |
|
238 |
(nat_ind_tac "j" 1), |
|
239 |
(Asm_simp_tac 1), |
|
240 |
(Asm_simp_tac 1) |
|
241 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
242 |
|
2640 | 243 |
qed_goal "lub_bin_chain" thy |
1461 | 244 |
"x << y ==> range(%i. if (i=0) then x else y) <<| y" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
245 |
(fn prems=> |
1461 | 246 |
[ (cut_facts_tac prems 1), |
247 |
(res_inst_tac [("s","if (Suc 0) = 0 then x else y")] subst 1), |
|
248 |
(rtac lub_finch1 2), |
|
249 |
(etac bin_chain 2), |
|
250 |
(etac bin_chainmax 2), |
|
251 |
(Simp_tac 1) |
|
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 |
(* the maximal element in a chain is its lub *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
256 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
257 |
|
2640 | 258 |
qed_goal "lub_chain_maxelem" thy |
3842 | 259 |
"[|? i. Y i=c;!i. Y i<<c|] ==> lub(range Y) = c" |
1043 | 260 |
(fn prems => |
1461 | 261 |
[ |
262 |
(cut_facts_tac prems 1), |
|
263 |
(rtac thelubI 1), |
|
264 |
(rtac is_lubI 1), |
|
265 |
(rtac conjI 1), |
|
266 |
(etac ub_rangeI 1), |
|
267 |
(strip_tac 1), |
|
268 |
(etac exE 1), |
|
269 |
(hyp_subst_tac 1), |
|
270 |
(etac (ub_rangeE RS spec) 1) |
|
271 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
272 |
|
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 |
(* the lub of a constant chain is the constant *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
275 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
276 |
|
3842 | 277 |
qed_goal "lub_const" thy "range(%x. c) <<| c" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
278 |
(fn prems => |
1461 | 279 |
[ |
280 |
(rtac is_lubI 1), |
|
281 |
(rtac conjI 1), |
|
282 |
(rtac ub_rangeI 1), |
|
283 |
(strip_tac 1), |
|
284 |
(rtac refl_less 1), |
|
285 |
(strip_tac 1), |
|
286 |
(etac (ub_rangeE RS spec) 1) |
|
287 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
288 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
289 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
290 |