coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jean-Francois Monin <jean-francois.monin AT imag.fr>
- To: S3 <scubed2 AT gmail.com>
- Cc: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Prove inductive type implies false in cycle
- Date: Wed, 3 Aug 2011 16:37:20 +0800
On Tue, Aug 02, 2011 at 11:04:43PM -0700, S3 wrote:
>
> To illustrate that it enforces the constraint:
> Inductive constant3 (a: nat): list nat -> Prop :=
> | Cnil3: constant3 a nil
> | Ccons3: forall l, constant3 a l -> constant3 (S a) (a::l).
>
> Error: Last occurrence of "constant3" must have "a" as 1st argument in
> "forall l : list nat, constant3 a l -> constant3 (S a) (a :: l)".
The parameter a should be used as is in all conclusions of
you constructors. I.e. you can write:
Inductive constant3 (a: nat): list nat -> Prop :=
| Cnil3: constant3 a nil
| Ccons3: forall l, constant3 (S a) l -> constant3 a (a::l).
But you probably want the following one:
Inductive constant3: nat -> list nat -> Prop :=
| Cnil3: forall a, constant3 a nil
| Ccons3: forall a l, constant3 a l -> constant3 (S a) (a::l).
Hope this helps
Jean-Francois
- [Coq-Club] Prove inductive type implies false in cycle, S3
- [Coq-Club] Prove inductive type implies false in cycle,
S3
- Re: [Coq-Club] Prove inductive type implies false in cycle, Brian Huffman
- Message not available
- Re: [Coq-Club] Prove inductive type implies false in cycle,
Pierre Casteran
- Re: [Coq-Club] Prove inductive type implies false in cycle,
S3
- Re: [Coq-Club] Prove inductive type implies false in cycle, Jean-Francois Monin
- Re: [Coq-Club] Prove inductive type implies false in cycle, AUGER Cedric
- Re: [Coq-Club] Prove inductive type implies false in cycle,
S3
- Re: [Coq-Club] Prove inductive type implies false in cycle, AUGER Cedric
- [Coq-Club] Prove inductive type implies false in cycle,
S3
Archive powered by MhonArc 2.6.16.