set theoretical foundationalism

Steve Awodey proposes category-theory based structuralism as a substitute for the set-theory based foundationalism:

We can say that the "foundational perspective," to which we are proposing an alternative, is based on the idea of building up specific "mathematical objects" within a particular "foundational system," in such a way that:
1. There are enough such objects to represent the various kinds of numbers as well as the spaces, groups, manifolds etc. of everyday mathematics, and
2. There are enough laws, rules, and axioms to warrant all of the usual inferences and arguments made in mathematics about these things, as well as at least some of the most obvious "rounding off" statements dealing with features of the system itself (like the well-foundedness of all sets, a question that does not arise in non-set-theoretic mathematics).
As opposed to this one-universe, "global foundational" view, the "categorical structural" one we advocated is based instead on the idea of specifying, for a given theorem or theory only the required or relevant degree of information or structure, the essential features of a given situation, for the purpose at hand, without assuming some ultimate knowledge, specification, or determination of the "objects" involved. The laws, rules, and axioms involved in a particular piece of reasoning, or a field of mathematics, may vary from one to the next, or even from one mathematician or epoch to another. The statement of the inferential machinery involved thus becomes a (tacit) part of the mathematics; functional analysis makes heavy use of abstract functions and the axiom of choice, some theorems in algebra rely on the continuum hypothesis many arguments in homology theory are purely algebraic, once given the non-algebraic objects that they deal with; theorems in constructive analysis avoid impredicative constructions; 19th century analysis employed other methods than modern-day analysis, and so on. The methods of reasoning involved in different parts of mathematics are not "global" and uniform across fields or even between different theorems, but are themselves "local" or relative.
Thus according to our view, there is neither a once-and-for-all universe of all mathematical objects, nor a once-and-for-all system of all mathematical inferences. Are there, then, various and changing universes and systems? How are they determined, and how are they related? Here I would rather say that there are no such universes or systems; or rather, that the question itself is still based on a "foundationalist" preconception about the nature of mathematical statements...
Theorems state connections, relations, and properties of the structures involved: group, topological, continuous actions, etc. The proof of a theorem involves the structures mentioned, and perhaps many others along the way, together with some general principles of reasoning like those collected up in logic, set theory, category theory, etc. But it does not involve the specific nature of the structures, or their components, in an absolute sense. That is, there is a certain degree of "analysis" or specificity required of the proof and beyond that, it doesn't matter what the structures are supposed to be or to "consist of"- the elements of the group, points of the space, are simply undetermined.
This lack of specificity or determination is not an accidental feature of mathematics, to be described as universal quantification over all particular instances in a specific foundational system as the foundationalist would have it - a contrived and fantastic interpretation of actual mathematical practice (even more so of historical mathematics!). Rather it is characteristic of mathematical statements that the particular nature of the entities involved plays no role, but rather their relations, operations, etc. - the "structures" that they bear - are related, connected, and described in the statements and proofs of theorems. It is a theorem in topology that the first homology group of an arcwise-connected space is naturally isomorphic to the abelianization of the fundamental group of the space. This statement doesn't depend on the specific points of the space, or even on the specific space; it is about a connection between homology and homotopy. In this sense, mathematical statements (theorems, proof, etc. even definitions) are about connections, operations, relations, properties of connections, operations on relations, connections between relations on properties, and so on.

Set theory provides a universal setting for all of mathematics at two great expenses.

1) It strips off the commonalities across the different structures. From a set theoretical perspective, the only thing that rings and abelian groups have in common is the fact that they are sets. Knowing that two things are made of elements brings zero insight regarding their structural similarities. From a categorical perspective, a single functor (namely the forgetful functor) from the category of rings to the category of abelian groups highlights all the structural similarities present. (Note that a ring is an abelian group with some further structure.)

Category theory allows you to work on structures without the need first to pulverise them into set theoretic dust. To give an example from the eld of architecture, when studying Notre Dame cathedral in Paris, you try to understand how the building relates to other cathedrals of the day, and then to earlier and later cathedrals, and other kinds of ecclesiastical building. What you don't do is begin by imagining it reduced to a pile of mineral fragments.

Corfield - Towards a Philosophy of Real Mathematics (Page 239)

2) For the sake of founding things on simpler things, it explains the clear with the obscure.

In a definite sense, all mathematics can be derived from axiomatic set theory... This view leaves unexplained why, of all the possible consequences of set theory, we select only those which happen to be our mathematics today, and why certain mathematical concepts are more interesting than others. It does not help to give us an intuitive grasp of mathematics such as that possessed by a powerful mathematician. By burying, e.g. the individuality of natural numbers, it seeks to explain the more basic and the clearer by the more obscure.

- Hao Wang ass quoted in Tool and Object (Page 26)

In order to see how contrived it is to define natural numbers in set theory, let me explain to you how it is actually done!

You first need to lay down the axioms of Zermelo-Fraenkel set theory. ZFC is just a list of infinitely many statements written in the language of first order logic. One of these statements is the Axiom of Infinity which guarantees the existence of a set with the following two properties:

- It contains the empty set.

- Whenever it contains an ordinal it also contains the successor of that ordinal.

An ordinal is a tricky notion to grasp. The important point to know is that ordinals are well-ordered and each ordinal consists solely of all the ordinals that precede it. Hence given an ordinal A you can legitimately talk about the successor ordinal, namely the ordinal coming right after A. But the fact that every ordinal has a successor does not imply that every ordinal is a successor. It may be impossible to pinpoint the ordinal which comes right before A. (In such a case A is called a limit ordinal.)

Define a natural number M as an ordinal satisfying the following property: If an ordinal A precedes M or is equal to M (in other words if A is contained in M), then A is either the empty set or a successor ordinal. It is easy to see that each natural number M is contained in the set spawned into existence by the Axiom of Infinity. So the collection of all natural numbers resides in a set. Hence, using Axiom of Comprehension, we can carve out that collection and consider it as set on its own. There you have the set of natural numbers N!

Of course you may still wonder whether N really captures the intuitive idea of what natural numbers are. The answer is easily seen to be affirmative if you are willing to assume that the intuitive idea is completely characterized by the Peano axioms (which by the way can only be expressed in second-order logic).

This set theoretical construction involves a truly bottom-up approach. It also happens to be truly inexplicable to non-mathematicians!

In category theory, the set of natural numbers is not built from ground-up. It is treated as a single impenetrable object and the characterization is entirely external. (The key is to capture the recursive character of the set of natural numbers without invoking the numbers themselves.) This approach has an important added advantage: We do not have to restrict ourselves to the category of sets. We can define a natural number object in any category that has a terminal object.

Let ε be an arbitrary category with a terminal object 1. (Note that the terminal object in Set is simply the one element set {*}.) The natural number object is defined as a triple (N,z:1→N,s:N→N) where the object N and morphisms z,s satisfy the following universal property. (Think of z as the function that send * to number zero, and s as the successor function sending number M to M+1.) For any triple (A,q:1→A,f:A→A), there exists a unique morphism u:N→A such that the following diagram commutes:

If ε was the category Set, then u would be the function taking number M to f(u(M-1)). There is only one such function since we need to have u(1)=f(u(0))=f(u(z(*)))=f(q(*)). (For more details, read this expository paper by Mazur.)