src/HOL/Codatatype/Tools/bnf_comp_tactics.ML
changeset 49506 aeb0cc8889f2
parent 49504 df9b897fb254
child 49509 163914705f8d
equal deleted inserted replaced
49505:a944eefb67e6 49506:aeb0cc8889f2
    33 
    33 
    34   val mk_permute_in_alt_tac: ''a list -> ''a list -> tactic
    34   val mk_permute_in_alt_tac: ''a list -> ''a list -> tactic
    35   val mk_permute_in_bd_tac: ''a list -> ''a list -> thm -> thm -> thm -> tactic
    35   val mk_permute_in_bd_tac: ''a list -> ''a list -> thm -> thm -> thm -> tactic
    36 
    36 
    37   val mk_map_wpull_tac: thm -> thm list -> thm -> tactic
    37   val mk_map_wpull_tac: thm -> thm list -> thm -> tactic
    38   val mk_simple_rel_O_Gr_tac: Proof.context -> thm -> thm -> thm -> tactic
    38   val mk_simple_srel_O_Gr_tac: Proof.context -> thm -> thm -> thm -> tactic
    39   val mk_simple_wit_tac: thm list -> tactic
    39   val mk_simple_wit_tac: thm list -> tactic
    40 end;
    40 end;
    41 
    41 
    42 structure BNF_Comp_Tactics : BNF_COMP_TACTICS =
    42 structure BNF_Comp_Tactics : BNF_COMP_TACTICS =
    43 struct
    43 struct
   405 fun mk_map_wpull_tac comp_in_alt inner_map_wpulls outer_map_wpull =
   405 fun mk_map_wpull_tac comp_in_alt inner_map_wpulls outer_map_wpull =
   406   (rtac (@{thm wpull_cong} OF (replicate 3 comp_in_alt)) THEN' rtac outer_map_wpull) 1 THEN
   406   (rtac (@{thm wpull_cong} OF (replicate 3 comp_in_alt)) THEN' rtac outer_map_wpull) 1 THEN
   407   WRAP (fn thm => rtac thm 1 THEN REPEAT_DETERM (atac 1)) (K all_tac) inner_map_wpulls all_tac THEN
   407   WRAP (fn thm => rtac thm 1 THEN REPEAT_DETERM (atac 1)) (K all_tac) inner_map_wpulls all_tac THEN
   408   TRY (REPEAT_DETERM (atac 1 ORELSE rtac @{thm wpull_id} 1));
   408   TRY (REPEAT_DETERM (atac 1 ORELSE rtac @{thm wpull_id} 1));
   409 
   409 
   410 fun mk_simple_rel_O_Gr_tac ctxt rel_def rel_O_Gr in_alt_thm =
   410 fun mk_simple_srel_O_Gr_tac ctxt srel_def srel_O_Gr in_alt_thm =
   411   rtac (unfold_thms ctxt [rel_def] (trans OF [rel_O_Gr, in_alt_thm RS @{thm subst_rel_def} RS sym]))
   411   rtac (unfold_thms ctxt [srel_def]
   412     1;
   412     (trans OF [srel_O_Gr, in_alt_thm RS @{thm subst_rel_def} RS sym])) 1;
   413 
   413 
   414 fun mk_simple_wit_tac wit_thms = ALLGOALS (atac ORELSE' eresolve_tac (@{thm emptyE} :: wit_thms));
   414 fun mk_simple_wit_tac wit_thms = ALLGOALS (atac ORELSE' eresolve_tac (@{thm emptyE} :: wit_thms));
   415 
   415 
   416 end;
   416 end;