You are on page 1of 12

COS3761/202/1/2019

Tutorial Letter 202/1/2019


Formal Logic 3

COS3761
Semester 1

School of Computing

Bar code
SOLUTION TO ASSIGNMENT 2

Questions 1 and 2

Keep in mind that in most cases

 the implication connective  needs to be involved when  occurs in a


sentence, and that

 the conjunction connective  needs to be involved when  occurs in a


sentence.

If you encountered major difficulties with questions 1 and 2, we suggest that you work
through the relevant chapters of the prescribed book of Formal Logic 2 again.

Upper case and lower case letters

Very unfortunately the constant symbols in Table 2 in tutorial letter 101 are given as
uppercase letters instead of lower case letters. They should have been e, g, r, h, and i,
respectively. We write them correctly in the solutions below, but do not subtract marks if
you used the upper case letters in your assignment. But please remember that constant
symbols should be written as lower case letters in the examination. Predicate symbols, on
the other hand, should start with an upper case letter.

QUESTION 1

Question 1.1

 (P(e, i)  M(i, h))  x ((C(x)  M(i, x))   W(i))

"Except when ..." may be taken as "If it is not the case that ...". The left hand side of the
implication indicates that it is not the case that Eric plays for Injas or that Injas play against
Harlequins. The right hand side states “if Injas play against any sport club, they do not
win”. The x connective is needed because all clubs should be included. Please note that
brackets play an important role in this sentence.

Question 1.2

x (T(x)  ((S(x)  R(x))   (S(x)  R(x))))

