You are on page 1of 20

School of Mathematical Sciences MAT 3044 Discrete Mathematics

CHAPTER 1 LOGIC

When mathematician wishes to provide a proof for a given situation, he or she must use a
system of logic. The logic of mathematics is applied to decide whether one statement follows
from, or is a logical consequence of, one or more other statements. Some of the rules that
govern this process are described in this chapter. We shall use these rules in proofs throughout
subsequent chapters.
1.1 Basic Connectives and Truth Tables
In the development of any mathematical theory, assertions are made in the form of sentences.
Such verbal or written assertions, called statements or propositions, are declarative sentences
that are either true of false, but not both.
For example, the following statements, and we use the lowercase letters of the alphabet p, q
and r to represent these statements:
p: MAT 3044 is offered as an elective subject for BAS students.
q: Dr. Tan is the lecturer for the subject MAT 3044.
r: 2+3=6
On the other hand, we do not regard sentences such as the exclamation “What a beautiful
morning!” or the command “You must do your tutorial questions” as statements since they do
not have the truth values (true or false).
We must realise that a sentence such as
“The number x is an integer.”
is not a statement because its truth value (true of false) cannot be determined until a numerical
value is assigned for x. If x were assigned the value 7, the result would be a true statement.
However, if values such as ½, ⅓ (fractions), 2 (irrational numbers) or  are assigned, then
the statement is false. We shall encounter this type of situation again in the coming sections.
The preceding statements represented by p, q and r are considered to be primitive statements,
for there is no way to break them down into anything simpler. New statements can be obtained
from existing ones in two ways.
1. Transform a given statement p into the statement ~p, which denotes its negation and is read
as “not p”. For example, ~p for the statement above is “MAT 3044 is not offered as an
elective subject for BAS students. We do not consider the negation of a primitive statement
to be a primitive statement.
2. Combine two or more statements into a compound statement, using the following logical
connectives.
a) Conjunction: The conjunction of the statements p, q is denoted by p  q , which is read
as “p and q”. In our example the compound statement p  q is read “MAT 3044 is
offered as an elective subject for BAS students and Dr. Tan is the lecturer for the subject
MAT 3044.”

1
School of Mathematical Sciences MAT 3044 Discrete Mathematics

b) Disjunction: The expression p  q denotes the disjunction of the statements p, q and is


read as “p or q”. “MAT 3044 is offered as an elective subject for BAS students or Dr.
Tan is the lecturer for the subject MAT 3044” is a verbal translation for p  q .
(i) We use the word “or” in the inclusive sense here, that means, p  q is true when
one or the other of p, q is true or both p, q are true.
(ii) The exclusive “or” is denoted by p  q , and it is true only when either one or
p, q is true but not both.
c) Implication: We say that “p implies q” and write p  q to designate the statement,
which is the implication of q by p. Alternatively, we can also say (the list is not
exhaustive)
(i) “if p, then q” (ii) “q if p”
(ii) “p only if q” (iv) “p is sufficient for q”
(v) “q is necessary for p”
The example we have above, p  q is read as “If MAT 3044 is offered as an elective
subject for BAS students, then Dr. Tan is the lecturer for the subject MAT 3044.
d) Biconditional: The biconditional of two statements p, q, is denoted by p ↔ q, which is
read “p if and only if q”, or “p is necessary and sufficient for q”. The example we have,
p ↔ q is “MAT 3044 is offered as an elective subject for BAS students if and only if
Dr. Tan is the lecturer for the subject MAT 3044. Note that often we use “iff” as an
abbreviation for “if and only if”.
In the foregoing discussion, we mentioned the circumstances under which the compound
statements p  q , p  q are considered true, on the basis of the truth of their components p,
q. This idea if the truth or falsity of a compound statement being dependent only on the truth
values of its components is essential. The following truth tables demonstrate the truth and
falsity of the negation and the different kinds of compound statements. We write “T” for true
and “F” for false.
p ~p p q pq pq pq p→q p↔q
T F T T T T F T T
F T T F F T T F F
F T F T T T F
F F F F F T T

All possible truth values are assigned in the tables. We note that if there are n primitive
statements then there are 2 n different combinations of truth values (rows) can be formed.
We see that the columns of truth values for p and ~p are the opposite of each other. The
statement p  q is true only when both p and q are true. The statement p  q is false only
when both p and q are false. As noted before, p  q is true only when exactly one of p, q is
true. For implication p  q , the result is true except when p is true and q is false. In other
word, p  q is false only a true statement leads to a false statement. However, we regard
p  q as true when both p and q are false. Finally, p ↔ q is only true when both p and q share
the same truth values.

