coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Lionel Elie Mamane <lionel AT mamane.lu>
- To: coq-club AT pauillac.inria.fr
- Subject: [Coq-Club] Dependent type projection
- Date: Wed, 27 Nov 2002 11:17:53 +0100
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
Hi,
I'm trying to write the second projection of this type:
Inductive T:Type := T_cons: (I:Type) (I->T) -> T.
Is it possible?
The first projection goes without any problem:
Definition TProj1 := [t:T] Cases t of (T_cons It f) => It end.
But the second one fails with "Error: Inference of annotation not yet
implemented in this case".
So I thought I would just annotate the expression:
Definition TProj2 := [t:T] <(TProj1 t)->T>Cases t of (T_cons It f) => f end.
But Coq says "The term f has type It->T while it is expected to have
type (TProj1 t)->T". Replacing (TProj1 t) by its delta/beta-reduction
doesn't help:
Definition TProj2 := [t:T] <Cases t of (T_cons It f)=>It end>Cases t of
(T_cons It f) => f end.
answers "The term f has type It->T while it is expected to have type
Cases t of (T_cons It _) => It end"
I tried:
Definition TProj2 : (t:T)(TProj1 t)->T := [t:T] Cases t of (T_cons It
f) => f end.
too, but same error message.
Thank you for your help,
--
Lionel
- [Coq-Club] Dependent type projection, Lionel Elie Mamane
- Re: [Coq-Club] Dependent type projection, Dimitri Hendriks
Archive powered by MhonArc 2.6.16.