The language of zeroth-order logic
Individual constants
We now have most of what we need to specify a very important logical language we will be working with, the language of zeroth-order logic, denoted . The alphabet of consists, first, of infinitely many symbols called individual constants or names. These may be represented by indexing a single symbol with the natural numbers, as if we had a list. Like this:
You can read this as: (‘cee one’) is the first constant, (‘cee two’) is the second constant, (‘cee three’) is the third constant, and so on. (The indices, in order, here would be , , , and so on.) Clearly, we cannot list all of the constants (for each ), just as we cannot list all the natural numbers. That would take an infinitely long paper, and let’s not talk about the time involved! This is why we have the three dots , implying it goes on forever. More succinctly, we may say: is a constant for every natural number .
Note also that the use of here is completely arbitrary. I chose it because it is the first letter in the word ‘constant’, but I could have chosen or . On the other hand, once we specify that we use , we have to stick with it. In other words, the choice of is arbitrary, but using afterwards is not arbitrary, since we explicitly chose it over other alternatives.
Predicates
Second, similar to constants, we also have infinitely many symbols called predicates in our alphabet. These will be denoted by (like , but in a different font). In fact, these predicates come with an additional index called their arity, denoting the number of arguments they each take (see below). So really, for each natural number , there are infinitely many predicates for that natural number (arity) . This might be a bit confusing at first, so let’s look at some examples.
First, the infinitely many predicates of arity can be represented: Then, the infinitely many predicates of arity can be represented: So really, the list goes on infinitely not just horizontally, but vertically too! So in full generality:
Just as before, this may be represented a lot more succintly by simply saying: is a constant for each pair of natural numbers . In other words, no matter what natural number you choose for and , substituting it for and in will get you a predicate of the language. Sometimes, we may say is a -place predicate.
It is important to note that in a predicate like , the number is called its arity, and the number is called its index. For example, though may look like the power or exponent, this is just because of the similar notation. In reality, these two ideas are not related in any way, and should not be confused.
Exercise 2.24. Decide for the following symbols whether they are a constant or a predicate. If they are a predicate, identify their arity.
The connectives and the rest
Just like with the language , simpler expressions will be combined together to form more complex expressions using special symbols (similar to the , , and signs). We call these symbols connectives, for obvious reasons. Table 2.1 lists the four connectives we will be using. Note that each symbol comes with a fixed arity, like our predicates. The table also includes, in scare quotes, the closest natural language approximation for the meaning of these symbols. For now (and perhaps altogether), this is irrelevant.
Symbol | Name | Arity |
---|---|---|
conjunction, ‘and’ | 2 | |
disjunction, ‘or’ | 2 | |
conditional, ‘if-then’ | 2 | |
negation, ‘not’ | 1 |
You may already know some or all of these connectives by their name, but perhaps not by their specific symbol (e.g., instead of , & instead of ). As noted when talking about alphabetic variants previously (see p. ), what the exact symbols of the alphabet are do not really matter, only the role they play. On the other hand, most contemporary writings on logic use these symbols for the connectives, as opposed to some of the older variants, so our choice is not entirely arbitrary.
Finally, we will keep using the left and right parentheses ‘’ and ‘’, along with the comma symbol ‘’. Thus:
Alphabet of : The alphabet of consists of the following: for each natural number the constant , for each pair of natural numbers and a predicate (of arity ), the connectives , the left ‘’ and right ‘’ parentheses, and the comma ‘’.
The formulas of
Now that we have our alphabet, we can look at how our formulas are built up. Just as with some of the other languages we considered, not any sequence of symbols will qualify as a formula. Our base rule looks like this:
This is an extremely precise formulation of our base rule, and thus can be rather confusing at first. However, it really isn’t very complicated, for all it says is that if you take any predicate with arity , then you need to have individual constants following it in order for it to be a formula. In other words, any predicate wears on its sleeves the number of individual constants it demands – namely, many! Note however that these individual constants need not be distinct. For example, for , we may write just as well as .
Exercise 2.25. Determine if the following are (atomic) formulas of the language . In each case, explain your reasoning.
After our atomic formulas are defined, we can give our usual productive rule, which enables us to form more complex, i.e., ‘non-atomic’ formulas iteratively.
Productive Rule of : if and are formulas of , then the following are also formulas of :
-
;
-
;
-
;
-
.
Of course, and are variables, which can denote (as noted) any formula of , both atomic and non-atomic (complex).
Exercise 2.26. Determine whether the following expressions are formulas of the language . If not, explain why, and how they could be made into formulas of the language.
Analyzing formulas; again
As before, we can now start analyzing the possible formulas of the language , checking whether they are in fact well-formed formulas of the language, and how they can be constructed. We previously saw two ways of doing this, one linear, the other making use of trees. These two ways are both applicable to formulas of . In general, is a formula of the language if, and only if, it has a linear derivation and a tree derivation. Thus, if an expression cannot be derived, it is not a formula of , but if it is a formula of , you must be able to derive it somewhow.
As an example, let’s analyze the formula:
From bottom to top, linearly, we can show that this is indeed a formula of the language as follows:
(1) | (BR) | ||
(2) | (BR) | ||
(3) | (BR) | ||
(4) | (PR:1) | ||
(5) | (PR:2) | ||
(6) | (PR:4, 5) | ||
(7) | (PR :3, 6) |
From top to bottom, using a tree and visualizing its structure, we can do it as follows:
As before, we can also ask about the main operator for each formula. The main operator is always the one introduced from the previous level or levels. Here:
-
The formulas , , and are atomic, and have no operator;
-
The main operator of and is ;
-
The main operator of is ;
-
The main operator of is .
Exercise 2.27. Derive the following formulas using either the linear method or the tree method. In each case, determine what the main operator of the formulas is.
Why the weird typeface?
You may be wondering why we are using this weird typeface where a simple looks like this: ; and a simple looks like this: . This is because as we move forward, we will start using , , and some other letters to simplify our formulas if it does not matter at that moment which exact formula of the language we are talking about. This often happens when we want to talk about a class of formulas sharing the same structure. Thus, they will serve a separate, but very important, purpose.
It is important that you do not mix the notation freely! In logic, different ways of writing the same thing may have a different meaning. For example, , , and will all mean different things. You should be careful which is used at any one point (see immediately below for a distinction!).
Variables like and are usually called metavariables, emphasizing that they are not part of the language, but outside of it. You may think of here and the natural numbers. When we want to talk about some natural number or other, we use , even though is not a (representation of a) natural number itself (it is not a formula of ). Similarly, when we want to talk about some predicate or other, we may use the uppercase , and when we want to talk about some constant or another, we may use the lowercase .
For example, we may represent a set of atomic formulas , meaning all formulas such that they start with for some , and continue with the required three (not necessarily distinct) constants , , . That is, any formula of form: for some , , , . We may also write something like , which would correspond to the class of all formulas for some , . Clearly, these specifications are painful, hence the simplification.
Though these variables are arbitrary, just like , , , etc., you should make sure they don’t clash in a given context. Thus, using something like is bad, because the two clearly denote two distinct classes of predicates, one -place, one -place.