2
School of Mathematical Sciences MAT 3044 Discrete Mathematics

Example 1.1
Let s, t and u denote the following primitive statements:
s: Ali goes out for a walk; t: The sun is out; u: It is raining
The following English sentences provide possible translations for the given compound
statements.
a) (t  ~ u )  s: If the sun is out and it is not raining, then Ali goes out for a walk.
b) t  (~ u  s ) : If the sun is out, then Ali goes out for a walk if it is not raining.
c) ~ ( s  (u  t ) : It is not the case that Ali goes out for a walk if and only it is raining or the
sun is out.
Next we work in reverse order and examine the logical notations for three given English
sentences.
d) “Ali will go out walking if and only if the sun is out”. In symbolic form this is s  t .
e) “If it is raining and the sun is not out, then Ali will not go out for a walk.” This compound
statement is denoted by (u  ~ t )  ~ s .
f) “It is snowing but Ali will still go out for a walk.” Now we come across a new connective
– namely, but. In our logic we shall follow the convention that the connectives but and and
convey the same meaning. Thus, this sentence may be represented as u  s .

Example 1.2
It is the Chinese New Year (CNY) festival and Annie will be attending several reunion dinners
during the festival. Ever conscious of her weight, she plans not to weigh herself until the 15th
day of CNY. Considering those dinners may put her on weights by then, she makes the
following resolution for the outcome of the 16th day of CNY: “If I weigh more than 50kg, then
I shall enrol in an exercise class”. Let p be “I weigh more than 50kg” and q be “I shall enrol
in an exercise class”. Then Annie’s statement is given by p  q . We shall consider the truth
values of all cases:
(i) Row 1 in the truth table for p  q where both p and q are true. On the 16th day, she
found herself weighs more than 50kg and she enrols in an exercise class, just as she
said she would. Here we consider p  q to be true.
(ii) Row 2 in the truth table for p  q where p is true and q are false. On the 16th day, she
found herself weighs more than 50kg but she makes no attempt to enrol in an exercise
class, a contradiction to her resolution. In other words, p  q is false.
(iii) Row 3 indicates that p is false but q is true. On the 16th day, she found herself not weighs
more than 50kg but she enrols in an exercise class. This is not a contradiction to her
resolution since the hypothesis is based on the fact that if her weight is more than 50kg.
In other words, p  q is true.
(iv) Row 4 where both p and q are false. This means that she is not more than 50kg and she
did not enrol in an exercise class. The implication has not violated her resolution and
therefore the compound statement is true.

3
School of Mathematical Sciences MAT 3044 Discrete Mathematics

Example 1.3
Be careful when using the symbols → and ↔. The implication and the biconditional are not
the same, as shown in the truth table above. In our daily conversation, however, we often find
situations where an implication is used when the intention actually calls for a biconditional.
For example, consider the following cases:
s → t: If you work hard, then you will get a good result.
This implication emphasizes that if students work hard then they will obtain a good result. It
does not indicate or tell what if the students don’t! It is incorrect to conclude that if you not do
work hard, then you will get a bad result (this is only true if s ↔ t, the case of biconditional).
However, as we will see later in the chapter, that the above implication is equivalent to its
contrapositive - if you do not get a good result, then you did not do your homework.

Example 1.4
We explore more compound statements (via truth table) formed by primitive statements.
p q pq p  ( p  q) ~p ~ pq p  (~ p  q )
T T T T F F F
T F T T F F F
F T T T T T F
F F F T T F F

Note that compound statements p  ( p  q ) (in the fourth columns) has all true values T and
p  (~ p  q ) has all false values F. We provide a special name for these special types of
compound statements.

A compound statement is called a tautology if it is true for all truth value assignments for its
component statements. If a compound statement is false for all such assignments, then it is
called a contradiction. Throughout this chapter we shall use the symbol T0 or T to denote any
tautology and F0 or F for contradiction. Note that a compound statement is said to be a
contingency if it is neither both.

Example 1.5
Based on Example 1.4, we see that p  ( p  q )  T and p  (~ p  q )  F . Note that we use
the notation “  ”, which means logically equivalent, and this will be discussed in the next
section.

4
School of Mathematical Sciences MAT 3044 Discrete Mathematics

1.2 Logical Equivalence and Logical Implication

Two statements s1 , s2 are said to be logically equivalent, and we write s1  s2 , when s1  s2


