The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V24. Category theory

Mathlib.CategoryTheory.Category.Preorder

60 declarations. Mathlib docs · Source

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 and leOfHom provide translations between inequalities in the preorder, and morphisms in the associated category.
  • Monotone.functor is the functor associated to a monotone function.

theorem CategoryTheory.homOfLE.congr_simp E1 #

∀ {X : Type u} [inst : Preorder X] {x y : X} (h : x ≤ y), CategoryTheory.homOfLE h = CategoryTheory.homOfLE h

theorem Monotone.functor.congr_simp E1 #

∀ {X : Type u} {Y : Type v} [inst : Preorder X] [inst_1 : Preorder Y] {f f_1 : X → Y} (e_f : f = f_1) (h : Monotone f),
  h.functor = ⋯.functor

instance Preorder.smallCategory E0 #

(α : Type u) → [Preorder α] → CategoryTheory.SmallCategory α

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 E0 #

∀ {α : Type u} [inst : Preorder α] (U V : α), Subsingleton (U ⟶ V)

def CategoryTheory.homOfLE E3 #

{X : Type u} → [inst : Preorder X] → {x y : X} → x ≤ y → (x ⟶ y)

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

abbrev LE.le.hom E1 #

{X : Type u_1} → [inst : Preorder X] → {x y : X} → x ≤ y → (x ⟶ y)

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

theorem CategoryTheory.homOfLE_refl E0 #

∀ {X : Type u} [inst : Preorder X] {x : X} (h : x ≤ x), h.hom = CategoryTheory.CategoryStruct.id x

theorem CategoryTheory.homOfLE_comp E0 #

∀ {X : Type u} [inst : Preorder X] {x y z : X} (h : x ≤ y) (k : y ≤ z),
  CategoryTheory.CategoryStruct.comp (CategoryTheory.homOfLE h) (CategoryTheory.homOfLE k) = CategoryTheory.homOfLE ⋯

theorem CategoryTheory.leOfHom E3 #

∀ {X : Type u} [inst : Preorder X] {x y : X} (h : x ⟶ y), x ≤ y

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

theorem Quiver.Hom.le E2 #

∀ {X : Type u} [inst : Preorder X] {x y : X} (h : x ⟶ y), x ≤ y

Alias of CategoryTheory.leOfHom.


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

theorem CategoryTheory.homOfLE_leOfHom E1 #

∀ {X : Type u} [inst : Preorder X] {x y : X} (h : x ⟶ y), ⋯.hom = h

theorem CategoryTheory.homOfLE_isIso_of_eq E0 #

∀ {X : Type u} [inst : Preorder X] {x y : X} (h : x ≤ y), x = y → CategoryTheory.IsIso (CategoryTheory.homOfLE h)

theorem CategoryTheory.isIso_homOfLE E1 #

∀ {X : Type u} [inst : Preorder X] {x y : X} (h : x = y), CategoryTheory.IsIso (CategoryTheory.homOfLE ⋯)

theorem CategoryTheory.homOfLE_comp_eqToHom E0 #

∀ {X : Type u} [inst : Preorder X] {a b c : X} (hab : a ≤ b) (hbc : b = c),
  CategoryTheory.CategoryStruct.comp (CategoryTheory.homOfLE hab) (CategoryTheory.eqToHom hbc) =
    CategoryTheory.homOfLE ⋯

theorem CategoryTheory.homOfLE_comp_eqToHom_assoc E1 #

∀ {X : Type u} [inst : Preorder X] {a b c : X} (hab : a ≤ b) (hbc : b = c) {Z : X} (h : c ⟶ Z),
  CategoryTheory.CategoryStruct.comp (CategoryTheory.homOfLE hab)
      (CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom hbc) h) =
    CategoryTheory.CategoryStruct.comp (CategoryTheory.homOfLE ⋯) h

theorem CategoryTheory.eqToHom_comp_homOfLE E0 #

∀ {X : Type u} [inst : Preorder X] {a b c : X} (hab : a = b) (hbc : b ≤ c),
  CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom hab) (CategoryTheory.homOfLE hbc) =
    CategoryTheory.homOfLE ⋯

theorem CategoryTheory.eqToHom_comp_homOfLE_assoc E1 #

∀ {X : Type u} [inst : Preorder X] {a b c : X} (hab : a = b) (hbc : b ≤ c) {Z : X} (h : c ⟶ Z),
  CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom hab)
      (CategoryTheory.CategoryStruct.comp (CategoryTheory.homOfLE hbc) h) =
    CategoryTheory.CategoryStruct.comp (CategoryTheory.homOfLE ⋯) h

