Proposition is_functor_terminal_functor : is_functor terminal_functor_data. Proof. split. - intros x ; cbn. apply maponpaths. use (TerminalArrowEq (T := terminal_in_fib T x)). - intros x y z f g ; cbn. apply maponpaths. unfold terminal_mor_lift. cbn. rewrite mor_disp_transportf_postwhisker. rewrite mor_disp_transportf_prewhisker. rewrite transport_f_f. etrans. { apply maponpaths. use (terminal_mor_factorization_eq (idpath _) _ _ (TerminalArrow (lift_terminal_in_fib T f) (terminal_obj_in_fib T x) ;; HD y x f (terminal_obj_in_fib T y) ;; (TerminalArrow (lift_terminal_in_fib T g) (terminal_obj_in_fib T y) ;; HD z y g (terminal_obj_in_fib T z)))%mor_disp). refine (maponpaths (λ z, _ · z) (!(id_left _)) @ _). apply maponpaths_2. exact (!(id_left _)). } unfold transportb. rewrite transport_f_f. apply maponpaths_2. apply homset_property. Qed.
Require Import UniMath.Foundations.All. Require Import UniMath.MoreFoundations.All. Require Import UniMath.CategoryTheory.Core.Prelude. Require Import UniMath.CategoryTheory.Adjunctions.Core. Require Import UniMath.CategoryTheory.DisplayedCats.Core. Require Import UniMath.CategoryTheory.DisplayedCats.Univalence. Require Import UniMath.CategoryTheory.DisplayedCats.Total. Require Import UniMath.CategoryTheory.DisplayedCats.Functors. Require Import UniMath.CategoryTheory.DisplayedCats.NaturalTransformations. Require Import UniMath.CategoryTheory.DisplayedCats.Fibrations. Require Import UniMath.CategoryTheory.DisplayedCats.Fiber. Require Import UniMath.CategoryTheory.Limits.Terminal. Require Import UniMath.CategoryTheory.Limits.Preservation. Section RightAdjointFromTerminal. End RightAdjointFromTerminal.