src/HOL/BNF/Tools/bnf_def_tactics.ML
changeset 54189 c0186a0d8cb3
parent 53562 9d8764624487
child 54792 641ea768f535
equal deleted inserted replaced
54188:5288fa24c9db 54189:c0186a0d8cb3
    29 
    29 
    30   val mk_map_transfer_tac: thm -> thm -> thm list -> thm -> thm ->
    30   val mk_map_transfer_tac: thm -> thm -> thm list -> thm -> thm ->
    31     {prems: thm list, context: Proof.context} -> tactic
    31     {prems: thm list, context: Proof.context} -> tactic
    32 
    32 
    33   val mk_in_bd_tac: int -> thm -> thm -> thm -> thm -> thm list -> thm list -> thm -> thm -> thm ->
    33   val mk_in_bd_tac: int -> thm -> thm -> thm -> thm -> thm list -> thm list -> thm -> thm -> thm ->
    34     thm -> {prems: 'a, context: Proof.context} -> tactic
    34     thm -> {prems: thm list, context: Proof.context} -> tactic
       
    35 
       
    36   val mk_trivial_wit_tac: thm list -> thm list -> {prems: thm list, context: Proof.context} ->
       
    37     tactic
    35 end;
    38 end;
    36 
    39 
    37 structure BNF_Def_Tactics : BNF_DEF_TACTICS =
    40 structure BNF_Def_Tactics : BNF_DEF_TACTICS =
    38 struct
    41 struct
    39 
    42 
   300         rtac sym,
   303         rtac sym,
   301         rtac (box_equals OF [map_cong0 OF replicate live @{thm fun_cong[OF sum_case_o_inj(1)]},
   304         rtac (box_equals OF [map_cong0 OF replicate live @{thm fun_cong[OF sum_case_o_inj(1)]},
   302            map_comp RS sym, map_id])] 1
   305            map_comp RS sym, map_id])] 1
   303   end;
   306   end;
   304 
   307 
       
   308 fun mk_trivial_wit_tac wit_defs set_maps {context = ctxt, prems = _} =
       
   309   unfold_thms_tac ctxt wit_defs THEN HEADGOAL (EVERY' (map (fn thm =>
       
   310     dtac (thm RS equalityD1 RS set_mp) THEN' etac imageE THEN' atac) set_maps)) THEN ALLGOALS atac;
       
   311 
   305 end;
   312 end;