proposition: Lemma is_functor_functorial_composition_data (A B C : category) : is_functor (functorial_composition_data A B C).
proof: 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.
imports: UniMath.Foundations.PartD UniMath.MoreFoundations.Tactics UniMath.CategoryTheory.Core.Categories UniMath.CategoryTheory.Core.Functors UniMath.CategoryTheory.Core.NaturalTransformations UniMath.CategoryTheory.Core.Isos UniMath.CategoryTheory.whiskering UniMath.CategoryTheory.PrecategoryBinProduct UniMath.CategoryTheory.FunctorCategory UniMath.CategoryTheory.UnitorsAndAssociatorsForEndofunctors