BartoszMilewski / Publications

Misc. publications, conference slides, etc. For more, go to http://BartoszMilewski.com
1.24k stars 38 forks source link

Small mistake in "Monads and applicatives" #16

Closed ncfavier closed 7 months ago

ncfavier commented 7 months ago

Since in a cartesian closed category every monad is lax monoidal

This is not true. A strong monad inherits a lax monoidal structure, and every monad on a self-enriched category is strong (as a previous section explains correctly), but this does not include all cartesian closed categories.

BartoszMilewski commented 7 months ago

But isn't every CC category canonically self-enriched?

ncfavier commented 7 months ago

Yes, sorry, that's not quite what I meant. Every enriched monad (that is $\mathcal{C}$-monad) on a monoidal closed category $\mathcal{C}$ is strong, but it is not the case that every monad on a self-enriched category is automatically enriched. I guess this is the sense in which Set is canonically self-enriched: when we say Set, we mean the Set-enriched category Set, and when we say "functor", we mean Set-enriched functor (this probably also illustrates why "canonical" should never be used).

As a counterexample, see this MathOverflow answer (emphasis mine):

So one example would be the monad on Cat (considered as a Set-category) whose algebras are cartesian closed categories -- it is known that this is not a Cat-monad (although it does extend to Cat as a groupoid-enriched category).

ncfavier commented 7 months ago

An easier example to wrap one's head around is example 3.1 in Unicity of Enrichment over Cat or Gpd by John Power. It's interesting to note that this example relies on Cat being the 1-category of strict categories though; it wouldn't work with univalent categories (but then Cat wouldn't be a 1-category to begin with).

ncfavier commented 7 months ago

This sentence on page 207 also needs fixing:

For now, the magic incantation is that such a category is self-enriched, so every endofunctor is canonically enriched.

While I'm at it, typos on page 319:

The generalization of a co-preshef is a V-funtor

and another instance of "funtor" on page 256.

BartoszMilewski commented 7 months ago

I'm considering adding a footnote: Again, the correct incantation is "every self-enriched monad" I don't want to overwhelm the reader with too much information at this stage.

ncfavier commented 7 months ago

That seems wise (but it should be "every enriched monad", not "self-enriched")

BartoszMilewski commented 7 months ago

This sentence on page 207 also needs fixing:

For now, the magic incantation is that such a category is self-enriched, so every endofunctor is canonically enriched. So what's a better way of saying that (without overwhelming the reader)?

ncfavier commented 7 months ago

Just remove the implication: "such a category is self-enriched, and we're working with enriched endofunctors"?

BartoszMilewski commented 7 months ago

In the latest revision I had: "For now, the magic incantation is that the category we're working with is self-enriched, and every endofunctor defined in Haskell is canonically enriched. " So I'll just remove "canonically".