Professional Documents
Culture Documents
EDUC310
“Symbolic Logic is Mathematics,
Mathematics is Symbolic Logic,
the twain are one.”
- J.F. Keyser
Topic 1 – Propositional Logic
▪ Introduction
▪ Propositions and Compound Propositions
▪ Logical Operators
▪ Truth Table
▪ Tautologies and Contradiction
▪ Bit Operations
At the end of the topic, the students should be able to:
▪ Assess the truth value of a proposition
▪ Discriminate a proposition from an expression
▪ Analyze logical operators of propositions
▪ Evaluate compound propositions using a truth table
LEARNING OUTCOMES
Introduction
▪ The rules of logic give precise meaning to mathematical
statements.
1. It will rain in Cebu tomorrow. 1. We cannot know the truth of this statement
today, but it is certainly either true or false.
2. True
2. 2+2=4 3. False
4. False
3. 2+2=19 5. This is certainly true or false, but no one knows
which. The proposition is known as Goldbach’s
4. There are only finitely many prime numbers. Conjecture. It holds for every integer yet tested,
e.g. 4=2+2, 6=3+3, 8=3+5 – but no one has found
5. Every positive even integer greater than 2 a proof that it holds for all even integers greater
can be written as the sum of two prime than two.
numbers.
Expressions and Propositions
▪ Where is Agustin Jereza Hall?
(This is neither true nor false. It is a question.)
Possible Answers:
Note:
T = True
F = False
2. Conjunction
The conjunction of propositions p and q is the compound proposition
“p and q”.
▪ We denote it p^q.
▪ It is true if p and q are both true and false otherwise.
ExampleTRUE TRUE
▪ “2+2=4 and Sunday is the first day of the week” is true,
▪ “3+3=7 and the freezing point of water is zero degree Celsius” is false.
FALSE TRUE
The truth table that defines conjunction is:
F
3. Disjunction
The disjunction of propositions p and q is the compound proposition
“p or q”.
▪ We denote it p v q.
▪ It is true if p is true or q is true or both.
Example
TRUE TRUE
▪ “2+2=4 or Sunday is the first day of the week” is true.
▪ “2+2=5 or USPF is in Bohol” is false.
FALSE FALSE
The truth table that defines disjunction is:
F
4. Conditional or Implication
If p and q are propositions , then p → q is a conditional statement or
implication which is read as “if p, then q” or “p implies q” and has a
truth table:
Understanding Conditional/Implication
Example:
If
▪ p denotes “I am at home.” and
▪ q denotes “It is raining.”
Then p → q denotes “If I am at home, then it is raining.”
▪ Sometimes it takes a very weak sense, simply asserting that the truth of p guarantees the
truth of q as in,
“If you resign the chess game, you will lose”
(but of course if you play on in a bad position, you will probably lose anyway — play does not
guarantee winning).
Understanding Implication (cont.)
These implications are perfectly fine but would not be used in
ordinary English.
▪ “If the moon is made of green cheese, then I have more money
than Bill Gates.”
▪ “If the moon is made of green cheese then I’m on welfare.”
▪ “If 1 + 1 =3, then your grandma wears combat boots.”
Understanding Implication (cont.)
One way to view the logical conditional is to think of an obligation or
contract.
If the politician is elected and does not lower taxes, then the voters can say
that he or she has broken the campaign pledge. Some similar holds for the
professor.
▪ q → p is the converse of p → q
▪ ¬q → ¬p is the contrapositive of p → q
▪ ¬p → ¬q is the inverse of p → q
Converse, Contrapositive, and Inverse
Example:
Find the converse, contrapositive and inverse of
“Raining is a sufficient condition for my not going to town.” p → q
p q
Converse: If I do not go to town, then it is raining. q → p
q p
Inverse: If it is not raining, then I will go to town. ¬ p → ¬ q
¬p ¬q
Contrapositive: If I go to town, then it is not raining. ¬ q → ¬ p
¬q ¬p
4. Biconditional
The biconditional of propositions p and q is the compound
proposition “p if and only if q” or “p is necessary and sufficient for
q”.
▪ We denote it p↔q.
▪ It is true if p and q have the same truth value (both true or both
false).
p q ¬p ¬q p→q ¬q → ¬p
T T F F T T
T F F T F F
F T T F T T
F F T T T T
Tautologies and Contradictions
Some propositions P(p, q, . . .) contain only T in the last column of
their truth tables or, in other words, they are true for any truth
values of their variables. Such propositions are called tautologies.
Analogously, a proposition P(p, q, . . .) is called a contradiction if it
contains only F in the last column of its truth table or, in other words,
if it is false for any truth values of its variables.
Tautologies and Contradictions (cont.)
For example, the proposition “p or not p,” that is, p v¬p, is a
tautology, and the proposition “p and not p,” that is, p∧¬p, is a
contradiction.
This is verified by looking at their truth tables. (The truth tables have
only two rows since each proposition has only the one variable p.)
Bit Operations
A computer bit has two possible values: 0 = false and 1 = true. A variable is called a Boolean
variable is its value is either true or false.
˅ OR ^ AND XOR
Information can be represented by bit strings, which are sequences of zeros and ones, and
manipulated by operations on the bit strings.
Note: The succeeding topic will be covering more of this and its applications.
Truth Tables for Bit Operations
p q p˅q (OR) p^q p q XOR
p q
(AND)
1 1 1 1 1 1 1 1 0
1 0 1 1 0 0 1 0 1
0 1 1 0 1 0 0 1 1
0 0 0 0 0 0 0 0 0