Uploaded by vincestark24

FUNDAMENTALS OF LOGIC2

advertisement
Fundamentals
of Logic
GE 3 (Mathematics in Modern World)
Joemar D. Sumalinog
1
Fundamentals of Logic
What is Logic?
Definitions:
 Logic is a study of correct reasoning. It is
crucial for mathematical reasoning.
 Logic is the study of methods and principles
used to distinguish good from bad
reasoning (Irving Copi, Symbolic Logic).
SET THEORY & LOGIC
2
Fundamentals of Logic
Definitions:
 Logic is a system based on
propositions.
 Logic is the hygiene that the
mathematician practices to keep his
ideas healthy and strong.
[Hermann Weyl, The American Mathematical Monthy (1950)]
SET THEORY & LOGIC
3
Propositions
Definitions:
 A statement (proposition) is a declarative
sentence or assertion that is either true
or false, but is not both true and false.
 Truth Value it refers to the truthfulness
or falsity of a statement.
SET THEORY & LOGIC
4
Propositions
Example 1:
“Elephants are bigger than mice.”
Is this a statement?
YES
What is the truth value of the proposition?
TRUE
SET THEORY & LOGIC
5
Propositions
Example 2:
“520 < 111”
Is this a statement?
YES
What is the truth value of the proposition?
FALSE
SET THEORY & LOGIC
6
Propositions
Example 3:
“Chocolate ice cream is the best.”
Is this a statement?
YES
What is the truth value of the proposition?
NEITHER TRUE NOR FALSE
SET THEORY & LOGIC
7
Propositions
Example 5:
“Today is September 7 and 99 < 5.”
Is this a statement?
YES
What is the truth value of the proposition?
FALSE
SET THEORY & LOGIC
8
Propositions
Example 6:
“Please, do not fall asleep.”
Is this a statement?
NO
What is the truth value of the proposition?
Only statements can be propositions.
SET THEORY & LOGIC
9
Propositions
Example 7:
“x < y if and only if y > x.”
Is this a statement?
YES
What is the truth value of the proposition?
TRUE because its truth value does not
depend on specific values of x and y.
SET THEORY & LOGIC
10
Propositions
Example 9:
“7 + 5 = 10”
Is this a statement?
YES
What is the truth value of the proposition?
FALSE
SET THEORY & LOGIC
11
Propositions
Example 10:
“There exists a real number x
such that 2x + 5 = 10”
Is this a statement?
YES
What is the truth value of the proposition?
TRUE (x = 2.5 ; 2.5 ∈ R)
SET THEORY & LOGIC
12
Propositions
The following are examples of not propositions:
1. Who are you?
(a question)
2. Read this chapter before the next class.
(a command)
3. Go away!
(an exclamation)
4. This sentence is not true.
(self-contradictory)
SET THEORY & LOGIC
13
Compound Propositions (Statements)
Definitions:
 A statement that contains NO
connectives is called a SIMPLE
statement.
 A statement that contains connectives is
called a COMPOUND statement.
SET THEORY & LOGIC
14
CONNECTIVES
Definitions:
 A logical operator (or connective) on
mathematical statement is a word or
combination of words that combines one or
more mathematical statements to make a
new mathematical statement.
 A truth table is a diagram which details all
