Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Very slow failing apply

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Very slow failing apply


Chronological Thread 
  • From: Robbert Krebbers <mailinglists AT robbertkrebbers.nl>
  • To: coq-club AT inria.fr, Pierre-Marie Pédrot <pierre-marie.pedrot AT inria.fr>
  • Subject: Re: [Coq-Club] Very slow failing apply
  • Date: Fri, 18 Aug 2017 10:29:45 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=mailinglists AT robbertkrebbers.nl; spf=None smtp.mailfrom=mailinglists AT robbertkrebbers.nl; spf=None smtp.helo=postmaster AT smtp2.science.ru.nl
  • Ironport-phdr: 9a23:xwBZnxL6jilqO9PaN9mcpTZWNBhigK39O0sv0rFitYgULvnxwZ3uMQTl6Ol3ixeRBMOAtKIC1rKempujcFJDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBX660e/5j8KGxj5KRE9ZqGsQtaT3IyL0LW5/ISWaAFVjhK8Z6lzJVO4t0GZjsgbm5Fvb4M40BrElUPJd/5R2Ss8PVOehQzxo8K55p9utTxdt+gm6+ZBV7/7duI2V+oLIi4hNjUP48fhuAPfBSiV63EWX38N2k5NCgnB7Rf1WpbqrjDSrO130iSAIc7sQLo+VC65qaFvHky7wBwbPiI0pTmEwvd7i7hW9Vf4/0Ry

On 08/17/2017 11:35 PM, Pierre-Marie Pédrot wrote:
Also, while I'm thinking about this, could you report this on the bug
tracker with self-contained reproducible examples? Primitive projections
ought to work out-of-the-box for canonical structures and the like.
See below for an example. It roughly follows the Ssreflect approach, and works just fine without primitive projections. However, with primitive projections is breaks.


Set Primitive Projections.

Structure semigroup := SemiGroup {
sg_car :> Type;
sg_op : sg_car -> sg_car -> sg_car;
}.

Structure monoid := Monoid {
monoid_car :> Type;
monoid_op : monoid_car -> monoid_car -> monoid_car;
monoid_unit : monoid_car;
}.

Coercion monoid_sg (X : monoid) : semigroup :=
SemiGroup (monoid_car X) (monoid_op X).
Canonical Structure monoid_sg.
(*
Projection value has no head constant: monoid_car _UNBOUND_REL_1 in canonical
instance monoid_sg of sg_car, ignoring it.
*)

Parameter X : monoid.
Parameter x y : X.

Fail Check (sg_op _ x y).
(*
Error: The term "x" has type "monoid_car X" while it is expected to have type "sg_car ?s".
*)

(Notwithstanding the fact that the Coq bugzilla is currently down.)
I will create an actual bug when the bug tracker is alive again.



Archive powered by MHonArc 2.6.18.

Top of Page