coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: <bhandalc AT tcd.ie>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] Eapply Breaks
- Date: Fri, 10 May 2013 18:02:58 +0200 (CEST)
Hi people,
Just noticed some unusual behaviour of eapply. It's not a big deal, very easy
to work around, but just thought I'd flag it. I'm using Coq version 8.3pl5.
Here is the code:
(*Just a simple Lemma for use in the test lemma*)
Lemma simple : forall (x y : nat),
x < y -> y <> 0. intros. destruct y.
inversion H. unfold not. intro.
inversion H0. Qed.
(*This works OK*)
Lemma testGood : forall y : nat,
(exists x : nat, x < y) -> y <> 0.
intros. inversion H. eapply simple.
apply H0. Qed.
(*This breaks with the error message: Error: Impossible to unify "?25" with
"x".*)
Lemma testBug : forall y : nat,
(exists x : nat, x < y) -> y <> 0.
intros. eapply simple. inversion H.
apply H0.
It seems as though eapply doesn't like when you instantiate existentials in a
hypothesis after the application- they must have existsed beforehand. The
workaround is simple: Just instantiate before eapply. But I believe the
behaviour is of interest nonetheless.
All the best,
Colm
- [Coq-Club] Eapply Breaks, bhandalc, 05/10/2013
- Re: [Coq-Club] Eapply Breaks, Pierre-Marie Pédrot, 05/10/2013
- Re: [Coq-Club] Eapply Breaks, Sosuke MORIGUCHI, 05/10/2013
Archive powered by MHonArc 2.6.18.