theorem CategoryTheory.homOfLE_op_comp_eqToHom_assoc E1 #

∀ {X : Type u} [inst : Preorder X] {a b c : X} (hab : b ≤ a) (hbc : Opposite.op b = Opposite.op c) {Z : Xᵒᵖ}
  (h : Opposite.op c ⟶ Z),
  CategoryTheory.CategoryStruct.comp (CategoryTheory.homOfLE hab).op
      (CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom hbc) h) =
    CategoryTheory.CategoryStruct.comp (CategoryTheory.homOfLE ⋯).op h

theorem CategoryTheory.homOfLE_op_comp_eqToHom E0 #

∀ {X : Type u} [inst : Preorder X] {a b c : X} (hab : b ≤ a) (hbc : Opposite.op b = Opposite.op c),
  CategoryTheory.CategoryStruct.comp (CategoryTheory.homOfLE hab).op (CategoryTheory.eqToHom hbc) =
    (CategoryTheory.homOfLE ⋯).op

theorem CategoryTheory.eqToHom_comp_homOfLE_op E0 #

∀ {X : Type u} [inst : Preorder X] {a b c : X} (hab : Opposite.op a = Opposite.op b) (hbc : c ≤ b),
  CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom hab) (CategoryTheory.homOfLE hbc).op =
    (CategoryTheory.homOfLE ⋯).op

theorem CategoryTheory.eqToHom_comp_homOfLE_op_assoc E1 #

∀ {X : Type u} [inst : Preorder X] {a b c : X} (hab : Opposite.op a = Opposite.op b) (hbc : c ≤ b) {Z : Xᵒᵖ}
  (h : Opposite.op c ⟶ Z),
  CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom hab)
      (CategoryTheory.CategoryStruct.comp (CategoryTheory.homOfLE hbc).op h) =
    CategoryTheory.CategoryStruct.comp (CategoryTheory.homOfLE ⋯).op h

def CategoryTheory.opHomOfLE E1 #

{X : Type u} → [inst : Preorder X] → {x y : Xᵒᵖ} → Opposite.unop x ≤ Opposite.unop y → (y ⟶ x)

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

theorem CategoryTheory.le_of_op_hom E1 #

∀ {X : Type u} [inst : Preorder X] {x y : Xᵒᵖ} (h : x ⟶ y), Opposite.unop y ≤ Opposite.unop x

instance CategoryTheory.uniqueToTop E0 #

{X : Type u} → [inst : Preorder X] → [inst_1 : OrderTop X] → {x : X} → Unique (x ⟶ ⊤)

instance CategoryTheory.uniqueFromBot E0 #

{X : Type u} → [inst : Preorder X] → [inst_1 : OrderBot X] → {x : X} → Unique (⊥ ⟶ x)

def CategoryTheory.orderDualEquivalence E1 #

(X : Type u) → [inst : Preorder X] → Xᵒᵈ ≌ Xᵒᵖ

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

theorem CategoryTheory.orderDualEquivalence_unitIso E0 #

∀ (X : Type u) [inst : Preorder X],
  (CategoryTheory.orderDualEquivalence X).unitIso = CategoryTheory.Iso.refl (CategoryTheory.Functor.id Xᵒᵈ)

theorem CategoryTheory.orderDualEquivalence_counitIso E0 #

∀ (X : Type u) [inst : Preorder X],
  (CategoryTheory.orderDualEquivalence X).counitIso =
    CategoryTheory.Iso.refl
      ({ obj := fun x ↦ OrderDual.toDual (Opposite.unop x), map := fun {X_1 Y} f ↦ CategoryTheory.homOfLE ⋯,
            map_id := ⋯, map_comp := ⋯ }.comp
        { obj := fun x ↦ Opposite.op (OrderDual.ofDual x), map := fun {X_1 Y} f ↦ (CategoryTheory.homOfLE ⋯).op,
          map_id := ⋯, map_comp := ⋯ })

theorem CategoryTheory.orderDualEquivalence_functor_obj E0 #

∀ (X : Type u) [inst : Preorder X] (x : Xᵒᵈ),
  (CategoryTheory.orderDualEquivalence X).functor.obj x = Opposite.op (OrderDual.ofDual x)

theorem CategoryTheory.orderDualEquivalence_functor_map E0 #

