coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Nicolas Marti <nicolas AT yl.is.s.u-tokyo.ac.jp>
- To: mikeday AT yeslogic.com
- Cc: coq-club AT pauillac.inria.fr
- Subject: Re: [Coq-Club] Induction principle for folding over lists
- Date: Fri, 28 Dec 2007 21:52:06 +0900 (JST)
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
Try it that way:
Theorem fold_folded : forall (A:Set) (xs:list A) (f:A -> A -> A) (a:A),
folded A f a xs (fold A f a xs).
Proof.
induction xs; simpl; intro.
constructor.
constructor.
intuition.
Qed.
When you make an induction over a variable, assure to put it leftmost
in the lemma definition/type. To understand why, just look at
Check list_rect.
which is (nearby) the induction principle you invoke.
Nicolas
- [Coq-Club] Induction principle for folding over lists, Michael Day
- Re: [Coq-Club] Induction principle for folding over lists, Catherine Dubois
- Re: [Coq-Club] Induction principle for folding over lists, Nicolas Marti
- Re: [Coq-Club] Induction principle for folding over lists,
gbush
- Re: [Coq-Club] Induction principle for folding over lists, Matthieu Sozeau
- Re: [Coq-Club] Induction principle for folding over lists, Julien Forest
- Re: [Coq-Club] Induction principle for folding over lists, Michael Day
Archive powered by MhonArc 2.6.16.