Math211
Discrete Mathematics
Propositional Logic II
SAHAR SELIM
Agenda
 1.2 Applications of Propositional Logic
 Translating English to logical expressions
 1.3 Propositional Equivalences
Discrete Mathematics and Its Applications
Kenneth H. Rosen
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
2
1.2 Applications of Propositional Logic
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
3
Translating English to logical
expressions
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
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
4
Example 1
Let p = “It is hot”, and q = “It is sunny”
 It is not hot.
 It is hot and sunny.
 It is hot or sunny.
 It is not hot but sunny.
 It is neither hot nor sunny.
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
5
¬ p
p ^ q
p ˅ q
¬ p ^ q
¬ p ^ ¬ q
Example 2
“You can access the internet from campus
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”
( q v ┐r )  p
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
6
Hypothesis
Conclusion
H  C
System specification
 Translating sentences in natural language into logical
expressions is an essential part of specifying both hardware and
software systems.
 Consistency of system specification.
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
7
“The automated reply cannot be sent when the file system is full”
1. Let p denote “The automated reply can be sent”
2. Let q denote “The file system is full”
The logical expression is
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
8
Example: System specification
Determine whether these system specifications are consistent:
1. The diagnostic message is stored in the buffer or it is retransmitted.
2. The diagnostic message is not stored in the buffer.
3. If the diagnostic message is stored in the buffer, then it is
retransmitted.
 Let p denote “The diagnostic message is stored in the buffer”
 Let q denote “The diagnostic message is retransmitted”
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
9
Example: System specification
Compound Propositions
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
10
1.3 Propositional Equivalences
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
11
Propositional Equivalence
Two syntactically (i.e., textually) different compound propositions
may be the semantically identical (i.e., have the same
meaning). We call them equivalent.
Learn:
 Various equivalence rules or laws.
 How to prove equivalences using symbolic derivations.
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
12
Proofs of Equivalence
 Show that A ↔ B and ¬(A ⊕ B) are equivalent
≡
≡
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
13
• Truth tables can be used to
show the equivalence of two
logical expressions
• The last two columns have the
same values -- so the
expressions are equivalent
Some Terminology
P ¬P P ˅ ¬P P ^ ¬P
T F T F
F T T F
Result is always
true, no matter
what P is
Result is always
false, no matter
what P is
Tautology Contradiction
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
14
Result is neither
tautology nor
contradiction
Contingency
 A tautology is a proposition which is always true
Classic Example: P ∨ ¬P
 A contradiction is a proposition which is always false
Classic Example: P ∧ ¬P
 A contingency is a proposition which neither a tautology nor a
contradiction.
Example: (P ∨ Q) → ¬R
Some Terminology
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
15
Logical Equivalence
 Two propositions P and Q are logically equivalent
if P ↔ Q is a tautology.
We write: P ⇔ Q or P ≡ Q
i.e. p and q contain the same truth values as each other in all rows of their truth
tables.
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
16
Proving Equivalence via Truth Tables
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
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
17
Important for
removing
implication
Prove that p∨q ⇔ ¬(¬p ∧ ¬q).
Proving Equivalence via Truth Tables
p q p
p∨
∨q
q ¬
¬p
p ¬
¬q
q ¬
¬p
p ∧
∧ ¬
¬q
q ¬
¬(
(¬
¬p
p ∧
∧ ¬
¬q
q)
)
F F
F T
T F
T T
F
T
T
T
T
T
T
T
T
T
F
F
F
F
F
F
F
F
T
T
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
18
Equivalence Laws
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
19
order
Equivalence Laws
 Domination: p∨T ⇔ T p∧F ⇔ F
 Idempotent: p∨p ⇔ p p∧p ⇔ p
 Double negation: ¬¬p ⇔ p
 Associative: (p∨q)∨ r ⇔ p∨(q∨r)
(p∧q)∧ r ⇔ p∧(q∧r)
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
20
Grouping
More Equivalence Laws
 Distributive: p∨(q∧r) ⇔ (p∨q)∧(p∨r)
p∧(q∨r) ⇔ (p∧q)∨(p∧r)
 De Morgan’s:
¬(p∧q) ⇔ ¬p ∨ ¬q
¬(p∨q) ⇔ ¬p ∧ ¬q
 Trivial tautology/contradiction:
p ∨ ¬p ⇔ T p ∧ ¬p ⇔ F
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
21
Defining Operators via Equivalences
Using equivalences, we can define operators in terms of
other operators.
(a^b^c) ˅ (a^¬b^c) ˅ (a^¬b^c)
≡
(a^c) ˅ (a^b)
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
22
Defining Operators via Equivalences
 Exclusive Or
