Logic1

advertisement
Math 306
Foundations of Mathematics I
Goals of this class
• Introduction to important mathematical
concepts
• Development of mathematical reasoning skills
• Study of formal proof techniques
• Discussion of applications
1
Outline of Topics
• Mathematical Logic
• Proof Techniques
• Mathematical Induction
• Set Theory
• Functions
• Relations
2
Logic
• Logic is study of abstract reasoning,
specifically,
concerned with whether reasoning is
correct.
• Logic focuses on
relationship among statements
as opposed to
the content of any particular statement.
3
Example
Sequence of statements:
1) All students take Math306.
2) Anyone who takes Math306 is a Math major.
3) Therefore, all students are Math majors.
If (1) and (2) were true,
then logic would assure that (3) is true.
4
Outline of logic topics
• Simple Statements
• Compound Statements
• Conditional Statements
• Quantified Statements
• Valid and Invalid Arguments for all
kind of statements
5
Logical Statements
Definition: A statement is a sentence that
is true or false but not both.
Examples: 3+5=8 (true statement)
Today is Friday (false statement)
Note: x>y is not a statement
6
Logical Connectives
For given statements p and q:
• Negation of p: ~p (not p)
• Conjunction of p and q:
• Disjunction of p and q:
p  q ( p and q)
pq
(p or q)
7
Truth table for negation
p
~p
T
F
F
T
8
Truth table for conjunction
p
q
pq
T
T
T
T
F
F
F
T
F
F
F
F
9
Truth table for disjunction
p
q
pq
T
T
T
F
T
T
F
T
T
F
F
F
10
Statement form
• Expression made up of
statement variables (such as p,q)
and logical connectives;
• becomes a statement when
actual statements are substituted
for the variables.
Example:
( p  q) ~ ( p  q)
(Exclusive Or)
11
Truth Table
for a Statement Form
Ex: Truth table for ~ p  ( p  q)
p  q ~ p  ( p  q)
p
q
~p
T
T
F
T
F
T
F
F
T
F
F
T
T
T
T
F
F
T
F
F
12
Logical equivalence
• Statements P and Q are
logically equivalent: P  Q
if and only if
they have identical truth values
for each substitution of
their component statement variables.
Ex:
x y  y x
13
Verifying logical equivalence
Ex: ~ ( p  q)  ~ p  ~ q
p
q
~p
~q
pq
~ ( p  q)
~ p  ~q
T
T
F
F
T
F
F
T
F
F
T
T
F
F
F
T
T
F
T
F
F
F
F
T
T
F
T
T
14
Important Logical Equivalences
• Double negation: ~ (~ p)  p
• De Morgan’s laws: ~ ( p  q )  ~ p  ~ q
~ ( p  q)  ~ p  ~ q
Ex: negation of -5 < x < 7 is
x  5 or x  7
15
Tautologies and Contradictions
• Tautology is a statement form
which is true
for all values of statement variables.
E.g., x ~x is a tautology: x ~x  t
• Contradiction is a statement form
which is false
for all values of statement variables.
E.g., x  ~x is a contradiction: x  ~x  c
16
More Logical Equivalences
• Commutative laws:
• Associative laws:
• Distributive laws:
• Absorption laws:
pq q p
pq  q p
( p  q)  r  p  (q  r )
( p  q)  r  p  (q  r )
p  (q  r )  ( p  q)  ( p  r )
p  (q  r )  ( p  q)  ( p  r )
p  ( p  q)  p
p  ( p  q)  p
17
Simplifying Statement Forms
~ ( p  ~q )  ( p  q )  (~ p  q )  ( p  q )
( by De Morgan ' s law)
 (~ p  p )  q
(by distributi ve law)
tq
( by negation law)
q
(by identity law)
18
Download