diff --git a/theories/collections.v b/theories/collections.v index ada7f6b819b236bfdb7f9c8c5b415628ca33f27e..4bcb31e7f846f448d31a418c7b5c5427d2328b44 100644 --- a/theories/collections.v +++ b/theories/collections.v @@ -265,7 +265,7 @@ Ltac set_unfold := [set_solver] already. We use the [naive_solver] tactic as a substitute. This tactic either fails or proves the goal. *) Tactic Notation "set_solver" "by" tactic3(tac) := - try (reflexivity || eassumption); + try fast_done; intros; setoid_subst; set_unfold; intros; setoid_subst; diff --git a/theories/tactics.v b/theories/tactics.v index 09d32d06640f8d2093bf2138c442332a1be2850d..67045a6d8b4cb41bd17d58664a6cb723b94b52ef 100644 --- a/theories/tactics.v +++ b/theories/tactics.v @@ -34,6 +34,13 @@ is rather efficient when having big hint databases, or expensive [Hint Extern] declarations as the ones above. *) Tactic Notation "intuition" := intuition auto. +(* [done] can get slow as it calls "trivial". [fast_done] can solve way less + goals, but it will also always finish quickly. *) +Ltac fast_done := + solve [ reflexivity | eassumption | symmetry; eassumption ]. +Tactic Notation "fast_by" tactic(tac) := + tac; fast_done. + (** A slightly modified version of Ssreflect's finishing tactic [done]. It also performs [reflexivity] and uses symmetry of negated equalities. Compared to Ssreflect's [done], it does not compute the goal's [hnf] so as to avoid @@ -42,10 +49,9 @@ Coq's [easy] tactic as it does not perform [inversion]. *) Ltac done := trivial; intros; solve [ repeat first - [ solve [trivial] + [ fast_done + | solve [trivial] | solve [symmetry; trivial] - | eassumption - | reflexivity | discriminate | contradiction | solve [apply not_symmetry; trivial] @@ -288,7 +294,7 @@ Ltac auto_proper := (* Normalize away equalities. *) simplify_eq; (* repeatedly apply congruence lemmas and use the equalities in the hypotheses. *) - try (f_equiv; assumption || (symmetry; assumption) || auto_proper). + try (f_equiv; fast_done || auto_proper). (** solve_proper solves goals of the form "Proper (R1 ==> R2)", for any number of relations. All the actual work is done by f_equiv;