Propositional Logic
Propositional Logic
Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education.
Chapter Summary
Propositional Logic
The Language of Propositions
Applications
Logical Equivalences
Predicate Logic
The Language of Quantifiers
Logical Equivalences
Nested Quantifiers
Proofs
Rules of Inference
Proof Methods
Proof Strategy
Propositional Logic Summary
The Language of Propositions
Connectives
Truth Values
Truth Tables
Applications
Translating English Sentences
System Specifications
Logic Puzzles
Logic Circuits
Logical Equivalences
Important Equivalences
Showing Equivalence
Satisfiability
Section 1.1
Section Summary
Propositions
Connectives
Negation
Conjunction
Disjunction
Implication; contrapositive, inverse, converse
Biconditional
Truth Tables
Propositions
A proposition is a declarative sentence that is either true or false.
Examples of propositions:
a) London is in Denmark.
b) 9<6.
c) Islamabad is the capital of Pakistan.
d) 1 + 0 = 1
e) 0 + 0 = 2
Examples that are not propositions.
a) Sit down!
b) What time is it?
c) x+1=2
d) x + y = z
Propositional Variable
Variables that represent propositions are called
propositional variables. We typically use lower case
alphabets or letters such as p, q and r to denote
propositions.
p: 4 is an integer. p:T
q: 5 is less than 3 (5<3) q:F
r: Islamabad is capital of Pakistan. r: T
Propositional Logic
Constructing Propositions
Propositional Variables: p, q, r, s, …
The proposition that is always true is denoted by T and
the proposition that is always false is denoted by F.
Compound Propositions; constructed from logical
connectives and other propositions
Negation ¬
Conjunction ∧
Disjunction ∨
Implication →
Biconditional ↔
Negation: Symbols ¬, ~.
p q p ∨q
T T T
T F T
F T T
F F F
p q p ⊕q
T T F
T F T
F T T
F F F
Conditional Statement (→)
(Implication)
p q p ↔q
T T T
T F F
F T F
F F T
Solution: 2n
Note that this means that with n propositional
variables, we can construct 2n distinct (i.e., not
equivalent) propositions.
Precedence of Logical Operators
Operator Precedence
1
2
3
4
5
p q r is equivalent to (p q) r
If the intended meaning is p (q r )
then parentheses must be used.
Example Truth Table
Construct a truth table for
p q r r pq p q → r
T T T F T F
T T F T T T
T F T F T F
T F F T T T
F T T F T F
F T F T T T
F F T F F T
F F F T F T
Example Truth Table
Construct a truth table for p (q r)
p q r r q → r p (q → r)
T T T F F T
T T F T T T
T F T F T T
T F F T T T
F T T F F F
F T F T T T
F F T F T T
F F F T T T
Equivalent Propositions
Two propositions are equivalent if they always have the
same truth value.
Example: Show using a truth table that the
conditional is equivalent to the contrapositive.
Solution:
p q ¬p ¬q p →q ¬q → ¬ p
T T F F T T
T F F T F F
F T T F T T
F F T T T T
Using a Truth Table to Show Non-
Equivalence
Example: Show using truth tables that neither the
converse nor inverse of an implication are not
equivalent to the implication.
Solution:
p q ¬p ¬q p →q ¬ p →¬ q q→p
T T F F T T T
T F F T F T T
F T T F T F F
F F T T T T T