coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jean-Marie Madiot <jmadiot AT CS.Princeton.EDU>
- To: Coq Club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Question about examples of TypeClass in reference-manual
- Date: Sat, 11 Jun 2016 09:14:01 -0400
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jmadiot AT CS.Princeton.EDU; spf=Pass smtp.mailfrom=jmadiot AT cs.princeton.edu; spf=None smtp.helo=postmaster AT yellowcard.cs.princeton.edu
- Ironport-phdr: 9a23:AtkrJB/w0y5Ehv9uRHKM819IXTAuvvDOBiVQ1KB91OIcTK2v8tzYMVDF4r011RmSDdSdtKMP1ruempujcFJDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXsq3G/pQQfBg/4fVIsYL+lS8iN3o/qhqibwN76XUZhvHKFe7R8LRG7/036l/I9ps9cEJs30QbDuXBSeu5blitCLFOXmAvgtI/rpMYwuwwZgf8q9tZBXKPmZOx4COUAVHV1e1wysebsrFHoSRaFri8XVXxTmR5VCSDE6gv7V9H/qH2pmPB63Xy4MMTwCJU9QzWvp4JiRB7vlG9TNTsw/GDQluRbt+RjuhOnrBFjxIiSTa2oYqktNpjBdM8XEDISFv1aUDZMV8blN9MC
It says that "A" is unknown. You can provide A as an argument of
negb_impl, as follows:
Definition neqb_impl {A : Type} `{eqa : EqDec A} (x y : A) := negb (eqb x y).
Jean-Marie
On Sat, Jun 11, 2016 at 8:57 AM, Zhaohui Li
<lizhaohui1991 AT gmail.com>
wrote:
> Dear all,
> I follow examples of TypeClass (Chapter 20) in reference manual,
> and enter this code:
> Class EqDec (A : Type) :=
> {
> eqb : A -> A -> bool ;
> eqb_leibniz : forall x y, eqb x y = true -> x = y
> }.
>
> Definition neqb_impl `{eqa : EqDec A} (x y : A) := negb (eqb x y).
>
> But it throws an error at the last line:
> Error: Unbound and ungeneralizable variable A
>
> I try Set Implicit Arguments, but it doesn't work.
>
> My coq version is 8.5.
>
> Thanks for help.
>
- [Coq-Club] Question about examples of TypeClass in reference-manual, Zhaohui Li, 06/11/2016
- Re: [Coq-Club] Question about examples of TypeClass in reference-manual, Jean-Marie Madiot, 06/11/2016
- RE: [Coq-Club] Question about examples of TypeClass in reference-manual, Soegtrop, Michael, 06/11/2016
- Re: [Coq-Club] Question about examples of TypeClass in reference-manual, Robbert Krebbers, 06/11/2016
- RE: [Coq-Club] Question about examples of TypeClass in reference-manual, Soegtrop, Michael, 06/11/2016
- Re: [Coq-Club] Question about examples of TypeClass in reference-manual, Zhaohui Li, 06/12/2016
- RE: [Coq-Club] Question about examples of TypeClass in reference-manual, Soegtrop, Michael, 06/11/2016
- Re: [Coq-Club] Question about examples of TypeClass in reference-manual, Robbert Krebbers, 06/11/2016
- RE: [Coq-Club] Question about examples of TypeClass in reference-manual, Soegtrop, Michael, 06/11/2016
- Re: [Coq-Club] Question about examples of TypeClass in reference-manual, Jean-Marie Madiot, 06/11/2016
Archive powered by MHonArc 2.6.18.