(* Copyright 2012-2015 by Adam Petcher.				* * Use of this source code is governed by the license described	* * in the LICENSE file at the root of the source tree.		*)
(* a type class and other definitions for decidable equality *)
Set Implicit Arguments.
Definition eq_dec(A : Set) := forall (a1 a2 : A), {a1 = a2} + {a1 <> a2}.
Class EqDec (A : Set) := {
eqb : A -> A -> bool ;
eqb_leibniz : forall x y, eqb x y = true <-> x = y
}.
Infix "?=" := eqb (at level 70) : eq_scope.
Infix "!=" := (fun x y => negb (eqb x y)) (at level 70) : eq_scope.

Theorem eqb_refl : forall (A : Set)(pf : EqDec A)(a : A),
eqb a a = true.