File: Mathlib/CategoryTheory/NatIso.lean

full_name: CategoryTheory.Iso.app_inv
code: /-- The application of a natural isomorphism to an object. We put this definition in a different
namespace, so that we can use `α.app` -/
@[simps]
def app {F G : C ⥤ D} (α : F ≅ G) (X : C) :
    F.obj X ≅ G.obj X 
goal: (α.app X).inv = α.inv.app X

full_name: CategoryTheory.Iso.app
code: /-- The application of a natural isomorphism to an object. We put this definition in a different
namespace, so that we can use `α.app` -/
@[simps]
def app {F G : C ⥤ D} (α : F ≅ G) (X : C) :
    F.obj X ≅ G.obj X 
goal: F.obj X ≅ G.obj X

full_name: CategoryTheory.Iso.app_hom
code: /-- The application of a natural isomorphism to an object. We put this definition in a different
namespace, so that we can use `α.app` -/
@[simps]
def app {F G : C ⥤ D} (α : F ≅ G) (X : C) :
    F.obj X ≅ G.obj X 
goal: (α.app X).hom = α.hom.app X

full_name: CategoryTheory.Iso.hom_inv_id_app
code: @[reassoc (attr := simp)]
theorem hom_inv_id_app {F G : C ⥤ D} (α : F ≅ G) (X : C) :
    α.hom.app X ≫ α.inv.app X = 𝟙 (F.obj X) 
goal: α.hom.app X ≫ α.inv.app X = 𝟙 (F.obj X)

full_name: CategoryTheory.Iso.inv_hom_id_app
code: @[reassoc (attr := simp)]
theorem inv_hom_id_app {F G : C ⥤ D} (α : F ≅ G) (X : C) :
    α.inv.app X ≫ α.hom.app X = 𝟙 (G.obj X) 
goal: α.inv.app X ≫ α.hom.app X = 𝟙 (G.obj X)

full_name: CategoryTheory.NatIso.trans_app
code: @[simp]
theorem trans_app {F G H : C ⥤ D} (α : F ≅ G) (β : G ≅ H) (X : C) :
    (α ≪≫ β).app X = α.app X ≪≫ β.app X 
goal: (α ≪≫ β).app X = α.app X ≪≫ β.app X

full_name: CategoryTheory.NatIso.app_hom
code: theorem app_hom {F G : C ⥤ D} (α : F ≅ G) (X : C) : (α.app X).hom = α.hom.app X 
goal: (α.app X).hom = α.hom.app X

full_name: CategoryTheory.NatIso.app_inv
code: theorem app_inv {F G : C ⥤ D} (α : F ≅ G) (X : C) : (α.app X).inv = α.inv.app X 
goal: (α.app X).inv = α.inv.app X

full_name: CategoryTheory.NatIso.hom_app_isIso
code: instance hom_app_isIso (α : F ≅ G) (X : C) : IsIso (α.hom.app X) 
goal: CategoryTheory.IsIso (α.hom.app X)

full_name: CategoryTheory.NatIso.inv_app_isIso
code: instance inv_app_isIso (α : F ≅ G) (X : C) : IsIso (α.inv.app X) 
goal: CategoryTheory.IsIso (α.inv.app X)

