unitL : I ⊗ a =%> aunitL = π2 <! (\_ => (() &&))public exportunitR : a ⊗ I =%> aunitR = π1 <! (\_ => (&&()))
From this we can build the proof that it is a monoidal product in Cont.
We use the bifunctor just defined TensorBifunctor, we call it F in diagrams for brevity.
Proposition
The tensor product forms a monoidal structure in Cont
public exportTensorMonoidal : Monoidal ContTensorMonoidal = MkMonoidal TensorBifunctor I alpha leftUnit rightUnit where
For the tensor to be monoidal, we need to prove that it is associative. We do this by providing a natural isomorphism between the functors id×F;F and F×id;F. Due to the nature of programming, we need to add an associator to ensure the functors share the same domain and codomain:
f1:Cont×(Cont×Cont)→Cont=id×F;F
f2:Cont×(Cont×Cont)→Cont=assocR;F×id;F
The essence of the natural isomorphism for associativity is captured by the diagram:
We also need proof that the monoidal unit behaves like a unit on both sides of the bifunctor,
again this is done via a natural isomorphism between the identity functor in Cont and the
functor f:Cont→Cont=unitL;I×idCont;F
The natural isomorphism for left unit is capuring the information in this diagram: