2014-07-10 03:41:41 +00:00
|
|
|
import standard
|
|
|
|
|
|
|
|
namespace setoid
|
|
|
|
inductive setoid : Type :=
|
2014-07-22 16:43:18 +00:00
|
|
|
| mk_setoid: Π (A : Type), (A → A → Prop) → setoid
|
2014-07-10 03:41:41 +00:00
|
|
|
|
|
|
|
definition carrier (s : setoid)
|
|
|
|
:= setoid_rec (λ a eq, a) s
|
|
|
|
|
2014-07-22 16:43:18 +00:00
|
|
|
definition eqv {s : setoid} : carrier s → carrier s → Prop
|
2014-07-10 03:41:41 +00:00
|
|
|
:= setoid_rec (λ a eqv, eqv) s
|
|
|
|
|
|
|
|
infix `≈`:50 := eqv
|
|
|
|
|
|
|
|
coercion carrier
|
|
|
|
|
|
|
|
inductive morphism (s1 s2 : setoid) : Type :=
|
|
|
|
| mk_morphism : Π (f : s1 → s2), (∀ x y, x ≈ y → f x ≈ f y) → morphism s1 s2
|
|
|
|
|
2014-08-07 23:59:08 +00:00
|
|
|
end setoid
|