GRACE MISSION COLLEGE
Catiningan, Socorro, Oriental Mindoro
e-Mail:
[email protected] Module 1 in Logic and Set Theory
INTRODUCTION TO LOGIC
OBJECTIVES
discuss and apply the sentential connectives
use mathematical symbols and discern truth values of arguments
construct truth tables
LOGIC
Is a systematic study of valid rules of inference , the relations that lead to the acceptance of one
proposition ( conclusion ) on the basis of a set of other propositions ( premises )
A particular method of reasoning
The system or principles of reasoning applicable to any branch of knowledge or study
PROPOSITION
A collection of declarative statements that has either a truth value “true” / logic “1” or a truth
value “false”/ logic”0”.
It consists of propositional variables denoted by letters like p, q, r, s , etc. and connectives like or, and ,
not , etc.
Examples : Find out if the statement below is a proposition.
p: 2 is an even number proposition , T
q: 12 + 5= 16 proposition, F
2
r: the area of the circle is I I r proposition, T
s: 0 is a natural number proposition, F
t: A is less than 2 not proposition, variable a should has a given value
u: x + 2 = 2x not proposition ; variable x should has a given value
v: How far is it in the town ? not proposition ; it is an interrogative statement
Additional info.
Logic is concerned with propositions and arguments . Some sentences in propositions are not
propositions e.g. questions, exclamations, commands , requests, stipulations(rules), wishes, nonsense.
Truth table
Is a mathematical table used in logic which sets out the functional values of logical expressions on each of
their functional arguments, that is, for each combination of values taken by their logical variable .
Connectives
In propositional logic , generally we use five connectives : or, and, negation/not , implication/ if-then ,
biconditional / if and only if
1. OR ( v ) - Disjunction
The “or “ operation of two propositions A and B ( written as “ A v B “ ) is true, if at least any of the
propositional variable A or B is true .
Truth table
A B “AvB
“
T (1) T T (1)
(1)
T (1) F(0) T (1)
F(0) T T (1)
(1)
F(0) F(0) F(0)
2. AND ( ʌ) - Conjunction
The “AND” operation of two propositions A & B ( written as “ A ʌ B” ) is true if both of the propositional
variable A and B is true.
Truth table
A B “AʌB
“
T (1) T T (1)
(1)
T (1) F(0) F(0)
F(0) T F(0)
(1)
F(0) F(0) F(0)
3. NOT ( ¬ or ⁓ ) - Negation
The negation of a preposition A ( written as ¬A or ⁓A ) is false when A is true and is true when A is false
Truth Table
A ⁓A
T (1) F(0)
F(0) T (1)
4. Implication / If -then ( →)
An implication A →B is the proposition if “A, then B” . It is false if A is true and B is false. The rest cases
are true .
Truth Table
A B “A→B“
T (1) T T (1)
(1)
T (1) F(0) F(0)
F(0) T T (1)
(1)
F(0) F(0) T (1)
5. If and only if ( ↔) A ↔
Is biconditional logical connective which is true when p and q are same I,e. both are false or both are true.
Truth table
A B “A↔B“
T (1) T T (1)
(1)
T (1) F(0) F(0)
F(0) T F(0)
(1)
F(0) F(0) T (1)
MORE OF PROPOSITIONS AND TRUTH TABLE
Given the three propositions :
p= I love Math
q= I love science
r= I am an engineer
1. ) Transform the following symbols into words
A) ⁓p Answers: I don’t love Math
It is not the case that I love Math .
B) p˅ q I love math or I love science .
C) p˄q I love math and I love science.
D) p→r If I love math then I am an engineer.
E) ⁓(p˄q) It is not the case that I love math and I love science
F) ⁓p→⁓r If I don’t love math ,then I am not an engineer
G) (p˄q)→r If I love math and I love science , then I am an engineer
H) ⁓p˄⁓q→⁓r If I don’t love math and I don’t love science , then I am not an engineer.
I) r↔(p˄q) I am an engineer if and only if I love math and I love science
2. ) Transform the following statements into symbols :
` Answers:
1. I don’t like math or I like science ⁓p˅ q
2. If I am not an engineer then I don’t like math r→⁓p
3. I like math or I like science if and only if I am an engineer. (p˅ q)↔r
4. It is not like the case that I like math or I don’t like science . ⁓(p˅⁓q)
5. If I don’t like math , then I don’t like science . ⁓p→⁓q
3. ) Write the truth table for the following.
a. ⁓p˅⁓r
Solution :
p r ⁓p ⁓r ⁓p˅⁓r
T(1) T(1) F(0) F(0) F(0)
T(1) F(0) F(0) T(1) T(1)
F(0) T(1) T(1) F(0) T(1)
F(0) F(0) T(1) T(1) T(1)
b. ⁓(⁓p˄⁓q)
Solution :
p q ⁓p ⁓q ⁓p˄⁓q ⁓(⁓p˄⁓q)
T(1) T(1) F(0) F(0) F(0) T(1)
T(1) F(0) F(0) T(1) F(0) T(1)
F(0) T(1) T(1) F(0) F(0) T(1)
F(0) F(0) T(1) T(1) T(1) F(0)
c. ⁓p→q
Solution:
p q ⁓p ⁓p→q
T(1) T(1) F(0) T(1)
T(1) F(0) F(0) T(1)
F(0) T(1) T(1) T(1)
F(0) F(0) T(1) F(0)
d. (p˅q)˄r
Solution :
p q r p˅q (p˅q)˄r
T(1) T(1) T(1) T(1) T(1)
T(1) T(1) F(0) T(1) F(0)
T(1) F(0) T(1) T(1) T(1)
T(1)) F(0) F(0) T(1) F(0)
F(0) T(1) T(1) T(1) T(1)
F(0) T(1) F(0) T(1) F(0)
F(0) F(0) T(1) F(0) F(0)
F(0) F(0) F(0) F(0) F(0)
e. r↔(p˄r)
Solution :
p r p˄r r↔(p˄r)
T(1) T(1) T(1) T(1)
T(1) F(0) F(0 T(1)
T(1) T(1) T(1) T(1)
T(1)) F(0) F(0 T(1)
F(0) T(1) F(0 F(0
F(0) F(0) F(0 T(1)
F(0) T(1) F(0 F(0
F(0) F(0) F(0 T(1)
Remember : or “˅”used addition
And “˄” used multiplication