Professional Documents
Culture Documents
3 Logic MTH1114
3 Logic MTH1114
3 Logic MTH1114
UNIT 3
FUNDAMENTALS OF LOGIC
Zaharin Yusoff (Prof Dr)
SCHOOL
UNIT 3 – Fundamentals of Logic
UNIT 3 – Fundamentals of Logic
Assertions, called statements (or propositions), are declarative sentences that are
either true or false – but not both.
Examples
1) 1+1=2
2) 2+2=3
3) Toronto is the capital city of Canada.
4) Washington D.C. is the capital city of USA.
(1) and (4) are true while statements (2) and (3) are false.
Biconditional: p↔q
q ↔ s: I attend classes if and only if I love Discrete Mathematics
Examples
s: Phyllis goes out for a walk.
t: The moon is out.
u: It is snowing.
If the moon is out and it is not snowing, then Phyllis goes out for a walk.
( t u ) s
If it is snowing and the moon is not out, then Phyllis will not go out for a walk.
( u t ) s
s u t
A truth table displays the relationships among the truth values of statements.
In constructing such truth tables, we write “0” for false and “1” for true.
0 0 0 0 0 1 1
0 1 0 1 1 1 0
1 0 0 1 1 0 0
1 1 1 1 0 1 1
Example
Find the truth table for the statement ((p Ù q) ® Øq) Ú r.
(( ) )
Examples
q Ù (Ør ® p)
p Ú (q Ù r) and (p Ú q) Ù r p Ú (q Ù r) ¹ (p Ú q) Ù r
If all the truth values for a statement are true (1),
then the statement is called a tautology.
If all its truth values are false (0), then the statement is called a contradiction.
If the truth values are a combination of 0’s and 1’s,
then the statement is called a contingency.
Examples
p ® (p Ú q) tautology
p Ù (Øp Ù q) contradiction
3.2 Logical Equivalence: The Laws of Logic
(pg. 55 67)
The underlying idea in this section is that we cannot and should not be
constructing truth tables for all statements that we meet (they are large
and tedious). There must be ways of handling the symbols as we do
with numbers hence the Laws of Logic ….
Logical Equivalence
Two statements s1, s2 are said to be logically equivalent, and we write s1⇔ s2,
when the statement s1 is true (respectively, false) if and only if the statement s2 is
true (respectively, false). [This also means s1« s2, is a tautology]
(p « q) Û (p ® q) Ù (q ® p)
(p « q) Û (Øp Ú q) Ù (Øq Ú p)
We can express the connective Ú with Ø, Ù and Ú using:
(p Ú q) Û (p Ú q) Ù Ø(p Ù q)
In the table below, we have constructed the truth tables for the statements
Ø(p Ù q), Øp Ú Øq, Ø(p Ú q), and Øp Ù Øq,
where p and q are primitive statements.
The Laws of Logic (1 of 2)
For any primitive statements p, q, r, any tautology T0, and any contradiction F0
The statements p1, p2, p3, …, pn are called the premises of the argument, and the
statement q is the conclusion for the argument.
An argument is called valid if whenever each of the premises p1, p2, p3, …, pn is true,
then the conclusion q is likewise true.
Note that if any one of p1, p2, p3, …, pn is false, then the hypothesis p1 Ù p2 Ù … Ù pn is
false and the implication (p1 Ù p2 Ù p3 Ù … Ù pn) ® q is automatically true, regardless of
the truth value of q.
Consequently, one way to establish the validity of a given argument is to show that the
statement (p1 Ù p2 Ù p3 Ù … Ù pn) ® q is a tautology.
Example And let p1, p2, p3 denote the premises
Let p, q, r denote primitive statements: p1: If Roger studies, then he will pass
p: Roger studies. discrete mathematics.
q: Roger plays tennis. p2: If Roger doesn’t play tennis, then
r: Roger passes discrete mathematics. he’ll study.
p3: Roger failed discrete mathematics
We want to determine whether the following argument
. is a valid argument:
(p1 Ù p2 Ù p3) ® q
This is verified in the table below, where we find that the fourth row is the only one
where both of the premises p and p q (and the conclusion q) are true.
This rule arises when we argue that if (1) p is true, and (2) p q is true (or p q),
then the conclusion q must also be true. (After all, if q were false and p were true,
then we could not have p q true.)
Examples (Modus Ponens)
a) 1) Lydia wins a ten-million-dollar lottery p
2) If Lydia wins a ten-million-dollar lottery, then Kay will quit her job pq
The third rule of inference is called Modus Tollens, which is given by the logical
implication
[(p q) q] p
Example pr
rs
The following is a valid argument
t s
t u
u
Steps Reasons p
1) p r, r s Premises
2) ps Step (1) and the Law of the Syllogism
3) t s Premise
4) s t Step (3) and the Commutative Law of
5) st Step (4) and the fact that s t s t
6) pt Steps (2) and (5) and the Law of the Syllogism
7) t u Premise
8) tu Step (7) and the fact that t u t u
9) pu Steps (6) and (8) and the Law of the Syllogism
10) u Premise
11) p Steps (9) and (10) and Modus Tollens
A word of warning ….
Some seemingly ‘easy’ conclusions may not be valid arguments. For example, the
preceding argument shows that
[(p r) (r s) (t s) (t u) u] p.
But note that
[(p r) (r s) (t s ) (t u) u] p.
For when p has the truth value 0 and u has the truth value 1, the truth value of p is
1 while that of u and (p r) (r s) (t s ) (t u) u is 0.
The same is the case for the following, which are NOT valid arguments:
4) If 2 + 3 = 6, then 2 + 4 = 6. p q
5) 2 + 3 ≠ 6. p
6) Therefore 2 + 4 ≠ 6. q
There are other rules of inference, albeit less major …
Rule of Conjunction p
q
pq
Rule of Disjunctive Syllogism p q
p
q
Rule of Contradiction p F0
p
The Rule of Contradiction is the basis of a method for establishing the validity of
an argument namely, the method of Proof by Contradiction, or Reductio ad
Absurdum. The idea behind the method of Proof by Contradiction is:
• to establish a statement (namely, the conclusion of an argument)
• by showing that, if this statement were false, then we would be able to
deduce an impossible consequence (or contradiction).
Example
pq
q (r s)
r (t u)
pt
u
Steps Reasons
1) p q Premise
2) q (r s) Premise
3) p (r s) Steps (1) and (2) and the Law of the Syllogism
4) p t Premise
5) p Step (4) and the Rule of Conjunctive Simplification
6) r s Steps (5) and (3) and the Rule of Detachment
7) r Step (6) and the Rule of Conjunctive Simplification
8) r (t u) Premise
9) (r t) u Step (8), the Associative Law of , and DeMorgan’s Laws
10) t Step (4) and the Rule of Conjunctive Simplification
11) r t Steps (7) and (10) and the Rule of Conjunction
12) u Steps (9) and (11), the Law of Double Negation,
and the Rule of Disjunctive Syllogism
3.4 The Use of Quantifiers
(pg. 86 103)
The Use of Quantifiers
We can write:
p(x): The number x + 2 is an even integer
[Then ¬p(x) may be read “The number x + 2 is not an even integer”.]
For open statements p(x), q(x) – defined for a prescribed universe – and the
universally quantified statement "x [p(x) ® q(x)], we define:
1) The contrapositive of "x [p(x) ® q(x)] to be "x [Øq(x) ® Ø p(x)].
2) The converse of "x [p(x) ® q(x)] to be "x [q(x) ® p(x)].
3) The inverse of "x [p(x) ® q(x)] to be "x [Øp(x) ® Ø q(x)].
We have:
THANK YOU TERIMA KASIH
MERCI ARIGATO/ OKINI
GRAZZIE GO MA SSEUM NI DA
GRACIAS SHUKRIYA
SPASIBA XIE-XIE NI
DANKE KAMSIAH / MMKOI
MANGE TAK JABAI INAU
NAN DHRI NGGO BUTE KABU
CAM ON KOP KUN KAH