Professional Documents
Culture Documents
Dmchap 2
Dmchap 2
Fundamentals of Logic
1. What is a valid argument or proof?
2. Study system of logic
3. In proving theorems or solving
problems, creativity and insight are
needed, which cannot be taught
Discrete Math by R.S. Chang, Dept. CSIE, NDHU
pq
pq
p q
0
0
0
1
0
0
0
1
0
1
1
1
1
0
pq
pq
conclusion
p
0
0
1
1
q
0
1
0
1
p q
1
1
0
0
1
1
0
1
pq
1
1
0
1
s1 s2
Discrete Math by R.S. Chang, Dept. CSIE, NDHU
and
10
( p q ) p q
( p q ) p q
p and q can be any compound statements.
11
( 2 ) ( p q ) p q
( p q ) p q
( 3) p q q p
pq q p
( 4) p ( q r ) ( p q) r
Demorgan's Laws
Commutative Laws
Associative Laws
p ( q r ) ( p q) r
Discrete Math by R.S. Chang, Dept. CSIE, NDHU
12
( 5) p ( q r ) ( p q ) ( p r )
Distributive Law
p ( q r ) ( p q) ( p r )
( 6) p p p , p p p
( 7 ) p F0 p , p T0 p
Idempotent Law
Identity Law
( 8) p p T0 , p p F0
Inverse Law
( 9 ) p T0 T0 , P F0 F0
Domination Law
(10) p ( p q ) p , p ( p q ) p Absorption Law
Discrete Math by R.S. Chang, Dept. CSIE, NDHU
13
14
15
16
17
contrapositive of
p
0
0
1
1
q
0
1
0
1
pq
p q q p q p p q
1
1
0
1
1
1
0
1
converse
1
0
1
1
1
0
1
1
inverse
18
19
Demorgan's Law
( p q ) ( p q )
p ( q q )
Distributive Law
p F0 p
20
conclusion
is a valid argument
( p1 p 2 p n ) q
is a tautology
21
[( p r ) ( q p ) r ] q
22
23
p q means p q is a tautology.
p q means p q
is a tautology.
24
[ p ( p q )] q
p
pq
q
25
[( p q ) ( q r )] ( p r )
Ex 2.25
p
p q
q r
r
pq
qr
pr
26
pq
q
p
27
pq
q
p
28
pq
q
p
29
pq
p
q
30
31
p F0
p
Proof by Contradiction
To prove
( p1 p 2 p n ) q
we prove (( p1 p2 pn ) q ) F0
( p1 p2 pn q ) F0
( p q)
(p q )
p q
32
r p
r q
r s
33
r, s
t u
p, t
34
q
r
F0
F0
35
p1
p2
p2
pn
pn
q r
q
r
reasoning
p (q r )
p (q r )
p ( q r )
( p q ) r
( p q ) r
( p q) r
36
ur
(r s) ( p t )
q ( u s)
t
q
p
us
pt
u, s
p
37
38
39
q(x,y): The numbers y+2, x-y, and x+2y are even integers.
p(5): FALSE, p( 7 ) : TRUE, q(4,2): TRUE
p(6): TRUE, p( 8) : FALSE, q(3,4): FALSE
Therefore,
For some x, p(x) is true.
For some x,y, q(x,y) is true.
Discrete Math by R.S. Chang, Dept. CSIE, NDHU
x, p ( x) is either
true or false.
41
x[ p ( x) r ( x)]: TRUE
x[ p ( x) q ( x)]: TRUE
q ( x): x 2 0
x[ p ( x) q ( x)]: TRUE
r ( x): x 2 3x 4 0
x[ q ( x) s( x)]: FALSE
s( x): x 2 3 0
x=4
x=1
x[ r ( x) s( x)]: FALSE
x=5,6,...
x[ r ( x) p ( x)]: FALSE x=-1
42
x(sin 2 x cos 2 x 1)
43
44
45
Note this!
46
[xp ( x)] xp ( x)
[xp ( x)] xp ( x)
[xp ( x)] xp ( x)
[xp ( x)] xp ( x)
47
p(x): x is odd.
q(x): x2-1 is even.
x[ p ( x) q ( x)]
48
xyp ( x, y) yxp ( x, y)
xyp ( x, y) yxp ( x, y)
49
50
51
52