Lean4
/-- Given a limit cone for the family `f : J → (X ⟶ Y)`, for any `Z`, morphisms from `Z` to its point
are in bijection with morphisms `h : Z ⟶ X` such that `∀ j₁ j₂, h ≫ f j₁ = h ≫ f j₂`.
Further, this bijection is natural in `Z`: see `Trident.Limits.homIso_natural`.
-/
@[simps]
def homIso [Nonempty J] {t : Trident f} (ht : IsLimit t) (Z : C) :
(Z ⟶ t.pt) ≃ { h : Z ⟶ X // ∀ j₁ j₂, h ≫ f j₁ = h ≫ f j₂ }
where
toFun k := ⟨k ≫ t.ι, by simp⟩
invFun h := (Trident.IsLimit.lift' ht _ h.prop).1
left_inv _ := Trident.IsLimit.hom_ext ht (Trident.IsLimit.lift' _ _ _).prop
right_inv _ := Subtype.ext (Trident.IsLimit.lift' ht _ _).prop