Definition unique_image_to_is_z_iso_in_REL {X Y : hSet} (r : bin_hrel X Y) : (∏ x: X, ∃! y : Y, r x y) × (∏ y : Y, ∃! x : X, r x y) -> is_z_isomorphism (C := REL) r. Proof. intros [px py]. exists (λ y x, r x y). split ; repeat (apply funextsec ; intro). - apply (unique_image_to_inverse_law_in_REL py px). - apply (unique_image_to_inverse_law_in_REL px py). 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.Categories.HSET.All.