Lecture Week 2 -Propositional Logic
Lecture Week 2 -Propositional Logic
Propositional Logic
1
Agenda
Review of week 1
Week 2 lecture coverage
• Logical equivalence , Tautology and contradiction
• Basic laws of propositional logic
• Conditional and biconditional
• Inverse converse and contra positive
• Logical consequences
• Arguments and its validity
2
Fast Math Tricks….
3
Math Tricks….
Review of Week 1
Question:
Write the truth table for the followings :
a. (p ∧ q) ∨ r
b. ¬ p ∧ q
c. p ∧ (false ∧ q)
5
Google Classroom
• Your Google class room code for Logic & Problem solving
module is
xzgjzs
Logged in to classroom.google.com and get your lecture
slides and others materials .
Any Questions?
7
LOGICAL EQUIVALENCE:
Two compound propositions P (p, q, r, … )and Q (p, q, r, .. )
are said to be logically equivalent (or simply equivalent) if
the last column of their truth tables are identical.
We write P ≡ Q in this case.
Example:
Show that p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
For simplicity we construct their truth tables in a single
diagram.
p q r (q ∨ r) p ∧ (q ∨ r) (p ∧ q) (p ∧ r) (p ∧ q) ∨ (p ∧ r)
T T T T T T T T
T T F T T T F T
T F T T T F T T
T F F F F F F F
F T T T F F F F
F T F T F F F F
F F T T F F F F
F F F F F F F F
Tautology:
A proposition P(p, q, r, … ) is called a tautology if every
entry in the last column of its truth table is T.
p q (p ∧ q) ¬(p ∧ q) (p ∧ q) ∧ ¬(p ∧ q)
T T T F F
T F F T F
F T F T F
F F F T F
14
Five Basic Laws of Propositional Logic:
1.p q q p
Commutative laws
pqqp
2.(p q) r p (q r) Associative
(p q) r p (q r) Laws
3.p (q r) (p q) (p r) Distributive
p (q r) (p q) (p r) Laws
p p (p p) TRUE (Law 4)
(p p) (p p) (Law 5)
p (p p) (Law 3)
p FALSE (Law 5)
p (Law 4)
Example:
Example:
The Conditional of two proposition (→):
P implies Q or equivalently P → Q is true unless P is true
and Q is false.
In another words,
If P and Q are two propositions, P → Q is false if
P(hypothesis) is true and Q(conclusion) is false.
p q p→q
T T T
T F F
F T T
F F T
The inverse of p → q:
For any two propositions p and q the conditional p → q
is called the inverse of p → q.
The truth table for p → q is shown below together with
that for p → q for comparison.
p q p q p→q p→q
T T F F T T
T . F F T F T
F T T F T F
F F T T T T
The converse of p → q:
For any two propositions p and q the conditional q → p is
called the converse of p → q.
The truth table for q → p is shown below together with
that for p → q for comparison.
T T F F T T
T F F T F F
.
F T T F T T
F F T T T T
The Bi-conditional of Two Propositions:
If propositions p and q are combined in the form “p if and
only if q” the resulting proposition is called the bi-
conditional of p and q, or simply the bi-conditional.
The logical connective is the “if and only if ” connective
with symbol ↔.
The proposition p ↔ q is really shorthand for
(p → q) ∧(q → p)
The Bi-conditional of Two Propositions
(Contd.):
We can construct its truth table as below
p q pq qp (p q) (q p)
T T T T T
T F F T F
F T T F F
F F T T T
p q p q q p pq
T T T T T
T F T T T
F T T F T
F F F T F
Logical Consequence (Contd.):
Show that p q, q r ├ p r
The truth tables for p q, q r and p r are as below:
T T T T T T T T
T T F T F F F T
T F T F T F T T
T F F F T F F T
F T T T T T T T
F T F T F F T T
F F T T T T T T
F F F T T T T T
Here from the truth table its proved that X = [ (p → q) (q → r )]
(p → r) is a Tautology. Hence the given argument is valid.
Questions:
Determine the validity of the following arguments:
1. p v q , p ├ q
2. p → q , q → r , r ├ p
3. If you do not study you will fail your examination. You
failed therefore you did not study.
4. If I am not in Malaysia, then I am not happy; if I am
happy, then I am singing; I am into singing; therefore, I
am not in Malaysia.
Any Questions?
35
Summary: Week 1 and 2 Lecture
• Logic and proposition
• Logical Connectives
• Truth tables
• Tautology and contradiction
• Logical equivalence
• Logical consequences
• Argument and its validity
36
What to Expect: Week 2 Tutorials
37
Thank you