File: Mathlib/CategoryTheory/Category/Preorder.lean

full_name: Preorder.smallCategory
code: /--
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 <https://stacks.math.columbia.edu/tag/00D3>.
-/
instance (priority := 100) smallCategory (α : Type u) [Preorder α] : SmallCategory α 
goal: CategoryTheory.SmallCategory α

full_name: Preorder.subsingleton_hom
code: instance subsingleton_hom {α : Type u} [Preorder α] (U V : α) :
  Subsingleton (U ⟶ V) 
goal: Subsingleton (U ⟶ V)

full_name: CategoryTheory.homOfLE
code: /-- Express an inequality as a morphism in the corresponding preorder category.
-/
def homOfLE {x y : X} (h : x ≤ y) : x ⟶ y 
goal: x ⟶ y

full_name: LE.le.hom
code: @[inherit_doc homOfLE]
abbrev _root_.LE.le.hom 
goal: x ⟶ y

full_name: CategoryTheory.homOfLE_refl
code: @[simp]
theorem homOfLE_refl {x : X} (h : x ≤ x) : h.hom = 𝟙 x 
goal: h.hom = CategoryTheory.CategoryStruct.id x

full_name: CategoryTheory.homOfLE_comp
code: @[simp]
theorem homOfLE_comp {x y z : X} (h : x ≤ y) (k : y ≤ z) :
    homOfLE h ≫ homOfLE k = homOfLE (h.trans k) 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.homOfLE h) (CategoryTheory.homOfLE k) = CategoryTheory.homOfLE ⋯

full_name: CategoryTheory.leOfHom
code: /-- Extract the underlying inequality from a morphism in a preorder category.
-/
theorem leOfHom {x y : X} (h : x ⟶ y) : x ≤ y 
goal: x ≤ y

full_name: Quiver.Hom.le
code: @[nolint defLemma, inherit_doc leOfHom]
abbrev _root_.Quiver.Hom.le 
goal: x ≤ y

full_name: CategoryTheory.leOfHom_homOfLE
code: theorem leOfHom_homOfLE {x y : X} (h : x ≤ y) : h.hom.le = h 
goal: ⋯ = h

full_name: CategoryTheory.homOfLE_leOfHom
code: theorem homOfLE_leOfHom {x y : X} (h : x ⟶ y) : h.le.hom = h 
goal: ⋯.hom = h

full_name: CategoryTheory.homOfLE_isIso_of_eq
code: lemma homOfLE_isIso_of_eq {x y : X} (h : x ≤ y) (heq : x = y) :
    IsIso (homOfLE h) 
goal: CategoryTheory.IsIso (CategoryTheory.homOfLE h)

full_name: CategoryTheory.homOfLE_comp_eqToHom
code: @[simp, reassoc]
lemma homOfLE_comp_eqToHom {a b c : X} (hab : a ≤ b) (hbc : b = c) :
    homOfLE hab ≫ eqToHom hbc = homOfLE (hab.trans (le_of_eq hbc)) 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.homOfLE hab) (CategoryTheory.eqToHom hbc) = CategoryTheory.homOfLE ⋯

full_name: CategoryTheory.eqToHom_comp_homOfLE
code: @[simp, reassoc]
lemma eqToHom_comp_homOfLE {a b c : X} (hab : a = b) (hbc : b ≤ c) :
    eqToHom hab ≫ homOfLE hbc = homOfLE ((le_of_eq hab).trans hbc) 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom hab) (CategoryTheory.homOfLE hbc) = CategoryTheory.homOfLE ⋯

full_name: CategoryTheory.homOfLE_op_comp_eqToHom
code: @[simp, reassoc]
lemma homOfLE_op_comp_eqToHom {a b c : X} (hab : b ≤ a) (hbc : op b = op c) :
    (homOfLE hab).op ≫ eqToHom hbc = (homOfLE ((le_of_eq (op_injective hbc.symm)).trans hab)).op 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.homOfLE hab).op (CategoryTheory.eqToHom hbc) =
  (CategoryTheory.homOfLE ⋯).op

