Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Introduction to Logic
Kelvin Soh
Overview
This document details my attempt to solve some of the problems in Herbert
Endertons A Mathematical Introduction to Logic (2nd Edition) [1]. Its main
purpose is to facilitate my own learning. I have posted it online as a possible
resource for others also using the book. Itd be great if this document helps
anyone out in any form or fashion. Do feel free to email me if you have any
comments or to point out any errors (of which there will likely be plenty).
Sentential Logic
1.1
kelvinsjk@gmail.com, www.mathelement.com/about/
1.2
Truth Assignments
Let denote the wff given. Fix an arbitrary n. Let the number of is such
that v(Ai = F , 1 i n be k. We will prove the assertion by induction k,
0 k n.
For k = 0, we can prove inductively that v() = T . For k = 1, by
associativivity for , we can reorder the sentence symbols such that v(A1 ) =
F and v(Ai ) = T for all 2 i n. We can then prove inductively that
v() = F .
For k = 2j 1, 0 k n, we reorder the sentence symbols such that
v(Ai ) = F for all 1 i k and v(Ai ) = T for all k +1 i n (the notation
will be slightly different for k = n or k = n 1 but these can be handled in
a similar fashion.) By the induction hypothesis, v(A1 Ak1 ) = T
since k 1 is even. Then v(A1 Ak1 Ak ) = F since v(Ak ) = F .
It can then be proved inductively that v() = F .
For k = 2j, 0 k n, we reorder the sentence symbols such that
v(Ai ) = F for all 1 i k and v(Ai ) = T for all k +1 i n (the notation
will be slightly different for k = n or k = n 1 but these can be handled in
a similar fashion.) By the induction hypothesis, v(A1 Ak1 ) = F
since k 1 is odd. Then v(A1 Ak1 Ak ) = T since v(Ak ) = F .
It can then be proved inductively that v() = T .
14. Let S be the set of all sentence symbols, and assume that v : S
{F, T } is a truth assignment. Show there is at most one extension v
meeting conditions 0-5 listed at the beginning of the section.
The induction principle can be used to prove the result. Condition 0 will
ensure the validity of the base case while conditions 1-5 are used in the
inductive step.
15. Of the following three formulas, which tautologically imply which?
(a) (A B)
(b) (((A B) ((B A))))
(c) (((A) B) (A (B)))
By the method of truth tables, all three are tautologically equivalent.
1.3
A Parsing Algorithm
(D) (
Cases A and B have the desired property. By applying the inductive hypothesis, 0 has the desired property so case C is settled. For case D, is a wff
so it has an equal number of left and right parenthesis. Hence case D has
the desired property as well.
First-Order Logic
2.2
8. Assume that is a set of sentences such that for any sentence , either
|= or |= . Assume that A is a model of . Show that for any
sentence , we have |=A iff |= .
If |= , since A is a model of , |=A by definition.
If 6|= , |= by the property of . Since A is a model of , |=A
so 6|=A .
9. Assume that the language has equality and a two-place predicate symbol P . For each of the following conditions, find a sentence such that
the structure A is a model of iff the condition is met.
(a) |A| has exactly two members.
(b) P A is a function from |A| into |A|.
(c) P A is a permutation of |A|.
(a) xy(x 6= y z(z = x z = y)).
(b) xy(P xy z(P xz z = y)).
(c) xy(P xy z(P xz z = y)) yx(P xy z(P zy z = x)).
10. Show that
|=A v2 Qv1 v2 JcA K iff
|=A v2 Qcv2
(b) v2 v2 = v1 v2 .
(c) v1 + 1 = v2 . More formally, we can use (b) to replace the number 1.
(i.e. v3 (v4 v4 = v3 v4 v1 + v3 = v2 .)
(d) Let the successor relationship defined in (c) be denoted by S.
v3 (v4 Sv4 v3 v1 + v3 = v2 ).
12. Let R be the structure (R; +; ).
(a) Give a formula that defines in R the interval [0, ).
(b) Give a formula that defines in R the set {2}.
(c) Show that any finite union of intervals, the endpoints of which are
algebraic, is definable in R.
(a) v2 v1 = v2 v2 .
(b) 1 can be defined in the same way as in question 11b. Then the following
formula defines {2}: v1 = 1 + 1.
(c) Note that zero and all integers larger than 1 are definable in a manner
similar to question 11a and 12b respectively. The negative numbers can
be defined by v1 + a = 0 where a is a positive integer.
The ordering relation, {hm, ni|m n} can be defined by
v3 v4 (v3 = v4 v4 v1 + v3 = v2 ).
The ordering relation {hm, ni|m < n} can be defined using by
(v1 v2 v1 6= v2 ).
Each algebraic number can be identified as the k-th smallest root of a
polynomial of degree n with integer coefficients where k n. (Note that
such a polynomial is not unique but exists by definition of an algebraic
number) Without loss of generality we may assume there are no roots of
multiplicity greater than 1 in the polynomial.
Let k be the string representing the formula (an vkn +an1 vkn1 +. . .+a0 )
where ai represents the integer coefficients of an n-th degree polynomial
with integer coefficients and vkn is shorthand for multiplying vk n times.
An algebraic number x can then be defined by
v1 . . . vn1 (1 . . . n ) (v1 < . . . < vk1 < x < vk < . . . < vn1 ).
An interval with algebraic endpoints can then be defined using the ordering relations and the algebraic numbers.
A finite union of such intervals can then be defined by disjunctions of
the formulas representing each interval.
12
where ai 0. We define
h(n) = 2a3 3a2
pap
p prime
p6=2,3
13
16. Give a sentence having models of size 2n for every positive integer n,
but no finite models of odd size.
Following the suggestion of the book, we let R and B be one-place predicate
function symbol. Let be the formula
symbols and f be a one-place
x (Rx Bx) (Rx Bx) . This formula asserts that in a given structure
A, all elements in |A| are either red or blue.
Next, let be the formula x(Bx Rf x Rx Bf x). This asserts
that f reverses the color of the elements.
Finally, let be the formula xyf y = x. This asserts that f is a
permutation. (i.e. the range of f = the domain of f .)
Let be the sentence . No finite model of odd size is a model
of as f is a color-reversing permutation. If |A| is odd, it is impossible for
the range of f to be the domain of f . On the other hand, for every positive
integer n, a model of size 2n exists where R and B are equal sized partitions
of |A|.
17. (a) Consider a language with equality whose only paraameter (aside
from ) is a two-place predicate symbol P . Show that if A is finite
and A B, then A is isomorphic to B.
Once again we follow the suggestion from the book. Let the size of
|A| be n. Let be the formula (v1 6= . . . 6= vn ) and be the formula
vn+1 (v1 6= vn+1 . . . vn 6= vn+1 ). This asserts that there are n and only
n elements in |A|.
Let s be a variable assignment such that s(v1 ) 6= . . . 6= s(vn ). For each
1 i, j n, let i,j be the formula P vi vj if |=A P vi vj [s] and P vi vj if
6|=A P vi vj [s].
^
Now let be the formula i,j and the sentence v1 . . . vn .
i,j
14
Consider the function h : |A| |B| defined h(ai ) = sb (vi ). h is welldefined, one-one and onto because of the preceding discussion. h is a homomorphism as i,j is true in both A and B. Thus, A is isomorphic with B.
20. Assume that the language has equality and a two-place predicate symbol P . Consider the two structures (N; <) and (R; <) for the language.
(a) Find a sentence true in one structure and false in the other.
xy (x 6= y x < y) is true in (N; <) but not (R; <).
xyz (x < y x < z < y) is true in (R; <) but not in (N; <).
27. Assume that the paremeters of the language are and a two-place
predicate symbol P . List all of the non-isomorphic structures of size 2.
|A| = {a, b}.
0 elements in P .
1 element in P : {a,
n a}, {a, b}. o n
o n
o n
o
2 elements in P : {a, a}, {b, b} , {a, a}, {a, b} , {a, a}, {b, a} , {a, b}, {b, a} .
n
o n
o
3 elements in P : {a, a}, {a, b}, {b, a} , {a, a}, {a, b}, {b, b} .
4 elements in P .
28. For each of the 4 structures, give a sentence true in that structure and
false in the other three:
(R; ).
(R ; ) where R is the set of non-zero reals.
(N; +).
(P; + ) where P is the set of positive integers.
(0 a = 000 ): xy x y = x is true in (R; ).
(Existence of inverse element): xy x y = 1 is true in (R ; ).
Remark: 1 can be defined by the formula v z v = v.
(Existence of identity element and 0+0=0): x (y x y = y x x = x) is
true in (N; +).
(Non-existence of identity element): xy x y = y is true in (P; + ).
15
References
[1] Enderton, H. B., A Mathematical Introduction to Logic (2nd Edition), Hardcourt/Academic Press, 2001.
[2] Raghavan, D. National University of Singapore (NUS) MA4207: Mathematical Logic, 2013/2014 Semester 2.
About me
I am currently (2014) reading my Masters (coursework) in Mathematics at
the National University of Singapore (NUS), having earlier graduated with
a degree in chemical engineering.
My interests include graph theory, combinatorics and teaching.
There are bound to be flaws (typo or conceptual) and I will be very happy
to hear about them at kelvinsjk@gmail.com.
16