Setoids.agda 394 B

12345678910111213141516171819
  1. module Setoids where
  2. open import Eq
  3. open import Prelude
  4. record Setoid : Set1 where
  5. field
  6. carrier : Set
  7. _≈_ : carrier -> carrier -> Set
  8. equiv : Equiv _≈_
  9. record Datoid : Set1 where
  10. field
  11. setoid : Setoid
  12. _≟_ : forall x y -> Dec (Setoid._≈_ setoid x y)
  13. Setoid-≡ : Set -> Setoid
  14. Setoid-≡ a = record { carrier = a; _≈_ = _≡_; equiv = Equiv-≡ }