aboutsummaryrefslogtreecommitdiff
path: root/src/Util/Sum.v
diff options
context:
space:
mode:
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.