Professional Documents
Culture Documents
Lecture 03 - Propositional Logic
Lecture 03 - Propositional Logic
Example:
1. [[Kuala Lumpur is the capital of Malaysia]] = T
2. [[1 + 6 = 9]] = F
Example:
p : TMA1401 is a compulsory subject for students who take Bachelor of I.T. (I.S.) at MMU.
q : You are sitting in this class to learn mathematical logic.
[[p]] =
[[q]] =
The truth values of these two operators for propositions p and q are:
↔
p q ↔ ⊕
T T T F In English, the compound proposition p ↔ q
can have these meaning:
T F F T
“p if and only if q”
F T F T “p is a necessary and sufficient condition for q”
F F T F
p ⨁ q is the negation of p ↔ q, it is True when exactly one of p or q is true (but not both).
LOGICAL CONNECTIVES
Example:
Given
p : It is raining.
q : The sun is shining
r : There are clouds in the sky.
Mathematically,
the converse of p → q :q→p
the inverse of p → q : ¬p → ¬q
the contrapositive of p → q: ¬q → ¬p
Its inverse, ¬p → ¬q, is “If it is not sunny, then we do not go to the beach.”
p q → → → →
T T T T F F T T
T F F T F T T F
F T T F T F F T
F F T T T T T T
The truth values for the implication and its contrapositive are similar in every
row, BUT NOT with its inverse and converse.
So we said that the implication and its contrapositive are logically equivalent .
TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I
FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
TAUTOLOGY, CONTRADICTION, CONTINGENCY
A compound proposition is called:
∨ ∧ ∨
T F T T F F T T T
F T T F T F T F T
F T T
Tautology Contradiction
F F F
Contingency
When using the truth table to show logical equivalence, basically the
columns of giving the final truth values agreed.
TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I
FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
LOGICAL EQUIVALENCE
Example:
Verify that the statements, (p ∨ q) ∧ q and q, are logically equivalent.
Double Negation (p ∨ q) ∧ r ⇔ (p ∧ r) ∨ (q ∧ r)
laws (p ∧ q) ∨ r ⇔ (p ∨ r) ∧ (q ∨ r)
¬(¬p) ⇔ p
LOGICAL EQUIVALENCE – IDENTITIES AND LAWS
Example:
Show that (p ∨ q) ∨ (¬p ∧ q) is logically equivalent to ¬p.
¬(p ∨ q) ∨ (¬p ∧ q)
⇔ ∧ ∨ ∧ De Morgan’s Law
⇔ ∧ ∨ Distributive Law
⇔ ∧ Negation Law
⇔ Identity Law
p → (q → r)
⇔ p → (¬q ∨ r) Conversion of implication
⇔ ¬p ∨ (¬q ∨ r) Conversion of implication
⇔ (¬p ∨ ¬q) ∨ r Associative law
⇔ (¬q ∨ ¬p) ∨ r Commutative law
⇔ ¬q ∨ (¬p ∨ r) Associative law
⇔ q → (¬p ∨ r) Conversion of implication
⇔ q → (p → r) Conversion of implication
TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I
FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
LOGICAL EQUIVALENCE – IDENTITIES AND LAWS
p ∧ (¬p ∨ q) ↔ (p ∧ q)
⇔ (p ∧ ¬p) ∨ (p ∧ q) ↔ (p ∧ q) Distributive law
⇔ F ∨ (p ∧ q) ↔ (p ∧ q) Negation law
⇔ (p ∧ q) ↔ (p ∧ q) Identity law
⇔ T