propositional logic
DESCRIPTION
Propositional Logic. Propositional Logic. A proposition is a statement that is either true or false. We give propositions names such as p , q , and r . E.g. p = “pigs have wings” q = “Obama is U.S. president” In this world anyway, p is false and q is true. Truth Tables. −. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Propositional Logic](https://reader036.vdocuments.mx/reader036/viewer/2022082401/56813dc0550346895da78aa3/html5/thumbnails/1.jpg)
Propositional Logic
04/20/23 1
![Page 2: Propositional Logic](https://reader036.vdocuments.mx/reader036/viewer/2022082401/56813dc0550346895da78aa3/html5/thumbnails/2.jpg)
Propositional Logic
• A proposition is a statement that is either true or false.
• We give propositions names such as p, q, and r.
• E.g. p = “pigs have wings”• q = “Obama is U.S. president”• In this world anyway, p is false and
q is true.
04/20/232
![Page 3: Propositional Logic](https://reader036.vdocuments.mx/reader036/viewer/2022082401/56813dc0550346895da78aa3/html5/thumbnails/3.jpg)
Truth Tables
“Not”
¬p is also written p
04/20/23
p ¬p
T F
F T
−
3
![Page 4: Propositional Logic](https://reader036.vdocuments.mx/reader036/viewer/2022082401/56813dc0550346895da78aa3/html5/thumbnails/4.jpg)
• Building propositions from propositions• “And”
• So “pigs have wings and Obama is US president” …
04/20/23
p q p q∧
T T T
T F F
F T F
F F F
4
Logical Operators/Connectives
![Page 5: Propositional Logic](https://reader036.vdocuments.mx/reader036/viewer/2022082401/56813dc0550346895da78aa3/html5/thumbnails/5.jpg)
• “Or”
• So “pigs have wings or Obama is US president” …• “Or” is ambiguous in English but not in Propositional Logic• E.g., “would you like coffee or ice cream?”
04/20/23
p q p q∨
T T T
T F T
F T T
F F F
5
Logical Operators/Connectives
![Page 6: Propositional Logic](https://reader036.vdocuments.mx/reader036/viewer/2022082401/56813dc0550346895da78aa3/html5/thumbnails/6.jpg)
“Exclusive or”
04/20/23
p q p ⊕ q
T T F
T F T
F T T
F F F
6
Logical Operators/Connectives
![Page 7: Propositional Logic](https://reader036.vdocuments.mx/reader036/viewer/2022082401/56813dc0550346895da78aa3/html5/thumbnails/7.jpg)
Some expressions can be defined in terms of others
p ⊕ q is equivalent to (p∨q) ∧¬(p∧q) What does this actually mean? That the truth value of the formula on
the left is the same as the truth value of the formula on the right regardless of the truth values of p and q
04/20/237
![Page 8: Propositional Logic](https://reader036.vdocuments.mx/reader036/viewer/2022082401/56813dc0550346895da78aa3/html5/thumbnails/8.jpg)
Propositional Logic
04/20/23
p q p ⊕ q p v q p ^ q ¬(p q)∧ (p v q) ^¬(p q)∧
T T F T T F F
T F T T F T T
F T T T F T T
F F F F F T F
8
![Page 9: Propositional Logic](https://reader036.vdocuments.mx/reader036/viewer/2022082401/56813dc0550346895da78aa3/html5/thumbnails/9.jpg)
Implies
p ⇒q or p→q or p⊃qis equivalent to ¬p∨q
So “If pigs have wings then Obama is US president” is true in this world
In fact a false proposition implies any proposition
04/20/23
p q p q⇒
T T T
T F F
F T T
F F T
9
![Page 10: Propositional Logic](https://reader036.vdocuments.mx/reader036/viewer/2022082401/56813dc0550346895da78aa3/html5/thumbnails/10.jpg)
“Iff” or logical equivalence
• p ⇔ q means that p and q have the same truth value
• Equivalent to (p ⇒ q) ∧ (q ⇒ p)
04/20/23
p q p ⇔ q
T T T
T F F
F T F
F F T
12