aboutsummaryrefslogtreecommitdiff
path: root/src/Util/Sum.v
diff options
context:
space:
mode:
authorGravatar Jason Gross <jagro@google.com>2016-06-27 11:08:13 -0700
committerGravatar Jason Gross <jagro@google.com>2016-06-27 11:08:13 -0700
commitc5626e9e937246b9163067dc4a88ee09c4164136 (patch)
tree69f49a36fe5d5275f9fb5a8bcadd593394ce2f4e /src/Util/Sum.v
parent89c711e9f0c0981e1a192725d18e912f15f94240 (diff)
Add a tactic for dealing with equalities of [sum]
Diffstat (limited to 'src/Util/Sum.v')
-rw-r--r--src/Util/Sum.v9
1 files changed, 9 insertions, 0 deletions
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.