From e2bc6bdd5d40e80e941ef83048e3b6aa92ad1cee Mon Sep 17 00:00:00 2001 From: herbelin Date: Sun, 27 Sep 2009 09:12:49 +0000 Subject: Fixed a bug in the interaction between dEqThen and inject_at_positions which was disturbing inversion and sometimes making it failing in presence of dependent equalities (injection still doesn't know how to split dependent equalities, resulting in a smaller number of equalities than expected for dEqThen). [also restored inv.ml as it was before 12356 which uselessly and inadvertently modified it] git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12360 85f007b7-540e-0410-9357-904b9bb8a0f7 --- test-suite/success/Inversion.v | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'test-suite') diff --git a/test-suite/success/Inversion.v b/test-suite/success/Inversion.v index 71e53191b4..e8a68c11db 100644 --- a/test-suite/success/Inversion.v +++ b/test-suite/success/Inversion.v @@ -107,3 +107,25 @@ Goal forall o, foo2 o -> 0 = 1. intros. eapply trans_eq. inversion H. + +(* Check that the part of "injection" that is called by "inversion" + does the same number of intros as the number of equations + introduced, even in presence of dependent equalities that + "injection" renounces to split *) + +Fixpoint prodn (n : nat) := + match n with + | O => unit + | (S m) => prod (prodn m) nat + end. + +Inductive U : forall n : nat, prodn n -> bool -> Prop := +| U_intro : U 0 tt true. + +Lemma foo3 : forall n (t : prodn n), U n t true -> False. +Proof. +(* used to fail because dEqThen thought there were 2 new equations but + inject_at_positions actually introduced only one; leading then to + an inconsistent state that disturbed "inversion" *) +intros. inversion H. +Abort. -- cgit v1.2.3