Download Logic - mrcampbellsmath

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
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