Definition alternative_inv_to_relmonadmor_z_iso {C : precategory_data} (D : category) (J : functor C D) {R R': RelMonad J} (α : z_iso(C := category_RelMonad D J) R R') : precategory_RelMonad D J ⟦R', R⟧. Proof. use tpair. - intro c. exact (inv_from_z_iso (functor_z_iso_pointwise_if_z_iso' C D (R_functor R) (R_functor R') (z_iso_from_is_relmonadmor_z_iso D J α) c)). - split. + intro c. apply pathsinv0. apply z_iso_inv_on_left. rewrite <- z_iso_from_is_relmonadmor_z_iso_p. apply pathsinv0. apply (r_eta_α (RelMonadMor_axioms_from_RelMonadMor (pr1 α))). + intros c d f. apply z_iso_inv_on_left. rewrite <- assoc. apply pathsinv0. apply z_iso_inv_on_right. do 2 rewrite <- z_iso_from_is_relmonadmor_z_iso_p. intermediate_path (pr1 (pr1 α) c · r_bind R' ((f · (inv_from_z_iso (functor_z_iso_pointwise_if_z_iso' C D (R_functor R) (R_functor R') (z_iso_from_is_relmonadmor_z_iso D J α) d) )) · (functor_z_iso_pointwise_if_z_iso' C D (R_functor R) (R_functor R') (z_iso_from_is_relmonadmor_z_iso D J α) d ))). 2: { apply cancel_precomposition. apply maponpaths. rewrite <- assoc. rewrite z_iso_after_z_iso_inv. apply id_right. } apply pathsinv0. rewrite <- z_iso_from_is_relmonadmor_z_iso_p. apply (α_r_bind (RelMonadMor_axioms_from_RelMonadMor (pr1 α))). Defined.
Require Import UniMath.Foundations.PartD. Require Import UniMath.Foundations.Propositions. Require Import UniMath.Foundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.PartA. Require Import UniMath.CategoryTheory.Core.Categories. Require Import UniMath.CategoryTheory.Core.Isos. Require Import UniMath.CategoryTheory.Core.NaturalTransformations. Require Import UniMath.CategoryTheory.Core.Univalence. Require Import UniMath.CategoryTheory.FunctorCategory. Require Import UniMath.CategoryTheory.Core.Functors. Require Import UniMath.CategoryTheory.Adjunctions.Core.