From Undecidability.L Require Import L Tactics.LTactics LBool.
(*From Undecidability.L.Complexity Require Import Monotonic UpToC.*)
Class eqbClass X (eqb : X -> X -> bool): Type :=
_eqb_spec : forall (x y:X), reflect (x=y) (eqb x y).
Hint Mode eqbClass + -: typeclass_instances. (* treat argument as input and force evar-freeness*)
Definition eqb X eqb `{H:eqbClass (X:=X) eqb} := eqb.
Arguments eqb {_ _ _}: simpl never.

Lemma eqb_spec {X} {f : X -> X -> bool} {_:eqbClass f}:
forall (x y:X), reflect (x=y) (eqb x y).