The normal square root function can be considered to be multi-valued.

Let’s momentarily accept the heresy of saying that the square root of a negative number is , so that our function will be total.

How can we represent the situation of this branching “function” topologically?

One thing we could do is just take the graph of the multivalued “function” itself in the subspace topology of , which is topologically just like this:

This has the downside that, at the origin (the place where all three lines meet), it doesn’t really represent the fact that the graph of the original multivalued “function” was the union of two genuine single-valued functions: There is no neighborhood of the origin which is functional in any way.

But what about this topological space? (The two filled-in dots represent points which are present in the space, the non-filled-in dot represents a point missing from the space. The border is not part of the space.)

Here, the open sets are given by a basis consisting of: open sets on either of the three branches: i.e., like this

and this:

and this:

as well as open sets of this form:

and this form:

(Note that this space isn’t Hausdorff!).

This space (call it ) *represents* the fact that the original graph was the union of two genuine single-valued functions in the following sense: There is a function, , from to the -axis (i.e., ) such that for all points , there is an open set such that restricted to is a homeomorphism to an open set in . That is, every point in has a neighborhood such that the inverse of restricted to that neighborhood *is *a function.

The space as defined above is (sort of) a sheaf over . More precisely, it’s an étalé space: To restate the definition above more generally, an étalé space over a topological space is a topological space together with a function such that, for all , there is an open set such that is open and is a homeomorphism. In general, for any , the set is called the *stalk* over . Note that, as a subspace of , any stalk is discrete.

As another example along similar lines, gluing the domains of the different branches of the complex logarithm gives rise to a sheaf over : (This image is from Wikipedia and is by Jan Homann.)

In this case, is the space pictured, is (or ), and is projection along the depicted vertical direction. Note that this represents how the domains of the various branches of the complex logarithm fit together; this graph is *not* a depiction of the complex logarithm or any branch of the complex logarithm, which is a function from to , and thus hard to draw!

The two examples I gave were of natural functions which happen to be multivalued, but there are much more general examples of étalé spaces. For example, for any topological spaces and , there is a sheaf of *all* continuous functions from to ! The étalé space corresponding to this sheaf would have, for each , the stalk equal to the set of germs of continuous functions from to at . (See here for more).

## First-Order Modal Logic

And now we’ll switch to a seemingly totally different topic.

A modal logic is a logic that contains an operator , representing necessity, and , representing possibility. If is a proposition, then should be interpreted as the proposition “It is necessary that ”, or “ is necessarily true”, and should be interpreted as the proposition “It is possible that is true”.

The operators and are dual to each other: is equivalent to and similarly is equivalent to (if you think about it, this actually makes real-life sense, as well as just sense in logic-land!).

There are a number of different axiomatic systems for propositional modal logic; here we’ll just consider S4, which was invented by C. I. Lewis in the early 20th century. It has the following rules:

- For all propositions , is a theorem.
- For all propositions , is a theorem.
- For all propositions and , is a theorem.
- For any proposition , if is a theorem, then is a theorem. (Note that this does
*not*say that is a theorem; if it did, the whole thing would be trivial!).

In the middle of the 20th century, Saul Kripke invented possible-worlds semantics for modal logics. The idea is that there is a set of possible worlds and at each possible world , each atomic proposition may hold or not, independently of the other possible worlds. Furthermore, there is a relation between possible worlds; should be interpreted as “World considers world possible”. The whole setup is called a *Kripke frame*.

This gives a semantics for modal logic: For any proposition , holds at a world if there is some world that considers possible such that holds at . Similarly, holds at a world if holds at *every* world that considers possible.

Somebody showed (probably Kripke, but I’m not sure) that the class of Kripke frames where is reflexive and transitive corresponds to S4, in the sense that all theorems of S4 hold in all such Kripke frames, and everything which holds in all such Kripke frames holds in S4.

