coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Benedikt Ahrens <benedikt.ahrens AT irit.fr>
- To: "coq-club AT inria.fr" <coq-club AT inria.fr>
- Subject: [Coq-Club] coercions and universes
- Date: Thu, 29 May 2014 13:00:07 +0200
Hello,
of the two pieces of code below, the first one is accepted whereas the second one does not typecheck; the line "Check..." fails (in Coq8.4pl3).
Could someone explain why? Is this a necessary restriction of the coercion mechanism?
Thanks a lot in advance.
Benedikt
=== 1 ===
Definition UU := Type.
Definition PointedUU := sigT (fun A : UU => A).
Definition carrier (C : PointedUU) : Type := @projT1 _ _ C.
Coercion carrier : PointedUU >-> Sortclass.
Check (fun C : PointedUU => fun c : C => c).
=========
=== 2 ===
Definition UU := Type.
Definition PointedUU := sigT (fun A : UU => A).
Definition carrier (C : PointedUU) := @projT1 _ _ C.
Coercion carrier : PointedUU >-> UU.
Check (fun C : PointedUU => fun c : C => c). (* fails *)
=========
- [Coq-Club] coercions and universes, Benedikt Ahrens, 05/29/2014
- Re: [Coq-Club] coercions and universes, Jason Gross, 06/02/2014
- Re: [Coq-Club] coercions and universes, Benedikt Ahrens, 06/02/2014
- Re: [Coq-Club] coercions and universes, Jason Gross, 06/02/2014
Archive powered by MHonArc 2.6.18.