# The CGP Grey Sheaf of Continents

CGP Grey is a youtuber with a variety of interesting videos, often about the quirks of geography and political boundaries.  In this video, he asks the question “How many continents are there?”, discusses a variety of subtleties in the notion of “continent”, and concludes that it is not well-defined enough to provide an answer.

Let’s grant that “continent” is not a well-defined term; or, to put it another way, the set of continents is not a well-defined set.  Even given that, it turns out there’s a mathematical notion of a “variable set”, or “set-valued sheaf” that can capture the notion of a set which can vary under different assumptions.  Intuitively a set-valued sheaf on a topological space $S$ is like a continuous function with domain $S$, except the range is not another topological space, it’s the category of all sets!

Rather than define “sheaf of sets on a topological space” explicitly, let’s work through what it means in the CGP Grey case.  For simplicitly, let’s just focus on two of the things that CGP Grey mentions: the meaning of “continent” can vary depending on how large you require a continent to be, and the meaning of “continent” can vary depending on how separated you require two continents to be to count as distinct.

Since these are two independent parameters, let’s take our topological space to be $[0,1]\times[0,1]$.  The first coordinate will represent our “looseness about the size requirement”; i.e., if it’s larger, we’ll consider smaller islands to be continents.  The second coordinate will represent our “degree of consideration of land bridges”; i.e., if it’s larger, we’ll require larger amounts of water to separate two continents.

To be clear, these parameters are subjective: that is, I’m not postulating any quantitative correspondence between the parameters and, e.g., a minimum size requirement to be a continent.

Now let’s see what the variable set of continents might look like.  First, let’s set the second parameter to 0 and vary the first parameter.  The set might look like this:

Note that some continents, like South America, are always in the set of continents, but as the parameter gets loosened, other elements get added to the set.

Now, let’s set the first parameter to 0 and vary the second one.  That graph might look like this:

This is a little more subtle than the previous graph; instead of new continents getting added, two continents which are distinct might become equal:  Europe and Asia quickly become equal, as there is actually no ocean between them at all.  If you disregard the Panama Canal, North America and South America become one continent.  If you disregard the Suez Canal, Eurasia and Africa become one continent.

Now, we’ve only looked at two slices of this variable set (and even those two slices have been under-specified, since I haven’t said in complete detail how to interpret the two parameters).  But let’s suppose that the full variable set on $[0,1]\times[0,1]$ can be filled out to give a set-valued sheaf called $\mathbf{Continents}$.

Given that, what can we do with this?  Well, one of the reason sheaves are interesting from a logical perspective is that if we consider the category of all set-valued sheaves on $[0,1]\times[0,1]$ (or any fixed topological space), this forms a type of category called a topos which acts so much like the category of sets that we can actually pretend that its elements are sets, and do normal set theory in it.  The only proviso is that the internal logic does not include the law of the excluded middle: the axiom that $P\vee\neg P$ for any proposition $P$.

So, what are some things you can do in this logic where we get to pretend that $\mathbf{Continents}$ is a genuine set?

Well, we know that $\mathbf{Continents}$ has elements: we know there is a thing called $\mathbf{North America}$ that’s in $\mathbf{Continents}$, and a thing called $\mathbf{Europe}$ that’s in $\mathbf{Continents}$ and so on.  We don’t know there’s a thing called $\mathbf{Borneo}$ that’s in $\mathbf{Continents}$; I’ll show how to deal with that later.

This is where the lack of the law excluded middle first rears its head: in this logic it is neither the case that $\mathbf{North America}=\mathbf{South America}$, nor that $\mathbf{North America}\neq\mathbf{South America}$!  On the other hand, it is the case that $\mathbf{North America}\neq\mathbf{Antarctica}$. This might seem unusual with ordinary sets, but I think it’s pretty intuitive here.  Note that there can be relationships between these facts, e.g., $\mathbf{Asia}=\mathbf{Africa}$ implies $\mathbf{Europe}=\mathbf{Africa}$.

In normal set theory, you can determine the cardinality of any set.  And in fact, the video’s stated aim is to say what the cardinality is.  One of the consequences of losing the law of the excluded middle is that the notion of finiteness becomes more subtle (e.g., see here or here), which again seems appropriate here.  It turns out to be the case that $\mathbf{Continents}$ is what’s called subfinite, but doesn’t have a definite cardinality.

However, there are still true things using the cardinality of $\mathbf{Continents}$ in them: for example, assuming no continents other than the ones in the graphs above are added, it’s the case that the cardinality of $\mathbf{Continents}$ is less than 11 (even though the cardinality does not equal a specific number below 11).  For another example, there might be a relationship between the two parameters such that something like $\mathbf{North America}=\mathbf{South America}$ implies the number of continents is greater than 7 is true.

OK, so far we’ve discussed how the logic handles things like the possibility of two continents becoming equal.  How does it handle the conditional existence of continents like Borneo?  So far it’s not clear how to even talk about these things in the language.

To explain that, we have to back up a bit.  In normal set theory, there are sets with one element, and we might as well pick a distinguished one, call it $\{\star\}$.  Note that for any set $A$ (still in normal set theory), the elements of $A$ are in 1-1 correspondence with maps $f\colon\{\star\}\to A$; so we could as well talk about those maps instead of elements of $A$.

Similarly, in the theory of set-valued sheaves on $[0,1]\times[0,1]$, there is also a set $\{\star\}$, and instead of saying that continents like $\mathbf{North America}$ are elements of $\mathbf{Continents}$, we could have instead talked about maps from $\{\star\}$ to $\mathbf{Continents}$ and relationships between them.

Now, in normal set theory, $\{\star\}$ has only two subsets: itself and the empty set.  But that proof depends on excluded middle (since it goes by asking whether or not $\star$ is in a given subset), so if we drop it, it’s no longer necessarily true.  Indeed, in this logic, there is a subset of $\{\star\}$, call it $\mathbf{BorneoIsAContinent}$, that is not the empty set and not $\{\star\}$.  Furthermore, there is a map, $\mathbf{Borneo}$, from $\mathbf{BorneoIsAContinent}$ to $\mathbf{Continents}$.  The fact that this map has domain $\mathbf{BorneoIsAContinent}$ instead of $\{\star\}$ represents the conditional nature of Borneo’s existence as an element of $\mathbf{Continents}$.

Just as with the equality hypotheses, we can represent relationships between conditional existences: for example, if Greenland is a continent whenever Borneo is, we have a map from $\mathbf{BorneoIsAContinent}$ to $\mathbf{GreenlandIsAContinent}$.  If there are at least 7 continents whenever Borneo exists, we have a map from $\mathbf{BorneoIsAContinent}$ to $\{\star\mid\textrm{there are at least 7 continents}\}$.

Toposes were invented in the service of algebraic geometry (see here for a good account of the history of this topic).  However, I think they also provide a beautiful account of how set theory can take account of fuzzy concepts.  See here for more on this notion of variable sets.