Uploaded by eyvgeni gusseltcev

Logical form and Logical Equivalence

advertisement
2.1 Logical form and Logical equivalence
8 January 2024
2.1 Logical form and Logical equivalence
1
Content
Statements: definition and composing new statements and, or, negation
1
Statements: definition and composing new statements and, or, negation
2
Truth values and truth table
3
Tautologies and contradictions
4
Logical equivalence and nonequivalence
5
De Morgan’s law
2.1 Logical form and Logical equivalence
2
Statements: definition and compound statements
Statements: definition and composing new statements and, or, negation
In logic, the words sentence, true, false are the initial undefined terms.
Definition
A statement (or proposition) is a sentence that is true or false but not
both.
Example
Indicate which of the following sentences are statements.
(a) 1024 is the smallest four-digit number that is a perfect square.
(b) She is a mathematics major.
(c) 128 = 26
(d) x = 26
2.1 Logical form and Logical equivalence
3
Statements
Statements: definition and composing new statements and, or, negation
Example
Answers:
(a) It is a statement because it is a true sentence. 1024 is a perfect square
because 1024 = 322 , and the next smaller perfect square is 312 = 961,
which has less than four digits.
(b) It is not a statement since the truth or falsity of this sentence depends
on the reference for the pronoun she.
(c) It is a statement because it is false. 26 = 64.
(d) It is not a statement because the truth or falsity depends on the value
of x: for x = 64 it is true, but for other values of x it is false.
2.1 Logical form and Logical equivalence
4
Compound statements
Statements: definition and composing new statements and, or, negation
Symbols that are used to build logical expressions out of simpler ones:
(i) the symbol ∼ denotes not. Given a statement p, the sentence ∼ p is
read not p or It is not the case that p. ∼ p is called the negation of p.
(ii) the symbol ∧ denotes and. Given statements p, q, the sentence p ∧ q
is read p and q and is called the conjunction of p and q.
(iii) the symbol ∨ denotes or . Given statements p,
q, the sentence p ∨q is read p or q and is called the disjunction of p and q.
2.1 Logical form and Logical equivalence
5
Compound statements
Statements: definition and composing new statements and, or, negation
The order of operations and rules:
(i) ∼ is performed first. Example: ∼ p ∧ q = (∼ p) ∧ q.
(ii) for ∧ and ∨ we use parantheses. Example:
an expression p ∧ q ∨ r is ambiguous. It must be written as either
(p ∧ q) ∨ r or p ∧ (q ∨ r ).
(iii) ”p but q”
means
(iv) ”neither p nor q”
∼ p∧ ∼ q.
”p and q”. Symbolically, p ∧ q.
means
”not p and not q”. Symbolically,
2.1 Logical form and Logical equivalence
6
Compound statements: Example 1
Statements: definition and composing new statements and, or, negation
Let s=stocks are increasing and i=interest rates are steady.
Write the following statements in symbolic form.
(a) Stocks are increasing but interest rates are steady.
(b) Neither are stocks increasing nor are interest rates steady.
2.1 Logical form and Logical equivalence
7
Compound statements: Example 1
Statements: definition and composing new statements and, or, negation
Let s=stocks are increasing and i=interest rates are steady.
(a) s ∧ i
(b) ∼ s ∧ ∼ i
2.1 Logical form and Logical equivalence
8
Compound statements: Example 2
Statements: definition and composing new statements and, or, negation
Let h=John is healthy, w =John is wealthy and s=John is wise.
Write the following statements in symbolic form.
(a) John is healthy and wealthy but not wise.
(b) John is neither wealthy nor wise, but he is healthy.
2.1 Logical form and Logical equivalence
9
Compound statements: Example 2
Statements: definition and composing new statements and, or, negation
Let h=John is healthy, w =John is wealthy and s=John is wise.
Write the following statements in symbolic form.
(a) (h ∧ w )∧ ∼ s
(b) (∼ w ∧ ∼ s) ∧ h
2.1 Logical form and Logical equivalence
10
Compound statements: Example 3
Statements: definition and composing new statements and, or, negation
Assume x is a particular real number. Introduce statements and write
inequalities in symbolic form.
(a) −2 < x < 7
(b) x < 2 or x > 5
(c) 1 > x ≥ −3
2.1 Logical form and Logical equivalence
11
Compound statements: Example 3
Statements: definition and composing new statements and, or, negation
Assume x is a particular real number. Introduce statements and write
inequalities in symbolic form.
(a) Let p be x > −2 and q be x < 7. Then p ∧ q.
(b) Let p be x < 2 and q be x > 5. Then p ∨ q.
(c) Let p be x > −3, q be x = −3 and r be x < 1. Then (p ∨ q) ∧ r .
2.1 Logical form and Logical equivalence
12
Content
Truth values and truth table
1
Statements: definition and composing new statements and, or, negation
2
Truth values and truth table
3
Tautologies and contradictions
4
Logical equivalence and nonequivalence
5
De Morgan’s law
2.1 Logical form and Logical equivalence
13
Truth values. Statement forms
Truth values and truth table
Compound sentences are made of components statements and the terms
and, or and not. If such sentences are to be statements, then they must
have well-defined truth values. Every statement has a truth value,
namely true (denoted by T ) or false (denoted by F ). We now define such
compound sentences as statements by specifying their truth values in
terms of the statements that compose them. The truth values comprise a
truth table for the statement.
Definition
A statement form (or propositional form) is an expression made up of
statement variables (such as p, q, r ) and logical connectives (∧, ∨, ∼). It
becomes a statement when actual statements are substituted for the
component statement variables. The truth table for a given statement
form displays the truth values that correspond to all possible combinations
of truth values for its component statement variables.
2.1 Logical form and Logical equivalence
14
Truth table for negation of a statement
Truth values and truth table
Let p be a statement variable. Construct a truth table for ∼ p.
2.1 Logical form and Logical equivalence
15
Truth table for negation of a statement
Truth values and truth table
Let p be a statement variable. Construct a truth table for ∼ p.
p
T
F
∼p
F
T
2.1 Logical form and Logical equivalence
16
Truth table for conjunction of two statements
Truth values and truth table
Let p and q be statement variables. Construct a truth table for p ∧ q.
2.1 Logical form and Logical equivalence
17
Truth table for conjunction of two statements
Truth values and truth table
Let p and q be statement variables. Construct a truth table for p ∧ q.
p
T
T
F
F
q
T
F
T
F
p∧ q
T
F
F
F
2.1 Logical form and Logical equivalence
18
Truth table for disjunction of two statements
Truth values and truth table
Let p and q be statement variables. Construct a truth table for p ∨ q.
2.1 Logical form and Logical equivalence
19
Truth table for disjunction of two statements
Truth values and truth table
Let p and q be statement variables. Construct a truth table for p ∨ q.
p
T
T
F
F
q
T
F
T
F
p∨ q
T
T
T
F
2.1 Logical form and Logical equivalence
20
Truth table: Example 1
Truth values and truth table
Let p and q be statement variables. Construct a truth table for ∼ p ∧ q.
2.1 Logical form and Logical equivalence
21
Truth table: Example 1
Truth values and truth table
Let p and q be statement variables. Construct a truth table for ∼ p ∧ q.
p
T
T
F
F
q
T
F
T
F
∼p
F
F
T
T
∼p∧q
F
F
T
F
2.1 Logical form and Logical equivalence
22
Truth table: Example 2
Truth values and truth table
Let p and q be statement variables.
1. Write the statement form p or q but not both symbolically.
2. Construct a truth table for the statement p or q but not both.
2.1 Logical form and Logical equivalence
23
Truth table: Example 2 - Solution
Truth values and truth table
Let p and q be statement variables.
1. Write the statement form p or q but not both symbolically.
2. Construct a truth table for the statement p or q but not both.
1. Symbolically (p ∨ q)∧ ∼ (p ∧ q).
p
T
T
F
F
q
T
F
T
F
p∨q
T
T
T
F
p∧q
T
F
F
F
∼ (p ∧ q)
F
T
T
T
(p ∨ q)∧ ∼ (p ∧ q)
F
T
T
F
2.1 Logical form and Logical equivalence
24
Content
Tautologies and contradictions
1
Statements: definition and composing new statements and, or, negation
2
Truth values and truth table
3
Tautologies and contradictions
4
Logical equivalence and nonequivalence
5
De Morgan’s law
2.1 Logical form and Logical equivalence
25
Tautologies and Contradictions
Tautologies and contradictions
Definition
A tautology is a statement form that is always true regardsless of the
truth values of the individual statements substituted for its statement
variables. A statement whose form is a tautology is a tautological
statement, denoted by t.
A contradiction is a statement form that is always false regardless of the
truth values of the individual statements substituted for its statement
variables. A statement whose form is a contradiction is a contradictory
statement, denoted by c.
Hence the truth of a tautological statement and the falsity of a
contradictory statement are due to the logical structure of the statements
themselves and are independent of the meanings of the statements.
2.1 Logical form and Logical equivalence
26
Tautologies and contradictions: Example 1
Tautologies and contradictions
Show that the statement form p∨ ∼ p is a tautology and that the
statement form p∧ ∼ p is a contradiction.
2.1 Logical form and Logical equivalence
27
Tautologies and contradictions: Solution 1
Tautologies and contradictions
Construct a truth table for p∨ ∼ p and p∧ ∼ p.
p
T
F
∼p
F
T
p∨ ∼ p
T
T
p∧ ∼ p
F
F
2.1 Logical form and Logical equivalence
28
Tautologies and contradictions: Example 2
Tautologies and contradictions
Use truth table to establish whether a statement form
(p∧ ∼ q) ∧ (∼ p ∨ q)
is tautology or contradiction.
2.1 Logical form and Logical equivalence
29
Tautologies and contradictions: Solution 2
Tautologies and contradictions
p
T
T
F
F
q
T
F
T
F
∼p
F
F
T
T
∼q
F
T
F
T
p∧ ∼ q
F
T
F
F
∼p∨q
T
F
T
T
(p∧ ∼ q) ∧ (∼ p ∨ q)
F
F
F
F
Truth values of (p∧ ∼ q) ∧ (∼ p ∨ q) are all F, so it is a contradiction.
2.1 Logical form and Logical equivalence
30
Content
Logical equivalence and nonequivalence
1
Statements: definition and composing new statements and, or, negation
2
Truth values and truth table
3
Tautologies and contradictions
4
Logical equivalence and nonequivalence
5
De Morgan’s law
2.1 Logical form and Logical equivalence
31
Logical equivalence and nonequivalence
Logical equivalence and nonequivalence
Definition
Two statement forms are called logically equivalent if, and only if, they
have identical truth values for each possible substitution of statements for
their statement variables. The logical equivalence of statement forms P
and Q is denoted by P ≡ Q.
Two statements are called logically equivalent if, and only if, they have
logically equivalent forms when identical component statement variables
are used to replace identical component statements.
2.1 Logical form and Logical equivalence
32
How to show logical equivalence of two statement
forms?
Logical equivalence and nonequivalence
Let P and Q be two statement forms. To test for logical equivalence:
1. Construct a truth table with one column for the truth values of P and
another column for the truth values of Q.
2. Check each combination of truth values of the statement variables to
see whether the truth value of P is the same as the truth value of Q.
(a) If in each row the truth value of P is the same as the truth value of Q,
then P and Q are logically equivalent.
(b) If in some row P has a different truth value from Q, then P and Q are
not logically equivalent.
2.1 Logical form and Logical equivalence
33
Logical equivalence: Example 1
Logical equivalence and nonequivalence
Construct a truth table to show that the negation of the negation of a
statement is logically equivalent to the statement, annotating the table
with a sentence of explanation.
2.1 Logical form and Logical equivalence
34
Logical equivalence: Example 1 - Solution
Logical equivalence and nonequivalence
Let p be a statement. Need to show ∼ (∼ p) ≡ p. Construct a truth table
for ∼ (∼ p).
p
T
F
∼p
F
T
∼ (∼ p)
T
F
p and ∼ (∼ p) always have the same truth values, so they are logically
equivalent.
2.1 Logical form and Logical equivalence
35
Logical equivalence: Example 2
Logical equivalence and nonequivalence
Determine whether the following statement forms are logically equivalent.
In each case, construct a truth table and include a sentence justifying your
answer.
(a) p ∨ t and t, where t is a tautology.
(b) p ∨ (p ∧ q) and p.
2.1 Logical form and Logical equivalence
36
Logical equivalence: Example 2 (a) - Solution
Logical equivalence and nonequivalence
Let us construct a truth table.
p
T
F
t
T
T
p∨t
T
T
p∨t and t always have the same truth values, so they are logically
equivalent., i.e. p∨t≡t.
2.1 Logical form and Logical equivalence
37
Logical equivalence: Example 2 (b) - Solution
Logical equivalence and nonequivalence
Let us construct a truth table.
p
T
T
F
F
q
T
F
T
F
p∧q
T
F
F
F
p∨(p∧q)
T
T
F
F
p
T
T
F
F
p∨(p∧q) and p always have the same truth values, so they are logically
equivalent., i.e. p∨(p∧q)≡p.
2.1 Logical form and Logical equivalence
38
Content
De Morgan’s law
1
Statements: definition and composing new statements and, or, negation
2
Truth values and truth table
3
Tautologies and contradictions
4
Logical equivalence and nonequivalence
5
De Morgan’s law
2.1 Logical form and Logical equivalence
39
Logical equivalence
De Morgan’s law
Show logical equivalence of the statement forms:
(a) ∼ (p ∧ q) ≡∼ p∨ ∼ q
(HW)
(b) ∼ (p ∨ q) ≡∼ p∧ ∼ q
2.1 Logical form and Logical equivalence
40
Logical equivalence: Solution to (b)
De Morgan’s law
Let us construct a truth table.
p
T
T
F
F
q
T
F
T
F
∼p
F
F
T
T
∼q
F
T
F
T
p∨q
T
T
T
F
∼(p∨q)
F
F
F
T
∼ p∧ ∼ q
F
F
F
T
∼ (p ∨ q) and ∼ p∧ ∼ q always have the same truth values, so they are
logically equivalent., i.e.
∼ (p ∨ q) ≡∼ p∧ ∼ q
2.1 Logical form and Logical equivalence
41
De Morgan’s laws
De Morgan’s law
(i) The negation of an and statement is logically equivalent to the or
statement in which each component is negated. If p and q are statements,
then
∼ (p ∧ q) ≡∼ p∨ ∼ q
(ii) The negation of an or statement is logically equivalent to the and
statement in which each component is negated. If p and q are statements,
then
∼ (p ∨ q) ≡∼ p∧ ∼ q
2.1 Logical form and Logical equivalence
42
De Morgan’s laws: Example 1
De Morgan’s law
Write negations for each of the following statements:
(a) John is 6 feet tall and he weighs at least 200 pounds.
(b) The bust was late or Tom’s watch was slow.
2.1 Logical form and Logical equivalence
43
Solution 1
De Morgan’s law
(a) Let p be the statement ”John is 6 feet tall” and q be the statement
”he weighs at least 200 pounds”. Then we need to find a statement of the
form ∼ (p ∧ q). By De Morgan’s law, it is equivalent to ∼ p∨ ∼ q, i.e.
”John is not 6 feet tall or he weighs less than 200 pounds”.
(b) Let p be the statement ”the bus was late” and q be the statement
”Tom’s watch was slow”. Then we need to find a statement of the form
∼ (p ∨ q). By De Morgan’s law it is equivalent to ∼ p∧ ∼ q, i.e. ”The
bus was not late and Tom’s watch was not slow” or ”Neither was the bust
late nor was Tom’s watch slow”.
2.1 Logical form and Logical equivalence
44
Logical equivalence of two statements: Example 2
De Morgan’s law
Show that the two statements
”John is 6 feet tall and he weighs at least 200 pounds” and
”John is not 6 feet tall or he weighs less than 200 pounds”
are logically equivalent.
How to show that?
2.1 Logical form and Logical equivalence
45
Logical equivalence of two statements
De Morgan’s law
How to show that?
1. Introduce identical statement variables for identical component
statements in given two statements.
2. Write statement forms for given statements using variables in 1.
3. Show equivalence of statement forms in 2.
Solution: Let p be the statement ”John is 6 feet tall” and q be the
statement ”he weighs at least 200 pounds”. Then the statement ”John is
6 feet tall and he weighs at least 200 pounds” has the form
p∧q
and the statement ”John is not 6 feet tall or he weighs less than 200
pounds” has the form
∼ p∨ ∼ q
But these two statement forms are equivalent by De Morgan’s law, hence
given two statements are logically equivalent.
2.1 Logical form and Logical equivalence
46
De Morgan’s laws and Inequalities: Example
De Morgan’s law
Let x be a particular real number. Use De Morgan’s laws to write
negations for the statements:
(a) x < 2 or x > 5
(b) 1 > x ≥ −3
2.1 Logical form and Logical equivalence
47
Solution
De Morgan’s law
(a) 2 ≤ x ≤ 5
(b) x ≥ 1 or x < −3
2.1 Logical form and Logical equivalence
48
Theorem on Logical Equivalences
De Morgan’s law
Given any statement variables p, q and r , a tautology t and a
contradiction c, the following logical equivalences hold.
1 Commutative laws: p ∧ q ≡ q ∧ p
p∨q ≡q∨p
2 Associative laws: (p ∧ q) ∧ r ≡ p ∧ (q ∧ r )
(p ∨ q) ∨ r ≡ p ∨ (q ∨ r )
3 Distributive laws: p ∧ (q ∨ r ) ≡ (p ∧ q) ∨ (p ∧ r )
p ∨ (q ∧ r ) ≡ (p ∨ q) ∧ (p ∨ r )
4 Identity laws: p ∧ t ≡ p
p∨c≡p
5 Negation laws: p∨ ∼ p ≡ t
p∧ ∼ p ≡ c
6 Double negative law: ∼ (∼ p) ≡ p
7 Idempotent laws: p ∧ p ≡ p
p∨p ≡p
8 Universal bound laws: p ∨ t ≡ t
p∧c≡c
9 De Morgan’s laws:
∼ (p ∧ q) ≡∼ p∨ ∼ q
∼ (p ∨ q) ≡∼ p∧ ∼ q
10 Absorption laws: p ∨ (p ∧ q) ≡ p
p ∧ (p ∨ q) ≡ p
11 Negations of t and c: ∼ t ≡ c
∼c≡t
2.1 Logical form and Logical equivalence
49
Example 1
De Morgan’s law
Use the above theorem to verify the logical equivalence
∼ (∼ p ∧ q) ∧ (p ∨ q) ≡ p
2.1 Logical form and Logical equivalence
50
Solution 1
De Morgan’s law
∼ (∼ p ∧ q) ∧ (p ∨ q)
≡ (∼ (∼ p)∨ ∼ q) ∧ (p ∨ q)
≡ (p∨ ∼ q) ∧ (p ∨ q)
≡ p ∨ (∼ q ∧ q)
≡ p ∨ (q∧ ∼ q)
≡p∨c
≡p
by De Morgan’s laws
by the double negative law
by the distributive law
by the commutative law for∧
by the negation law
by the identity law.
2.1 Logical form and Logical equivalence
51
Example 2
De Morgan’s law
A logical equivalence is derived from the above Theorem. Supply a reason
for each step.
(p∧ ∼ q) ∨ (p ∧ q)
≡ p ∧ (∼ q ∨ q)
(a)
≡ p ∧ (q∨ ∼ q)
(b)
≡p∧t
≡p
(c)
(d)
2.1 Logical form and Logical equivalence
52
Solution 2
De Morgan’s law
(a) The distributive law
(b) The commutative law for ∨
(c) The negation law for ∨
(d) The identity law for ∧
2.1 Logical form and Logical equivalence
53
Download