Lemma is_functor_functorial_composition_data (A B C : category) : is_functor (functorial_composition_data A B C). Proof. split. - red. intros FG. unfold functorial_composition_data. unfold functor_on_morphisms. unfold pr2. change (# (post_comp_functor (pr2 FG)) (identity (pr1 FG)) · # (pre_comp_functor (pr1 FG)) (identity (pr2 FG)) = identity _). do 2 rewrite functor_id. apply id_left. - red. intros FG1 FG2 FG3 αβ1 αβ2. induction αβ1 as [α1 β1]. induction αβ2 as [α2 β2]. unfold functorial_composition_data. unfold functor_on_morphisms. unfold pr2. change (# (post_comp_functor (pr2 FG1)) (α1 · α2) · # (pre_comp_functor (pr1 FG3)) (β1 · β2) = # (post_comp_functor (pr2 FG1)) α1 · # (pre_comp_functor (pr1 FG2)) β1 · (# (post_comp_functor (pr2 FG2)) α2 · # (pre_comp_functor (pr1 FG3)) β2)). repeat rewrite functor_comp. repeat rewrite <- assoc. apply maponpaths. repeat rewrite assoc. apply cancel_postcomposition. apply (nat_trans_eq C). intro a. cbn. apply nat_trans_ax. Qed.
Require Import UniMath.Foundations.PartD. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.CategoryTheory.Core.Categories. Require Import UniMath.CategoryTheory.Core.Functors. Require Import UniMath.CategoryTheory.Core.NaturalTransformations. Require Import UniMath.CategoryTheory.Core.Isos. Require Import UniMath.CategoryTheory.whiskering. Require Import UniMath.CategoryTheory.PrecategoryBinProduct. Require Import UniMath.CategoryTheory.FunctorCategory. Require Import UniMath.CategoryTheory.UnitorsAndAssociatorsForEndofunctors.