author | wenzelm |
Wed, 08 Mar 2000 17:48:31 +0100 | |
changeset 8364 | 0eb9ee70c8f8 |
parent 4721 | c8a8482a8124 |
child 9169 | 85a47aa21f74 |
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 |
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 Ssum2.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 Ssum2; |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
10 |
|
2640 | 11 |
(* for compatibility with old HOLCF-Version *) |
12 |
qed_goal "inst_ssum_po" thy "(op <<)=(%s1 s2.@z.\ |
|
3842 | 13 |
\ (! u x. s1=Isinl u & s2=Isinl x --> z = u << x)\ |
14 |
\ &(! v y. s1=Isinr v & s2=Isinr y --> z = v << y)\ |
|
15 |
\ &(! u y. s1=Isinl u & s2=Isinr y --> z = (u = UU))\ |
|
16 |
\ &(! v x. s1=Isinr v & s2=Isinl x --> z = (v = UU)))" |
|
2640 | 17 |
(fn prems => |
18 |
[ |
|
3323
194ae2e0c193
eliminated the constant less by the introduction of the axclass sq_ord
slotosch
parents:
2640
diff
changeset
|
19 |
(fold_goals_tac [less_ssum_def]), |
2640 | 20 |
(rtac refl 1) |
21 |
]); |
|
22 |
||
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
23 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
24 |
(* access to less_ssum in class po *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
25 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
26 |
|
2640 | 27 |
qed_goal "less_ssum3a" thy "Isinl x << Isinl y = x << y" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
28 |
(fn prems => |
1461 | 29 |
[ |
4098 | 30 |
(simp_tac (simpset() addsimps [less_ssum2a]) 1) |
1461 | 31 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
32 |
|
2640 | 33 |
qed_goal "less_ssum3b" thy "Isinr x << Isinr y = x << y" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
34 |
(fn prems => |
1461 | 35 |
[ |
4098 | 36 |
(simp_tac (simpset() addsimps [less_ssum2b]) 1) |
1461 | 37 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
38 |
|
2640 | 39 |
qed_goal "less_ssum3c" thy "Isinl x << Isinr y = (x = UU)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
40 |
(fn prems => |
1461 | 41 |
[ |
4098 | 42 |
(simp_tac (simpset() addsimps [less_ssum2c]) 1) |
1461 | 43 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
44 |
|
2640 | 45 |
qed_goal "less_ssum3d" thy "Isinr x << Isinl y = (x = UU)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
46 |
(fn prems => |
1461 | 47 |
[ |
4098 | 48 |
(simp_tac (simpset() addsimps [less_ssum2d]) 1) |
1461 | 49 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
50 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
51 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
52 |
(* type ssum ++ is pointed *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
53 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
54 |
|
2640 | 55 |
qed_goal "minimal_ssum" thy "Isinl UU << s" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
56 |
(fn prems => |
1461 | 57 |
[ |
58 |
(res_inst_tac [("p","s")] IssumE2 1), |
|
59 |
(hyp_subst_tac 1), |
|
60 |
(rtac (less_ssum3a RS iffD2) 1), |
|
61 |
(rtac minimal 1), |
|
62 |
(hyp_subst_tac 1), |
|
2033 | 63 |
(stac strict_IsinlIsinr 1), |
1461 | 64 |
(rtac (less_ssum3b RS iffD2) 1), |
65 |
(rtac minimal 1) |
|
66 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
67 |
|
2640 | 68 |
bind_thm ("UU_ssum_def",minimal_ssum RS minimal2UU RS sym); |
69 |
||
3842 | 70 |
qed_goal "least_ssum" thy "? x::'a++'b.!y. x<<y" |
2640 | 71 |
(fn prems => |
72 |
[ |
|
73 |
(res_inst_tac [("x","Isinl UU")] exI 1), |
|
74 |
(rtac (minimal_ssum RS allI) 1) |
|
75 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
76 |
|
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 |
(* Isinl, Isinr are monotone *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
79 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
80 |
|
2640 | 81 |
qed_goalw "monofun_Isinl" thy [monofun] "monofun(Isinl)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
82 |
(fn prems => |
1461 | 83 |
[ |
84 |
(strip_tac 1), |
|
85 |
(etac (less_ssum3a RS iffD2) 1) |
|
86 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
87 |
|
2640 | 88 |
qed_goalw "monofun_Isinr" thy [monofun] "monofun(Isinr)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
89 |
(fn prems => |
1461 | 90 |
[ |
91 |
(strip_tac 1), |
|
92 |
(etac (less_ssum3b RS iffD2) 1) |
|
93 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
94 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
95 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
96 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
97 |
(* Iwhen is monotone in all arguments *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
98 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
99 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
100 |
|
2640 | 101 |
qed_goalw "monofun_Iwhen1" thy [monofun] "monofun(Iwhen)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
102 |
(fn prems => |
1461 | 103 |
[ |
104 |
(strip_tac 1), |
|
105 |
(rtac (less_fun RS iffD2) 1), |
|
106 |
(strip_tac 1), |
|
107 |
(rtac (less_fun RS iffD2) 1), |
|
108 |
(strip_tac 1), |
|
109 |
(res_inst_tac [("p","xb")] IssumE 1), |
|
110 |
(hyp_subst_tac 1), |
|
1277
caef3601c0b2
corrected some errors that occurred after introduction of local simpsets
regensbu
parents:
1267
diff
changeset
|
111 |
(asm_simp_tac Ssum0_ss 1), |
caef3601c0b2
corrected some errors that occurred after introduction of local simpsets
regensbu
parents:
1267
diff
changeset
|
112 |
(asm_simp_tac Ssum0_ss 1), |
caef3601c0b2
corrected some errors that occurred after introduction of local simpsets
regensbu
parents:
1267
diff
changeset
|
113 |
(etac monofun_cfun_fun 1), |
caef3601c0b2
corrected some errors that occurred after introduction of local simpsets
regensbu
parents:
1267
diff
changeset
|
114 |
(asm_simp_tac Ssum0_ss 1) |
1461 | 115 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
116 |
|
2640 | 117 |
qed_goalw "monofun_Iwhen2" thy [monofun] "monofun(Iwhen(f))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
118 |
(fn prems => |
1461 | 119 |
[ |
120 |
(strip_tac 1), |
|
121 |
(rtac (less_fun RS iffD2) 1), |
|
122 |
(strip_tac 1), |
|
123 |
(res_inst_tac [("p","xa")] IssumE 1), |
|
124 |
(hyp_subst_tac 1), |
|
1277
caef3601c0b2
corrected some errors that occurred after introduction of local simpsets
regensbu
parents:
1267
diff
changeset
|
125 |
(asm_simp_tac Ssum0_ss 1), |
caef3601c0b2
corrected some errors that occurred after introduction of local simpsets
regensbu
parents:
1267
diff
changeset
|
126 |
(asm_simp_tac Ssum0_ss 1), |
caef3601c0b2
corrected some errors that occurred after introduction of local simpsets
regensbu
parents:
1267
diff
changeset
|
127 |
(asm_simp_tac Ssum0_ss 1), |
1461 | 128 |
(etac monofun_cfun_fun 1) |
129 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
130 |
|
2640 | 131 |
qed_goalw "monofun_Iwhen3" thy [monofun] "monofun(Iwhen(f)(g))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
132 |
(fn prems => |
1461 | 133 |
[ |
134 |
(strip_tac 1), |
|
135 |
(res_inst_tac [("p","x")] IssumE 1), |
|
136 |
(hyp_subst_tac 1), |
|
1277
caef3601c0b2
corrected some errors that occurred after introduction of local simpsets
regensbu
parents:
1267
diff
changeset
|
137 |
(asm_simp_tac Ssum0_ss 1), |
1461 | 138 |
(hyp_subst_tac 1), |
139 |
(res_inst_tac [("p","y")] IssumE 1), |
|
140 |
(hyp_subst_tac 1), |
|
1277
caef3601c0b2
corrected some errors that occurred after introduction of local simpsets
regensbu
parents:
1267
diff
changeset
|
141 |
(asm_simp_tac Ssum0_ss 1), |
1461 | 142 |
(res_inst_tac [("P","xa=UU")] notE 1), |
143 |
(atac 1), |
|
144 |
(rtac UU_I 1), |
|
145 |
(rtac (less_ssum3a RS iffD1) 1), |
|
146 |
(atac 1), |
|
147 |
(hyp_subst_tac 1), |
|
1277
caef3601c0b2
corrected some errors that occurred after introduction of local simpsets
regensbu
parents:
1267
diff
changeset
|
148 |
(asm_simp_tac Ssum0_ss 1), |
1461 | 149 |
(rtac monofun_cfun_arg 1), |
150 |
(etac (less_ssum3a RS iffD1) 1), |
|
151 |
(hyp_subst_tac 1), |
|
152 |
(res_inst_tac [("s","UU"),("t","xa")] subst 1), |
|
153 |
(etac (less_ssum3c RS iffD1 RS sym) 1), |
|
1277
caef3601c0b2
corrected some errors that occurred after introduction of local simpsets
regensbu
parents:
1267
diff
changeset
|
154 |
(asm_simp_tac Ssum0_ss 1), |
1461 | 155 |
(hyp_subst_tac 1), |
156 |
(res_inst_tac [("p","y")] IssumE 1), |
|
157 |
(hyp_subst_tac 1), |
|
158 |
(res_inst_tac [("s","UU"),("t","ya")] subst 1), |
|
159 |
(etac (less_ssum3d RS iffD1 RS sym) 1), |
|
1277
caef3601c0b2
corrected some errors that occurred after introduction of local simpsets
regensbu
parents:
1267
diff
changeset
|
160 |
(asm_simp_tac Ssum0_ss 1), |
1461 | 161 |
(hyp_subst_tac 1), |
162 |
(res_inst_tac [("s","UU"),("t","ya")] subst 1), |
|
163 |
(etac (less_ssum3d RS iffD1 RS sym) 1), |
|
1277
caef3601c0b2
corrected some errors that occurred after introduction of local simpsets
regensbu
parents:
1267
diff
changeset
|
164 |
(asm_simp_tac Ssum0_ss 1), |
1461 | 165 |
(hyp_subst_tac 1), |
1277
caef3601c0b2
corrected some errors that occurred after introduction of local simpsets
regensbu
parents:
1267
diff
changeset
|
166 |
(asm_simp_tac Ssum0_ss 1), |
1461 | 167 |
(rtac monofun_cfun_arg 1), |
168 |
(etac (less_ssum3b RS iffD1) 1) |
|
169 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
170 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
171 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
172 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
173 |
(* 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
|
174 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
175 |
|
2640 | 176 |
qed_goal "ssum_lemma1" thy |
3842 | 177 |
"[|~(!i.? x. Y(i::nat)=Isinl(x))|] ==> (? i.! x. Y(i)~=Isinl(x))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
178 |
(fn prems => |
1461 | 179 |
[ |
180 |
(cut_facts_tac prems 1), |
|
181 |
(fast_tac HOL_cs 1) |
|
182 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
183 |
|
2640 | 184 |
qed_goal "ssum_lemma2" thy |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
185 |
"[|(? i.!x.(Y::nat => 'a++'b)(i::nat)~=Isinl(x::'a))|] ==>\ |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
186 |
\ (? i y. (Y::nat => 'a++'b)(i::nat)=Isinr(y::'b) & y~=UU)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
187 |
(fn prems => |
1461 | 188 |
[ |
189 |
(cut_facts_tac prems 1), |
|
190 |
(etac exE 1), |
|
191 |
(res_inst_tac [("p","Y(i)")] IssumE 1), |
|
192 |
(dtac spec 1), |
|
193 |
(contr_tac 1), |
|
194 |
(dtac spec 1), |
|
195 |
(contr_tac 1), |
|
196 |
(fast_tac HOL_cs 1) |
|
197 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
198 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
199 |
|
2640 | 200 |
qed_goal "ssum_lemma3" thy |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
201 |
"[|chain(Y);(? i x. Y(i)=Isinr(x::'b) & (x::'b)~=UU)|] ==>\ |
3842 | 202 |
\ (!i.? y. Y(i)=Isinr(y))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
203 |
(fn prems => |
1461 | 204 |
[ |
205 |
(cut_facts_tac prems 1), |
|
206 |
(etac exE 1), |
|
207 |
(etac exE 1), |
|
208 |
(rtac allI 1), |
|
209 |
(res_inst_tac [("p","Y(ia)")] IssumE 1), |
|
210 |
(rtac exI 1), |
|
211 |
(rtac trans 1), |
|
212 |
(rtac strict_IsinlIsinr 2), |
|
213 |
(atac 1), |
|
214 |
(etac exI 2), |
|
215 |
(etac conjE 1), |
|
216 |
(res_inst_tac [("m","i"),("n","ia")] nat_less_cases 1), |
|
217 |
(hyp_subst_tac 2), |
|
218 |
(etac exI 2), |
|
219 |
(eres_inst_tac [("P","x=UU")] notE 1), |
|
220 |
(rtac (less_ssum3d RS iffD1) 1), |
|
221 |
(eres_inst_tac [("s","Y(i)"),("t","Isinr(x)::'a++'b")] subst 1), |
|
222 |
(eres_inst_tac [("s","Y(ia)"),("t","Isinl(xa)::'a++'b")] subst 1), |
|
223 |
(etac (chain_mono RS mp) 1), |
|
224 |
(atac 1), |
|
225 |
(eres_inst_tac [("P","xa=UU")] notE 1), |
|
226 |
(rtac (less_ssum3c RS iffD1) 1), |
|
227 |
(eres_inst_tac [("s","Y(i)"),("t","Isinr(x)::'a++'b")] subst 1), |
|
228 |
(eres_inst_tac [("s","Y(ia)"),("t","Isinl(xa)::'a++'b")] subst 1), |
|
229 |
(etac (chain_mono RS mp) 1), |
|
230 |
(atac 1) |
|
231 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
232 |
|
2640 | 233 |
qed_goal "ssum_lemma4" thy |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
234 |
"chain(Y) ==> (!i.? x. Y(i)=Isinl(x))|(!i.? y. Y(i)=Isinr(y))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
235 |
(fn prems => |
1461 | 236 |
[ |
237 |
(cut_facts_tac prems 1), |
|
1675 | 238 |
(rtac case_split_thm 1), |
1461 | 239 |
(etac disjI1 1), |
240 |
(rtac disjI2 1), |
|
241 |
(etac ssum_lemma3 1), |
|
242 |
(rtac ssum_lemma2 1), |
|
243 |
(etac ssum_lemma1 1) |
|
244 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
245 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
246 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
247 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
248 |
(* restricted surjectivity of Isinl *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
249 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
250 |
|
2640 | 251 |
qed_goal "ssum_lemma5" thy |
3842 | 252 |
"z=Isinl(x)==> Isinl((Iwhen (LAM x. x) (LAM y. UU))(z)) = z" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
253 |
(fn prems => |
1461 | 254 |
[ |
255 |
(cut_facts_tac prems 1), |
|
256 |
(hyp_subst_tac 1), |
|
1675 | 257 |
(case_tac "x=UU" 1), |
1277
caef3601c0b2
corrected some errors that occurred after introduction of local simpsets
regensbu
parents:
1267
diff
changeset
|
258 |
(asm_simp_tac Ssum0_ss 1), |
caef3601c0b2
corrected some errors that occurred after introduction of local simpsets
regensbu
parents:
1267
diff
changeset
|
259 |
(asm_simp_tac Ssum0_ss 1) |
1461 | 260 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
261 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
262 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
263 |
(* restricted surjectivity of Isinr *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
264 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
265 |
|
2640 | 266 |
qed_goal "ssum_lemma6" thy |
3842 | 267 |
"z=Isinr(x)==> Isinr((Iwhen (LAM y. UU) (LAM x. x))(z)) = z" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
268 |
(fn prems => |
1461 | 269 |
[ |
270 |
(cut_facts_tac prems 1), |
|
271 |
(hyp_subst_tac 1), |
|
1675 | 272 |
(case_tac "x=UU" 1), |
1277
caef3601c0b2
corrected some errors that occurred after introduction of local simpsets
regensbu
parents:
1267
diff
changeset
|
273 |
(asm_simp_tac Ssum0_ss 1), |
caef3601c0b2
corrected some errors that occurred after introduction of local simpsets
regensbu
parents:
1267
diff
changeset
|
274 |
(asm_simp_tac Ssum0_ss 1) |
1461 | 275 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
276 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
277 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
278 |
(* technical lemmas *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
279 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
280 |
|
2640 | 281 |
qed_goal "ssum_lemma7" thy |
3842 | 282 |
"[|Isinl(x) << z; x~=UU|] ==> ? y. z=Isinl(y) & y~=UU" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
283 |
(fn prems => |
1461 | 284 |
[ |
285 |
(cut_facts_tac prems 1), |
|
286 |
(res_inst_tac [("p","z")] IssumE 1), |
|
287 |
(hyp_subst_tac 1), |
|
288 |
(etac notE 1), |
|
289 |
(rtac antisym_less 1), |
|
290 |
(etac (less_ssum3a RS iffD1) 1), |
|
291 |
(rtac minimal 1), |
|
292 |
(fast_tac HOL_cs 1), |
|
293 |
(hyp_subst_tac 1), |
|
294 |
(rtac notE 1), |
|
295 |
(etac (less_ssum3c RS iffD1) 2), |
|
296 |
(atac 1) |
|
297 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
298 |
|
2640 | 299 |
qed_goal "ssum_lemma8" thy |
3842 | 300 |
"[|Isinr(x) << z; x~=UU|] ==> ? y. z=Isinr(y) & y~=UU" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
301 |
(fn prems => |
1461 | 302 |
[ |
303 |
(cut_facts_tac prems 1), |
|
304 |
(res_inst_tac [("p","z")] IssumE 1), |
|
305 |
(hyp_subst_tac 1), |
|
306 |
(etac notE 1), |
|
307 |
(etac (less_ssum3d RS iffD1) 1), |
|
308 |
(hyp_subst_tac 1), |
|
309 |
(rtac notE 1), |
|
310 |
(etac (less_ssum3d RS iffD1) 2), |
|
311 |
(atac 1), |
|
312 |
(fast_tac HOL_cs 1) |
|
313 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
314 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
315 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
316 |
(* 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
|
317 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
318 |
|
2640 | 319 |
qed_goal "lub_ssum1a" thy |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
320 |
"[|chain(Y);(!i.? x. Y(i)=Isinl(x))|] ==>\ |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
321 |
\ range(Y) <<|\ |
3842 | 322 |
\ Isinl(lub(range(%i.(Iwhen (LAM x. x) (LAM y. UU))(Y i))))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
323 |
(fn prems => |
1461 | 324 |
[ |
325 |
(cut_facts_tac prems 1), |
|
326 |
(rtac is_lubI 1), |
|
327 |
(rtac conjI 1), |
|
328 |
(rtac ub_rangeI 1), |
|
329 |
(rtac allI 1), |
|
330 |
(etac allE 1), |
|
331 |
(etac exE 1), |
|
332 |
(res_inst_tac [("t","Y(i)")] (ssum_lemma5 RS subst) 1), |
|
333 |
(atac 1), |
|
334 |
(rtac (monofun_Isinl RS monofunE RS spec RS spec RS mp) 1), |
|
335 |
(rtac is_ub_thelub 1), |
|
336 |
(etac (monofun_Iwhen3 RS ch2ch_monofun) 1), |
|
337 |
(strip_tac 1), |
|
338 |
(res_inst_tac [("p","u")] IssumE2 1), |
|
339 |
(res_inst_tac [("t","u")] (ssum_lemma5 RS subst) 1), |
|
340 |
(atac 1), |
|
341 |
(rtac (monofun_Isinl RS monofunE RS spec RS spec RS mp) 1), |
|
342 |
(rtac is_lub_thelub 1), |
|
343 |
(etac (monofun_Iwhen3 RS ch2ch_monofun) 1), |
|
344 |
(etac (monofun_Iwhen3 RS ub2ub_monofun) 1), |
|
345 |
(hyp_subst_tac 1), |
|
346 |
(rtac (less_ssum3c RS iffD2) 1), |
|
347 |
(rtac chain_UU_I_inverse 1), |
|
348 |
(rtac allI 1), |
|
349 |
(res_inst_tac [("p","Y(i)")] IssumE 1), |
|
350 |
(asm_simp_tac Ssum0_ss 1), |
|
351 |
(asm_simp_tac Ssum0_ss 2), |
|
352 |
(etac notE 1), |
|
353 |
(rtac (less_ssum3c RS iffD1) 1), |
|
354 |
(res_inst_tac [("t","Isinl(x)")] subst 1), |
|
355 |
(atac 1), |
|
356 |
(etac (ub_rangeE RS spec) 1) |
|
357 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
358 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
359 |
|
2640 | 360 |
qed_goal "lub_ssum1b" thy |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
361 |
"[|chain(Y);(!i.? x. Y(i)=Isinr(x))|] ==>\ |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
362 |
\ range(Y) <<|\ |
3842 | 363 |
\ Isinr(lub(range(%i.(Iwhen (LAM y. UU) (LAM x. x))(Y i))))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
364 |
(fn prems => |
1461 | 365 |
[ |
366 |
(cut_facts_tac prems 1), |
|
367 |
(rtac is_lubI 1), |
|
368 |
(rtac conjI 1), |
|
369 |
(rtac ub_rangeI 1), |
|
370 |
(rtac allI 1), |
|
371 |
(etac allE 1), |
|
372 |
(etac exE 1), |
|
373 |
(res_inst_tac [("t","Y(i)")] (ssum_lemma6 RS subst) 1), |
|
374 |
(atac 1), |
|
375 |
(rtac (monofun_Isinr RS monofunE RS spec RS spec RS mp) 1), |
|
376 |
(rtac is_ub_thelub 1), |
|
377 |
(etac (monofun_Iwhen3 RS ch2ch_monofun) 1), |
|
378 |
(strip_tac 1), |
|
379 |
(res_inst_tac [("p","u")] IssumE2 1), |
|
380 |
(hyp_subst_tac 1), |
|
381 |
(rtac (less_ssum3d RS iffD2) 1), |
|
382 |
(rtac chain_UU_I_inverse 1), |
|
383 |
(rtac allI 1), |
|
384 |
(res_inst_tac [("p","Y(i)")] IssumE 1), |
|
385 |
(asm_simp_tac Ssum0_ss 1), |
|
386 |
(asm_simp_tac Ssum0_ss 1), |
|
387 |
(etac notE 1), |
|
388 |
(rtac (less_ssum3d RS iffD1) 1), |
|
389 |
(res_inst_tac [("t","Isinr(y)")] subst 1), |
|
390 |
(atac 1), |
|
391 |
(etac (ub_rangeE RS spec) 1), |
|
392 |
(res_inst_tac [("t","u")] (ssum_lemma6 RS subst) 1), |
|
393 |
(atac 1), |
|
394 |
(rtac (monofun_Isinr RS monofunE RS spec RS spec RS mp) 1), |
|
395 |
(rtac is_lub_thelub 1), |
|
396 |
(etac (monofun_Iwhen3 RS ch2ch_monofun) 1), |
|
397 |
(etac (monofun_Iwhen3 RS ub2ub_monofun) 1) |
|
398 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
399 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
400 |
|
1779 | 401 |
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
|
402 |
(* |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
403 |
[| 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
|
404 |
lub (range ?Y1) = Isinl |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
405 |
(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
|
406 |
*) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
407 |
|
1779 | 408 |
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
|
409 |
(* |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
410 |
[| 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
|
411 |
lub (range ?Y1) = Isinr |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
412 |
(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
|
413 |
*) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
414 |
|
2640 | 415 |
qed_goal "cpo_ssum" thy |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
416 |
"chain(Y::nat=>'a ++'b) ==> ? x. range(Y) <<|x" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
417 |
(fn prems => |
1461 | 418 |
[ |
419 |
(cut_facts_tac prems 1), |
|
420 |
(rtac (ssum_lemma4 RS disjE) 1), |
|
421 |
(atac 1), |
|
422 |
(rtac exI 1), |
|
423 |
(etac lub_ssum1a 1), |
|
424 |
(atac 1), |
|
425 |
(rtac exI 1), |
|
426 |
(etac lub_ssum1b 1), |
|
427 |
(atac 1) |
|
428 |
]); |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
961
diff
changeset
|
429 |