coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Nick Benton <nick AT microsoft.com>
- To: soham chakraborty <soham4you AT gmail.com>, Valentin Robert <valentin.robert.42 AT gmail.com>
- Cc: "coq-club AT inria.fr" <coq-club AT inria.fr>
- Subject: RE: [Coq-Club] Error: 1 * n = n.
- Date: Thu, 5 Sep 2013 09:55:04 +0000
- Accept-language: en-GB, en-US
The library version of multiplication actually does recurse on the left hand argument. If you type simpl when your goal is 1*n = n, you’ll see it reduces. But only to n+0 = n. Because addition recurses on the left argument too, that bit doesn’t reduce further. You need a lemma to finish it off, which is proved by induction on n, but is already proved in the Arith library (plus_n_O). Alternatively, “auto with arith.” will do this (or your original goal) automagically.
Nick
From: coq-club-request AT inria.fr [mailto:coq-club-request AT inria.fr]
On Behalf Of soham chakraborty
Dear Valentin Robert, Thank you for the prompt suggestion. Does Coq requires put the _expression_ in certain sequence? Also what do you mean by the "shape of n"... Do you mean the type of n? I went through the link but could not solve the issue I am facing.
No multiplication is defined in this context. The file contains only this theorem.
0 = 0 * n - pass. Why this _expression_ passes? n = 1 * n - Error: Impossible to unify "1 * n" with "n". I also tried Check 0. Check 1. and type of each _expression_ came out as nat, so the type mismatch should not be the issue.
Thanks a lot again.
Regards,
On Thu, Sep 5, 2013 at 1:14 PM, Valentin Robert <valentin.robert.42 AT gmail.com> wrote:
|
- [Coq-Club] Error: 1 * n = n., soham chakraborty, 09/05/2013
- Re: [Coq-Club] Error: 1 * n = n., Valentin Robert, 09/05/2013
- Re: [Coq-Club] Error: 1 * n = n., soham chakraborty, 09/05/2013
- 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] 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., Nick Benton, 09/05/2013
- Re: [Coq-Club] Error: 1 * n = n., soham chakraborty, 09/05/2013
- Re: [Coq-Club] Error: 1 * n = n., Valentin Robert, 09/05/2013
Archive powered by MHonArc 2.6.18.