Logic - mrcampbellsmath

advertisement
Logic
What is Logic?
 logic
is a process people use to infer one
thing from another
 logic is the root of all mathematics and is
the root of all rational thought (truth)
Symbolic Logic
 Symbolic
logic, also known as
mathematical logic, is a subfield of
mathematics.
Example
𝑞 ∨ 𝑟 𝑖𝑛𝑑𝑖𝑐𝑎𝑡𝑒𝑠 q or r
𝑝 ∧ 𝑞 𝑖𝑛𝑑𝑖𝑐𝑎𝑡𝑒𝑠 𝑝 𝑎𝑛𝑑 𝑞
Worded Expressions
 Translating

from English to symbols.
But and neither-Nor
Example
Dogs bark and cats meow.
Symbols








The symbol ~ denotes not
pΛq denotes “p and q”
pVq denotes “p or q”
∀ denotes “for all”
∃ denotes “there exists”
p⊕q denotes “p or q but not both p and q”
P≡Q denotes “P is logically equivalent to Q”
p→q denotes “if p then q”
Symbolic Logical Expressions
 Given
a statement p, the sentence “~p” is
read “not p” or “It is not the case that p”
and is called the negation of p.
Example

𝐴 ∨ 𝐵 ∧ ~𝐶 → 𝐷

 It


If A or B and if not C, Then D
is not hot and it is sunny.
Letting h=“it is hot” and s=“it is sunny”
~ℎ ∧ 𝑠
Practice
 Translate
the symbolic expression to a
worded expression.

(~𝐴 ∨ ~𝐵) ∧ 𝐶 → 𝐷
Practice
 Translate
the worded expression to a
symbolic expression.


Let h=“it is hot” and s=“it is sunny”
It is neither hot nor sunny.
De Morgan’s Laws
 The
negation of an and statement is
logically equivalent to the or statement in
which each component is negated.
 The negation of an or statement is
logically equivalent to the and statement
in which each component is negated.
Example
 Write
the negation for the following
statement.


John is 6 feet tall and he weighs at least 200
pounds.
John is not 6 feet tall or he weighs less than
200 pounds.
Example
 Write
the negation for the following
statement.

The bust late or Tom’s watch was slow.
 The
bus was not late and Tom’s watch was
not slow.
Individual Practice
 Use
De Morgan’s laws to write the
negations for the statements.



Sam is an orange belt and Kate is a red
belt.
The connector is loose or the machine is
unplugged.
Hal is a math major and Hal’s sister is a
computer science major.
Conjunction of p and q
 The
sentence “pΛq” is read “p and g”
and is called conjunction of p and q.
 It is true when, and only when, both p and
q are true.
 If either p or q is false, or if both are false,
p and q is false.
Disjunction of p and q
 The
sentence “pVq” is read “p or q” and
is called the disjunction of p and q.
 It is true when either p is true, or q is true,
or both p and q are true; it is false only
when both p and q are false.
Example
 Letting
h = “It is hot” and s = “It is sunny”
write each of the following sentences
symbolically.

It is not hot but it is sunny.
 ~hΛs.

It is not hot and it is not sunny.
 ~h
Λ~s.
Practice
 Let
s = “stocks are increasing” and
i=“interest rates are steady.”


Stocks are increasing but interest rates are
steady
Neither are stocks increasing nor are
interest rates steady.
Practice
 Juan
is a math major but not a computer
science major. (m=Juan is a math major,
c= Juan is a computer science major)
Principles of Logic
 Objective:
SWBAT establish logical
consequences through the use of truth
tables, syllogism, and deductive
reasoning.
Logical Consequences
 Logical
consequence is a fundamental
concept in logic. It is the relation that
holds between a set of sentences (or
propositions) and a sentence
(proposition) when the former "entails" the
latter.
Example
 'Kermit
is green' is said to be a logical
consequence of 'All frogs are green' and
'Kermit is a frog', because it would be "selfcontradictory" to affirm the latter and
deny the former.
 "If it isn't obvious, it isn't logical." -Nelsen
Truth Tables
 Truth
tables can be used to tell whether a
propositional expression is true for all
legitimate input values, that is, logically
valid.
Example
 Conjunction
P
q
pΛq
T
T
T
T
F
F
F
T
F
F
F
F
Example
 Disjunction
P
q
pVq
T
T
T
T
F
T
F
T
T
F
F
F
Syllogism
A
syllogism or logical appeal is a kind of
logical argument in which one proposition
(the conclusion) is inferred from two others
(the premises) of a certain form.
Syllogism Continued
 Syllogisms
are arguments that take several
parts, normally with two statements which
are assumed to be true that lead to a
conclusion.
 Major
premise: A general statement.
Minor premise: A specific statement.
Conclusion: based on the two premises
Example
 Aristotle's
Syllogism
If all humans are mortal,
and all Greeks are humans,
then all Greeks are mortal.
Deductive Argument
A
deductive argument is an argument in
which it is thought that the premises
provide a guarantee of the truth of the
conclusion.
Deductive Argument
Continued
 In
a deductive argument, the premises
are intended to provide support for the
conclusion that is so strong that, if the
premises are true, it would be impossible
for the conclusion to be false.
Example
 All
men are mortal. Joe is a man.
Therefore Joe is mortal.
 If the first two statements are true, then
the conclusion must be true.
Statement Composition
A
statement (or proposition) is a sentence
that is true or false but not both.
Inverse
A
conditional statement and its inverse
are not logically equivalent.
 Suppose
a conditional statement of the form “If
p then q” is given.

The inverse is “If ~p then ~q.”
Example
 If
Howard can swim across the lake, then
Howard can swim to the island.

Inverse: If Howard cannot swim across the
lake, then Howard cannot swim to the
island.
Practice
 Write
the inverse of the following
statement.

If today is Easter, then tomorrow is Monday.
Converse
A
conditional statement and its converse
are not logically equivalent.


Suppose a conditional statement of the
form “If p then q” is given.
The converse is “If q then p.”
Example
 If
Howard can swim across the lake, then
Howard can swim to the island.

If Howard can swim to the island, then
Howard can swim across the lake.
Practice
 Write
the converse of the following
statement.

If today is Easter, then tomorrow is Monday.
Contrapositive
 The
contrapositive of a conditional
statement of the form “If p then q” is
If ~q then ~p.
 Symbolically,
The contrapositive of 𝑝 → 𝑞 is ~𝑞 → ~𝑝.
Example
 If
Howard can swim across the lake, then
Howard can swim to the island.

Contrapositive: If Howard cannot swim to
the island, then Howard cannot swim across
the lake.
Practice
 Write
the contrapositive of the following
statement.

If today is Easter, then tomorrow is Monday.
Logically Equivalent

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 writing P ≡ Q.
Testing
 Step
1: Construct a truth table for P with
one column for the truth values of P and
another column for the truth values of Q.
 Step 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.
Step 2 Continued
 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.
 If in some row P has a different truth value
from Q, then P and Q are not logically
equivalent.
Wrap-up
Download