Professional Documents
Culture Documents
L2-Propositional Logic II PDF
L2-Propositional Logic II PDF
Discrete Mathematics
Propositional Logic II
SAHAR SELIM
2
Agenda
Why?
English is often ambiguous and translating sentences into
compound propositions removes the ambiguity
Using logical expressions, we can analyze them and determine
their truth values
We can use rules of inferences to reason about them
“You can access the internet from campus only if you are a
computer science major or you are not a freshman.”
p : “You can access the internet from campus”
q : “You are a computer science major”
r : “You are freshmen”
p ( q v ┐r )
Example:
p ∨ q ∧ r : Could be interpreted as (p ∨ q) ∧ r or p ∨ (q ∧ r)
Precedence order: ¬ ∧ ∨ ⊕ → ↔ (IMP!) (Overruled by brackets)
We use this order to compute truth values of compound
propositions.
≡
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
14
A ¬A A ˅ ¬A A ^ ¬A
T F T F
F T T F
Tautology Contradiction
i.e. p and q contain the same truth values as each other in all rows of their truth
tables.
Exclusive Or
p⊕q ⇔ (p∨q)∧¬(p∧q)
p⊕q ⇔ (p∧¬q)∨(q∧¬p)
Implies
p→q ⇔ ¬p ∨ q
p→q ⇔ ¬p ∨ q
p q (p→q) ¬p ¬p∨q
F F T T T
F T T T T
T F F F F
T T T F T
p→q q→p ¬p → ¬q ¬q → ¬p
statement converse inverse contrapositive
Statement ≡ Contrapositive
• The Statement If x=2, then x2 =4 is true.
• Its Contrapositive If x2 ǂ4, then x ǂ2 so is true.
Converse ≡ inverse
• Its Converse If x2 =4, then x=2 is not true (x could be equal to -2).
• Its inverse If x ǂ2, then x2 ǂ4 so is not true.
p→q q→p ¬p → ¬q ¬q → ¬p
statement converse inverse contrapositive
Ex.2
• Statement : If x is positive and x2 =4, then x=2.
• Contrapositive : If x ǂ2 , then x is not positive or x2 ǂ4.
Ex.3
• Statement: If the sun is shining then I go to store.
• Contrapositive: If I don’t go to store then the sun is not shining.
• Converse: If I go to store then the sun is shining.
• Inverse: If the sun is not shining then I don’t go to store
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
32
Manipulating Propositions
p→q
¬p ∨ q removing implication
¬p ∨ ¬(¬q) ¬¬x=x
¬(¬ q) ∨ ¬p commutative law
(¬ q) → (¬p) Implication x→y ⇔ ¬x ∨ y
De Morgan law
Associative and commutative
law for disjunction
Commutative law for disjunction
Domination law
(p ∧ ¬q) → (p ⊕ r) ⇔
p⊕q ⇔ (p∨q)∧¬(p∧q)
[Expand definition of →] ¬(p ∧ ¬q) ∨ (p ⊕ r) p⊕q ⇔ (p∧¬q)∨(q∧¬p)
[Defn. of ⊕] ⇔ ¬(p ∧ ¬q) ∨ ((p ∨ r) ∧ ¬(p ∧ r))
[DeMorgan’s Law]
¬(p∧q) ⇔ ¬p ∨ ¬q
⇔ (¬p ∨ q) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) ¬(p∨q) ⇔ ¬p ∧ ¬q
⇔ [associative law] cont.
Atomic propositions: p, q, r, …
Boolean operators: ¬ ∧ ∨ ⊕ → ↔
Compound propositions: s :≡ (p ∧ ¬q) ∨ r
Equivalences: p∧¬q ⇔ ¬(p → q)
Proving equivalences using:
Truth tables.
Symbolic derivations. p ⇔ q ⇔ r …