coq-club AT inria.fr
Subject: The Coq mailing list
List archive
Re: Elimination of an inductive object of sort Prop (Re: [Coq-Club] more on vectors)
chronological Thread
- From: Yves Bertot <Yves.Bertot AT sophia.inria.fr>
- To: Adam Koprowski <adam.koprowski AT gmail.com>
- Cc: Martijn Vermaat <martijn AT vermaat.name>, coq-club <coq-club AT inria.fr>, Dimitri Hendriks <diem AT xs4all.nl>
- Subject: Re: Elimination of an inductive object of sort Prop (Re: [Coq-Club] more on vectors)
- Date: Wed, 28 Apr 2010 16:40:43 +0200
Adam Koprowski wrote:
Pattern-matching on proofs while constructing data is not allowed for good reasons (or at least for reasons you can understand and get accustomed to). Very often, you think you need it to justify that some case is irrelevant, but you can do this because the statement "there is a contradiction" (namely False) is in sort Prop. To see a commented example, look at section 15.4 of the Coq'Art, where pattern-matching on the proof of "log_domain x" is performed while computing a logarithm, to show that the 0 case is not possible (using log_domain_non_0).In the definitions of functions on vectors such as take, drop, and nth,Why would you want to de-construct such a proof? You may want to take a
we would use proofs of 'le' ord 'lt', e.g.:
Definition vtake (n m : nat) : n <= m -> vector m -> vector n.
But unfortunately, we cannot deconstruct the proof of n <= m since it
lives in Prop.
look at the CoLoR library [1], which has a rich set of functions/results on
vectors [2].
Best,
Adam
[1] http://color.inria.fr/
[2] http://color.inria.fr/doc/CoLoR.Util.Vector.VecUtil.html
Yves
- Elimination of an inductive object of sort Prop (Re: [Coq-Club] more on vectors), Martijn Vermaat
- Re: Elimination of an inductive object of sort Prop (Re: [Coq-Club] more on vectors),
Adam Koprowski
- Re: Elimination of an inductive object of sort Prop (Re: [Coq-Club] more on vectors), Yves Bertot
- Re: Elimination of an inductive object of sort Prop (Re: [Coq-Club] more on vectors), Martijn Vermaat
- Re: Elimination of an inductive object of sort Prop (Re: [Coq-Club] more on vectors), Roman Beslik
- <Possible follow-ups>
- Re: Elimination of an inductive object of sort Prop (Re: [Coq-Club] more on vectors), Adam Chlipala
- Re: Elimination of an inductive object of sort Prop (Re: [Coq-Club] more on vectors),
Adam Koprowski
Archive powered by MhonArc 2.6.16.