src/HOLCF/Sprod3.ML
changeset 2640 ee4dfce170a0
parent 2566 cbf02fc74332
child 3842 b55686a7b22c
equal deleted inserted replaced
2639:2c38796b33b9 2640:ee4dfce170a0
     1 (*  Title:      HOLCF/sprod3.thy
     1 (*  Title:      HOLCF/Sprod3.thy
     2     ID:         $Id$
     2     ID:         $Id$
     3     Author:     Franz Regensburger
     3     Author:     Franz Regensburger
     4     Copyright   1993 Technische Universitaet Muenchen
     4     Copyright   1993 Technische Universitaet Muenchen
     5 
     5 
     6 Lemmas for Sprod3.thy 
     6 Lemmas for Sprod.thy 
     7 *)
     7 *)
     8 
     8 
     9 open Sprod3;
     9 open Sprod3;
    10 
    10 
       
    11 (* for compatibility with old HOLCF-Version *)
       
    12 qed_goal "inst_sprod_pcpo" thy "UU = Ispair UU UU"
       
    13  (fn prems => 
       
    14         [
       
    15         (simp_tac (HOL_ss addsimps [UU_def,UU_sprod_def]) 1)
       
    16         ]);
    11 (* ------------------------------------------------------------------------ *)
    17 (* ------------------------------------------------------------------------ *)
    12 (* continuity of Ispair, Isfst, Issnd                                       *)
    18 (* continuity of Ispair, Isfst, Issnd                                       *)
    13 (* ------------------------------------------------------------------------ *)
    19 (* ------------------------------------------------------------------------ *)
    14 
    20 
    15 qed_goal "sprod3_lemma1" Sprod3.thy 
    21 qed_goal "sprod3_lemma1" thy 
    16 "[| is_chain(Y);  x~= UU;  lub(range(Y))~= UU |] ==>\
    22 "[| is_chain(Y);  x~= UU;  lub(range(Y))~= UU |] ==>\
    17 \ Ispair (lub(range Y)) x =\
    23 \ Ispair (lub(range Y)) x =\
    18 \ Ispair (lub(range(%i. Isfst(Ispair(Y i) x)))) \
    24 \ Ispair (lub(range(%i. Isfst(Ispair(Y i) x)))) \
    19 \        (lub(range(%i. Issnd(Ispair(Y i) x))))"
    25 \        (lub(range(%i. Issnd(Ispair(Y i) x))))"
    20  (fn prems =>
    26  (fn prems =>
    47         (etac sym 1),
    53         (etac sym 1),
    48         (asm_simp_tac Sprod0_ss  1),
    54         (asm_simp_tac Sprod0_ss  1),
    49         (rtac minimal 1)
    55         (rtac minimal 1)
    50         ]);
    56         ]);
    51 
    57 
    52 qed_goal "sprod3_lemma2" Sprod3.thy 
    58 qed_goal "sprod3_lemma2" thy 
    53 "[| is_chain(Y); x ~= UU; lub(range(Y)) = UU |] ==>\
    59 "[| is_chain(Y); x ~= UU; lub(range(Y)) = UU |] ==>\
    54 \   Ispair (lub(range Y)) x =\
    60 \   Ispair (lub(range Y)) x =\
    55 \   Ispair (lub(range(%i. Isfst(Ispair(Y i) x))))\
    61 \   Ispair (lub(range(%i. Isfst(Ispair(Y i) x))))\
    56 \          (lub(range(%i. Issnd(Ispair(Y i) x))))"
    62 \          (lub(range(%i. Issnd(Ispair(Y i) x))))"
    57  (fn prems =>
    63  (fn prems =>
    69         (etac (chain_UU_I RS spec) 1),
    75         (etac (chain_UU_I RS spec) 1),
    70         (atac 1)
    76         (atac 1)
    71         ]);
    77         ]);
    72 
    78 
    73 
    79 
    74 qed_goal "sprod3_lemma3" Sprod3.thy 
    80 qed_goal "sprod3_lemma3" thy 
    75 "[| is_chain(Y); x = UU |] ==>\
    81 "[| is_chain(Y); x = UU |] ==>\
    76 \          Ispair (lub(range Y)) x =\
    82 \          Ispair (lub(range Y)) x =\
    77 \          Ispair (lub(range(%i. Isfst(Ispair (Y i) x))))\
    83 \          Ispair (lub(range(%i. Isfst(Ispair (Y i) x))))\
    78 \                 (lub(range(%i. Issnd(Ispair (Y i) x))))"
    84 \                 (lub(range(%i. Issnd(Ispair (Y i) x))))"
    79  (fn prems =>
    85  (fn prems =>
    89         (rtac allI 1),
    95         (rtac allI 1),
    90         (simp_tac Sprod0_ss  1)
    96         (simp_tac Sprod0_ss  1)
    91         ]);
    97         ]);
    92 
    98 
    93 
    99 
    94 qed_goal "contlub_Ispair1" Sprod3.thy "contlub(Ispair)"
   100 qed_goal "contlub_Ispair1" thy "contlub(Ispair)"
    95 (fn prems =>
   101 (fn prems =>
    96         [
   102         [
    97         (rtac contlubI 1),
   103         (rtac contlubI 1),
    98         (strip_tac 1),
   104         (strip_tac 1),
    99         (rtac (expand_fun_eq RS iffD2) 1),
   105         (rtac (expand_fun_eq RS iffD2) 1),
   115         (atac 1),
   121         (atac 1),
   116         (etac sprod3_lemma3 1),
   122         (etac sprod3_lemma3 1),
   117         (atac 1)
   123         (atac 1)
   118         ]);
   124         ]);
   119 
   125 
   120 qed_goal "sprod3_lemma4" Sprod3.thy 
   126 qed_goal "sprod3_lemma4" thy 
   121 "[| is_chain(Y); x ~= UU; lub(range(Y)) ~= UU |] ==>\
   127 "[| is_chain(Y); x ~= UU; lub(range(Y)) ~= UU |] ==>\
   122 \         Ispair x (lub(range Y)) =\
   128 \         Ispair x (lub(range Y)) =\
   123 \         Ispair (lub(range(%i. Isfst (Ispair x (Y i)))))\
   129 \         Ispair (lub(range(%i. Isfst (Ispair x (Y i)))))\
   124 \                (lub(range(%i. Issnd (Ispair x (Y i)))))"
   130 \                (lub(range(%i. Issnd (Ispair x (Y i)))))"
   125  (fn prems =>
   131  (fn prems =>
   151         (atac 1),
   157         (atac 1),
   152         (rtac allI 1),
   158         (rtac allI 1),
   153         (asm_simp_tac Sprod0_ss 1)
   159         (asm_simp_tac Sprod0_ss 1)
   154         ]);
   160         ]);
   155 
   161 
   156 qed_goal "sprod3_lemma5" Sprod3.thy 
   162 qed_goal "sprod3_lemma5" thy 
   157 "[| is_chain(Y); x ~= UU; lub(range(Y)) = UU |] ==>\
   163 "[| is_chain(Y); x ~= UU; lub(range(Y)) = UU |] ==>\
   158 \         Ispair x (lub(range Y)) =\
   164 \         Ispair x (lub(range Y)) =\
   159 \         Ispair (lub(range(%i. Isfst(Ispair x (Y i)))))\
   165 \         Ispair (lub(range(%i. Isfst(Ispair x (Y i)))))\
   160 \                (lub(range(%i. Issnd(Ispair x (Y i)))))"
   166 \                (lub(range(%i. Issnd(Ispair x (Y i)))))"
   161  (fn prems =>
   167  (fn prems =>
   172         (asm_simp_tac Sprod0_ss  1),
   178         (asm_simp_tac Sprod0_ss  1),
   173         (etac (chain_UU_I RS spec) 1),
   179         (etac (chain_UU_I RS spec) 1),
   174         (atac 1)
   180         (atac 1)
   175         ]);
   181         ]);
   176 
   182 
   177 qed_goal "sprod3_lemma6" Sprod3.thy 
   183 qed_goal "sprod3_lemma6" thy 
   178 "[| is_chain(Y); x = UU |] ==>\
   184 "[| is_chain(Y); x = UU |] ==>\
   179 \         Ispair x (lub(range Y)) =\
   185 \         Ispair x (lub(range Y)) =\
   180 \         Ispair (lub(range(%i. Isfst (Ispair x (Y i)))))\
   186 \         Ispair (lub(range(%i. Isfst (Ispair x (Y i)))))\
   181 \                (lub(range(%i. Issnd (Ispair x (Y i)))))"
   187 \                (lub(range(%i. Issnd (Ispair x (Y i)))))"
   182 (fn prems =>
   188 (fn prems =>
   191         (rtac chain_UU_I_inverse 1),
   197         (rtac chain_UU_I_inverse 1),
   192         (rtac allI 1),
   198         (rtac allI 1),
   193         (simp_tac Sprod0_ss  1)
   199         (simp_tac Sprod0_ss  1)
   194         ]);
   200         ]);
   195 
   201 
   196 qed_goal "contlub_Ispair2" Sprod3.thy "contlub(Ispair(x))"
   202 qed_goal "contlub_Ispair2" thy "contlub(Ispair(x))"
   197 (fn prems =>
   203 (fn prems =>
   198         [
   204         [
   199         (rtac contlubI 1),
   205         (rtac contlubI 1),
   200         (strip_tac 1),
   206         (strip_tac 1),
   201         (rtac trans 1),
   207         (rtac trans 1),
   213         (etac sprod3_lemma6 1),
   219         (etac sprod3_lemma6 1),
   214         (atac 1)
   220         (atac 1)
   215         ]);
   221         ]);
   216 
   222 
   217 
   223 
   218 qed_goal "cont_Ispair1" Sprod3.thy "cont(Ispair)"
   224 qed_goal "cont_Ispair1" thy "cont(Ispair)"
   219 (fn prems =>
   225 (fn prems =>
   220         [
   226         [
   221         (rtac monocontlub2cont 1),
   227         (rtac monocontlub2cont 1),
   222         (rtac monofun_Ispair1 1),
   228         (rtac monofun_Ispair1 1),
   223         (rtac contlub_Ispair1 1)
   229         (rtac contlub_Ispair1 1)
   224         ]);
   230         ]);
   225 
   231 
   226 
   232 
   227 qed_goal "cont_Ispair2" Sprod3.thy "cont(Ispair(x))"
   233 qed_goal "cont_Ispair2" thy "cont(Ispair(x))"
   228 (fn prems =>
   234 (fn prems =>
   229         [
   235         [
   230         (rtac monocontlub2cont 1),
   236         (rtac monocontlub2cont 1),
   231         (rtac monofun_Ispair2 1),
   237         (rtac monofun_Ispair2 1),
   232         (rtac contlub_Ispair2 1)
   238         (rtac contlub_Ispair2 1)
   233         ]);
   239         ]);
   234 
   240 
   235 qed_goal "contlub_Isfst" Sprod3.thy "contlub(Isfst)"
   241 qed_goal "contlub_Isfst" thy "contlub(Isfst)"
   236  (fn prems =>
   242  (fn prems =>
   237         [
   243         [
   238         (rtac contlubI 1),
   244         (rtac contlubI 1),
   239         (strip_tac 1),
   245         (strip_tac 1),
   240         (stac (lub_sprod RS thelubI) 1),
   246         (stac (lub_sprod RS thelubI) 1),
   255         (etac (defined_IsfstIssnd RS conjunct2) 2),
   261         (etac (defined_IsfstIssnd RS conjunct2) 2),
   256         (fast_tac (HOL_cs addSDs [monofun_Issnd RS ch2ch_monofun RS 
   262         (fast_tac (HOL_cs addSDs [monofun_Issnd RS ch2ch_monofun RS 
   257                                   chain_UU_I RS spec]) 1)
   263                                   chain_UU_I RS spec]) 1)
   258         ]);
   264         ]);
   259 
   265 
   260 qed_goal "contlub_Issnd" Sprod3.thy "contlub(Issnd)"
   266 qed_goal "contlub_Issnd" thy "contlub(Issnd)"
   261 (fn prems =>
   267 (fn prems =>
   262         [
   268         [
   263         (rtac contlubI 1),
   269         (rtac contlubI 1),
   264         (strip_tac 1),
   270         (strip_tac 1),
   265         (stac (lub_sprod RS thelubI) 1),
   271         (stac (lub_sprod RS thelubI) 1),
   279         (etac (defined_IsfstIssnd RS conjunct1) 2),
   285         (etac (defined_IsfstIssnd RS conjunct1) 2),
   280         (fast_tac (HOL_cs addSDs [monofun_Isfst RS ch2ch_monofun RS
   286         (fast_tac (HOL_cs addSDs [monofun_Isfst RS ch2ch_monofun RS
   281                                   chain_UU_I RS spec]) 1)
   287                                   chain_UU_I RS spec]) 1)
   282         ]);
   288         ]);
   283 
   289 
   284 qed_goal "cont_Isfst" Sprod3.thy "cont(Isfst)"
   290 qed_goal "cont_Isfst" thy "cont(Isfst)"
   285 (fn prems =>
   291 (fn prems =>
   286         [
   292         [
   287         (rtac monocontlub2cont 1),
   293         (rtac monocontlub2cont 1),
   288         (rtac monofun_Isfst 1),
   294         (rtac monofun_Isfst 1),
   289         (rtac contlub_Isfst 1)
   295         (rtac contlub_Isfst 1)
   290         ]);
   296         ]);
   291 
   297 
   292 qed_goal "cont_Issnd" Sprod3.thy "cont(Issnd)"
   298 qed_goal "cont_Issnd" thy "cont(Issnd)"
   293 (fn prems =>
   299 (fn prems =>
   294         [
   300         [
   295         (rtac monocontlub2cont 1),
   301         (rtac monocontlub2cont 1),
   296         (rtac monofun_Issnd 1),
   302         (rtac monofun_Issnd 1),
   297         (rtac contlub_Issnd 1)
   303         (rtac contlub_Issnd 1)
   298         ]);
   304         ]);
   299 
   305 
   300 (* 
   306 qed_goal "spair_eq" thy "[|x1=x2;y1=y2|] ==> (|x1,y1|) = (|x2,y2|)"
   301  -------------------------------------------------------------------------- 
       
   302  more lemmas for Sprod3.thy 
       
   303  
       
   304  -------------------------------------------------------------------------- 
       
   305 *)
       
   306 
       
   307 qed_goal "spair_eq" Sprod3.thy "[|x1=x2;y1=y2|] ==> (|x1,y1|) = (|x2,y2|)"
       
   308  (fn prems =>
   307  (fn prems =>
   309         [
   308         [
   310         (cut_facts_tac prems 1),
   309         (cut_facts_tac prems 1),
   311         (fast_tac HOL_cs 1)
   310         (fast_tac HOL_cs 1)
   312         ]);
   311         ]);
   313 
   312 
   314 (* ------------------------------------------------------------------------ *)
   313 (* ------------------------------------------------------------------------ *)
   315 (* convert all lemmas to the continuous versions                            *)
   314 (* convert all lemmas to the continuous versions                            *)
   316 (* ------------------------------------------------------------------------ *)
   315 (* ------------------------------------------------------------------------ *)
   317 
   316 
   318 qed_goalw "beta_cfun_sprod" Sprod3.thy [spair_def]
   317 qed_goalw "beta_cfun_sprod" thy [spair_def]
   319         "(LAM x y.Ispair x y)`a`b = Ispair a b"
   318         "(LAM x y.Ispair x y)`a`b = Ispair a b"
   320  (fn prems =>
   319  (fn prems =>
   321         [
   320         [
   322         (stac beta_cfun 1),
   321         (stac beta_cfun 1),
   323         (simp_tac (!simpset addsimps [cont_Ispair2, cont_Ispair1,
   322         (simp_tac (!simpset addsimps [cont_Ispair2, cont_Ispair1,
   325         (stac beta_cfun 1),
   324         (stac beta_cfun 1),
   326         (rtac cont_Ispair2 1),
   325         (rtac cont_Ispair2 1),
   327         (rtac refl 1)
   326         (rtac refl 1)
   328         ]);
   327         ]);
   329 
   328 
   330 qed_goalw "inject_spair" Sprod3.thy [spair_def]
   329 qed_goalw "inject_spair" thy [spair_def]
   331         "[| aa~=UU ; ba~=UU ; (|a,b|)=(|aa,ba|) |] ==> a=aa & b=ba"
   330         "[| aa~=UU ; ba~=UU ; (|a,b|)=(|aa,ba|) |] ==> a=aa & b=ba"
   332  (fn prems =>
   331  (fn prems =>
   333         [
   332         [
   334         (cut_facts_tac prems 1),
   333         (cut_facts_tac prems 1),
   335         (etac inject_Ispair 1),
   334         (etac inject_Ispair 1),
   337         (etac box_equals 1),
   336         (etac box_equals 1),
   338         (rtac beta_cfun_sprod 1),
   337         (rtac beta_cfun_sprod 1),
   339         (rtac beta_cfun_sprod 1)
   338         (rtac beta_cfun_sprod 1)
   340         ]);
   339         ]);
   341 
   340 
   342 qed_goalw "inst_sprod_pcpo2" Sprod3.thy [spair_def] "UU = (|UU,UU|)"
   341 qed_goalw "inst_sprod_pcpo2" thy [spair_def] "UU = (|UU,UU|)"
   343  (fn prems =>
   342  (fn prems =>
   344         [
   343         [
   345         (rtac sym 1),
   344         (rtac sym 1),
   346         (rtac trans 1),
   345         (rtac trans 1),
   347         (rtac beta_cfun_sprod 1),
   346         (rtac beta_cfun_sprod 1),
   348         (rtac sym 1),
   347         (rtac sym 1),
   349         (rtac inst_sprod_pcpo 1)
   348         (rtac inst_sprod_pcpo 1)
   350         ]);
   349         ]);
   351 
   350 
   352 qed_goalw "strict_spair" Sprod3.thy [spair_def] 
   351 qed_goalw "strict_spair" thy [spair_def] 
   353         "(a=UU | b=UU) ==> (|a,b|)=UU"
   352         "(a=UU | b=UU) ==> (|a,b|)=UU"
   354  (fn prems =>
   353  (fn prems =>
   355         [
   354         [
   356         (cut_facts_tac prems 1),
   355         (cut_facts_tac prems 1),
   357         (rtac trans 1),
   356         (rtac trans 1),
   359         (rtac trans 1),
   358         (rtac trans 1),
   360         (rtac (inst_sprod_pcpo RS sym) 2),
   359         (rtac (inst_sprod_pcpo RS sym) 2),
   361         (etac strict_Ispair 1)
   360         (etac strict_Ispair 1)
   362         ]);
   361         ]);
   363 
   362 
   364 qed_goalw "strict_spair1" Sprod3.thy [spair_def] "(|UU,b|) = UU"
   363 qed_goalw "strict_spair1" thy [spair_def] "(|UU,b|) = UU"
   365  (fn prems =>
   364  (fn prems =>
   366         [
   365         [
   367         (stac beta_cfun_sprod 1),
   366         (stac beta_cfun_sprod 1),
   368         (rtac trans 1),
   367         (rtac trans 1),
   369         (rtac (inst_sprod_pcpo RS sym) 2),
   368         (rtac (inst_sprod_pcpo RS sym) 2),
   370         (rtac strict_Ispair1 1)
   369         (rtac strict_Ispair1 1)
   371         ]);
   370         ]);
   372 
   371 
   373 qed_goalw "strict_spair2" Sprod3.thy [spair_def] "(|a,UU|) = UU"
   372 qed_goalw "strict_spair2" thy [spair_def] "(|a,UU|) = UU"
   374  (fn prems =>
   373  (fn prems =>
   375         [
   374         [
   376         (stac beta_cfun_sprod 1),
   375         (stac beta_cfun_sprod 1),
   377         (rtac trans 1),
   376         (rtac trans 1),
   378         (rtac (inst_sprod_pcpo RS sym) 2),
   377         (rtac (inst_sprod_pcpo RS sym) 2),
   379         (rtac strict_Ispair2 1)
   378         (rtac strict_Ispair2 1)
   380         ]);
   379         ]);
   381 
   380 
   382 qed_goalw "strict_spair_rev" Sprod3.thy [spair_def]
   381 qed_goalw "strict_spair_rev" thy [spair_def]
   383         "(|x,y|)~=UU ==> ~x=UU & ~y=UU"
   382         "(|x,y|)~=UU ==> ~x=UU & ~y=UU"
   384  (fn prems =>
   383  (fn prems =>
   385         [
   384         [
   386         (cut_facts_tac prems 1),
   385         (cut_facts_tac prems 1),
   387         (rtac strict_Ispair_rev 1),
   386         (rtac strict_Ispair_rev 1),
   388         (rtac (beta_cfun_sprod RS subst) 1),
   387         (rtac (beta_cfun_sprod RS subst) 1),
   389         (rtac (inst_sprod_pcpo RS subst) 1),
   388         (rtac (inst_sprod_pcpo RS subst) 1),
   390         (atac 1)
   389         (atac 1)
   391         ]);
   390         ]);
   392 
   391 
   393 qed_goalw "defined_spair_rev" Sprod3.thy [spair_def]
   392 qed_goalw "defined_spair_rev" thy [spair_def]
   394  "(|a,b|) = UU ==> (a = UU | b = UU)"
   393  "(|a,b|) = UU ==> (a = UU | b = UU)"
   395  (fn prems =>
   394  (fn prems =>
   396         [
   395         [
   397         (cut_facts_tac prems 1),
   396         (cut_facts_tac prems 1),
   398         (rtac defined_Ispair_rev 1),
   397         (rtac defined_Ispair_rev 1),
   399         (rtac (beta_cfun_sprod RS subst) 1),
   398         (rtac (beta_cfun_sprod RS subst) 1),
   400         (rtac (inst_sprod_pcpo RS subst) 1),
   399         (rtac (inst_sprod_pcpo RS subst) 1),
   401         (atac 1)
   400         (atac 1)
   402         ]);
   401         ]);
   403 
   402 
   404 qed_goalw "defined_spair" Sprod3.thy [spair_def]
   403 qed_goalw "defined_spair" thy [spair_def]
   405         "[|a~=UU; b~=UU|] ==> (|a,b|) ~= UU"
   404         "[|a~=UU; b~=UU|] ==> (|a,b|) ~= UU"
   406  (fn prems =>
   405  (fn prems =>
   407         [
   406         [
   408         (cut_facts_tac prems 1),
   407         (cut_facts_tac prems 1),
   409         (stac beta_cfun_sprod 1),
   408         (stac beta_cfun_sprod 1),
   410         (stac inst_sprod_pcpo 1),
   409         (stac inst_sprod_pcpo 1),
   411         (etac defined_Ispair 1),
   410         (etac defined_Ispair 1),
   412         (atac 1)
   411         (atac 1)
   413         ]);
   412         ]);
   414 
   413 
   415 qed_goalw "Exh_Sprod2" Sprod3.thy [spair_def]
   414 qed_goalw "Exh_Sprod2" thy [spair_def]
   416         "z=UU | (? a b. z=(|a,b|) & a~=UU & b~=UU)"
   415         "z=UU | (? a b. z=(|a,b|) & a~=UU & b~=UU)"
   417  (fn prems =>
   416  (fn prems =>
   418         [
   417         [
   419         (rtac (Exh_Sprod RS disjE) 1),
   418         (rtac (Exh_Sprod RS disjE) 1),
   420         (rtac disjI1 1),
   419         (rtac disjI1 1),
   430         (fast_tac HOL_cs 1),
   429         (fast_tac HOL_cs 1),
   431         (fast_tac HOL_cs 1)
   430         (fast_tac HOL_cs 1)
   432         ]);
   431         ]);
   433 
   432 
   434 
   433 
   435 qed_goalw "sprodE" Sprod3.thy [spair_def]
   434 qed_goalw "sprodE" thy [spair_def]
   436 "[|p=UU ==> Q;!!x y. [|p=(|x,y|);x~=UU ; y~=UU|] ==> Q|] ==> Q"
   435 "[|p=UU ==> Q;!!x y. [|p=(|x,y|);x~=UU ; y~=UU|] ==> Q|] ==> Q"
   437 (fn prems =>
   436 (fn prems =>
   438         [
   437         [
   439         (rtac IsprodE 1),
   438         (rtac IsprodE 1),
   440         (resolve_tac prems 1),
   439         (resolve_tac prems 1),
   446         (stac beta_cfun_sprod 1),
   445         (stac beta_cfun_sprod 1),
   447         (atac 1)
   446         (atac 1)
   448         ]);
   447         ]);
   449 
   448 
   450 
   449 
   451 qed_goalw "strict_sfst" Sprod3.thy [sfst_def] 
   450 qed_goalw "strict_sfst" thy [sfst_def] 
   452         "p=UU==>sfst`p=UU"
   451         "p=UU==>sfst`p=UU"
   453  (fn prems =>
   452  (fn prems =>
   454         [
   453         [
   455         (cut_facts_tac prems 1),
   454         (cut_facts_tac prems 1),
   456         (stac beta_cfun 1),
   455         (stac beta_cfun 1),
   458         (rtac strict_Isfst 1),
   457         (rtac strict_Isfst 1),
   459         (rtac (inst_sprod_pcpo RS subst) 1),
   458         (rtac (inst_sprod_pcpo RS subst) 1),
   460         (atac 1)
   459         (atac 1)
   461         ]);
   460         ]);
   462 
   461 
   463 qed_goalw "strict_sfst1" Sprod3.thy [sfst_def,spair_def] 
   462 qed_goalw "strict_sfst1" thy [sfst_def,spair_def] 
   464         "sfst`(|UU,y|) = UU"
   463         "sfst`(|UU,y|) = UU"
   465  (fn prems =>
   464  (fn prems =>
   466         [
   465         [
   467         (stac beta_cfun_sprod 1),
   466         (stac beta_cfun_sprod 1),
   468         (stac beta_cfun 1),
   467         (stac beta_cfun 1),
   469         (rtac cont_Isfst 1),
   468         (rtac cont_Isfst 1),
   470         (rtac strict_Isfst1 1)
   469         (rtac strict_Isfst1 1)
   471         ]);
   470         ]);
   472  
   471  
   473 qed_goalw "strict_sfst2" Sprod3.thy [sfst_def,spair_def] 
   472 qed_goalw "strict_sfst2" thy [sfst_def,spair_def] 
   474         "sfst`(|x,UU|) = UU"
   473         "sfst`(|x,UU|) = UU"
   475  (fn prems =>
   474  (fn prems =>
   476         [
   475         [
   477         (stac beta_cfun_sprod 1),
   476         (stac beta_cfun_sprod 1),
   478         (stac beta_cfun 1),
   477         (stac beta_cfun 1),
   479         (rtac cont_Isfst 1),
   478         (rtac cont_Isfst 1),
   480         (rtac strict_Isfst2 1)
   479         (rtac strict_Isfst2 1)
   481         ]);
   480         ]);
   482 
   481 
   483 qed_goalw "strict_ssnd" Sprod3.thy [ssnd_def] 
   482 qed_goalw "strict_ssnd" thy [ssnd_def] 
   484         "p=UU==>ssnd`p=UU"
   483         "p=UU==>ssnd`p=UU"
   485  (fn prems =>
   484  (fn prems =>
   486         [
   485         [
   487         (cut_facts_tac prems 1),
   486         (cut_facts_tac prems 1),
   488         (stac beta_cfun 1),
   487         (stac beta_cfun 1),
   490         (rtac strict_Issnd 1),
   489         (rtac strict_Issnd 1),
   491         (rtac (inst_sprod_pcpo RS subst) 1),
   490         (rtac (inst_sprod_pcpo RS subst) 1),
   492         (atac 1)
   491         (atac 1)
   493         ]);
   492         ]);
   494 
   493 
   495 qed_goalw "strict_ssnd1" Sprod3.thy [ssnd_def,spair_def] 
   494 qed_goalw "strict_ssnd1" thy [ssnd_def,spair_def] 
   496         "ssnd`(|UU,y|) = UU"
   495         "ssnd`(|UU,y|) = UU"
   497  (fn prems =>
   496  (fn prems =>
   498         [
   497         [
   499         (stac beta_cfun_sprod 1),
   498         (stac beta_cfun_sprod 1),
   500         (stac beta_cfun 1),
   499         (stac beta_cfun 1),
   501         (rtac cont_Issnd 1),
   500         (rtac cont_Issnd 1),
   502         (rtac strict_Issnd1 1)
   501         (rtac strict_Issnd1 1)
   503         ]);
   502         ]);
   504 
   503 
   505 qed_goalw "strict_ssnd2" Sprod3.thy [ssnd_def,spair_def] 
   504 qed_goalw "strict_ssnd2" thy [ssnd_def,spair_def] 
   506         "ssnd`(|x,UU|) = UU"
   505         "ssnd`(|x,UU|) = UU"
   507  (fn prems =>
   506  (fn prems =>
   508         [
   507         [
   509         (stac beta_cfun_sprod 1),
   508         (stac beta_cfun_sprod 1),
   510         (stac beta_cfun 1),
   509         (stac beta_cfun 1),
   511         (rtac cont_Issnd 1),
   510         (rtac cont_Issnd 1),
   512         (rtac strict_Issnd2 1)
   511         (rtac strict_Issnd2 1)
   513         ]);
   512         ]);
   514 
   513 
   515 qed_goalw "sfst2" Sprod3.thy [sfst_def,spair_def] 
   514 qed_goalw "sfst2" thy [sfst_def,spair_def] 
   516         "y~=UU ==>sfst`(|x,y|)=x"
   515         "y~=UU ==>sfst`(|x,y|)=x"
   517  (fn prems =>
   516  (fn prems =>
   518         [
   517         [
   519         (cut_facts_tac prems 1),
   518         (cut_facts_tac prems 1),
   520         (stac beta_cfun_sprod 1),
   519         (stac beta_cfun_sprod 1),
   521         (stac beta_cfun 1),
   520         (stac beta_cfun 1),
   522         (rtac cont_Isfst 1),
   521         (rtac cont_Isfst 1),
   523         (etac Isfst2 1)
   522         (etac Isfst2 1)
   524         ]);
   523         ]);
   525 
   524 
   526 qed_goalw "ssnd2" Sprod3.thy [ssnd_def,spair_def] 
   525 qed_goalw "ssnd2" thy [ssnd_def,spair_def] 
   527         "x~=UU ==>ssnd`(|x,y|)=y"
   526         "x~=UU ==>ssnd`(|x,y|)=y"
   528  (fn prems =>
   527  (fn prems =>
   529         [
   528         [
   530         (cut_facts_tac prems 1),
   529         (cut_facts_tac prems 1),
   531         (stac beta_cfun_sprod 1),
   530         (stac beta_cfun_sprod 1),
   533         (rtac cont_Issnd 1),
   532         (rtac cont_Issnd 1),
   534         (etac Issnd2 1)
   533         (etac Issnd2 1)
   535         ]);
   534         ]);
   536 
   535 
   537 
   536 
   538 qed_goalw "defined_sfstssnd" Sprod3.thy [sfst_def,ssnd_def,spair_def]
   537 qed_goalw "defined_sfstssnd" thy [sfst_def,ssnd_def,spair_def]
   539         "p~=UU ==> sfst`p ~=UU & ssnd`p ~=UU"
   538         "p~=UU ==> sfst`p ~=UU & ssnd`p ~=UU"
   540  (fn prems =>
   539  (fn prems =>
   541         [
   540         [
   542         (cut_facts_tac prems 1),
   541         (cut_facts_tac prems 1),
   543         (stac beta_cfun 1),
   542         (stac beta_cfun 1),
   548         (rtac (inst_sprod_pcpo RS subst) 1),
   547         (rtac (inst_sprod_pcpo RS subst) 1),
   549         (atac 1)
   548         (atac 1)
   550         ]);
   549         ]);
   551  
   550  
   552 
   551 
   553 qed_goalw "surjective_pairing_Sprod2" Sprod3.thy 
   552 qed_goalw "surjective_pairing_Sprod2" thy 
   554         [sfst_def,ssnd_def,spair_def] "(|sfst`p , ssnd`p|) = p"
   553         [sfst_def,ssnd_def,spair_def] "(|sfst`p , ssnd`p|) = p"
   555  (fn prems =>
   554  (fn prems =>
   556         [
   555         [
   557         (stac beta_cfun_sprod 1),
   556         (stac beta_cfun_sprod 1),
   558         (stac beta_cfun 1),
   557         (stac beta_cfun 1),
   561         (rtac cont_Isfst 1),
   560         (rtac cont_Isfst 1),
   562         (rtac (surjective_pairing_Sprod RS sym) 1)
   561         (rtac (surjective_pairing_Sprod RS sym) 1)
   563         ]);
   562         ]);
   564 
   563 
   565 
   564 
   566 qed_goalw "less_sprod5b" Sprod3.thy [sfst_def,ssnd_def,spair_def]
   565 qed_goalw "lub_sprod2" thy [sfst_def,ssnd_def,spair_def]
   567  "p1~=UU ==> (p1<<p2) = (sfst`p1<<sfst`p2 & ssnd`p1<<ssnd`p2)"
       
   568  (fn prems =>
       
   569         [
       
   570         (cut_facts_tac prems 1),
       
   571         (stac beta_cfun 1),
       
   572         (rtac cont_Issnd 1),
       
   573         (stac beta_cfun 1),
       
   574         (rtac cont_Issnd 1),
       
   575         (stac beta_cfun 1),
       
   576         (rtac cont_Isfst 1),
       
   577         (stac beta_cfun 1),
       
   578         (rtac cont_Isfst 1),
       
   579         (rtac less_sprod3b 1),
       
   580         (rtac (inst_sprod_pcpo RS subst) 1),
       
   581         (atac 1)
       
   582         ]);
       
   583 
       
   584  
       
   585 qed_goalw "less_sprod5c" Sprod3.thy [sfst_def,ssnd_def,spair_def]
       
   586  "[|(|xa,ya|) << (|x,y|);xa~=UU;ya~=UU;x~=UU;y~=UU|] ==>xa<<x & ya << y"
       
   587  (fn prems =>
       
   588         [
       
   589         (cut_facts_tac prems 1),
       
   590         (rtac less_sprod4c 1),
       
   591         (REPEAT (atac 2)),
       
   592         (rtac (beta_cfun_sprod RS subst) 1),
       
   593         (rtac (beta_cfun_sprod RS subst) 1),
       
   594         (atac 1)
       
   595         ]);
       
   596 
       
   597 qed_goalw "lub_sprod2" Sprod3.thy [sfst_def,ssnd_def,spair_def]
       
   598 "[|is_chain(S)|] ==> range(S) <<| \
   566 "[|is_chain(S)|] ==> range(S) <<| \
   599 \ (| lub(range(%i.sfst`(S i))), lub(range(%i.ssnd`(S i))) |)"
   567 \ (| lub(range(%i.sfst`(S i))), lub(range(%i.ssnd`(S i))) |)"
   600  (fn prems =>
   568  (fn prems =>
   601         [
   569         [
   602         (cut_facts_tac prems 1),
   570         (cut_facts_tac prems 1),
   615  "is_chain ?S1 ==>
   583  "is_chain ?S1 ==>
   616  lub (range ?S1) =
   584  lub (range ?S1) =
   617  (|lub (range (%i. sfst`(?S1 i))), lub (range (%i. ssnd`(?S1 i)))|)" : thm
   585  (|lub (range (%i. sfst`(?S1 i))), lub (range (%i. ssnd`(?S1 i)))|)" : thm
   618 *)
   586 *)
   619 
   587 
   620 qed_goalw "ssplit1" Sprod3.thy [ssplit_def]
   588 qed_goalw "ssplit1" thy [ssplit_def]
   621         "ssplit`f`UU=UU"
   589         "ssplit`f`UU=UU"
   622  (fn prems =>
   590  (fn prems =>
   623         [
   591         [
   624         (stac beta_cfun 1),
   592         (stac beta_cfun 1),
   625         (Simp_tac 1),
   593         (Simp_tac 1),
   626         (stac strictify1 1),
   594         (stac strictify1 1),
   627         (rtac refl 1)
   595         (rtac refl 1)
   628         ]);
   596         ]);
   629 
   597 
   630 qed_goalw "ssplit2" Sprod3.thy [ssplit_def]
   598 qed_goalw "ssplit2" thy [ssplit_def]
   631         "[|x~=UU;y~=UU|] ==> ssplit`f`(|x,y|)= f`x`y"
   599         "[|x~=UU;y~=UU|] ==> ssplit`f`(|x,y|)= f`x`y"
   632  (fn prems =>
   600  (fn prems =>
   633         [
   601         [
   634         (stac beta_cfun 1),
   602         (stac beta_cfun 1),
   635         (Simp_tac 1),
   603         (Simp_tac 1),
   645         (resolve_tac prems 1),
   613         (resolve_tac prems 1),
   646         (rtac refl 1)
   614         (rtac refl 1)
   647         ]);
   615         ]);
   648 
   616 
   649 
   617 
   650 qed_goalw "ssplit3" Sprod3.thy [ssplit_def]
   618 qed_goalw "ssplit3" thy [ssplit_def]
   651   "ssplit`spair`z=z"
   619   "ssplit`spair`z=z"
   652  (fn prems =>
   620  (fn prems =>
   653         [
   621         [
   654         (stac beta_cfun 1),
   622         (stac beta_cfun 1),
   655         (Simp_tac 1),
   623         (Simp_tac 1),
   662         (stac beta_cfun 1),
   630         (stac beta_cfun 1),
   663         (Simp_tac 1),
   631         (Simp_tac 1),
   664         (rtac surjective_pairing_Sprod2 1)
   632         (rtac surjective_pairing_Sprod2 1)
   665         ]);
   633         ]);
   666 
   634 
   667 
       
   668 (* ------------------------------------------------------------------------ *)
   635 (* ------------------------------------------------------------------------ *)
   669 (* install simplifier for Sprod                                             *)
   636 (* install simplifier for Sprod                                             *)
   670 (* ------------------------------------------------------------------------ *)
   637 (* ------------------------------------------------------------------------ *)
   671 
   638 
   672 val Sprod_rews = [strict_spair1,strict_spair2,strict_sfst1,strict_sfst2,
   639 val Sprod_rews = [strict_spair1,strict_spair2,strict_sfst1,strict_sfst2,
   673                 strict_ssnd1,strict_ssnd2,sfst2,ssnd2,defined_spair,
   640                 strict_ssnd1,strict_ssnd2,sfst2,ssnd2,defined_spair,
   674                 ssplit1,ssplit2];
   641                 ssplit1,ssplit2];
   675 
   642 Addsimps Sprod_rews;
   676 Addsimps [strict_spair1,strict_spair2,strict_sfst1,strict_sfst2,
   643 
   677           strict_ssnd1,strict_ssnd2,sfst2,ssnd2,defined_spair,
       
   678           ssplit1,ssplit2];