Assume I have
- a comonad D
- a monad T
- a distributive law l : D T -> T Dof the comonadDover the monadT.
How can I define the comonad D T?
Assume I have
DTl : D T -> T D of the comonad D over the monad T.How can I define the comonad D T?
Copyright © 2021 Jogjafile Inc.
 
                        
You can't. Suppose
Dis the identity comonad andTisCont Void, i.e. the continuation monad at the empty type.Then distributivity holds trivially. But
extract :: D (T a) -> ais not definable as a total computable program. It would be double negation eliminationforall a. ((a -> Void) -> Void) -> a, which is not definable in constructive languages.