p⊕q ⇔ (p∨q)∧¬(p∧q)
p⊕q ⇔ (p∧¬q)∨(q∧¬p)
 Implies
p→q ⇔ ¬p ∨ q
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
26
Equivalences with Conditionals and
Biconditionals
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
27
Important for
removing
implication
Converse, Inverse, Contrapositive
Some terminology, for an implication p → q:
 Its converse is: q → p
 Its inverse is: ¬p → ¬q
 Its contrapositive: ¬q → ¬ p
 One of these three has the same meaning (same truth table) as
p → q. Can you figure out which?
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
28
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
29
Truth Table
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
30
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 (x could be equal to -2).
p → q q → p ¬p → ¬q ¬q → ¬p
statement converse inverse contrapositive
Example
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
32
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
p → q q → p ¬p → ¬q ¬q → ¬p
statement converse inverse contrapositive
Example
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
33
Manipulating Propositions
 Compound propositions can be simplified by using
simple rules.
 Some are obvious, e.g. Identity, Domination,
Idempotence, double negation, commutativity,
associativity
 Less obvious: Distributive, De Morgan’s laws
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
34
Example 1
p→q
¬p ∨ q removing implication
¬p ∨ ¬(¬q) ¬ ¬ x = x (double negation of q)
¬(¬ q) ∨ ¬p commutative law
(¬ q) → (¬p) Implication x→y ⇔ ¬x ∨ y
Show that p→q ⇔ ¬q → ¬p by logic algebra
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
35
p↔q ⇔ (p→q) ∧ (q→p)
p→q ⇔ ¬p ∨ q
Example 2
 Show that (p ∧ q) → (p ∨ q) is a tautology using logical algebra
De Morgan law
Associative and commutative
law for disjunction
Commutative law for disjunction
Domination law
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
36
Example 3
Show that p↔q ⇔ (p ^ q) ∨ (¬p ^ ¬q ) by logic algebra
p↔q = (p→q) ∧ (q→p)
p↔q ⇔ (p→q) ∧ (q→p)
p→q ⇔ ¬p ∨ q
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
37
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
38
Problem 1
 Show that ¬(p ∨ (¬p ∧ q)) and ¬p ∧¬q are logically
equivalent by developing a series of logical equivalences.
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
39
Problem 2
 Show p ˅ (q ^ r) ≡ (p ˅ q) ^ (p ˅ r) using Truth Table
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
40
Problem 3
 Check using a symbolic derivation whether