full_name: CategoryTheory.NatIso.cancel_natIso_hom_left
code: @[simp]
theorem cancel_natIso_hom_left {X : C} {Z : D} (g g' : G.obj X ⟶ Z) :
    α.hom.app X ≫ g = α.hom.app X ≫ g' ↔ g = g' 
goal: α.hom.app X ≫ g = α.hom.app X ≫ g' ↔ g = g'

full_name: CategoryTheory.NatIso.cancel_natIso_inv_left
code: @[simp]
theorem cancel_natIso_inv_left {X : C} {Z : D} (g g' : F.obj X ⟶ Z) :
    α.inv.app X ≫ g = α.inv.app X ≫ g' ↔ g = g' 
goal: α.inv.app X ≫ g = α.inv.app X ≫ g' ↔ g = g'

full_name: CategoryTheory.NatIso.cancel_natIso_hom_right
code: @[simp]
theorem cancel_natIso_hom_right {X : D} {Y : C} (f f' : X ⟶ F.obj Y) :
    f ≫ α.hom.app Y = f' ≫ α.hom.app Y ↔ f = f' 
goal: f ≫ α.hom.app Y = f' ≫ α.hom.app Y ↔ f = f'

full_name: CategoryTheory.NatIso.cancel_natIso_inv_right
code: @[simp]
theorem cancel_natIso_inv_right {X : D} {Y : C} (f f' : X ⟶ G.obj Y) :
    f ≫ α.inv.app Y = f' ≫ α.inv.app Y ↔ f = f' 
goal: f ≫ α.inv.app Y = f' ≫ α.inv.app Y ↔ f = f'

full_name: CategoryTheory.NatIso.cancel_natIso_hom_right_assoc
code: @[simp]
theorem cancel_natIso_hom_right_assoc {W X X' : D} {Y : C} (f : W ⟶ X) (g : X ⟶ F.obj Y)
    (f' : W ⟶ X') (g' : X' ⟶ F.obj Y) :
    f ≫ g ≫ α.hom.app Y = f' ≫ g' ≫ α.hom.app Y ↔ f ≫ g = f' ≫ g' 
goal: f ≫ g ≫ α.hom.app Y = f' ≫ g' ≫ α.hom.app Y ↔ f ≫ g = f' ≫ g'

full_name: CategoryTheory.NatIso.cancel_natIso_inv_right_assoc
code: @[simp]
theorem cancel_natIso_inv_right_assoc {W X X' : D} {Y : C} (f : W ⟶ X) (g : X ⟶ G.obj Y)
    (f' : W ⟶ X') (g' : X' ⟶ G.obj Y) :
    f ≫ g ≫ α.inv.app Y = f' ≫ g' ≫ α.inv.app Y ↔ f ≫ g = f' ≫ g' 
goal: f ≫ g ≫ α.inv.app Y = f' ≫ g' ≫ α.inv.app Y ↔ f ≫ g = f' ≫ g'

full_name: CategoryTheory.NatIso.inv_inv_app
code: @[simp]
theorem inv_inv_app {F G : C ⥤ D} (e : F ≅ G) (X : C) : inv (e.inv.app X) = e.hom.app X 
goal: CategoryTheory.inv (e.inv.app X) = e.hom.app X

full_name: CategoryTheory.NatIso.naturality_1
code: theorem naturality_1 (α : F ≅ G) (f : X ⟶ Y) : α.inv.app X ≫ F.map f ≫ α.hom.app Y = G.map f 
goal: α.inv.app X ≫ F.map f ≫ α.hom.app Y = G.map f

full_name: CategoryTheory.NatIso.naturality_2
code: theorem naturality_2 (α : F ≅ G) (f : X ⟶ Y) : α.hom.app X ≫ G.map f ≫ α.inv.app Y = F.map f 
goal: α.hom.app X ≫ G.map f ≫ α.inv.app Y = F.map f

full_name: CategoryTheory.NatIso.naturality_1'
code: theorem naturality_1' (α : F ⟶ G) (f : X ⟶ Y) {_ : IsIso (α.app X)} :
    inv (α.app X) ≫ F.map f ≫ α.app Y = G.map f 
goal: ∀ {x : CategoryTheory.IsIso (α.app X)}, CategoryTheory.inv (α.app X) ≫ F.map f ≫ α.app Y = G.map f

full_name: CategoryTheory.NatIso.naturality_2'
code: @[reassoc (attr := simp)]
theorem naturality_2' (α : F ⟶ G) (f : X ⟶ Y) {_ : IsIso (α.app Y)} :
    α.app X ≫ G.map f ≫ inv (α.app Y) = F.map f 
goal: ∀ {x : CategoryTheory.IsIso (α.app Y)}, α.app X ≫ G.map f ≫ CategoryTheory.inv (α.app Y) = F.map f

full_name: CategoryTheory.NatIso.isIso_app_of_isIso
code: /-- The components of a natural isomorphism are isomorphisms.
-/
instance isIso_app_of_isIso (α : F ⟶ G) [IsIso α] (X) : IsIso (α.app X) 
goal: CategoryTheory.IsIso (α.app X)

full_name: CategoryTheory.NatIso.isIso_inv_app
code: @[simp]
theorem isIso_inv_app (α : F ⟶ G) {_ : IsIso α} (X) : (inv α).app X = inv (α.app X) 
goal: ∀ {x : CategoryTheory.IsIso α} (X : C), (CategoryTheory.inv α).app X = CategoryTheory.inv (α.app X)

full_name: CategoryTheory.NatIso.inv_map_inv_app
code: @[simp]
theorem inv_map_inv_app (F : C ⥤ D ⥤ E) {X Y : C} (e : X ≅ Y) (Z : D) :
    inv ((F.map e.inv).app Z) = (F.map e.hom).app Z 
goal: CategoryTheory.inv ((F.map e.inv).app Z) = (F.map e.hom).app Z

full_name: CategoryTheory.NatIso.ofComponents
code: /-- Construct a natural isomorphism between functors by giving object level isomorphisms,
and checking naturality only in the forward direction.
-/
@[simps]
def ofComponents (app : ∀ X : C, F.obj X ≅ G.obj X)
    (naturality : ∀ {X Y : C} (f : X ⟶ Y),
      F.map f ≫ (app Y).hom = (app X).hom ≫ G.map f := by aesop_cat) :
    F ≅ G 
goal: F ≅ G

full_name: CategoryTheory.NatIso.ofComponents_hom_app
code: /-- Construct a natural isomorphism between functors by giving object level isomorphisms,
and checking naturality only in the forward direction.
-/
@[simps]
def ofComponents (app : ∀ X : C, F.obj X ≅ G.obj X)
    (naturality : ∀ {X Y : C} (f : X ⟶ Y),
      F.map f ≫ (app Y).hom = (app X).hom ≫ G.map f := by aesop_cat) :
    F ≅ G 
goal: (CategoryTheory.NatIso.ofComponents app naturality).hom.app X = (app X).hom

full_name: CategoryTheory.NatIso.ofComponents_inv_app
code: /-- Construct a natural isomorphism between functors by giving object level isomorphisms,
and checking naturality only in the forward direction.
-/
@[simps]
def ofComponents (app : ∀ X : C, F.obj X ≅ G.obj X)
    (naturality : ∀ {X Y : C} (f : X ⟶ Y),
      F.map f ≫ (app Y).hom = (app X).hom ≫ G.map f := by aesop_cat) :
    F ≅ G 
goal: (CategoryTheory.NatIso.ofComponents app naturality).inv.app X = (app X).inv

full_name: CategoryTheory.NatIso.ofComponents.app
code: @[simp]
theorem ofComponents.app (app' : ∀ X : C, F.obj X ≅ G.obj X) (naturality) (X) :
    (ofComponents app' naturality).app X = app' X 
goal: (CategoryTheory.NatIso.ofComponents app' naturality).app X = app' X

full_name: CategoryTheory.NatIso.isIso_of_isIso_app
code: /-- A natural transformation is an isomorphism if all its components are isomorphisms.
-/
theorem isIso_of_isIso_app (α : F ⟶ G) [∀ X : C, IsIso (α.app X)] : IsIso α 
goal: CategoryTheory.IsIso α

full_name: CategoryTheory.NatIso.hcomp_hom
code: /-- Horizontal composition of natural isomorphisms. -/
@[simps]
def hcomp {F G : C ⥤ D} {H I : D ⥤ E} (α : F ≅ G) (β : H ≅ I) : F ⋙ H ≅ G ⋙ I 
goal: (CategoryTheory.NatIso.hcomp α β).hom = α.hom ◫ β.hom

full_name: CategoryTheory.NatIso.hcomp
code: /-- Horizontal composition of natural isomorphisms. -/
@[simps]
def hcomp {F G : C ⥤ D} {H I : D ⥤ E} (α : F ≅ G) (β : H ≅ I) : F ⋙ H ≅ G ⋙ I 
goal: F ⋙ H ≅ G ⋙ I

full_name: CategoryTheory.NatIso.hcomp_inv
code: /-- Horizontal composition of natural isomorphisms. -/
@[simps]
def hcomp {F G : C ⥤ D} {H I : D ⥤ E} (α : F ≅ G) (β : H ≅ I) : F ⋙ H ≅ G ⋙ I 
goal: (CategoryTheory.NatIso.hcomp α β).inv = α.inv ◫ β.inv

full_name: CategoryTheory.NatIso.isIso_map_iff
code: theorem isIso_map_iff {F₁ F₂ : C ⥤ D} (e : F₁ ≅ F₂) {X Y : C} (f : X ⟶ Y) :
    IsIso (F₁.map f) ↔ IsIso (F₂.map f) 
goal: CategoryTheory.IsIso (F₁.map f) ↔ CategoryTheory.IsIso (F₂.map f)

full_name: CategoryTheory.NatTrans.isIso_iff_isIso_app
code: lemma NatTrans.isIso_iff_isIso_app {F G : C ⥤ D} (τ : F ⟶ G) :
    IsIso τ ↔ ∀ X, IsIso (τ.app X) 
goal: CategoryTheory.IsIso τ ↔ ∀ (X : C), CategoryTheory.IsIso (τ.app X)

full_name: CategoryTheory.Functor.copyObj
code: /-- Constructor for a functor that is isomorphic to a given functor `F : C ⥤ D`,
while being definitionally equal on objects to a given map `obj : C → D`
such that for all `X : C`, we have an isomorphism `F.obj X ≅ obj X`. -/
@[simps obj]
def copyObj : C ⥤ D 
goal: C ⥤ D

full_name: CategoryTheory.Functor.copyObj_obj
code: /-- Constructor for a functor that is isomorphic to a given functor `F : C ⥤ D`,
while being definitionally equal on objects to a given map `obj : C → D`
such that for all `X : C`, we have an isomorphism `F.obj X ≅ obj X`. -/
@[simps obj]
def copyObj : C ⥤ D 
goal: ∀ (a : C), (F.copyObj obj e).obj a = obj a

full_name: CategoryTheory.Functor.isoCopyObj
code: /-- The functor constructed with `copyObj` is isomorphic to the given functor. -/
@[simps!]
def isoCopyObj : F ≅ F.copyObj obj e 
goal: F ≅ F.copyObj obj e

full_name: CategoryTheory.Functor.isoCopyObj_hom_app
code: /-- The functor constructed with `copyObj` is isomorphic to the given functor. -/
@[simps!]
def isoCopyObj : F ≅ F.copyObj obj e 
goal: (F.isoCopyObj obj e).hom.app X = (e X).hom

full_name: CategoryTheory.Functor.isoCopyObj_inv_app
code: /-- The functor constructed with `copyObj` is isomorphic to the given functor. -/
@[simps!]
def isoCopyObj : F ≅ F.copyObj obj e 
goal: (F.isoCopyObj obj e).inv.app X = (e X).inv