The predicate logic sentence starts with “x (T(x)  …“ because of the phrase “every
teenager” in the English sentence. There are equivalent forms of the right hand side of ,
for example ((S(x)   R(x))  ( S(x)  R(x))).

2
COS3761/202/1/2012

Question 1.3

x (C(x)  M(h, x)  W(h))  y (P(y, h)  P(b(y), h))

 Note how “only” if is translated: C(x)  M(h, x)  W(h) is to the left of the
implication.
  (i.e. “for all”) is needed because of “any club” in the English sentence.
  (i.e. “there exists”) is used because of “at least one …” in the English sentence.

Question 1.4

x (T(x)  S(x)   y (C(y)  P(x, y)))


or
x (T(x)  S(x)  y (C(y)   P(x, y)))

Note that “but” is translated with . Also note the two possible ways to translate “does not
play for any club”: either using the “there exists” connective () or using the “for all”
connective (). Please make sure that you understand this.

Question 1.5

P(b(r), i)  P(g, i)   P(r, i)  x (C(x)  P(r, x))

Question 1.6

x (R(x)  (P(x, i)   P(e, i)))

Note again how “only if” is translated.

QUESTION 2

Question 2.1

All clubs have teenagers that play for them.

Question 2.2

This question was not correctly stated, so we gave every student the 2 marks. The
sentence should have read as follows with the English translation below:

Predicate logic: ¬ x (C(x)  y (C(y)  M(x, y)  W(x)))


English: Not all clubs win every match.

Question 2.3

3
If all rugby players play for Harlequins, there is a club for which all soccer players play.

Question 2.4

Eric or Radebe plays rugby and Radebe’s brother or Gail’s brother plays soccer.

Question 2.5

This question was not correctly stated, so we did not mark it and gave every student the 2
marks. The sentence should have read as follows with the English translation below:

Predicate logic: x ((C(x)  M(i, x))  W(i))  x (C(x)  M(h, x)  W(h))


English: If Incas win all their matches, there is a club against which Harlequins win.

QUESTION 3

Look at pages 99 and 100 where terms and formulas are defined.

3.1 P(f(c), x): Well-formed formula.

3.2 f(P(c, x)): Not a term or a wff, because a predicate (P in this case) may not
be the argument of a function (f in this case).

3.3 x Q(f(x), c)  x P(x, x): Well-formed formula.

3.4 y: Term

3.5 x y (Q(x)  P(y, x)): Not a term or a wff, because Q should have two
arguments.

3.6 P(x, Q(x, y)): Not a term or a wff, because a predicate (P in this case) may not
have a predicate (Q in this case) as argument.

3.7  f(x): Not a term or a wff, because a connective may not be put in front
of a function.

4
COS3761/202/1/2012

QUESTION 4

Question 4.1 

 z

x y
Q

P P
x y z

free free bound


x y x y

bound free free bound

The root of the tree is , the main connective of


(x P(x, y)  y P(x, y))  z Q(x, y, z).
We indicate the free and bound variables at the leaves of the tree. Make sure that you
understand it.

Question 4.2.1 φ[f(y) / x]

There are two free occurrences of x in φ. If we substitute it by f(y), there will be no problem
at the second free occurrence of x (because it does not fall within the scope of y or y)
but a problem does occur at the first free occurrence of x because it falls within the scope
of y. We should first rename all the bound occurrences of y in φ before doing the
substitution. Suppose we rename y by u. Then the first step would be
(x P(x, y)  u P(x, u))  z Q(x, y, z)
and after the substitution step we will have
φ[f(y) / x] = (x P(x, y)  u P(f(y), u))  z Q(f(y), y, z)
(Note that the bound occurrence of x is not substituted.)

Question 4.2.2 φ[f(z) / y]

There are two free occurrences of y in φ. If we substitute it by f(z), there will be no problem
at the first free occurrence of y (because it does not fall within the scope of z or z) but a
problem does occur at the second free occurrence of y because it falls within the scope of
z. We should first rename all the bound occurrences of z in φ before doing the
substitution. Suppose we rename z by u. Then the first step would be

5
(x P(x, y)  y P(x, y))  u Q(x, y, u)
and after the substitution step we will have
φ[f(z) / y] = (x P(x, f(z))  y P(x, y))  u Q(x, f(z), u)

Question 4.2.3 φ[f(x) / z]

There are no free occurrences of z in φ. Because only free occurrences of a variable are
substituted, the formula stays unchanged, thus
φ[f(x) / z] = (x P(x, y)  y P(x, y))  z Q(x, y, z)

Questions 5 to 8 Models

 Note the errata given on page 3 of this tutorial letter.


 Models are explained in your textbook in section 2.4.1.
 We also explain models in more detail and give several examples in tutorial
letter COS3761/102/3/2012. Please work through this material.

QUESTION 5

x (S(x)  y Q(x, y))


x ¬ Q(x, x)

We are given that that the universe of concrete values A is the set of all integers greater
than 3. There are many correct answers. We give two examples of correct models.

First model:
The universe of concrete values A is the set of all integers greater than 3.
S(x): “x is divisible by 5”
Q(x, y): “y is greater than x”
If we interpret S and Q as above, both formulas are true.

Another model:
The universe of concrete values A is the set of all integers greater than 3.
S(x): “x is smaller than 100”
Q(x, y): “y is equal to 2 times x”
If we interpret S and Q like that, both formulas are true.

QUESTION 6

x (¬ R(x, x)  y R(x, y))


Again there are many models that may be given. We give two models in both cases.

True: A model M where the sentence is true:


A: the set of integers
RM: We interpret R(x, y) as “x < y”

6
COS3761/202/1/2012

Another model M where the sentence is true:


A: all female twins
RM: We interpret R(x, y) as “x and y are sisters”

False: A model M where the sentence is false:


A: the set of integers
RM: We interpret R(x, y) as “x = y”
(In this case the first conjunct is always false, making the sentence false.)

Another model M where the sentence is false:


A: all people
RM: We interpret R(x, y) as “x and y are sisters”
(In this case the second conjunct is not always true, making the sentence false.)

QUESTION 7

We are given the formula


x (R(x, x)  y ¬ R(x, y))
and the model
A = {a, b, c, d}
RM = {(a, a), (a, b), (a, c), (b, a), (b, b), (b, c), (b, d)}

No, the model M does not satisfy the sentence. We show it as follows:
We see that (b, b)  RM. For the formula to be true, there should exist a y so that (b, y) is
not an element of RM. However, (b, x)  RM for all elements x of A (namely for x equal to
a, b, c and d).

QUESTION 8

Question 8.1

x y S(x, y) ├ y x S(x, y)

Again there are many correct answers. We give one example of a mathematical model and
one example of a non-mathematical model.

Mathematical model:
A: all integers
SM: We interpret S(x, y) as “x is 2 times y”
The formula on the left evaluates to true but the formula on the right evaluates to false.

Non-mathematical model:
A: all people
SM: We interpret S(x, y) as “x and y are the same age”
The formula on the left evaluates to true but the formula on the right evaluates to false.

7
Question 8.2

x (R(x)  Q(x)) ├ x (R(x)  Q(x))

There are many correct answers. We give one example of a mathematical model and one
example of a non-mathematical model.

Mathematical model:
A: all integers
RM: We interpret R(x) as “x is odd”
QM: We interpret Q(x) as “x is even”
The formula on the left evaluates to true but the formula on the right evaluates to false.

Non-mathematical model:
A: all people
RM: We interpret R(x) as “x is taller than 1 metre”
QM: We interpret Q(x) as “x is equal to or shorter than 1 metre”
The formula on the left evaluates to true but the formula on the right evaluates to false.

QUESTION 9

Dear Student

Please make sure that you understand these proofs. Note how the rules are applied. We
explain some aspects below. If something baffles you, work through the rules as they are
explained in the textbooks of both Formal Logic 2 and Formal Logic 3 and also in tutorial
letter 102 (where you will also find solutions to some exercises). If it is still not clear, send
me an e-mail, stating your specific problem and I will try to clear it up.

Question 9.1 Proof of x (P(x)  Q(x)) ├ (x ¬ Q(x))  (x ¬ P(x))

1 x (P(x)  Q(x)) premise

2 x ¬ Q(x) assumption

3 x0
4 P(x0)  Q(x0) x e 1
5 ¬ Q(x0) x e 2

6 P(x0) assumption
7 Q(x0)  e 4, 6
8  ¬ e 5, 7

9 ¬ P(x0) ¬ i 6-8

10 x ¬ P(x) x i 3-9

11 (x ¬ Q(x))  (x ¬ P(x))  i 2-10


8
COS3761/202/1/2012

The goal consists of a sentence having the implication  as main connective. That is why
we assume the left hand side of the implication, namelyx ¬ Q(x), in line 2 at the
beginning of a subproof. The subproof ends in line 10 with the right hand side of the
implication, namely x ¬ P(x ). Then then  is introduced directly outside the subproof in
line 11 and the scope of the subproof, namely 2-10, is cited in the rule.

The elimination rule for  is used in lines 4 and 5, inside a subproof where the fresh
variable x0 is available. This variable is used in both formulas. It is hopefully quite clear.

You should pay special attention to the  introduction rule – cited in line 10:
 The rule is cited outside the subproof consisting of lines 3 to 9 that starts with the
introduction of the free variable x0 and
 the sentence that is derived, is the sentence on which that subproof (lines 3 to 9)
ends but with x attached to its beginning and x0 replaced by x.

The ¬ e rule was called the  Intro rule in Formal Logic 2 but the requirements are the
same, of course.

Question 9.2 Proof of x (P(x)  Q(x)) ├ x P(x)  x Q(x)

1 x (P(x)  Q(x)) premise

2 x0 P(x0)  Q(x0) assumption [x0/x]


3 P(x0)  e1 2
4 x P(x) x i 3
5 Q(x0)  e2 2
6 x Q(x) x i 5
7 x P(x)  x Q(x)  i 4, 6

8 x P(x)  x Q(x) x e 1, 2-7

Many students have difficulty with the application of the x elimination rule. In many cases
when the premise starts with x, i.e. when the premise is x , we need to use the x
elimination rule. That means that we need to introduce a fresh variable and then assume 
with x substituted by the fresh variable. This is done in line 2 with x0. The x elimination
rule is cited in line 8, after we have exited the subproof. The formula that is derived in line
8 is the same formula on which the subproof ends in line 7. This formula should no longer
contain x0.

Also note the lines where the x introduction rule is used, namely lines 4 and 6, where x0 is
replaced with x and x is attached to the beginning of the formula . We are still inside the
subproof that starts in line 2.

9
Question 9.3 Proof of x y (S(x, y)  S(y, x)) ├ x y S(x, y)

1 x y (S(x, y)  S(y, x)) premise

2 x0 y (S(x0, y)  S(y, x0)) assumption [x0/x]

3 y0 S(x0, y0)  S(y0, x0) assumption [y0/y]

4 S(x0, y0) assumption


5 y S(x0, y) y i 4
6 x y S(x, y) x i 5

7 S(y0, x0) assumption


8 y S(y0, y) y i 7
9 x y S(x, y) x i 8

10 x y S(x, y)  e 3, 4-6, 7-9

11 x y S(x, y) y e 2, 3-10

12 x y S(x, y) x e 1, 2-11

This proof looks more complicated than it is.

 We use two nested subproofs in order to introduce two free variables so that we
may use the x and y introduction rules and later, outside the subproofs, the x
and y elimination rules. Look at the comments in question 9.2 and compare the
application of the  rules.
 Inside the above-mentioned nested subproofs we have two sub-subproofs (4 – 6
and 7– 9) so that the  e rule may be cited in line 10. Remember, in order to use
the  e rule, there should be two earlier subproofs ending on the same formula,
one starting with the assumption of the first disjunct and the other starting with the
assumption of the second disjunct. In this case we have S(x0, y0)  S(y0, x0) in line
3. So the first subproof starts with the assumption of S(x0, y0) and the second
subproof starts with the assumption of S(y0, x0). Both subproofs end on x y S(x,
y). This is then the formula that is deduced in line 10 by using the  e rule.

10
COS3761/202/1/2012

Question 9.4 Proof of ¬ x ¬ P(x) ├ x P(x)

1 ¬ x ¬ P(x) premise

2 ¬ x P(x) assumption

3 x0

4 P(x0) assumption
5 x P(x) x i 4
6  ¬ e 2, 5

7 ¬ P(x0) ¬ i 4-6

8 x ¬ P(x) x i 3-7
9  ¬ e 1, 8

10 ¬ ¬ x P(x) ¬ i 2-9
11 x P(x) ¬ ¬ e 10

This shortish proof may pose a few problems. Note the following:

 We start a subproof in line 2 with the assumption of ¬x P(x). We actually want to
prove a formula that is the negation of ¬x P(x), so we try to derive  (line 9) and
then use the ¬ i rule (line 10).
 Because the assumed formula does not start with x, but with the negation ¬, we
cannot use the x elimination rule on ¬x P(x).
 A new subproof is started in line 3 with the choice of a free variable x0 and another
new subproof is started in line 4 with the assumption of P(x0). The idea is to try to
derive  so that ¬ P(x0) can be derived. Why? The reason is that the premise
contains ¬ P(x) and we would like to use the x introduction rule to attach x to it.
 Thus we derive  in line 6 and close the inner subproof, then derive ¬ P(x0) in line 7
and close the next subproof, and then use the x i rule in line 8.
 In line 9  is introduced and the premise is cited in the ¬ e rule. (As mentioned
before, the ¬ e rule was called the  Intro rule in Formal Logic 2.)

11
Question 9.5 Proof of x (P(x)  Q(x)) ├ ¬ (¬ x P(x)  ¬ x Q(x))

1 x (P(x)  Q(x)) premise

2 ¬ x P(x)  ¬ x Q(x) assumption


3 ¬ x P(x)  e1 2
4 ¬ x Q(x)  e2 2

5 x0
6 P(x0)  Q(x0) x e 1

7 P(x0) assumption
8 P(x0) copy 7

9 Q(x0) assumption
10 x Q(x) x i 9
11  ¬ e 4, 10
12 P(x0)  e 11

13 P(x0)  e 6, 7-8, 9-12

14 x P(x) x i 5-13
15  ¬ e 3, 14

16 ¬ (¬ x P(x)  ¬ x Q(x)) ¬ i 2-15

This proof is fairly straight-forward.

 In line 2 (the first line of a subproof) we assume the negation of the goal and in line 15
(the final line of the subproof) we derive . The ¬ i rule is then used in line 16 to derive
the goal.
 A free variable is chosen in line 5 (the first line of a subproof) and the x i rule is used
in line 14 immediately after the subproof has been exited, deriving the formula in the
last line of the subproof (line 13) with x attached to it and x0 replaced by x.
 In order to use the  e rule, two subproofs (lines 7 to 8 and lines 9 to 12) are necessary
– see question 9.3 above.

©
UNISA 2012

12

You might also like