Require Coq.Setoids.Setoid.
Set Implicit Arguments.
Set Strict Implicit.
Class RelDec (T : Type) (equ : T -> T -> Prop) : Type :=
{ rel_dec : T -> T -> bool }.
Arguments rel_dec {_} {equ} {_} _ _.
Arguments rel_dec _ _ _ !x !y.
Class RelDec_Correct T (equ : T -> T -> Prop) (ED : RelDec equ) : Prop :=
{ rel_dec_correct : forall x y : T, rel_dec x y = true <-> equ x y }.
Notation "a ?[ r  ]  b" := (@rel_dec _ r _ a b) (at level 30, b at next level).
Definition eq_dec {T : Type} {ED : RelDec (@eq T)} := rel_dec.
Section neg_rel_dec_correct.
Context {T} {R:T -> T -> Prop} {RD:RelDec R} {RDC:RelDec_Correct RD}.
Definition neg_rel_dec_correct : forall {x y}, ~R x y <-> rel_dec x y = false.
End neg_rel_dec_correct.
Section rel_dec_p.
Context {T} {R:T -> T -> Prop} {RD:RelDec R} {RDC:RelDec_Correct RD}.
Definition rel_dec_p (x:T) (y:T) : {R x y} + {~R x y}.
Definition neg_rel_dec_p (x:T) (y:T) : {~R x y} + {R x y}.

Theorem rel_dec_sym : Symmetric eqt -> forall x y,
x ?[ eqt ] y = y ?[ eqt ] x.