coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: soham chakraborty <soham4you AT gmail.com>
- To: "N. Raghavendra" <raghu AT hri.res.in>
- Cc: "coq-club AT inria.fr" <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Re: Error: 1 * n = n.
- Date: Fri, 6 Sep 2013 15:23:12 +0530
Hi Raghu,
Good to hear from you. I have also started with the same book but yet to study the case analysis part :)Case "n = O". Error: No interpretation for string "n = O".
On Fri, Sep 6, 2013 at 1:39 PM, N. Raghavendra <raghu AT hri.res.in> wrote:
At 2013-09-05T23:47:34+05:30, soham chakraborty wrote:I've also just begun to learn Coq. This is an exercise in Pierce's
> Using them I have found following ways to solve the theorem 1 * n =
> n. Please review and provide your feedback.
software foundations book:
http://www.cis.upenn.edu/~bcpierce/sf/Induction.html
At the level of that chapter, I'd solve this exercise as follows:
induction n as [ | p IHp].
Theorem mult_1_l :
forall n : nat,
1 * n = n.
Proof.
intros n.
{
Case "n = O".
reflexivity.
}
{
Case "n = S p".
simpl.
simpl in IHp.
rewrite -> IHp.
reflexivity.
}
Qed.
Best regards,
Raghu.
--
N. Raghavendra <raghu AT hri.res.in>, http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/
- RE: [Coq-Club] Error: 1 * n = n., (continued)
- RE: [Coq-Club] Error: 1 * n = n., Nick Benton, 09/05/2013
- Re: [Coq-Club] Error: 1 * n = n., Colm Bhandal, 09/05/2013
- Re: [Coq-Club] Error: 1 * n = n., Valentin Robert, 09/05/2013
- Re: [Coq-Club] Error: 1 * n = n., Colm Bhandal, 09/05/2013
- Re: [Coq-Club] Error: 1 * n = n., Kristopher Micinski, 09/05/2013
- Message not available
- Re: [Coq-Club] Error: 1 * n = n., Kristopher Micinski, 09/05/2013
- Re: [Coq-Club] Error: 1 * n = n., soham chakraborty, 09/05/2013
- Re: [Coq-Club] Error: 1 * n = n., t x, 09/05/2013
- Re: [Coq-Club] Error: 1 * n = n., soham chakraborty, 09/06/2013
- [Coq-Club] Re: Error: 1 * n = n., N. Raghavendra, 09/06/2013
- Re: [Coq-Club] Re: Error: 1 * n = n., soham chakraborty, 09/06/2013
- Re: [Coq-Club] Re: Error: 1 * n = n., Valentin Robert, 09/06/2013
- Re: [Coq-Club] Re: Error: 1 * n = n., soham chakraborty, 09/06/2013
- [Coq-Club] Re: Error: 1 * n = n., N. Raghavendra, 09/06/2013
- Re: [Coq-Club] Re: Error: 1 * n = n., soham chakraborty, 09/06/2013
- Re: [Coq-Club] Error: 1 * n = n., Colm Bhandal, 09/05/2013
- Re: [Coq-Club] Error: 1 * n = n., Valentin Robert, 09/05/2013
- Re: [Coq-Club] Error: 1 * n = n., Colm Bhandal, 09/05/2013
- [Coq-Club] Re: Error: 1 * n = n., N. Raghavendra, 09/06/2013
- RE: [Coq-Club] Error: 1 * n = n., Nick Benton, 09/05/2013
Archive powered by MHonArc 2.6.18.