The WFFs we have studied so far only capture logical statements of a very simple form. Very commonly we want to work with more complex statements, especially those that depend on some kind of parameter or variable. Here are some examples.
There exists a rational number $x$ with ${x}^{2}=2$.
For every natural number^{2}^{2} 2 A natural number is a non-negative whole number. $n$ there exists a natural number $m$ with $m>n$.
For all real numbers $m$ there exists a real number $n$ such that for all real numbers $x$ greater than $n$ it holds that $f(x)$ is greater than $m$.
This kind of statement is especially common in analysis, but they arise everywhere in mathematics. Propositional calculus doesn’t have a way of talking about statements that depend on a variable, and might be true for some values, or all values, or no values that variable could take. It also has no way to talk about functions or relations. The logical theory we’re going to learn about that can deal with statements like this is called first order logic or predicate calculus.
In propositional calculus we had WFFs. The corresponding thing in first order calculus is called a first order formula.
When we studied propositional calculus, we were able to give a precise definition of a WFF. Doing something similar in first order logic is much more complicated, so we won’t do that (if you want to know how, read chapter 4 of the book by Goldrei mentioned in the further reading section at the end of this chapter, or take MATH0037 in year 3). Instead we are going to list the ingredients used to write first order formulas and give some examples.
Here is a simple example of a first order formula:
$$\forall x\exists yR(x,y)$$ |
The intended meaning of this is “for all $x$, there exists a $y$, such that $x$ and $y$ are related by the relation $R$.” At the moment, this is like a WFF in that it isn’t true or false — we need more information (what sort of thing are the $x$s and $y$s? What is the relation $R$?) to decide that.
First order formulas are made up of
quantifiers $\forall $ and $\exists $,
the logical connectives $\mathrm{\neg},\wedge ,\vee ,\u27f9$ and brackets,
variable symbols $x,y,z,\mathrm{\dots}$, and
relation symbols $P,Q,R,\mathrm{\dots}$
The quantifiers $\forall $ and $\exists $ are known as the universal quantifier and the existential quantifier). Formulas that contain $\forall x\mathrm{\dots}$ are interpreted to mean “for all $x$, …” and formulas that contain $\exists x\mathrm{\dots}$ are interpreted to mean “there exists an $x$ such that ….”
We write $R(x,y)$ to indicate that $x$ and $y$ are related by some relation $R$. A two-variable relation is a property of two things that can be true or false, for example $\u2a7d$ and $\ne $ and $=$ are relations on the real numbers: for every two real numbers $x$ and $y$, the statements $x\u2a7dy$ and $x\ne y$ and $x=y$ are either true or false.
We allow relations on any number of things. A one-variable relation $R(x)$ is just a true or false property of a single thing $x$ (for example, “$x$ is even”), a three-variable relation $R(x,y,z)$ is a true or false property of three things (for example, “$x+y$ equals $z$”), and so on.
The three statements in Example 1.9.1 correspond to first order formulas
$\exists xP(x)$ (“there exists a rational number $x$ with ${x}^{2}=2$”)
$\forall n\exists mQ(n,m)$ (“for every natural number $n$ there exists a natural number $m$ with $m>n$”)
$\forall m\exists n\forall x(P(x,n)\u27f9Q(x,m))$ (“for all $m$ there exists an $n$ such that for all $x$ greater than $n$, $f(x)$ is greater than $m$.”)
Turning the first order formula into the statement in brackets is called giving an interpretation for the formula.