Require Import Category.RComonad.
Require Import Category.RComonadWithCut.
Require Import Theory.Category.
Require Import Theory.Isomorphism.
Require Import Theory.Functor.
Require Import Theory.NaturalTransformation.
Require Import Theory.RelativeComonad.
Require Import Theory.RelativeComonadWithCut.
Require Import Theory.Product.
Require Import Theory.CartesianStrongMonoidal.
Generalizable All Variables.
Cut is a natural transformation
Section CUT_NT.
Context `{BinaryProduct π} `{BinaryProduct π} {F : Functor π π} `{!CartesianStrongMonoidal F}
{E : π} (T : RelativeComonadWithCut F E).
Functor π» : π β π
Notation π» β (
Lift(
T)).
Program Definition T_Ex :
Functor π π β
Functor.make β¦ F | β Ξ» A β T (E Γ A)
|
;
map β
Ξ» A B β
Ξ» f β¦
Tβ
cobind (
Tβ
extend (
Fβ
f β
Tβ
counit)) β¦.
map-cong
map-id
Show proof.
rewrite <- identity, left_id, cut_counit.
symmetry. etransitivity.
apply Ξ .cong. apply Ξ β.cong; [ reflexivity |].
symmetry. apply β-Γ.
rewrite <- compose_assoc, iso_right, left_id. apply cobind_counit.
map-compose
Show proof.
symmetry. rewrite cobind_cobind. repeat rewrite compose_assoc.
apply Ξ .cong. apply Ξ β.cong ; [ reflexivity |].
rewrite β-Γ, compose_assoc, counit_cobind.
rewrite <- compose_assoc, FΟβ_Ο_inv, Οβ_compose.
rewrite cut_counit. repeat rewrite compose_assoc.
rewrite counit_cobind. setoid_rewrite <- compose_assoc at 2.
now rewrite FΟβ_Ο_inv, Οβ_compose, map_compose, <- compose_assoc.
Notation "'π»(π¬Γβ)'" β
T_Ex (
at level 0).
Program Definition πͺππ :
NaturalTransformation π»(π¬Γβ) π» β
NaturalTransformation.make β¦
Ξ· β
Ξ» A β
Tβ
cut β¦.
Ξ·-commutes
Show proof.
rewrite cut_cobind. unfold Extend. simpl. reflexivity.
End CUT_NT.