Lean4
/-- The functor `Comma L R ⥤ Comma L' R'` induced by three functors `F₁`, `F₂`, `F`
and two natural transformations `F₁ ⋙ L' ⟶ L ⋙ F` and `R ⋙ F ⟶ F₂ ⋙ R'`. -/
@[simps]
def map : Comma L R ⥤ Comma L' R'
where
obj
X :=
{ left := F₁.obj X.left
right := F₂.obj X.right
hom := α.app X.left ≫ F.map X.hom ≫ β.app X.right }
map {X Y}
φ :=
{ left := F₁.map φ.left
right := F₂.map φ.right
w := by
dsimp
rw [assoc, assoc, ← Functor.comp_map, α.naturality_assoc, ← Functor.comp_map, ← β.naturality]
dsimp
rw [← F.map_comp_assoc, ← F.map_comp_assoc, φ.w] }