Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Canonical Structures

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Canonical Structures


chronological Thread 
  • From: Laurent Th�ry <Laurent.Thery AT inria.fr>
  • To: Chad E Brown <cebrown2323 AT yahoo.com>
  • Cc: "coq-club AT inria.fr" <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Canonical Structures
  • Date: Wed, 21 Sep 2011 18:05:39 +0200

On 09/21/2011 05:31 PM, Chad E Brown wrote:
I'm having trouble getting an easy canonical structure to work as I expect. The final Check below doesn't work.
Could someone please let me know what I'm doing wrong, or point me to an appropriate link.

Structure PType : Type := mk_PType {
 Pcarrier :> Type;
 Ppoint : Pcarrier
}.

Canonical Structure Prop_ : PType := mk_PType Prop True.

Check (fun p:PType -> Prop => p Prop).

- Thanks, Chad

The inference of canonical structure only works for projections. You can see this with the command

Print Canonical Projections.

that gives:

True <- Ppoint ( Prop_ )
Prop <- Pcarrier ( Prop_ )


This means that during the unification process, if it has True and expects and Ppoint ?,
it will be able to guess that ? is Prop_.
Only the projections (Ppoint and Pcarrier) trigger this inference.
In your example, you just ask to  unify  Prop to PType which just fails
--
Laurent




Archive powered by MhonArc 2.6.16.

Top of Page