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 “
AB={x : xA xB} Notations:
There exists
xAB is equivalent to xA xB For all
or
xA xB x AB
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:
AB={x : xA xB}
Therefore xA B is equivalent to xA xB
p q p q
T T T
T F F
F T F
F F F
The truth table for the implication
AB is equivalent to xA xB
xA xB AB
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 xA while xB
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 xParis and xAfrica
A B if and only if there is an element xA while xB
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 pq
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 qp (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 pq
T T T
T F F
F T F
F F T
Example
Prove that : p q (q ) (p)
p q pq 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 pq 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 pq ¬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 pq (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) ]