08 Cis1103 Formal Logic P2
08 Cis1103 Formal Logic P2
08 Cis1103 Formal Logic P2
DISCRETE STRUCTURES 1
FORMAL LOGIC
PART 2
MORE CONDITIONAL STATEMENTS
Recall:
Conditional statement: If p, then q: p → q
Truth Table
p q ¬p ¬q p→q q→p ¬q → ¬p ¬p → ¬q
T T F F T T T T
T F F T F T F T
F T T F T F T F
F F T T T T T T
MORE CONDITIONAL STATEMENTS: EXAMPLE
Given:
Consider the statement “If it rains today, then I will stay at home”
Tasks:
1. Find the p proposition and q proposition.
2. Find the converse of p → q : q → p.
3. Find the contrapositive of p → q : ¬ q → ¬ p.
4. Find the inverse of p → q : ¬ p → ¬ q.
LOGIC OPERATORS: BICONDITIONAL (↔)
Truth Table
p q p↔q
T T T
T F F
F T F
F F T
BICONDITIONAL STATEMENT: EXAMPLE
Given:
Tasks:
a) Determine the p ↔ q of the given propositions.
b) Determine the four cases that can be formulated from p ↔ q and
give the corresponding truth values for each case.
c) Identify the important implications of p ↔ q.
PRECEDENCE OF OPERATORS
Operator Precedence
¬ 1
Λ 2
V 3
→ 4
↔ 5
PRECEDENCE OF OPERATORS: EXAMPLES
1) ¬p Λ q means (¬p) Λ q
2) p Λ q → r means (p Λ q) → r
LOGICAL OPERATORS IN C
Compound propositions:
Task:
Translate each logical formula into an English sentence
TRUTH TABLE
Given:
Consider the following compound proposition:
(p v ¬q) → (p Λ q).
Task:
Construct the truth table of the compound proposition.
TRUTH TABLE: EXAMPLE 2
Given:
Consider the following statement:
(¬ p Λ ¬ q) v (r Λ q) .
Task:
Construct the truth table of the compound statement.
DE MORGAN’S LAWS
Statement 1:
The negation of an AND proposition is logically equivalent to
the OR proposition in which each component is negated.
Symbolically: ¬(p Λ q) ≡ ¬p v ¬q
Statement 2:
The negation of an OR proposition is logically equivalent to
the AND proposition in which each component is negated.
Symbolically: ¬(p v q) ⇔ ¬p Λ ¬q)
DE MORGAN’S LAWS: EXAMPLE
Given:
Consider the following De Morgan’s Laws:
1. ¬(p Λ q) ≡ ¬p v ¬q
2. ¬(p v q) ⇔ ¬p Λ ¬q
Task:
Construct the truth table that will show the proof that each of the
De Morgan’s Laws is true.
DE MORGAN’S LAWS: IMPORTANT NOTES
Note:
A proposition whose form is a tautology is called a
tautological proposition.
TAUTOLOGY: EXAMPLE
Given:
[(A→B) ∧ A] → B
Task:
Determine if the given statement above is a tautology
using truth table.
CONTRADICTION
It is a statement form where its truth values in all rows in the truth
table are always false.
Note:
A proposition whose form is a contradiction is called a
contradictory proposition.
CONTRADICTION: EXAMPLE
Given:
(A ∨ B) ∧ [(¬A) ∧ (¬B)]
Task:
Determine if the given statement above is a contradiction
using truth table.
CONTINGENCY
Given:
(A ∨ B) ∧ (¬A)
Task:
Determine if the given statement above is a
contingency using truth table.
LOGICAL EQUIVALENCE
Given:
Consider the following two compound propositions:
p → q and q v ¬p
Tasks:
a) By using truth table, prove that the two compound
propositions are logically equivalent.
b) Using the same truth table, prove that the bi-implication of
the two given compound propositions is a tautology.
LOGICAL EQUIVALENCE: EXAMPLE 2
Given:
Consider the following two compound propositions:
p ⊕ q and ¬(p ↔ q)
Tasks:
a) By using truth table, prove that the two compound
propositions are logically equivalent.
b) Using the same truth table, prove that the bi-implication of
the two given compound propositions is a tautology.
LOGIC EQUIVALENCES
Given any statement variables p, q, and r, a tautology t and a
contradiction c, the following logical equivalences hold.
1) (p ~q) q p q
2) ~p (p q) ~p q
3) [ ~ (p q) (p q)] T
4) ~ (p (~p q)) (~p ~q)
LOGICAL EQUIVALENCES