Lean4
/-- The inclusion of a fiber `F.obj c` of a functor `F : C ⥤ Cat` into its Grothendieck
construction. -/
@[simps obj map]
def ι (c : C) : F.obj c ⥤ Grothendieck F where
obj d := ⟨c, d⟩
map f := ⟨𝟙 _, eqToHom (by simp) ≫ f⟩
map_id
d := by
dsimp
congr
simp only [Category.comp_id]
map_comp f
g := by
apply Grothendieck.ext _ _ (by simp)
simp only [comp_base, ← Category.assoc, eqToHom_trans, comp_fiber, Functor.map_comp, eqToHom_map]
congr 1
simp only [eqToHom_comp_iff, Category.assoc, eqToHom_trans_assoc]
apply Functor.congr_hom (F.map_id _).symm