**Living in a contradictory world: categories vs. sets?**

In the present time, the ambition to offer global foundations for mathematics, free of ambiguities and contradictions, covering the whole spectrum of the mathematical activities, has been challenged by known flaws induced by the use and abuse of "big" categories. Unless we are ready to abandon a large part of fruitful trends in mathematical research, we have to face head on the reality (or nightmare) of contradictory mathematics. I’m suggesting a possible escape by using a theory of types to formalize the proofs of category theory.

**The ghost of contradiction**

In their pioneering paper on "Natural transformations", Eilenberg and Mac Lane stressed the importance of a new kind of constructions, now known as functors. So far the known constructions in geometry would associate two classes element by element, for instance a circle in a plane and its center. Examples coming from topology were of a different kind associating globally to a space another space (like the loop space) or algebraic invariants (like homotopy or homology groups). Also the question was raised of the naturalness of some transformations, like the identification of a finite dimensional vector space with its dual (not natural) or its bidual (natural). The insistence on transformations leads to a style of proof, which is "without points". Again, in his axiomatic description of the homology groups of a group (or Lie algebra) as given in the 1950 Cartan Seminar, Eilenberg considers a "construction" which to a group G associates the homology groups Hi(G;Z) for instance. But he is not explicit about how to express such a construction in the accepted paradigm of set theory. In Cartan-Eilenberg book, there is also a description “without points” of the direct sum of two modules. So, in the minds of the founding fathers of category theory, this theory was a kind of superstructure on the existing mathematics, more at the level of metamathematics.

In his epoch-making Tohoku paper, Grothendieck reversed this trend. Inspired by the work of Cartan and his collaborators on sheaves and their cohomology, Grothendieck introduced head on infinitary methods in category theory. His purpose was to use direct limits to define the stalks of sheaves in a categorical way, since one knew already many examples of sheaves in a category, like sheaves of groups, of rings, etc... Also one of the greatest discoveries of Grothendieck in this paper is the existence of injective objects in a reasonable category (satisfying axiom AB 5*). Going back from this abstract level, one can freely use injective sheaves, thereby greatly simplifying the general theory of sheaves.

In so doing, Grothendieck was combining two lines of thought: the rather metamathematical (hence finitary) methods of Eilenberg and Mac Lane, with the infinitary methods of Bourbaki Topology and Algebra focusing on infinite limits (direct or inverse) and universal problems. This mariage was extraordinarily fruitful for mathematics, but a price had to be paid. Categorical reasoning was “proofs without points” but the new methods required to consider the actual (not potential) totalities of all spaces, or all continuous transformations between spaces. Immediately, the old ghosts of the set-theoretic paradoxes resurfaced, like the Burali-Forti antinomy of the set of all sets, or the Richard antinomy bearing on definable objects. A natural development led to fundamental notions, like limit of a functor, representable functor and Yoneda lemma, adjoint pair of functors. But the logical disease remained, leading for instance to a questionable proof of the general existence of an adjoint functor.

If category theory can easily be formulated within a framework of first-order logic (and this led to Lawvere formulation of set theory in this spirit), and if set theory received a proper axiomatization as the Zermelo-Frenkel system, the combination of both proved explosive. Some cures were attempted, like the use of universes by Grothendieck and Gabriel-Demazure. But this is highly artificial, like all methods using a universal domain, and brings us to the difficult (and irrelevant) problems of large cardinals in set theory.

At the moment, the situation is not unlike the one prevailing in the 18th century in the infinitesimal calculus. Everyone knew that the existence of infinitesimal quantities was questionable and that its use leads easily to contradictions. Today, we know about the dangerous spots, where not to swim, and try to stay away while continuing our exploration.

**A possible exorcizing of ghosts**

I would like to suggest a possible way out of this impasse. It seems to me that the initial sin is the prevalent view about the underlying ontology of mathematics. From a technical point of view, the Hilbert proposal of encoding every mathematical object as a set has been extremely successful. After the successful arithmetization of analysis, representing (in various ways: Dedekind cuts,...) a real number as a collection (or set) of integers, or pairs of integers, ..., all kinds of mathematical constructions yielded to the set theoretic paradigm. But in the accepted way of thought, a set is defined only after all of its elements have been created and put under control. So, speaking of the set of cats (integers) means that you could call the roll of all the cats (integers). So when we speak of the category of groups, all imaginable groups should be present. This is the point of view of actual infinities in an extensional sense. The undecidability of continuum hypothesis represents for me an unescapable blemish of this “realistic” point of view about infinity.

The new approach should be based on a comprehension scheme. That is, a set is described by the characteristic property of its elements: the set of cats is defined by the property of being a cat, described as accurately as possible, without any claim about the totality of existing cats. This is a standard practice in typed languages in computer science. Typically, a programme begins by instructions like

x : real

n : integer

t : boolean

... ... ...

declaring variables of various types (or sorts). Such a language embodies rules to create new types out of old types, for instance the type

integer → real

is the type of sequences of real numbers. Usually, there is also available an abstraction principle, in the form of a λ-operation

λx.t

to describe a function associating to x the value t (described by a formula containing x). So the framework is a *typed λ-calculus*.

There have been recent advances in theoretical computer science, in the form of various *proof assistants* (HOL Light, Mizar, Coq, Isabelle,...). They are able to create completely formalized proofs of “real” mathematics, like the prime number theorem, and check and guarantee their correctness.

I’m raising the challenge to translate the usual proofs of category theory within such a system. What should be required is the existence of types like *cat* (= categories), *func* (= functors),... So a standard sentence like: “Let C be a category” should be encoded by a declaration like:

C : cat .

There is no need to think of the totality of all possible categories. Of course, a
type like set would embody the category of sets.

Of course, the implicit strategy is the one of Russell when he invented type theory to cure the diseases of set theory, like the set of all sets. . . I would also like to mention that the inner logic of a topos looks very similar, so we could perhaps *formalize large segments of category theory within a syntactically defined universal topos*.