Propositional Logic 1
Propositional Logic 1
Propositional Logic
R. Nealega
1
Propositional Logic
Propositional logic is the study of propositions (true or false
statements) and ways of combining them (logical operators) to
get new propositions.
It is effectively an algebra of propositions. In this algebra, the
variables stand for unknown propositions (instead of unknown
real numbers).
The operators are:
and, or, not, implies, and if and only if
(rather than plus, minus, negative, times, and divided by
2
Propositional Logic
The Two Elements of Symbolic Logic:
Propositions
3
Propositional Logic
The Two Elements of Symbolic Logic: Propositions
4
Propositional Logic
The Two Elements of Symbolic Logic: Propositions
◦ It will rain in Manila tomorrow. (We cannot know the truth of this
statement today, but it is certainly either true or false.)
◦ 2+2=4 (true)
◦ 2+2=19 (false)
5
Propositional Logic
Examples of expressions that are not propositions:
Where is the Senior High Building? (This is neither true nor false. It is a
question.)
Blue is the best color to paint a house. (This is a matter of opinion, not
truth. It may be your favorite color, but it is not objective truth.)
6
Propositional Logic
Examples of expressions that are not propositions:
◦ Coffee tastes better than tea. (Again, this is a matter of taste, not
truth.)
7
Propositional Logic
The Two Elements of Symbolic Logic: Logical Operators
8
Propositional Logic
The Common Logical Operators
9
The truth table that defines conjunction is:
p q pq
T T T
T F F
F T F
F F F
10
Propositional Logic
The Common Logical Operators
◦ Disjunction (or): In English, the word or has two senses: inclusive and
exclusive.
◦ In mathematics and logic, the word or always has the inclusive sense;
exceptions require alarm bells and warning lights.
11
Propositional Logic
The Common Logical Operators
◦The disjunction of propositions p and q is the compound
proposition “p or q”. We denote it p q .
12
The truth table that defines disjunction is
p q pq
T T T
T F T
F T T
F F F
13
Propositional Logic
The Common Logical Operators
This differs from the previous operators in that it is a unary operator, acting on a
single proposition rather than a pair (the others are binary operators).
Sometimes there are several ways of expressing a negation in English, and you
should be careful to choose a clear one.
14
The truth table that defines negation is
p ~p
T F
F T
15
Propositional Logic
The Common Logical Operators: Conditional (implies, if-then)
16
Propositional Logic
The Common Logical Operators: Conditional (implies, if-then)
17
The truth table implies is
p q p→q
T T T
T F F
F T T
F F T
18
Propositional Logic
The Common Logical Operators: Conditional (implies, if-then) p → q
◦ Thus, an implication is true unless its antecedent p is true, and its consequent q is
false.
For instance, suppose I say, “If I win the lottery, I will give each of you Php5000.”
If I win the lottery and give you Php5000, I will keep my word.
Similarly, if I do not win and I do not give you Php5000, I have kept my word.
What if I do not win but I still give you Php5000(here p is false, and q is true)? In
our technical use of implies, I have still kept my word; my promise is still kept.
The point is that I made a promise only about what I would do if I did win the
lottery. If I do not win the lottery, I am free to do as I will. The only way I can
break my word is to win the lottery but not give you Php5000.
19
Propositional Logic
The Common Logical Operators:
Conditional (implies, if-then)
20
Propositional Logic
The Common Logical Operators: Conditional (implies, if-then)
22
The truth table that defines the biconditional is
p q pq
T T T
T F F
F T F
F F T
23