Want to take part in these discussions? Sign in if you have an account, or apply for one below
Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.
started a minimum at writer comonad
So the writer comonad is a pull-push transform for the span $\ast \leftarrow W \rightarrow \ast$.
You said somewhere that reader and writer agree in certain contexts. Ah yes here. So there the randomness of the reader combines with the pull-pushnness of the writer, and we’re in the realm of path integrals.
Does anything interesting happen in the relative case $W_0 \leftarrow W \rightarrow W_0$? In modal terms this was supposed to be about a less than total accessibility relation on worlds. Does one ever pull-push through an equivalence relation?
…and we’re in the realm of path integrals. Does anything interesting happen in the relative case $W_0 \leftarrow W \rightarrow W_0$?
This relative case is already what matters for the path integral here.
In this context we are to think of the “possible worlds” more concretely as the “possible paths” or “possible trajectories” that a physical system may traverse. These are regarded here as depending on one of their two endpoints. “All possible histories $w(w_0) \in W(w_0)$ starting at the world $w_0 \in W_0$.”
Then the state monad passes through
$\ast \leftarrow W \stackrel{id}{\rightarrow} W \rightarrow \ast \leftarrow W \rightarrow \ast \rightarrow \ast.$What’s happening when reader and writer coincide? In that situation does it make sense to form a state monad which will just be reader (or writer) applied twice?
Yes, in that case it would just be the state monad applied twice.
But it is here, I think, that switching from the terminology “reader”, “writer”, “state” to “randomness” becomes really compelling:
on non-linear type then reader and writer will almost never coincide.
On stable linear types however, there are interesting situations in which “reader” and “writer” coincide (namely if $W$ is “compact enough” such as to admit a Poincaré duality), but in this situation is interpretation in terms of “reading” and “writing” is maybe no longer the most immediate one (though in principle it still applies). The more immediate interpretation of what is going on in this case is that one is producing linear spaces of probability amplitudes.
[ This is me, Urs, speaking here – the system seems to have logged me out while I was compiling this comment. ]
$\,$
Here is a question on whether/how people think of the following from the logical perspective:
When the $writer_B \dashv reader_B$ (co)monad pair is understood as coming from a hyperdoctrine or dependent type system, namely from the base change adjoint triple along $B$, as:
$writer_B \;\coloneqq\; \underset{B}{\coprod} \big((-)\times B\big ) \;=\; (p_B)_! (p_B)^\ast \phantom{---} reader_B \;\coloneqq\; \underset{B}{\prod} \big((-)\times B\big ) \;=\; (p_B)_\ast (p_B)^\ast$then there is a real sense in which it is possible to “actually write/read a given element”:
Namely, after pulling back (the value of) the reader monad to the context $B$, there is a natural map
$\array{ & (p_B)^\ast reader_B H &=& (p_B)^\ast (p_B)_\ast (p_B)^\ast H & \xrightarrow{ \;\;\; \epsilon_{ {}_{(p_B)^\ast H}} \;\;\; } & (p_B)^\ast H \\ {\color{purple}b} \colon B \;\; \vdash & && \underset{b' \colon B}{\prod} H & \xrightarrow{ (h_{b'})_{b' \colon B} \;\mapsto\; h_{\color{purple}b} } & H }$which has the interpretation of:
“Given an element $\color{purple}b$ of $B$, read out the $\color{purple}b$th component from the reader monad.”
Dually, once we pull back the (value of the) writer comonad to the context, there is a natural map
$\array{ & (p_B)^\ast H &\xrightarrow{\; \eta_{{}_{(p_B)^\ast H}} \;}& (p_B)^\ast (p_B)_! (p_B)^\ast H &\simeq& (p_B)^\ast writer_B H \\ {\color{purple}b} \colon B \;\; \vdash & H & \xrightarrow{\; h \;\mapsto\; ( {\color{purple} b}, \, h) \;} & \underset{b' \colon B}{\coprod} H }$which has the interpretation of:
“Given an element $\color{purple}b$ of $B$, write into the $\color{purple}b$th component of the writer comonad.”
$\,$
One might say that what is happening here is that the parameter $b$ gets “lifted out of the type back into the context, where we may then again refer to it” – if you see what I mean.
$\,$
What I am wondering about is if anybody speaks/thinks about the reader/writer comonad in this way, as admitting a way to read/write “a definite value”, once we understand the situation as dependently typed.
Yes, this is due to a mixup with the case where $W$ is equipped with monoid structure, where $W\times (-)$ is indeed a monad via that monoid structure, which then does model the idea of writing to a buffer.
The entry should make that clear, and maybe terminology should be adjusted. I might have time for it later todsy.
I have now adjusted and slightly expanded the wording in the entry.
Then I have dug out (or rather: took the best first two that I found) pointers to sources which say “reader comonad” or “coreader comonad”.
(There is much room left to further expand, please feel invited to edit.)
Finally I have renamed to “coreader comonad”.
fixed the link for exponentiable.
(By default, nLab entry names are nouns. So we have an entry titled exponential object and exponentiable object is redirecting there. We could make the also the the adjective “exponentiable” redirect there if this is felt necessary.)
1 to 20 of 20