Elementary number theory text from a categorical perspective

I have to admit that this is not really an answer, but rather some sort of meta-answer with some very general remarks which I hope do not bore everyone reading this; it just seems to me that this is necessary to indicate that it is rather misguided, as Yemon already says in the comments and I strongly agree with, to ask such a question if some book introduces elementary number by means of category theory.

Mathematics is all about the nontrivial, unexpected relationships. Category Theory is not really about finding such relationships, but rather about the correct setting, language and color some theory is developed. This point of view does not really contradict the hitherto development of category theory into a huge area of mathematics in its own right, full of nontrivial deep theorems; namely because often there is some geometric or whatever background which is our real motiviation. There are ubiquitous examples (model categories, topoi, stacks, $\infty$-categories, ...) which I don't want to elaborate here.

Anyway, as I said, mathematics really starts when something unexpected happens, which does not follow from general category theory. For example, the covariant functor $\hom(X,-)$ is always continuous, but when is it also cocontinuous, or respects at least filtered colimits? It turns out that this leads to a natural finiteness condition on $X$, namely we call $X$ then finitely presented. But finally to arrive at the question, $\mathbb{Z}$ is easily seen to be a inital object in the category of rings, but what theorems from category theory are known about initial objects? Well there is nothing to say, expect that every two initial objects are canonical isomorphic, which is just a trivial consequence of the definition. So $\hom(\mathbb{Z},-)$ is easy to describe, but what about the contravariant functor $\hom(-,\mathbb{Z})$? What happens when you plug in $\mathbb{Z}[x,y,z]/(x^n+y^n=z^n)$ for some fixed $n>2$? Does category theory help you to understand this? This example also shows that although the Yoneda-Lemma says that an object $X$ of a category is determined by its functor $\hom(X,-)$, it does not say you anything about the relationship of $X$ with other objects, for example when we just reverse the arrows. Instead, we have to use a specific incarnation of the category and its objects in order derive something which was not there just by abstract nonsense.

Perhaps related questions are more interesting: Which investigations in elementary number theory have led to some category theory (for example, via categorification), which was then applied to other categories as well, thus establishing nontrivial analogies? Or for the other direction, which general concepts become interesting in elementary number theory after some process of decategorification? But in any case, it should be understood that you have to digest elementary number theory before that ...


I searched Math Reviews for books with Anywhere = categor* AND MSC Primary = 11 and then looked at the 25 matches and only one of them was an elementary Number Theory text, and the categories involved are not the kind wanted here ("Each section of the text concludes with about 30--40 problems which are divided up into three categories...."). I submit this as evidence that what OP asks for doesn't exist.

EDIT: In response to OP's edit, I searched MR for Anywhere = natural numbers object AND Anywhere = topos and got 92 matches. I don't know if any of them do what OP wants. I looked at the reviews of a few, the ones that actually referred to "natural numbers" in the title, and only saw one that had anything I wuld recognize as Number Theory.

Carol Szasz, Das Objekt "ganze Zahlen'' in einem elementaren Topos, Proceedings of the national conference on algebra (Iaşi, 1984), An. Ştiinţ. Univ. Al. I. Cuza Iaşi Secţ. I a Mat. 31 (1985), suppl., 88–89, MR0858194 (88a:18006).

After defining an integral number object in terms of morphisms, the reviewer (Roswitha Harting) writes, "For an integral number object of $(Z,0,s)$ the author then defines in the obvious way morphisms $a$ (addition) and $m$ (multiplication), and obtains that $(Z,a,0)$ is an abelian group."

But wait, I hear you say, that's integral number object, what about natural number object?

"Furthermore the author insinuates that there may exist topoi having an integral number object but no natural number object. For this it should be mentioned, that in the case of the integral number object being decidable, the existence of a natural number object follows."


Here is one answer, although I am not sure it is along the lines of what Daniel Miller was after. For decades now, Lawvere and Schanuel have spearheaded a project on what they call "objective number theory", which you could consider a kind of structural approach to number theory, in that some aspects of the theory of numbers are re-interpreted by decategorifying analogous results for things like you say, the initial commutative ring satisfying such and such an identity seen as a decategorification of some category with appropriate properties, like an extensive category equipped with some isomorphism that expresses the identity.

Unfortunately, I don't know of a lot in print about this; I've seen Schanuel give talks on it once or twice. Here's one paper by Schanuel on this (which I haven't read yet myself).

A flavor of the type of thing this is about can be gleaned by looking at Andreas Blass's nice paper, Seven Trees in One, which is about a structural solution to the equation $x^7 = x$ in terms of binary trees. The starting observation is that the linear species of binary trees satisfies the data type equation $x = x^2 + 1$, and $x^7 = x$ can be derived as a formal consequence in the theory of commutative rigs; the operations used here can be interpreted structurally in terms of extensive categories with an object satisfying the appropriate identity.

Edit 1: Here is a youtube video to go along with "seven trees in one". There are a number of illustrations out there with more detail; here is one by Dan Piponi, who also contributes to MO under a pseudonym.

Edit 2: And I should definitely mention this very nice paper on Objective Number Theory by Tom Leinster and Marcel Fiore.

Edit 3: And finally (I hope this is my last edit), there is a beautiful article at the ncatlab by John Baez and James Dolan, on zeta functions from a "categorified" or species-theoretic point of view.