(p ∧ ¬q) → (p ⊕ r) ⇔ ¬p ∨ q ∨ ¬r
(p ∧ ¬q) → (p ⊕ r) ⇔
[Expand definition of →] ¬(p ∧ ¬q) ∨ (p ⊕ r)
[Defn. of ⊕] ⇔ ¬(p ∧ ¬q) ∨ ((p ∨ r) ∧ ¬(p ∧ r))
[DeMorgan’s Law]
⇔ (¬p ∨ q) ∨ ((p ∨ r) ∧ ¬(p ∧ r))
⇔ [associative law] cont.
p→q ⇔ ¬p ∨ q
p⊕q ⇔ (p∨q)∧¬(p∧q)
p⊕q ⇔ (p∧¬q)∨(q∧¬p)
¬(p∧q) ⇔ ¬p ∨ ¬q
¬(p∨q) ⇔ ¬p ∧ ¬q
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
41
Problem 3 Continued...
(¬p ∨ q) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) ⇔ [∨ commutes]
⇔ (q ∨ ¬p) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) [∨ associative]
⇔ q ∨ (¬p ∨ ((p ∨ r) ∧ ¬(p ∧ r))) [distrib. ∨ over ∧]
⇔ q ∨ (((¬p ∨ (p ∨ r)) ∧ (¬p ∨ ¬(p ∧ r)))
⇔ q ∨ (((¬p ∨ p) ∨ r) ∧ (¬p ∨ ¬(p ∧ r))) [assoc.]
[trivial taut.] ⇔ q ∨ ((T ∨ r) ∧ (¬p ∨ ¬(p ∧ r)))
[domination] ⇔ q ∨ (T ∧ (¬p ∨ ¬(p ∧ r)))
[identity] ⇔ q ∨ (¬p ∨ ¬(p ∧ r)) ⇔ cont.
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
42
Problem 3 Continued...
q ∨ (¬p ∨ ¬(p ∧ r))
[DeMorgan’s] ⇔ q ∨ (¬p ∨ (¬p ∨ ¬r))
[Assoc.] ⇔ q ∨ ((¬p ∨ ¬p) ∨ ¬r)
[Idempotent] ⇔ q ∨ (¬p ∨ ¬r)
[Assoc.] ⇔ (q ∨ ¬p) ∨ ¬r
[Commut.] ⇔ ¬p ∨ q ∨ ¬r
(Which was to be shown.)
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
43
Problem 4: Biconditional operator
p↔q ⇔ (p→q) ∧ (q→p)
p q p ↔ q (p→q) (q→p) (p→q) ∧ (q→p)
F F T T T T
F T F T F F
T F F F T F
T T T T T T
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
44
Try p↔q ⇔ ¬(p⊕q)
Summary of Lecture: Propositional Logic
 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 …
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
46
Supplementary Material
 Kimberly Brehm Channel
 Discrete Math 1.2.1 - Translating Propositional Logic Statements
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
48
Sahar Selim MATH211 Lecture 2 | Propositional Logic II
49

Discrete Mathematics: Lecture 2 - Propositional Logic II.pdf

  • 1.
  • 2.
    Agenda  1.2 Applicationsof Propositional Logic  Translating English to logical expressions  1.3 Propositional Equivalences Discrete Mathematics and Its Applications Kenneth H. Rosen Sahar Selim MATH211 Lecture 2 | Propositional Logic II 2
  • 3.
    1.2 Applications ofPropositional Logic Sahar Selim MATH211 Lecture 2 | Propositional Logic II 3
  • 4.
    Translating English tological expressions 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 Sahar Selim MATH211 Lecture 2 | Propositional Logic II 4
  • 5.
    Example 1 Let p= “It is hot”, and q = “It is sunny”  It is not hot.  It is hot and sunny.  It is hot or sunny.  It is not hot but sunny.  It is neither hot nor sunny. Sahar Selim MATH211 Lecture 2 | Propositional Logic II 5 ¬ p p ^ q p ˅ q ¬ p ^ q ¬ p ^ ¬ q
  • 6.
    Example 2 “You canaccess the internet from campus 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” ( q v ┐r )  p Sahar Selim MATH211 Lecture 2 | Propositional Logic II 6 Hypothesis Conclusion H  C
  • 7.
    System specification  Translatingsentences in natural language into logical expressions is an essential part of specifying both hardware and software systems.  Consistency of system specification. Sahar Selim MATH211 Lecture 2 | Propositional Logic II 7
  • 8.
    “The automated replycannot be sent when the file system is full” 1. Let p denote “The automated reply can be sent” 2. Let q denote “The file system is full” The logical expression is Sahar Selim MATH211 Lecture 2 | Propositional Logic II 8 Example: System specification
  • 9.
    Determine whether thesesystem specifications are consistent: 1. The diagnostic message is stored in the buffer or it is retransmitted. 2. The diagnostic message is not stored in the buffer. 3. If the diagnostic message is stored in the buffer, then it is retransmitted.  Let p denote “The diagnostic message is stored in the buffer”  Let q denote “The diagnostic message is retransmitted” Sahar Selim MATH211 Lecture 2 | Propositional Logic II 9 Example: System specification
  • 10.
    Compound Propositions 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 10
  • 11.
    1.3 Propositional Equivalences SaharSelim MATH211 Lecture 2 | Propositional Logic II 11
  • 12.
    Propositional Equivalence Two syntactically(i.e., textually) different compound propositions may be the semantically identical (i.e., have the same meaning). We call them equivalent. Learn:  Various equivalence rules or laws.  How to prove equivalences using symbolic derivations. Sahar Selim MATH211 Lecture 2 | Propositional Logic II 12
  • 13.
    Proofs of Equivalence Show that A ↔ B and ¬(A ⊕ B) are equivalent ≡ ≡ Sahar Selim MATH211 Lecture 2 | Propositional Logic II 13 • Truth tables can be used to show the equivalence of two logical expressions • The last two columns have the same values -- so the expressions are equivalent
  • 14.
    Some Terminology P ¬PP ˅ ¬P P ^ ¬P T F T F F T T F Result is always true, no matter what P is Result is always false, no matter what P is Tautology Contradiction Sahar Selim MATH211 Lecture 2 | Propositional Logic II 14 Result is neither tautology nor contradiction Contingency
  • 15.
     A tautologyis a proposition which is always true Classic Example: P ∨ ¬P  A contradiction is a proposition which is always false Classic Example: P ∧ ¬P  A contingency is a proposition which neither a tautology nor a contradiction. Example: (P ∨ Q) → ¬R Some Terminology Sahar Selim MATH211 Lecture 2 | Propositional Logic II 15
  • 16.
    Logical Equivalence  Twopropositions P and Q are logically equivalent if P ↔ Q is a tautology. We write: P ⇔ Q or P ≡ Q i.e. p and q contain the same truth values as each other in all rows of their truth tables. Sahar Selim MATH211 Lecture 2 | Propositional Logic II 16
  • 17.
    Proving Equivalence viaTruth Tables 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 Sahar Selim MATH211 Lecture 2 | Propositional Logic II 17 Important for removing implication
  • 18.
    Prove that p∨q⇔ ¬(¬p ∧ ¬q). Proving Equivalence via Truth Tables p q p p∨ ∨q q ¬ ¬p p ¬ ¬q q ¬ ¬p p ∧ ∧ ¬ ¬q q ¬ ¬( (¬ ¬p p ∧ ∧ ¬ ¬q q) ) F F F T T F T T F T T T T T T T T T F F F F F F F F T T Sahar Selim MATH211 Lecture 2 | Propositional Logic II 18
  • 19.
    Equivalence Laws Sahar SelimMATH211 Lecture 2 | Propositional Logic II 19 order
  • 20.
    Equivalence Laws  Domination:p∨T ⇔ T p∧F ⇔ F  Idempotent: p∨p ⇔ p p∧p ⇔ p  Double negation: ¬¬p ⇔ p  Associative: (p∨q)∨ r ⇔ p∨(q∨r) (p∧q)∧ r ⇔ p∧(q∧r) Sahar Selim MATH211 Lecture 2 | Propositional Logic II 20 Grouping
  • 21.
    More Equivalence Laws Distributive: p∨(q∧r) ⇔ (p∨q)∧(p∨r) p∧(q∨r) ⇔ (p∧q)∨(p∧r)  De Morgan’s: ¬(p∧q) ⇔ ¬p ∨ ¬q ¬(p∨q) ⇔ ¬p ∧ ¬q  Trivial tautology/contradiction: p ∨ ¬p ⇔ T p ∧ ¬p ⇔ F Sahar Selim MATH211 Lecture 2 | Propositional Logic II 21
  • 22.
    Defining Operators viaEquivalences Using equivalences, we can define operators in terms of other operators. (a^b^c) ˅ (a^¬b^c) ˅ (a^¬b^c) ≡ (a^c) ˅ (a^b) Sahar Selim MATH211 Lecture 2 | Propositional Logic II 22
  • 23.
    Defining Operators viaEquivalences  Exclusive Or p⊕q ⇔ (p∨q)∧¬(p∧q) p⊕q ⇔ (p∧¬q)∨(q∧¬p)  Implies p→q ⇔ ¬p ∨ q Sahar Selim MATH211 Lecture 2 | Propositional Logic II 26
  • 24.
    Equivalences with Conditionalsand Biconditionals Sahar Selim MATH211 Lecture 2 | Propositional Logic II 27 Important for removing implication
  • 25.
    Converse, Inverse, Contrapositive Someterminology, for an implication p → q:  Its converse is: q → p  Its inverse is: ¬p → ¬q  Its contrapositive: ¬q → ¬ p  One of these three has the same meaning (same truth table) as p → q. Can you figure out which? Sahar Selim MATH211 Lecture 2 | Propositional Logic II 28
  • 26.
    Sahar Selim MATH211Lecture 2 | Propositional Logic II 29
  • 27.
    Truth Table Sahar SelimMATH211 Lecture 2 | Propositional Logic II 30
  • 28.
    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 (x could be equal to -2). p → q q → p ¬p → ¬q ¬q → ¬p statement converse inverse contrapositive Example Sahar Selim MATH211 Lecture 2 | Propositional Logic II 32
  • 29.
    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 p → q q → p ¬p → ¬q ¬q → ¬p statement converse inverse contrapositive Example Sahar Selim MATH211 Lecture 2 | Propositional Logic II 33
  • 30.
    Manipulating Propositions  Compoundpropositions can be simplified by using simple rules.  Some are obvious, e.g. Identity, Domination, Idempotence, double negation, commutativity, associativity  Less obvious: Distributive, De Morgan’s laws Sahar Selim MATH211 Lecture 2 | Propositional Logic II 34
  • 31.
    Example 1 p→q ¬p ∨q removing implication ¬p ∨ ¬(¬q) ¬ ¬ x = x (double negation of q) ¬(¬ q) ∨ ¬p commutative law (¬ q) → (¬p) Implication x→y ⇔ ¬x ∨ y Show that p→q ⇔ ¬q → ¬p by logic algebra Sahar Selim MATH211 Lecture 2 | Propositional Logic II 35 p↔q ⇔ (p→q) ∧ (q→p) p→q ⇔ ¬p ∨ q
  • 32.
    Example 2  Showthat (p ∧ q) → (p ∨ q) is a tautology using logical algebra De Morgan law Associative and commutative law for disjunction Commutative law for disjunction Domination law Sahar Selim MATH211 Lecture 2 | Propositional Logic II 36
  • 33.
    Example 3 Show thatp↔q ⇔ (p ^ q) ∨ (¬p ^ ¬q ) by logic algebra p↔q = (p→q) ∧ (q→p) p↔q ⇔ (p→q) ∧ (q→p) p→q ⇔ ¬p ∨ q Sahar Selim MATH211 Lecture 2 | Propositional Logic II 37
  • 34.
    Sahar Selim MATH211Lecture 2 | Propositional Logic II 38
  • 35.
    Problem 1  Showthat ¬(p ∨ (¬p ∧ q)) and ¬p ∧¬q are logically equivalent by developing a series of logical equivalences. Sahar Selim MATH211 Lecture 2 | Propositional Logic II 39
  • 36.
    Problem 2  Showp ˅ (q ^ r) ≡ (p ˅ q) ^ (p ˅ r) using Truth Table Sahar Selim MATH211 Lecture 2 | Propositional Logic II 40
  • 37.
    Problem 3  Checkusing a symbolic derivation whether (p ∧ ¬q) → (p ⊕ r) ⇔ ¬p ∨ q ∨ ¬r (p ∧ ¬q) → (p ⊕ r) ⇔ [Expand definition of →] ¬(p ∧ ¬q) ∨ (p ⊕ r) [Defn. of ⊕] ⇔ ¬(p ∧ ¬q) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) [DeMorgan’s Law] ⇔ (¬p ∨ q) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) ⇔ [associative law] cont. p→q ⇔ ¬p ∨ q p⊕q ⇔ (p∨q)∧¬(p∧q) p⊕q ⇔ (p∧¬q)∨(q∧¬p) ¬(p∧q) ⇔ ¬p ∨ ¬q ¬(p∨q) ⇔ ¬p ∧ ¬q Sahar Selim MATH211 Lecture 2 | Propositional Logic II 41
  • 38.
    Problem 3 Continued... (¬p∨ q) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) ⇔ [∨ commutes] ⇔ (q ∨ ¬p) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) [∨ associative] ⇔ q ∨ (¬p ∨ ((p ∨ r) ∧ ¬(p ∧ r))) [distrib. ∨ over ∧] ⇔ q ∨ (((¬p ∨ (p ∨ r)) ∧ (¬p ∨ ¬(p ∧ r))) ⇔ q ∨ (((¬p ∨ p) ∨ r) ∧ (¬p ∨ ¬(p ∧ r))) [assoc.] [trivial taut.] ⇔ q ∨ ((T ∨ r) ∧ (¬p ∨ ¬(p ∧ r))) [domination] ⇔ q ∨ (T ∧ (¬p ∨ ¬(p ∧ r))) [identity] ⇔ q ∨ (¬p ∨ ¬(p ∧ r)) ⇔ cont. Sahar Selim MATH211 Lecture 2 | Propositional Logic II 42
  • 39.
    Problem 3 Continued... q∨ (¬p ∨ ¬(p ∧ r)) [DeMorgan’s] ⇔ q ∨ (¬p ∨ (¬p ∨ ¬r)) [Assoc.] ⇔ q ∨ ((¬p ∨ ¬p) ∨ ¬r) [Idempotent] ⇔ q ∨ (¬p ∨ ¬r) [Assoc.] ⇔ (q ∨ ¬p) ∨ ¬r [Commut.] ⇔ ¬p ∨ q ∨ ¬r (Which was to be shown.) Sahar Selim MATH211 Lecture 2 | Propositional Logic II 43
  • 40.
    Problem 4: Biconditionaloperator p↔q ⇔ (p→q) ∧ (q→p) p q p ↔ q (p→q) (q→p) (p→q) ∧ (q→p) F F T T T T F T F T F F T F F F T F T T T T T T Sahar Selim MATH211 Lecture 2 | Propositional Logic II 44 Try p↔q ⇔ ¬(p⊕q)
  • 41.
    Summary of Lecture:Propositional Logic  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 … Sahar Selim MATH211 Lecture 2 | Propositional Logic II 46
  • 42.
    Supplementary Material  KimberlyBrehm Channel  Discrete Math 1.2.1 - Translating Propositional Logic Statements Sahar Selim MATH211 Lecture 2 | Propositional Logic II 48
  • 43.
    Sahar Selim MATH211Lecture 2 | Propositional Logic II 49