src/HOLCF/Cfun3.ML
changeset 2566 cbf02fc74332
parent 2033 639de962ded4
child 2640 ee4dfce170a0
equal deleted inserted replaced
2565:64e52912eb09 2566:cbf02fc74332
   191 
   191 
   192 (* ------------------------------------------------------------------------ *)
   192 (* ------------------------------------------------------------------------ *)
   193 (* cont2cont tactic                                                       *)
   193 (* cont2cont tactic                                                       *)
   194 (* ------------------------------------------------------------------------ *)
   194 (* ------------------------------------------------------------------------ *)
   195 
   195 
   196 val cont_lemmas = [cont_const, cont_id, cont_fapp2,
   196 val cont_lemmas1 = [cont_const, cont_id, cont_fapp2,
   197                         cont2cont_fapp,cont2cont_LAM2];
   197                     cont2cont_fapp,cont2cont_LAM2];
   198 
   198 
   199 
   199 Addsimps cont_lemmas1;
   200 val cont_tac = (fn i => (resolve_tac cont_lemmas i));
   200 
   201 
   201 
   202 val cont_tacR = (fn i => (REPEAT (cont_tac i)));
   202 (*val cont_tac = (fn i => (resolve_tac cont_lemmas i));*)
       
   203 
       
   204 (*val cont_tacR = (fn i => (REPEAT (cont_tac i)));*)
   203 
   205 
   204 (* ------------------------------------------------------------------------ *)
   206 (* ------------------------------------------------------------------------ *)
   205 (* function application _[_]  is strict in its first arguments              *)
   207 (* function application _[_]  is strict in its first arguments              *)
   206 (* ------------------------------------------------------------------------ *)
   208 (* ------------------------------------------------------------------------ *)
   207 
   209 
   209  (fn prems =>
   211  (fn prems =>
   210         [
   212         [
   211         (stac inst_cfun_pcpo 1),
   213         (stac inst_cfun_pcpo 1),
   212         (rewtac UU_cfun_def),
   214         (rewtac UU_cfun_def),
   213         (stac beta_cfun 1),
   215         (stac beta_cfun 1),
   214         (cont_tac 1),
   216         (Simp_tac 1),
   215         (rtac refl 1)
   217         (rtac refl 1)
   216         ]);
   218         ]);
   217 
   219 
   218 
   220 
   219 (* ------------------------------------------------------------------------ *)
   221 (* ------------------------------------------------------------------------ *)
   348 
   350 
   349 bind_thm ("cont_Istrictify2", contlub_Istrictify2 RS 
   351 bind_thm ("cont_Istrictify2", contlub_Istrictify2 RS 
   350         (monofun_Istrictify2 RS monocontlub2cont)); 
   352         (monofun_Istrictify2 RS monocontlub2cont)); 
   351 
   353 
   352 
   354 
   353 qed_goalw "strictify1" Cfun3.thy [strictify_def]
   355 qed_goalw "strictify1" Cfun3.thy [strictify_def] "strictify`f`UU=UU" (fn _ => [
   354         "strictify`f`UU=UU"
   356         (stac beta_cfun 1),
   355  (fn prems =>
   357          (simp_tac (!simpset addsimps [cont_Istrictify2,cont_Istrictify1,
   356         [
   358 					cont2cont_CF1L]) 1),
   357         (stac beta_cfun 1),
       
   358         (cont_tac 1),
       
   359         (rtac cont_Istrictify2 1),
       
   360         (rtac cont2cont_CF1L 1),
       
   361         (rtac cont_Istrictify1 1),
       
   362         (stac beta_cfun 1),
   359         (stac beta_cfun 1),
   363         (rtac cont_Istrictify2 1),
   360         (rtac cont_Istrictify2 1),
   364         (rtac Istrictify1 1)
   361         (rtac Istrictify1 1)
   365         ]);
   362         ]);
   366 
   363 
   367 qed_goalw "strictify2" Cfun3.thy [strictify_def]
   364 qed_goalw "strictify2" Cfun3.thy [strictify_def]
   368         "~x=UU ==> strictify`f`x=f`x"
   365         "~x=UU ==> strictify`f`x=f`x"  (fn prems => [
   369  (fn prems =>
   366         (stac beta_cfun 1),
   370         [
   367          (simp_tac (!simpset addsimps [cont_Istrictify2,cont_Istrictify1,
   371         (stac beta_cfun 1),
   368 					cont2cont_CF1L]) 1),
   372         (cont_tac 1),
       
   373         (rtac cont_Istrictify2 1),
       
   374         (rtac cont2cont_CF1L 1),
       
   375         (rtac cont_Istrictify1 1),
       
   376         (stac beta_cfun 1),
   369         (stac beta_cfun 1),
   377         (rtac cont_Istrictify2 1),
   370         (rtac cont_Istrictify2 1),
   378         (rtac Istrictify2 1),
   371         (rtac Istrictify2 1),
   379         (resolve_tac prems 1)
   372         (resolve_tac prems 1)
   380         ]);
   373         ]);
   389 
   382 
   390 (* ------------------------------------------------------------------------ *)
   383 (* ------------------------------------------------------------------------ *)
   391 (* use cont_tac as autotac.                                                *)
   384 (* use cont_tac as autotac.                                                *)
   392 (* ------------------------------------------------------------------------ *)
   385 (* ------------------------------------------------------------------------ *)
   393 
   386 
   394 simpset := !simpset addsolver (K (DEPTH_SOLVE_1 o cont_tac));
   387 (*simpset := !simpset addsolver (K (DEPTH_SOLVE_1 o cont_tac));*)