Skip to content
Snippets Groups Projects
Commit 9236a721 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Move.

parent ba3c17be
Branches
Tags
1 merge request!428Tweak `f_equiv` to use `reflexivity` in a way similar to `f_equal`.
Pipeline #74823 passed
...@@ -31,6 +31,13 @@ is rather inefficient when having big hint databases, or expensive [Hint Extern] ...@@ -31,6 +31,13 @@ is rather inefficient when having big hint databases, or expensive [Hint Extern]
declarations as the ones above. *) declarations as the ones above. *)
Tactic Notation "intuition" := intuition auto. Tactic Notation "intuition" := intuition auto.
(** The [fast_reflexivity] tactic only works on syntactically equal terms. It
can be used to avoid expensive failing unification. *)
Ltac fast_reflexivity :=
match goal with
| |- _ ?x ?x => solve [simple apply reflexivity]
end.
(** [done] can get slow as it calls "trivial". [fast_done] can solve way less (** [done] can get slow as it calls "trivial". [fast_done] can solve way less
goals, but it will also always finish quickly. We do 'reflexivity' last because goals, but it will also always finish quickly. We do 'reflexivity' last because
for goals of the form ?x = y, if we have x = y in the context, we will typically for goals of the form ?x = y, if we have x = y in the context, we will typically
...@@ -360,13 +367,6 @@ Ltac setoid_subst := ...@@ -360,13 +367,6 @@ Ltac setoid_subst :=
| H : @equiv ?A ?e _ ?x |- _ => symmetry in H; setoid_subst_aux (@equiv A e) x | H : @equiv ?A ?e _ ?x |- _ => symmetry in H; setoid_subst_aux (@equiv A e) x
end. end.
(* The [fast_reflexivity] tactic only works on syntactically equal terms. It can
be used to avoid expensive failing unification. *)
Ltac fast_reflexivity :=
match goal with
| |- _ ?x ?x => solve [simple apply reflexivity]
end.
(** f_equiv works on goals of the form [f _ = f _], for any relation and any (** f_equiv works on goals of the form [f _ = f _], for any relation and any
number of arguments. It looks for an appropriate [Proper] instance, and applies number of arguments. It looks for an appropriate [Proper] instance, and applies
it. The tactic is somewhat limited, since it cannot be used to backtrack on it. The tactic is somewhat limited, since it cannot be used to backtrack on
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment