Introducing Logic
Logic
Study of reasoning.
Focuses on relationship between the
statements rather than the content.
2
A Simple Example
All mathematicians wear sandals.
Anyone who wears sandals is an algebraist.
Therefore…..
All mathematicians are algebraists.
3
Proposition
A declarative sentence that is either true or false
J= “Ibrahim is wearing a red coat”
Q = “Quaid e Azam wrote Baang e Dra”
T = “Buy two tickets for watching movie in cinema”
D = “Today is Tuesday”
4
Propositional Logic
Area of logic that deals with propositions is
called propositional calculus or
propositional logic.
5
Propositional Variables and
Connectives
We will use variables, such as p, q, and r, to
represent propositions.
Notation
p: 1+1=3
6
Connectives
We combine propositions using connectives.
and
Or
“It is raining” and “It is cold”
“It is raining and it is cold.”
It is raining or it is cold.”
7
Connectives
Let p and q be propositions.
The conjunction of p and q
denoted p ∧ q,
is the proposition p and q.
The disjunction of p and q,
p ∨ q,
is the proposition p or q.
8
Connectives
If p: It is raining, and q: It is cold
Then the conjunction of p and q is
p ∧ q: It is raining and it is cold.
The disjunction of p and q is
p ∨ q: It is raining or it is cold.
9
Truth values of Propositions
The truth value of the conjunction p ∧ q is
determined by the truth values of p and q
10
Truth values of Propositions
p: A decade is 10 years,
q: A millenniumis 100 years,
thenp is true, q is false(a millennium is 1000
years),
conjunction,
p∧ q: A decade is 10 years and a millenniumis
100 years,
is false.
11
Truth values of Propositions
The truth value of the disjunction proposition
p∨q defined by the truth table:
12
Truth values of Propositions
p: A decade is 10 years,
q: A millenniumis 100 years,
thenp is true, q is false(a millennium is 1000
years),
disjunction,
p ∨ q: A decade is 10 years or a millenniumis 100
years,
is true.
13
Conjunctions
A and B
14
Conjunctions A and B
A=“I love Chicken” B= “I hate Meat”
A and B= “I love Chicken and I hate Meat”
“A”=True
“A and B”= True and
“B”=True
15
Conjunctions A and B
Ibrahim is a father and Ibrahim is a teacher
Ibrahim is a father and a teacher
Ibrahim is a teacher but he doesn’t like chock
Although
However
yet
16
Conjunctions A and B
One last Point:
“A and B and C and D and E”
Is also conjunction, and follows the same logical
rules as “A and B”
17
Disjunctions
A or B
18
Disjunctions A or B
A=“Ibrahim is at the B= “Ibrahim is at the
movies” library”
A or B= “Ibrahim is at the movies or Ibrahim is at the library”
19
Disjunctions A or B
One last Point:
“A or B or C or D or E”
Is also disjunction, and follows the same logical
rules as “A or B”
20
Contradictories:
not-A
21
Contradictories: not-A
A= “Ibrahim is at the home”
The CONTRADICTORY of A:
A claim that always has the OPPOSITE truth value
of A
Not-A
~A
¬A
Not-A=“Ibrahim is not at the home”
22
Contradictories: not-A
TRUTH TABLE for the CONTRADICTORY “not-A”
A Not-A
T F
F T
23
Practice Exercise for Today
p: Benny Goodman recorded music. (T)
q: The Baltimore used to be St.Lewis Browns.
(T)
Find out:
Truth value of p and q
Truth value of p or q
Symbolic representations of both.
Descriptive representation of both.
Negation of p and its truth value.
24
Practice Exercise (Solution)
p: Benny Goodman recorded music. (T)
q: The Baltimore used to be St.Lewis Browns.
(T)
Find out:
Truth value of p and q
T
Truth value of p or q
T
25
Practice Exercise (Solution)
p: Benny Goodman recorded music. (T)
q: The Baltimore used to be St.Lewis Browns.
(T)
Find out:
Symbolic representations of both.
p^q
pvq
26
Practice Exercise (Solution)
p: Benny Goodman recorded music. (T)
q: The Baltimore used to be St.Lewis Browns.
(T)
Find out:
Descriptive representation of both.
p ^ q : Benny Goodman recorded music and the
Baltimore used to be St.Lewis Browns.
p v q: Benny Goodman recorded music or the Baltimore
used to be St.Lewis Browns.
27
Practice Exercise (Solution)
p: Benny Goodman recorded music. (T)
q: The Baltimore used to be St.Lewis Browns.
(T)
Find out:
Negation of p and its truth value.
Benny Goodman did not record music.
It is not the case that Benny Goodman record music.
Truth value is F.
Symbolic representation is ~p.
28
Thank You!
29