Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Equality-witnessing coercions?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Equality-witnessing coercions?


chronological Thread 
  • From: Guillaume Melquiond <guillaume.melquiond AT inria.fr>
  • To: Nikhil Swamy <nswamy AT microsoft.com>
  • Cc: "coq-club AT inria.fr" <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Equality-witnessing coercions?
  • Date: Tue, 09 Nov 2010 23:29:47 +0100

Le mardi 09 novembre 2010 à 23:10 +0100, Nikhil Swamy a écrit :
> Hi Coq-club,
> 
> Is there some way to construct a coercion in Coq based on the result
> of a pattern match? Maybe via some use of JMeq?

There is a simpler way that does not involve JMeq.

Definition bar a :=
  match a return B a -> unit with
  | One => fun b => foo b
  | Two => fun _ => tt
  end.
Print bar.

Best regards,

Guillaume





Archive powered by MhonArc 2.6.16.

Top of Page