Polyadic Boolean Algebras
Posted by John Baez
I’m getting a bit deeper into model theory thanks to some fun conversations with my old pal Michael Weiss… but I’m yearning for a more category-theoretic approach to classical first-order logic. It’s annoying how in the traditional approach we have theories, which are presented syntactically, and models of theories, which tend to involve some fixed set called the domain or ‘universe’. This is less flexible than Lawvere’s approach, where we fix a doctrine (for example a 2-category of categories of some sort), and then say a theory and a ‘context’ are both objects in this doctrine, while a model is a morphism
One advantage of Lawvere’s approach is that a theory and a context are clearly two things of the same sort — that is, two objects in the same category, or 2-category. This means we can think not only about models , but also models , so we can compose these and get models . The ordinary approach to first-order logic doesn’t make this easy.
So how can we update the apparatus of classical first-order logic to accomplish this, without significantly changing its content? Please don’t tell me to use intuitionistic logic or topos theory or homotopy type theory. I love ‘em, but today I just want a 21st-century framework in which I can state the famous results of classical first-order logic, like Gödel’s completeness theorem, or the compactness theorem, or the Löwenheim–Skolem theorem.
Paul Halmos’ polyadic Boolean algebras may come close to doing what I want!
- Paul R. Halmos, Polyadic Boolean algebras, Proc. Natl. Acad. Sci. USA 40 (1954), 296–301.
Let me try to translate his idea into more modern language. I may screw up and get a concept that’s less useful, and I may not get exactly his concept. (These are two separate issues.)
The idea is roughly this. For any finite set , which we think of as a ‘set of variables’, we have a Boolean algebra consisting of ‘predicates whose free variables are in the set ’.
For example, we might build these Boolean algebras freely, starting with a binary predicate and a unary predicate . Then
since these are what we we can build from and using the operations of Boolean logic and no variables: here and are the logical constants ‘true’ and ‘false’. We have
and so on. Similarly
Next, we want to include the ability to substitute of variables. For example, if I take the function
I want to be able to take any predicate involving the free variables and and get a predicate with as its only free variable, obtained by substituting for (since ) and also substituting for (since (.) This should give a map of Boolean algebras
In my example, this map would send to , and so on.
So far what we’ve got is a functor
We could generalize this to a functor
if we wanted. This would be useful if we were studying infinitary logic, which allows formulas with infinitely many free variables. But let’s not go there! Not now, anyway.
Instead, I want to get quantifiers into the game. Here we can use Lawvere’s idea on quantifiers as adjoints to substitution. Each Boolean algebra is a poset, hence a category; similarly each map of Boolean algebras is a functor. So, we can demand of
that for each in , the functor has both a left and right adjoint. I’m hoping that this is a reasonably good concept of a “theory of first-order classical logic”.
Just as a sanity check, if we’re doing the example above and we take to be the obvious inclusion, what’s the left adjoint of ? For example, what happens if we apply this left adjoint to ? We should get some predicate such that
for every unary predicate in . And you can see that
does the job. So the left adjoint to ‘putting a new variable into our stock of variables’ is ‘existential quantification with respect to ’. The right adjoint should similarly give universal quantification.
So we seem to be getting quantifiers in our logic just by demanding that has a left and right adjoint when is an injection. This reminds me of something I heard about yesterday at SYCO4: Alexander Kurz was talking about nominal sets, and he said something like “the Schanuel topos is equivalent to the category of presheaves on the category of finite sets and injections”. I don’t understand what this means (unless it’s a definition), but it seems relevant.
So — slight change of tack here — let’s look at functors
where each has both a left and right adjoint. Maybe classical first-order logic is the study of the category with such functors as objects, and natural transformations as morphisms. Let’s optimistically call this category , just for now. We call an object in here a theory and a morphism a model of in .
We can describe theories syntactically using generators and relations. That is, we can take a theory freely generated by some predicates, and then impose some equations, e.g. equations saying that some predicates are true (they equal ) to get a more interesting theory. For example, we can write down the axioms of first-order Peano arithmetic this way and get a theory .
We can also describe theories more ‘semantically’, for use as ‘contexts’. For example, suppose I take some set as my ‘universe’. Then for any finite set , I can take
where is the contravariant power set functor. This is covariant, and I think it does what I want, though I’m worried about covariance and contravariance. Namely: is the set of all -ary relations on .
Then I believe a model of with universe , as normally defined in model theory, is the same as what I’m calling a model of in , meaning a morphism in .
It seems to be working, but I haven’t carefully checked. Am I making a mistake? Has this already been studied?
(I feel sure one or the other of those will be true.)
Also: what happens if we instead look at functors
where each has both a left and right adjoint? I haven’t checked, but I have a feeling that this is about first-order logic with equality.
And finally, just by the way, we can reformulate a functor
as a presheaf on taking values in Stone spaces. This is sort of cute.
Re: Polyadic Boolean Algebras
There is a syntax error after “For example, if I have a function…”