Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Relaxing the Uniform Inheritance Condition?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Relaxing the Uniform Inheritance Condition?


Chronological Thread 
  • From: Jason Gross <jasongross9 AT gmail.com>
  • To: coqdev AT inria.fr, coq-club <coq-club AT inria.fr>
  • Subject: [Coq-Club] Relaxing the Uniform Inheritance Condition?
  • Date: Fri, 16 Aug 2013 19:16:40 -0400

Hi,
Currently, coq complains that a coercion does not respect the uniform inheritance condition if some parameters to the coercion function do not show up as parameters to the source type.  It seems to me that if these parameters are typeclasses or canonical structures, it should still be permissible to declare the coercion, and let the typeclass/canonical structure machinery pick up the missing parameters.  However, this is not the case, and instead I get a warning and then "Anomaly: apply_coercion_args: mismatch between arguments and coercion." when I try to use it.  I would like this, for example, when I use the Funext typeclass from homotopy type theory, and want to declare a coercion from one definition that does not use Funext to another definition which does use Funext, conditional on there being an instance of Funext around. 
It seems also that it should be possible to weaken the uniform inheritance condition so that a coercion is permissible if every parameter to the coercion function shows up either as a parameter to the source class, or as a parameter to the target class.

Am I ignorant of any theoretical or practical issues that would make this unsound or hard to implement?

Thanks,
Jason


  • [Coq-Club] Relaxing the Uniform Inheritance Condition?, Jason Gross, 08/17/2013

Archive powered by MHonArc 2.6.18.

Top of Page