∀ (X : Type u) [inst : Preorder X] {X_1 Y : Xᵒᵈ} (f : X_1 ⟶ Y),
  (CategoryTheory.orderDualEquivalence X).functor.map f = (CategoryTheory.homOfLE ⋯).op

theorem CategoryTheory.orderDualEquivalence_inverse_obj E0 #

∀ (X : Type u) [inst : Preorder X] (x : Xᵒᵖ),
  (CategoryTheory.orderDualEquivalence X).inverse.obj x = OrderDual.toDual (Opposite.unop x)

theorem CategoryTheory.orderDualEquivalence_inverse_map E0 #

∀ (X : Type u) [inst : Preorder X] {X_1 Y : Xᵒᵖ} (f : X_1 ⟶ Y),
  (CategoryTheory.orderDualEquivalence X).inverse.map f = CategoryTheory.homOfLE ⋯

def Monotone.functor E3 #

{X : Type u} →
  {Y : Type v} → [inst : Preorder X] → [inst_1 : Preorder Y] → {f : X → Y} → Monotone f → CategoryTheory.Functor X Y

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

theorem Monotone.functor_obj E0 #

∀ {X : Type u} {Y : Type v} [inst : Preorder X] [inst_1 : Preorder Y] {f : X → Y} (h : Monotone f), h.functor.obj = f

theorem Monotone.functor_map_homOfLE E0 #

∀ {X : Type u} {Y : Type v} [inst : Preorder X] [inst_1 : Preorder Y] {f : X → Y} (hf : Monotone f) {a b : X}
  (h : a ≤ b), hf.functor.map (CategoryTheory.homOfLE h) = CategoryTheory.homOfLE ⋯

instance instFullFunctor E0 #

∀ {X : Type u} {Y : Type v} [inst : Preorder X] [inst_1 : Preorder Y] (f : X ↪o Y), ⋯.functor.Full

def OrderIso.equivalence E1 #

{X : Type u} → {Y : Type v} → [inst : Preorder X] → [inst_1 : Preorder Y] → X ≃o Y → (X ≌ Y)

The equivalence of categories X ≌ Y induced by e : X ≃o Y.

theorem OrderIso.equivalence_functor E0 #

∀ {X : Type u} {Y : Type v} [inst : Preorder X] [inst_1 : Preorder Y] (e : X ≃o Y), e.equivalence.functor = ⋯.functor

theorem OrderIso.equivalence_counitIso E0 #

∀ {X : Type u} {Y : Type v} [inst : Preorder X] [inst_1 : Preorder Y] (e : X ≃o Y),
  e.equivalence.counitIso = CategoryTheory.NatIso.ofComponents (fun x ↦ CategoryTheory.eqToIso ⋯) ⋯

theorem OrderIso.equivalence_inverse E0 #

∀ {X : Type u} {Y : Type v} [inst : Preorder X] [inst_1 : Preorder Y] (e : X ≃o Y), e.equivalence.inverse = ⋯.functor

theorem OrderIso.equivalence_unitIso E0 #

∀ {X : Type u} {Y : Type v} [inst : Preorder X] [inst_1 : Preorder Y] (e : X ≃o Y),
  e.equivalence.unitIso = CategoryTheory.NatIso.ofComponents (fun x ↦ CategoryTheory.eqToIso ⋯) ⋯

theorem CategoryTheory.Functor.monotone E1 #

∀ {X : Type u} {Y : Type v} [inst : Preorder X] [inst_1 : Preorder Y] (f : CategoryTheory.Functor X Y), Monotone f.obj

A functor between preorder categories is monotone.

def CategoryTheory.Functor.toOrderHom E1 #

{X : Type u} → {Y : Type v} → [inst : Preorder X] → [inst_1 : Preorder Y] → CategoryTheory.Functor X Y → X →o Y

A functor X ⥤ Y between preorder categories as an OrderHom.

theorem CategoryTheory.Functor.toOrderHom_coe E0 #

∀ {X : Type u} {Y : Type v} [inst : Preorder X] [inst_1 : Preorder Y] (F : CategoryTheory.Functor X Y) (a : X),
  F.toOrderHom a = F.obj a

abbrev OrderHom.toFunctor E1 #

{X : Type u} → {Y : Type v} → [inst : Preorder X] → [inst_1 : Preorder Y] → (X →o Y) → CategoryTheory.Functor X Y

An OrderHom as a functor X ⥤ Y between preorder categories.

def OrderHom.equivFunctor E1 #

