| author | wenzelm | 
| Thu, 22 Oct 1998 20:15:26 +0200 | |
| changeset 5732 | 8712391bbf3d | 
| parent 5439 | 2e0c18eedfd0 | 
| child 8161 | bde1391fd0a5 | 
| permissions | -rw-r--r-- | 
| 1461 | 1 | (* Title: HOLCF/ssum3.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 ssum3.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 Ssum3; | 
| 
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_pcpo" thy "UU = Isinl UU" | |
| 13 | (fn prems => | |
| 14 | [ | |
| 15 | (simp_tac (HOL_ss addsimps [UU_def,UU_ssum_def]) 1) | |
| 16 | ]); | |
| 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 | (* continuity for Isinl and Isinr *) | 
| 
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 | |
| 892 | 22 | qed_goal "contlub_Isinl" Ssum3.thy "contlub(Isinl)" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 23 | (fn prems => | 
| 1461 | 24 | [ | 
| 25 | (rtac contlubI 1), | |
| 26 | (strip_tac 1), | |
| 27 | (rtac trans 1), | |
| 28 | (rtac (thelub_ssum1a RS sym) 2), | |
| 29 | (rtac allI 3), | |
| 30 | (rtac exI 3), | |
| 31 | (rtac refl 3), | |
| 32 | (etac (monofun_Isinl RS ch2ch_monofun) 2), | |
| 1675 | 33 | (case_tac "lub(range(Y))=UU" 1), | 
| 1461 | 34 |         (res_inst_tac [("s","UU"),("t","lub(range(Y))")] ssubst 1),
 | 
| 35 | (atac 1), | |
| 36 |         (res_inst_tac [("f","Isinl")] arg_cong  1),
 | |
| 37 | (rtac (chain_UU_I_inverse RS sym) 1), | |
| 38 | (rtac allI 1), | |
| 39 |         (res_inst_tac [("s","UU"),("t","Y(i)")] ssubst 1),
 | |
| 40 | (etac (chain_UU_I RS spec ) 1), | |
| 41 | (atac 1), | |
| 42 | (rtac Iwhen1 1), | |
| 43 |         (res_inst_tac [("f","Isinl")] arg_cong  1),
 | |
| 44 | (rtac lub_equal 1), | |
| 45 | (atac 1), | |
| 46 | (rtac (monofun_Iwhen3 RS ch2ch_monofun) 1), | |
| 47 | (etac (monofun_Isinl RS ch2ch_monofun) 1), | |
| 48 | (rtac allI 1), | |
| 1675 | 49 | (case_tac "Y(k)=UU" 1), | 
| 1461 | 50 | (asm_simp_tac Ssum0_ss 1), | 
| 51 | (asm_simp_tac Ssum0_ss 1) | |
| 52 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 53 | |
| 892 | 54 | qed_goal "contlub_Isinr" Ssum3.thy "contlub(Isinr)" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 55 | (fn prems => | 
| 1461 | 56 | [ | 
| 57 | (rtac contlubI 1), | |
| 58 | (strip_tac 1), | |
| 59 | (rtac trans 1), | |
| 60 | (rtac (thelub_ssum1b RS sym) 2), | |
| 61 | (rtac allI 3), | |
| 62 | (rtac exI 3), | |
| 63 | (rtac refl 3), | |
| 64 | (etac (monofun_Isinr RS ch2ch_monofun) 2), | |
| 1675 | 65 | (case_tac "lub(range(Y))=UU" 1), | 
| 1461 | 66 |         (res_inst_tac [("s","UU"),("t","lub(range(Y))")] ssubst 1),
 | 
| 67 | (atac 1), | |
| 68 | ((rtac arg_cong 1) THEN (rtac (chain_UU_I_inverse RS sym) 1)), | |
| 69 | (rtac allI 1), | |
| 70 |         (res_inst_tac [("s","UU"),("t","Y(i)")] ssubst 1),
 | |
| 71 | (etac (chain_UU_I RS spec ) 1), | |
| 72 | (atac 1), | |
| 73 | (rtac (strict_IsinlIsinr RS subst) 1), | |
| 74 | (rtac Iwhen1 1), | |
| 75 | ((rtac arg_cong 1) THEN (rtac lub_equal 1)), | |
| 76 | (atac 1), | |
| 77 | (rtac (monofun_Iwhen3 RS ch2ch_monofun) 1), | |
| 78 | (etac (monofun_Isinr RS ch2ch_monofun) 1), | |
| 79 | (rtac allI 1), | |
| 1675 | 80 | (case_tac "Y(k)=UU" 1), | 
| 1461 | 81 | (asm_simp_tac Ssum0_ss 1), | 
| 82 | (asm_simp_tac Ssum0_ss 1) | |
| 83 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 84 | |
| 1168 
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
 regensbu parents: 
892diff
changeset | 85 | qed_goal "cont_Isinl" Ssum3.thy "cont(Isinl)" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 86 | (fn prems => | 
| 1461 | 87 | [ | 
| 88 | (rtac monocontlub2cont 1), | |
| 89 | (rtac monofun_Isinl 1), | |
| 90 | (rtac contlub_Isinl 1) | |
| 91 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 92 | |
| 1168 
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
 regensbu parents: 
892diff
changeset | 93 | qed_goal "cont_Isinr" Ssum3.thy "cont(Isinr)" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 94 | (fn prems => | 
| 1461 | 95 | [ | 
| 96 | (rtac monocontlub2cont 1), | |
| 97 | (rtac monofun_Isinr 1), | |
| 98 | (rtac contlub_Isinr 1) | |
| 99 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 100 | |
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 101 | |
| 
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 | (* continuity for Iwhen in the firts two arguments *) | 
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 104 | (* ------------------------------------------------------------------------ *) | 
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 105 | |
| 892 | 106 | qed_goal "contlub_Iwhen1" Ssum3.thy "contlub(Iwhen)" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 107 | (fn prems => | 
| 1461 | 108 | [ | 
| 109 | (rtac contlubI 1), | |
| 110 | (strip_tac 1), | |
| 111 | (rtac trans 1), | |
| 112 | (rtac (thelub_fun RS sym) 2), | |
| 113 | (etac (monofun_Iwhen1 RS ch2ch_monofun) 2), | |
| 114 | (rtac (expand_fun_eq RS iffD2) 1), | |
| 115 | (strip_tac 1), | |
| 116 | (rtac trans 1), | |
| 117 | (rtac (thelub_fun RS sym) 2), | |
| 118 | (rtac ch2ch_fun 2), | |
| 119 | (etac (monofun_Iwhen1 RS ch2ch_monofun) 2), | |
| 120 | (rtac (expand_fun_eq RS iffD2) 1), | |
| 121 | (strip_tac 1), | |
| 122 |         (res_inst_tac [("p","xa")] IssumE 1),
 | |
| 123 | (asm_simp_tac Ssum0_ss 1), | |
| 124 | (rtac (lub_const RS thelubI RS sym) 1), | |
| 125 | (asm_simp_tac Ssum0_ss 1), | |
| 126 | (etac contlub_cfun_fun 1), | |
| 127 | (asm_simp_tac Ssum0_ss 1), | |
| 128 | (rtac (lub_const RS thelubI RS sym) 1) | |
| 129 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 130 | |
| 892 | 131 | qed_goal "contlub_Iwhen2" Ssum3.thy "contlub(Iwhen(f))" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 132 | (fn prems => | 
| 1461 | 133 | [ | 
| 134 | (rtac contlubI 1), | |
| 135 | (strip_tac 1), | |
| 136 | (rtac trans 1), | |
| 137 | (rtac (thelub_fun RS sym) 2), | |
| 138 | (etac (monofun_Iwhen2 RS ch2ch_monofun) 2), | |
| 139 | (rtac (expand_fun_eq RS iffD2) 1), | |
| 140 | (strip_tac 1), | |
| 141 |         (res_inst_tac [("p","x")] IssumE 1),
 | |
| 142 | (asm_simp_tac Ssum0_ss 1), | |
| 143 | (rtac (lub_const RS thelubI RS sym) 1), | |
| 144 | (asm_simp_tac Ssum0_ss 1), | |
| 145 | (rtac (lub_const RS thelubI RS sym) 1), | |
| 146 | (asm_simp_tac Ssum0_ss 1), | |
| 147 | (etac contlub_cfun_fun 1) | |
| 148 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 149 | |
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 150 | (* ------------------------------------------------------------------------ *) | 
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 151 | (* continuity for Iwhen in its third argument *) | 
| 
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 | (* ------------------------------------------------------------------------ *) | 
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 155 | (* first 5 ugly lemmas *) | 
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 156 | (* ------------------------------------------------------------------------ *) | 
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 157 | |
| 892 | 158 | qed_goal "ssum_lemma9" Ssum3.thy | 
| 4721 
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
 oheimb parents: 
4098diff
changeset | 159 | "[| chain(Y); lub(range(Y)) = 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 | 160 | (fn prems => | 
| 1461 | 161 | [ | 
| 162 | (cut_facts_tac prems 1), | |
| 163 | (strip_tac 1), | |
| 164 |         (res_inst_tac [("p","Y(i)")] IssumE 1),
 | |
| 165 | (etac exI 1), | |
| 166 | (etac exI 1), | |
| 167 |         (res_inst_tac [("P","y=UU")] notE 1),
 | |
| 168 | (atac 1), | |
| 169 | (rtac (less_ssum3d RS iffD1) 1), | |
| 170 | (etac subst 1), | |
| 171 | (etac subst 1), | |
| 172 | (etac is_ub_thelub 1) | |
| 173 | ]); | |
| 243 
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 | |
| 892 | 176 | qed_goal "ssum_lemma10" Ssum3.thy | 
| 4721 
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
 oheimb parents: 
4098diff
changeset | 177 | "[| chain(Y); lub(range(Y)) = Isinr(x)|] ==> !i.? x. Y(i)=Isinr(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 | (strip_tac 1), | |
| 182 |         (res_inst_tac [("p","Y(i)")] IssumE 1),
 | |
| 183 | (rtac exI 1), | |
| 184 | (etac trans 1), | |
| 185 | (rtac strict_IsinlIsinr 1), | |
| 186 | (etac exI 2), | |
| 187 |         (res_inst_tac [("P","xa=UU")] notE 1),
 | |
| 188 | (atac 1), | |
| 189 | (rtac (less_ssum3c RS iffD1) 1), | |
| 190 | (etac subst 1), | |
| 191 | (etac subst 1), | |
| 192 | (etac is_ub_thelub 1) | |
| 193 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 194 | |
| 892 | 195 | qed_goal "ssum_lemma11" Ssum3.thy | 
| 4721 
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
 oheimb parents: 
4098diff
changeset | 196 | "[| chain(Y); lub(range(Y)) = Isinl(UU) |] ==>\ | 
| 1168 
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
 regensbu parents: 
892diff
changeset | 197 | \ Iwhen f g (lub(range Y)) = lub(range(%i. Iwhen f g (Y i)))" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 198 | (fn prems => | 
| 1461 | 199 | [ | 
| 200 | (cut_facts_tac prems 1), | |
| 201 | (asm_simp_tac Ssum0_ss 1), | |
| 202 | (rtac (chain_UU_I_inverse RS sym) 1), | |
| 203 | (rtac allI 1), | |
| 204 |         (res_inst_tac [("s","Isinl(UU)"),("t","Y(i)")] subst 1),
 | |
| 205 | (rtac (inst_ssum_pcpo RS subst) 1), | |
| 206 | (rtac (chain_UU_I RS spec RS sym) 1), | |
| 207 | (atac 1), | |
| 208 | (etac (inst_ssum_pcpo RS ssubst) 1), | |
| 209 | (asm_simp_tac Ssum0_ss 1) | |
| 210 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 211 | |
| 892 | 212 | qed_goal "ssum_lemma12" Ssum3.thy | 
| 4721 
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
 oheimb parents: 
4098diff
changeset | 213 | "[| chain(Y); lub(range(Y)) = Isinl(x); x ~= UU |] ==>\ | 
| 1168 
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
 regensbu parents: 
892diff
changeset | 214 | \ Iwhen f g (lub(range Y)) = lub(range(%i. Iwhen f g (Y i)))" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 215 | (fn prems => | 
| 1461 | 216 | [ | 
| 217 | (cut_facts_tac prems 1), | |
| 218 | (asm_simp_tac Ssum0_ss 1), | |
| 219 |         (res_inst_tac [("t","x")] subst 1),
 | |
| 220 | (rtac inject_Isinl 1), | |
| 221 | (rtac trans 1), | |
| 222 | (atac 2), | |
| 223 | (rtac (thelub_ssum1a RS sym) 1), | |
| 224 | (atac 1), | |
| 225 | (etac ssum_lemma9 1), | |
| 226 | (atac 1), | |
| 227 | (rtac trans 1), | |
| 228 | (rtac contlub_cfun_arg 1), | |
| 229 | (rtac (monofun_Iwhen3 RS ch2ch_monofun) 1), | |
| 230 | (atac 1), | |
| 231 | (rtac lub_equal2 1), | |
| 232 | (rtac (chain_mono2 RS exE) 1), | |
| 233 | (atac 2), | |
| 234 | (rtac chain_UU_I_inverse2 1), | |
| 2033 | 235 | (stac inst_ssum_pcpo 1), | 
| 1461 | 236 | (etac swap 1), | 
| 237 | (rtac inject_Isinl 1), | |
| 238 | (rtac trans 1), | |
| 239 | (etac sym 1), | |
| 240 | (etac notnotD 1), | |
| 241 | (rtac exI 1), | |
| 242 | (strip_tac 1), | |
| 243 | (rtac (ssum_lemma9 RS spec RS exE) 1), | |
| 244 | (atac 1), | |
| 245 | (atac 1), | |
| 246 |         (res_inst_tac [("t","Y(i)")] ssubst 1),
 | |
| 247 | (atac 1), | |
| 248 | (rtac trans 1), | |
| 249 | (rtac cfun_arg_cong 1), | |
| 250 | (rtac Iwhen2 1), | |
| 251 |         (res_inst_tac [("Pa","Y(i)=UU")] swap 1),
 | |
| 252 | (fast_tac HOL_cs 1), | |
| 2033 | 253 | (stac inst_ssum_pcpo 1), | 
| 1461 | 254 |         (res_inst_tac [("t","Y(i)")] ssubst 1),
 | 
| 255 | (atac 1), | |
| 256 | (fast_tac HOL_cs 1), | |
| 2033 | 257 | (stac Iwhen2 1), | 
| 1461 | 258 |         (res_inst_tac [("Pa","Y(i)=UU")] swap 1),
 | 
| 259 | (fast_tac HOL_cs 1), | |
| 2033 | 260 | (stac inst_ssum_pcpo 1), | 
| 1461 | 261 |         (res_inst_tac [("t","Y(i)")] ssubst 1),
 | 
| 262 | (atac 1), | |
| 263 | (fast_tac HOL_cs 1), | |
| 4098 | 264 | (simp_tac (simpset_of Cfun3.thy) 1), | 
| 5291 | 265 | (rtac (monofun_Rep_CFun2 RS ch2ch_monofun) 1), | 
| 1461 | 266 | (etac (monofun_Iwhen3 RS ch2ch_monofun) 1), | 
| 267 | (etac (monofun_Iwhen3 RS ch2ch_monofun) 1) | |
| 268 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 269 | |
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 270 | |
| 892 | 271 | qed_goal "ssum_lemma13" Ssum3.thy | 
| 4721 
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
 oheimb parents: 
4098diff
changeset | 272 | "[| chain(Y); lub(range(Y)) = Isinr(x); x ~= UU |] ==>\ | 
| 1168 
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
 regensbu parents: 
892diff
changeset | 273 | \ Iwhen f g (lub(range Y)) = lub(range(%i. Iwhen f g (Y i)))" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 274 | (fn prems => | 
| 1461 | 275 | [ | 
| 276 | (cut_facts_tac prems 1), | |
| 277 | (asm_simp_tac Ssum0_ss 1), | |
| 278 |         (res_inst_tac [("t","x")] subst 1),
 | |
| 279 | (rtac inject_Isinr 1), | |
| 280 | (rtac trans 1), | |
| 281 | (atac 2), | |
| 282 | (rtac (thelub_ssum1b RS sym) 1), | |
| 283 | (atac 1), | |
| 284 | (etac ssum_lemma10 1), | |
| 285 | (atac 1), | |
| 286 | (rtac trans 1), | |
| 287 | (rtac contlub_cfun_arg 1), | |
| 288 | (rtac (monofun_Iwhen3 RS ch2ch_monofun) 1), | |
| 289 | (atac 1), | |
| 290 | (rtac lub_equal2 1), | |
| 291 | (rtac (chain_mono2 RS exE) 1), | |
| 292 | (atac 2), | |
| 293 | (rtac chain_UU_I_inverse2 1), | |
| 2033 | 294 | (stac inst_ssum_pcpo 1), | 
| 1461 | 295 | (etac swap 1), | 
| 296 | (rtac inject_Isinr 1), | |
| 297 | (rtac trans 1), | |
| 298 | (etac sym 1), | |
| 299 | (rtac (strict_IsinlIsinr RS subst) 1), | |
| 300 | (etac notnotD 1), | |
| 301 | (rtac exI 1), | |
| 302 | (strip_tac 1), | |
| 303 | (rtac (ssum_lemma10 RS spec RS exE) 1), | |
| 304 | (atac 1), | |
| 305 | (atac 1), | |
| 306 |         (res_inst_tac [("t","Y(i)")] ssubst 1),
 | |
| 307 | (atac 1), | |
| 308 | (rtac trans 1), | |
| 309 | (rtac cfun_arg_cong 1), | |
| 310 | (rtac Iwhen3 1), | |
| 311 |         (res_inst_tac [("Pa","Y(i)=UU")] swap 1),
 | |
| 312 | (fast_tac HOL_cs 1), | |
| 313 | (dtac notnotD 1), | |
| 2033 | 314 | (stac inst_ssum_pcpo 1), | 
| 315 | (stac strict_IsinlIsinr 1), | |
| 1461 | 316 |         (res_inst_tac [("t","Y(i)")] ssubst 1),
 | 
| 317 | (atac 1), | |
| 318 | (fast_tac HOL_cs 1), | |
| 2033 | 319 | (stac Iwhen3 1), | 
| 1461 | 320 |         (res_inst_tac [("Pa","Y(i)=UU")] swap 1),
 | 
| 321 | (fast_tac HOL_cs 1), | |
| 322 | (dtac notnotD 1), | |
| 2033 | 323 | (stac inst_ssum_pcpo 1), | 
| 324 | (stac strict_IsinlIsinr 1), | |
| 1461 | 325 |         (res_inst_tac [("t","Y(i)")] ssubst 1),
 | 
| 326 | (atac 1), | |
| 327 | (fast_tac HOL_cs 1), | |
| 4098 | 328 | (simp_tac (simpset_of Cfun3.thy) 1), | 
| 5291 | 329 | (rtac (monofun_Rep_CFun2 RS ch2ch_monofun) 1), | 
| 1461 | 330 | (etac (monofun_Iwhen3 RS ch2ch_monofun) 1), | 
| 331 | (etac (monofun_Iwhen3 RS ch2ch_monofun) 1) | |
| 332 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 333 | |
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 334 | |
| 892 | 335 | qed_goal "contlub_Iwhen3" Ssum3.thy "contlub(Iwhen(f)(g))" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 336 | (fn prems => | 
| 1461 | 337 | [ | 
| 338 | (rtac contlubI 1), | |
| 339 | (strip_tac 1), | |
| 340 |         (res_inst_tac [("p","lub(range(Y))")] IssumE 1),
 | |
| 341 | (etac ssum_lemma11 1), | |
| 342 | (atac 1), | |
| 343 | (etac ssum_lemma12 1), | |
| 344 | (atac 1), | |
| 345 | (atac 1), | |
| 346 | (etac ssum_lemma13 1), | |
| 347 | (atac 1), | |
| 348 | (atac 1) | |
| 349 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 350 | |
| 1168 
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
 regensbu parents: 
892diff
changeset | 351 | qed_goal "cont_Iwhen1" Ssum3.thy "cont(Iwhen)" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 352 | (fn prems => | 
| 1461 | 353 | [ | 
| 354 | (rtac monocontlub2cont 1), | |
| 355 | (rtac monofun_Iwhen1 1), | |
| 356 | (rtac contlub_Iwhen1 1) | |
| 357 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 358 | |
| 1168 
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
 regensbu parents: 
892diff
changeset | 359 | qed_goal "cont_Iwhen2" Ssum3.thy "cont(Iwhen(f))" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 360 | (fn prems => | 
| 1461 | 361 | [ | 
| 362 | (rtac monocontlub2cont 1), | |
| 363 | (rtac monofun_Iwhen2 1), | |
| 364 | (rtac contlub_Iwhen2 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: 
892diff
changeset | 367 | qed_goal "cont_Iwhen3" Ssum3.thy "cont(Iwhen(f)(g))" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 368 | (fn prems => | 
| 1461 | 369 | [ | 
| 370 | (rtac monocontlub2cont 1), | |
| 371 | (rtac monofun_Iwhen3 1), | |
| 372 | (rtac contlub_Iwhen3 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 | (* ------------------------------------------------------------------------ *) | 
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 376 | (* continuous versions of lemmas for 'a ++ 'b *) | 
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 377 | (* ------------------------------------------------------------------------ *) | 
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 378 | |
| 1168 
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
 regensbu parents: 
892diff
changeset | 379 | qed_goalw "strict_sinl" Ssum3.thy [sinl_def] "sinl`UU =UU" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 380 | (fn prems => | 
| 1461 | 381 | [ | 
| 382 | (simp_tac (Ssum0_ss addsimps [cont_Isinl]) 1), | |
| 383 | (rtac (inst_ssum_pcpo RS sym) 1) | |
| 384 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 385 | |
| 1168 
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
 regensbu parents: 
892diff
changeset | 386 | qed_goalw "strict_sinr" Ssum3.thy [sinr_def] "sinr`UU=UU" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 387 | (fn prems => | 
| 1461 | 388 | [ | 
| 389 | (simp_tac (Ssum0_ss addsimps [cont_Isinr]) 1), | |
| 390 | (rtac (inst_ssum_pcpo RS sym) 1) | |
| 391 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 392 | |
| 892 | 393 | qed_goalw "noteq_sinlsinr" Ssum3.thy [sinl_def,sinr_def] | 
| 1461 | 394 | "sinl`a=sinr`b ==> a=UU & b=UU" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 395 | (fn prems => | 
| 1461 | 396 | [ | 
| 397 | (cut_facts_tac prems 1), | |
| 398 | (rtac noteq_IsinlIsinr 1), | |
| 399 | (etac box_equals 1), | |
| 400 | (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1), | |
| 401 | (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1) | |
| 402 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 403 | |
| 892 | 404 | qed_goalw "inject_sinl" Ssum3.thy [sinl_def,sinr_def] | 
| 1461 | 405 | "sinl`a1=sinl`a2==> a1=a2" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 406 | (fn prems => | 
| 1461 | 407 | [ | 
| 408 | (cut_facts_tac prems 1), | |
| 409 | (rtac inject_Isinl 1), | |
| 410 | (etac box_equals 1), | |
| 411 | (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1), | |
| 412 | (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1) | |
| 413 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 414 | |
| 892 | 415 | qed_goalw "inject_sinr" Ssum3.thy [sinl_def,sinr_def] | 
| 1461 | 416 | "sinr`a1=sinr`a2==> a1=a2" | 
| 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 inject_Isinr 1), | |
| 421 | (etac box_equals 1), | |
| 422 | (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1), | |
| 423 | (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1) | |
| 424 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 425 | |
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 426 | |
| 892 | 427 | qed_goal "defined_sinl" Ssum3.thy | 
| 1461 | 428 | "x~=UU ==> sinl`x ~= UU" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 429 | (fn prems => | 
| 1461 | 430 | [ | 
| 431 | (cut_facts_tac prems 1), | |
| 432 | (etac swap 1), | |
| 433 | (rtac inject_sinl 1), | |
| 2033 | 434 | (stac strict_sinl 1), | 
| 1461 | 435 | (etac notnotD 1) | 
| 436 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 437 | |
| 892 | 438 | qed_goal "defined_sinr" Ssum3.thy | 
| 1461 | 439 | "x~=UU ==> sinr`x ~= UU" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 440 | (fn prems => | 
| 1461 | 441 | [ | 
| 442 | (cut_facts_tac prems 1), | |
| 443 | (etac swap 1), | |
| 444 | (rtac inject_sinr 1), | |
| 2033 | 445 | (stac strict_sinr 1), | 
| 1461 | 446 | (etac notnotD 1) | 
| 447 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 448 | |
| 892 | 449 | qed_goalw "Exh_Ssum1" Ssum3.thy [sinl_def,sinr_def] | 
| 1461 | 450 | "z=UU | (? a. z=sinl`a & a~=UU) | (? b. z=sinr`b & b~=UU)" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 451 | (fn prems => | 
| 1461 | 452 | [ | 
| 453 | (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1), | |
| 2033 | 454 | (stac inst_ssum_pcpo 1), | 
| 1461 | 455 | (rtac Exh_Ssum 1) | 
| 456 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 457 | |
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 458 | |
| 892 | 459 | qed_goalw "ssumE" Ssum3.thy [sinl_def,sinr_def] | 
| 1461 | 460 | "[|p=UU ==> Q ;\ | 
| 461 | \ !!x.[|p=sinl`x; x~=UU |] ==> Q;\ | |
| 462 | \ !!y.[|p=sinr`y; y~=UU |] ==> Q|] ==> Q" | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 463 | (fn prems => | 
| 1461 | 464 | [ | 
| 465 | (rtac IssumE 1), | |
| 466 | (resolve_tac prems 1), | |
| 2033 | 467 | (stac inst_ssum_pcpo 1), | 
| 1461 | 468 | (atac 1), | 
| 469 | (resolve_tac prems 1), | |
| 470 | (atac 2), | |
| 471 | (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1), | |
| 472 | (resolve_tac prems 1), | |
| 473 | (atac 2), | |
| 474 | (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1) | |
| 475 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 476 | |
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 477 | |
| 892 | 478 | qed_goalw "ssumE2" Ssum3.thy [sinl_def,sinr_def] | 
| 1168 
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
 regensbu parents: 
892diff
changeset | 479 | "[|!!x.[|p=sinl`x|] ==> Q;\ | 
| 1461 | 480 | \ !!y.[|p=sinr`y|] ==> Q|] ==> Q" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 481 | (fn prems => | 
| 1461 | 482 | [ | 
| 483 | (rtac IssumE2 1), | |
| 484 | (resolve_tac prems 1), | |
| 2033 | 485 | (stac beta_cfun 1), | 
| 1461 | 486 | (rtac cont_Isinl 1), | 
| 487 | (atac 1), | |
| 488 | (resolve_tac prems 1), | |
| 2033 | 489 | (stac beta_cfun 1), | 
| 1461 | 490 | (rtac cont_Isinr 1), | 
| 491 | (atac 1) | |
| 492 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 493 | |
| 5439 | 494 | qed_goalw "sscase1" Ssum3.thy [sscase_def,sinl_def,sinr_def] | 
| 495 | "sscase`f`g`UU = UU" (fn _ => let | |
| 2566 | 496 | val tac = (REPEAT (resolve_tac (cont_lemmas1 @ [cont_Iwhen1,cont_Iwhen2, | 
| 497 | cont_Iwhen3,cont2cont_CF1L]) 1)) in | |
| 498 | [ | |
| 2033 | 499 | (stac inst_ssum_pcpo 1), | 
| 500 | (stac beta_cfun 1), | |
| 2566 | 501 | tac, | 
| 502 | (stac beta_cfun 1), | |
| 503 | tac, | |
| 2033 | 504 | (stac beta_cfun 1), | 
| 2566 | 505 | tac, | 
| 1461 | 506 | (simp_tac Ssum0_ss 1) | 
| 2566 | 507 | ] end); | 
| 508 | ||
| 509 | ||
| 510 | val tac = (REPEAT (resolve_tac (cont_lemmas1 @ [cont_Iwhen1,cont_Iwhen2, | |
| 511 | cont_Iwhen3,cont_Isinl,cont_Isinr,cont2cont_CF1L]) 1)); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 512 | |
| 5439 | 513 | qed_goalw "sscase2" Ssum3.thy [sscase_def,sinl_def,sinr_def] | 
| 514 | "x~=UU==> sscase`f`g`(sinl`x) = f`x" (fn prems => [ | |
| 1461 | 515 | (cut_facts_tac prems 1), | 
| 2033 | 516 | (stac beta_cfun 1), | 
| 2566 | 517 | tac, | 
| 2033 | 518 | (stac beta_cfun 1), | 
| 2566 | 519 | tac, | 
| 2033 | 520 | (stac beta_cfun 1), | 
| 2566 | 521 | tac, | 
| 2033 | 522 | (stac beta_cfun 1), | 
| 2566 | 523 | tac, | 
| 1461 | 524 | (asm_simp_tac Ssum0_ss 1) | 
| 525 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 526 | |
| 5439 | 527 | qed_goalw "sscase3" Ssum3.thy [sscase_def,sinl_def,sinr_def] | 
| 528 | "x~=UU==> sscase`f`g`(sinr`x) = g`x" (fn prems => [ | |
| 1461 | 529 | (cut_facts_tac prems 1), | 
| 2033 | 530 | (stac beta_cfun 1), | 
| 2566 | 531 | tac, | 
| 2033 | 532 | (stac beta_cfun 1), | 
| 2566 | 533 | tac, | 
| 2033 | 534 | (stac beta_cfun 1), | 
| 2566 | 535 | tac, | 
| 2033 | 536 | (stac beta_cfun 1), | 
| 2566 | 537 | tac, | 
| 1461 | 538 | (asm_simp_tac Ssum0_ss 1) | 
| 539 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 540 | |
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 541 | |
| 892 | 542 | qed_goalw "less_ssum4a" Ssum3.thy [sinl_def,sinr_def] | 
| 2566 | 543 | "(sinl`x << sinl`y) = (x << y)" (fn prems => [ | 
| 2033 | 544 | (stac beta_cfun 1), | 
| 2566 | 545 | tac, | 
| 2033 | 546 | (stac beta_cfun 1), | 
| 2566 | 547 | tac, | 
| 1461 | 548 | (rtac less_ssum3a 1) | 
| 549 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 550 | |
| 892 | 551 | qed_goalw "less_ssum4b" Ssum3.thy [sinl_def,sinr_def] | 
| 2566 | 552 | "(sinr`x << sinr`y) = (x << y)" (fn prems => [ | 
| 2033 | 553 | (stac beta_cfun 1), | 
| 2566 | 554 | tac, | 
| 2033 | 555 | (stac beta_cfun 1), | 
| 2566 | 556 | tac, | 
| 1461 | 557 | (rtac less_ssum3b 1) | 
| 558 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 559 | |
| 892 | 560 | qed_goalw "less_ssum4c" Ssum3.thy [sinl_def,sinr_def] | 
| 2566 | 561 | "(sinl`x << sinr`y) = (x = UU)" (fn prems => | 
| 1461 | 562 | [ | 
| 2033 | 563 | (stac beta_cfun 1), | 
| 2566 | 564 | tac, | 
| 2033 | 565 | (stac beta_cfun 1), | 
| 2566 | 566 | tac, | 
| 1461 | 567 | (rtac less_ssum3c 1) | 
| 568 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 569 | |
| 892 | 570 | qed_goalw "less_ssum4d" Ssum3.thy [sinl_def,sinr_def] | 
| 1461 | 571 | "(sinr`x << sinl`y) = (x = UU)" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 572 | (fn prems => | 
| 1461 | 573 | [ | 
| 2033 | 574 | (stac beta_cfun 1), | 
| 2566 | 575 | tac, | 
| 2033 | 576 | (stac beta_cfun 1), | 
| 2566 | 577 | tac, | 
| 1461 | 578 | (rtac less_ssum3d 1) | 
| 579 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 580 | |
| 892 | 581 | qed_goalw "ssum_chainE" Ssum3.thy [sinl_def,sinr_def] | 
| 4721 
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
 oheimb parents: 
4098diff
changeset | 582 | "chain(Y) ==> (!i.? x.(Y i)=sinl`x)|(!i.? y.(Y i)=sinr`y)" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 583 | (fn prems => | 
| 1461 | 584 | [ | 
| 585 | (cut_facts_tac prems 1), | |
| 586 | (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1), | |
| 587 | (etac ssum_lemma4 1) | |
| 588 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 589 | |
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 590 | |
| 5439 | 591 | qed_goalw "thelub_ssum2a" Ssum3.thy [sinl_def,sinr_def,sscase_def] | 
| 4721 
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
 oheimb parents: 
4098diff
changeset | 592 | "[| chain(Y); !i.? x. Y(i) = sinl`x |] ==>\ | 
| 5439 | 593 | \ lub(range(Y)) = sinl`(lub(range(%i. sscase`(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 | 594 | (fn prems => | 
| 1461 | 595 | [ | 
| 596 | (cut_facts_tac prems 1), | |
| 2033 | 597 | (stac beta_cfun 1), | 
| 2566 | 598 | tac, | 
| 2033 | 599 | (stac beta_cfun 1), | 
| 2566 | 600 | tac, | 
| 2033 | 601 | (stac beta_cfun 1), | 
| 2566 | 602 | tac, | 
| 2033 | 603 | (stac (beta_cfun RS ext) 1), | 
| 2566 | 604 | tac, | 
| 1461 | 605 | (rtac thelub_ssum1a 1), | 
| 606 | (atac 1), | |
| 607 | (rtac allI 1), | |
| 608 | (etac allE 1), | |
| 609 | (etac exE 1), | |
| 610 | (rtac exI 1), | |
| 611 | (etac box_equals 1), | |
| 612 | (rtac refl 1), | |
| 613 | (asm_simp_tac (Ssum0_ss addsimps [cont_Isinl]) 1) | |
| 614 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 615 | |
| 5439 | 616 | qed_goalw "thelub_ssum2b" Ssum3.thy [sinl_def,sinr_def,sscase_def] | 
| 4721 
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
 oheimb parents: 
4098diff
changeset | 617 | "[| chain(Y); !i.? x. Y(i) = sinr`x |] ==>\ | 
| 5439 | 618 | \ lub(range(Y)) = sinr`(lub(range(%i. sscase`(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 | 619 | (fn prems => | 
| 1461 | 620 | [ | 
| 621 | (cut_facts_tac prems 1), | |
| 2033 | 622 | (stac beta_cfun 1), | 
| 2566 | 623 | tac, | 
| 2033 | 624 | (stac beta_cfun 1), | 
| 2566 | 625 | tac, | 
| 2033 | 626 | (stac beta_cfun 1), | 
| 2566 | 627 | tac, | 
| 2033 | 628 | (stac (beta_cfun RS ext) 1), | 
| 2566 | 629 | tac, | 
| 1461 | 630 | (rtac thelub_ssum1b 1), | 
| 631 | (atac 1), | |
| 632 | (rtac allI 1), | |
| 633 | (etac allE 1), | |
| 634 | (etac exE 1), | |
| 635 | (rtac exI 1), | |
| 636 | (etac box_equals 1), | |
| 637 | (rtac refl 1), | |
| 638 | (asm_simp_tac (Ssum0_ss addsimps | |
| 639 | [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, | |
| 640 | cont_Iwhen3]) 1) | |
| 641 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 642 | |
| 892 | 643 | qed_goalw "thelub_ssum2a_rev" Ssum3.thy [sinl_def,sinr_def] | 
| 4721 
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
 oheimb parents: 
4098diff
changeset | 644 | "[| chain(Y); lub(range(Y)) = sinl`x|] ==> !i.? x. Y(i)=sinl`x" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 645 | (fn prems => | 
| 1461 | 646 | [ | 
| 647 | (cut_facts_tac prems 1), | |
| 648 | (asm_simp_tac (Ssum0_ss addsimps | |
| 649 | [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, | |
| 650 | cont_Iwhen3]) 1), | |
| 651 | (etac ssum_lemma9 1), | |
| 652 | (asm_simp_tac (Ssum0_ss addsimps | |
| 653 | [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, | |
| 654 | cont_Iwhen3]) 1) | |
| 655 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 656 | |
| 892 | 657 | qed_goalw "thelub_ssum2b_rev" Ssum3.thy [sinl_def,sinr_def] | 
| 4721 
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
 oheimb parents: 
4098diff
changeset | 658 | "[| chain(Y); lub(range(Y)) = sinr`x|] ==> !i.? x. Y(i)=sinr`x" | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 659 | (fn prems => | 
| 1461 | 660 | [ | 
| 661 | (cut_facts_tac prems 1), | |
| 662 | (asm_simp_tac (Ssum0_ss addsimps | |
| 663 | [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, | |
| 664 | cont_Iwhen3]) 1), | |
| 665 | (etac ssum_lemma10 1), | |
| 666 | (asm_simp_tac (Ssum0_ss addsimps | |
| 667 | [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, | |
| 668 | cont_Iwhen3]) 1) | |
| 669 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 670 | |
| 892 | 671 | qed_goal "thelub_ssum3" Ssum3.thy | 
| 4721 
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
 oheimb parents: 
4098diff
changeset | 672 | "chain(Y) ==>\ | 
| 5439 | 673 | \ lub(range(Y)) = sinl`(lub(range(%i. sscase`(LAM x. x)`(LAM y. UU)`(Y i))))\ | 
| 674 | \ | lub(range(Y)) = sinr`(lub(range(%i. sscase`(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 | 675 | (fn prems => | 
| 1461 | 676 | [ | 
| 677 | (cut_facts_tac prems 1), | |
| 678 | (rtac (ssum_chainE RS disjE) 1), | |
| 679 | (atac 1), | |
| 680 | (rtac disjI1 1), | |
| 681 | (etac thelub_ssum2a 1), | |
| 682 | (atac 1), | |
| 683 | (rtac disjI2 1), | |
| 684 | (etac thelub_ssum2b 1), | |
| 685 | (atac 1) | |
| 686 | ]); | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 687 | |
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 688 | |
| 5439 | 689 | qed_goal "sscase4" Ssum3.thy | 
| 690 | "sscase`sinl`sinr`z=z" | |
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 691 | (fn prems => | 
| 1461 | 692 | [ | 
| 693 |         (res_inst_tac [("p","z")] ssumE 1),
 | |
| 5439 | 694 | (asm_simp_tac ((simpset_of Cfun3.thy) addsimps [sscase1,sscase2,sscase3]) 1), | 
| 695 | (asm_simp_tac ((simpset_of Cfun3.thy) addsimps [sscase1,sscase2,sscase3]) 1), | |
| 696 | (asm_simp_tac ((simpset_of Cfun3.thy) addsimps [sscase1,sscase2,sscase3]) 1) | |
| 1461 | 697 | ]); | 
| 243 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 698 | |
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 699 | |
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 700 | (* ------------------------------------------------------------------------ *) | 
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 701 | (* install simplifier for Ssum *) | 
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 702 | (* ------------------------------------------------------------------------ *) | 
| 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 nipkow parents: diff
changeset | 703 | |
| 1274 | 704 | val Ssum_rews = [strict_sinl,strict_sinr,defined_sinl,defined_sinr, | 
| 5439 | 705 | sscase1,sscase2,sscase3]; | 
| 1274 | 706 | |
| 707 | Addsimps [strict_sinl,strict_sinr,defined_sinl,defined_sinr, | |
| 5439 | 708 | sscase1,sscase2,sscase3]; |