Skip to Content.
Sympa Menu

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

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Equality-witnessing coercions?


chronological Thread 
  • From: Nikhil Swamy <nswamy AT microsoft.com>
  • To: "coq-club AT inria.fr" <coq-club AT inria.fr>
  • Subject: [Coq-Club] Equality-witnessing coercions?
  • Date: Tue, 9 Nov 2010 22:10:25 +0000
  • Accept-language: en-US

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?

The example below illustrates what I’d like to accomplish.

 

Many thanks in advance for any pointers,

Nikhil

----

 

Inductive A : Type :=

| One : A

| Two : A.

 

Inductive B : A -> Type := .

 

Definition foo (b: B One) := tt.

 

Definition bar (a:A) (b:B a) : unit :=

  match a with

    | foo b (* some way to coerce b's type to (B One)? *)

    | Two => tt

  end.




Archive powered by MhonArc 2.6.16.

Top of Page