Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] coercions between records

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] coercions between records


Chronological Thread 
  • From: Enrico Tassi <enrico.tassi AT inria.fr>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] coercions between records
  • Date: Thu, 25 Oct 2012 11:08:18 +0200

On Thu, Oct 25, 2012 at 02:10:47AM +0200,
akhirsch AT gwmail.gwu.edu
wrote:
> Record second_model : Type := {
> P : Set;
> W : Set;
> p_Eq : relation P;
> s : W -> first_model;
> coerce_p_to_d : forall (w : W), P -> D (s w)
>
> Is there a way to make this work?

The quick answer is no, not with the current version of Coq.

Here the type of the coercion is something like that:

forall (m : second_model) (w : W m), P m -> D (s (W m))

That does not validate the uniform inheritance condition.

Relaxing this condition is on my TODO list. In Coq 8.4 I changed the
error into a warning, but it will still not work as expected in this
case (for a very silly reason, but still...).

Please file a whishlist bugreport, so that I don't forget about it.

Regards
--
Enrico Tassi



Archive powered by MHonArc 2.6.18.

Top of Page