Download Document

Document related concepts
no text concepts found
Transcript
Chap. 2 Fundamentals of Logic
Proposition
• Proposition (or statement): an declarative
sentence that is either true or false, but not
both.
• e.g.
–
–
–
–
–
Margret Mitchell wrote Gone with the Wind. O
2+3=6. O
What a beautiful evening. X
Get up and do your exercise. X
Combinatorics is a required course for sophomores. O
Negation of Proposition
• The negation of a proposition p, denoted by
¬p, is the statement “It is not the case that p”.
• e.g.
– p: Combinatorics is a required course for
sophomores.
– ¬p: It is not the case that combinatorics is
a required course for sophomores.
Truth Table of Negation of
Proposition
p
¬p
1
0
0
1
1: true
0: false
Compound Statement
• Compound Statement: a statement that is
combined by two or more statements using
logic connections, including ⋀ (conjunction), ⋁
(disjunction), ⊻ (exclusive or), → (implication),
and ↔ (biconditional).
Conjunction
• The conjunction of statements p and q, denoted
by p ⋀ q, is the statement “p and q”.
• e.g.
– p: Combinatorics is a required course for
sophomores.
– q: Margret Mitchell wrote Gone with the Wind.
– p ⋀ q : Combinatorics is a required course for
sophomores and Margret Mitchell
wrote Gone with the Wind.
Disjunction
• The disjunction of statements p and q, denoted
by p ⋁ q, is the statement “p or q”.
• e.g.
– p: Combinatorics is a required course for
sophomores.
– q: Margret Mitchell wrote Gone with the Wind.
– p ⋁ q : Combinatorics is a required course for
sophomores or Margret Mitchell wrote
Gone with the Wind.
Exclusive Or
• The exclusirve or of statements p and q,
denoted by p ⊻ q, is the statement “p or q, but
not both”.
• e.g.
– p: Combinatorics is a required course for
sophomores.
– q: Margret Mitchell wrote Gone with the Wind.
– p ⊻ q : Combinatorics is a required course for
sophomores or Margret Mitchell wrote
Gone with the Wind, but not both.
Implication
• The implication of statements p and q, denoted
by p → q, is the statement “if p, then q”.
• e.g.
– p: Combinatorics is a required course for
sophomores.
– q: Margret Mitchell wrote Gone with the Wind.
– p → q : If combinatorics is a required course
for sophomores, then Margret Mitchell
wrote Gone with the Wind.
Biconditional
• The biconditional of statements p and q,
denoted by p ↔ q, is the statement “p if and
only if q”.
• e.g.
– p: Combinatorics is a required course for
sophomores.
– q: Margret Mitchell wrote Gone with the Wind.
– p ↔ q : Combinatorics is a required course for
sophomores if and only if Margret
Mitchell wrote Gone with the Wind.
Truth Table of Conjunction,
Disjunction, Exclusive Or,
Implication, and Biconditional
p⋀q p⋁q p⊻q p→q p↔q
p
q
0
0
0
0
0
1
1
0
1
0
1
1
1
0
1
0
0
1
1
0
0
1
1
1
1
0
1
1
Truth Table of Implication
p → q means:
If p is true, then q is true.
If p is false, then q is true or false.
Thus,
p→q
p
q
1
0
0
1
0
1
1
1
1
Tautology and Contradiction
• A compound statement
is a tautology if it is true
for all truth value
assignments for its
component statements.
• If a compound
statement is false for all
such assignment, then it
is a contradiction.
• e.g.
p ¬p p ⋀ ¬p p ⋁ ¬p
0
0
1
1
1
1
0
0
0
0
0
1
1
1
0
1
∴ p ⋀ ¬p is a contradiction.
p ⋁ ¬p is a tautology.
Logical Equivalence
• Two statements p, q are logically
equivalent, and we write p ⇔ q, when
p ↔ q is a tautology.
e.g. ¬(p⋀q) ⇔¬p⋁¬q p→q ⇔ ¬p⋁q
p→q
¬p⋁q
p→q ↔ ¬p⋁q
1
¬(p⋀q) ↔
¬p⋁¬q
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
0
1
1
0
0
1
1
1
1
¬(p⋀q) ¬p⋁¬q
p
q
0
0
1
0
1
1
1
The Laws of Logic
• For any primitive statements p, q, r, any
tautology T0, and any contradiction F0.
– ¬¬p ⇔ p (Law of Double Negation)
– ¬(p⋁q) ⇔ ¬p⋀¬q (DeMorgan’s Law)
– p⋁q ⇔ q⋁p (Commutative Law)
– p⋁(q⋁r) ⇔(p⋁q)⋁r (Associative Law)
– p⋁(q⋀r) ⇔(p⋁q)⋀(p⋁r) (Distributive Law)
The Laws of Logic (2)
• For any primitive statements p, q, r, any
tautology T0, and any contradiction F0.
– p⋁p ⇔ p (Idempotent Law)
– p⋁F0 ⇔ p (Identity Law)
– p⋁¬p ⇔ T0 (Inverse Law)
– p⋁T0 ⇔ T0 (Domination Laws)
– p⋁(p⋀q) ⇔ p (Absorption Law)
Dual of Statement
• Let s be a statement. If s contains no
logical connectives other than ⋀ and ⋁,
then the dual of s, denoted sd, is the
statement obtained from s by replacing
each occurrence of ⋀ and ⋁ by ⋁ and ⋀,
respectively, and each occurrence of T0
and F0 by F0 and T0, respectively.
• e.g. s: (p⋀¬q)⋁(r⋀T0)
sd: (p⋁¬q)⋀(r⋁F0)
Principle of Duality
• The Principle of Duality. Let s and t be
statements that contain no logical
connectives other than ⋀ and ⋁. If s ⇔ t,
then sd ⇔ td.
• e.g.
¬(p⋁q) ⇔ ¬p⋀¬q (1st DeMorgan’s Law)
¬(p⋀q) ⇔ ¬p⋁¬q (2nd DeMorgan’s Law)
The Laws of Logic (3)
• For any primitive statements p, q, r, any
tautology T0, and any contradiction F0.
– ¬(p⋁q) ⇔ ¬p⋀¬q (1st DeMorgan’s Law)
– ¬(p⋀q) ⇔ ¬p⋁¬q (2nd DeMorgan’s Law)
– p⋁q ⇔ q⋁p (1st Communication Law)
– p⋀q ⇔ q⋀p (2nd Communication Law)
– p⋁(q⋁r) ⇔ (p⋁q)⋁r (1st Associative Law)
– p⋀(q⋀r) ⇔ (p⋀q)⋀r (2nd Associative Law)
The Laws of Logic (4)
• For any primitive statements p, q, r, any
tautology T0, and any contradiction F0.
– p⋁(q⋀r) ⇔(p⋁q)⋀(p⋁r) (1st Distributive Law)
– p⋀(q⋁r) ⇔(p⋀q)⋁(p⋀r) (2nd Distributive Law)
– p⋁p ⇔ p (1st Idempotent Law)
– p⋀p ⇔ p (2nd Idempotent Law)
– p⋁F0 ⇔ p (1st Identity Law)
– p⋀T0 ⇔ p (2nd Identity Law)
The Laws of Logic (5)
• For any primitive statements p, q, r, any
tautology T0, and any contradiction F0.
– p⋁¬p ⇔ T0 (1st Inverse Law)
– p⋀¬p ⇔ F0 (2nd Inverse Law)
– p⋁T0 ⇔ T0 (1st Domination Laws)
– p⋀F0 ⇔ F0 (2nd Domination Laws)
– p⋁(p⋀q) ⇔ p (1st Absorption Law)
– p⋀(p⋁q) ⇔ p (2nd Absorption Law)
Substitution Rule 1
• Suppose that the compound statement P
is a tautology. If p is a primitive statement
that appears in P and we replace each
occurrence of p by the same statement q,
then the resulting compound statement P1
is also a tautology.
• e.g. P: ¬(p⋁q)↔(¬p⋀¬q) is a tautology
∴ P1: ¬[(r⋀s)⋁q]↔[¬(r⋀s)⋀¬q] is a
tautology
Substitution Rule 1 (2)
• e.g. ¬ ¬(p∨q) ⇔ (p∨q)
∵ ¬ ¬p ⇔ p
(Law of Double Negation)
• e.g. (p∨q)∧(p∨¬q) ⇔ (p∨(q∧¬q))
∵ p∨(q∧r) ⇔ (p∨q)∧(p∨r)
(1st Distributive Law)
Substitution Rule 2
• Let P be a compound statement where p
is an arbitrary statement that appears in P,
and let q be a statement such that q ⇔ p.
Suppose that in P we replace one or more
occurrences of p by q. Then this
replacement yields the compound
statement P1. Under these circumstances
P1 ⇔ P.
• e.g. P: (p→q)→r, P1: (¬p∨q)→r
∵ (p→q) ⇔ ¬p∨q ∴ P1 ⇔ P
Substitution Rule 2 (2)
• e.g. ¬ ¬(p∨q)∧¬r ⇔ (p∨q)∧¬r
∵ ¬ ¬ (p∨q) ⇔ (p∨q)
(Law of Double Negation and
Substitution Rule 1)
• e.g. (p∨q)∧(r∧q) ⇔ (p∨q)∧(q∧r)
∵ r∧q ⇔ q∧r
(Commutative Law)
Example 2.16
• Show that (p∨q)∧¬(¬p∧q) ⇔ p
(p∨q)∧¬(¬p∧q)
⇔ (p∨q)∧(¬¬p∨¬q)
(2nd DeMorgan’s Law)
⇔ (p∨q)∧(p∨¬q)
(Law of Double Negation)
⇔ p∨(q∧¬q) (1st Distributive Law)
⇔ p∨F0 (2nd Inverse Law)
⇔ p (1st Identity Law)
Example 2.17
• Show that ¬[¬[(p∨q)∧r]∨¬q] ⇔ q∧r
¬[¬[(p∨q)∧r]∨¬q]
⇔ ¬¬[(p∨q)∧r]∧(¬¬q) (1st DeMorgan’s Law
⇔ [(p∨q)∧r]∧q
(Law of Double Negation)
⇔ (p∨q)∧(r∧q) (2nd Associative Law)
⇔ (p∨q)∧(q∧r) (2nd Commutative Law)
⇔ [(p∨q)∧q ]∧r) (2nd Associative Law)
⇔ q∧r (2nd Absorption Law)
Logical Implication
• If p, q are arbitrary statements such that
p→q is a tautology, then we say that p
logically implies q and we write p⇒q to
denote this situation.
• e.g. [p∧(p→q)] ⇒ q
Rule of Inference
• [p∧(p→q)] ⇒ q
• The actual rule will be written in the tabular
form
p
p→q
∴q
Example 2.31
• Show the following argument is valid
(¬p∨¬q)→(r∧s)
r→t
¬t
∴p
Example 2.31 (2)
Steps
1) r→t
2) ¬t
3) ¬r
4) ¬r∨¬s
5) ¬(r∧s)
6) (¬p∨¬q)→(r∧s)
7) ¬(¬p∨¬q)
8) p∧q
9) ∴ p
Reasons
Premise
Premise
Steps (1) and (2) and Modus Tollens
Step (3) and Rule of Disjunctive Amplification
Step (4) and 2nd DeMorgan’s Laws
Premise
Steps (6) and (5) and Modus Tollens
Step (7), DeMorgan’s Laws, and Law of
Double Negation
Step (8) and Rule of Conjunctive Simplification
Example 2.32
• Show the following argument is valid by
the method of Contradiction
¬p↔q
q→r
¬r
∴p
Example 2.32 (2)
Steps
1) ¬p↔q
2) (¬p→q)∧(q→¬p)
3) ¬p→q
4) q→r
5) ¬p→r
6) ¬p
7) r
8) ¬r
9) r∧¬r (⇔ F0)
10)∴ p
Reasons
Premise
Step (1) and ¬p↔q ⇔ (¬p→q)∧(q→¬p)
Step (2) and Rule of Conjunctive Simplification
Premise
Steps (3) and (4) and Law of the Syllogism
Premise (the one assumed)
Steps (5) and (6) and Rule of Detachment
Premise
Steps (7) and (8) and Rule of Conjunction
Steps (6) and (9) and the method of
Proof by Contradiction
Open Statement
• A declarative sentence is an open
statement if
– 1) it contains one or more variables, and
– 2) it is not a statement, but
– 3) it becomes a statement when the variables
in it are replaced by certain allowable choices.
• e.g.
– p(x): The number x+2 is an even integer.
Open Statement (2)
• e.g.
• q(x, y): The numbers y+2, x−y, and x+2y are
even integers.
• p(x): x≥0.
• q(x): x2≥0.
Quantifier
• Here the universe comprises all real
numbers. The open statements p(x), q(x),
r(x), and s(x) are given by
p(x): x≥0,
r(x): x2−3x−4=0,
q(x): x2≥0, s(x): x2−3>0.
• Then
– ∃x [p(x)∧r(x)] is true (∃: Existential Quantifier)
– ∀x [p(x)→q(x)] is true (∀: Universal Quantifier)
– ∀x [q(x)→s(x)] is false
Table 2.21
Statement
When Is It
True?
When Is It
False?
∃x p(x)
For some a in the
universe, p(a) is true.
For every a in the
universe, p(a) is false.
∀x p(x)
For every a in the
universe, p(a) is true.
For some a in the
universe, p(a) is false.
∃x ¬p(x)
∀x ¬p(x)
For some a in the
For every a in the
universe, p(a) is false. universe, p(a) is true.
For every a in the
For some a in the
universe, p(a) is false. universe, p(a) is true.
Logical Equivalence of Open
Statements
• Let p(x), q(x) be open statements defined
for a given universe.
• The open statements p(x) and q(x) are
called (logically) equivalent, and we write
∀x [p(x) ⇔ q(x)] when the biconditional
p(a) ↔ q(a) is true for each replacement a
from the universe (that is, p(a) ⇔ q(a) for
each a in the universe).
Logical Equivalence of Open
Statements (2)
• For the universe of all triangles in the
plane, let p(x), q(x) denote the open
statements:
p(x): x is equiangular,
q(x): x is equilateral.
∵ p(a) ↔ q(a) is true for every triangle a in
the plane
∴ ∀x [p(x) ⇔ q(x)]
(p(x) and q(x) are logically equivalent)
Logical Implication of Open
Statements
• Let p(x), q(x) be open statements defined
for a given universe.
• If the implication p(a)→ q(a) is true for
each a in the universe (that is, p(a)⇒ q(a)
for each a in the universe), then we write
∀x [p(x) ⇒ q(x)] and say that p(x) logically
implies q(x).
Logical Implication of Open
Statements (2)
• For the universe of all triangles in the
plane, let p(x), q(x) denote the open
statements:
p(x): x is equiangular,
q(x): x is equilateral.
∵ p(a) → q(a) is true for every triangle a in
the plane
∴ ∀x [p(x) ⇒ q(x)]
(p(x) logically implies q(x))
Logical Equivalence and Logical
Implication for Qualifier Statement
• ∃x [p(x)∧q(x)] ⇒ [∃x p(x)∧∃x q(x)]
1.Suppose ∃x [p(x)∧q(x)] is true.
2.p(a)∧q(a) is true for some a.
3.p(a) is true and q(a) is true for some a.
4.∃x p(x) is true and ∃x q(x) is true.
5.[∃x p(x)∧∃x q(x)] is true.
Negating Statement with One
Quantifier
• ¬[∀x p(x)] ⇒ ∃x ¬p(x)
1.Suppose ¬[∀x p(x)] is true.
2.∀x p(x) is false.
3.p(a) is false for some a.
4.¬p(a) is true for some a.
5.∃x ¬p(x) is true.
Negating Statement with One
Quantifier (2)
• ∃x ¬p(x) ⇒ ¬[∀x p(x)]
1.Suppose ∃x ¬p(x) is true.
2.¬p(a) is true for some a.
3.p(a) is false for some a.
4.∀x p(x) is false.
5.¬[∀x p(x)] is true
See Table 2.21
Example 2.49
• Let p(x, y), q(x, y), and r(x, y) represent
three open statements, with replacements
for the variables x, y chosen from some
prescribed universe(s). What is the
negation of the following statement?
∀x∃y [(p(x, y)∧q(x, y))→r(x, y)]
Example 2.49 (2)
• ¬[∀x∃y [(p(x, y)∧q(x, y))→r(x, y)]]
⇔ ∃x [¬[∃y [(p(x, y)∧q(x, y))→r(x, y)]]]
⇔ ∃x∀y ¬[(p(x, y)∧q(x, y))→r(x, y)]
⇔ ∃x∀y ¬[¬[p(x, y)∧q(x, y)]∨r(x, y)]
⇔ ∃x∀y [¬¬[p(x, y)∧q(x, y)]∧¬r(x, y)]
⇔ ∃x∀y [p(x, y)∧q(x, y)∧¬ r(x, y)].
Rule of Universal Specification
• If an open statement becomes true for all
replacements by the members in a given
universe, then that open statement is true
for each specific individual member in that
universe.
• (A bit more symbolically—if p(x) is an open
statement for a given universe, and if ∀x
p(x) is true, then p(a) is true for each a in
the universe.)
Example 2.53
• For the universe of all people, consider the
open statements
m(x): x is a mathematics professor,
c(x): x has studied calculus.
• Now consider the following argument.
– All mathematics professors have studied
calculus. ∀x [m(x)→c(x)]
– Leona is a mathematics professor. m(Leona)
– Therefore Leona has studied calculus.∴ c(Leona)
Example 2.53 (2)
• If we let l represent this particular woman
(in our universe) named Leona, then we
can rewrite this argument in symbolic form
as
∀x [m(x)→c(x)]
m(l)
∴ c(l)
Example 2.53 (3)
Steps
1) ∀x [m(x)→c(x)]
2) m(l)→c(l)
3) m(l)
4) ∴ c(l)
Reasons
Premise
Step (1) and Rule of Universal Specification
Premise
Steps (2) and (3) and the Rule of Detachment
Rule of Universal Generalization
• If an open statement p(x) is proved to be true when
x is replaced by any arbitrarily chosen element c
from our universe, then the universally quantified
statement ∀x p(x) is true.
• Furthermore, the rule extends beyond a single
variable. So if, for example, we have an open
statement q(x, y) that is proved to be true when x
and y are replaced by arbitrarily chosen elements
from the same universe, or their own respective
universes, then the universally quantified statement
∀x∀y q(x, y) [or, ∀x,y q(x, y)] is true.
• Similar results hold for the cases of three or more
variables.
Example 2.56
• Show the following argument is
∀x [p(x)∨q(x)]
∀x [(¬p(x)∧q(x))→r(x)]
∴ ∀x [¬r(x)→ p(x)]
Example 2.56 (2)
Steps
1) ∀x [p(x)∨q(x)]
2) p(c)∨q(c)
3) ∀x [(¬p(x)∧q(x))→r(x)]
4) [(¬p(c)∧q(c))→r(c)]
5) ¬r(c)→¬(¬p(c)∧q(c))
6) ¬r(c)→[p(c)∨¬q(c)]
7) ¬r(c)
8) p(c)∨¬q(c)
9) [p(c)∨q(c)]∧[p(c)∨¬q(c)]
10)p(c)∨[q(c)∧¬q(c)]
11)p(c)∨ F0
12)p(c)
13)∀x [¬r(x)→ p(x)]
Reasons
Premise
Step (1) and Rule of Universal Specification
Premise
Step (3) and Rule of Universal Specification
Step (4) and s →t ⇔ ¬t →¬s
Step (5), 2nd DeMorgan’s Law, and Law
of Double Negation
Premise (assumed)
Steps (7) and (6) and Modus Ponens
Steps (2) and (8) and Rule of Conjunction
Step (9) and 1st Distributive Law
Step (10) and 2nd Inverse Law
Step (11) and 1st Indentity Law
Steps (7) and (11) and Rule of
Universal Generalization
Related documents