is a tautology, in other words, the truth values for each row of both statements agrees.
As a result of this concept we see that we can express the connective for the implication in
terms of negation and disjunction (see table below), that is,
p  q  ~ pq.

In the same manner, from the table we see that biconditional is equivalent to the following
p  q  ( p  q )  ( q  p )  (~ p  q )  (~ q  p )

p q pq q p ( p  q)  (q  p) pq ~ pq ~ q p (~ p  q )  (~ q  p )


T T T T T T T T T
T F F T F F F T F
F T T F F F T F F
F F T T T T T T T

Using the concepts of logical equivalence, tautology, and contradiction, we have the following
list of laws for the algebra of propositions.
The Laws of Logic
1. ~ (~ p )  p Double negations law
2. ~ ( p  q )  ~ p  ~ q De Morgan’s laws
~ ( p  q)  ~ p  ~ q
3. p  q  q  p Commutative laws
pq q p
4. p  ( q  r )  ( p  q )  r Associative laws
p  (q  r )  ( p  q)  r
5. p  (q  r )  ( p  q )  ( p  r ) Distributive laws
p  (q  r )  ( p  q)  ( p  r )
6. p  p  p Idempotent laws
p p  p
7. p  F  p Identity laws
pT  p
8. p  ~ p  T Inverse laws
p ~ p  F
9. p  T  T Domination laws
pF F
10. p  ( p  q )  p Absorption laws
p  ( p  q)  p

We can prove all the law via truth table. Some of the exercises are provided in tutorial. We
now turn to two examples involving the simplification of compound statements using the laws
provided above.

5
School of Mathematical Sciences MAT 3044 Discrete Mathematics

Example 1.6
To show that ( p  q )  ~ (~ p  q )  p by using the laws:

( p  q )  ~ (~ p  q )  ( p  q )  (~ (~ p ) ~ q ) De Morgan

 ( p  q)  ( p  ~ q) Double Negation

 p  (q  ~ q ) Distribution

 pF Inverse law

p Identity

Example 1.7
To show that ~ [(~ ( p  q )  r )  ~ q ]  q  r by using the laws:

~ [(~ ( p  q )  r )  ~ q ]  [( p  q )  r ]  q De Morgan, Double Negation

 [( p  q )  q ]  r Associative, Commutative

 qr Absorption

If p and q are arbitrary statements such that p  q  T , then we say that p is logically implies
q and we write p  q to denote this situation.

Example 1.8
To show that [ p  ( p  q )]  q , we verify that [ p  ( p  q )]  q  T via the following truth
table
p q pq p  ( p  q) [ p  ( p  q )]  q
T T T T T
T F F F T
F T T F T
F F T F T

Note that the above example is a rule of inference which is called the Modus Pones, or the Rule
of Detachment. The actual rule can be written in the tabular form
p
pq
q

6
School of Mathematical Sciences MAT 3044 Discrete Mathematics

Example 1.9
The following valid arguments show us how to apply the Rule of Detachment.
a) p: Lydia wins a RM 1 million lottery.
p q: If Lydia wins a RM 1 million lottery, Lydia will quit her job.
q : Therefore Lydia will quit her job.
b) p  q : If you love mathematics, then you take Discrete Math.
p: You love mathematics.
q : Therefore you take Discrete Math.

Example 1.10
A second rule of inference is given by the logical implication
[( p  q )  ( q  r )]  ( p  r ) .

In tabular form it is written


pq
qr
pr

This rule, which is referred to as the Law of the Syllogism, arises in many arguments. For
example:
p q: If the integer k is divisible by 8, then k is divisible by 4.

qr: If the integer k is divisible by 4, then k is divisible by 2.

pr: If the integer k is divisible by 8, then k is divisible by 2.

Example 1.11
The rule of inference called Modus Tollens is given by
pq
~q
~ p

This is follows from the logical implication [( p  q )  ~ q ]  ~ p . Modus Tollens comes from
Latin that can be translated as “Method of Denying”. For example,

p q: If n 2 is even then n is even.


~q: n is odd.
~ p: Therefore n 2 is odd.

7
School of Mathematical Sciences MAT 3044 Discrete Mathematics

Example 1.12
The following rule of inference arises from the observation that if p and q are both true
statements, then p  q is a true statement. Now suppose p and q occur in the development of
an argument. These statements may be results that are derived from earlier results. Then under
this circumstances the two statements can be combined into their conjunction p  q and this
new statement is used in later steps as the argument continues. We call this the Rule of
Conjunction.

