Documentation

Mathlib.CategoryTheory.Category.Preorder

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 #

@[implicit_reducible, instance 100]
instance Preorder.smallCategory (ฮฑ : Type u) [Preorder ฮฑ] :

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.

instance Preorder.subsingleton_hom {ฮฑ : Type u} [Preorder ฮฑ] (U V : ฮฑ) :
Subsingleton (U โŸถ V)
def CategoryTheory.homOfLE {X : Type u} [Preorder X] {x y : X} (h : x โ‰ค y) :

Express an inequality as a morphism in the corresponding preorder category.

Instances For
    @[reducible, inline]
    abbrev LE.le.hom {X : Type u_1} [Preorder X] {x y : X} (h : x โ‰ค y) :

    Express an inequality as a morphism in the corresponding preorder category.

    Instances For
      @[simp]
      theorem CategoryTheory.homOfLE_comp {X : Type u} [Preorder X] {x y z : X} (h : x โ‰ค y) (k : y โ‰ค z) :
      theorem CategoryTheory.leOfHom {X : Type u} [Preorder X] {x y : X} (h : x โŸถ y) :

      Extract the underlying inequality from a morphism in a preorder category.

      @[reducible, inline]
      abbrev Quiver.Hom.le {X : Type u_1} [Preorder X] {x y : X} (h : x โŸถ y) :

      Extract the underlying inequality from a morphism in a preorder category.

      Instances For
        @[simp]
        theorem CategoryTheory.homOfLE_leOfHom {X : Type u} [Preorder X] {x y : X} (h : x โŸถ y) :
        โ‹ฏ.hom = h
        theorem CategoryTheory.homOfLE_isIso_of_eq {X : Type u} [Preorder X] {x y : X} (h : x โ‰ค y) (heq : x = y) :
        theorem CategoryTheory.isIso_homOfLE {X : Type u} [Preorder X] {x y : X} (h : x = y) :
        IsIso (homOfLE โ‹ฏ)
        @[simp]
        theorem CategoryTheory.homOfLE_comp_eqToHom {X : Type u} [Preorder X] {a b c : X} (hab : a โ‰ค b) (hbc : b = c) :
        theorem CategoryTheory.homOfLE_comp_eqToHom_assoc {X : Type u} [Preorder X] {a b c : X} (hab : a โ‰ค b) (hbc : b = c) {Z : X} (h : c โŸถ Z) :
        @[simp]
        theorem CategoryTheory.eqToHom_comp_homOfLE {X : Type u} [Preorder X] {a b c : X} (hab : a = b) (hbc : b โ‰ค c) :
        theorem CategoryTheory.eqToHom_comp_homOfLE_assoc {X : Type u} [Preorder X] {a b c : X} (hab : a = b) (hbc : b โ‰ค c) {Z : X} (h : c โŸถ Z) :
        @[simp]
        theorem CategoryTheory.homOfLE_op_comp_eqToHom {X : Type u} [Preorder X] {a b c : X} (hab : b โ‰ค a) (hbc : Opposite.op b = Opposite.op c) :
        CategoryStruct.comp (homOfLE hab).op (eqToHom hbc) = (homOfLE โ‹ฏ).op
        @[simp]
        theorem CategoryTheory.eqToHom_comp_homOfLE_op {X : Type u} [Preorder X] {a b c : X} (hab : Opposite.op a = Opposite.op b) (hbc : c โ‰ค b) :
        CategoryStruct.comp (eqToHom hab) (homOfLE hbc).op = (homOfLE โ‹ฏ).op

        Construct a morphism in the opposite of a preorder category from an inequality.

        Instances For
          @[implicit_reducible]
          @[implicit_reducible]

          The equivalence of categories from the order dual of a preordered type X to the opposite category of the preorder X.

          Instances For
            @[simp]
            theorem CategoryTheory.orderDualEquivalence_functor_map (X : Type u) [Preorder X] {Xโœ Yโœ : Xแต’แตˆ} (f : Xโœ โŸถ Yโœ) :
            @[simp]
            theorem CategoryTheory.orderDualEquivalence_counitIso (X : Type u) [Preorder X] :
            (orderDualEquivalence X).counitIso = Iso.refl ({ obj := fun (x : Xแต’แต–) => OrderDual.toDual (Opposite.unop x), map := fun {X_1 Y : Xแต’แต–} (f : X_1 โŸถ Y) => homOfLE โ‹ฏ, map_id := โ‹ฏ, map_comp := โ‹ฏ }.comp { obj := fun (x : Xแต’แตˆ) => Opposite.op (OrderDual.ofDual x), map := fun {X_1 Y : Xแต’แตˆ} (f : X_1 โŸถ Y) => (homOfLE โ‹ฏ).op, map_id := โ‹ฏ, map_comp := โ‹ฏ })
            @[simp]
            theorem CategoryTheory.orderDualEquivalence_inverse_map (X : Type u) [Preorder X] {Xโœ Yโœ : Xแต’แต–} (f : Xโœ โŸถ Yโœ) :
            def Monotone.functor {X : Type u} {Y : Type v} [Preorder X] [Preorder Y] {f : X โ†’ Y} (h : Monotone f) :

            A monotone function between preorders induces a functor between the associated categories.

            Instances For
              @[simp]
              theorem Monotone.functor_obj {X : Type u} {Y : Type v} [Preorder X] [Preorder Y] {f : X โ†’ Y} (h : Monotone f) :
              h.functor.obj = f
              instance instFullFunctor {X : Type u} {Y : Type v} [Preorder X] [Preorder Y] (f : X โ†ชo Y) :
              โ‹ฏ.functor.Full
              def OrderIso.equivalence {X : Type u} {Y : Type v} [Preorder X] [Preorder Y] (e : X โ‰ƒo Y) :

              The equivalence of categories X โ‰Œ Y induced by e : X โ‰ƒo Y.

              Instances For
                @[simp]
                theorem OrderIso.equivalence_inverse {X : Type u} {Y : Type v} [Preorder X] [Preorder Y] (e : X โ‰ƒo Y) :
                @[simp]
                theorem OrderIso.equivalence_functor {X : Type u} {Y : Type v} [Preorder X] [Preorder Y] (e : X โ‰ƒo Y) :
                theorem CategoryTheory.Functor.monotone {X : Type u} {Y : Type v} [Preorder X] [Preorder Y] (f : Functor X Y) :

                A functor between preorder categories is monotone.

                def CategoryTheory.Functor.toOrderHom {X : Type u} {Y : Type v} [Preorder X] [Preorder Y] (F : Functor X Y) :

                A functor X โฅค Y between preorder categories as an OrderHom.

                Instances For
                  @[simp]
                  theorem CategoryTheory.Functor.toOrderHom_coe {X : Type u} {Y : Type v} [Preorder X] [Preorder Y] (F : Functor X Y) (aโœ : X) :
                  F.toOrderHom aโœ = F.obj aโœ
                  @[reducible, inline]
                  abbrev OrderHom.toFunctor {X : Type u} {Y : Type v} [Preorder X] [Preorder Y] (f : X โ†’o Y) :

                  An OrderHom as a functor X โฅค Y between preorder categories.

                  Instances For

                    The equivalence between X โ†’o Y and the type of functors X โฅค Y between preorder categories X and Y.

                    Instances For

                      The categorical equivalence between the category of monotone functions X โ†’o Y and the category of functors X โฅค Y, where X and Y are preorder categories.

                      Instances For
                        @[simp]
                        theorem OrderHom.equivalenceFunctor_counitIso_hom_app_app {X : Type u} {Y : Type v} [Preorder X] [Preorder Y] (Xโœ : CategoryTheory.Functor X Y) (Xโœยน : X) :
                        (equivalenceFunctor.counitIso.hom.app Xโœ).app Xโœยน = CategoryTheory.CategoryStruct.id (Xโœ.obj Xโœยน)
                        @[simp]
                        theorem OrderHom.equivalenceFunctor_counitIso_inv_app_app {X : Type u} {Y : Type v} [Preorder X] [Preorder Y] (Xโœ : CategoryTheory.Functor X Y) (Xโœยน : X) :
                        (equivalenceFunctor.counitIso.inv.app Xโœ).app Xโœยน = CategoryTheory.CategoryStruct.id (Xโœ.obj Xโœยน)
                        theorem CategoryTheory.Iso.to_eq {X : Type u} [PartialOrder X] {x y : X} (f : x โ‰… y) :
                        x = y

                        A categorical equivalence between partial orders is just an order isomorphism.

                        Instances For
                          theorem PartialOrder.isIso_iff_eq {X : Type u} [PartialOrder X] {a b : X} (f : a โŸถ b) :
                          CategoryTheory.IsIso f โ†” a = b