Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Re: Error: 1 * n = n.

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Re: Error: 1 * n = n.


Chronological Thread 
  • From: "N. Raghavendra" <raghu AT hri.res.in>
  • To: coq-club AT inria.fr
  • Subject: [Coq-Club] Re: Error: 1 * n = n.
  • Date: Fri, 06 Sep 2013 16:15:54 +0530
  • Cancel-lock: sha1:gooaa7flFvWYnYHxt6Exr9v6Y9M=

At 2013-09-06T15:23:12+05:30, soham chakraborty wrote:

> On the solution you sent Coq is getting stuck at
>
> Case "n = O". Error: No interpretation for string "n = O".
>
> Can you please check.

As Valentin said, you have to load some code from the book to use the
Case notation. Otherwise you can just comment out the Case sentences,
and the proof will work without any other code:

Theorem mult_1_l :
forall n : nat,
1 * n = n.

Proof.
intros n.
induction n as [ | p IHp].
{
(* 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/




Archive powered by MHonArc 2.6.18.

Top of Page