We provide the following table to summarise several rule of inferences.


Rule of Inference Related Logical Implication Name of Rule
1. p [ p  ( p  q )]  q Rule of Detachment
pq (Modus Pones)

q
2. pq [( p  q )  (q  r )]  ( p  r ) Law of the Syllogism
qr
pr
3. pq [( p  q )  ~ q )]  ~ p Modus Tollens
~q
~ p
4. p ( p  q)  ( p  q) Rule of Conjunction
q
pq
5. pq [( p  q )  ~ p )]  q Rule of Disjunctive
~p Syllogism

q
6. ~ p  F0 ~ pFp Rule of Contradiction
p
7. pq pq  p Rule of Conjunctive
Simplification
p
8. p p  pq Rule of Disjunctive
Amplification
pq
9. pq ( p  q )  [ p  ( q  r )]  r Rule of Conditional Proof
p  (q  r )
r
10. pr ( p  r )  (q  r )  ( p  q )  r Rule of Proof by Cases
qr
 ( p  q)  r

8
School of Mathematical Sciences MAT 3044 Discrete Mathematics

1.3 Quantifiers
In section 1.1, we mentioned how sentences that involve a variable, such as x, need not be
statements. For example, the sentence “The number x + 2 is an even integer” is not necessarily
true or false unless we know what value is substituted for x. We refer to the sentence “The
number x + 2 is an even integer” as an open statement, which we defined as follow.
A declarative sentence is an open statement if
(1) it contains one or more variables, and
(2) it is not a statement, but
(3) it becomes a statement when the variables in it are replaced by certain allowable choices
When we examine the sentence “The number x + 2 is an even integer” in light of this definition,
we find it is an open statement that contains the single variable x. With regard to the third
element of the definition, in our earlier discussion we restricted the “certain allowable choices”
to integers. The allowable choices constitute what is called the universe or universe of discourse
for the open statement. The universe comprises the choices we wish to consider or allow for
the variable(s) in the open statement. The universe is an example of a set; a concept we shall
examine in some detail in the next chapter.
In dealing with open statements, we use the following notation:
The open statement “The number x + 2 is an even integer” is denoted by p(x) . Then ~ p ( x )
may be read “The number x + 2 is not an even integer”.
We shall use q ( x, y ) to represent an open statement that contains two variables. For example,
consider q ( x, y ) : The numbers y  2, x  y and x  2 y are even integers.

With p ( x ), q ( x, y ) we get the following results when we make some substitutions for the
variables x and y.
p(5) : The number 7 = 5 + 2 is an even integer. (False)

~ p (7 ) : The number 9 is not an even integer. (True)

q ( 4, 2) : The numbers 4, 2, and 8 are even integers. (True)

We also note that, for example, q (5, 2), q ( 4, 7) are false statements, whereas
~ q (5, 2), ~ q ( 4, 7 ) are true. Consequently, we see that for both p(x) and q ( x, y ) , some
substitutions result in true statements and others are not. Therefore, we can make the following
true statements.
(1) For some x, p(x) (is true).
(2) For some x, y , q ( x, y ) (is true).

Note that in this situation, the statements “For some x, ~ p ( x ) ” and “For some x, y, ~ q ( x, y ) ”
are also true. Since the statements “For some x, p(x) ” and “For some x, ~ p ( x ) ” are both true,
we realise that the second statement is not the negation of the first, even though the open
statement ~ p ( x ) is the negation of p(x) .

9
School of Mathematical Sciences MAT 3044 Discrete Mathematics

The phrases “For some x” and “For some x, y” are said to quantify the open statements p(x)
and q ( x, y ) , respectively. Many results in mathematics involve statements that are quantified
open statements. These two types of quantifiers, which are called the existential and the
universe quantifiers.
Statement uses existential quantifier “For some x”, which can also be expressed as “For at least
one x” or “There exists an x such that”. This quantifier is written in symbolic form as  x .
Hence the statement “For some x, p(x) ” becomes “  x p(x) ” or “  x  p (x ) ” where  means
“such that”. For the case of “For some x, y q ( x, y ) ”, we write it as “  x  y q ( x, y ) ” or simply
“  x, y q ( x, y ) ” or “  x, y  q ( x, y ) ”.

The universe quantifier is denoted by x and is read “For all x”, “For any x”, “For each x”, or
“For every x”, and it denoted as x p (x) . For the case of “For all x, y such that q ( x, y ) ”, we
write it as “  x  y , q ( x, y ) ” or simply “  x, y , q ( x, y ) ” or “  x, y  q ( x, y ) ”.

