coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Matthieu Sozeau <mattam AT mattam.org>
- To: Benedikt.AHRENS AT unice.fr
- Cc: Laurent Th�ry <Laurent.Thery AT sophia.inria.fr>, Jeff Vaughan <jeff AT seas.harvard.edu>, Coq List <coq-club AT pauillac.inria.fr>
- Subject: Re: [Coq-Club] Pattern matching on vectors
- Date: Fri, 9 Oct 2009 18:19:00 -0400
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
Le 9 oct. 09 à 13:23,
Benedikt.AHRENS AT unice.fr
a écrit :
Hello,
for the complementary theorem about vectors of length 0 (code at the
bottom), Adam's suggestion can be adopted [1], whereas a proof similar
to Laurent's [2] fails, since the abstraction in the inversion step
gives an ill-typed term.
Is there a way to prove the lemma by tactics anyway?
Yes, using [dependent destruction] [1]:
<<
Require Import Bvector Program.Equality.
Lemma is_nil: forall A (v:vector A 0),
v = Vnil A.
Proof.
intros A v. dependent destruction v. reflexivity.
Qed.
>>
[1]
http://coq.inria.fr/refman/Reference-Manual013.html#dependent-induction-example
-- Matthieu
- [Coq-Club] Pattern matching on vectors, Jeff Vaughan
- Message not available
- Re: [Coq-Club] Pattern matching on vectors, Jeff Vaughan
- Re: [Coq-Club] Pattern matching on vectors, Adam Chlipala
- Re: [Coq-Club] Pattern matching on vectors,
Laurent Théry
- Re: [Coq-Club] Pattern matching on vectors,
Benedikt . AHRENS
- Re: [Coq-Club] Pattern matching on vectors, Jeff Vaughan
- Re: [Coq-Club] Pattern matching on vectors, Matthieu Sozeau
- Re: [Coq-Club] Pattern matching on vectors for dummies, Jean-Francois Monin
- Re: [Coq-Club] Pattern matching on vectors,
Benedikt . AHRENS
- Re: [Coq-Club] Pattern matching on vectors, Adam Koprowski
- Message not available
Archive powered by MhonArc 2.6.16.