From c5626e9e937246b9163067dc4a88ee09c4164136 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Mon, 27 Jun 2016 11:08:13 -0700 Subject: Add a tactic for dealing with equalities of [sum] --- src/Util/Sum.v | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/Util/Sum.v') diff --git a/src/Util/Sum.v b/src/Util/Sum.v index 2f03639b2..915f58df9 100644 --- a/src/Util/Sum.v +++ b/src/Util/Sum.v @@ -16,3 +16,12 @@ Proof. Qed. Arguments sumwise {A B} _ _ _ _. + +Ltac congruence_sum_step := + match goal with + | [ H : inl _ = inr _ |- _ ] => solve [ inversion H ] + | [ H : inr _ = inl _ |- _ ] => solve [ inversion H ] + | [ H : inl _ = inl _ |- _ ] => inversion H; clear H + | [ H : inr _ = inr _ |- _ ] => inversion H; clear H + end. +Ltac congruence_sum := repeat congruence_sum_step. -- cgit v1.2.3