Proposition is_inverse_rinvunitor_enriched_profunctor_mor (y : C₂) (x : C₁) : is_inverse_in_precat (runitor_enriched_profunctor y x) (rinvunitor_enriched_profunctor_mor y x). Proof. split. - cbn. use from_comp_enriched_profunctor_eq. intros x'. rewrite !assoc. rewrite runitor_enriched_profunctor_mor_comm. rewrite id_right. unfold rinvunitor_enriched_profunctor_mor. etrans. { rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite tensor_rinvunitor. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite <- tensor_split'. rewrite tensor_split. apply idpath. } rewrite !assoc'. etrans. { do 3 apply maponpaths. apply (comp_enriched_profunctor_comm P (identity_enriched_profunctor E₂)). } cbn. rewrite !assoc. refine (_ @ id_left _). apply maponpaths_2. etrans. { rewrite !assoc'. do 2 apply maponpaths. rewrite !assoc. rewrite <- tensor_id_id. rewrite tensor_lassociator. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite tensor_lassociator. rewrite !assoc'. apply maponpaths. rewrite <- tensor_comp_id_l. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. rewrite <- enrichment_id_right. apply idpath. } etrans. { apply maponpaths. rewrite !assoc. rewrite <- mon_rinvunitor_triangle. etrans. { do 3 apply maponpaths_2. rewrite !assoc'. rewrite mon_rassociator_lassociator. apply id_right. } rewrite tensor_sym_mon_braiding. rewrite !assoc'. apply maponpaths. rewrite !assoc. rewrite <- mon_inv_triangle. rewrite <- tensor_comp_id_l. rewrite !assoc. rewrite sym_mon_braiding_linvunitor. rewrite mon_rinvunitor_runitor. apply tensor_id_id. } rewrite id_right. apply sym_mon_braiding_inv. - cbn. unfold rinvunitor_enriched_profunctor_mor. rewrite !assoc'. etrans. { do 2 apply maponpaths. apply runitor_enriched_profunctor_mor_comm. } etrans. { apply maponpaths. rewrite !assoc. rewrite tensor_sym_mon_braiding. rewrite !assoc'. rewrite lmap_e_id. apply idpath. } rewrite !assoc. rewrite sym_mon_braiding_rinvunitor. apply mon_linvunitor_lunitor. 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.