Lemma prewhisker_LRB_associator {x y z w : B} (f : B ⟦ x, y ⟧) (g : B ⟦ y, z ⟧) (h : B ⟦ z, w ⟧) : # (LRB_composition x y w) (id₁ (η_{x,y} f) #, pr1 (LRB_composition_comm y z w) (g : hom _ _, h : hom _ _)) · pr1 (LRB_composition_comm x y w) (f : hom _ _, g · h : hom _ _) · # (η (hom x w)) (lassociator f g h) = pr1 (pr2 (LRB_associator_nat_z_iso x y z w) (η_{x,y} f, (η_{y,z} g, η (hom z w) h))) · # (LRB_composition x z w) (make_dirprod (pr1 (LRB_composition_comm x y z) (f : hom _ _, g : hom _ _)) (id₁ (η (hom z w) h)) : R (hom x z) ⊠ R (hom z w) ⟦((pair_functor (η_{x,y}) (η_{y,z}) ∙ LRB_composition x y z) (f : hom _ _, g : hom _ _) , η (hom z w) h), ((hcomp_functor ∙ η (hom x z)) (f : hom _ _, g : hom _ _), η (hom z w) h) ⟧ ) · pr1 (LRB_composition_comm x z w) (f · g : hom _ _, h : hom _ _). Proof. etrans. 2: apply assoc. use (z_iso_inv_to_left _ _ _ (z_iso_inv (_ ,, pr2 (LRB_associator_nat_z_iso x y z w) (η_{x,y} f, (η_{y,z} g, η (hom z w) h)) : z_iso _ _))). etrans. { apply maponpaths_2. apply (toforallpaths _ _ _ (base_paths _ _ (LRB_associator_comm x y z w)) (f : hom _ _, (g : hom _ _ , h : hom _ _))). } cbn. rewrite ! id_left, ! id_right. etrans. { do 2 apply maponpaths_2. apply maponpaths. do 2 apply maponpaths_2. etrans. { apply maponpaths, binprod_id. } apply functor_id. } rewrite id_left, id2_left, ! assoc'. apply maponpaths. refine (_ @ id_right _). apply maponpaths. etrans. { do 2 apply maponpaths. rewrite assoc. apply maponpaths_2. apply pathsinv0, (functor_comp (LRB_composition x y w)). } etrans. { do 2 apply maponpaths. apply maponpaths_2. cbn. etrans. { do 2 apply maponpaths. apply (pr2 (pr2 (LRB_composition_comm y z w) (g : hom _ _, h : hom _ _))). } rewrite id_left. apply (functor_id (LRB_composition x y w)). } rewrite id_left. etrans. { apply maponpaths. rewrite assoc. apply maponpaths_2. apply (pr2 (LRB_composition_comm x y w) (f : hom _ _, g · h : hom _ _)). } rewrite id_left. etrans. { apply pathsinv0, (functor_comp (η (hom x w))). } etrans. { apply maponpaths, rassociator_lassociator. } apply (functor_id (η (hom x w))). Qed.
Require Import UniMath.Foundations.All. Require Import UniMath.MoreFoundations.All. Require Import UniMath.CategoryTheory.Core.Categories. Require Import UniMath.CategoryTheory.Core.Isos. Require Import UniMath.CategoryTheory.Core.Functors. Require Import UniMath.CategoryTheory.Core.NaturalTransformations. Require Import UniMath.CategoryTheory.Core.Univalence. Require Import UniMath.CategoryTheory.Adjunctions.Core. Require Import UniMath.CategoryTheory.Equivalences.Core. Require Import UniMath.CategoryTheory.Equivalences.CompositesAndInverses. Require Import UniMath.CategoryTheory.PrecompEquivalence. Require Import UniMath.CategoryTheory.PrecategoryBinProduct. Require Import UniMath.CategoryTheory.whiskering. Require Import UniMath.CategoryTheory.RezkCompletions.RezkCompletions. Require Import UniMath.Bicategories.Core.Bicat. Import Bicat.Notations. Require Import UniMath.Bicategories.Core.BicategoryLaws. Require Import UniMath.Bicategories.Core.Invertible_2cells. Require Import UniMath.Bicategories.Core.Examples.BicatOfUnivCats. Require Import UniMath.Bicategories.Core.Univalence. Require Import UniMath.Bicategories.Core.YonedaLemma. Require Import UniMath.Bicategories.PseudoFunctors.Display.PseudoFunctorBicat. Require Import UniMath.Bicategories.PseudoFunctors.PseudoFunctor. Require Import UniMath.Bicategories.PseudoFunctors.Properties. Require Import UniMath.Bicategories.PseudoFunctors.Examples.Composition.