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.
created a minimum at function monad (aka “reader monad”, “environment monad”)
What can be said about algebras for the function/reader monad, ? I see Zhen Lin gives as an example a setting where for a function and dependent , the product type is an algebra, where the action
sends to .
I guess you can think of that by factoring as ?
Is there anything to be said more generally about these algebras?
It’s possible that is monadic in general (the associated monad is this reader monad). I can check this at least in the case where is finite, using crude monadicity: preserves reflexive coequalizers since the latter are sifted colimits and these commute with finite products. It seems to be isomorphism-reflecting as well although a slick proof eludes me at the moment.
I’m not going to have any time during the remainder of today to look into the situation for more general .
If I recall correctly, when then the algebras are precisely the rectangular bands.
Regarding #3, I don’t think reflects isos even for finite . If I’m not mistaken, when , then for all and . Here is the constant function. Maybe I misunderstood #3.
Thanks, Sam. I see you’re talking about such things in Instances of computational effects:an algebraic perspective. I’d never heard of bands before. There’s then a ’rectangular bands monad’, as discussed here, which is for the identity monad.
A whole new world!
Stupid me.
Thanks. It was also discussed at the cafe back in 2015 (here). Out of that came the observation that is monadic. So perhaps, more generally, #3 can be rescued with some non-emptyness assumptions.
Have hyperlinked the term rectangular band, as per the discussion here.
In the section “Algebras for the reader monad” (here), where it said that these are hard to describe in general, I have added the remark that the reader monad makes sense in more general hyperdoctrines and that for dependent linear types the situation is different (due to/if one has existence of biproducts).
Then I added a section Examples – Quantum reader monad (here) which spells this out in some detail.
On this point, I guess the following is as trivial as it is noteworthy:
The “quantum reader monad”, i.e. the reader monad on which I had spelled out above (here), is evidently isomorphic to the writer monad (action monad) , the one which tensors with the direct sum algebra consisting of -indexed copies of the ground field. This naturally identifies the reader algebras with -modules in the ordinary sense of modules over algebras.
Moreover, the underlying functor of the quantum reader coincides with that of the quantum co-reader, which translates to also being a co-algebra – in fact a special symmetric Frobenius algebra. This way we may naturally identify linear (co)modules over the (co)reader (co)monads with ordinary (co)modules over this Frobenius algebra.
But this connects the discussion of quantum circuits via dependent linear types to the notion of “classical contexts” due to Coecke & Pavlović (2008).
Or rather, it will once one makes explicit the relevance of (co)modules in the latter approach, which pretty much happens in Heunen & Vicary (2019), say around Lem. 5.61 there.
( This is mostly a note to myself, I guess. Will flesh this out. )
I have polished up the diagram a little more (still here) and added a comment on the relation to “dynamic lifting”
I have added a diagram (here) summarizing the system of equivalences of the “quantum reader monad” over a finite base
and I have added explicit pointers to page and verse where Bob Coecke et al. mention (briefly) the monadic perspective on their “classical structures”:
Bob Coecke, Duško Pavlović, §1.5.1 of: Quantum measurements without sums, in Louis Kauffman, Samuel Lomonaco (eds.), Mathematics of Quantum Computation and Quantum Technology, Taylor & Francis (2008) 559-596 [arXiv:quant-ph/0608035, doi:10.1201/9781584889007]
Bob Coecke, Eric Oliver Paquette, §2.3 in: POVMs and Naimark’s theorem without sums, Electronic Notes in Theoretical Computer Science 210 (2008) 15-31 [arXiv:quant-ph/0608072, doi:10.1016/j.entcs.2008.04.015]
Bob Coecke, Eric Paquette, Dusko Pavlovic, Def. 2.8 in: Classical and quantum structures (2008) [pdf]
Next I am going to split this material off to a dedicated entry quantum reader monad.
I don’t understand well what are the unit and the multiplication of the reader monad in the introduction. Would it be possible to define them more explicitly?
Probably I’m a good example of a reader that doesn’t already know the subject before reading the entry and it lacks of details for such a reader in my opinion in the sense that I don’t understand the definition of the title.
Am on my phone, in a meeting. Will edit later, but just briefly:
The unit sends to the function on which has constant value .
The multiplication sends to .
Thanks, that’s already clearer with this.
Thanks, that’s excellent. I’m excited to see that you can define the reader monad in the generality of locally cartesian closed categories and so in a purely logical context if I understand. Is it difficult to prove that it is a monad in this generality?
The fact that is a monad is immediate, since is an adjoint pair (“right base change”). This means that the reader monad exists in much more generality than LCCCs even: I just needs a “right hyperdoctrine”.
E.g. the case of the “quantum reader monad” comes from the case of linear types dependent on classical types.
added pointer to:
1 to 27 of 27