Example 1.13
Here the universe comprises all real numbers. The open statements p ( x ), q ( x ), r ( x ), s ( x ) are
given by

p( x) : x  0 r ( x) : x 2  3 x  4  0
q ( x) : x 2  0 s ( x) : x 2  3  0

Then the following statements are true


(i)  x   p ( x)  r ( x)
(ii)  x   p ( x )  q ( x )

The following statements are false


(iii)  x   q ( x )  s ( x )
(iv)  x   r ( x)  s( x)

We show that (iii) and (iv) by exhibit one counter example – that is, one value of x for which
it will show that the statement is false. For example (iii), take x = 1, then q (1) is true but s(1)
is false. For the case of (iv), if x is in between  3 and 3 , then r (x ) is true but s (x ) is false.

Now we make the following observations. Let p(x) denote any open statement (in the variable
x) with a prescribed nonempty universe (that is, the universe contains at least one member).
Then if x p (x) is true, so is  x p(x) , or

x p (x)   x p(x) .

However, it does not follow that if  x p(x) is true, then x p (x) is true in general. Hence,

 x p (x) .
 x p(x) 

10
School of Mathematical Sciences MAT 3044 Discrete Mathematics

Example 1.14
a) Let us consider the universe of all real numbers and examine the sentences:
(i) If a number is rational, then it is a real number.
(ii) If x is rational, then x is real.
We should agree that these sentences convey the same information but we should also question
whether the sentences are statements or open statements. In the case of sentence (ii) we at least
have the presence of the variable x. But neither sentence contains an expression such as “For
all”, or “For some”. Our one and only clue to indicate that we are dealing with universally
quantified statements here is the presence of the indefinite article “a” in the first sentence. In
situations like these the use of the universal quantifier is implicit as opposed to explicit. Let
p(x): x is a rational number and q(x): x is a real number. Then we see that (i) and (ii) are
somewhat informal ways of expressing the quantified statement x p ( x )  q ( x ) .

b) In any standard trigonometry textbook one often comes across the trigonometry identity

sin 2 x  cos 2 x  1 .
This identity contains no explicit quantification, and the reader must understand or be told that
it is defined for all real number x. When the universe of all real numbers is specified, then the
identity can be expressed by the quantified statement x such that sin 2 x  cos 2 x  1 .
c) Finally, consider the universe of all positive integers and the sentence
“The integer 41 is equal to the sum of two perfect squares”
Here we have one more example where the quantification is implicit – but this time the
quantification is existential. We may express the result here in a more formal manner as  x, y
such that 41  m 2  n 2 .

The next example demonstrates that the truth value of a quantified statement may depend on
the universe prescribed.

Example 1.15

Consider the open statement p( x) : x 2  1 .

a) If the universe consists of all positive integers, then the quantified statement x p (x) is true.

b) For the universe of all positive real numbers, however, the same quantified statement
1
x p (x) is false. The positive real number provides one of many possible counter examples.
2

c) For any arbitrary universe, the quantified statement  x p (x) is true.

11
School of Mathematical Sciences MAT 3044 Discrete Mathematics

We summarise and somewhat extend, in the following table, what we have learned on
quantifiers.
Statement When is it True? When is it False?
 x p (x) There is at least one x  a in the For every x  a in the universe, p(a) is
universe, p(a) is true. false.
x p (x) For every x  a in the universe, There is at least one x  a in the
p(a) is true. universe, p(a) is false.
 x ~ p( x) For at least one x  a in the For every x  a in the universe, p(a) is
universe, p(a) is false. true.
x ~ p ( x ) For every x  a in the universe, There is at least one x  a in the
p(a) is false. universe, p(a) is true.

Let p ( x ), q ( x ) be open statements defined for a given universe. Then p ( x ), q ( x ) are called
logically equivalent, and we write x p ( x )  q ( x) when the biconditional p ( a )  q ( a ) is
true for each replacement a from the universe. If the implication p ( a )  q ( a ) is true for each
a in the universe, then we write x p ( x )  q ( x ) and say that p(x) logically implies q (x) .
Observe in general, x p ( x )  q ( x) if and only if x p ( x )  q ( x ) and x p ( x )  q ( x) .

For open statements p(x) , q (x) defined for a prescribed universe, and the universally
quantified statement x p ( x )  q ( x) , we define:

