Lemma disp_actionbicat_disp_comp_pentagon {a0 a1 a2 : B} {g1 : B ⟦ a0, a1 ⟧} {g2 : B ⟦ a1, a2 ⟧} {FA : V ⟶ category_from_bicat_and_ob a0} {FAm : fmonoidal Mon_V (monoidal_from_bicat_and_ob a0) FA} {FA' : V ⟶ category_from_bicat_and_ob a1} {FA'm : fmonoidal Mon_V (monoidal_from_bicat_and_ob a1) FA'} {FA'' : V ⟶ category_from_bicat_and_ob a2} {FA''m : fmonoidal Mon_V (monoidal_from_bicat_and_ob a2) FA''} (Hyp1 : disp_actionbicat_disp_mor FAm FA'm g1) (Hyp2 : disp_actionbicat_disp_mor FA'm FA''m g2): param_distr_bicat_pentagon_eq Mon_V FAm FA''m (g1 · g2) (disp_actionbicat_disp_comp_nat_trans Hyp1 Hyp2). Proof. intros v w. red; cbn. unfold param_distr_bicat_pentagon_eq_body_RHS, disp_actionbicat_disp_comp_nat_trans, disp_actionbicat_disp_comp_nat_trans_data. set (aux1 := pr22 Hyp1 v w). set (aux2 := pr22 Hyp2 v w). apply param_distr_bicat_pentagon_eq_body_variant_follows in aux1. apply param_distr_bicat_pentagon_eq_body_variant_follows in aux2. red in aux1, aux2; cbn in aux1, aux2. rewrite aux1, aux2. clear aux1 aux2. unfold param_distr_bicat_pentagon_eq_body_variant_RHS, param_distr_bicat_pentagon_eq_body_RHS. induction Hyp1 as [δ1 [trieq1 pentaeq1]]. induction Hyp2 as [δ2 [trieq2 pentaeq2]]. cbn. clear trieq1 trieq2 pentaeq1 pentaeq2. repeat rewrite rwhisker_vcomp. repeat rewrite <- lwhisker_vcomp. etrans. { repeat rewrite vassocl. apply maponpaths. repeat rewrite vassocr. do 10 apply maponpaths_2. apply pathsinv0, lwhisker_lwhisker_rassociator. } etrans. { repeat rewrite vassocl. do 2 apply maponpaths. repeat rewrite vassocr. do 9 apply maponpaths_2. etrans. { rewrite lwhisker_vcomp. apply maponpaths. rewrite lwhisker_vcomp. apply maponpaths. apply (pr2 (fmonoidal_preservestensorstrongly FA''m v w)). } cbn. rewrite lwhisker_id2. apply lwhisker_id2. } rewrite id2_left. etrans. { repeat rewrite vassocr. apply idpath. } apply pathsinv0. apply (vcomp_move_L_Vp _ _ _ (is_invertible_2cell_lassociator _ _ _)). etrans. { repeat rewrite vassocl. do 8 apply maponpaths. apply pathsinv0, rwhisker_rwhisker. } repeat rewrite <- rwhisker_vcomp. repeat rewrite vassocr. apply maponpaths_2. etrans. 2: { do 5 apply maponpaths_2. repeat rewrite vassocl. do 7 apply maponpaths. etrans. 2: { rewrite vassocr. apply maponpaths_2. apply pathsinv0, rwhisker_lwhisker. } rewrite vassocl. apply maponpaths. rewrite rwhisker_vcomp. apply maponpaths. rewrite lwhisker_vcomp. apply maponpaths. apply pathsinv0, (pr2 (fmonoidal_preservestensorstrongly FA'm v w)). } cbn. rewrite lwhisker_id2. rewrite id2_rwhisker. rewrite id2_right. etrans. 2: { repeat rewrite vassocl. do 6 apply maponpaths. repeat rewrite vassocr. do 4 apply maponpaths_2. apply pathsinv0, lassociator_lassociator. } etrans. { repeat rewrite vassocl. do 4 apply maponpaths. repeat rewrite vassocr. do 6 apply maponpaths_2. apply rassociator_rassociator. } etrans. 2: { repeat rewrite vassocr. do 10 apply maponpaths_2. apply rassociator_rassociator. } repeat rewrite vassocl. apply maponpaths. etrans. 2: { repeat rewrite vassocr. do 8 apply maponpaths_2. etrans. 2: { apply maponpaths_2. rewrite vassocl. etrans. 2: { apply maponpaths. rewrite lwhisker_vcomp. apply maponpaths. apply pathsinv0, rassociator_lassociator. } rewrite lwhisker_id2. apply pathsinv0, id2_right. } apply pathsinv0, rwhisker_lwhisker_rassociator. } repeat rewrite vassocl. apply maponpaths. etrans. { apply maponpaths. repeat rewrite vassocr. do 5 apply maponpaths_2. rewrite rwhisker_rwhisker_alt. rewrite vassocl. rewrite lwhisker_lwhisker_rassociator. rewrite vassocl. apply maponpaths. rewrite vassocr. apply maponpaths_2. apply vcomp_whisker. } etrans. 2: { do 2 apply maponpaths. repeat rewrite vassocr. do 3 apply maponpaths_2. rewrite lwhisker_lwhisker. rewrite vassocl. rewrite rwhisker_rwhisker. apply idpath. } assert (Haux: (lassociator g1 (FA' v) g2 ▹ FA'' w) • rassociator (g1 · FA' v) g2 (FA'' w) = rassociator g1 (FA' v · g2) (FA'' w) • (g1 ◃ rassociator (FA' v) g2 (FA'' w)) • lassociator g1 (FA' v) (g2 · FA'' w)). { etrans. 2: { rewrite vassocl. apply inverse_pentagon_2. } apply maponpaths_2. apply pathsinv0, hcomp_identity_right. } etrans. { repeat rewrite vassocr. do 8 apply maponpaths_2. apply Haux. } clear Haux. repeat rewrite vassocl. do 5 apply maponpaths. assert (Haux2: rassociator (FA v) g1 (FA' w · g2) • (FA v ◃ lassociator g1 (FA' w) g2) = lassociator (FA v · g1) (FA' w) g2 • ((rassociator (FA v) g1 (FA' w) ▹ g2) • rassociator (FA v) (g1 · FA' w) g2)). { rewrite <- hcomp_identity_right. etrans. 2: { apply inverse_pentagon_4. } rewrite hcomp_identity_left. apply idpath. } etrans. { repeat rewrite vassocr. do 4 apply maponpaths_2. exact Haux2. } clear Haux2. repeat rewrite vassocl. do 2 apply maponpaths. etrans. { repeat rewrite vassocr. do 3 apply maponpaths_2. apply rwhisker_lwhisker_rassociator. } repeat rewrite vassocl. apply maponpaths. etrans. { repeat rewrite vassocr. apply maponpaths_2. rewrite vassocl. apply pathsinv0, inverse_pentagon_2. } rewrite vassocl. rewrite rassociator_lassociator. rewrite hcomp_identity_right. apply id2_right. Qed.
Require Import UniMath.Foundations.PartD. Require Import UniMath.MoreFoundations.All. Require Import UniMath.CategoryTheory.Core.Categories. Require Import UniMath.CategoryTheory.Core.Functors. Require Import UniMath.CategoryTheory.Core.Isos. Require Import UniMath.CategoryTheory.Core.NaturalTransformations. Require Import UniMath.CategoryTheory.DisplayedCats.Core. Require Import UniMath.CategoryTheory.DisplayedCats.Total. Require Import UniMath.CategoryTheory.DisplayedCats.Constructions. Require Import UniMath.CategoryTheory.Monoidal.Categories. Require Import UniMath.CategoryTheory.Monoidal.WhiskeredBifunctors. Require Import UniMath.CategoryTheory.Monoidal.Functors. Require Import UniMath.CategoryTheory.Monoidal.Displayed.WhiskeredDisplayedBifunctors. Require Import UniMath.CategoryTheory.Monoidal.Displayed.Monoidal. Require Import UniMath.CategoryTheory.Monoidal.Displayed.TotalMonoidal. Require Import UniMath.Bicategories.MonoidalCategories.EndofunctorsWhiskeredMonoidal. Require Import UniMath.Bicategories.MonoidalCategories.WhiskeredMonoidalFromBicategory. Require Import UniMath.Bicategories.MonoidalCategories.ActionBasedStrongFunctorsWhiskeredMonoidal. Require Import UniMath.Bicategories.Core.Bicat. Require Import UniMath.Bicategories.Core.BicategoryLaws. Require Import UniMath.Bicategories.Core.Unitors. Require Import UniMath.Bicategories.DisplayedBicats.DispBicat. Require Import UniMath.Bicategories.Core.Invertible_2cells. Import Bicat.Notations. Import BifunctorNotations. Import DisplayedBifunctorNotations.