Note that the accessibility relation is completely clear-cut and discrete: given a world , you know exactly what worlds it considers possible. But, interpreting as a measure of “closeness” of two worlds, observe that topology gives us a more nuanced version of what “closeness” means: we think of the topology on , for example, as defining what “closeness” means on , even though no two fixed real numbers are actually close to one another! (At least, they’re not close to one another in any absolute sense.)

It turns out we can incorporate this sense of “closeness” into the semantics for modal logic as well. We’ll define a topological Kripke model this way: We again have a set of possible worlds, but instead of defining a relation between them, we define a topology on . As above, we say, for each possible world , which of the atomic propositions hold at that world. Note that this is equivalent to defining arbitrary subsets of . In general, we’ll let be the set of worlds at which proposition holds. Then we can define to be the interior of and to be the closure of . In other worlds, holds at a world there is some open set such that holds at every world , and holds at a world if for all open sets there is some such that holds at .

It turns out that this semantics, too corresponds to S4, in the sense that all theorems of S4 hold in all topological Kripke models and all propositions which hold in all topological Kripke models are theorems of S4. (I’m not exactly sure who first came up with this. I looked at the Wikipedia article and some of its links, but I couldn’t quite figure out who was the first. It seems Tarski was involved somehow anyway.)

So far, the logics we’ve considered have all been propositional, but you can easily add first-order logic to S4 to get FOS4. There have been a number of proposals for how to define a semantics for FOS4. In 2008, Steve Awodey and Kohei Kishida proposed that the right generalization of topological semantics for S4 to first-order semantics for FOS4 was to use étalé spaces!

Here’s an example of how it works. Consider the following étalé space:

The top space, , is homeomorphic to . The bottom space, , is the circle . The projection is given by .

We can put a first-order structure on this étalé space by considering each stalk for to be a first-order universe, just as when defining regular semantics for first-order logic.

We can define the interpretation of relation symbols, function symbols, and constant symbols more or less arbitrarily: The only restrictions are that the selection of the interpretation of any particular constant symbol from each stalk must be done in a continuous manner, and there is a similar continuity condition on the interpretation of function symbols.

It will turn out that the interpretation of a formula with free variables will be a subset of , where is the th fibered product over of with itself. (This just means that, e.g., is the étalé space where the stalk of any is .). In particular, as in the regular topological semantics, the interpretation of a sentence will be a subset of .

The crucial step, as before, is that the interpretation of is the interior of the interpretation of , and the interpretation of is the closure of the interpretation of , although now the interiors and closures are being taken in the topology of .

To see how this works, suppose that in our example we define the relation on each stalk by restricting the usual ordering on . Then it is true in our model that (since it is true in every stalk), but it is not true that . The reason is that in this stalk:

the red dot is the minimum element of the stalk, but if you push it to the right just a little bit, that’s no longer true. Intuitively, it’s the minimum element, but not *necessarily *so.

Awodey and Kishida prove that, as in the other cases, this sheaf semantics corresponds to FOS4 in that every theorem of FOS4 holds in all sheaf models, and everything which holds in all sheaf models is a theorem of FOS4. (They actually prove something a bit stronger than that.)

### Other Uses of Sheaves in Logic

This relationship between sheaves and logic came up relatively recently, but there is a longer and more well-known relationship which I’ll just mention briefly, namely through toposes. Using topos theory, you can interpret the class of sheaves over a topological space as a category similar to the category of sets. The interpretation is actually fairly similar to the interpretation here, but instead of interpreting modal logic, higher-order (non-modal) logic is interpreted. It turns out that the set of truth values in this interpretation is the set of open subsets of (whereas in the modal interpretation just given, the truth values could be arbitrary subsets of ). One of the remarkable things about this is that the set of open subsets of can *itself *be interpreted as an étalé space over , which is what allows the equivalent of power sets to be taken in this category.

For more information on this, see Sheaves in Geometry and Logic.

Could you justify the heresy by saying you’re plotting Re( sqrt( x )) ?