full_name: CategoryTheory.eqToHom_comp_homOfLE_op
code: @[simp, reassoc]
lemma eqToHom_comp_homOfLE_op {a b c : X} (hab : op a = op b) (hbc : c ≤ b) :
    eqToHom hab ≫ (homOfLE hbc).op = (homOfLE (hbc.trans (le_of_eq (op_injective hab.symm)))).op 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom hab) (CategoryTheory.homOfLE hbc).op =
  (CategoryTheory.homOfLE ⋯).op

full_name: CategoryTheory.opHomOfLE
code: /-- Construct a morphism in the opposite of a preorder category from an inequality. -/
def opHomOfLE {x y : Xᵒᵖ} (h : unop x ≤ unop y) : y ⟶ x 
goal: y ⟶ x

full_name: CategoryTheory.le_of_op_hom
code: theorem le_of_op_hom {x y : Xᵒᵖ} (h : x ⟶ y) : unop y ≤ unop x 
goal: Opposite.unop y ≤ Opposite.unop x

full_name: CategoryTheory.uniqueToTop
code: instance uniqueToTop [OrderTop X] {x : X} : Unique (x ⟶ ⊤) 
goal: Unique (x ⟶ ⊤)

full_name: CategoryTheory.uniqueFromBot
code: instance uniqueFromBot [OrderBot X] {x : X} : Unique (⊥ ⟶ x) 
goal: Unique (⊥ ⟶ x)

full_name: CategoryTheory.orderDualEquivalence
code: /-- The equivalence of categories from the order dual of a preordered type `X`
to the opposite category of the preorder `X`. -/
@[simps]
def orderDualEquivalence : Xᵒᵈ ≌ Xᵒᵖ 
goal: Xᵒᵈ ≌ Xᵒᵖ

full_name: CategoryTheory.orderDualEquivalence_inverse_map
code: /-- The equivalence of categories from the order dual of a preordered type `X`
to the opposite category of the preorder `X`. -/
@[simps]
def orderDualEquivalence : Xᵒᵈ ≌ Xᵒᵖ 
goal: ∀ {X_1 Y : Xᵒᵖ} (f : X_1 ⟶ Y), (CategoryTheory.orderDualEquivalence X).inverse.map f = CategoryTheory.homOfLE ⋯

full_name: CategoryTheory.orderDualEquivalence_functor_map
code: /-- The equivalence of categories from the order dual of a preordered type `X`
to the opposite category of the preorder `X`. -/
@[simps]
def orderDualEquivalence : Xᵒᵈ ≌ Xᵒᵖ 
goal: ∀ {X_1 Y : Xᵒᵈ} (f : X_1 ⟶ Y), (CategoryTheory.orderDualEquivalence X).functor.map f = (CategoryTheory.homOfLE ⋯).op

full_name: CategoryTheory.orderDualEquivalence_inverse_obj
code: /-- The equivalence of categories from the order dual of a preordered type `X`
to the opposite category of the preorder `X`. -/
@[simps]
def orderDualEquivalence : Xᵒᵈ ≌ Xᵒᵖ 
goal: (CategoryTheory.orderDualEquivalence X).inverse.obj x = OrderDual.toDual (Opposite.unop x)

full_name: CategoryTheory.orderDualEquivalence_unitIso
code: /-- The equivalence of categories from the order dual of a preordered type `X`
to the opposite category of the preorder `X`. -/
@[simps]
def orderDualEquivalence : Xᵒᵈ ≌ Xᵒᵖ 
goal: (CategoryTheory.orderDualEquivalence X).unitIso = CategoryTheory.Iso.refl (CategoryTheory.Functor.id Xᵒᵈ)

full_name: CategoryTheory.orderDualEquivalence_functor_obj
code: /-- The equivalence of categories from the order dual of a preordered type `X`
to the opposite category of the preorder `X`. -/
@[simps]
def orderDualEquivalence : Xᵒᵈ ≌ Xᵒᵖ 
goal: (CategoryTheory.orderDualEquivalence X).functor.obj x = Opposite.op (OrderDual.ofDual x)

