author | berghofe |
Fri, 10 Dec 2004 16:48:01 +0100 | |
changeset 15394 | a2c34e6ca4f8 |
parent 14981 | e73f8140af78 |
child 15568 | 41bfe19eabe2 |
permissions | -rw-r--r-- |
2640 | 1 |
(* Title: HOLCF/Ssum2.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 |
|
9169 | 5 |
Class Instance ++::(pcpo,pcpo)po |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
6 |
*) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
7 |
|
2640 | 8 |
(* for compatibility with old HOLCF-Version *) |
9169 | 9 |
Goal "(op <<)=(%s1 s2.@z.\ |
3842 | 10 |
\ (! u x. s1=Isinl u & s2=Isinl x --> z = u << x)\ |
11 |
\ &(! v y. s1=Isinr v & s2=Isinr y --> z = v << y)\ |
|
12 |
\ &(! u y. s1=Isinl u & s2=Isinr y --> z = (u = UU))\ |
|
9169 | 13 |
\ &(! v x. s1=Isinr v & s2=Isinl x --> z = (v = UU)))"; |
14 |
by (fold_goals_tac [less_ssum_def]); |
|
15 |
by (rtac refl 1); |
|
16 |
qed "inst_ssum_po"; |
|
2640 | 17 |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
18 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
19 |
(* access to less_ssum in class po *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
20 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
21 |
|
9169 | 22 |
Goal "Isinl x << Isinl y = x << y"; |
23 |
by (simp_tac (simpset() addsimps [less_ssum2a]) 1); |
|
24 |
qed "less_ssum3a"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
25 |
|
9169 | 26 |
Goal "Isinr x << Isinr y = x << y"; |
27 |
by (simp_tac (simpset() addsimps [less_ssum2b]) 1); |
|
28 |
qed "less_ssum3b"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
29 |
|
9169 | 30 |
Goal "Isinl x << Isinr y = (x = UU)"; |
31 |
by (simp_tac (simpset() addsimps [less_ssum2c]) 1); |
|
32 |
qed "less_ssum3c"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
33 |
|
9169 | 34 |
Goal "Isinr x << Isinl y = (x = UU)"; |
35 |
by (simp_tac (simpset() addsimps [less_ssum2d]) 1); |
|
36 |
qed "less_ssum3d"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
37 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
38 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
39 |
(* type ssum ++ is pointed *) |
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 |
|
9169 | 42 |
Goal "Isinl UU << s"; |
43 |
by (res_inst_tac [("p","s")] IssumE2 1); |
|
44 |
by (hyp_subst_tac 1); |
|
45 |
by (rtac (less_ssum3a RS iffD2) 1); |
|
46 |
by (rtac minimal 1); |
|
47 |
by (hyp_subst_tac 1); |
|
48 |
by (stac strict_IsinlIsinr 1); |
|
49 |
by (rtac (less_ssum3b RS iffD2) 1); |
|
50 |
by (rtac minimal 1); |
|
51 |
qed "minimal_ssum"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
52 |
|
2640 | 53 |
bind_thm ("UU_ssum_def",minimal_ssum RS minimal2UU RS sym); |
54 |
||
9169 | 55 |
Goal "? x::'a++'b.!y. x<<y"; |
56 |
by (res_inst_tac [("x","Isinl UU")] exI 1); |
|
57 |
by (rtac (minimal_ssum RS allI) 1); |
|
58 |
qed "least_ssum"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
59 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
60 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
61 |
(* Isinl, Isinr are monotone *) |
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 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
64 |
Goalw [monofun] "monofun(Isinl)"; |
9245 | 65 |
by (strip_tac 1); |
66 |
by (etac (less_ssum3a RS iffD2) 1); |
|
67 |
qed "monofun_Isinl"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
68 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
69 |
Goalw [monofun] "monofun(Isinr)"; |
9245 | 70 |
by (strip_tac 1); |
71 |
by (etac (less_ssum3b RS iffD2) 1); |
|
72 |
qed "monofun_Isinr"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
73 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
74 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
75 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
76 |
(* Iwhen is monotone in all arguments *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
77 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
78 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
79 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
80 |
Goalw [monofun] "monofun(Iwhen)"; |
9245 | 81 |
by (strip_tac 1); |
82 |
by (rtac (less_fun RS iffD2) 1); |
|
83 |
by (strip_tac 1); |
|
84 |
by (rtac (less_fun RS iffD2) 1); |
|
85 |
by (strip_tac 1); |
|
86 |
by (res_inst_tac [("p","xb")] IssumE 1); |
|
87 |
by (hyp_subst_tac 1); |
|
88 |
by (asm_simp_tac Ssum0_ss 1); |
|
89 |
by (asm_simp_tac Ssum0_ss 1); |
|
90 |
by (etac monofun_cfun_fun 1); |
|
91 |
by (asm_simp_tac Ssum0_ss 1); |
|
92 |
qed "monofun_Iwhen1"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
93 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
94 |
Goalw [monofun] "monofun(Iwhen(f))"; |
9245 | 95 |
by (strip_tac 1); |
96 |
by (rtac (less_fun RS iffD2) 1); |
|
97 |
by (strip_tac 1); |
|
98 |
by (res_inst_tac [("p","xa")] IssumE 1); |
|
99 |
by (hyp_subst_tac 1); |
|
100 |
by (asm_simp_tac Ssum0_ss 1); |
|
101 |
by (asm_simp_tac Ssum0_ss 1); |
|
102 |
by (asm_simp_tac Ssum0_ss 1); |
|
103 |
by (etac monofun_cfun_fun 1); |
|
104 |
qed "monofun_Iwhen2"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
105 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
106 |
Goalw [monofun] "monofun(Iwhen(f)(g))"; |
9245 | 107 |
by (strip_tac 1); |
108 |
by (res_inst_tac [("p","x")] IssumE 1); |
|
109 |
by (hyp_subst_tac 1); |
|
110 |
by (asm_simp_tac Ssum0_ss 1); |
|
111 |
by (hyp_subst_tac 1); |
|
112 |
by (res_inst_tac [("p","y")] IssumE 1); |
|
113 |
by (hyp_subst_tac 1); |
|
114 |
by (asm_simp_tac Ssum0_ss 1); |
|
115 |
by (res_inst_tac [("P","xa=UU")] notE 1); |
|
116 |
by (atac 1); |
|
117 |
by (rtac UU_I 1); |
|
118 |
by (rtac (less_ssum3a RS iffD1) 1); |
|
119 |
by (atac 1); |
|
120 |
by (hyp_subst_tac 1); |
|
121 |
by (asm_simp_tac Ssum0_ss 1); |
|
122 |
by (rtac monofun_cfun_arg 1); |
|
123 |
by (etac (less_ssum3a RS iffD1) 1); |
|
124 |
by (hyp_subst_tac 1); |
|
125 |
by (res_inst_tac [("s","UU"),("t","xa")] subst 1); |
|
126 |
by (etac (less_ssum3c RS iffD1 RS sym) 1); |
|
127 |
by (asm_simp_tac Ssum0_ss 1); |
|
128 |
by (hyp_subst_tac 1); |
|
129 |
by (res_inst_tac [("p","y")] IssumE 1); |
|
130 |
by (hyp_subst_tac 1); |
|
131 |
by (res_inst_tac [("s","UU"),("t","ya")] subst 1); |
|
132 |
by (etac (less_ssum3d RS iffD1 RS sym) 1); |
|
133 |
by (asm_simp_tac Ssum0_ss 1); |
|
134 |
by (hyp_subst_tac 1); |
|
135 |
by (res_inst_tac [("s","UU"),("t","ya")] subst 1); |
|
136 |
by (etac (less_ssum3d RS iffD1 RS sym) 1); |
|
137 |
by (asm_simp_tac Ssum0_ss 1); |
|
138 |
by (hyp_subst_tac 1); |
|
139 |
by (asm_simp_tac Ssum0_ss 1); |
|
140 |
by (rtac monofun_cfun_arg 1); |
|
141 |
by (etac (less_ssum3b RS iffD1) 1); |
|
142 |
qed "monofun_Iwhen3"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
143 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
144 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
145 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
146 |
(* some kind of exhaustion rules for chains in 'a ++ 'b *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
147 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
148 |
|
9169 | 149 |
Goal "[|~(!i.? x. Y(i::nat)=Isinl(x))|] ==> (? i.! x. Y(i)~=Isinl(x))"; |
150 |
by (fast_tac HOL_cs 1); |
|
151 |
qed "ssum_lemma1"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
152 |
|
9169 | 153 |
Goal "[|(? i.!x.(Y::nat => 'a++'b)(i::nat)~=Isinl(x::'a))|] \ |
154 |
\ ==> (? i y. (Y::nat => 'a++'b)(i::nat)=Isinr(y::'b) & y~=UU)"; |
|
155 |
by (etac exE 1); |
|
156 |
by (res_inst_tac [("p","Y(i)")] IssumE 1); |
|
157 |
by (dtac spec 1); |
|
158 |
by (contr_tac 1); |
|
159 |
by (dtac spec 1); |
|
160 |
by (contr_tac 1); |
|
161 |
by (fast_tac HOL_cs 1); |
|
162 |
qed "ssum_lemma2"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
163 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
164 |
|
9169 | 165 |
Goal "[|chain(Y);(? i x. Y(i)=Isinr(x::'b) & (x::'b)~=UU)|] \ |
166 |
\ ==> (!i.? y. Y(i)=Isinr(y))"; |
|
167 |
by (etac exE 1); |
|
168 |
by (etac exE 1); |
|
169 |
by (rtac allI 1); |
|
170 |
by (res_inst_tac [("p","Y(ia)")] IssumE 1); |
|
171 |
by (rtac exI 1); |
|
172 |
by (rtac trans 1); |
|
173 |
by (rtac strict_IsinlIsinr 2); |
|
174 |
by (atac 1); |
|
175 |
by (etac exI 2); |
|
176 |
by (etac conjE 1); |
|
177 |
by (res_inst_tac [("m","i"),("n","ia")] nat_less_cases 1); |
|
178 |
by (hyp_subst_tac 2); |
|
179 |
by (etac exI 2); |
|
180 |
by (eres_inst_tac [("P","x=UU")] notE 1); |
|
181 |
by (rtac (less_ssum3d RS iffD1) 1); |
|
182 |
by (eres_inst_tac [("s","Y(i)"),("t","Isinr(x)::'a++'b")] subst 1); |
|
183 |
by (eres_inst_tac [("s","Y(ia)"),("t","Isinl(xa)::'a++'b")] subst 1); |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
184 |
by (etac (chain_mono) 1); |
9169 | 185 |
by (atac 1); |
186 |
by (eres_inst_tac [("P","xa=UU")] notE 1); |
|
187 |
by (rtac (less_ssum3c RS iffD1) 1); |
|
188 |
by (eres_inst_tac [("s","Y(i)"),("t","Isinr(x)::'a++'b")] subst 1); |
|
189 |
by (eres_inst_tac [("s","Y(ia)"),("t","Isinl(xa)::'a++'b")] subst 1); |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
190 |
by (etac (chain_mono) 1); |
9169 | 191 |
by (atac 1); |
192 |
qed "ssum_lemma3"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
193 |
|
9169 | 194 |
Goal "chain(Y) ==> (!i.? x. Y(i)=Isinl(x))|(!i.? y. Y(i)=Isinr(y))"; |
195 |
by (rtac case_split_thm 1); |
|
196 |
by (etac disjI1 1); |
|
197 |
by (rtac disjI2 1); |
|
198 |
by (etac ssum_lemma3 1); |
|
199 |
by (rtac ssum_lemma2 1); |
|
200 |
by (etac ssum_lemma1 1); |
|
201 |
qed "ssum_lemma4"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
202 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
203 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
204 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
205 |
(* restricted surjectivity of Isinl *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
206 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
207 |
|
9169 | 208 |
Goal "z=Isinl(x)==> Isinl((Iwhen (LAM x. x) (LAM y. UU))(z)) = z"; |
209 |
by (hyp_subst_tac 1); |
|
210 |
by (case_tac "x=UU" 1); |
|
211 |
by (asm_simp_tac Ssum0_ss 1); |
|
212 |
by (asm_simp_tac Ssum0_ss 1); |
|
213 |
qed "ssum_lemma5"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
214 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
215 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
216 |
(* restricted surjectivity of Isinr *) |
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 |
|
9169 | 219 |
Goal "z=Isinr(x)==> Isinr((Iwhen (LAM y. UU) (LAM x. x))(z)) = z"; |
220 |
by (hyp_subst_tac 1); |
|
221 |
by (case_tac "x=UU" 1); |
|
222 |
by (asm_simp_tac Ssum0_ss 1); |
|
223 |
by (asm_simp_tac Ssum0_ss 1); |
|
224 |
qed "ssum_lemma6"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
225 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
226 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
227 |
(* technical lemmas *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
228 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
229 |
|
9169 | 230 |
Goal "[|Isinl(x) << z; x~=UU|] ==> ? y. z=Isinl(y) & y~=UU"; |
231 |
by (res_inst_tac [("p","z")] IssumE 1); |
|
232 |
by (hyp_subst_tac 1); |
|
233 |
by (etac notE 1); |
|
234 |
by (rtac antisym_less 1); |
|
235 |
by (etac (less_ssum3a RS iffD1) 1); |
|
236 |
by (rtac minimal 1); |
|
237 |
by (fast_tac HOL_cs 1); |
|
238 |
by (hyp_subst_tac 1); |
|
239 |
by (rtac notE 1); |
|
240 |
by (etac (less_ssum3c RS iffD1) 2); |
|
241 |
by (atac 1); |
|
242 |
qed "ssum_lemma7"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
243 |
|
9169 | 244 |
Goal "[|Isinr(x) << z; x~=UU|] ==> ? y. z=Isinr(y) & y~=UU"; |
245 |
by (res_inst_tac [("p","z")] IssumE 1); |
|
246 |
by (hyp_subst_tac 1); |
|
247 |
by (etac notE 1); |
|
248 |
by (etac (less_ssum3d RS iffD1) 1); |
|
249 |
by (hyp_subst_tac 1); |
|
250 |
by (rtac notE 1); |
|
251 |
by (etac (less_ssum3d RS iffD1) 2); |
|
252 |
by (atac 1); |
|
253 |
by (fast_tac HOL_cs 1); |
|
254 |
qed "ssum_lemma8"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
255 |
|
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 |
(* the type 'a ++ 'b is a cpo in three steps *) |
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 |
|
9169 | 260 |
Goal "[|chain(Y);(!i.? x. Y(i)=Isinl(x))|] ==>\ |
261 |
\ range(Y) <<| Isinl(lub(range(%i.(Iwhen (LAM x. x) (LAM y. UU))(Y i))))"; |
|
262 |
by (rtac is_lubI 1); |
|
263 |
by (rtac ub_rangeI 1); |
|
264 |
by (etac allE 1); |
|
265 |
by (etac exE 1); |
|
266 |
by (res_inst_tac [("t","Y(i)")] (ssum_lemma5 RS subst) 1); |
|
267 |
by (atac 1); |
|
268 |
by (rtac (monofun_Isinl RS monofunE RS spec RS spec RS mp) 1); |
|
269 |
by (rtac is_ub_thelub 1); |
|
270 |
by (etac (monofun_Iwhen3 RS ch2ch_monofun) 1); |
|
271 |
by (strip_tac 1); |
|
272 |
by (res_inst_tac [("p","u")] IssumE2 1); |
|
273 |
by (res_inst_tac [("t","u")] (ssum_lemma5 RS subst) 1); |
|
274 |
by (atac 1); |
|
275 |
by (rtac (monofun_Isinl RS monofunE RS spec RS spec RS mp) 1); |
|
276 |
by (rtac is_lub_thelub 1); |
|
277 |
by (etac (monofun_Iwhen3 RS ch2ch_monofun) 1); |
|
278 |
by (etac (monofun_Iwhen3 RS ub2ub_monofun) 1); |
|
279 |
by (hyp_subst_tac 1); |
|
280 |
by (rtac (less_ssum3c RS iffD2) 1); |
|
281 |
by (rtac chain_UU_I_inverse 1); |
|
282 |
by (rtac allI 1); |
|
283 |
by (res_inst_tac [("p","Y(i)")] IssumE 1); |
|
284 |
by (asm_simp_tac Ssum0_ss 1); |
|
285 |
by (asm_simp_tac Ssum0_ss 2); |
|
286 |
by (etac notE 1); |
|
287 |
by (rtac (less_ssum3c RS iffD1) 1); |
|
288 |
by (res_inst_tac [("t","Isinl(x)")] subst 1); |
|
289 |
by (atac 1); |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
290 |
by (etac (ub_rangeD) 1); |
9169 | 291 |
qed "lub_ssum1a"; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
292 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
293 |
|
9169 | 294 |
Goal "[|chain(Y);(!i.? x. Y(i)=Isinr(x))|] ==>\ |
295 |
\ range(Y) <<| Isinr(lub(range(%i.(Iwhen (LAM y. UU) (LAM x. x))(Y i))))"; |
|
296 |
by (rtac is_lubI 1); |
|
297 |
by (rtac ub_rangeI 1); |
|
298 |
by (etac allE 1); |
|
299 |
by (etac exE 1); |
|
300 |
by (res_inst_tac [("t","Y(i)")] (ssum_lemma6 RS subst) 1); |
|
301 |
by (atac 1); |
|
302 |
by (rtac (monofun_Isinr RS monofunE RS spec RS spec RS mp) 1); |
|
303 |
by (rtac is_ub_thelub 1); |
|
304 |
by (etac (monofun_Iwhen3 RS ch2ch_monofun) 1); |
|
305 |
by (strip_tac 1); |
|
306 |
by (res_inst_tac [("p","u")] IssumE2 1); |
|
307 |
by (hyp_subst_tac 1); |
|
308 |
by (rtac (less_ssum3d RS iffD2) 1); |
|
309 |
by (rtac chain_UU_I_inverse 1); |
|
310 |
by (rtac allI 1); |
|
311 |
by (res_inst_tac [("p","Y(i)")] IssumE 1); |
|
312 |
by (asm_simp_tac Ssum0_ss 1); |
|
313 |
by (asm_simp_tac Ssum0_ss 1); |
|
314 |
by (etac notE 1); |
|
315 |
by (rtac (less_ssum3d RS iffD1) 1); |
|
316 |
by (res_inst_tac [("t","Isinr(y)")] subst 1); |
|
317 |
by (atac 1); |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
318 |
by (etac (ub_rangeD) 1); |
9169 | 319 |
by (res_inst_tac [("t","u")] (ssum_lemma6 RS subst) 1); |
320 |
by (atac 1); |
|
321 |
by (rtac (monofun_Isinr RS monofunE RS spec RS spec RS mp) 1); |
|
322 |
by (rtac is_lub_thelub 1); |
|
323 |
by (etac (monofun_Iwhen3 RS ch2ch_monofun) 1); |
|
324 |
by (etac (monofun_Iwhen3 RS ub2ub_monofun) 1); |
|
325 |
qed "lub_ssum1b"; |
|
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 |
|
1779 | 328 |
bind_thm ("thelub_ssum1a", lub_ssum1a RS thelubI); |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
329 |
(* |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
330 |
[| chain ?Y1; ! i. ? x. ?Y1 i = Isinl x |] ==> |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
331 |
lub (range ?Y1) = Isinl |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
332 |
(lub (range (%i. Iwhen (LAM x. x) (LAM y. UU) (?Y1 i)))) |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
333 |
*) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
334 |
|
1779 | 335 |
bind_thm ("thelub_ssum1b", lub_ssum1b RS thelubI); |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
336 |
(* |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
337 |
[| chain ?Y1; ! i. ? x. ?Y1 i = Isinr x |] ==> |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
338 |
lub (range ?Y1) = Isinr |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
339 |
(lub (range (%i. Iwhen (LAM y. UU) (LAM x. x) (?Y1 i)))) |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
340 |
*) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
341 |
|
9169 | 342 |
Goal "chain(Y::nat=>'a ++'b) ==> ? x. range(Y) <<|x"; |
343 |
by (rtac (ssum_lemma4 RS disjE) 1); |
|
344 |
by (atac 1); |
|
345 |
by (rtac exI 1); |
|
346 |
by (etac lub_ssum1a 1); |
|
347 |
by (atac 1); |
|
348 |
by (rtac exI 1); |
|
349 |
by (etac lub_ssum1b 1); |
|
350 |
by (atac 1); |
|
351 |
qed "cpo_ssum"; |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
352 |