Proposition comp_v_enriched_profunctor_square_laws : enriched_profunctor_transformation_laws comp_v_enriched_profunctor_square_mor. Proof. split. - intros z₁ z₂ x. use is_inj_internal_transpose. use from_comp_enriched_profunctor_eq. intros y. use internal_funext. intros v h. rewrite !tensor_comp_r_id_r. rewrite !(tensor_split (comp_enriched_profunctor_in _ _ _ _ _) h). rewrite !assoc'. apply maponpaths. clear v h. 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 comp_v_enriched_profunctor_square_mor_comm. rewrite tensor_comp_id_l. rewrite !assoc'. apply maponpaths. cbn. rewrite !assoc. rewrite <- tensor_split. rewrite tensor_split'. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite <- tensor_comp_id_l. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. apply comp_enriched_profunctor_lmap_comm. } etrans. { do 2 apply maponpaths. rewrite !assoc. rewrite sym_mon_braiding_inv. apply id_left. } etrans. { rewrite !assoc. rewrite <- tensor_split. unfold comp_enriched_profunctor_lmap_mor. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite tensor_lassociator. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite <- tensor_comp_mor. rewrite id_right. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. rewrite tensor_comp_l_id_l. apply idpath. } refine (!_). etrans. { cbn. rewrite !assoc. rewrite <- tensor_comp_id_l. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite comp_enriched_profunctor_lmap_comm. unfold comp_enriched_profunctor_lmap_mor. rewrite !assoc. rewrite sym_mon_braiding_inv. rewrite id_left. apply idpath. } rewrite !assoc'. do 2 apply maponpaths. rewrite comp_v_enriched_profunctor_square_mor_comm. rewrite !assoc. apply maponpaths_2. rewrite <- !tensor_comp_mor. rewrite !id_left. apply maponpaths. rewrite !assoc'. apply maponpaths. rewrite <- enriched_profunctor_transformation_lmap_e. cbn. rewrite !assoc. rewrite <- tensor_split. apply idpath. - intros z x₁ x₂. use is_inj_internal_transpose. use from_comp_enriched_profunctor_eq. intros y. use internal_funext. intros v h. rewrite !tensor_comp_r_id_r. rewrite !(tensor_split (comp_enriched_profunctor_in _ _ _ _ _) h). rewrite !assoc'. apply maponpaths. clear v h. 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 comp_v_enriched_profunctor_square_mor_comm. rewrite tensor_comp_id_l. rewrite !assoc'. apply maponpaths. cbn. rewrite !assoc. rewrite <- tensor_split. rewrite tensor_split'. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite <- tensor_comp_id_l. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. apply comp_enriched_profunctor_rmap_comm. } etrans. { do 2 apply maponpaths. rewrite !assoc. rewrite sym_mon_braiding_inv. apply id_left. } etrans. { rewrite !assoc. rewrite <- tensor_split. unfold comp_enriched_profunctor_rmap_mor. rewrite !assoc. rewrite tensor_rassociator. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite <- tensor_comp_mor. rewrite id_right. apply idpath. } refine (!_). etrans. { cbn. rewrite !assoc. rewrite <- tensor_comp_id_l. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite comp_enriched_profunctor_rmap_comm. unfold comp_enriched_profunctor_rmap_mor. rewrite !assoc'. apply idpath. } rewrite !assoc. rewrite sym_mon_braiding_inv. rewrite id_left. rewrite !assoc'. apply maponpaths. rewrite comp_v_enriched_profunctor_square_mor_comm. rewrite !assoc. apply maponpaths_2. rewrite <- !tensor_comp_mor. rewrite !id_left. apply maponpaths_2. rewrite <- enriched_profunctor_transformation_rmap_e. cbn. rewrite !assoc. rewrite <- tensor_split. apply idpath. Qed.
Require Import UniMath.MoreFoundations.All. Require Import UniMath.CategoryTheory.Core.Prelude. Require Import UniMath.CategoryTheory.EnrichedCats.BenabouCosmos. Require Import UniMath.CategoryTheory.EnrichedCats.Enrichment. Require Import UniMath.CategoryTheory.EnrichedCats.EnrichmentFunctor. Require Import UniMath.CategoryTheory.EnrichedCats.EnrichmentTransformation. 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.Invertible. Require Import UniMath.CategoryTheory.EnrichedCats.Profunctors.ProfunctorSquares. Require Import UniMath.CategoryTheory.EnrichedCats.Profunctors.Coend. 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.