aboutsummaryrefslogtreecommitdiff
path: root/src/Util/Tactics/SplitInContext.v
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2017-03-14 21:59:35 -0400
committerGravatar Jason Gross <jgross@mit.edu>2017-03-14 21:59:35 -0400
commitdbcae76d32894bbee51e4de623508173089f528b (patch)
treefa9c4992d2d62dc47326d2d8531284f6c99be06c /src/Util/Tactics/SplitInContext.v
parent5cefabfee05c2a5a9d4d3a5fdcb98250b0a18780 (diff)
Add split_prod
Diffstat (limited to 'src/Util/Tactics/SplitInContext.v')
-rw-r--r--src/Util/Tactics/SplitInContext.v8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Util/Tactics/SplitInContext.v b/src/Util/Tactics/SplitInContext.v
index c2bf364a0..3ff313197 100644
--- a/src/Util/Tactics/SplitInContext.v
+++ b/src/Util/Tactics/SplitInContext.v
@@ -17,6 +17,12 @@ Ltac split_iff := split_in_context iff (fun a b : Prop => a -> b) (fun a b : Pro
Ltac split_and' :=
repeat match goal with
| [ H : ?a /\ ?b |- _ ] => let H0 := fresh in let H1 := fresh in
- assert (H0 := fst H); assert (H1 := snd H); clear H
+ assert (H0 := proj1 H); assert (H1 := proj2 H); clear H
+ end.
+Ltac split_prod' :=
+ repeat match goal with
+ | [ H : prod ?a ?b |- _ ] => let H0 := fresh in let H1 := fresh in
+ assert (H0 := fst H); assert (H1 := snd H); clear H
end.
Ltac split_and := split_and'; split_in_context and (fun a b : Type => a) (fun a b : Type => b).
+Ltac split_prod := split_and'; split_in_context prod (fun a b : Type => a) (fun a b : Type => b).