coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Adam Chlipala <adamc AT csail.mit.edu>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Problems when writing function from proof to proof.
- Date: Tue, 02 Jul 2013 17:31:30 -0400
Fully expecting someone on the list to respond chastising me for giving an "unhelpful" answer: Have you read CPDT <http://adam.chlipala.net/cpdt/>, or specifically the first few chapters in the part on dependent types? There are a number of design patterns for doing the sort of thing you're trying to do, and I think it is more useful to read a general introduction than to read ad-hoc answers on this mailing list.
On 07/02/2013 05:28 PM, Ilmārs Cīrulis wrote:
Fixpoint example (m n:nat) (p: m<=n): list nat :=
match m with
| O => nil
| S m' => cons m (example m' n (ttt m' n p))
end.
It gives similar error as before:
Error:
In environment
example : forall m n : nat, m <= n -> list nat
m : nat
n : nat
p : m <= n
m' : nat
The term "p" has type "m <= n" while it is expected to have type "S m' <= n".
So I suppose that I didn't keep the link between <m> and <m'> good enough. Any ideas how to do it?
- [Coq-Club] Problems when writing function from proof to proof., Ilmārs Cīrulis, 07/01/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Jason Gross, 07/01/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Pierre Casteran, 07/01/2013
- Message not available
- Fwd: [Coq-Club] Problems when writing function from proof to proof., Ilmārs Cīrulis, 07/02/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Cedric Auger, 07/02/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Ilmārs Cīrulis, 07/02/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Ilmārs Cīrulis, 07/02/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Adam Chlipala, 07/02/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., AUGER Cédric, 07/03/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Ilmārs Cīrulis, 07/03/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Kristopher Micinski, 07/11/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Ilmārs Cīrulis, 07/02/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Ilmārs Cīrulis, 07/02/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Cedric Auger, 07/02/2013
- Fwd: [Coq-Club] Problems when writing function from proof to proof., Ilmārs Cīrulis, 07/02/2013
- Message not available
Archive powered by MHonArc 2.6.18.