coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Fabien Renaud <Fabien.Renaud AT inria.fr>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] How to talk about a restricted set of an inductive?
- Date: Thu, 3 Oct 2013 14:20:48 +0200
Let me rephrase my question.
I have an inductive datastructure for which a property is not true. However, for some elements (whose shape is given by some definition), the property is true and preserved by all the rules of the inductive.
In my previous example this means that all the nodes NList_ n l of a derivation tree starting from NList satisfy the property that (length l = n).
How can I state this?
On Thu, Oct 3, 2013 at 1:54 PM, Robbert Krebbers <mailinglists AT robbertkrebbers.nl> wrote:
On 10/03/2013 01:49 PM, Robbert Krebbers wrote:
The best result you well get in this case is:
Goal forall A (l : list A) n, NList_ n l -> n <= length l.
Proof. induction 1; simpl; auto with arith. Qed.
... because
Goal forall A (l : list A) n, n <= length l -> NList_ n l.
Proof.
intros A l n; revert l. induction n as [|n]; [constructor|].
intros [|??]; simpl; [omega|]. constructor; auto with arith.
Qed.
- [Coq-Club] How to talk about a restricted set of an inductive?, Fabien Renaud, 10/03/2013
- Re: [Coq-Club] How to talk about a restricted set of an inductive?, Rui Baptista, 10/03/2013
- Re: [Coq-Club] How to talk about a restricted set of an inductive?, Fabien Renaud, 10/03/2013
- Re: [Coq-Club] How to talk about a restricted set of an inductive?, Rui Baptista, 10/03/2013
- Message not available
- Re: [Coq-Club] How to talk about a restricted set of an inductive?, Fabien Renaud, 10/03/2013
- Re: [Coq-Club] How to talk about a restricted set of an inductive?, Robbert Krebbers, 10/03/2013
- Re: [Coq-Club] How to talk about a restricted set of an inductive?, Robbert Krebbers, 10/03/2013
- Re: [Coq-Club] How to talk about a restricted set of an inductive?, Fabien Renaud, 10/03/2013
- Re: [Coq-Club] How to talk about a restricted set of an inductive?, Rui Baptista, 10/03/2013
- Re: [Coq-Club] How to talk about a restricted set of an inductive?, Robbert Krebbers, 10/03/2013
- Re: [Coq-Club] How to talk about a restricted set of an inductive?, Fabien Renaud, 10/03/2013
- Re: [Coq-Club] How to talk about a restricted set of an inductive?, Cedric Auger, 10/03/2013
- Re: [Coq-Club] How to talk about a restricted set of an inductive?, Jonas Oberhauser, 10/04/2013
- Re: [Coq-Club] How to talk about a restricted set of an inductive?, Fabien Renaud, 10/04/2013
- Re: [Coq-Club] How to talk about a restricted set of an inductive?, Jean-Francois Monin, 10/04/2013
- Re: [Coq-Club] How to talk about a restricted set of an inductive?, Fabien Renaud, 10/04/2013
- Re: [Coq-Club] How to talk about a restricted set of an inductive?, Cedric Auger, 10/04/2013
- Message not available
- Re: [Coq-Club] How to talk about a restricted set of an inductive?, Rui Baptista, 10/03/2013
- Re: [Coq-Club] How to talk about a restricted set of an inductive?, Fabien Renaud, 10/03/2013
- Re: [Coq-Club] How to talk about a restricted set of an inductive?, Rui Baptista, 10/03/2013
Archive powered by MHonArc 2.6.18.