proposition: Lemma weak_equiv_lifts_preserves_binproducts {C1 : category} (C2 C3 : univalent_category) {F : C1 ⟶ C3} {G : C1 ⟶ C2} {H : C2 ⟶ C3} (α : nat_z_iso (G ∙ H) F) (C1_prod : hasBinProducts C1) (C2_prod : hasBinProducts (pr1 C2)) (C3_prod : hasBinProducts (pr1 C3)) (Gw : is_weak_equiv G) : preserves_binproduct F → preserves_binproduct H.
proof: Proof. intros Fprod y1 y2 py π₁p π₂p p_ispr. use (factor_through_squash _ _ (eso_from_weak_equiv _ Gw y1)). { apply isaprop_isBinProduct. } intros [x1 i1]. use (factor_through_squash _ _ (eso_from_weak_equiv _ Gw y2)). { apply isaprop_isBinProduct. } intros [x2 i2]. simpl in C1_prod, C2_prod, C3_prod. use (factor_through_squash _ _ (eso_from_weak_equiv _ Gw py)). { apply isaprop_isBinProduct. } intros [px i]. set (G_reflect := weak_equiv_reflects_products (ff_from_weak_equiv _ Gw) x1 x2 px). set (π₁ := (fully_faithful_inv_hom (ff_from_weak_equiv _ Gw)) _ _ (i · π₁p · z_iso_inv i1)). set (π₂ := (fully_faithful_inv_hom (ff_from_weak_equiv _ Gw)) _ _ (i · π₂p · z_iso_inv i2)). set (is1 := z_iso_comp (functor_on_z_iso H (z_iso_inv i1)) ((_,, pr2 α x1))). set (is2 := z_iso_comp (functor_on_z_iso H (z_iso_inv i2)) ((_,, pr2 α x2))). assert (pf1 : i · π₁p = # G π₁ · i1). { unfold π₁. rewrite functor_on_fully_faithful_inv_hom. rewrite assoc'. rewrite z_iso_inv_after_z_iso. now rewrite id_right. } assert (pf2 : i · π₂p = # G π₂ · i2). { unfold π₂. rewrite functor_on_fully_faithful_inv_hom. rewrite assoc'. rewrite z_iso_inv_after_z_iso. now rewrite id_right. } use (isbinproduct_of_isos _ is1 is2). + use (make_BinProduct _ _ _ _ _ _ (Fprod _ _ _ _ _ (G_reflect π₁ π₂ _))). exact (isbinproduct_of_isos (make_BinProduct _ _ _ _ _ _ p_ispr) i1 i2 i _ _ pf1 pf2). + exact (z_iso_comp (functor_on_z_iso H (z_iso_inv i)) (_ ,, pr2 α px)). + simpl. rewrite assoc'. etrans. { apply maponpaths. exact (! pr21 α _ _ π₁). } simpl. rewrite ! assoc. rewrite <- ! functor_comp. apply maponpaths_2, maponpaths. use z_iso_inv_on_left. rewrite assoc'. rewrite <- pf1. rewrite assoc. rewrite z_iso_after_z_iso_inv. now rewrite ! id_left. + simpl. rewrite assoc'. etrans. { apply maponpaths. exact (! pr21 α _ _ π₂). } simpl. rewrite ! assoc. rewrite <- ! functor_comp. apply maponpaths_2, maponpaths. use z_iso_inv_on_left. rewrite assoc'. rewrite <- pf2. rewrite assoc. rewrite z_iso_after_z_iso_inv. now rewrite ! id_left. Qed.
imports: UniMath.Foundations.All UniMath.MoreFoundations.All UniMath.CategoryTheory.Core.Categories UniMath.CategoryTheory.Core.Isos UniMath.CategoryTheory.Core.Univalence UniMath.CategoryTheory.Core.Functors UniMath.CategoryTheory.Core.NaturalTransformations UniMath.CategoryTheory.Adjunctions.Core UniMath.CategoryTheory.Equivalences.Core UniMath.CategoryTheory.Equivalences.CompositesAndInverses UniMath.CategoryTheory.FunctorCategory UniMath.CategoryTheory.Adjunctions.Core UniMath.CategoryTheory.Equivalences.Core UniMath.CategoryTheory.Equivalences.FullyFaithful UniMath.CategoryTheory.DisplayedCats.Core UniMath.CategoryTheory.DisplayedCats.Functors UniMath.CategoryTheory.DisplayedCats.Total UniMath.CategoryTheory.DisplayedCats.NaturalTransformations UniMath.CategoryTheory.DisplayedCats.Isos UniMath.CategoryTheory.DisplayedCats.Adjunctions UniMath.CategoryTheory.DisplayedCats.Equivalences UniMath.CategoryTheory.DisplayedCats.TotalAdjunction UniMath.CategoryTheory.WeakEquivalences UniMath.CategoryTheory.Limits.BinProducts UniMath.CategoryTheory.Limits.Preservation UniMath.Bicategories.Core.Bicat UniMath.Bicategories.Core.Invertible_2cells UniMath.Bicategories.Core.Examples.BicatOfUnivCats UniMath.Bicategories.Core.Examples.BicatOfCats UniMath.Bicategories.Core.Univalence UniMath.Bicategories.DisplayedBicats.DispBicat UniMath.Bicategories.DisplayedBicats.DispPseudofunctor UniMath.Bicategories.PseudoFunctors.Display.PseudoFunctorBicat UniMath.Bicategories.PseudoFunctors.PseudoFunctor UniMath.Bicategories.Transformations.PseudoTransformation UniMath.Bicategories.PseudoFunctors.Biadjunction UniMath.Bicategories.Modifications.Modification UniMath.Bicategories.PseudoFunctors.UniversalArrow UniMath.Bicategories.DisplayedBicats.DispBiadjunction UniMath.Bicategories.DisplayedBicats.DispInvertibles UniMath.Bicategories.PseudoFunctors.Examples.BicatOfCatToUnivCat UniMath.Bicategories.DisplayedBicats.Examples.DispBicatOnCatToUniv UniMath.Bicategories.DisplayedBicats.Examples.CategoriesWithStructure UniMath.Bicategories.DisplayedBicats.DisplayedUniversalArrow UniMath.Bicategories.DisplayedBicats.DisplayedUniversalArrowOnCat