coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Laurent Th�ry <Laurent.Thery AT sophia.inria.fr>
- To: Jeff Vaughan <jeff AT seas.harvard.edu>
- Cc: Coq List <coq-club AT pauillac.inria.fr>
- Subject: Re: [Coq-Club] Pattern matching on vectors
- Date: Fri, 09 Oct 2009 02:17:16 +0200
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
Hi,
yep you have to break the dependance in the equality.
Adam's idea but with tactic:
Lemma openVector: forall A n (v: vector A (S n)),
exists a, exists v0, v = vcons a v0.
intros A n v.
change
((fun n: nat => match n return vector A n -> Prop with
O => fun _ => True (* what you want *)
| S n1 => fun v =>
exists a : A, exists v0 : vector A n1, v = vcons a v0
end) (S n) v).
dependent inversion v as [|n1 a1 v1].
exists a1; exists v1; auto.
Qed.
- [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.