coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Guillaume Yziquel <guillaume.yziquel AT citycable.ch>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] Subtyping and sig.
- Date: Tue, 21 Feb 2012 22:07:29 +0100
Hi. Got a newbie question:
How do you deal with 'subtyping' when using the { .. | .. } notation?
Typically, how would one deal with this situation?
Coq < Definition pos := {n : nat | n >= 1}.
pos is defined
Coq < Definition suc (n : pos) := S n.
Toplevel input, characters 30-31:
> Definition suc (n : pos) := S n.
> ^
Error: In environment
n : pos
The term "n" has type "pos" while it is expected to have type
"nat".
--
Guillaume Yziquel
- [Coq-Club] Subtyping and sig., Guillaume Yziquel
- Re: [Coq-Club] Subtyping and sig.,
gallais @ ensl.org
- Re: [Coq-Club] Subtyping and sig., Guillaume Yziquel
- Re: [Coq-Club] Subtyping and sig.,
Jérémie Koenig
- Re: [Coq-Club] Subtyping and sig., Guillaume Yziquel
- Re: [Coq-Club] Subtyping and sig.,
gallais @ ensl.org
Archive powered by MhonArc 2.6.16.