Lemma coproduct_of_functors_is_inverse {I : UU} {C D : category} (CP : Coproducts I D) {F G : I → C ⟶ D} (α : ∏ i : I, nat_z_iso (F i) (G i)) (c : C) : is_inverse_in_precat (coproduct_of_functors_nat_trans CP (λ i : I, α i) c) (CoproductOfArrows I D (CP (λ i : I, G i c)) (CP (λ i : I, F i c)) (λ i : I, pr1 (pr2 (α i) c))). Proof. split. + etrans. 1: apply precompWithCoproductArrow. apply pathsinv0, CoproductArrowUnique. intro i. etrans. 2: apply assoc'. etrans. 2: apply maponpaths_2, pathsinv0, (pr2 (pr2 (α i) c)). exact (id_right _ @ ! id_left _). + etrans. 1: apply precompWithCoproductArrow. apply pathsinv0, CoproductArrowUnique. intro i. etrans. 2: apply assoc'. etrans. 2: apply maponpaths_2, pathsinv0, (pr2 (pr2 (α i) c)). exact (id_right _ @ ! id_left _). Qed.
Require Import UniMath.Foundations.All. Require Import UniMath.MoreFoundations.All. Require Import UniMath.CategoryTheory.Core.Categories. Require Import UniMath.CategoryTheory.Core.NaturalTransformations. Require Import UniMath.CategoryTheory.Core.Functors. Require Import UniMath.CategoryTheory.Core.Isos. Require Import UniMath.CategoryTheory.Limits.Coproducts. Require Import UniMath.CategoryTheory.Limits.Graphs.Limits. Require Import UniMath.CategoryTheory.Limits.Graphs.Colimits. Require Import UniMath.CategoryTheory.Chains.All.