Definition invertiblefunction_to_invertiblerelation {X Y : hSet} {f : X -> Y} (i : is_z_isomorphism (C := HSET) f) : is_z_isomorphism (C := REL) (function_to_bin_hrel f). Proof. apply (make_is_z_isomorphism (C := REL) _ (function_to_bin_hrel (pr1 i))). split. - exact (invertiblefunction_to_invertiblerelation_laws i). - exact (invertiblefunction_to_invertiblerelation_laws (is_z_iso_inv_from_z_iso ((_ ,, i) : z_iso (C := HSET) _ _))). 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.