Chapter 1 p.1
Chapter 1 p.1
and Proofs
Chapter 1, Part I: 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
Propositional Logic Summary
The Language of Propositions
Connectives
Truth Values
Truth Tables
Applications
Translating English Sentences
System Specifications
Logic Puzzles
Logical Equivalences
Showing Equivalence
Propositional Logic
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, a
sentence that declares a fact) that is either true
or false.
The basic building blocks of logic.
Which one of these is a Proposition ?
a) The Moon is made of green cheese.
b) What time is it?
c) Hargeisa is the capital of Somalia.
d) x+y=z
1+0=1
e) Toronto is the capital of Canada.
f)
g) 0+0=2
h) Sit down!
Propositions
Examples of propositions:
a) The Moon is made of green cheese.
b) Kismayo is the capital of Somalia.
d) 1 + 0 = 1
c) Toronto is the capital of Canada.
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 Logic
Constructing Propositions
We use letters to denote propositional variables (or
statement variables), that is, variables that
represent propositions, just as letters are used to
denote numerical variables.
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.
Many mathematical statements are constructed
by combining one or more propositions. New
propositions, called compound propositions,
are formed from existing propositions using
logical operators.
Compound Propositions
Compound Propositions; constructed from
logical connectives and other propositions
Negation ¬ ¬p
Conjunction ∧ p∧q
Disjunction ∨ p∨q
Implication → p→q
Biconditional ↔ p↔q
Negation (not) ¬p
The negation of a proposition p is denoted by ¬p.
Example: If p denotes “The earth is round.”, then
¬p denotes “It is not the case that the earth is
closed
A. p= Today is Monday. ¬p = Today is not
Monday
p
and has this truth table:
¬p
Combinations Connectives
T F
F T
The negation of a proposition can also be
considered the result of the operation of the
negation operator on a proposition.
The negation operator constructs a new
proposition from a single existing proposition.
We will now introduce the logical operators
that are used to form new propositions from
two or more existing propositions.
These logical operators are also called
connectives.
Truth Tables
Construction of a truth table:
Rows: Each row of a truth table gives us one
possibility for the truth values of our
propositions. Since each proposition has two
possible truth value, true or false, we will
have 2 rows for each proposition (or 2^n
where n = # of propositions)
p
Combinations
p
¬Connectives P Q
Combinations p∧q
Connectives
T F
T T T
F T
T F F
F T F
F F F
Conjunction (AND) ∧
The conjunction of propositions p and q is
denoted by p ∧ q
Example: If p denotes “I am at home.” and
q denotes “It is raining.” then p ∧q denotes
“I am at home and it is raining.”
The conjunction p ∧ q is true when both p
and q are true and is false otherwise. and has
p
this truth table: q p∧q
T T T
T F F
F T F
F F F
Disjunction (OR) ∨
The disjunction of propositions p and q
denoted by p ∨q
is
⊕ q , one of p and q must be true, but not both. The truth table
soup and salad. This is the meaning of Exclusive Or (Xor). In p
for ⊕ is:p q p ⊕q
T T F
T F T
F T T
F F F
Discussion
For each of the following, determine
whether inclusive OR or exclusive OR is
intended.
1. Coffee or Tea comes with dinner
2. A password must have at least 3 digits or be
at least 8 characters long
3. To take discrete mathematics, you must
have taken calculus or engineering
mathematics
4. you can pay using Somali shilling or dollars
Implication (IF, THEN) p →q
If p and q are propositions, then p →q is a conditional
statement or implication which is read as “if p, then q ”
Example: If p denotes “It is a holiday.” and q
denotes “The store is closed.” then p →q denotes “If
p q p →q
this truth table:
T T T
T F F
F T T
F F T
The statement p → q is called a conditional
statement because p → q asserts that q is true
on the condition that p holds. A conditional
statement is also called an implication
Understanding Implication
One way to view the logical conditional is to think
of an obligation or contract.
“If I am elected, then I will lower taxes.”
“If you get 100% on the final, then you will get
an A.”
If the politician is elected and does not lower taxes,
then the voters can say that he or she has broken
of Kenya
Biconditional (IF AND ONLY IF) p ↔q
If p and q are propositions, then we can form the
biconditional proposition p ↔q , read as “p if and only if
q .” The biconditional p ↔q denotes the proposition
p q p ↔q
T T T
T F F
F T F
F F T
Cont.…
p ↔q = (p →q)^(q →p)
p q p →q q →p (p →q)^(q p ↔q
→p)
T T T T T T
T F F T F F
F T T F F F
F F T T T T
Expressing the Biconditional
Some alternative ways “p if and only if q” is
expressed in English:
p q r is equivalent to (p q)
r )
then parentheses must be used.
Example Truth Table
Construct a truth table for
Solution
p q r r pq pq→
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
Cont.…
Class Work (1)
Construct the Truth table for the following
compound Proposition.
(p ∨ q) ∧ ( ¬ r)
Cont.…
Class Work (2)
Construct the Truth table for the following
compound Proposition.
(p → q) ↔ (¬q → ¬p)
Homework
Q1 : Construct the Truth table for the following
compound Proposition.
P → ¬q ∧ ¬ p ↔ ¬ p
Homework
Q2 :
Logical Puzzles (1)
In an island, there are two kinds of
inhabitants, knights, who always tell the
truth, and their opposites, knaves, who
always lie. You encounter two people A and
B. What are A and B if A says “B is a knight”
and B says “The two of us are opposite
types?”
Logical Puzzles (solution)
Logical Puzzles (solution)
Equivalent Propositions
Two propositions are equivalent if they
always have the same truth value.
Example: Show using a truth table that the
p→q conditional is equivalent to the
contrapositive ¬ q → ¬ p.
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
p q ¬p ¬q p →q ¬ p →¬ q→p
q
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
Propositional
Equivalences
Section 1.3
Section Summary
Tautologies, Contradictions, and Contingencies.
Logical Equivalence
Important Logical Equivalences
Showing Logical Equivalence
Normal Forms (optional, covered in exercises in
text)
Disjunctive Normal Form
Conjunctive Normal Form
Propositional Satisfiability
Sudoku Example
Tautologies, Contradictions, and
Contingencies
A tautology is a proposition which is always
p ∨¬p
true.
Example:
A contradiction is a proposition which is
Example: p ∧¬p
always false.
p q ¬p ¬p ∨ q p→ q
T T F T T
T F F F F
F T T T T
F F T T T
De Morgan’s Laws
Augustus De
Morgan
1806-
1871
Domination Laws: ,
Idempotent laws: ,
Negation Laws: ,
Key Logical Equivalences (cont)
Commutative Laws: ,
Associative Laws:
Distributive Laws:
Absorption Laws:
More Logical Equivalences
Constructing New Logical Equivalences
We can show that two expressions are logically
equivalent by developing a series of logically
equivalent statements.
To prove that we produce a series of
equivalences beginning with A and ending with B.