Definition associator_profunctor_inv_mor {C₁ C₂ C₃ C₄ : category} (P₁ : C₁ ↛ C₂) (P₂ : C₂ ↛ C₃) (P₃ : C₃ ↛ C₄) (z : C₄) (w : C₁) : comp_profunctor (comp_profunctor P₁ P₂) P₃ z w → comp_profunctor P₁ (comp_profunctor P₂ P₃) z w. Proof. use from_comp_profunctor_ob. - exact (λ y kl h, associator_profunctor_inv_mor_ob P₁ P₂ P₃ z w y h kl). - abstract (intros y₁ y₂ f k l ; cbn in * ; use (mor_from_comp_profunctor_ob_eq P₁ P₂ y₂ w (associator_profunctor_inv_mor_ob P₁ P₂ P₃ z w y₂ (rmap P₃ f l)) (λ k, associator_profunctor_inv_mor_ob P₁ P₂ P₃ z w y₁ l (comp_profunctor_mor P₁ P₂ f (identity w) k))) ; clear k ; intros x h k ; cbn ; rewrite comp_profunctor_mor_comm ; rewrite !associator_profunctor_inv_mor_ob_comm ; rewrite comp_profunctor_ob_in_comm ; rewrite rmap_id ; apply idpath). Defined.
Require Import UniMath.Foundations.All. Require Import UniMath.MoreFoundations.All. Require Import UniMath.CategoryTheory.Core.Prelude. Require Import UniMath.CategoryTheory.FunctorCategory. Require Import UniMath.CategoryTheory.PrecategoryBinProduct. Require Import UniMath.CategoryTheory.opp_precat. Require Import UniMath.CategoryTheory.Categories.HSET.All. Require Import UniMath.CategoryTheory.Categories.HSET.SetCoends. Require Import UniMath.CategoryTheory.Profunctors.Core. Require Import UniMath.CategoryTheory.Profunctors.Examples.