full_name: CategoryTheory.orderDualEquivalence_counitIso
code: /-- The equivalence of categories from the order dual of a preordered type `X`
to the opposite category of the preorder `X`. -/
@[simps]
def orderDualEquivalence : Xᵒᵈ ≌ Xᵒᵖ 
goal: (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 := ⋯ })

full_name: Monotone.functor
code: /-- A monotone function between preorders induces a functor between the associated categories.
-/
def Monotone.functor {f : X → Y} (h : Monotone f) : X ⥤ Y 
goal: CategoryTheory.Functor X Y

full_name: Monotone.functor_obj
code: @[simp]
theorem Monotone.functor_obj {f : X → Y} (h : Monotone f) : h.functor.obj = f 
goal: h.functor.obj = f

full_name: instFullFunctor
code: instance (f : X ↪o Y) : f.monotone.functor.Full 
goal: ⋯.functor.Full

full_name: OrderIso.equivalence_unitIso
code: /-- The equivalence of categories `X ≌ Y` induced by `e : X ≃o Y`. -/
@[simps]
def OrderIso.equivalence (e : X ≃o Y) : X ≌ Y 
goal: e.equivalence.unitIso = CategoryTheory.NatIso.ofComponents (fun x => CategoryTheory.eqToIso ⋯) ⋯

full_name: OrderIso.equivalence_functor
code: /-- The equivalence of categories `X ≌ Y` induced by `e : X ≃o Y`. -/
@[simps]
def OrderIso.equivalence (e : X ≃o Y) : X ≌ Y 
goal: e.equivalence.functor = ⋯.functor

full_name: OrderIso.equivalence_counitIso
code: /-- The equivalence of categories `X ≌ Y` induced by `e : X ≃o Y`. -/
@[simps]
def OrderIso.equivalence (e : X ≃o Y) : X ≌ Y 
goal: e.equivalence.counitIso = CategoryTheory.NatIso.ofComponents (fun x => CategoryTheory.eqToIso ⋯) ⋯

full_name: OrderIso.equivalence
code: /-- The equivalence of categories `X ≌ Y` induced by `e : X ≃o Y`. -/
@[simps]
def OrderIso.equivalence (e : X ≃o Y) : X ≌ Y 
goal: X ≌ Y

full_name: OrderIso.equivalence_inverse
code: /-- The equivalence of categories `X ≌ Y` induced by `e : X ≃o Y`. -/
@[simps]
def OrderIso.equivalence (e : X ≃o Y) : X ≌ Y 
goal: e.equivalence.inverse = ⋯.functor

full_name: CategoryTheory.Functor.monotone
code: /-- A functor between preorder categories is monotone.
-/
@[mono]
theorem Functor.monotone (f : X ⥤ Y) : Monotone f.obj 
goal: Monotone f.obj

full_name: CategoryTheory.Iso.to_eq
code: theorem Iso.to_eq {x y : X} (f : x ≅ y) : x = y 
goal: x = y

full_name: CategoryTheory.Equivalence.toOrderIso
code: /-- A categorical equivalence between partial orders is just an order isomorphism.
-/
def Equivalence.toOrderIso (e : X ≌ Y) : X ≃o Y 
goal: X ≃o Y

full_name: CategoryTheory.Equivalence.toOrderIso_apply
code: @[simp]
theorem Equivalence.toOrderIso_apply (e : X ≌ Y) (x : X) : e.toOrderIso x = e.functor.obj x 
goal: e.toOrderIso x = e.functor.obj x

full_name: CategoryTheory.Equivalence.toOrderIso_symm_apply
code: @[simp]
theorem Equivalence.toOrderIso_symm_apply (e : X ≌ Y) (y : Y) :
    e.toOrderIso.symm y = e.inverse.obj y 
goal: e.toOrderIso.symm y = e.inverse.obj y