0
$\begingroup$

I'm reading a few books on category theory, and they talk about a functor from Set to List, with a object s in Set mapped to a list of elements of s. However, there are many lists possible from s, whereas I thought a functor should take one object to one object.

Am I missing something? I'm a programmer, and this functor is important per the books since its the applyall or mapall functor from Set to List, so any help understanding this is very appreciated.

$\endgroup$
3
  • 1
    $\begingroup$ Can you tell us which books? This would help us to decide which of the answers given is right, though my previous experience of category theory in computer science suggests that it is Andreas Blass. $\endgroup$ Commented Aug 22, 2016 at 3:02
  • $\begingroup$ This sounds a little off. Please tell us which book you've been reading and someone will surely take a look. $\endgroup$ Commented Aug 22, 2016 at 3:48
  • $\begingroup$ One of the "books" is this pdf I found online - inf.pucrs.br/~alfio/TReports/catti.pdf (page 99, example 6.1.1.7). The other book is not avaliable online, I will update its information when later today. $\endgroup$
    – Schitti
    Commented Aug 22, 2016 at 4:07

2 Answers 2

5
$\begingroup$

As a functor, applyall should be a functor $L$ from Set to Set (not to some other category List --- I'm not even sure what category is meant by "List"), and it should take any object $s$ of Set (i.e., a set $s$) to the set $L(s)$ of all lists of elements of $s$ (not to any particular list). Its action on functions should go like this: If $f:s\to t$ is any morphism in Set (i.e., any function), then $L(f):L(s)\to L(t)$ should be the function which takes any list $(a_1,a_2,\dots,a_k)$ of elements of $s$ to the list $(f(a_1),f(a_2),\dots,f(a_k))$of elements of $t$. That is, $L(f)$ applies $f$ to all the members of a list.

$\endgroup$
4
  • $\begingroup$ Might List be the Kleisli category for the adjunction whose right adjoint is the forgetful functor from monoids to sets? $\endgroup$ Commented Aug 22, 2016 at 3:23
  • $\begingroup$ @ToddTrimble That would be the category of free monoids (and monoid homomorphisms), right? That would certainly work for the present purpose. Then the functor that I called $L$ is the "free monoid" functor (from Set to that Kleisli category) followed by the forgetful functor back to Set. $\endgroup$ Commented Aug 22, 2016 at 3:29
  • 1
    $\begingroup$ I understand it now. The book (inf.pucrs.br/~alfio/TReports/catti.pdf, page 99) defined a category of lists with list concatenation as the "arrow" and empty list as the identity. $\endgroup$
    – Schitti
    Commented Aug 22, 2016 at 4:08
  • $\begingroup$ Andreas, that's right. $\endgroup$ Commented Aug 22, 2016 at 11:05
0
$\begingroup$

The functor maps the set to a list of elements (this is not clearly always possible, see Are all sets totally ordered ?), but there is no problem with uniqueness.

$\endgroup$
2
  • $\begingroup$ So e.g. if s is {1,2,3}, one example functor would map s to [2, 1, 3]? So there would be total 3 factorial functors, each mapping the set {1,2,3} to a different list? $\endgroup$
    – Schitti
    Commented Aug 22, 2016 at 2:03
  • $\begingroup$ @Schitti Yes, I would say so. $\endgroup$
    – Igor Rivin
    Commented Aug 22, 2016 at 2:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .