Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Question about examples of TypeClass in reference-manual

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Question about examples of TypeClass in reference-manual


Chronological Thread 
  • From: Zhaohui Li <lizhaohui1991 AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: [Coq-Club] Question about examples of TypeClass in reference-manual
  • Date: Sat, 11 Jun 2016 20:57:12 +0800
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=lizhaohui1991 AT gmail.com; spf=Pass smtp.mailfrom=lizhaohui1991 AT gmail.com; spf=None smtp.helo=postmaster AT mail-io0-f177.google.com
  • Ironport-phdr: 9a23:wr2t7RTXj+l9R0PoZ8y9LZeSxNpsv+yvbD5Q0YIujvd0So/mwa64ZxON2/xhgRfzUJnB7Loc0qyN4/GmBj1LvM3JmUtBWaIPfidNsd8RkQ0kDZzNImzAB9muURYHGt9fXkRu5XCxPBsdMs//Y1rPvi/6tmZKSV3BPAZ4bt74BpTVx5zukbviqtuMMk4V33KUWvBbElaflU3prM4YgI9veO4a6yDihT92QdlQ3n5iPlmJnhzxtY+a9Z9n9DlM6bp6r5YTGfayQ6NtRrtBST8iLmod5cvxtBCFQxHcyGEbVzAkkhNPAxXEpDX7FsP1szn6v+19xSjDbJyvZb8xUDWmqaxsTUm72288Kzcl/TSP2YRLh6VBrUf5qg==

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.




Archive powered by MHonArc 2.6.18.

Top of Page