Library UniMath.Semantics.LinearLogic.LinearCategory
Require Import UniMath.MoreFoundations.All.
Require Import UniMath.CategoryTheory.Core.Prelude.
Require Import UniMath.CategoryTheory.PrecategoryBinProduct.
Require Import UniMath.CategoryTheory.Monads.Comonads.
Require Import UniMath.CategoryTheory.Monoidal.Categories.
Require Import UniMath.CategoryTheory.Monoidal.Functors.
Require Import UniMath.CategoryTheory.Monoidal.FunctorCategories.
Require Import UniMath.CategoryTheory.Monoidal.Structure.Symmetric.
Require Import UniMath.CategoryTheory.Monoidal.Structure.SymmetricDiagonal.
Require Import UniMath.CategoryTheory.Monoidal.Structure.Closed.
Require Import UniMath.CategoryTheory.Monoidal.Comonoids.Category.
Require Import UniMath.CategoryTheory.Monoidal.Examples.ConstantFunctor.
Require Import UniMath.CategoryTheory.Monoidal.CategoriesOfMonoids.
Require Import UniMath.CategoryTheory.categories.Dialgebras.
Require Import UniMath.CategoryTheory.Monoidal.Examples.DiagonalFunctor.
Import MonoidalNotations.
Local Open Scope cat.
Local Open Scope moncat.
Require Import UniMath.CategoryTheory.Core.Prelude.
Require Import UniMath.CategoryTheory.PrecategoryBinProduct.
Require Import UniMath.CategoryTheory.Monads.Comonads.
Require Import UniMath.CategoryTheory.Monoidal.Categories.
Require Import UniMath.CategoryTheory.Monoidal.Functors.
Require Import UniMath.CategoryTheory.Monoidal.FunctorCategories.
Require Import UniMath.CategoryTheory.Monoidal.Structure.Symmetric.
Require Import UniMath.CategoryTheory.Monoidal.Structure.SymmetricDiagonal.
Require Import UniMath.CategoryTheory.Monoidal.Structure.Closed.
Require Import UniMath.CategoryTheory.Monoidal.Comonoids.Category.
Require Import UniMath.CategoryTheory.Monoidal.Examples.ConstantFunctor.
Require Import UniMath.CategoryTheory.Monoidal.CategoriesOfMonoids.
Require Import UniMath.CategoryTheory.categories.Dialgebras.
Require Import UniMath.CategoryTheory.Monoidal.Examples.DiagonalFunctor.
Import MonoidalNotations.
Local Open Scope cat.
Local Open Scope moncat.
1. Data of linear categories
Definition linear_category_data
: UU
:= โ (๐ : sym_mon_closed_cat)
(bang : sym_monoidal_cmd ๐),
(โ (x : ๐), bang x --> bang x โ bang x)
ร
(โ (x : ๐), bang x --> I_{๐}).
Definition make_linear_category_data
(๐ : sym_mon_closed_cat)
(bang : sym_monoidal_cmd ๐)
(ฮด : โ (x : ๐), bang x --> bang x โ bang x)
(ฮต : โ (x : ๐), bang x --> I_{๐})
: linear_category_data
:= ๐ ,, bang ,, ฮด ,, ฮต.
Coercion linear_category_data_to_sym_mon_closed_cat
(๐ : linear_category_data)
: sym_mon_closed_cat
:= pr1 ๐.
Definition linear_category_bang
(๐ : linear_category_data)
: sym_monoidal_cmd ๐
:= pr12 ๐.
Definition linear_category_bang_functor
(๐ : linear_category_data)
: lax_monoidal_functor ๐ ๐
:= _ ,, lax_monoidal_from_symmetric_monoidal_comonad _ (linear_category_bang ๐).
Definition linear_category_comult
(๐ : linear_category_data)
(x : ๐)
: linear_category_bang ๐ x
-->
linear_category_bang ๐ x โ linear_category_bang ๐ x
:= pr122 ๐ x.
Definition linear_category_counit
(๐ : linear_category_data)
(x : ๐)
: linear_category_bang ๐ x --> I_{๐}
:= pr222 ๐ x.
: UU
:= โ (๐ : sym_mon_closed_cat)
(bang : sym_monoidal_cmd ๐),
(โ (x : ๐), bang x --> bang x โ bang x)
ร
(โ (x : ๐), bang x --> I_{๐}).
Definition make_linear_category_data
(๐ : sym_mon_closed_cat)
(bang : sym_monoidal_cmd ๐)
(ฮด : โ (x : ๐), bang x --> bang x โ bang x)
(ฮต : โ (x : ๐), bang x --> I_{๐})
: linear_category_data
:= ๐ ,, bang ,, ฮด ,, ฮต.
Coercion linear_category_data_to_sym_mon_closed_cat
(๐ : linear_category_data)
: sym_mon_closed_cat
:= pr1 ๐.
Definition linear_category_bang
(๐ : linear_category_data)
: sym_monoidal_cmd ๐
:= pr12 ๐.
Definition linear_category_bang_functor
(๐ : linear_category_data)
: lax_monoidal_functor ๐ ๐
:= _ ,, lax_monoidal_from_symmetric_monoidal_comonad _ (linear_category_bang ๐).
Definition linear_category_comult
(๐ : linear_category_data)
(x : ๐)
: linear_category_bang ๐ x
-->
linear_category_bang ๐ x โ linear_category_bang ๐ x
:= pr122 ๐ x.
Definition linear_category_counit
(๐ : linear_category_data)
(x : ๐)
: linear_category_bang ๐ x --> I_{๐}
:= pr222 ๐ x.
2. Laws of linear categories
Definition linear_category_laws
(๐ : linear_category_data)
: UU
:=
(โ (x y : ๐)
(f : x --> y),
#(linear_category_bang ๐) f
ยท linear_category_comult ๐ y
=
linear_category_comult ๐ x
ยท (#(linear_category_bang ๐) f #โ #(linear_category_bang ๐) f))
ร
(โ (x y : ๐)
(f : x --> y),
#(linear_category_bang ๐) f ยท linear_category_counit ๐ y
=
linear_category_counit ๐ x)
ร
(โ (x : ๐),
linear_category_comult ๐ x
ยท (ฮด (linear_category_bang ๐) x #โ ฮด (linear_category_bang ๐) x)
ยท mon_functor_tensor (linear_category_bang_functor ๐) _ _
=
ฮด (linear_category_bang ๐) x
ยท #(linear_category_bang ๐) (linear_category_comult ๐ x))
ร
(โ (x : ๐),
linear_category_counit ๐ x
ยท mon_functor_unit (linear_category_bang_functor ๐)
=
ฮด (linear_category_bang ๐) x
ยท #(linear_category_bang ๐) (linear_category_counit ๐ x))
ร
(โ (x : ๐),
ฮด (linear_category_bang ๐) x
ยท linear_category_counit ๐ (linear_category_bang ๐ x)
=
linear_category_counit ๐ x)
ร
(โ (x : ๐),
ฮด (linear_category_bang ๐) x
ยท linear_category_comult ๐ (linear_category_bang ๐ x)
=
linear_category_comult ๐ x
ยท (ฮด (linear_category_bang ๐) x #โ ฮด (linear_category_bang ๐) x))
ร
(โ (x : ๐),
linear_category_comult ๐ x
ยท (identity _ #โ linear_category_comult ๐ x)
=
linear_category_comult ๐ x
ยท (linear_category_comult ๐ x #โ identity _)
ยท mon_lassociator _ _ _)
ร
(โ (x : ๐),
linear_category_comult ๐ x
ยท (linear_category_counit ๐ x #โ identity _)
ยท mon_lunitor _
=
identity _)
ร
(โ (x : ๐),
linear_category_comult ๐ x
ยท sym_mon_braiding ๐ _ _
=
linear_category_comult ๐ x)
ร
(โ x y : ๐,
mon_functor_tensor (linear_category_bang_functor ๐) x y
ยท linear_category_comult ๐ (x โ y)
= (linear_category_comult ๐ x) #โ (linear_category_comult ๐ y)
ยท (inner_swap ๐
(linear_category_bang ๐ x)
(linear_category_bang ๐ x)
(linear_category_bang ๐ y)
(linear_category_bang ๐ y)
ยท mon_functor_tensor (linear_category_bang_functor ๐) x y
#โ mon_functor_tensor (linear_category_bang_functor ๐) x y))
ร
(mon_functor_unit (linear_category_bang_functor ๐)
ยท linear_category_comult ๐ I_{๐}
= mon_linvunitor I_{๐}
ยท mon_functor_unit (linear_category_bang_functor ๐)
#โ mon_functor_unit (linear_category_bang_functor ๐))
ร
(โ x y : ๐, mon_functor_tensor (linear_category_bang_functor ๐) x y
ยท linear_category_counit ๐ (x โ y)
= linear_category_counit ๐ x #โ linear_category_counit ๐ y
ยท mon_lunitor (monoidal_unit ๐))
ร
(mon_functor_unit (linear_category_bang_functor ๐)
ยท linear_category_counit ๐ I_{๐}
= identity I_{๐}).
Definition linear_category
: UU
:= โ (๐ : linear_category_data), linear_category_laws ๐.
Definition make_linear_category
(๐ : linear_category_data)
(H : linear_category_laws ๐)
: linear_category
:= ๐ ,, H.
Coercion linear_category_to_data
(๐ : linear_category)
: linear_category_data
:= pr1 ๐.
Section AccessorsLaws.
Context {๐ : linear_category}.
Proposition linear_category_comult_nat
{x y : ๐}
(f : x --> y)
: #(linear_category_bang ๐) f
ยท linear_category_comult ๐ y
=
linear_category_comult ๐ x
ยท (#(linear_category_bang ๐) f #โ #(linear_category_bang ๐) f).
Show proof.
Proposition linear_category_counit_nat
{x y : ๐}
(f : x --> y)
: #(linear_category_bang ๐) f ยท linear_category_counit ๐ y
=
linear_category_counit ๐ x.
Show proof.
Proposition linear_category_comult_coalgebra_mor
(x : ๐)
: linear_category_comult ๐ x
ยท (ฮด (linear_category_bang ๐) x #โ ฮด (linear_category_bang ๐) x)
ยท mon_functor_tensor (linear_category_bang_functor ๐) _ _
=
ฮด (linear_category_bang ๐) x
ยท #(linear_category_bang ๐) (linear_category_comult ๐ x).
Show proof.
Proposition linear_category_counit_coalgebra_mor
(x : ๐)
: linear_category_counit ๐ x
ยท mon_functor_unit (linear_category_bang_functor ๐)
=
ฮด (linear_category_bang ๐) x
ยท #(linear_category_bang ๐) (linear_category_counit ๐ x).
Show proof.
Proposition linear_category_counit_comonoid_mor_counit
(x : ๐)
: ฮด (linear_category_bang ๐) x
ยท linear_category_counit ๐ (linear_category_bang ๐ x)
=
linear_category_counit ๐ x.
Show proof.
Proposition linear_category_counit_comonoid_mor_comult
(x : ๐)
: ฮด (linear_category_bang ๐) x
ยท linear_category_comult ๐ (linear_category_bang ๐ x)
=
linear_category_comult ๐ x
ยท (ฮด (linear_category_bang ๐) x #โ ฮด (linear_category_bang ๐) x).
Show proof.
Proposition linear_category_coassoc
(x : ๐)
: linear_category_comult ๐ x
ยท (identity _ #โ linear_category_comult ๐ x)
=
linear_category_comult ๐ x
ยท (linear_category_comult ๐ x #โ identity _)
ยท mon_lassociator _ _ _.
Show proof.
Proposition linear_category_counitality
(x : ๐)
: linear_category_comult ๐ x
ยท (linear_category_counit ๐ x #โ identity _)
ยท mon_lunitor _
=
identity _.
Show proof.
Proposition linear_category_cocommutative
(x : ๐)
: linear_category_comult ๐ x
ยท sym_mon_braiding ๐ _ _
=
linear_category_comult ๐ x.
Show proof.
Proposition linear_category_comult_preserves_tensor
(x y : ๐)
: mon_functor_tensor (linear_category_bang_functor ๐) x y
ยท linear_category_comult ๐ (x โ y)
= (linear_category_comult ๐ x) #โ (linear_category_comult ๐ y)
ยท (inner_swap ๐
(linear_category_bang ๐ x)
(linear_category_bang ๐ x)
(linear_category_bang ๐ y)
(linear_category_bang ๐ y)
ยท mon_functor_tensor (linear_category_bang_functor ๐) x y
#โ mon_functor_tensor (linear_category_bang_functor ๐) x y).
Show proof.
Proposition linear_category_comult_preserves_unit
: mon_functor_unit (linear_category_bang_functor ๐)
ยท linear_category_comult ๐ I_{๐}
= mon_linvunitor I_{๐}
ยท mon_functor_unit (linear_category_bang_functor ๐)
#โ mon_functor_unit (linear_category_bang_functor ๐).
Show proof.
Proposition linear_category_counit_preserves_tensor
(x y : ๐)
: mon_functor_tensor (linear_category_bang_functor ๐) x y
ยท linear_category_counit ๐ (x โ y)
= linear_category_counit ๐ x #โ linear_category_counit ๐ y
ยท mon_lunitor (monoidal_unit ๐).
Show proof.
Proposition linear_category_counit_preserves_unit
: mon_functor_unit (linear_category_bang_functor ๐)
ยท linear_category_counit ๐ I_{๐}
= identity I_{๐}.
Show proof.
End AccessorsLaws.
(๐ : linear_category_data)
: UU
:=
(โ (x y : ๐)
(f : x --> y),
#(linear_category_bang ๐) f
ยท linear_category_comult ๐ y
=
linear_category_comult ๐ x
ยท (#(linear_category_bang ๐) f #โ #(linear_category_bang ๐) f))
ร
(โ (x y : ๐)
(f : x --> y),
#(linear_category_bang ๐) f ยท linear_category_counit ๐ y
=
linear_category_counit ๐ x)
ร
(โ (x : ๐),
linear_category_comult ๐ x
ยท (ฮด (linear_category_bang ๐) x #โ ฮด (linear_category_bang ๐) x)
ยท mon_functor_tensor (linear_category_bang_functor ๐) _ _
=
ฮด (linear_category_bang ๐) x
ยท #(linear_category_bang ๐) (linear_category_comult ๐ x))
ร
(โ (x : ๐),
linear_category_counit ๐ x
ยท mon_functor_unit (linear_category_bang_functor ๐)
=
ฮด (linear_category_bang ๐) x
ยท #(linear_category_bang ๐) (linear_category_counit ๐ x))
ร
(โ (x : ๐),
ฮด (linear_category_bang ๐) x
ยท linear_category_counit ๐ (linear_category_bang ๐ x)
=
linear_category_counit ๐ x)
ร
(โ (x : ๐),
ฮด (linear_category_bang ๐) x
ยท linear_category_comult ๐ (linear_category_bang ๐ x)
=
linear_category_comult ๐ x
ยท (ฮด (linear_category_bang ๐) x #โ ฮด (linear_category_bang ๐) x))
ร
(โ (x : ๐),
linear_category_comult ๐ x
ยท (identity _ #โ linear_category_comult ๐ x)
=
linear_category_comult ๐ x
ยท (linear_category_comult ๐ x #โ identity _)
ยท mon_lassociator _ _ _)
ร
(โ (x : ๐),
linear_category_comult ๐ x
ยท (linear_category_counit ๐ x #โ identity _)
ยท mon_lunitor _
=
identity _)
ร
(โ (x : ๐),
linear_category_comult ๐ x
ยท sym_mon_braiding ๐ _ _
=
linear_category_comult ๐ x)
ร
(โ x y : ๐,
mon_functor_tensor (linear_category_bang_functor ๐) x y
ยท linear_category_comult ๐ (x โ y)
= (linear_category_comult ๐ x) #โ (linear_category_comult ๐ y)
ยท (inner_swap ๐
(linear_category_bang ๐ x)
(linear_category_bang ๐ x)
(linear_category_bang ๐ y)
(linear_category_bang ๐ y)
ยท mon_functor_tensor (linear_category_bang_functor ๐) x y
#โ mon_functor_tensor (linear_category_bang_functor ๐) x y))
ร
(mon_functor_unit (linear_category_bang_functor ๐)
ยท linear_category_comult ๐ I_{๐}
= mon_linvunitor I_{๐}
ยท mon_functor_unit (linear_category_bang_functor ๐)
#โ mon_functor_unit (linear_category_bang_functor ๐))
ร
(โ x y : ๐, mon_functor_tensor (linear_category_bang_functor ๐) x y
ยท linear_category_counit ๐ (x โ y)
= linear_category_counit ๐ x #โ linear_category_counit ๐ y
ยท mon_lunitor (monoidal_unit ๐))
ร
(mon_functor_unit (linear_category_bang_functor ๐)
ยท linear_category_counit ๐ I_{๐}
= identity I_{๐}).
Definition linear_category
: UU
:= โ (๐ : linear_category_data), linear_category_laws ๐.
Definition make_linear_category
(๐ : linear_category_data)
(H : linear_category_laws ๐)
: linear_category
:= ๐ ,, H.
Coercion linear_category_to_data
(๐ : linear_category)
: linear_category_data
:= pr1 ๐.
Section AccessorsLaws.
Context {๐ : linear_category}.
Proposition linear_category_comult_nat
{x y : ๐}
(f : x --> y)
: #(linear_category_bang ๐) f
ยท linear_category_comult ๐ y
=
linear_category_comult ๐ x
ยท (#(linear_category_bang ๐) f #โ #(linear_category_bang ๐) f).
Show proof.
Proposition linear_category_counit_nat
{x y : ๐}
(f : x --> y)
: #(linear_category_bang ๐) f ยท linear_category_counit ๐ y
=
linear_category_counit ๐ x.
Show proof.
Proposition linear_category_comult_coalgebra_mor
(x : ๐)
: linear_category_comult ๐ x
ยท (ฮด (linear_category_bang ๐) x #โ ฮด (linear_category_bang ๐) x)
ยท mon_functor_tensor (linear_category_bang_functor ๐) _ _
=
ฮด (linear_category_bang ๐) x
ยท #(linear_category_bang ๐) (linear_category_comult ๐ x).
Show proof.
Proposition linear_category_counit_coalgebra_mor
(x : ๐)
: linear_category_counit ๐ x
ยท mon_functor_unit (linear_category_bang_functor ๐)
=
ฮด (linear_category_bang ๐) x
ยท #(linear_category_bang ๐) (linear_category_counit ๐ x).
Show proof.
Proposition linear_category_counit_comonoid_mor_counit
(x : ๐)
: ฮด (linear_category_bang ๐) x
ยท linear_category_counit ๐ (linear_category_bang ๐ x)
=
linear_category_counit ๐ x.
Show proof.
Proposition linear_category_counit_comonoid_mor_comult
(x : ๐)
: ฮด (linear_category_bang ๐) x
ยท linear_category_comult ๐ (linear_category_bang ๐ x)
=
linear_category_comult ๐ x
ยท (ฮด (linear_category_bang ๐) x #โ ฮด (linear_category_bang ๐) x).
Show proof.
Proposition linear_category_coassoc
(x : ๐)
: linear_category_comult ๐ x
ยท (identity _ #โ linear_category_comult ๐ x)
=
linear_category_comult ๐ x
ยท (linear_category_comult ๐ x #โ identity _)
ยท mon_lassociator _ _ _.
Show proof.
Proposition linear_category_counitality
(x : ๐)
: linear_category_comult ๐ x
ยท (linear_category_counit ๐ x #โ identity _)
ยท mon_lunitor _
=
identity _.
Show proof.
Proposition linear_category_cocommutative
(x : ๐)
: linear_category_comult ๐ x
ยท sym_mon_braiding ๐ _ _
=
linear_category_comult ๐ x.
Show proof.
Proposition linear_category_comult_preserves_tensor
(x y : ๐)
: mon_functor_tensor (linear_category_bang_functor ๐) x y
ยท linear_category_comult ๐ (x โ y)
= (linear_category_comult ๐ x) #โ (linear_category_comult ๐ y)
ยท (inner_swap ๐
(linear_category_bang ๐ x)
(linear_category_bang ๐ x)
(linear_category_bang ๐ y)
(linear_category_bang ๐ y)
ยท mon_functor_tensor (linear_category_bang_functor ๐) x y
#โ mon_functor_tensor (linear_category_bang_functor ๐) x y).
Show proof.
Proposition linear_category_comult_preserves_unit
: mon_functor_unit (linear_category_bang_functor ๐)
ยท linear_category_comult ๐ I_{๐}
= mon_linvunitor I_{๐}
ยท mon_functor_unit (linear_category_bang_functor ๐)
#โ mon_functor_unit (linear_category_bang_functor ๐).
Show proof.
Proposition linear_category_counit_preserves_tensor
(x y : ๐)
: mon_functor_tensor (linear_category_bang_functor ๐) x y
ยท linear_category_counit ๐ (x โ y)
= linear_category_counit ๐ x #โ linear_category_counit ๐ y
ยท mon_lunitor (monoidal_unit ๐).
Show proof.
Proposition linear_category_counit_preserves_unit
: mon_functor_unit (linear_category_bang_functor ๐)
ยท linear_category_counit ๐ I_{๐}
= identity I_{๐}.
Show proof.
End AccessorsLaws.
3. Other accessors for linear categories
Definition linear_category_cocommutative_comonoid
(๐ : linear_category)
(x : ๐)
: commutative_comonoid ๐.
Show proof.
Proposition linear_category_counit_comonoid_mor_struct
(๐ : linear_category)
(x : ๐)
: comonoid_mor_struct
๐
(linear_category_cocommutative_comonoid ๐ x)
(linear_category_cocommutative_comonoid ๐
(linear_category_cocommutative_comonoid ๐ x))
(ฮด (linear_category_bang ๐) x).
Show proof.
Definition linear_category_comult_nat_trans
(๐ : linear_category)
: linear_category_bang ๐
โน
linear_category_bang ๐โ diag_functor ๐.
Show proof.
Definition linear_category_counit_nat_trans
(๐ : linear_category)
: linear_category_bang ๐ โน constant_functor _ _ I_{๐}.
Show proof.
Definition linear_category_comult_is_mon_nat_trans
(๐ : linear_category):
is_mon_nat_trans (linear_category_bang_functor ๐)
(comp_fmonoidal_lax (linear_category_bang_functor ๐) (diag_functor_fmonoidal_lax ๐))
(linear_category_comult_nat_trans ๐).
Show proof.
Definition linear_category_counit_is_mon_nat_trans
(๐ : linear_category):
is_mon_nat_trans (linear_category_bang_functor ๐)
(constant_functor_fmonoidal_lax _ (unit_monoid ๐)) (linear_category_counit_nat_trans ๐).
Show proof.
Definition linear_category_comult_coalgebra_morphism
(๐ : linear_category) (x : ๐)
: CoAlg_category (linear_category_bang ๐)
โฆ ((linear_category_bang ๐) x) ,, ฮด (linear_category_bang ๐) x,
(linear_category_bang ๐ x โ linear_category_bang ๐ x ,,
(ฮด (linear_category_bang ๐) x #โ ฮด (linear_category_bang ๐) x)
ยท mon_functor_tensor (linear_category_bang_functor ๐) _ _ )โง.
Show proof.
Definition linear_category_counit_coalgebra_morphism
(๐ : linear_category) (x : ๐)
: CoAlg_category (linear_category_bang ๐)
โฆ ((linear_category_bang ๐) x) ,, ฮด (linear_category_bang ๐) x,
(I_{๐} ,, mon_functor_unit (linear_category_bang_functor ๐)) โง.
Show proof.
(๐ : linear_category)
(x : ๐)
: commutative_comonoid ๐.
Show proof.
use make_commutative_comonoid.
- exact (linear_category_bang ๐ x).
- exact (linear_category_comult ๐ x).
- exact (linear_category_counit ๐ x).
- exact (linear_category_counitality x).
- exact (!(linear_category_coassoc x)).
- exact (linear_category_cocommutative x).
- exact (linear_category_bang ๐ x).
- exact (linear_category_comult ๐ x).
- exact (linear_category_counit ๐ x).
- exact (linear_category_counitality x).
- exact (!(linear_category_coassoc x)).
- exact (linear_category_cocommutative x).
Proposition linear_category_counit_comonoid_mor_struct
(๐ : linear_category)
(x : ๐)
: comonoid_mor_struct
๐
(linear_category_cocommutative_comonoid ๐ x)
(linear_category_cocommutative_comonoid ๐
(linear_category_cocommutative_comonoid ๐ x))
(ฮด (linear_category_bang ๐) x).
Show proof.
use make_is_comonoid_mor ; cbn.
- exact (!(linear_category_counit_comonoid_mor_comult x)).
- rewrite id_right.
exact (!(linear_category_counit_comonoid_mor_counit x)).
- exact (!(linear_category_counit_comonoid_mor_comult x)).
- rewrite id_right.
exact (!(linear_category_counit_comonoid_mor_counit x)).
Definition linear_category_comult_nat_trans
(๐ : linear_category)
: linear_category_bang ๐
โน
linear_category_bang ๐โ diag_functor ๐.
Show proof.
use make_nat_trans.
- exact (ฮป x, linear_category_comult ๐ x).
- abstract
(intros x y f ; cbn ;
apply linear_category_comult_nat).
- exact (ฮป x, linear_category_comult ๐ x).
- abstract
(intros x y f ; cbn ;
apply linear_category_comult_nat).
Definition linear_category_counit_nat_trans
(๐ : linear_category)
: linear_category_bang ๐ โน constant_functor _ _ I_{๐}.
Show proof.
use make_nat_trans.
- exact (ฮป x, linear_category_counit ๐ x).
- abstract
(intros x y f ; cbn ;
rewrite id_right ;
apply linear_category_counit_nat).
- exact (ฮป x, linear_category_counit ๐ x).
- abstract
(intros x y f ; cbn ;
rewrite id_right ;
apply linear_category_counit_nat).
Definition linear_category_comult_is_mon_nat_trans
(๐ : linear_category):
is_mon_nat_trans (linear_category_bang_functor ๐)
(comp_fmonoidal_lax (linear_category_bang_functor ๐) (diag_functor_fmonoidal_lax ๐))
(linear_category_comult_nat_trans ๐).
Show proof.
split.
- intros x y. apply linear_category_comult_preserves_tensor.
- apply linear_category_comult_preserves_unit.
- intros x y. apply linear_category_comult_preserves_tensor.
- apply linear_category_comult_preserves_unit.
Definition linear_category_counit_is_mon_nat_trans
(๐ : linear_category):
is_mon_nat_trans (linear_category_bang_functor ๐)
(constant_functor_fmonoidal_lax _ (unit_monoid ๐)) (linear_category_counit_nat_trans ๐).
Show proof.
split.
- intros x y. apply linear_category_counit_preserves_tensor.
- apply linear_category_counit_preserves_unit.
- intros x y. apply linear_category_counit_preserves_tensor.
- apply linear_category_counit_preserves_unit.
Definition linear_category_comult_coalgebra_morphism
(๐ : linear_category) (x : ๐)
: CoAlg_category (linear_category_bang ๐)
โฆ ((linear_category_bang ๐) x) ,, ฮด (linear_category_bang ๐) x,
(linear_category_bang ๐ x โ linear_category_bang ๐ x ,,
(ฮด (linear_category_bang ๐) x #โ ฮด (linear_category_bang ๐) x)
ยท mon_functor_tensor (linear_category_bang_functor ๐) _ _ )โง.
Show proof.
use tpair.
- exact (linear_category_comult ๐ x).
- abstract (cbn; rewrite assoc; apply pathsinv0, linear_category_comult_coalgebra_mor).
- exact (linear_category_comult ๐ x).
- abstract (cbn; rewrite assoc; apply pathsinv0, linear_category_comult_coalgebra_mor).
Definition linear_category_counit_coalgebra_morphism
(๐ : linear_category) (x : ๐)
: CoAlg_category (linear_category_bang ๐)
โฆ ((linear_category_bang ๐) x) ,, ฮด (linear_category_bang ๐) x,
(I_{๐} ,, mon_functor_unit (linear_category_bang_functor ๐)) โง.
Show proof.
use tpair.
- exact (linear_category_counit ๐ x).
- abstract (apply pathsinv0, linear_category_counit_coalgebra_mor).
- exact (linear_category_counit ๐ x).
- abstract (apply pathsinv0, linear_category_counit_coalgebra_mor).