Skip to Content.
Sympa Menu

coq-club - [Coq-Club]Lifting dependent types to option types

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club]Lifting dependent types to option types


chronological Thread 
  • From: Fabrice Lemercier <nouvid-coq AT yahoo.fr>
  • To: coq-club AT pauillac.inria.fr
  • Subject: [Coq-Club]Lifting dependent types to option types
  • Date: Mon, 23 Jan 2006 09:09:39 +0100 (CET)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.fr; h=Message-ID:Received:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=DFpI3Q9+RWTn/XSaF/xv39o5z0HWoV6qzYwxTeDHez0x8+cvYFxZd4im8YtSVVPbnIGUAKnhifzLsuQE+xOpA/aCZprZj0vy2zJ19jLd+BDw+oFIr5nrw7oszRPkdA/DGuMpSLog9CJnIkhwSHHMfsU0V/rpSQy3PAMChz3oSvE= ;
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Hello,

One can lift a function of type  A->B  to the type 
(option A)->(option B) by:

  Definition lift (A B:Set)(f:A->B)(a:option A) :
option B :=
    match a with
      Some a' => Some (f a')
    | None => None
    end.

I would like to generalize it to dependent types. 
First I need to figure out what would be its type.  I
assume parameters

  Parameters (A:Set)(B:A->Set)(f:forall a, B
a)(a:option A).

And then I try

  Check (match a with None => None | Some a' => Some
(f a') end).

But Coq replies:

  User error: Inference of annotation not yet
implemented in this case

So, what's the type?

Thanks,

Fabrice.



        

        
                
___________________________________________________________________________ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs 
exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com




Archive powered by MhonArc 2.6.16.

Top of Page