The Foundations: Logic and Proofs: Chapter 1, Part I: Propositional Logic
The Foundations: Logic and Proofs: Chapter 1, Part I: Propositional Logic
© 2019 McGraw-Hill Education. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted 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
© 2019 McGraw-Hill Education
• 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
© 2019 McGraw-Hill Education
• Propositional Logic
Section 1.1
Propositions
Connectives
• Negation
• Conjunction
• Disjunction
• Implication; contrapositive, inverse, converse
• Biconditional
Truth Tables
© 2019 McGraw-Hill Education
• Propositions
A declarative sentence that is either true or false,
but not both
• California is adjacent to New York
• 1+1=2
• 2+2=5
• What is your plan today?
• Read this carefully
• Wow ! What a coincidence!
© 2019 McGraw-Hill Education
• Propositions
A proposition is a declarative sentence that is either true or false.
Examples of propositions:
a) The Moon is made of green cheese.
b) Today is 08/20/2019
c) Washington, D.C., is the capital of USA
d) 1 + 0 = 1
e) 0 + 0 = 2
Examples that are not propositions.
f) Sit down!
g) What time is it?
h) x+1=2
i) x+y=z
© 2019 McGraw-Hill Education
• 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 ↔
© 2019 McGraw-Hill Education
• Compound Propositions: Negation
The negation of a proposition p is denoted by
¬p and has this truth table:
p ¬p
T F
F T
p q P⊕q
T T F
T F T
F T T
F F F
•
© 2019Course
McGraw-Hill Education
• Truth Tables For Compound
Propositions
Construction of a truth table:
Rows
• Need a row for every possible combination of values for
the atomic propositions.
Columns
• Need a column for the compound proposition (usually at
far right)
• Need a column for the truth value of each expression
that occurs in the compound proposition as it is built up.
• This includes the atomic propositions
© 2019 McGraw-Hill Education
• Example Truth Table
Construct a truth table for p ∨ q → ¬r
p q r ¬r p∨q 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
p ∨ q → ¬r is equivalent to (p ∨ q) → ¬r
If the intended meaning is p ∨(q → ¬r)
then parentheses must be used.
© 2019 McGraw-Hill Education
• Applications of
Propositional Logic
Section 1.2
a c f
© 2019 McGraw-Hill Education
• System Specifications
System and Software engineers take requirements in
English and express them in a precise specification
language based on logic.
Example: Express in propositional logic:
“The automated reply cannot be sent when the file
system is full”
Solution: One possible solution: Let p denote “The
automated reply can be sent” and q denote “The file
system is full.”
q p
© 2019 McGraw-Hill Education
• Consistent System Specifications
Definition: A list of propositions is consistent if it is possible to
assign truth values to the proposition variables so that each
proposition is true.
Exercise: Are these specifications consistent?
• “The diagnostic message is stored in the buffer or it is retransmitted.”
• “The diagnostic message is not stored in the buffer.”
• “If the diagnostic message is stored in the buffer, then it is retransmitted.”
Solution: Let p denote “The diagnostic message is stored in the buffer.” Let q
denote “The diagnostic message is retransmitted” The specification can be
written as: p ∨ q, ¬p, p → q. When p is false and q is true all three statements
are true. So the specification is consistent.
• What if “The diagnostic message is not retransmitted” is added.
Solution: Now we are adding ¬q and there is no satisfying assignment. So the
specification is not consistent.
© 2019 McGraw-Hill Education
• Logic Circuits
(Studied in depth in Chapter 12)
Electronic circuits; each input/output signal can be viewed as a 0 or 1.
• 0 represents False
• 1 represents True
Complicated circuits are constructed from three basic circuits called gates.
• The inverter (NOT gate)takes an input bit and produces the negation of that bit.
• The OR gate takes two input bits and produces the value equivalent to the disjunction
of the two bits.
• The AND gate takes two input bits and produces the value equivalent to the
conjunction of the two bits.
More complicated digital circuits can be constructed by combining these basic
circuits to produce the desired output given the input signals by building a circuit
for each piece of the output expression and then combining them. For example:
Idempotent laws: p p p, p p p
Negation Laws: p p T , p p F
© 2019 McGraw-Hill Education
• Key Logical Equivalences 2
Commutative Laws: p q q p, p q q p
Associative Laws: p q r p q r
p q r p q r
Distributive Laws: p q r p q p r
p q r p q p r
Absorption Laws: p p q p p p q p
F p q because p p F
p q F by the commutative law
for disjunction
p q By the identity law for F
© 2019 McGraw-Hill Education
• Equivalence Proofs 2
p p q q by associative and
commutative laws
laws for disjunction
T T by truth tables
p q r