A setoid is just a typeRequire Setoid.
A
and an equivalence relation on A
.It looks like :theories/Setoids/Setoid.v
Section Setoid. Variable A : Type. Variable Aeq : A -> A -> Prop. Record Setoid_Theory : Prop := { Seq_refl : (x:A) (Aeq x x); Seq_sym : (x,y:A) (Aeq x y) -> (Aeq y x); Seq_trans : (x,y,z:A) (Aeq x y) -> (Aeq y z) -> (Aeq x z) }.
A
, you must provide a relation
Aeq
on A
and prove that Aeq
is an equivalence
relation. That is, you have to define an object of type
(Setoid_Theory A Aeq)
.Add Setoid A Aeq STwhere Aeq is a term of type A->A->Prop and ST is a term of type (Setoid_Theory A Aeq).