Skip to Content.
Sympa Menu

coq-club - [Coq-Club] coercions and universes

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] coercions and universes


Chronological Thread 
  • 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 *)
=========







Archive powered by MHonArc 2.6.18.

Top of Page