# Are topoi like topological spaces or like set theory?

Background: I have very little intuition about category theory but I’m trying to understand the motivation behind it.

Wikipedia states:

In mathematics, a topos [...] is a category that behaves like the category of sheaves of sets on a topological space (or more generally: on a site). Topoi behave much like the category of sets and possess a notion of localization; they are in a sense a generalization of point-set topology.

Moreover, this video explains that a topos is a “mathematical universe” within which one can do math. I interpret this as saying that different topoi are “foundations of mathematics”. Perhaps the category of sets is an example of such a topos?

I am confused by this: topology is a specific mathematical theory, whereas set theory can be seen as a foundation of mathematics. It seems to me that set theory is far more general than topology, so I don’t understand why the structure of topology would be usable as a “mathematical universe” within which things like groups and linear algebra can be understood.

• It's more like set theory than topology (in my limited experience). Maybe someone more informed than I am would disagree. – Shaun Dec 29 '18 at 7:18
• Since topology induces a Heyting algebra which is more general from logical point of view then Boolean algebra which are induced from set theory. – Evgeny Kuznetsov Dec 29 '18 at 7:37

Imagine that a statement in the language of your set theory could have value an open set of a given topological space, $$X$$. In what way would the logic behind your set theory be different from the bog-standard 2 valued logic. For instance, an ordinary statement like 'the real valued function $$f$$ is non-zero', is either true or false, but we could also assign an open subset of $$\mathbb{R}$$ to $$f$$, namely the set of points at which $$f(x)$$ is not zero and that is a better measure of the truth of the statment that $$f$$ is not zero. In that case the set of truth values would quite naturally be $$Open(\mathbb{R})$$. (The topos here would be that of sheaves on $$\mathbb{R}$$.)
You might wonder how to do logic with such truth values but the union and intersection in $$Open(\mathbb{R})$$ allows on to form an elementary analogue of, for instance truth tables (or analogues of more abstract and powerful ways of viewing the logic). Have a look at Steve Vickers little book: Topology via logic for some very nice and intuitive aspects of this approach in a Computer Science setting. This is quite general provided you replace spaces by locales or Heyting algebras, which are an abstraction of the open set lattices of spaces.