Preorders as categories #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
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 #
hom_of_le
andle_of_hom
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 category_theory.hom_of_le
and category_theory.le_of_hom
.
Express an inequality as a morphism in the corresponding preorder category.
Equations
- category_theory.hom_of_le h = {down := {down := h}}
Alias of category_theory.hom_of_le
.
Alias of category_theory.le_of_hom
.
Construct a morphism in the opposite of a preorder category from an inequality.
Equations
Equations
- category_theory.unique_to_top = {to_inhabited := category_theory.unique_to_top._aux_1 x, uniq := _}
Equations
- category_theory.unique_from_bot = {to_inhabited := category_theory.unique_from_bot._aux_1 x, uniq := _}
A categorical equivalence between partial orders is just an order isomorphism.