{X : Type u} → {Y : Type v} → [inst : Preorder X] → [inst_1 : Preorder Y] → (X →o Y) ≃ CategoryTheory.Functor X Y

The equivalence between X →o Y and the type of functors X ⥤ Y between preorder categories X and Y.

theorem OrderHom.equivFunctor_apply E0 #

∀ {X : Type u} {Y : Type v} [inst : Preorder X] [inst_1 : Preorder Y] (f : X →o Y),
  OrderHom.equivFunctor f = f.toFunctor

theorem OrderHom.equivFunctor_symm_apply E0 #

∀ {X : Type u} {Y : Type v} [inst : Preorder X] [inst_1 : Preorder Y] (F : CategoryTheory.Functor X Y),
  OrderHom.equivFunctor.symm F = F.toOrderHom

def OrderHom.equivalenceFunctor E1 #

{X : Type u} → {Y : Type v} → [inst : Preorder X] → [inst_1 : Preorder Y] → X →o Y ≌ CategoryTheory.Functor X Y

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.

theorem OrderHom.equivalenceFunctor_counitIso_inv_app_app E0 #

∀ {X : Type u} {Y : Type v} [inst : Preorder X] [inst_1 : Preorder Y] (X_1 : CategoryTheory.Functor X Y) (X_2 : X),
  (OrderHom.equivalenceFunctor.counitIso.inv.app X_1).app X_2 = CategoryTheory.CategoryStruct.id (X_1.obj X_2)

theorem OrderHom.equivalenceFunctor_functor_obj_obj E0 #

∀ {X : Type u} {Y : Type v} [inst : Preorder X] [inst_1 : Preorder Y] (f : X →o Y) (a : X),
  (OrderHom.equivalenceFunctor.functor.obj f).obj a = f a

theorem OrderHom.equivalenceFunctor_counitIso_hom_app_app E0 #

∀ {X : Type u} {Y : Type v} [inst : Preorder X] [inst_1 : Preorder Y] (X_1 : CategoryTheory.Functor X Y) (X_2 : X),
  (OrderHom.equivalenceFunctor.counitIso.hom.app X_1).app X_2 = CategoryTheory.CategoryStruct.id (X_1.obj X_2)

theorem OrderHom.equivalenceFunctor_unitIso_hom_app E0 #

∀ {X : Type u} {Y : Type v} [inst : Preorder X] [inst_1 : Preorder Y] (X_1 : X →o Y),
  OrderHom.equivalenceFunctor.unitIso.hom.app X_1 = CategoryTheory.CategoryStruct.id X_1

theorem OrderHom.equivalenceFunctor_inverse_obj E0 #

∀ {X : Type u} {Y : Type v} [inst : Preorder X] [inst_1 : Preorder Y] (F : CategoryTheory.Functor X Y),
  OrderHom.equivalenceFunctor.inverse.obj F = F.toOrderHom

theorem OrderHom.equivalenceFunctor_unitIso_inv_app E0 #

∀ {X : Type u} {Y : Type v} [inst : Preorder X] [inst_1 : Preorder Y] (X_1 : X →o Y),
  OrderHom.equivalenceFunctor.unitIso.inv.app X_1 = CategoryTheory.CategoryStruct.id X_1

theorem CategoryTheory.Iso.to_eq E0 #

∀ {X : Type u} [inst : PartialOrder X] {x y : X} (f : x ≅ y), x = y

def CategoryTheory.Equivalence.toOrderIso E1 #

{X : Type u} → {Y : Type v} → [inst : PartialOrder X] → [inst_1 : PartialOrder Y] → (X ≌ Y) → X ≃o Y

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

theorem CategoryTheory.Equivalence.toOrderIso_apply E0 #

∀ {X : Type u} {Y : Type v} [inst : PartialOrder X] [inst_1 : PartialOrder Y] (e : X ≌ Y) (x : X),
  e.toOrderIso x = e.functor.obj x

theorem CategoryTheory.Equivalence.toOrderIso_symm_apply E0 #

∀ {X : Type u} {Y : Type v} [inst : PartialOrder X] [inst_1 : PartialOrder Y] (e : X ≌ Y) (y : Y),
  e.toOrderIso.symm y = e.inverse.obj y

theorem PartialOrder.isIso_iff_eq E0 #

∀ {X : Type u} [inst : PartialOrder X] {a b : X} (f : a ⟶ b), CategoryTheory.IsIso f ↔ a = b