made new tactic even more robust
authorblanchet
Wed, 03 Sep 2014 22:47:05 +0200
changeset 58172 f04e24a24fb9
parent 58171 5777ec326822
child 58173 7a259137a0ba
made new tactic even more robust
src/HOL/Library/bnf_lfp_countable.ML
--- a/src/HOL/Library/bnf_lfp_countable.ML	Wed Sep 03 22:47:05 2014 +0200
+++ b/src/HOL/Library/bnf_lfp_countable.ML	Wed Sep 03 22:47:05 2014 +0200
@@ -33,8 +33,8 @@
   DEEPEN (1, 64 (* large number *))
     (fn depth => meta_spec_mp_tac depth THEN' etac allE THEN' etac impE THEN' atac THEN' atac) 0;
 
-val same_ctr_simps =
-  @{thms sum_encode_eq prod_encode_eq sum.inject prod.inject to_nat_split snd_conv simp_thms};
+val same_ctr_simps = @{thms sum_encode_eq prod_encode_eq sum.inject prod.inject to_nat_split
+  id_apply snd_conv simp_thms};
 val distinct_ctrs_simps = @{thms sum_encode_eq sum.inject sum.distinct simp_thms};
 
 fun same_ctr_tac ctxt injects recs map_congs' inj_map_strongs' =
@@ -42,7 +42,7 @@
       (ss_only (injects @ recs @ map_congs' @ same_ctr_simps) ctxt) THEN_MAYBE'
     TRY o REPEAT_ALL_NEW (rtac conjI) THEN_ALL_NEW
     REPEAT_ALL_NEW (eresolve_tac (conjE :: inj_map_strongs')) THEN_ALL_NEW
-    use_induction_hypothesis_tac);
+    (atac ORELSE' use_induction_hypothesis_tac));
 
 fun distinct_ctrs_tac ctxt recs =
   HEADGOAL (asm_full_simp_tac (ss_only (recs @ distinct_ctrs_simps) ctxt));