Lemma isEqualizer_z_iso {C : category} {e₁ e₂ x y : C} {f g : x --> y} {p₁ : e₁ --> x} {q₁ : p₁ · f = p₁ · g} {p₂ : e₂ --> x} {q₂ : p₂ · f = p₂ · g} (H : isEqualizer f g p₁ q₁) (h : z_iso e₂ e₁) (r : p₂ = h · p₁) : isEqualizer f g p₂ q₂. Proof. intros a k s. use iscontraprop1. - abstract (use invproofirrelevance ; intros φ₁ φ₂ ; use subtypePath ; [ intro ; apply homset_property | ] ; use (cancel_z_iso _ _ h) ; use (isEqualizerInsEq H) ; rewrite !assoc' ; rewrite <- !r ; exact (pr2 φ₁ @ !(pr2 φ₂))). - refine (EqualizerIn (make_Equalizer _ _ _ _ H) _ k s · inv_from_z_iso h ,, _). abstract (rewrite r ; rewrite !assoc' ; rewrite !(maponpaths (λ z, _ · z) (assoc _ _ _)) ; refine (maponpaths (λ z, _ · (z · _)) (z_iso_after_z_iso_inv h) @ _) ; rewrite id_left ; apply (EqualizerCommutes (make_Equalizer _ _ _ _ H))). Defined.
Require Import UniMath.Foundations.All. Require Import UniMath.MoreFoundations.All. Require Import UniMath.CategoryTheory.Core.Categories. Require Import UniMath.CategoryTheory.Core.Isos. Require Import UniMath.CategoryTheory.Core.Univalence. Require Import UniMath.CategoryTheory.Monics. Require Import UniMath.CategoryTheory.Retracts.