a) The contrapositive of x  p ( x )  q ( x ) to be x  ~ q ( x )  ~ p ( x )
b) The converse of x  p ( x )  q ( x ) to be x  q ( x )  p ( x )
c) The inverse of x  p ( x )  q ( x ) to be x  ~ p ( x )  ~ q ( x )

Example 1.16
Given the conditional statement
“You are rich if you have something that money cannot buy”.
Write the contrapositive, the converse, and the inverse of the statement.
Set p as “you have something that money cannot buy” and q as “you are rich”.
Original statement: If p then q ( p  q) .

Converse (q  p) : You have something that money cannot buy if you are rich.

Inverse (~ p  ~ q) : You are not rich if you do not have something that money cannot buy.

Contrapositive: You do not have something that money cannot buy if you are not rich.
(~ q  ~ p)

12
School of Mathematical Sciences MAT 3044 Discrete Mathematics

Example 1.17
Let p(x) and q (x) are the open statements defined in the universe consists of all real numbers:
p(x) : x 3 q (x) : x  3

a) The statement x  p ( x )  q ( x ) is a false statement. For example, if x  5 , then p (5)


is true but q (5) is false. Consequently, p ( 5)  q ( 5) is false and therefore
x  p ( x )  q ( x ) is false.

b) We can express the converse of the given statement (in part (a)) as follows:
“Every real number greater than 3 has absolute value greater than 3”
In symbolic form this true statement is written x  q ( x )  p ( x ) .

c) The inverse of the given statement is also a true statement, in symbolic form we have
x  ~ p ( x )  ~ q ( x ) , which can be expressed in words by
“If the absolute value of a real number is less than or equal to 3,
then the number itself is less than or equal to 3”
And this is logically equivalent to the converse statement in part (b).
d) Here the contrapositive of the statement in part (a) is given by x  ~ q ( x )  ~ p ( x ) . This
false statement is logically equivalent to x  p ( x )  q ( x ) . In words, the statement can be
expressed by
“If a real number is less than or equal to 3, then so is its absolute value”

Together with p ( x ), q ( x ) as above, consider the open statement

r ( x) : x  3 ,

which is also defined for the universe of all real numbers.


e) The following four statements are all true:
Statement: x  p( x)  r ( x)  q( x) 
Contrapositive: x  ~ r ( x)  q ( x)   ~ p( x)
Converse: x  r ( x)  q( x)   p( x)
Inverse: x  ~ p( x)  ~ r ( x)  q( x) 

Since the statement and its converse are both true, x  p( x)  r ( x)  q( x)  is also true.

13
School of Mathematical Sciences MAT 3044 Discrete Mathematics

1.4 Logical Equivalences and logical implications involving Quantifiers


Quantifiers involving only one variable
Consider the open statements r ( x), s ( x) where the universe consists of all the integers:

r ( x) : 2 x  1  5 s ( x) : x 2  9

We see that the statement  x   r ( x)  s( x) is false because there is no one integer a such that
2a  1  5 and a 2  9 at the same time. However, we can find integers b (= 2) and c (  3 )
such that 2b + 1 = 5 and c 2  9 . Therefore,  x  r ( x )   x  s ( x) is true. This counter example
is enough to show that

 x   r ( x)  s( x) 
  x  r ( x )   x  s ( x)

where 
 is read “is not logically equivalent to”. It also demonstrates that

  x   r ( x )  s ( x )
 x  r ( x)   x  s( x) 

where 
 is read “is not logically imply”. So the statement
 x  r ( x)   x  s( x)    x   r ( x )  s ( x )

is not a tautology. Now we examine the statement

 x   r ( x)  s ( x)   x  r ( x )   x  s ( x) .

By the Rule of Conjunctive, we see that if  x   r ( x)  s( x) is true, then this implies that

r (c)  s(c)  r (c) and r (c)  s(c)  s(c) are true.


From the truth of r (c ) , we have the true statement  x  r (x ). Similarly, we obtain  x  s (x ) .
Subsequently,  x  r ( x )   x  s ( x) is a true statement whenever  x   r ( x)  s( x) is true, it
follows that

 x   r ( x)  s ( x)   x  r ( x )   x  s ( x) .

Arguments similar to the one above provide the logical equivalences and logical implications
listed below:
Logical Equivalence and Logical Implications for Quantified Statements in One Variable
 x   p ( x )  q( x)   x  p ( x )   x  q ( x )
 x   p ( x )  q ( x)    x  p ( x )   x  q ( x )
 x   p( x)  q ( x)   x  p ( x )   x  q ( x )
 x  p ( x )   x  q ( x )   x   p ( x)  q ( x)
