Logic Chapter 2
Logic Chapter 2
1. Introduction
First order logic is a much richer system than sentential logic. Its interpre-
tations include the usual structures of mathematics, and its sentences enable
us to express many properties of these structures. For example, consider the
following English sentence:
Everything greater than 0 has a square root.
This can be interpreted, for example, in arithmetic on Q, the set of rational
numbers, where it is false, and in arithmetic on R, the set of real numbers,
where it is true. How could we express this in a formal language? The
following is at least a first approximation.
For all x (0 < x → there is some y such that x = y · y).
A formal language that could express this would need symbols for
• quantifiers for all and there exists,
• variables, like x and y, which range over the elements of the set we
are talking about,
• functions, like ·,
• relations, like = and <,
• constants, like 0, which name fixed elements of the domain,
• sentential connectives,
• parentheses.
We will use the symbols ∀ for for all and ∃ for there exists. Thus the
above sentence could be written as
∀x 0 < x → ∃y(x = y · y)
We will normally take formalization one step further. We allow inter-
pretations which interpret <, for example, as any binary relation on the
domain, not just something that “looks” like an order. To emphasize this
we use neutral symbols, like R, F , and c for the relations, functions, and
constants of the language. The only exception is = whose interpretation
is fixed. Thus, fully formalized, the sentence we are looking at would be
written as
∀x R(c, x) → ∃y(x = F (y, y))
An interpretation for this would specify what set of objects is referred to
(the domain of the interpretation), and how to interpret the symbols c, R, F .
One such interpretation has domain Z, the set of all integers, and interprets
c as 2, R(x, y) as “x divides y”, and F as +. Note that the sentence is true
in this interpretation.
Note that this sentence is built from pieces which are not themselves
sentences, for example ∃y(x = F (y, y)). In any interpretation this defines
1
2 CHAPTER 2. FIRST ORDER LOGIC
a subset of the domain, namely the set of all x in the domain such that
x = F (y, y) for some y in the domain. In the interpretation with domain R
with c, R, F interpreted as 0, < .·, this is the set of all non-negative reals. In
the interpretation in the preceding paragraph, this is the set of even integers.
Such an expression will be called a formula, and we will need to know how
to interpret formulas before defining when a sentence is true.
The reader should consider these examples also for the structures B =
(N, ≤), C = (Z, <), D = (Q, <), and E = (N, >). In particular, show that
{0} is also definable in B and E, but not by the same formula as in A.
But if t is a variable y (or contains a variable) this can fail — let ϕ(x) be
∃yR(x, y); then ϕ(y) is ∃yR(y, y) and it is easy to see that (∀x∃yR(x, y) →
∃yR(y, y)) is not valid. But this is the only difficulty — if no new occurrence
of y in ϕ(y) is bound (for example if y does not occur bound in ϕ(x)) then
|= (∀xϕ(x) → ϕ(y)). More generally, |= (∀xϕ(x) → ϕ(t)) provided no new
occurrence in ϕ(t) of a variable in t is bound.
Finally, if ϕ also has z1 , . . . , zk free, so ϕ can be written as ϕ(x, z1 , . . . , zk ),
then we have |= (∀xϕ(x, z1 , . . . , zk ) → ϕ(t, z1 , . . . , zk )) under the same cir-
cumstances.
2. (∀x¬P (x) → ¬P (x)) → (P (x) → ¬∀x¬P (x)) – axiom (1) where the
tautology is (A → ¬B) → (B → ¬A)
3. (P (x) → ¬∀x¬P (x))
This establishes that ⊢ (P (x) → ¬∀x¬P (x)), which may look more fa-
miliar as ⊢ (P (x) → ∃xP (x)).
We can show that every deducible formula is valid exactly as in sentential
logic (see Theorem 8.1 in Chapter 1).
Theorem 9.1. If ⊢ ϕ then |= ϕ.
We also use deductions from hypotheses.
Definition 9.4. Let Γ ⊆ F mL . Then a deduction from Γ is a finite sequence
ϕ1 , . . . , ϕn of formulas of A such that for every i ≤ n one of the following
holds:
(i) ϕi ∈ (Γ ∪ ΛL ),
(ii) there are j, k < i such that ϕi follows from ϕj and ϕk by modus
ponens.
We say that ϕ is deducible from Γ, notation Γ ⊢ ϕ, iff there is a deduction
from Γ whose last formula is ϕ.
We have the following fact, corresponding to the rule of modus ponens.
Lemma 9.2. Let Γ ⊆ F mL and let ϕ, ψ ∈ F mL . Assume that Γ ⊢ ϕ and
Γ ⊢ (ϕ → ψ). Then Γ ⊢ ψ.
We also have soundness for deductions from sets of sentences.
Theorem 9.2. Let Σ ⊆ SnL and let ϕ ∈ F mL . If Σ ⊢ ϕ then Σ |= ϕ.
and thus Γ ⊢ ∀xϕi by modus ponens. The inductive step uses a logical
axiom of form (3).
11. Expressability
What can we say about a structure using sentences of first order logic?
What can we define in a structure using formulas of first order logic? We
give some examples for the language L whose only non-logical symbol is a
binary relation symbol R.
An important class of L-structures is the class of linear orders. This
includes the familiar structures (N, <), (Z, <), (Q <, ), and (R, <). The
class of linear orders can be axiomatized by the set Σl.o. containing the
following L-sentences:
∀x¬R(x, x),
∀x∀y∀z (R(x, y) ∧ R(y, z)) → R(x, z) ,
∀x∀y R(x, y) ∨ x = y ∨ R(y, x) .
Other properties of linear orders follow from these three axioms. For exam-
ple, Σl.o. |= ∀x∀y R(x, y) → ¬R(y, x) .
This definition of linear order gives what are sometimes called strict linear
orders – non-strict linear orders include (N, ≤), etc.
Linear orders may differ on other sentences of L — for example, any
two of (N, <), (Z, <), and (Q, <) can be distinguished by a sentence of L.
However, (Q, <) and (R, <) both satisfy precisely the same sentences of L.
In fact, if we define Σd.l.o. to be Σl.o. together with the sentences
∀x∃yR(x, y),
∀y∃xR(x, y), and ∀x∀y R(x, y) → ∃z(R(x, z) ∧ R(x, y)) then we have the
following remarkable result, whose proof is beyond the scope of these notes.
Theorem 11.1. For every θ ∈ SnL either Σd.l.o. |= θ or Σd.l.o. |= ¬θ.
Corollary 11.1. Let A and B be L-structures and assume that they both
model Σd.l.o. . Then for every θ ∈ SnL we have A |= θ iff B |= θ.
If we add to Σl.o. sentences saying “there is a first element, every element
has an immediate successor, and every element except the first has an imme-
diate predecessor” we obtain the set Σn.l.o. which axiomatizes the sentences
true on (N, <).
Theorem 11.2. For every θ ∈ SnL we have (N, <) |= θ iff Σn.l.o. |= θ.
Of course there are other structures which are also models of Σn.l.o., for
example (N r {0}, <) and ({k ∈ Z : k ≤ 0}, >). More importantly, there are
also models A of Σn.l.o. which contain “infinite” elements, that is, elements
a such that {b ∈ A : RA (b, a) holds} is infinite. This will be a consequence
of the Completeness Theorem proved in the next Chapter.