Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Subtyping and sig.

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Subtyping and sig.


chronological Thread 
  • 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



Archive powered by MhonArc 2.6.16.

Top of Page