~  x  p( x)   x  ~ p( x)
~  x  p( x)   x  ~ p( x)
~  x  ~ p( x)   x  p( x)
~  x  ~ p( x)   x  p( x)

14
School of Mathematical Sciences MAT 3044 Discrete Mathematics

Example 1.18
Here we find the negation of two statements, where the universe comprises all of the integers.
Let p(x) and q (x) be given by

p(x) : x is odd; and q (x) : x 2  1 is even.

The statement “If x is odd, then x 2  1 is even” can be symbolised as x  p ( x )  q ( x ) and


this is a true statement.
The negation of the statement x  p ( x )  q ( x ) is determined as follows:

~ x  p ( x )  q ( x )   x  ~  p ( x )  q ( x )
  x  ~ ~ p ( x)  q ( x) 
  x   p ( x)  ~ q ( x )

Quantifiers involving two variables


Because a mathematical statement may involve more than one quantifier, we continue this
section by offering some examples and making some observations on these types of statements.

Example 1.19
Let x and y be real numbers. The commutative law for the addition of real numbers can be
expressed
x y  x  y  y  x .

This statement may also be given as


y x  x  y  y  x .

Likewise, in the case of the multiplication of real numbers, we may write


x y  xy  yx or y x  xy  yx .

These two examples suggest the following general result. If p ( x, y ) is a two-variable open
statement, then x y  p ( x, y ) and y x  p ( x, y ) are logically equivalent, that is

x y  p ( x, y ) is true iff y x  p ( x, y ) is true;

and x y  p ( x, y ) is false iff y x  p ( x, y ) is false. Hence,

x y  p ( x , y )   y  x  p ( x , y ) .

Note that we often write (to shorten the notation) x, y  p ( x, y ) as a consequence of the above.
In general, the result is true for three or more variables.

15
School of Mathematical Sciences MAT 3044 Discrete Mathematics

Example 1.20
Consider the statement “There exist integers x, y such that x  y  6 ”. We may represent this
in symbolic form by
x y  x  y  6.

If we let p ( x, y ) denote the open statement x  y  6 , then an equivalent statement can be


given by  y  x  p ( x, y ) . In general,

 x  y  p ( x, y )   y  x  p ( x, y )

and this result is true for three or more variables as well. Again we shall use
 x, y  p ( x, y )

to abbreviate the above statement.

However, when dealing with statements involve with both existential and universe quantifiers
we have to be more careful. The next example illustrates this case.

Example 1.21
Let p ( x, y ) denote the statement “ x  y  17 ” where x and y are integers.

a) The statement  x  y  p ( x, y ) says that “For every integer x, there exists an integer an
integer y such that x  y  17 ”. This statement is true: once we select any x, the integer
y  17  x does exist. We realise that every different value of x gives rise to a different
value of y.
b) The statement  y  x  p ( x, y ) says that “There exists an integer an integer y such that for
every integer x, x  y  17 ”. This statement is not true: once we select a value of y, only
one value of x matches with y  17  x . The statement  y  x  p ( x, y ) is true means every
integer x would equal y  17  x , which is absurd.

Consequently, the statements


 x  y  p ( x, y ) and  y  x  p ( x, y )

are generally not logically equivalent.

16
School of Mathematical Sciences MAT 3044 Discrete Mathematics

Example 1.22
Let p ( x, y ), q ( x, y ), r ( x, y ) represent three open statements, with replacements for the variables
x, y chosen from some prescribed universes. What is the negation of the following statement?
 x  y  [ p ( x, y )  q ( x, y )  r ( x, y )]

We find that
~  x  y  [ p ( x, y )  q ( x, y )  r ( x, y )]
  x ~  y  [ p ( x, y )  q ( x, y )  r ( x, y )]
  x  y  ~ [ p ( x, y )  q ( x, y )  r ( x, y )]
  x  y  ~ [~  p ( x, y )  q ( x, y )  r ( x, y )]
  x  y  [ p ( x, y )  q ( x, y )  ~ r ( x, y )]

Note: Now suppose that we are trying to establish the validity of an argument (or a
mathematical theorem) for which
 x  y  [ p ( x, y )  q ( x, y )  r ( x, y )]

