Proposition runitor_enriched_profunctor_laws : enriched_profunctor_transformation_laws runitor_enriched_profunctor_mor. Proof. split. - intros x₁ x₂ y ; cbn. use is_inj_internal_transpose. use from_comp_enriched_profunctor_eq. intros y'. use internal_funext. intros a h. rewrite !tensor_comp_r_id_r. rewrite (tensor_split (comp_enriched_profunctor_in _ _ _ _ _) h). rewrite !assoc'. apply maponpaths. unfold internal_transpose. rewrite !internal_beta. rewrite !assoc. rewrite !tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. etrans. { rewrite !assoc. rewrite <- tensor_comp_id_l. rewrite runitor_enriched_profunctor_mor_comm. apply idpath. } rewrite tensor_comp_id_l. rewrite !assoc'. rewrite lmap_e_lmap_e. refine (!_). etrans. { rewrite !assoc. rewrite <- tensor_comp_id_l. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. rewrite !assoc. apply maponpaths_2. apply comp_enriched_profunctor_lmap_comm. } rewrite !assoc'. etrans. { apply maponpaths. unfold comp_enriched_profunctor_lmap_mor. rewrite !assoc. rewrite sym_mon_braiding_inv. rewrite id_left. rewrite !assoc'. do 2 apply maponpaths. apply from_comp_enriched_profunctor_ob_comm. } rewrite !assoc. apply maponpaths_2. rewrite !assoc'. rewrite tensor_sym_mon_braiding. cbn. rewrite !tensor_comp_id_r. rewrite !assoc. do 2 apply maponpaths_2. rewrite sym_mon_tensor_lassociator'. refine (_ @ id_left _). rewrite !assoc. do 2 apply maponpaths_2. generalize (E₂ ⦃ x₂, x₁ ⦄) (P y' y) (E₂ ⦃ x₁, y' ⦄). intros v₁ v₂ v₃. rewrite (sym_mon_tensor_lassociator V v₁ v₂ v₃). rewrite <- mon_rassociator_lassociator. rewrite !assoc'. apply maponpaths. etrans. { do 3 apply maponpaths. rewrite !assoc. rewrite mon_rassociator_lassociator. rewrite id_left. apply idpath. } refine (_ @ id_left _). rewrite !assoc. apply maponpaths_2. rewrite (sym_mon_tensor_lassociator V v₃ v₁ v₂). rewrite !assoc'. etrans. { do 2 apply maponpaths. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. etrans. { apply maponpaths. rewrite !assoc. rewrite mon_lassociator_rassociator. rewrite id_left. apply idpath. } rewrite !assoc. rewrite <- tensor_comp_id_r. rewrite sym_mon_braiding_inv. rewrite tensor_id_id. rewrite id_left. apply idpath. } etrans. { apply maponpaths. rewrite !assoc. rewrite sym_mon_hexagon_lassociator. rewrite !assoc'. etrans. { do 2 apply maponpaths. rewrite !assoc. rewrite <- tensor_comp_id_l. rewrite sym_mon_braiding_inv. rewrite tensor_id_id. rewrite id_left. apply idpath. } rewrite mon_lassociator_rassociator. apply id_right. } rewrite <- tensor_comp_id_r. rewrite sym_mon_braiding_inv. apply tensor_id_id. - intros y x₁ x₂ ; cbn. use is_inj_internal_transpose. use from_comp_enriched_profunctor_eq. intros y'. use internal_funext. intros a h. rewrite !tensor_comp_r_id_r. rewrite (tensor_split (comp_enriched_profunctor_in _ _ _ _ _) h). rewrite !assoc'. apply maponpaths. unfold internal_transpose. rewrite !internal_beta. rewrite !assoc. rewrite !tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. etrans. { rewrite !assoc. rewrite <- tensor_comp_id_l. rewrite runitor_enriched_profunctor_mor_comm. apply idpath. } rewrite tensor_comp_id_l. rewrite !assoc'. rewrite lmap_e_rmap_e'. refine (!_). etrans. { rewrite !assoc. rewrite <- tensor_comp_id_l. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. rewrite !assoc. apply maponpaths_2. apply comp_enriched_profunctor_rmap_comm. } rewrite !assoc'. etrans. { apply maponpaths. unfold comp_enriched_profunctor_rmap_mor. rewrite !assoc'. do 3 apply maponpaths. apply from_comp_enriched_profunctor_ob_comm. } rewrite !assoc. apply maponpaths_2. rewrite !assoc'. rewrite tensor_sym_mon_braiding. cbn. rewrite !assoc. rewrite sym_mon_braiding_inv. rewrite id_left. apply maponpaths_2. rewrite <- sym_mon_hexagon_rassociator. rewrite !assoc'. rewrite mon_rassociator_lassociator. rewrite id_right. apply idpath. Qed.
Require Import UniMath.Foundations.All. Require Import UniMath.MoreFoundations.All. Require Import UniMath.CategoryTheory.Core.Prelude. Require Import UniMath.CategoryTheory.Limits.Coends. Require Import UniMath.CategoryTheory.OppositeCategory.Core. Require Import UniMath.CategoryTheory.PrecategoryBinProduct. Require Import UniMath.CategoryTheory.EnrichedCats.BenabouCosmos. Require Import UniMath.CategoryTheory.EnrichedCats.Enrichment. Require Import UniMath.CategoryTheory.EnrichedCats.EnrichmentFunctor. Require Import UniMath.CategoryTheory.EnrichedCats.Profunctors.Profunctor. Require Import UniMath.CategoryTheory.EnrichedCats.Profunctors.StandardProfunctors. Require Import UniMath.CategoryTheory.EnrichedCats.Profunctors.ProfunctorTransformations. Require Import UniMath.CategoryTheory.EnrichedCats.Profunctors.ProfunctorSquares. Require Import UniMath.CategoryTheory.EnrichedCats.Profunctors.Invertible. Require Import UniMath.CategoryTheory.EnrichedCats.Profunctors.Composition.CompositionProf. Require Import UniMath.CategoryTheory.Monoidal.Categories. Require Import UniMath.CategoryTheory.Monoidal.Structure.Symmetric. Require Import UniMath.CategoryTheory.Monoidal.Structure.Closed. Import MonoidalNotations.