the possible outcomes for a given statement.
SET THEORY & LOGIC
15
Conjunction (AND)
Definition:
The Conjunction of the statements P and
Q is the statement “P and Q” and it is denoted
by
P˄Q.
Truth Value:
The statement P ˄ Q is true only when
both P and Q are true.
SET THEORY & LOGIC
16
Conjunction (AND)
Truth Table: Conjunction (P ˄ Q)
P
Q
P˄ Q
T
T
F
F
T
F
T
F
T
F
F
F
SET THEORY & LOGIC
17
Disjunction (OR)
Definition:
The Disjunction of the statements P and Q
is the statement “P or Q” and it is denoted by
P˅Q.
Truth Value:
The statement P ˅ Q is true only when at
least one of P or Q is true.
SET THEORY & LOGIC
18
Disjunction (OR)
Truth Table: Disjunction (P ˅ Q)
P
Q
P˅ Q
T
T
F
F
T
F
T
F
T
T
T
F
SET THEORY & LOGIC
19
Negation (NOT)
Definition:
The Negation of the statement P is the
statement “Not P”. It is the denial of any
proposition P and is denoted by ~ P or ¬ P
Truth Value:
The negation of P is true only when
P is false, and ~ P is false only when P is
true.
SET THEORY & LOGIC
20
Negation (NOT)
Truth Table: Negation ( ~ P )
P
~P
T
F
F
T
SET THEORY & LOGIC
21
Negation (NOT)
Negation of ALL, SOME, and NO:
Statement
All
Some
Some… not
No
Negation
Some… not
No
All
Some
Note: In mathematics, the word “some” is used to
mean “at least one”.
SET THEORY & LOGIC
22
Negation (NOT)
Example:
Let P = All students have pens.
~ P = Not all students have pens.
Or
~ P = At least one student does not have
pens.
Or
~ P = Some students do not have pens.
SET THEORY & LOGIC
23
Negation (NOT)
Example: Write the negation of each of the
following statements.
1. All people have compassion.
Some people do not have compassion.
2. Some animals are dirty
No animal is dirty.
3. Some students do not take GE 3.
All students take GE 3.
4. No students are enthusiastic.
Some students are enthusiastic.
SET THEORY & LOGIC
24
Conditional or Implication (If - then)
Definition:
The Implication or Conditional is the statement
“If P then Q” and is denoted by P → Q . The statement
P → Q is often read as “P implies Q”. (Note that P is
called the hypothesis (or antecedent or premise) and Q is
called the conclusion (or consequence).
Truth Value:
The statement P → Q is false only when P is true
and Q is false. In other words, a true statement cannot
imply a false statement.
SET THEORY & LOGIC
25
Conditional or Implication (If - then)
Truth Table: Conditional (P → Q)
P
Q
P→ Q
T
T
F
F
T
F
T
F
T
F
T
T
SET THEORY & LOGIC
26
Conditional or Implication (If - then)
Note:
You can think of a CONDITIONAL
STATEMENT as a PROMISE.
Statement:
“If you get a rating of A on your test,
then I will give a treat.”
SET THEORY & LOGIC
27
Conditional or Implication (If - then)
Questions:
What will happen if you get an A? Are you
expecting a treat from me?
If I do, I have kept my promise, so my
statement is TRUE.
What if I refuse to give you a treat after earning
an A?
If I refuse, I have broken my promise so
the statement is FALSE.
SET THEORY & LOGIC
28
Conditional or Implication (If - then)
Questions:
What will happen if you don’t get an A?
If you don’t get an A, there is no way that I
can break my promise.
Whether I give a treat or not, you can’t say
I broke my promise, so the statement is TRUE.
SET THEORY & LOGIC
29
Conditional or Implication (If - then)
Here are some common ways to express the
conditional statement P → Q in the English language:
 If P, then Q.
 Q if P.
 Q whenever P.
 Q, provided that P.
 Whenever P, then also Q.
 P is a sufficient condition for Q.
 Q is a necessary condition for P.
 For Q, it is sufficient that P.
 For P, it is necessary that Q.
 P only if Q.
SET THEORY & LOGIC
30
Variations of the Conditional
Definition:
Given the conditional P → Q , we define:
1. The CONVERSE
:
Q → P
2. The INVERSE
:
~P → ~Q
3. The CONTRAPOSITIVE :
~Q → ~P
SET THEORY & LOGIC
31
Variations of the Conditional
Example 1:
Let
P:
Q:
You are a Filipino.
You are an Asian.
Statement: P → Q
If you are a Filipino, then you are an Asian.
Converse: Q → P
If you are an Asian, then you are a Filipino.
Inverse:
~P → ~Q
If you are not a Filipino, then you are not an Asian.
Contrapositive: ~Q → ~P
If you are not an Asian, then you are not a Filipino.
SET THEORY & LOGIC
32
Variations of the Conditional
Example 2:
Let
P:
Q:
This animal is a bird.
This animal has wings.
Statement: P → Q
If this animal is a bird, then it has wings.
Converse:
Q → P
If this animal has wings, then it is a bird.
Inverse:
~P → ~Q
If this animal is not a bird, then it does not have wings.
Contrapositive: ~Q → ~P
If this animal does not have wings, then it is not a bird.
SET THEORY & LOGIC
33
Example 3:
Statement
(Conditional)
If two angles are congruent, then
they have the same measure.
Converse
If two angles have the same measure,
then they are congruent.
Inverse
If two angles are not congruent, then
they do not have the same measure.
Contrapositive
If two angles do not have the same
measure, then they are not
congruent.
34
Statement
If a figure is a square, then it
is a quadrilateral.
Converse
If a figure is a quadrilateral,
then it is a square.
Inverse
If a figure is not a square,
then it is not a quadrilateral.
Contrapositive If a figure is not a
quadrilateral, then it is not a
square.
35
Statement
If two angles are congruent,
then they have the same
measure.
Converse
If two angles have the same
measure, then they are
congruent.
Inverse
If two angles are not congruent,
then they do not have the same
measure.
Contrapositive If two angles do not have the
same measure, then they are not
congruent.
36
Statement
If n > 2, then n2 > 4.
Converse
If n2 > 4, then n > 2.
Inverse
If n ≤ 2, then n2 ≤ 4.
Contrapositive
If n2 ≤ 4, then n ≤ 2.
37
Variations of the Conditional
Truth Table:
P
Q
~P
~Q
T
T
F
F
T
F
T
F
F
F
T
T
F
T
F
T
Statement
Converse
Inverse
Contrapositive
P→Q
Q→P
~P → ~Q
~Q → ~P
T
F
T
T
T
T
F
T
T
T
F
T
T
F
T
T
SET THEORY & LOGIC
38
Biconditional (if and only if)
Definition:
The Biconditional of the statements P and Q
is the statement “P if and only if Q” and it is
denoted by P ↔ Q .
Truth Value:
The statement P ↔ Q is true if P and Q have
the same truth value. If P and Q have opposite
truth value, then the statement is false.
SET THEORY & LOGIC
39
Biconditional (if and only if)
Truth Table: Biconditional (P ↔ Q)
P
Q
P↔ Q
T
T
F
F
T
F
T
F
T
F
F
T
SET THEORY & LOGIC
40
Biconditional (if and only if)
Truth Table: P ↔ Q = (P → Q) and (Q → P)
P
Q
T
T
F
F
T
F
T
F
P → Q Q → P (P → Q) ˄ (Q → P)
T
F
T
T
T
T
F
T
T
F
F
T
SET THEORY & LOGIC
41
Biconditional (if and only if)
There are many ways of saying P ↔ Q in English. The following
constructions all mean P ↔ Q :




P if and only if Q.
P is a necessary and sufficient condition for Q.
For P it is necessary and sufficient that Q.
If P, then Q, and conversely.
Note:
The first three of these just combine constructions from the previous
section to express that P → Q and Q → P.
In the last one, the words “...and conversely” mean that in addition to
“If P, then Q” being true, the converse statement “If Q, then P” is also
true.
SET THEORY & LOGIC
42
Exclusive Or (XOR)
Definition:
The Exclusive Or of the statements P and Q
is the statement “Either P or Q, but not both”
and it is denoted by P  Q or P ⊻ Q
Truth Value:
The statement P  Q is true if P and Q
have opposite truth values. If P and Q have the
same truth values, then the statement is false.
SET THEORY & LOGIC
43
Exclusive Or (XOR)
Truth Table: Exclusive Or (P  Q), or (P ⊻Q)
P
Q
P Q
T
T
F
F
T
F
T
F
F
T
T
F
SET THEORY & LOGIC
44
SUMMARY: Connectives & Meanings
SET THEORY & LOGIC
45
SUMMARY: Truth Table
SET THEORY & LOGIC
46
Constructing Truth Tables:
1. (P ˅ Q) ∧ ~ (P ∧ Q)
Constructing Truth Tables:
1. (P ˅ Q) ∧ ~ (P ∧ Q)
Constructing Truth Tables:
2. (P ∨ ~Q) → (P ∧ Q)
Constructing Truth Tables:
2. (P ∨ ~Q) → (P ∧ Q)
Constructing Truth Tables:
3. P ↔ (Q ∨ R)
Constructing Truth Tables:
3. P ↔ (Q ∨ R)
(P ∧ ~Q) →R
(P ∧ ~Q) →R
Tautologies & Contradictions
Definitions:
 Tautology is a compound proposition that is
always TRUE, no matter what the truth values
of the propositional variables that occur in it.
 Contradiction is a compound proposition that
is always FALSE.
 A compound proposition that is neither a
tautology nor a contradiction is called a
Contingency.
SET THEORY & LOGIC
56
Tautologies & Contradictions
Examples: Show that each statement is Tautology.
(Hint: Construct the truth tables)
1. P  (~ P)
2. ~ (P ˅ Q) ↔ (~P ˄ ~Q)
 If P  Q is a Tautology, we write P  Q and
read as “P implies Q”
 If P  Q is a Tautology, we write P  Q and
read as “P is logically equivalent to Q”
SET THEORY & LOGIC
57
Tautologies & Contradictions
Examples: Show that each statement is Contradiction.
(Hint: Construct the truth tables)
1. P  (~P)
2. ~ [~(P  Q) ↔ (~P  ~Q) ]
Note:
The negation of any tautology is a contradiction,
and the negation of any contradiction is a tautology.
SET THEORY & LOGIC
58
Rules of Inference (Laws of Logic)
NOTE: All of these rules are TAUTOLOGIES
SET THEORY & LOGIC
60
Logical Equivalence
Definition:
Two propositions P(p,q,…) and Q(p,q,…)
are said to be logically equivalent, denoted by
P(p,q,…) ≡ Q(p,q,…) if they have the same
truth values for all possible combinations of
truth values for all variables appearing in the
two expressions.
Example:
(p → q) ⇔ ~[p ˄ (~q)]
SET THEORY & LOGIC
62
Logical Equivalence
Remark:
The symbol ≡ is not a logical
connective, and P ≡ Q is not a compound
proposition but rather is the statement
that P ↔ Q is a tautology.
The symbol ⇔ is sometimes used
instead of ≡ to denote logical
equivalence
SET THEORY & LOGIC
63
Logical Implication
Definition:
A proposition P(p,q,…) is said
logically imply a proposition Q(p,q,…),
written P(p,q,…) ⇒ Q(p,q,…) if Q(p,q,…) is
true whenever P(p,q,…) is true.
Example:
(p ˅ q) ⇒ (~q → p)
SET THEORY & LOGIC
64
Rules of Inference (Laws of Logic)
SET THEORY & LOGIC
65
Logical Fallacies
Definition:
The word “VALID or INVALID” refer
to the argument form, NOT to the “TRUTH
or FALSITY” of the proposition.
A valid argument asserts that the
conclusion follows from the hypothesis
according to one or more Tautologies.
SET THEORY & LOGIC
66
Logical Fallacies
A. Fallacy of Assuming the Consequent:
Argument Form:
P→Q
Q
∴ P
.
[ (P → Q) ∧ Q ] → P
SET THEORY & LOGIC
67
Logical Fallacies
B. Fallacy of Denying the Antecedent:
Argument Form:
P→Q
~P
∴ ~Q
.
[ (P → Q) ∧ ~P ] → ~Q
SET THEORY & LOGIC
68
Logical Fallacies
C. False Chain Pattern
[ (P → Q) ∧ (P → R) ] → (Q → R)
Argument Form:
P→Q
P→R
∴ Q→R
.
SET THEORY & LOGIC
69
Download