Propositional Logic: CSC510 - Discrete Structures
Propositional Logic: CSC510 - Discrete Structures
Propositional Logic: CSC510 - Discrete Structures
LOGIC
CSC510 – Discrete Structures
Question
Variable form ≠ Proposition
Instruction
PROPOSITION EXAMPLES
PROPOSITION:
"Man is Mortal“
- returns truth value “TRUE”
"12 + 9 = 3 – 2“
- returns truth value “FALSE”
NOT PROPOSITION:
"A is less than 2".
Reason: unless we give a specific value of A, we
cannot say whether the statement is true or
false.
LOGICAL CONNECTIVES
Negation, NOT (¬)
Conjunction, AND (∧)
Disjunction, OR (∨)
Exclusive OR / XOR (⊕)
Implication / if-then ()
Biconditional / if and only if [short form: iff] (⇔)
TRUTH TABLES
KEY NEGATION
TRUE 1 P ¬P
FALSE 0 1 0
0 1
EXAMPLE:
Prove [(A→B)∧A]→B is a tautology.
ANSWER:
A B A→B (A → B) ∧ A [( A → B ) ∧ A] → B
1 1 1 1 1
1 0 0 0 1
0 1 1 0 1
0 0 1 0 1
From the truth table, every value of [(A→B) ∧ A] → B is "True“ and hence,
it is a tautology.
PROPOSITIONAL EQUIVALENCE
Two statements X and Y are logically
equivalent if any of the following two
conditions hold:
EXAMPLE:
“If you do your homework, you will not be punished.”
"you do your homework" is the hypothesis, p.
"you will not be punished" is the conclusion, q.
INVERSE, CONVERSE, CONTRAPOSITIVE
(cont.)
Inverse − An inverse of the conditional statement is the
negation of both the hypothesis and the conclusion. If the
statement is “If p, then q”, the inverse will be “If not p, then
not q”. Thus the inverse of p→q is ¬p→¬q.
EXAMPLE:
The inverse of “If you do your homework, you will not be
punished” is “If you do not do your homework, you will be
punished”.
INVERSE, CONVERSE, CONTRAPOSITIVE
(cont.)
Converse − The converse of the conditional statement is
computed by interchanging the hypothesis and the conclusion.
If the statement is “If p, then q”, the converse will be “If q, then
p”. The converse of p→q is q→p.
EXAMPLE:
The converse of "If you do your homework, you will not be
punished" is "If you will not be punished, you do your homework”.
INVERSE, CONVERSE, CONTRAPOSITIVE
(cont.)
Contra-positive − The contra-positive of the conditional is
computed by interchanging the hypothesis and the conclusion
of the inverse statement. If the statement is “If p, then q”, the
contra-positive will be “If not q, then not p”. The contra-
positive of p→q is ¬q→¬p.
EXAMPLE:
The Contra-positive of " If you do your homework, you will not
be punished” is "If you are punished, then you do not do your
homework”.
LOGICAL EQUIVALENCE
EQUIVALENCE TYPE OF LAW
p ∧T ≡ p
Identity Law
p∨F≡p
p ∨T ≡ T
Domination Law
p∧F≡F
p∨p≡p
Idempotent Law
p∧p≡p
¬ (¬ p) ≡ p Double Negation Law
p∨q≡q∨p
Commutative Law
p∧q≡q∧p
(p ∨ q) ∨ r ≡ p ∨ (q ∨ r)
Associative Law
(p ∧ q) ∧ r ≡ p ∧ (q ∧ r)
p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)
Distributive Law
p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
¬ (p ∧ q) ≡ ¬ p ∨ ¬ q
De Morgan’s Law
¬ (p ∨ q) ≡ ¬ p ∧ ¬ q
LOGICAL EQUIVALENCE (cont.)
EXTRA NOTES:
1) p ⇔ q ≡ (p ∧ q) ∨ (¬ p ∧ ¬ q)
2) ¬ (p ⇔ q) ≡ p ⇔ ¬ q
LOGICAL EQUIVALENCE -
EXAMPLE
Show that (p r) ∧ (q r) ≡ (p ∨ q) r are
logically equivalent.
SOLUTION:
(p r) ∧ (q r) ≡ (¬ p ∨ r) ∧ (¬ q ∨ r) Useful
≡ (r ∨ ¬ p) ∧ (r ∨ ¬ q) Commutative Law
≡ r ∨ (¬ p ∧ ¬ q) Distributive Law
≡ (¬ p ∧ ¬ q) ∨ r Commutative Law
≡ ¬ (p ∨ q) ∨ r De Morgan’s Law
≡ (p ∨ q) r Useful
Therefore, (p r) ∧ (q r) ≡ (p ∨ q) r