You are on page 1of 42

FOUNDATION AND STRUCTURE OF MATHEMATICS

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.

▪ These rules are used to distinguish between valid and invalid


mathematical arguments.

▪ Because a major goal of this module is to teach you how to assess


and how to construct correct mathematical arguments, we begin
our study of the course with an introduction to logic.
Introduction
▪ Besides the importance of logic in discriminating mathematical
reasoning, logic has numerous applications to computer science.
▪ These rules are used in various applications like the design of computer
circuits, the construction of computer programs, the verification of the
correctness of programs, and in many other ways.
▪ Furthermore, software systems have been developed for constructing
some, but not all, types of proofs automatically.
▪ We will discuss these applications of logic in the succeeding topic.
Father of
Logic
Logic and Reasoning
https://slideplayer.com/slide/9351128/
Propositions
▪ A proposition is a declarative
sentence or statement with a truth
value.
▪ It is a statement that is true or else a
statement that is false.
https://static.wixstatic.com/media/
Propositions
Here are some examples with their truth values:
▪ USPF became a university in 1949.
(TRUE)
▪ The Philippines is situated in the middle eastern part of Asia.
(FALSE)
▪ Homer was the blind poet who composed the Iliad and the Odyssey.
(The statement is certainly true or false, but we may not know which. Tradition asserts the truth of
this proposition, but some scholars doubt its truth).
▪ Jesus of Nazareth was God incarnate.
(Again, the statement is certainly true or false, even though many people stand on both sides of the
question.)
Let’s check your understanding!
Activity 1: Assess the truth value of propositions. Solution to Activity No. 1

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.)

▪ Find the Quality Assurance Office.


(This is neither true nor false. It is a command.)

▪ 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 an objective truth.)

▪ Coffee tastes better than tea.


(Again, this is a matter of taste, not truth.)

▪ The integer n is even.


(Since n has no value, this statement is neither true nor false. If n is given a value, this statement becomes a
proposition. This is not a proposition but becomes one when its variable is assigned a value.)
Logical Operators
▪ Arithmetic operators (operations) such as addition, subtraction,
multiplication, division, and negation act on numbers to give
new numbers.
▪ Logical operators such conjunction (and), disjunction (or), and
negation (not) act on propositions to give new (compound)
propositions.
▪ Logical operators should be truth functional; that is, the truth
value of the compound proposition should depend only on the
truth value of the component propositions.
Logical Operators
▪ This makes it easy to specify the effect of a logical operator: we
simply list the truth value of the compound proposition for every
combination of truth values of the component compositions.
▪ Such a list is a called a truth table.

Note that no such definition of arithmetic operations is possible because there


are infinitely many possible values of numbers.
Propositional Logic
▪ Propositional logic , also called propositional calculus, is
the study of propositions (true or false statements) and
ways of combining them (logical operators) to get new
propositions.
▪ It was first developed systematically by the Greek
philosopher Aristotle more than 2300 years ago.
Propositional Logic
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) https://cdn.slidesharecdn.com/
Compound Propositions
Compound propositions are constructed from
▪ logical operator or connectives and
▪ other propositions
Compound Propositions
Type Connective Symbol
Negation not ¬
Conjunction and ∧
Disjunction or ∨
Conditional or Implication implies if-then →
Bi-conditional if and only if ↔
1. Negation
The negation of a proposition p is “not p”.
▪ We denote it ¬p.
▪ It is true if p is false and vice versa.
Example
If p is the proposition “2<5”, then reasonable statements of ¬p are:
▪ “it is not the case that 2<5”
▪ “2 is not less than 5”
Let’s try this…
If p denotes “The earth is round.”, then what is ¬p?

Possible Answers:

¬p = “It is not the case that the earth is round.”

¬p = “The earth is not round.”


The truth table that defines negation is:

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.”

In p → q, p is the hypothesis (antecedent or premise) and q is the


conclusion (or consequence).
Understanding Implication (cont.)
In English, implication carries many meanings.

▪ Sometimes it means that p causes q as in,


“If you eat too much, you will get fat.”
▪ Sometimes it means that p guarantees q and vice versa as in,
“If you write a book report, I will give you five points extra credit”
(tacitly assuring you that if you do not write it, I certainly will not give you extra credit).

▪ 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 I am elected, then I will lower taxes.”


▪“If you get 100% on the final, you get an A.”

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.

This corresponds to the case where p is true and q is false.


Different Ways of Expressing p → q
The implication has many phrasings in English. It is helpful to be well
acquainted with the possibilities as some of them are
counterintuitive.
Here are a few.
▪ if p, then q
▪ p implies q
▪ p is sufficient for q
▪ q is necessary for p
▪ q, if p
▪ p only if q (unexpected but correct)
Converse, Contrapositive, and Inverse
From p → q, we can form new conditional statements.

▪ 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).

It is, in fact, one of the stronger senses of the phrase “if…then…” in


everyday English as mentioned in implication.
The truth table that defines biconditional is:
Example
The biconditional,
TRUE TRUE
“2+2=4 if and only if Sunday is the first day of the week” is true.
FALSE TRUE
“3+3=7 if and only if the freezing point of water is zero degree
Celsius” is false.
FALSE FALSE
“2+2=5 if and only if USPF is in Bohol” is true.
Truth Table for Compound Propositions
A truth table lists the truth values of a compound proposition for every combination of
truth values of its component simple propositions. Truth tables are a basic tool of
propositional logic. Below I present a simple way of constructing truth tables.
▪ First, note that if a compound proposition involves n simple propositions, then its
truth table must have 2n lines (since there are two choice for the truth value of each
of n propositions).
▪ It is tedious to construct truth tables for compound propositions involving more than
three simple propositions.
▪ It is also important to have a simple pattern for listing all possible combinations of the
truth values of those simple propositions.
Let’s try this one!
Construct the truth table for p v q → ¬r .
p q r ¬r pvq p v q → ¬r
T T T F T F
T T F T T T
T F T F T F
T F F T T T
F T T F T F
F T F T T T
F F T F F T
F F F T F T
Equivalent Propositions
Two propositions are equivalent if they always have the same truth value.
Exercise:
Show using a truth table that the conditional proposition is equivalent to the contrapositive.

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.

Bit operations correspond to the logical connectives:

˅ 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

You might also like