The product is also a bifunctor using both the fact that both the product
and the coproduct on types are bifunctors. That is why in the implementation
of (~*~), we see bimap appear twice, but the first one operates on
(*) : Type -> Type -> Type and the second one operates on (+) : Type -> Type -> Type.
Proposition
The cartesian product forms a bifuctor in Cont
(~*~) : a =%> a' -> b =%> b' -> a * b =%> a' * b'(~*~) m1 m2 = (bimap m1.fwd m2.fwd) <! (\x => bimap (m1.bwd x.π1) (m2.bwd x.π2))
Building the proof that the cartesian product is a bifunctor in Cont is easy
but it must be done in order to implement more interesting structures.