is the conclusion. Should we want to try to prove the result by the method of Proof by
Contradiction, we would assume as an additional premise the negation of this conclusion.
Consequently, our additional premise would be the statement

 x  y  [ p( x, y )  q ( x, y )  ~ r ( x, y )] .

17
School of Mathematical Sciences MAT 3044 Discrete Mathematics

TUTORIAL 1

Question 1
Which of the following sentences are proposition? What are the truth value of those that are
propositions?
a) Melaka is the capital of Melaka.
b) 2  3  4
c) sin 2   cos 2   1
d) sin  cos  1
e) Answer this question.
f) What time is it?
g) 4  x  5

Question 2
Given sin x  cos x  a , where a, x  ℝ and a is a fixed non-negative scalar. Determine the
range of a such that the equation is a proposition.

Question 3
What is the negation for each of these statements?
a) Ali has an iPhone X.
b) There is no pollution in Shah Alam.
c) 2  3  5
d) The girl is beautiful and smart.

Question 4
Let p and q be propositions
p: I bought a lottery ticket this week.
q: I won the million-ringgit jackpot.
Express each of these propositions as an English sentences.
a) ~ p b) p  q c) p  q d) p  q e) p  q
f) ~ p  ~ q g) ~ p  ~ q h) ~ p  ( p  q )

Question 5
Construct a truth table for each of these compound propositions.
a) p  ~ p b) p  ~ p c) ( p  q )  ( p  q ) d) ( p  q )  ( q  p )
e) p  p f) p  ~ p g) ( p  q )  ( p  ~ q ) h) p  (~ q  r )
i) (p  q )  (~ p  r ) j) ( p  q )  r   s

Question 6
Use truth tables to verify these equivalences.
a) p  T  p b) p  F  p c) p  T  T d) p  F  F
e) p  p  p f) p  p  p g) p  (q  r )  ( p  q)  ( p  r )

18
School of Mathematical Sciences MAT 3044 Discrete Mathematics

Question 7
Show that these compound propositions are logically equivalent.
a) ~ p  q and p  ~ q b) ( p  r )  (q  r ) and ( p  q )  r
c) ( p  r )  ( q  r ) and ( p  q )  r

Question 8
Show that the following rules are all logically implication.
a) Rule of Conjunction b) Rule of Contradiction c) Rule of Conditional Proof

Question 9
Use truth table to verify that each of the following is a logical implication.

a) ( p  q)  (q  r )  ( p  r ) b) ( p  q ) ~ q   (~ p)
c) ( p  q) ~ p   q d) ( p  r )  (q  r )  [( p  q)  r )]

Question 10
The dual of a compound proposition that contains only the logical operators  ,  , ~ is the
compound proposition obtained by replacing each negation by double negation,  by  , 
by  , T by F, and F by T. The dual of s is denoted by s  .
a) Find the dual of each of these compound propositions.
(i) p  ~ q  ~ r
(ii) ( p  F )  ( q  T )
b) Show that s    s when s is a compound proposition.

Question 11

Determine whether ( p  q)  (~ p  r )  (q  r ) is a tautology, contradiction or contingency.


What can you say about the above statement?

Question 12
The proposition p | q is defined as true when either p or q, or both, are false; and it is false if
otherwise. The proposition p  q is defined as true when both p and q are false; and it is false
if otherwise. Complete the following table and determine which of the propositions are
equivalence.
p q p|q pq ~  p  q ~  p  q
T T
T F
F T
F F

19
School of Mathematical Sciences MAT 3044 Discrete Mathematics

Question 13
Construct a truth table for Proposition 1 and Proposition 2 and determine if they are equivalent.

Proposition 1:  p  q    p  q 

Proposition 2:  p  q   q  p 

Question 14

Let P (x ) denote the statement “ x  x 2 ” where x is integer. What are these truth values?

(i) P ( 0) (ii) P (1) (iii) P ( 2 ) (iv) x  P (x ) (v) x  P (x )

Question 15
Determine the truth value of each of these statements if the universe is the set of all integers.
(i) n  n  1  n (ii) n  2n  3n (iii) n  n   n (iv) n  3n  4n

Question 16
Write the converse, contrapositive and inverse of the following statement.

“ x 2  0 only if x  0 ”.
Question 17
Given the conditional statement
“You are rich if you have something that money can’t buy”.
Write the contrapositive, the converse, and the inverse of the statement.

Question 18
For the following statements the universe comprises all nonzero integers. Determine the truth
value of each statement.
a) x, y  xy  1 b) x y  xy  1 c) x y  xy  1 d) x, y  xy  1

20

You might also like