# Section 5: Sentences of QL

In this section, we provide a formal deﬁnition for a well-formed formula (wﬀ) and sentence of QL.

## Expressions

There are six kinds of symbols in QL:

 predicates with subscripts, as needed $$A$$,$$B$$,$$C$$,...,$$Z$$ $$A$$1,$$B$$1,$$Z$$1,$$A$$2,$$A$$25,$$J$$375,... constants with subscripts, as needed $$a$$,$$b$$,$$c$$,...,$$w$$ $$a$$1,$$w$$4,$$h$$7,$$m$$32,... variables with subscripts, as needed $$x$$,$$y$$,$$z$$ $$x$$1,$$y$$1,$$z$$1,$$x$$2,... connectives ¬,&,∨,→,↔ parentheses ( , ) quantiﬁers ∀,∃

We deﬁne an expression of Ql as any string of symbols of QL. Take any of the symbols of QL and write them down, in any order, and you have an expression.

## Well-formed formulae

By deﬁnition, a term of ql is either a constant or a variable.

An atomic formula of ql is an n-place predicate followed by n terms.

Just as we did for SL, we will give a recursive deﬁnition for a wﬀ of QL. In fact, most of the deﬁnition will look like the deﬁnition of for a wﬀ of SL: Every atomic formula is a wﬀ, and you can build new wﬀs by applying the sentential connectives.

We could just add a rule for each of the quantiﬁers and be done with it. For instance: If $$\mathcal{A}$$ is a wﬀ, then ∀x$$\mathcal{A}$$ and ∃x$$\mathcal{A}$$ are wﬀs. However, this would allow for bizarre sentences like ∀x∃xDx and ∀xDw. What could these possibly mean? We could adopt some interpretation of such sentences, but instead we will write the deﬁnition of a wﬀ so that such abominations do not even count as well-formed.

In order for ∀x$$\mathcal{A}$$ to be a wﬀ, $$\mathcal{A}$$ must contain the variable x and must not already contain an x-quantiﬁer. ∀xDw will not count as a wﬀ because ‘x’ does not occur in Dw, and ∀x∃xDx will not count as a wﬀ because ∃xDx contains an x-quantiﬁer

1. Every atomic formula is a wﬀ.
2. If $$\mathcal{A}$$ is a wﬀ, then ¬$$\mathcal{A}$$ is a wﬀ.
3. If $$\mathcal{A}$$ and $$\mathcal{B}$$ are wﬀs, then ($$\mathcal{A}$$ & $$\mathcal{B}$$), is a wﬀ.
4. If $$\mathcal{A}$$ and $$\mathcal{B}$$ are wﬀs, ($$\mathcal{A}$$∨$$\mathcal{B}$$) is a wﬀ.
5. If $$\mathcal{A}$$ and $$\mathcal{B}$$ are wﬀs, then ($$\mathcal{A}$$ →$$\mathcal{B}$$) is a wﬀ.
6. If $$\mathcal{A}$$ and $$\mathcal{B}$$ are wﬀs, then ($$\mathcal{A}$$ ↔ $$\mathcal{B}$$) is a wﬀ.
7. If $$\mathcal{A}$$ is a wﬀ, $$\mathcal{x}$$ is a variable, $$\mathcal{A}$$ contains at least one occurrence of $$\mathcal{x}$$, and $$\mathcal{A}$$ contains no $$\mathcal{x}$$-quantiﬁers, then ∀$$\mathcal{x}$$$$\mathcal{A}$$ is a wﬀ.
8. If $$\mathcal{A}$$ is a wﬀ, $$\mathcal{x}$$ is a variable, $$\mathcal{A}$$ contains at least one occurrence of $$\mathcal{x}$$, and $$\mathcal{A}$$ contains no $$\mathcal{x}$$-quantiﬁers, then ∃$$\mathcal{x}$$$$\mathcal{A}$$ is a wﬀ.
9. All and only wﬀs of QL can be generated by applications of these rules.

Notice that the ‘$$\mathcal{x}$$’ that appears in the deﬁnition above is not the variable $$x$$. It is a meta-variable that stands in for any variable of QL. So ∀$$xAx$$ is a wﬀ, but so are ∀$$yAy$$, ∀$$zAz$$, ∀$$x$$4$$Ax$$4, and ∀$$z$$9$$Az$$9.

We can now give a formal deﬁnition for scope: The scope of a quantiﬁer is the subformula for which the quantiﬁer is the main logical operator.

## Sentences

A sentence is something that can be either true or false. In SL, every wﬀ was a sentence. This will not be the case in QL. Consider the following symbolization key:

UD: people
Lxy: $$x$$ loves $$y$$
b: Boris

Consider the expression $$Lzz$$. It is an atomic forumula: a two-place predicate followed by two terms. All atomic formula are wﬀs, so $$Lzz$$ is a wﬀ. Does it mean anything? You might think that it means that $$z$$ loves himself, in the same way that $$Lbb$$ means that Boris loves himself. Yet $$z$$ is a variable; it does not name some person the way a constant would. The wﬀ $$Lzz$$ does not tell us how to interpret $$z$$. Does it mean everyone? anyone? someone? If we had a $$z$$-quantiﬁer, it would tell us how to interpret $$z$$. For instance, ∃$$zLzz$$ would mean that someone loves themselves.

Some formal languages treat a wﬀ like $$Lzz$$ as implicitly having a universal quantiﬁer in front. We will not do this for QL. If you mean to say that everyone loves themself, then you need to write the quantiﬁer: ∀$$zLzz$$ In order to make sense of a variable, we need a quantiﬁer to tell us how to interpret that variable. The scope of an $$x$$-quantiﬁer, for instance, is the part of the formula where the quantiﬁer tells how to interpret $$x$$.

In order to be precise about this, we deﬁne a bound variable to be an occurrence of a variable $$\mathcal{x}$$ that is within the scope of an $$\mathcal{x}$$-quantiﬁer. A free variable is an occurance of a variable that is not bound.

For example, consider the wﬀ ∀$$x$$($$Ex$$∨$$Dy$$) → ∃$$z$$($$Ex$$ → $$Lzx$$). The scope of the universal quantiﬁer ∀$$x$$ is ($$Ex$$∨$$Dy$$), so the ﬁrst $$x$$ is bound by the universal quantiﬁer but the second and third $$x$$s are free. There is not $$y$$-quantiﬁer, so the $$y$$ is free. The scope of the existential quantiﬁer ∃$$z$$ is ($$Ex$$ → $$Lzx$$), so both occurrences of $$z$$ are bound by it.

We deﬁne a sentence of QL as a wﬀ of QL that contains no free variables.

## Notational conventions

We will adopt the same notational conventions that we did for SL (p. 30.) First, we may leave oﬀ the outermost parentheses of a formula. Second, we will use square brackets ‘[’ and ‘]’ in place of parentheses to increase the readability of formulae. Third, we will leave out parentheses between each pair of conjuncts when writing long series of conjunctions. Fourth, we will leave out parentheses between each pair of disjuncts when writing long series of disjunctions.