coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jonathan Leivent <jonikelee AT gmail.com>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] question about Existing Class
- Date: Wed, 29 Jun 2016 13:05:40 -0400
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jonikelee AT gmail.com; spf=Pass smtp.mailfrom=jonikelee AT gmail.com; spf=None smtp.helo=postmaster AT mail-qk0-f178.google.com
- Ironport-phdr: 9a23:Y0/5oBGzVlq+cdrPNSN1C51GYnF86YWxBRYc798ds5kLTJ75pM+wAkXT6L1XgUPTWs2DsrQf2rKQ6v2rCD1IyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWD14LuiqvjqtX6WEZhvHKFe7R8LRG7/036l/I9ps9cEJs30QbDuXBSeu5blitCLFOXmAvgtI/rpMYwu3cYh/V0/MlZFK7+Yq4QTLpCDT1gPXpmytfssEzhSg2G+nsVVC0ynxtWDg7ZpEX4WZHwsSb+u+dV1yyTPMmwRrcxD2fxp5x3QQPl3X9UfwUy93va35R9
On 06/29/2016 12:38 PM, Matthieu Sozeau wrote:
Hi Jonathan,
short answer is not currently. I would advise to make an abbreviation
class eqC instead. The fact that local hypotheses of
typeclass type are automatically considered for resolution is a feature. It
could be an option of individual class declarations
to not do that: only explicit Instances/Existing Instances for that class
would be considered. We'd certainly need to devise a
way to declare when a local binder (in fun (x : C foo) y => t) or a goal
hypothesis (e.g. after intro H) should be considered though.
Best,
-- Matthieu
Thanks, Matthieu.
What do you mean by an "abbreviation class eqC"?
Also - my particular issue was with an Axiom - shouldn't that be a very distinct case from a local hypothesis?
-- Jonathan
On Wed, Jun 29, 2016 at 6:09 PM Jonathan Leivent
<jonikelee AT gmail.com>
wrote:
On 06/29/2016 11:33 AM, Jonathan Leivent wrote:
I just debugged an infinite loop in typeclass eauto that wasHmmm... maybe it only happens with Axioms, Variables, Hypotheses, etc.?:
apparently due to Existing Class causing instances created afterwards
to become Existing Instances, even if not explicitly declared as
such. I had declared "Existing Class eq", and really only wanted a
very few cases of eq to be considered instances, but some later
equalities automagically became instances (I can see them via Print
Hints in the typeclass_instances db).
First of all - is this a feature or a bug? Secondly, if a feature, is
there a way to turn it off, at least for particular Classes?
-- Jonathan
Existing Class eq.
Variable T : Type.
Variable eqT : forall a b : T, a = b.
Print HintDb typeclass_instances.
(* prints:
Discriminated database
Unfoldable variable definitions: all
Unfoldable constant definitions: all
Cut: emp
For any goal ->
For eq -> apply eqT(level 0, id 0)
*)
But - still - is there a way to turn this off?
-- Jonathan
- [Coq-Club] question about Existing Class, Jonathan Leivent, 06/29/2016
- Re: [Coq-Club] question about Existing Class, Jonathan Leivent, 06/29/2016
- Re: [Coq-Club] question about Existing Class, Matthieu Sozeau, 06/29/2016
- Re: [Coq-Club] question about Existing Class, Jonathan Leivent, 06/29/2016
- Re: [Coq-Club] question about Existing Class, Jonathan Leivent, 06/30/2016
- Re: [Coq-Club] question about Existing Class, Jonathan Leivent, 06/30/2016
- Re: [Coq-Club] question about Existing Class, Jason Gross, 06/30/2016
- Re: [Coq-Club] question about Existing Class, Jonathan Leivent, 06/30/2016
- Re: [Coq-Club] question about Existing Class, Jonathan Leivent, 06/30/2016
- Re: [Coq-Club] question about Existing Class, Jason Gross, 06/30/2016
- Re: [Coq-Club] question about Existing Class, Jonathan Leivent, 06/30/2016
- Re: [Coq-Club] question about Existing Class, Jonathan Leivent, 06/30/2016
- Re: [Coq-Club] question about Existing Class, Jonathan Leivent, 06/29/2016
- Re: [Coq-Club] question about Existing Class, Matthieu Sozeau, 06/29/2016
- Re: [Coq-Club] question about Existing Class, Jonathan Leivent, 06/29/2016
Archive powered by MHonArc 2.6.18.