intr_elim.ML
changeset 133 4a2bb4fbc168
parent 128 89669c58e506
child 140 f745ff8bdb91
equal deleted inserted replaced
132:47be9d22a0d6 133:4a2bb4fbc168
   111 
   111 
   112 val elim = rule_by_tactic basic_elim_tac (unfold RS equals_CollectD);
   112 val elim = rule_by_tactic basic_elim_tac (unfold RS equals_CollectD);
   113 
   113 
   114 (*Applies freeness of the given constructors, which *must* be unfolded by
   114 (*Applies freeness of the given constructors, which *must* be unfolded by
   115   the given defs.  Cannot simply use the local con_defs because con_defs=[] 
   115   the given defs.  Cannot simply use the local con_defs because con_defs=[] 
   116   for inference systems. *)
   116   for inference systems.
   117 fun con_elim_tac defs =
   117 fun con_elim_tac defs =
   118     rewrite_goals_tac defs THEN basic_elim_tac THEN fold_tac defs;
   118     rewrite_goals_tac defs THEN basic_elim_tac THEN fold_tac defs;
       
   119  *)
       
   120 fun con_elim_tac simps =
       
   121   let val elim_tac = REPEAT o (eresolve_tac (elim_rls@sumprod_free_SEs))
       
   122   in ALLGOALS(EVERY'[elim_tac,
       
   123                      asm_full_simp_tac (nat_ss addsimps simps),
       
   124                      elim_tac,
       
   125                      REPEAT o bound_hyp_subst_tac])
       
   126      THEN prune_params_tac
       
   127   end;
       
   128 
   119 
   129 
   120 (*String s should have the form t:Si where Si is an inductive set*)
   130 (*String s should have the form t:Si where Si is an inductive set*)
   121 fun mk_cases defs s = 
   131 fun mk_cases defs s = 
   122     rule_by_tactic (con_elim_tac defs)
   132     rule_by_tactic (con_elim_tac defs)
   123       (assume_read thy s  RS  elim);
   133       (assume_read thy s  RS  elim);