Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 14

Algebra and Geometry

Mathematical Logic
Prof.Nashat Faried
http://e-learning.bue.edu.eg
Lecture 1: Logic. Truth Tables.
The truth table of the conjunction “ or “

AB={x : xA  xB} Notations:


There exists 
xAB is equivalent to xA  xB For all 
or 
xA xB x  AB

T T T
and 
implication 
T F T Negation 
F T T

F F F
The truth table of the conjunction “ or “

The truth table of the conjunction “ or “

p q p q

T T T

T F T

F T T

F F F
The truth tables of the conjunction “ and  “

We know that for subsets A and B:

AB={x : xA  xB}


Therefore xA  B is equivalent to xA  xB
p q p q

T T T

T F F

F T F

F F F
The truth table for the implication 

AB is equivalent to xA  xB

xA xB AB


x T T T
B
x T F F
A F T T
F F T

A  B if and only if there is an element xA while xB


Examples
If I want to say that Paris is not contained in Africa it is
enough to show a place or a person in Paris but not in
Africa

Paris  Africa is equivalent to  xParis and xAfrica

A  B if and only if there is an element xA while xB


Examples
If I want to say that Egypt is not contained in Asia, the only
thing to do is to show a place in Egypt but not in Asia

x  Egypt x  Asia Egypt Asia


• x  Sainai T T T
• x  Cairo T F F
• x  Geddah F T T
• x  Paris F F T
The truth table for the implication

Truth table for the implication 


p q pq

T T T

T F F

F T T

F F T P P
T F
F T

The truth table for the negation 


Examples

The truth table for the conjunction p q

p q p q qp (p q) (q  p)


T T T T T
T F F T F
F T T F F
F F T T T

p q pq
T T T
T F F
F T F
F F T
Example

Prove that : p  q  (q ) (p)

p q pq q p ( q)  )  p)

T T T F F T
T F F T F F
F T T F T T
F F T T T T
Example

Prove that :
p  q  (p )q

p q pq p (p) q

T T T F T

T F F F F

F T T T T

F F T T T
Example

Prove that : p  q  (q ) (p)  (p )q

p q pq ¬q ¬p (¬ q)  (¬ p)

T T T F F T
T F F T F F
F T T F T T
F F T T T T
Example
Find the truth table for p (p  q(:
p q pq (p  q) p( p q)

T T T F F

T F T F F

F T T F T

F F F T T
Example
Construct a truth table for (p q)[( (p)r)  (q r) ]

p q r p (p)r q  r (p)r  q r p q
*
T T T F F T T T T
T T F F F F T T T
T F T F F F T T T
T F F F F F T T T
F T T T T T T T T
F T F T F F T T T
F F T T T F F F T
F F F T F F T F F

* = (p q)[( (p)r)  (q r) ]

You might also like