Skip to content

Commit

Permalink
feat(CategoryTheory): natural version of FullyFaithful.homEquiv (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
TwoFX committed Oct 20, 2024
1 parent a399646 commit cf0049e
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion Mathlib/CategoryTheory/Yoneda.lean
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace CategoryTheory

open Opposite

universe v v₁ u₁ u₂
universe v v₁ v₂ u₁ u₂

-- morphism levels before object levels. See note [CategoryTheory universes].
variable {C : Type u₁} [Category.{v₁} C]
Expand Down Expand Up @@ -767,4 +767,24 @@ lemma yonedaMap_app_apply {Y : C} {X : Cᵒᵖ} (f : X.unop ⟶ Y) :

end

namespace Functor.FullyFaithful

variable {C : Type u₁} [Category.{v₁} C]

/-- `FullyFaithful.homEquiv` as a natural isomorphism. -/
def homNatIso {D : Type u₂} [Category.{v₂} D] {F : C ⥤ D} (hF : F.FullyFaithful) (X : C) :
F.op ⋙ yoneda.obj (F.obj X) ⋙ uliftFunctor.{v₁} ≅ yoneda.obj X ⋙ uliftFunctor.{v₂} :=
NatIso.ofComponents
(fun Y => Equiv.toIso (Equiv.ulift.trans <| hF.homEquiv.symm.trans Equiv.ulift.symm))
(fun f => by ext; exact Equiv.ulift.injective (hF.map_injective (by simp)))

/-- `FullyFaithful.homEquiv` as a natural isomorphism. -/
def homNatIsoMaxRight {D : Type u₂} [Category.{max v₁ v₂} D] {F : C ⥤ D} (hF : F.FullyFaithful)
(X : C) : F.op ⋙ yoneda.obj (F.obj X) ≅ yoneda.obj X ⋙ uliftFunctor.{v₂} :=
NatIso.ofComponents
(fun Y => Equiv.toIso (hF.homEquiv.symm.trans Equiv.ulift.symm))
(fun f => by ext; exact Equiv.ulift.injective (hF.map_injective (by simp)))

end Functor.FullyFaithful

end CategoryTheory

0 comments on commit cf0049e

Please sign in to comment.