Lemma inv_of_ff_inv_is_inv (C D : precategory) (F : functor C D) (FF : fully_faithful F) (a b : C) (f : z_iso (F a) (F b)) : is_inverse_in_precat ((FF ^-1) f) ((FF ^-1) (inv_from_z_iso f)). Proof. unfold fully_faithful_inv_hom; simpl. split. apply (invmaponpathsweq (weq_from_fully_faithful FF a a)). set (HFFab := homotweqinvweq (weq_from_fully_faithful FF a b)). set (HFFba := homotweqinvweq (weq_from_fully_faithful FF b a)). simpl in *. rewrite functor_comp. rewrite HFFab; clear HFFab. rewrite HFFba; clear HFFba. rewrite functor_id. apply z_iso_inv_after_z_iso. apply (invmaponpathsweq (weq_from_fully_faithful FF b b)). set (HFFab := homotweqinvweq (weq_from_fully_faithful FF a b)). set (HFFba := homotweqinvweq (weq_from_fully_faithful FF b a)). simpl in *. rewrite functor_comp. rewrite HFFab. rewrite HFFba. rewrite functor_id. apply z_iso_after_z_iso_inv. Qed.
Require Import UniMath.Foundations.PartD. Require Import UniMath.Foundations.Propositions. Require Import UniMath.Foundations.Sets. Require Import UniMath.MoreFoundations.PartA. Require Import UniMath.MoreFoundations.Univalence. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.CategoryTheory.Core.Categories. Require Import UniMath.CategoryTheory.Core.Isos. Require Import UniMath.CategoryTheory.Core.TransportMorphisms. Require Import UniMath.CategoryTheory.Core.Univalence.