From 9fa6f319f5b615ce928cb99db4b6d0f55c79ffb7 Mon Sep 17 00:00:00 2001 From: msozeau Date: Tue, 7 Jun 2011 11:14:09 +0000 Subject: Fixed bug #2398: destruct ex2/sig2/sigT2 in Program, patch by Paolo Herms. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14164 85f007b7-540e-0410-9357-904b9bb8a0f7 --- theories/Program/Tactics.v | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'theories/Program') diff --git a/theories/Program/Tactics.v b/theories/Program/Tactics.v index 9c34fa916..9694e3fd1 100644 --- a/theories/Program/Tactics.v +++ b/theories/Program/Tactics.v @@ -59,12 +59,20 @@ Ltac destruct_pairs := repeat (destruct_one_pair). Ltac destruct_one_ex := let tac H := let ph := fresh "H" in (destruct H as [H ph]) in + let tac2 H := let ph := fresh "H" in let ph' := fresh "H" in + (destruct H as [H ph ph']) + in let tacT H := let ph := fresh "X" in (destruct H as [H ph]) in + let tacT2 H := let ph := fresh "X" in let ph' := fresh "X" in + (destruct H as [H ph ph']) + in match goal with | [H : (ex _) |- _] => tac H | [H : (sig ?P) |- _ ] => tac H | [H : (sigT ?P) |- _ ] => tacT H - | [H : (ex2 _) |- _] => tac H + | [H : (ex2 _ _) |- _] => tac2 H + | [H : (sig2 ?P _) |- _ ] => tac2 H + | [H : (sigT2 ?P _) |- _ ] => tacT2 H end. (** Repeateadly destruct existentials. *) -- cgit v1.2.3