Preorders as categories #
We install a category instance on any preorder. This is not to be confused with the category of
preorders, defined in Order.Category.Preorder
.
We show that monotone functions between preorders correspond to functors of the associated categories.
Main definitions #
homOfLE
andleOfHom
provide translations between inequalities in the preorder, and morphisms in the associated category.Monotone.functor
is the functor associated to a monotone function.
The category structure coming from a preorder. There is a morphism X ⟶ Y
if and only if X ≤ Y
.
Because we don't allow morphisms to live in Prop
,
we have to define X ⟶ Y
as ULift (PLift (X ≤ Y))
.
See CategoryTheory.homOfLE
and CategoryTheory.leOfHom
.
See
Equations
Equations
- ⋯ = ⋯
Express an inequality as a morphism in the corresponding preorder category.
Equations
- CategoryTheory.homOfLE h = { down := { down := h } }
Instances For
Alias of CategoryTheory.leOfHom
.
Extract the underlying inequality from a morphism in a preorder category.
Equations
- CategoryTheory.uniqueToTop = { toInhabited := { default := CategoryTheory.homOfLE ⋯ }, uniq := ⋯ }
Equations
- CategoryTheory.uniqueFromBot = { toInhabited := { default := CategoryTheory.homOfLE ⋯ }, uniq := ⋯ }
A monotone function between preorders induces a functor between the associated categories.
Equations
- Monotone.functor h = { toPrefunctor := { obj := f, map := fun {X_1 Y_1 : X} (g : X_1 ⟶ Y_1) => CategoryTheory.homOfLE ⋯ }, map_id := ⋯, map_comp := ⋯ }
Instances For
A functor between preorder categories is monotone.
A categorical equivalence between partial orders is just an order isomorphism.
Equations
- CategoryTheory.Equivalence.toOrderIso e = { toEquiv := { toFun := e.functor.obj, invFun := e.inverse.obj, left_inv := ⋯, right_inv := ⋯ }, map_rel_iff' := ⋯ }