# On the category of Sets as an example of an algebraic category

What follows comes from Algebraic Theories, pag. 7.

Definition An algebraic theory is a small category $\mathcal{T}$ with finite products. An algebra for the theory $\mathcal{T}$ is a functor $A:\mathcal{T}\longrightarrow Set$ preserving finite products. We denote by $Alg\ \mathcal{T}$ the category of algebras of $\mathcal{T}$. Morphisms, called homomorphisms, are the natural transformations. That is, $Alg \ \mathcal{T}$ is a full subcategory of the functor category $Set^{\mathcal{T}}$.

Definition A category is algebraic if it is equivalent to $Alg\ \mathcal{T}$ for some algebraic theory $\mathcal{T}$.

I can't understand the following example:

Sets: the simplest algebraic category is the category of Sets. An algebraic theory $\mathcal{T}_1$ for Sets can be described as the full subcategory of $Set^{op}$ whose objects are the natural numbers. In fact, since $n=1\times\ldots\times 1$ in $Set^{op}$, the category $\mathcal{T}_1$ has finite products. And every algebra $A:\mathcal{T}_1\longrightarrow Sets$ is determined, up to isomorphism, by the set $A(1)$, since $A(n)\equiv A(1)\times\ldots\times A(1)$. More precisely, we have an equivalece functor $$E:Alg\ \mathcal{T}_1\longrightarrow Set,\ \ \ \ A\longmapsto A(1)$$

What I can't understand:

1) Why $Set^{op}$?

2) Why $\mathcal{T_1}$ has finite products?

3)"....whose objects are natural numbers..." and morphisms?

-

About point 2) if you consider $\mathcal T_1^\text{op}$, the full-subcategory of $Set$ whose objects are natural numbers, you clearly have that this category is closed by co-products (i.e. disjoin unions in $Set$).

When you consider $\mathcal T_1$, which is the opposite/dual category to above mentioned full-subcategory of $Set$, since duality turn coproduct in product, you get that $\mathcal T_1$ has products.

3) Since $\mathcal T_1^\text{op}$ is a full-subcategory of $Set$ its morphisms are just functions between the natural numbers, morphisms of $\mathcal T_1$ are just the opposite of such morphisms (or, depending on your definition of dual category just the same morphisms of $\mathcal T_1$ with reversed direction).

1) The reason why we use $\mathcal T_1$ as a subcategory of $Set^\text{op}$ insteand of $Set$ is that in this why the sum of natural numbers is the product in the category (that's because $n+m$ is the coproduct of $n$ and $m$ seen as objects in $Set$ and so it's the product in $Set^\text{op}$). In this why you get the cool property that every object $n\in \mathcal T_1$ is an iterated finite product of $1$. In particular this implies that every model $A \colon \mathcal T_1 \to Set$ can be recovered just by the set $A(1)$: for instance for every natural number $n \in \mathcal T_1$ we have $A(n)=A(1)^n$, in a very similar way you can recover the other information on the functor (the image of the various morphisms in $\mathcal T_1$). This property is what make possible the existance of the equivalence between the category of sets ($Set$) and the category of functors $[\mathcal T_1,Set]$.

If choose to work with $\mathcal T_1$ which is the full-subcategory of $Set$ spanned by natural numbers you loose the above mentioned property (is not true that every natural number is generated by product from one object) hence you cannot recover all the information of models (i.e. functors of type $A \colon T \to Set$) from just the set $A(1)$. So from these different theory you cannot get a category of models which is equivalent to $Set$ (that's not actually a proof but it should give the intuition of why we cannot use the full-subcategory of $Set$ instead of that of $Set^\text{op}$).

Hope this helps.

-
Thanks for answering. What I can't completely understand is: why do we need to use the dual category of the category Sets? In other words: what's wrong if we take $\mathcal{T}_1$ to be the full subcategory of Sets whose objects are natural numbers.....? – Danae Kissinger Jul 4 '14 at 9:18
@DanaeKissinger Ok, then I think my answer said something about that too, let me edit a little bit to make it clear. – Giorgio Mossa Jul 4 '14 at 9:42

I am going to answer your questions in reverse order.

Question 3. The category $\mathcal T_1$ is defined as the full subcategory of $\mathsf{Set}^\mathrm{op}$ whose objects are the sets $\mathbf n = \{0,1,\dots,n\}$. So by definition, the morphisms of $\mathcal T_1$ are the morphism of $\mathsf{Set}^\mathrm{op}$.

Question 2. Just check that $\mathbf m \times \mathbf n = \mathbf{(m+n)}$ in $\mathcal T_1$.

Question 1. Precisely because we want $\mathbf 1\times\dots\times \mathbf 1$ to be $\mathbf{(1+\dots+1)} = \mathbf n$.

-