Unit II
Unit II
1
Logic
• Logic is a system based on propositions.
• A proposition is a statement that is either
true or false (not both).
• We say that the truth value of a proposition
is either true (T) or false (F).
2
The Statement/Proposition Game
3
The Statement/Proposition Game
4
The Statement/Proposition Game
“y > 5”
Is this a statement? no
It’s a request.
Is this a proposition? no
6
The Statement/Proposition Game
“If elephants were red,
they could hide in cherry trees.”
7
The Statement/Proposition Game
“x < y if and only if y > x.”
Is this a statement? yes
Is this a proposition? yes
… because its truth value
does not depend on
specific values of x and y.
9
Logical Operators (Connectives)
We will examine the following logical operators:
•Conjunction (AND) Symbol:
•Disjunction (OR) Symbol:
•Negation (NOT) Symbol:
•Conditional(Implication) (if – then) Symbol:
•Biconditional (if and only if) Symbol:
Truth tables can be used to show how these
operators can combine propositions to
compound propositions.
10
Conjunction (AND)
Let p and q be propositions. The conjunction of
p and q, denoted by p Λ q, is the proposition
“p and q”. The conjunction p Λ q is true when
both p and q are true and is false otherwise.
12
Disjunction (OR)
Let p and q be propositions. The disjunction of
p and q, denoted by p ν q, is the proposition
“p or q”. The conjunction p ν q is false when
both p and q are false and is true otherwise.
13
Disjunction (OR)
Binary Operator, Symbol:
P Q P Q
T T T
T F T
F T T
F F F
14
Negation (NOT)
– Let p be a proposition. The negation of p,
denoted by ¬p, is the statement “It is not
the case that p.”
– The proposition ¬p is read “not p.” The truth
value of the negation of p, ¬p is the opposite of
the truth value of p.
Examples: Find the negation of the proposition “Today is Friday.”
Solution: The negation is “It is not the case that today is
Friday.”
Example: Find the negation of the proposition “At least 10
inches of rain fell today in Miami.”
Solution: The negation is “It is not the case that at least 10
inches of rain fell today in Miami.”
15
Negation (NOT)
Unary Operator, Symbol:
P P
true (T) false (F)
false (F) true (T)
18
Biconditional (if and only if)
Let p and q be propositions. The biconditional
statement p ↔ q is the proposition “p if and
only if q.” The biconditional statement p ↔
q is true when p and q have the same truth
values, and is false otherwise. Biconditional
statements are also called bi-implications.
19
Biconditional (if and only if)
Binary Operator, Symbol:
P Q P Q
T T T
T F F
F T F
F F T
20
21
Q: If a function is differentiable then it
is continuous.
Converse: If a function is continuous then it is
differentiable
Inverse: If a function is not differentiable then it is
not continuous
Contra Positive: If it is not a continuous function then
it is not differentiable.
22
Statements and Operators
Statements and operators can be combined in any way to form new statements.
Find (P)(Q)
P Q P Q (P)(Q)
T T F F F
T F F T T
F T T F T
F F T T T
23
Find (P)(Q)
P Q P Q (P)(Q)
T T F F F
T F F T T
F T T F T
F F T T T
24
Statements and Operations
Statements and operators can be combined in any
way to form new statements.
(P)(
P Q PQ (PQ) P Q
Q)
T T T F F F F
T F F T F T T
F T F T T F T
F F F T T T T
25
Equivalent Statements
P Q (PQ) (P)(Q) (PQ)(P)(Q)
T T F F T
T F T T T
F T T T T
F F T T T
26
Tautologies and Contradictions
27
Tautologies and Contradictions
A contradiction is a statement that is always
false.
Examples:
• R(R)
((PQ)(P)(Q))
The negation of any tautology is a contra-
diction, and the negation of any contradiction is
a tautology.
28
Logical Equivalence
A logical equivalence means that
the two sides always have the
same truth values
– Symbol is ≡or (we’ll use ≡)
29
DeMorgan’s Law
30
How to prove two propositions are equivalent?
Show that: ( p r ) (q r ) ( p q ) r
31