Lemma idtoiso_functor_eq_from_functor_z_iso (C : precategory_data) (D : category) (H : is_univalent D) (F G : ob [C, D, D]) (gamma : z_iso F G) : idtoiso (functor_eq_from_functor_z_iso H F G gamma) = gamma. Proof. apply (z_iso_eq(C:=functor_category C D)). simpl; apply nat_trans_eq; intro a. apply D. assert (H' := idtoiso_functorcat_compute_pointwise C D _ F G (functor_eq_from_functor_z_iso H F G gamma) a). simpl in *. assert (H2 := maponpaths (@pr1 _ _ ) H'). simpl in H2. etrans. { apply H2. } clear H' H2. unfold functor_eq_from_functor_z_iso. unfold functor_eq. rewrite base_total2_paths. unfold pr1_functor_eq_from_functor_z_iso. rewrite base_total2_paths. intermediate_path (pr1 (idtoiso (isotoid D H (functor_z_iso_pointwise_if_z_iso C D D F G gamma (pr2 gamma) a)))). 2: { rewrite idtoiso_isotoid. apply idpath. } apply maponpaths. apply maponpaths. unfold pr1_pr1_functor_eq_from_functor_iso. rewrite toforallpaths_funextsec. apply idpath. Qed.
Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.Univalence. Require Import UniMath.CategoryTheory.Core.Categories. Require Import UniMath.CategoryTheory.Core.Isos. Require Import UniMath.CategoryTheory.Core.TransportMorphisms. Require Import UniMath.CategoryTheory.Core.Functors. Require Import UniMath.CategoryTheory.Core.NaturalTransformations. Require Import UniMath.CategoryTheory.Core.Univalence.