CPE132 Discrete Mathematics Notes V2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 58

Prepared by: Nathaniel M.

Cabansay, BSCpE

CPE132: DISCRETE MATHEMATICS


NOTES COMPILED FROM VARIOUS SOURCES

WITH CALCULATOR TECHNIQUES AND CATEGORICAL LOGIC

Senior High School Course Connections: General Mathematics, Pre-Calculus

Course Connections: MATH031 Mathematics in the Modern World, CSIT121/CPE161 Programming


Logic & Design 1, CSIT122/CPE162 Programming Logic & Design 2

LICENSING

NON-COMMERCIAL

This set of modules is not for sale and is freely distributed. It is also used for educational purposes only.

LICENSING

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0


International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-
sa/4.0/.
Prepared by: Nathaniel M. Cabansay, BSCpE

TABLE OF CONTENTS

Licensing .............................................................................................................................................................. 1
Non-Commercial ............................................................................................................................................. 1
Licensing .......................................................................................................................................................... 1
Lesson 1: Logical Structures .............................................................................................................................. 5
What is Discrete Mathematics? ...................................................................................................................... 5
Logic and Propositions ................................................................................................................................... 5
Logical Operators ........................................................................................................................................... 6
Negation....................................................................................................................................................... 6
Conjunction.................................................................................................................................................. 6
Disjunction ................................................................................................................................................... 7
Exclusive Disjunction/Exclusive Or ............................................................................................................ 7
Implication ................................................................................................................................................... 8
Biconditional ................................................................................................................................................ 9
Precedence of Operators ................................................................................................................................... 9
Lesson 2: logical Equivalence ......................................................................................................................... 10
Types of Compound Propositions ............................................................................................................. 10
Logical Equivalence ..................................................................................................................................... 10
Lesson 3: Sets ................................................................................................................................................... 16
Sets ................................................................................................................................................................ 16
Describing a Set ........................................................................................................................................... 16
Some Other Terms ....................................................................................................................................... 16
Cardinality of Sets .................................................................................................................................... 16
Subsets ...................................................................................................................................................... 17
Power Set .................................................................................................................................................. 17
Universal Set ............................................................................................................................................. 17
Set Operations.............................................................................................................................................. 18
Union ......................................................................................................................................................... 18
Intersection ............................................................................................................................................... 18
Complement ............................................................................................................................................. 19
Difference .................................................................................................................................................. 19
Cartesian Product ..................................................................................................................................... 20
Special Sets: Number Sets .......................................................................................................................... 20
Lesson 4: Quantifiers ....................................................................................................................................... 21
Prepared by: Nathaniel M. Cabansay, BSCpE

Propositional Functions, Predicate Logic .................................................................................................. 21


Quantifiers .................................................................................................................................................... 21
Universal Quantifier ................................................................................................................................. 21
Existential Quantifier ................................................................................................................................ 22
Binding Variables ..................................................................................................................................... 22
Summary ................................................................................................................................................... 22
Negating Quantifiers ................................................................................................................................... 22
Quantifiers and Introduction to Categorical Logic ................................................................................... 23
Lesson 5: Methods of Proof Part 1 – Rules of Inference ............................................................................... 27
Introduction .................................................................................................................................................. 27
Defining Terms ............................................................................................................................................. 27
Arguments, Rules of Inference and Rules of Replacement ...................................................................... 27
Rules of Inference for Quantified Statements ........................................................................................... 29
Examples for Each Rule of Inference .......................................................................................................... 30
Categorical Syllogisms ................................................................................................................................ 31
Examples of Distributed and Undistributed .............................................................................................. 32
Rules of Syllogism ........................................................................................................................................ 33
Lesson 6: Methods of Proof Part 2 – Various Types of Proof ....................................................................... 37
Types of Proofs ............................................................................................................................................. 37
Direct Proof ................................................................................................................................................... 37
Indirect Proof ................................................................................................................................................ 37
Proof by Contradiction ................................................................................................................................ 38
Mathematical Induction ............................................................................................................................... 39
Other Methods of Proof .............................................................................................................................. 40
Lesson 7: Sequences and Summations ......................................................................................................... 42
Sequences .................................................................................................................................................... 42
Types of Sequences ..................................................................................................................................... 42
Some Useful Sequences .............................................................................................................................. 43
Examles of Determining the Formula of a Sequence ............................................................................... 43
Summations .................................................................................................................................................. 44
Sequences and their Respective Series ..................................................................................................... 45
Multiple Summations ................................................................................................................................... 48
Some Useful Summations, with Proofs ...................................................................................................... 48
Lesson 8: Functions ......................................................................................................................................... 52
Prepared by: Nathaniel M. Cabansay, BSCpE

Concepts of Functions ................................................................................................................................. 52


Domain and Codomain of a Function .................................................................................................... 52
Operations on Functions ......................................................................................................................... 52
Image of a Subset ..................................................................................................................................... 53
One-to-One and Onto Functions ............................................................................................................... 53
Inverse Functions ......................................................................................................................................... 54
Graph of a Function ..................................................................................................................................... 54
Some Useful Functions ................................................................................................................................ 55
References ........................................................................................................................................................ 57
Prepared by: Nathaniel M. Cabansay, BSCpE

LESSON 1: LOGICAL STRUCTURES

WHAT IS DISCRETE MATHEMATICS?

Discrete mathematics is the part of mathematics devoted to the study of discrete objects. Discrete
here is in the sense of “distinct” or “unconnected”.

LOGIC AND PROPOSITIONS

Logic is the study of reasoning, which is especially concerned whether that reasoning is correct. It
focuses more on the relationship among statements than the content of any particular statement.

A proposition or statement is a declarative sentence that is either true or false but not both.

THESE ARE PROPOSITIONS: BUT THESE ARE NOT:


Antananarivo is the capital of Madagascar. Do you have a crush on her?
• True, since Antananarivo is indeed the • This is an interrogative statement, so this
capital of Madagascar (unless a law would not be considered a proposition.
moves the capital somewhere else).
About face!
Karachi is located in India. • This is an imperative statement, so this
• False, it is located in Pakistan would also not be considered a
proposition.
1+1=2.
• True, 1+1 is indeed 2 (Except in binary, This statement is false.
where it is 10, which represents 2) • This is declarative, but it is true and false
at the same time. It is false if we take it at
6 < 3. face value, but it would make the
• False, 6 is greater than 3 statement true. Making it true would
make the statement false again. The
Today is Saturday. statement is now false, which would
• This can be true or false, but never at the make it true again, and this goes on
same time. You may be reading this on a forever, so it is instead a paradox.
Saturday, I may be typing this on a
Wednesday, etc. x + 5 = 9.
• This is neither true nor false unless x is
assigned a value.

ax2 + bx + c = y
• This is neither true nor false unless a, b,
c, x, and y are all assigned values.
Propositions come in two types:

• An atomic proposition is true or false whether or not any other propositions are true or false.
o A simple proposition has only one idea and has no logical connectives or operators
connecting.
• A compound proposition is composed of at least two simple/atomic propositions connected
using logical operators or connectives.
Prepared by: Nathaniel M. Cabansay, BSCpE

Example 1: Amir is from India.

• This is considered a simple proposition as there is only one idea and no logical connectives are
there.

Example 2: Belle is Filipina, and 2+2=4.

• This is a compound proposition as a logical connective “and” appears, but the statement can
be considered atomic as Belle being Filipina does not depend on 2+2 equaling 4. Conversely,
2+2 equaling 4 does not depend on Belle being Filipina.

Example 3: If Clair lives in Paris, then she is French.

• This is also a compound proposition as the “if-then” conditional structure is used. Here, Clair’s
being French depends on if she lives in Paris or not.

Example 4: David is American, but he did not vote at the Elections.

• This is yet again a compound proposition, as the logical connective “but” appears.

LOGICAL OPERATORS

Logical operators denote certain relationships between simple propositions.

Before anything else, let us denote the truth value of “True” by T and “False” by F.

We have six logical operations:

NEGATION
Negation states the opposite truth value of a statement. This is the only unary (requires only one
operand) logical operator.

Let p be a proposition. ~p or ¬p denotes its negation. When written out in sentence form, we can say
“It is not the case that p” or simply “Not p”.

For example: We have proposition p “Today is Tuesday.” ~p would then be “It is not the case that
today is Tuesday” or simply “Today is not Tuesday”.

Here, we have the truth table for negation given a proposition p:

p ¬p or ~p
T F
F T

CONJUNCTION
Conjunction is a proposition where the two simple statements connected must both be true in order
for the entire compound statement to be true.
Prepared by: Nathaniel M. Cabansay, BSCpE

Let p and q be propositions. The conjunction is thus written: p ∧ q. When written out in sentence form,
we can say “p and q”. One alternative form is “p but q”.

For example: If we have proposition p “Hedgehogs are blue” and q “Hedgehogs can swim”, then the
proposition p ∧ q is written as “Hedgehogs are blue and can swim”.

If we are to use the “but” conjunction, we have: p ∧ ~q written as “Hedgehogs are blue but cannot
swim.”

Here, we have the truth table for conjunction given two propositions p and q:

p q p∧q
T T T
T F F
F T F
F F F

DISJUNCTION
Disjunction is a proposition where at least one of two statements connected must be true in order for
the entire compound statement to be true. This disjunction is an inclusive one, so the compound
statement is still true if both statements connected are true.

Let p and q be propositions. The disjunction is thus written p ∨ q. When written out in sentence form,
we can say “p or q”.

For example: If we have propositions p “The car is red” and q “The motorcycle is red”, we can write
out p ∨ q as “The car or the motorcycle is red.” Note that the “or” here is assumed to be an inclusive or,
so the statement is still true if both propositions are true. In this case, “The car or the motorcycle is red”
is still true if both the motorcycle and the car are red.

Here, we have the truth table for disjunction given two propositions p and q:

p q p∨q
T T T
T F T
F T T
F F F

EXCLUSIVE DISJUNCTION/EXCLUSIVE OR
Exclusive disjunction is a proposition where exactly one of the two statements connected must be
true in order for the entire compound statement to be true. Unlike regular disjunction, the compound
statement is now false if both statements connected are true.

Let p and q be propositions. The exclusive disjunction is thus written p ⊕ q. When written out in
sentence form, we can say “p or q but not both”.

For example: If we have propositions p “Eevee can evolve into Sylveon” and q “Eevee can evolve into
Umbreon”, we can write out p ⊕ q as “Eevee can evolve into either Sylveon or Umbreon but not both
at once.”
Prepared by: Nathaniel M. Cabansay, BSCpE

Here, we have the truth table for exclusive disjunction given two propositions p and q:

p q p⊕q
T T F
T F T
F T T
F F F

IMPLICATION
Implication is a proposition which is false when its conclusion or consequent q is false and its
hypothesis or antecedent p is true, and is true otherwise, as p being true should imply q being true in
order for the implication to be true.

Let p and q be propositions. An implication is thus written p → q. When written out in sentence form,
this can be any of:

• “If p, then q.” (the most basic form)


• “If p, q”
• “p implies q”
• “q if p”
• “p only if q”
• “q whenever p”
• “q follows from p”
• “q is necessary for p”
• “p is sufficient for q”
• “A sufficient condition for q is p”
• “A necessary condition for p is q”

For example: If we have propositions p “Mario obtains a green mushroom” and q “Mario gets one
extra life”, we can write out p → q as any of the following:

• “If Mario obtains a green mushroom, (then) he gets one extra life.”
• “Mario obtaining a green mushroom implies him getting an extra life.”
• “Mario gets one extra life if he obtains a green mushroom.”
• “Mario will obtain a green mushroom only if he gets an extra life.”
• “Mario gets an extra life whenever he obtains a green mushroom.”

“Here, we have the truth table for exclusive disjunction given two propositions p and q:

p q p→q
T T T
T F F
F T T
F F T
Now, you might be wondering why the conditional is false whenever p is true, and q is false. Going
back to the earlier example:
Prepared by: Nathaniel M. Cabansay, BSCpE

• We have the compound proposition “If Mario obtains a green mushroom, then he gets an
extra life”.
o Mario obtains a green mushroom and gets an extra life means both propositions are
true. This means that him getting a green mushroom indeed grants him an extra life.
o Mario does not obtain a green mushroom, but still gets an extra life. This is considered
true as he can obtain an extra life through other means.
o Mario does not obtain a green mushroom, and does not obtain an extra life. This is still
true.
o If Mario does obtain a green mushroom but not an extra life, this seems to defeat the
purpose of him obtaining a green mushroom, which is why that statement is false.

BICONDITIONAL
Biconditional is a proposition where both statements connected must have the same truth value for
the entire compound statement to be true.

Let p and q be propositions. A biconditional is thus written p ↔ q. When written out in sentence form,
this can be any of:

• “p if and only if q” (most common)


• “p is necessary and sufficient for q”
• “If p then q, and conversely”

For example: If we have propositions p “You can take a train” and q “You buy a train ticket”, we can
write out p ↔ q as “You can take a train if and only if you buy a train ticket”.

Here, we have the truth table for biconditional given two propositions p and q:

p q p↔q
T T T
T F F
F T F
F F T

PRECEDENCE OF OPERATORS

Operators, when not enclosed in parentheses are evaluated in this order:

Operator Precedence
Not (¬) 1
And (∧) 2
Or (∨) 3
Imply (→) 4
Biconditional (↔) 5
Prepared by: Nathaniel M. Cabansay, BSCpE

LESSON 2: LOGICAL EQUIVALENCE

TYPES OF COMPOUND PROPOSITIONS

• Tautology – it is always true no matter the truth value of the individual simple propositions. It is
represented by “T” (the same symbol for True)
• Contradiction – it is always false no matter the truth value of the individual simple
propositions. It is represented by “F” (the same symbol for False)
• Contingency – neither tautology nor contradiction.

LOGICAL EQUIVALENCE

Two propositions p and q are logically equivalent if p ↔ q is a tautology. The notation p ≡ q denotes
that p and q are logically equivalent.

Here are some common logical equivalences and laws governing them. Proofs are provided on the
rightmost column of this table

Equivalence Proofs
I. Identity Laws 1. 𝑝 ∧ 𝑇 ≡ 𝑝
𝒑∧𝑻≡ 𝒑 p p∧T
T T
𝒑∨𝑭 ≡𝒑 F F
2. 𝑝 ∨ 𝐹 ≡ 𝑝
p p∨F
T T
F F
II. Domination Laws 1. 𝑝 ∨ 𝑇 ≡ 𝑇
𝒑∨𝑻≡𝑻 p p∨T
T T
𝒑∧𝑭≡𝑭 F T
2. 𝑝 ∧ 𝐹 ≡ 𝐹
p p∧F
T F
F F
III. Idempotent Laws p p∨p p∧p
T T T
𝒑∨𝒑≡𝒑 F F F
𝒑∧𝒑≡𝒑
IV. Double Negation Law p ~p ~(~p)
T F T
¬(¬𝒑) ≡ 𝒑 F T F
V. Commutative Laws 1. 𝑝 ∨ 𝑞 ≡ 𝑞 ∨ 𝑝
𝒑∨𝒒≡𝒒∨𝒑 p q p∨q q∨p
T T T T
𝒑∧𝒒≡𝒒∧𝒑 T F T T
F T T T
F F F F
Prepared by: Nathaniel M. Cabansay, BSCpE

2. 𝑝 ∧ 𝑞 ≡ 𝑞 ∧ 𝑝
p q p∧q q∧p
T T T T
T F F F
F T F F
F F F F
VI. Associative Laws 1. (𝑝 ∨ 𝑞) ∨ 𝑟 ≡ 𝑝 ∨ (𝑞 ∨ 𝑟)
(𝒑 ∨ 𝒒) ∨ 𝒓 ≡ 𝒑 ∨ (𝒒 ∨ 𝒓) p q r p ∨ q q ∨ r (p ∨ q) ∨ r p ∨ (q ∨ r)
T T T T T T T
(𝒑 ∧ 𝒒) ∧ 𝒓 ≡ 𝒑 ∧ (𝒒 ∧ 𝒓) T T F T T T T
T F T T T T T
T F F T F T T
F T T T T T T
F T F T T T T
F F T F T T T
F F F F F F F
2. (𝑝 ∧ 𝑞) ∧ 𝑟 ≡ 𝑝 ∧ (𝑞 ∧ 𝑟)
p q r p ∧ q q ∧ r (p ∧ q) ∧ r p ∧ (q ∧ r)
T T T T T T T
T T F T F F F
T F T F F F F
T F F F F F F
F T T F T F F
F T F F F F F
F F T F F F F
F F F F F F F
VII. Distributive Laws 1. 𝑝 ∨ (𝑞 ∧ 𝑟) ≡ (𝑝 ∨ 𝑞) ∧ (𝑝 ∨ 𝑟)
𝒑 ∨ (𝒒 ∧ 𝒓) ≡ (𝒑 ∨ 𝒒) ∧ (𝒑 ∨ 𝒓) p q r q ∧ r p ∨ q p ∨ r p ∨ (q ∧ r) (p ∨ q) ∧ (p ∨ r)
T T T T T T T T
𝒑 ∧ (𝒒 ∨ 𝒓) ≡ (𝒑 ∧ 𝒒) ∨ (𝒑 ∧ 𝒓) T T F F T T T T
T F T F T T T T
T F F F T T T T
F T T T T T T T
F T F F T F F F
F F T F F T F F
F F F F F F F F
2. 𝑝 ∧ (𝑞 ∨ 𝑟) ≡ (𝑝 ∧ 𝑞) ∨ (𝑝 ∧ 𝑟)
p q r q ∨ r p ∧ q p ∧ r p ∧ (q ∨ r) (p ∧ q) ∨ (p ∧ r)
T T T T T T T T
T T F T T F T T
T F T T F T T T
T F F F F F F F
F T T T F F F F
F T F T F F F F
F F T T F F F F
F F F F F F F F
Prepared by: Nathaniel M. Cabansay, BSCpE

VIII. De Morgan’s Laws 1. ¬(𝑝 ∧ 𝑞) ≡ ¬𝑝 ∨ ¬𝑞


¬(𝒑 ∧ 𝒒) ≡ ¬𝒑 ∨ ¬𝒒 p q ~p ~q p ∧ q ~ (p ∧ q) ~p ∨ ~q
T T F F T F F
¬(𝒑 ∨ 𝒒) ≡ ¬𝒑 ∧ ¬𝒒 T F F T F T T
F T T F F T T
F F T T F T T
2. ¬(𝑝 ∨ 𝑞) ≡ ¬𝑝 ∧ ¬𝑞
p q ~p ~q p ∨ q ~ (p ∨ q) ~p ∧ ~q
T T F F T F F
T F F T T F F
F T T F T F F
F F T T F T T
IX. Absorption Laws 1. 𝑝 ∨ (𝑝 ∧ 𝑞) ≡ 𝑝
𝒑 ∨ (𝒑 ∧ 𝒒) ≡ 𝒑 p q p∧q p ∨ (p ∧ q)
T T T T
𝒑 ∧ (𝒑 ∨ 𝒒) ≡ 𝒑 T F F T
F T F F
F F F F
2. 𝑝 ∧ (𝑝 ∨ 𝑞) ≡ 𝑝
p q p∨q p ∧ (p ∨ q)
T T T T
T F T T
F T T F
F F F F
X. Negation Laws 1. 𝑝 ∨ ¬𝑝 ≡ 𝑇
𝒑 ∨ ¬𝒑 ≡ 𝑻 p ~p p ∨ ~p
T F T
𝒑 ∧ ¬𝒑 ≡ 𝑭 F T T
2. 𝑝 ∧ ¬𝑝 ≡ 𝐹
p ~p p ∧ ~p
T F F
F T F
XI. Logical Equivalences 1. 𝑝 → 𝑞 ≡ ¬𝑝 ∨ 𝑞
Involving Implications p q ~p p→q ~p ∨ q
𝒑 → 𝒒 ≡ ¬𝒑 ∨ 𝒒 T T F T T
T F F F F
𝒑 → 𝒒 ≡ ¬𝒒 → ¬𝒑 F T T T T
𝒑 ∨ 𝒒 ≡ ¬𝒑 → 𝒒 F F T T T
𝒑 ∧ 𝒒 ≡ ¬(𝒑 → ¬𝒒) 2. 𝑝 → 𝑞 ≡ ¬𝑞 → ¬𝑝
¬(𝒑 → 𝒒) ≡ 𝒑 ∧ ¬𝒒 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
Prepared by: Nathaniel M. Cabansay, BSCpE

3. 𝑝 ∨ 𝑞 ≡ ¬𝑝 → 𝑞
p q ~p p∨q ~p → q
T T F T T
T F F T T
F T T T T
F F T F F
4. 𝑝 ∧ 𝑞 ≡ ¬(𝑝 → ¬𝑞)
p q ~q p ∧ q p → ~q ~ (p → ~q)
T T F T F T
T F T F T F
F T F F T F
F F T F T F
5. ¬(𝑝 → 𝑞) ≡ 𝑝 ∧ ¬𝑞
p q ~q p → q ~ (p → q) p ∧ ~q
T T F T F F
T F T F T T
F T F T F F
F F T T F F
XII. Distributive, Absorption, 1. (𝑝 → 𝑞) ∧ (𝑝 → 𝑟) ≡ 𝑝 → (𝑞 ∧ 𝑟)
and Exportation Laws of p q r p→q p→r q∧r (p → q) ∧ (p → r) p → (q ∧ r)
Conditionals T T T T T T T T
(𝒑 → 𝒒) ∧ (𝒑 → 𝒓) ≡ 𝒑 → (𝒒 ∧ 𝒓) T T F T F F F F
T F T F T F F F
(𝒑 → 𝒓) ∧ (𝒒 → 𝒓) ≡ (𝒑 ∨ 𝒒) → 𝒓 T F F F F F F F
(𝒑 → 𝒒) ∨ (𝒑 → 𝒓) ≡ 𝒑 → (𝒒 ∨ 𝒓) F T T T T T T T
(𝒑 → 𝒓) ∨ (𝒒 → 𝒓) ≡ (𝒑 ∧ 𝒒) → 𝒓 F T F T T F T T
F F T T T F T T
𝒑 → 𝒒 ≡ 𝒑 → (𝒑 ∧ 𝒒) F F F T T F T T
(𝒑 ∧ 𝒒) → 𝒓 ≡ 𝒑 → (𝒒 → 𝒓)
2. (𝑝 → 𝑟) ∧ (𝑞 → 𝑟) ≡ (𝑝 ∨ 𝑞) → 𝑟
p q r p→r q→r p∨q (p → r) ∧ (q → r) (p ∨ q) → r
T T T T T T T T
T T F F F T F F
T F T T T T T T
T F F F T T F F
F T T T T T T T
F T F T F T F F
F F T T T F T T
F F F T T F T T
3. (𝑝 → 𝑞) ∨ (𝑝 → 𝑟) ≡ 𝑝 → (𝑞 ∨ 𝑟)
p q r p→q p→r q∨r (p → q) ∨ (p → r) p → (q ∨ r)
T T T T T T T T
T T F T F T T T
T F T F T T T T
T F F F F F F F
F T T T T T T T
F T F T T T T T
F F T T T T T T
F F F T T F T T
Prepared by: Nathaniel M. Cabansay, BSCpE

4. (𝑝 → 𝑟) ∨ (𝑞 → 𝑟) ≡ (𝑝 ∧ 𝑞) → 𝑟
p q r p→r q→r p∧q (p → r) ∨ (q → r) (p ∧ q) → r
T T T T T T T T
T T F F F T F F
T F T T T F T T
T F F F T F T T
F T T T T F T T
F T F T F F T T
F F T T T F T T
F F F T T F T T
5. 𝑝 → 𝑞 ≡ 𝑝 → (𝑝 ∧ 𝑞)
p q p∧q p→q p → (p ∧ q)
T T T T T
T F F F F
F T F T T
F F F T T
6. (𝑝 ∧ 𝑞) → 𝑟 ≡ 𝑝 → (𝑞 → 𝑟)
p q r q→r p∧q (p ∧ q) → r p → (q → r)
T T T T T T T
T T F F T F F
T F T T F T T
T F F T F T T
F T T T F T T
F T F F F T T
F F T T F T T
F F F T F T T
XIII. Identity and Dominance 1. 𝑇 → 𝑝 ≡ 𝑝
Laws Involving Conditionals p T→p
𝑻→𝒑≡𝒑 T T
F F
𝑭→𝒑≡𝑻
2. 𝐹 → 𝑝 ≡ 𝑇
𝒑→𝑻≡𝑻
p F→p
𝒑 → 𝑭 ≡ ¬𝒑 T T
𝒑 → ¬𝒑 ≡ ¬𝒑 F T
¬𝒑 → 𝒑 ≡ 𝒑 3. 𝑝 → 𝑇 ≡ 𝑇
p p→T
T T
F T
4. 𝑝 → 𝐹 ≡ ¬𝑝
p ~p p→F
T F F
F T T
5. 𝑝 → ¬𝑝 ≡ ¬𝑝
p ~p p → ~p
T F F
F T T
Prepared by: Nathaniel M. Cabansay, BSCpE

6. ¬𝑝 → 𝑝 ≡ 𝑝
p ~p ~p → p
T F T
F T F
XIV. Logical Equivalences 1. 𝑝 ↔ 𝑞 ≡ (𝑝 → 𝑞) ∧ (𝑞 → 𝑝)
Involving Biconditionals p q p→q q→p p↔q (p → q) ∧ (q → p)
𝒑 ↔ 𝒒 ≡ (𝒑 → 𝒒) ∧ (𝒒 → 𝒑) T T T T T T
T F F T F F
𝒑↔𝒒≡𝒒↔𝒑 F T T F F F
𝒑 ↔ 𝒒 ≡ ¬𝒑 ↔ ¬𝒒 F F T T T T
𝒑 ↔ 𝒒 ≡ (𝒑 ∧ 𝒒) ∨ (¬𝒑 ∧ ¬𝒒) 2. 𝑝 ↔ 𝑞 ≡ 𝑞 ↔ 𝑝
¬(𝒑 ↔ 𝒒) ≡ 𝒑 ↔ ¬𝒒 ≡ ¬𝒑 ↔ 𝒒 p q p↔q q↔p
T T T T
𝒑 ⊕ 𝒒 ≡ ¬(𝒑 ↔ 𝒒)
T F F F
F T F F
F F T T
3. 𝑝 ↔ 𝑞 ≡ ¬𝑝 ↔ ¬𝑞
p q ~p ~q p↔q ~p ↔ ~q
T T F F T T
T F F T F F
F T T F F F
F F T T T T
4. 𝑝 ↔ 𝑞 ≡ (𝑝 ∧ 𝑞) ∨ (¬𝑝 ∧ ¬𝑞)
p q ~p ~q p∧q ~p ∧ ~q p↔q (p ∧ q) ∨ (~p ∧ ~q)
T T F F T F T T
T F F T F F F F
F T T F F F F F
F F T T F T T T
5. ¬(𝑝 ↔ 𝑞) ≡ 𝑝 ↔ ¬𝑞 ≡ ¬𝑝 ↔ 𝑞
p q ~p ~q p↔q ~ (p ↔ q) p ↔ ~q ~p ↔ q
T T F F T F F F
T F F T F T T T
F T T F F T T T
F F T T T F F F
6. 𝑝 ⊕ 𝑞 ≡ ¬(𝑝 ↔ 𝑞)
p q p↔q ~ (p ↔ q) p⊕q
T T T F F
T F F T T
F T F T T
F F T F F
Prepared by: Nathaniel M. Cabansay, BSCpE

LESSON 3: SETS

SETS

Sets are well-defined collections of objects. Objects in sets are called elements. The elements in a set
are enclosed by a pair of braces {} and separated by commas.

Uppercase letters like A, B, C, … are used to denote sets. Lowercase letters such as m, n, x, y, …
denote a set’s elements.

The symbol ∈ denotes membership to a set and is read “is an element of”, “belongs to” or “is in”.
Similarly, the symbol ∉ is read as “is not an element of”, “does not belong to”, or “is not in”.

For example: If we have set A = {3, 6, 9, 12, 15, 18, 21, …, 60}, the statement “3 ∈ A” is read as “3 is an
element of set A” or “3 is in set A”, while “7 ∉ A” is read as “7 is not an element of set A”.

DESCRIBING A SET

• List or roster method – simply lists down the elements of a set


• Description method – gives an informal verbal description of the set’s elements.
• Set builder or rule method – gives a formal verbal description of a set by a statement or rule.

Example: We have set B…

• List or roster method: B = {4, 8, 12, 16, …, 60}


• Description method: B is the set of all multiples of 4 from 1 to 60.
• Set builder method: 𝐵 = {𝑥|𝑥 is a multiple of 4 ∧ 𝑥 ≤ 60}

SOME OTHER TERMS

CARDINALITY OF SETS
The cardinality of a set A, denoted n(A) is the number of elements in that set A.

A set is finite (read /faɪ-naɪt/) if we can count the number of elements in the set.

A set is infinite if there is no definite end to the number of elements.

For example: We have set A= {3, 6, 9, 12, 15, …, 60}, B = {4, 8, 12, 16, …, 60}, C = {5, 10, 15, 20, …, 60},
and X= {0, 1, 2, 3, 4, …}.

This means: n(A) = 20 since there are 20 multiples of 3 from 1 to 60, n(B) = 15 since there are 15
multiples of 4 from 1 to 60, and n(C) = 12 since there are 12 multiples of 5 from 1 to 60. Sets A, B, and
C are therefore finite sets. The cardinality of set X, n(X) = ∞, so set X is an infinite set.

The null set or empty set ∅ contains no elements. Its cardinality is therefore 0.

The singleton set contains just one element. Its cardinality is therefore 1.

Equal sets contain the same elements (no matter the repetition or order).
Prepared by: Nathaniel M. Cabansay, BSCpE

SUBSETS
A set A is a subset of another set B if and only if all elements of A are elements of B. It is denoted as
𝐴 ⊆ 𝐵. We can read that as “A is a subset of B” or “A is contained in B”. Equivalently, set B is a superset
of set A, denoted 𝐵 ⊇ 𝐴. We can read this as “B is a superset of A” or “B contains A”

Laws of subsets

• All sets are subsets of themselves. That is, 𝐴 ⊆ 𝐴 for any set A.
• The null set is a subset of any set, so for any set A, ∅ ⊆ 𝐴.

Given sets: A = {x | x is a multiple of 3 from 1 to 60}, B = {x | x is a multiple of 4 from 1 to 60}, C = {x | x is


a multiple of 5 from 1 to 60}, D = {x | x is an even number from 1 to 60}.

We can then say 𝐵 ⊆ 𝐷, as all elements in set B are found in set D. We can say that 𝐶 ⊈ 𝐴, since there
are elements in C that are not in set A.

A set A is a proper subset of another set B, denoted 𝐴 ⊂ 𝐵, if A is a subset of B and there is at least
one element in B not in A.

Example: Given set M = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} and N = {5, 10}. We can say that 𝑁 ⊂ 𝑀.
Equivalently, since M is a superset of N, 𝑀 ⊃ 𝑁.

POWER SET
The power set of a set A, ℘(𝐴), is the set of all subsets of that set A. If a set has n elements, its power
set has 2n elements.

For example: We have set Q = {69, 143, 420}. This set has 3 elements, so the power set has 2 3 = 8
elements. This means ℘(𝑄) = {∅, {69}, {143}, {420}, {69, 143}, {69, 420}, {143, 420}, {69, 143, 420}}. Note
that the empty set and the set itself are members of the power set.

We can note a pattern with the power set. For a set with n elements, the number of subsets with k
𝑛!
elements is equal to 𝑛 𝐶𝑘 = . In the example above, we have a set of 3 elements, so we have 8
𝑘!(𝑛−𝑘)!
subsets distributed as follows:

• 1 subset with 0 elements (the empty set). 3 𝐶0 = 1


• 3 subsets with 1 element. 3 𝐶1 = 3
• 3 subsets with 2 elements. 3 𝐶2 = 3
• 1 subset with 3 elements (the set itself). 3 𝐶3 = 1

Notice how these numbers correspond to row n of the Pascal’s triangle, where row 0 is the starting row
consisting of just a single 1. The power set of the empty set contains just 1 element: the empty set
itself, so ℘(∅) = {∅}, 𝑛({∅}) = 1.

UNIVERSAL SET
The set containing all elements for any particular discussion is the universal set, denoted as U.
Prepared by: Nathaniel M. Cabansay, BSCpE

SET OPERATIONS

For this section, we will be using the following sets:


U is the set of numbers from 1 to 60. A = {3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51,
54, 57, 60}, B = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60}, C = {5, 10, 15, 20, 25, 30, 35, 40,
45, 50, 55, 60}
UNION
The union of two sets A and B is the set combining the elements in set A and set B into one set. It is
denoted by 𝐴 ∪ 𝐵 and can be defined by: 𝐴 ∪ 𝐵 = {𝑥| 𝑥 ∈ 𝐴 ∨ 𝑥 ∈ 𝐵}.

For example: 𝐵 ∪ 𝐶 = {4, 5, 8, 10, 12, 15, 16, 20, 24, 25, 28, 30, 32, 35, 36, 40, 44, 45, 48, 50, 52, 55, 56, 60}

Set union has the following properties:

1. The union of any set with the null set is the set itself.
𝐶 ∪ ∅ = 𝐶 = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60}
2. The union of any set with itself is the set itself.
𝐶 ∪ 𝐶 = 𝐶 = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60}
3. Set union is commutative.
𝐵 ∪ 𝐶 = 𝐶 ∪ 𝐵
= {4, 5, 8, 10, 12, 15, 16, 20, 24, 25, 28, 30, 32, 35, 36, 40, 44, 45, 48, 50, 52, 55, 56, 60}
4. Set union is associative.
𝐴 ∪ (𝐵 ∪ 𝐶) = (𝐴 ∪ 𝐵) ∪ 𝐶 = {3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32,
33, 35, 36, 39, 40, 42, 44, 45, 48, 50, 51, 52, 54, 55, 56, 57, 60}
5. Any set is a subset of its union with another set.
𝐶 ⊆ (𝐵 ∪ 𝐶), as 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, and 60 are all elements of 𝐵 ∪ 𝐶.

INTERSECTION
The intersection of two sets A and B is the set of elements contained in both A and B. It is denoted by
𝐴 ∩ 𝐵 and can be defined by: 𝐴 ∩ 𝐵 = {𝑥| 𝑥 ∈ 𝐴 ∧ 𝑥 ∈ 𝐵}. This is commutative, so switching around
the sets will give the same results.
For example: 𝐴 ∩ 𝐵 = {12, 24, 36, 48, 60}

Two sets are disjoint if the two sets have nothing in common, meaning their intersection has no
elements. For example: M = {magenta, cyan, yellow}, N = {black, white}, M and N are disjoint sets, as
𝑀 ∩ 𝑁 = {}.

Set intersection has the following properties:

1. The intersection of any set with the null set is the null set.
𝐶 ∩ ∅ = ∅ = {}
2. The intersection of any set with itself is the set itself.
𝐶 ∩ 𝐶 = 𝐶 = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60}
3. Set intersection is commutative.
𝐵 ∩ 𝐶 = 𝐶 ∩ 𝐵 = {20, 40, 60}
4. Set intersection is associative.
Prepared by: Nathaniel M. Cabansay, BSCpE

𝐴 ∩ (𝐵 ∩ 𝐶) = (𝐴 ∩ 𝐵) ∩ 𝐶 = {60}
5. The intersection of any given set with another set is a subset of the given set.
(𝐵 ∩ 𝐶) ⊆ 𝐶, as 20, 40, and 60 are all elements of 𝐶.
6. Distributive laws of union and intersection.
𝐴 ∪ (𝐵 ∩ 𝐶) = (𝐴 ∪ 𝐵) ∩ (𝐴 ∪ 𝐶) = {3, 6, 9, 12, 15, 18, 20, 21, 24, 27, 30, 33, 36, 39, 40, 42,
45, 48, 51, 54, 57, 60}
𝐴 ∩ (𝐵 ∪ 𝐶) = (𝐴 ∩ 𝐵) ∪ (𝐴 ∩ 𝐶) = {12, 15, 24, 30, 36, 45, 48, 60}
7. The cardinality of the union of two sets P and Q is 𝑛(𝑃 ∪ 𝑄) = 𝑛(𝑃) + 𝑛(𝑄) – 𝑛(𝑃 ∩ 𝑄)
𝑛(𝐵 ∪ 𝐶) = 𝑛(𝐵) + 𝑛(𝐶) – 𝑛(𝐵 ∩ 𝐶) = 15 + 12 – 3 = 24.
COMPLEMENT
The complement of the set A, denoted by A’ is the set of all elements in the universal set but NOT in
set A. 𝐴’ = {𝑥 | 𝑥 ∉ 𝐴}

For example: A’ = {1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 28, 29, 31, 32, 34, 35, 37,
38, 40, 41, 43, 44, 46, 47, 49, 50, 52, 53, 55, 56, 58, 59}

DIFFERENCE
The difference of two sets A and B is the set containing all elements in set A but not in set B. This is
also called the complement of B with respect to A. This is not commutative and switching the sets
around will not give you the same results. 𝐴 – 𝐵 = {𝑥 | 𝑥 ∈ 𝐴 ∧ 𝑥 ∉ 𝐵}, similarly, 𝐵 – 𝐴 = {𝑥 | 𝑥 ∈
𝐵 ∧ 𝑥 ∉ 𝐴}.
For example: A – B = {3, 6, 9, 15, 18, 21, 27, 30, 33, 39, 42, 45, 51, 54, 57}; while B – A = {4, 8, 16, 20,
28, 32, 40, 44, 52, 56}. Similarly, A – C = {3, 6, 9, 12, 18, 21, 24, 27, 33, 36, 39, 42, 48, 51, 54, 57}, while
C – A = {5, 10, 20, 25, 35, 40, 50, 55}.

Set difference has the following properties:

1. The removal of the null set from any set has no effect on the set.
𝐶 − ∅ = 𝐶 = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60}
2. The removal of the elements of any set from the set itself will leave the empty set.
𝐶 – 𝐶 = ∅ = {}
3. No elements can be removed from an empty set.
∅ − 𝐶 = ∅ = {}
4. Set subtraction is not commutative.
B – C ≠ C – B. B – C = {4, 8, 12, 16, 24, 28, 32, 36, 44, 48, 52, 56}, C – B = {5, 10, 15, 25, 30, 35,
45, 50, 55}
5. The result of removing the elements of a set from any given set is a subset of the given set.
(𝐶 – 𝐴) ⊆ 𝐶 = {5, 10, 20, 25, 35, 40, 50, 55} is a subset of C
6. Distributive laws of set difference
𝐴 – (𝐵 ∩ 𝐶) = (𝐴 – 𝐵) ∪ (𝐴 – 𝐶) = {3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 51, 54,
57}
𝐴 – (𝐵 ∪ 𝐶) = (𝐴 – 𝐵) ∩ (𝐴 – 𝐶) = {3, 6, 9, 18, 21, 27, 33, 39, 42, 51, 54, 57}
7. Properties of set cardinality
𝑛(𝐴 ∩ 𝐵) = 𝑛(𝐴) – 𝑛(𝐴 – 𝐵) = 20 – 15 = 5
𝑛(𝐴 – 𝐵) = 𝑛(𝐴) – 𝑛 (𝐴 ∩ 𝐵) = 20 – 5 = 15
Prepared by: Nathaniel M. Cabansay, BSCpE

CARTESIAN PRODUCT
The Cartesian product of n sets, denoted A1 × A2 × … × An, is the set of ordered n-tuples (ordered
pairs when multiplying two sets, ordered triples when multiplying three sets, and so on), obtained by
matching up each element of one set with every element of the next set. This is also not commutative,
so switching the operands around will not get you the same results.

For example: A × C = {(3, 5), (3, 10), (3, 15), (3, 20), (3, 25), (3, 20), …, (3, 60), (6, 5), (6, 10), …, (6, 60),
…, (60, 55), (60, 60)}; while C × A = {(5, 3), (5, 6), (5, 9), …, (5, 60), (10, 3), (10, 6), …, (10, 60), …, (60,
57), (60, 60)}
Useful properties involving Cartesian products are:
1. Cartesian multiplication is not commutative
A × C ≠ C × A (as seen earlier)
2. The cardinality of the Cartesian product is the product of each individual set’s cardinalities.
Specifically, for sets P1, P2, P3, …, Pn, n(P1 × P2 × P3 × … × Pn) = n(P1) × n(P2) × n(P3) × … × n(Pn).
n(A × C) = n(A) × n(C) = 20 × 12 = 480.
3. Multiplication of cardinalities is commutative. Specifically, for two sets P and Q, n(P × Q) = n(Q
× P)
n(A × C) = n(C × A), n(A) × n(C) = n(C) × n(A), 20 × 12 = 12 × 20, 480 = 480.

SPECIAL SETS: NUMBER SETS

1. Natural Numbers (ℕ) – consists of the set of counting numbers 1, 2, 3, 4, …. 0 is sometimes


included. ℕ = {1, 2, 3, 4, … } or {0, 1, 2, 3, 4, … } (The definitions are not consistent)
2. Integers (ℤ) – consist of positive whole numbers, negative whole numbers, and zero. ℤ =
{… , −3, −2, −1, 0, 1, 2, 3, … }
a. Positive Integers (ℤ+ ) – identical to the set of natural numbers
b. Negative Integers (ℤ− ) – additive inverses of the positive integers
c. Zero (ℤ0 ) – contains zero as its only element.
d. Non-negative Integers (ℤ0+ ) – positive integers and zero are included
e. Non-positive Integers (ℤ0− ) – negative integers and zero are included
3. Rational Numbers (ℚ) – consists of numbers that can be represented as a ratio or fraction of
two integers. In decimal form, these either repeat on and on or terminate at a certain digit.
1 143 22
, 0. 69, 0.143, , ∈ℚ
2 420 7
4. Real Numbers (ℝ) – consist of the rational numbers and square roots of positive non-perfect
1+√5 1−√5
squares. √2, 𝜋, e, , ∈ℝ
2 2
5. Complex Numbers (ℂ) – consist of the real numbers and square roots of negative numbers or
imaginary numbers where √−1 = 𝑖. √−4, 3 + 2𝑖, 7 − 4𝑖 ∈ ℂ
a. Imaginary Numbers – consist of only multiples of the imaginary unit 𝑖 = √−1
Prepared by: Nathaniel M. Cabansay, BSCpE

LESSON 4: QUANTIFIERS

PROPOSITIONAL FUNCTIONS, PREDICATE LOGIC

The logic detailed in Lessons 1 and 2 is not enough to deal with most statements in math and
computer science (and computer engineering for that matter). For example:

𝑝: 𝑥 is an even integer.

Recall that propositions are declarative statements that can either be true or false. The statement 𝑝 by
itself is not a proposition, as its truth value depends on the value of 𝑥. 𝑝 is true if, for example, n = 38,
but false if, for example, n = 69.

Most statements in mathematics and computer science (and computer engineering) use variables, so
we must extend the logic system to include such statements.

Let 𝑃(𝑥) be a statement involving the variable 𝑥 and 𝐷 be a set. We call 𝑷 a propositional function or
predicate with respect to 𝐷, if for each 𝑥 ∈ 𝐷, 𝑃(𝑥) is a proposition. 𝑫 is then the domain of discourse
of 𝑃. Now, let’s get back to that previous statement, now written as a propositional function:

𝑃(𝑥): 𝑥 is an even integer.

𝑃(𝑥) by itself is neither true nor false, but if we substituted 𝑥 with any integer (or any element in its
domain of discourse), such as -2, 0, 400, we would get a proposition that could either be true or false.
For example:

𝑃(420): 420 is an even integer.

When we substituted x with 420, we got a proposition. 420 is indeed an even integer, so the
proposition is true.

𝑃(143): 143 is an even integer.

When we substituted x with 143, we still got a proposition. 143, however, is an odd integer, so the
proposition is false. 𝑃 is also called a predicate.

QUANTIFIERS

Quantifiers specify how many elements in the domain of discourse must make a propositional
function produce a true proposition.

The two most common quantifiers are ∀ (the universal quantifier) and ∃ (the existential quantifier).

UNIVERSAL QUANTIFIER
A universally quantified statement is a statement “for every x, P(x)” or “for all x, P(x)” for a given
propositional function P and its domain of discourse D.

We can also specify the domain of discourse in the statement, like “for all x in D, P(x)”.
Prepared by: Nathaniel M. Cabansay, BSCpE

The statement may be written ∀𝑥 𝑃(𝑥). The symbol ∀ is called the universal quantifier and is read as
“for every”, “for each”, “for any”, or “for all”.

A universally quantified statement is only true if 𝑃(𝑥) is true for every 𝑥 in 𝐷. It becomes false if there is
at least one 𝑥 in 𝐷 that makes the statement false. Any value that makes 𝑃(𝑥) false is called a
counterexample.

EXISTENTIAL QUANTIFIER
An existentially quantified statement is a statement “for some x, P(x)” or “there exists x, P(x)” for a
given propositional function P and its domain of discourse D.

We can also specify the domain of discourse in the statement, like “there exists x in D, P(x)”.

The statement may be written ∃𝑥 𝑃(𝑥). The symbol ∃ is called the existential quantifier and is read as
“for some”, “for at least one”, or “there exists”.

An existentially quantified statement is true if there is at least one 𝑥 in 𝐷 that makes the statement true.
It becomes false only if 𝑃(𝑥) is false for every 𝑥 in 𝐷.

BINDING VARIABLES
The variable 𝑥 in 𝑃(𝑥) is a free variable as it can take any value in the domain of discourse. Given a
quantified statement ∀𝑥 𝑃(𝑥) or ∃𝑥 𝑃(𝑥), the variable 𝑥 is a bound variable as 𝑥 is bound to ∀ or ∃.

𝑃(𝑥) is an unquantified statement, so this is not a proposition. ∀𝑥 𝑃(𝑥) and ∃𝑥 𝑃(𝑥) are quantified
statements, so they are propositions. The quantifiers ∀ and ∃ assign truth values to propositional
functions. The scope of a quantifier is the part of a logical expression where the quantifier is applied.

Example: In the statement ∃𝑥 𝑃(𝑥, 𝑦), 𝑥 is bound by the existential quantification ∃𝑥, but 𝑦 is free
because it is not bound by a quantifier and no value is assigned to it.

SUMMARY
STATEMENT WHEN IS IT TRUE? WHEN IS IT FALSE?
∀𝒙 𝑷(𝒙) P(x) is true for all x There is an x for which P(x) is
false
∃𝒙 𝑷(𝒙) There is an x for which P(x) is P(x) is false for all x
true

NEGATING QUANTIFIERS

¬∀𝑥 𝑃(𝑥) ≡ ∃𝑥 ¬𝑃(𝑥)

“It is not the case that all x satisfies P(x)” is equivalent to “There is an x that does not satisfy P(x).”

Proof:

NO. STATEMENT REASON


1 ¬(∀𝑥 𝑃(𝑥)) = 𝑇 Suppose the proposition ¬(∀𝑥 𝑃(𝑥)) is true
Prepared by: Nathaniel M. Cabansay, BSCpE

2 ∀𝑥 𝑃(𝑥) = 𝐹 Negate both sides


3 (∀𝑥 𝑃(𝑥) = 𝐹) → 𝑃(𝑥) = 𝐹 ∀𝑥 𝑃(𝑥) is false whenever there is at least one
𝑥 in the domain of discourse that makes 𝑃(𝑥)
false.
4 𝑃(𝑥) = 𝐹 → ¬𝑃(𝑥) = 𝑇 If 𝑃(𝑥) is false for at least one 𝑥 in the domain
of discourse, ¬𝑃(𝑥) is true for at least one 𝑥 in
the domain of discourse.
5 ¬𝑃(𝑥) = 𝑇 → ∃𝑥 ¬𝑃(𝑥) = 𝑇 If ¬𝑃(𝑥) is true for at least one 𝑥 in the
domain of discourse, ∃𝑥 ¬𝑃(𝑥) is true.
∴ ¬(∀𝑥 𝑃(𝑥)) ≡ ∃𝑥 ¬𝑃(𝑥)

¬∃𝑥 𝑃(𝑥) ≡ ∀𝑥 ¬𝑃(𝑥)

“It is not the case that there is an x that satisfies P(x) “is equivalent to “All x does not satisfy P(x).”

Proof:

NO. STATEMENT REASON


1 ¬(∃𝑥 𝑃(𝑥)) = 𝑇 Suppose the proposition ¬(∃𝑥 𝑃(𝑥)) is true
2 ∃𝑥 𝑃(𝑥) = 𝐹 Negate both sides
3 (∃𝑥 𝑃(𝑥) = 𝐹) → 𝑃(𝑥) = 𝐹 ∃𝑥 𝑃(𝑥) is false whenever all 𝑥 in the domain
of discourse makes 𝑃(𝑥) false.
4 𝑃(𝑥) = 𝐹 → ¬𝑃(𝑥) = 𝑇 If 𝑃(𝑥) is false for all 𝑥 in the domain of
discourse, ¬𝑃(𝑥) is true for all 𝑥 in the domain
of discourse.
5 ¬𝑃(𝑥) = 𝑇 → ∀𝑥 ¬𝑃(𝑥) If ¬𝑃(𝑥) is true for all 𝑥 in the domain of
∴ ¬∃𝑥 𝑃(𝑥) ≡ ∀𝑥 ¬𝑃(𝑥) discourse, ∀𝑥 ¬𝑃(𝑥) is true.

QUANTIFIERS AND INTRODUCTION TO CATEGORICAL LOGIC

The universal quantifier is commonly encountered in the following context:

∀𝑥(𝑃(𝑥) → 𝑄(𝑥))

This is read “All x satisfying P(x) also satisfy Q(x).” or “All P is/are Q”. Here, the x in P(x) is bound by the
universal quantifier, but the x in Q(x) is not, so we use the conditional. It is much like “All x satisfying
P(x) implies all x satisfies Q(x).”

Example 1: “If x is a real number, its square is non-negative.” This means that for every real number x,
its square is non-negative. Since we see the “for every” here, we use the universal quantifier. This then
means we can rewrite to “All real numbers have non-negative squares.” For all real numbers, we do
see that their squares are non-negative, so this statement is true.

Example 2: “If x is a student, then s/he has taken an English class.” This means that for every student x,
x has taken an English class. Again, since there is a “for every”, we use the universal quantifier. This
Prepared by: Nathaniel M. Cabansay, BSCpE

then means we can rewrite to “All students have taken an English class.” However, there may be a
student that has not taken an English class, so this statement can still prove false.

Example 3: “If x is a hedgehog, then it is spiny.” This means that for all hedgehogs, we should see
spines on that hedgehog. We use the universal quantifier in that case. This then means we can rewrite
to “All hedgehogs are spiny.”

In categorical logic, the form ∀𝑥(𝑆(𝑥) → 𝑃(𝑥)) is read as “All S is/are P” and is called the universal
affirmative, symbolized as A from Latin “affirmo”.

The existential quantifier is similarly encountered in the following context:

∃𝑥 (𝑃(𝑥) ∧ 𝑄(𝑥))

This is read “Some x satisfying P(x) also satisfies Q(x)” or “Some P are Q”. We cannot use a conditional
here, since if P(x) is not satisfied, the entire statement would still be satisfied, even though the whole
statement should be false.

Example 1: “Some hedgehogs are sea urchins”. If we have a certain x that is a particular sea urchin,
P(x) “x is a hedgehog” would be false, but Q(x) “x is a sea urchin” would be true. 𝐹 → 𝑇 evaluates to
true, even though the statement “Some hedgehogs are sea urchins” is false, as you wouldn’t find a
hedgehog that is a sea urchin (even if they’re both spiny animals). If we use a conjunction, 𝐹 ∧ 𝑇
evaluates to false, which is consistent with the falseness of “Some hedgehogs are sea urchins”.

Example 2: “A certain video game character is yellow and releases electric sparks.” If we have x be an
element of the domain of discourse “video game characters”, P(x) is taken to be “x is yellow” and Q(x)
is taken to be “x releases electric sparks”. To make this statement true, there must be a certain video
game character that satisfies this. If you have played Pokémon before, you’ll come to realize that at
least one such character: Pikachu, for example, Jolteon (an evolution of Eevee), for another, is yellow
and releases electric sparks. Seeing the “at least one” implies the use of an existential quantifier.

Example 3: “At least one musical instrument can play chords and has six strings.” If we have x be an
element of the domain of discourse “musical instrument”, P(x) is taken to be “x can play chords” and
Q(x) is “x has six strings”. At least one musical instrument fits both P(x) and Q(x): the acoustic guitar. In
fact, more than one instrument fits: the classical guitar fits as well.

In categorical logic, the form ∃𝑥(𝑆(𝑥) ∧ 𝑃(𝑥)) is read as “Some S is/are P” and is called the particular
affirmative, symbolized I from the Latin “affirmo”.

We can also negate these two forms.

No. Statement Reason


1 ¬∃𝑥(𝑃(𝑥) ∧ 𝑄(𝑥)) Particular affirmative
2 ∀𝑥¬(𝑃(𝑥) ∧ 𝑄(𝑥)) Negation of an existential quantifier
3 ∀𝑥(¬𝑃(𝑥) ∨ ¬𝑄(𝑥)) De Morgan’s Law
4 ∀𝑥(𝑃(𝑥) → ¬𝑄(𝑥)) Basic conditional equivalence (𝑝 → 𝑞 ≡ ¬𝑝 ∨ 𝑞)
Prepared by: Nathaniel M. Cabansay, BSCpE

Statement 4 can be read as “All x satisfying P(x) does not satisfy Q(x)”, while statement 1 can be read
“There is not at least one x satisfying P(x) that satisfies Q(x)”. Both of these can simplify to “No P is/are
Q”. 𝑝 → ¬𝑞 always has the opposite truth value of 𝑝 → 𝑞, so the logic still follows.

Example 1: “If x is a lemon, then it is not a red object.” If we have x be an element in the set of
“objects”, P(x) is “x is a lemon” and Q(x) is “x is a red object”, this means ¬Q(x) is “x is not a red object”.
This then means that for every lemon x, none of them are red objects (Have you ever seen a red
lemon?). This means we can rewrite this statement to “No lemons are red objects.” Since we have not
seen a red lemon so far, this statement holds true.

Example 2: “There are no animals that are bears and can fly.” If we have x be an element in the set of
“animals”, P(x) is “x is a bear” and Q(x) is “x can fly”, this means ¬Q(x) is “x cannot fly”. There is indeed
no animal that is a bear and can fly. This means we rewrite the statement to “No bears can fly” and the
statement holds true.

Example 3: “There is no positive integer that is one more than a square and one less than a cube”. If
we have x be an element in the set of positive integers, P(x) is “x is one more than a square” and Q(x) is
“x is one less than a cube”. We can then rewrite the statement to “No number one more than a square
is one less than a cube”. The positive integer 26 is one more than a square (in this case, 25 = 52) and
one less than a cube (in this case, 27 = 33), so this statement is false.

In categorical logic, the forms ∀𝑥(𝑆(𝑥) → ¬𝑃(𝑥)) and ¬∃𝑥(𝑆(𝑥) ∧ 𝑃(𝑥)) are both read as “No S is/are
P” and is called the universal negative, symbolized E from the Latin “nego”.

No. Statement Reason


1 ¬∀𝑥(𝑃(𝑥) → 𝑄(𝑥)) Universal affirmative
2 ∃𝑥¬(𝑃(𝑥) → 𝑄(𝑥)) Negation of a universal quantifier
3 ∃𝑥¬(¬𝑃(𝑥) ∨ 𝑄(𝑥)) Basic conditional equivalence (𝑝 → 𝑞 ≡ ¬𝑝 ∨ 𝑞)
4 ∃𝑥 (¬(¬𝑃(𝑥)) ∧ ¬𝑄(𝑥)) De Morgan’s Law

5 ∃𝑥(𝑃(𝑥) ∧ ¬𝑄(𝑥)) Double negation


Statement 5 can be read as “There exists an x satisfying P(x) but not satisfying Q(x)”, while statement 1
can be read as “Not all x satisfying P(x) satisfies Q(x)”. The interpretation of statement 1 makes the
meaning clearer, but both of these can simplify to “Not all P is/are Q” (closer in meaning to statement 1
above) or “Some P is/are not Q” (closer in meaning to statement 5 above).

Example 1: “There exists a pen that does not write in black.” We can rewrite and negate this to “If x is a
pen, it writes in black.” For every pen x, there is at least one pen that does not write in black. It could,
for all you know, write in blue, red, green, or any other color. This statement can then be rewritten to
“Not all pens write in black” or “Some pens do not write in black”

Example 2: “There exists a member of MNL48 who is not from Luzon.” We can rewrite and negate this
to “If x is an MNL48 member, then she is from Luzon.” We can then rewrite the statement to “Not all
MNL48 members are from Luzon” or “Some MNL48 members are not from Luzon”. There is at least
one member of MNL48 who is not from Luzon. At least one is from Iloilo, which is in Visayas; and
several are from Davao, which is in Mindanao.
Prepared by: Nathaniel M. Cabansay, BSCpE

Example 3: “There exists a real number whose square is negative.” We can rewrite and negate this to
“If x is a real number, then its square is non-negative”. We can then rewrite the statement to “Not all
real numbers have non-negative squares” or “Some real numbers do not have non-negative squares.”
All real numbers have non-negative squares, so this statement is false.

In categorical logic, the forms ¬∀𝑥(𝑆(𝑥) → 𝑃(𝑥)) and ∃𝑥(𝑆(𝑥) ∧ ¬𝑃(𝑥)) are both read as “Some S is/are
not P.” and is called the particular negative, symbolized O from the Latin “nego”.
Prepared by: Nathaniel M. Cabansay, BSCpE

LESSON 5: METHODS OF PROOF PART 1 – RULES OF INFERENCE

INTRODUCTION

Methods of proof show certain statements are true and certain logic follows. These methods are used
in computer science and mathematics

DEFINING TERMS

Theorem – can be shown to be true. These can also be called propositions, facts, or results.
Proof – sequence of statements forming an argument to establish.
Axioms/Postulates – underlying assumptions about mathematical structures. Includes hypotheses of
theorem to be proved and previously proven theorems.
Definition – used to create new concepts in terms of existing ones.
Rules of Inference – can draw conclusions from other assertions and tie together the steps of the
proof.
Lemma (pl. lemmas or lemmata) – simple theorem used to prove other theorems.
Corollary – follows easily from another theorem.
Fallacy – incorrect reasoning
Conjecture – statement with no known truth value. If a proof for one is found, it becomes a theorem.

ARGUMENTS, RULES OF INFERENCE AND RULES OF REPLACEMENT

The process of drawing a conclusion from a sequence of propositions is called deductive reasoning.

An argument is a set of propositions whose conclusion is claimed to follow from the premises which
support that conclusion (Dimasuay et al., 2016). It is considered valid if the conclusion is true whenever
its hypotheses are true.

A formal proof of validity is a sequence of statements, which are either premises or statements
following from previous ones by elementary valid arguments, and its last statement is the conclusion of
the argument whose validity is being proved.

Rules of inference explain the steps used to show that the conclusion follows logically from a set of
hypotheses, rendering an argument valid. These rules of inference are:

1. Modus Ponens (abbreviated M.P.)


𝑝→𝑞
𝑝

∴𝑞

2. Modus Tollens (abbreviated M.T.)


𝑝→𝑞
¬𝑞

∴ ¬𝑝
Prepared by: Nathaniel M. Cabansay, BSCpE

3. Hypothetical Syllogism (abbreviated H.S.)


𝑝→𝑞
𝑞→𝑟

∴𝑝→𝑟
4. Disjunctive Syllogism (abbreviated D.S.)
𝑝∨𝑞 𝑝∨𝑞
¬𝑝 ¬𝑞
OR
∴𝑞 ∴𝑝
5. Constructive Dilemma (abbreviated C.D.)
(𝑝 → 𝑞) ∧ (𝑟 → 𝑠)
𝑝∨𝑟

∴𝑞∨𝑠
6. Destructive Dilemma (abbreviated D.D.)
(𝑝 → 𝑞) ∧ (𝑟 → 𝑠)
¬𝑞 ∨ ¬𝑠

∴ ¬𝑝 ∨ ¬𝑟
7. Simplification (abbreviated Simp.)
𝑝∧𝑞 𝑝∧𝑞
OR
∴𝑝 ∴𝑞
8. Conjunction (abbreviated Conj.)
𝑝
𝑞

∴𝑝∧𝑞
9. Addition (abbreviated Add.)
𝑝

∴𝑝∨𝑞
10. Resolution (abbreviated Res.)
𝑝∨𝑞
¬𝑝 ∨ 𝑟

∴𝑞∨𝑟
11. Absorption (abbreviated Abs.)
𝑝→𝑞

∴ 𝑝 → (𝑝 ∧ 𝑞)

Rules of replacement allow certain logically equivalent expressions to replace each other when they
occur.

1. De Morgan’s Theorem (abbreviated De M.)


¬(𝑝 ∧ 𝑞) ≡ (¬𝑝 ∨ ¬𝑞)
¬(𝑝 ∨ 𝑞) ≡ (¬𝑝 ∧ ¬𝑞)
Prepared by: Nathaniel M. Cabansay, BSCpE

2. Commutative Property (abbreviated Com.)


(𝑝 ∨ 𝑞) ≡ (𝑞 ∨ 𝑝)
(𝑝 ∧ 𝑞) ≡ (𝑞 ∧ 𝑝)
3. Associative Property (abbreviated Assoc.)
[𝑝 ∨ (𝑞 ∨ 𝑟)] ≡ [(𝑝 ∨ 𝑞) ∨ 𝑟]
[𝑝 ∧ (𝑞 ∧ 𝑟)] ≡ [(𝑝 ∧ 𝑞) ∧ 𝑟]
4. Distribution (abbreviated Dist.)
[𝑝 ∧ (𝑞 ∨ 𝑟)] ≡ [(𝑝 ∧ 𝑞) ∨ (𝑝 ∧ 𝑟)]
[𝑝 ∨ (𝑞 ∧ 𝑟)] ≡ [(𝑝 ∨ 𝑞) ∧ (𝑝 ∨ 𝑟)]
5. Double Negation (abbreviated D.N.)
𝑝 ≡ ¬¬𝑝
6. Transposition (abbreviated Trans.)
(𝑝 → 𝑞) ≡ (¬𝑞 → ¬𝑝)
7. Material Implication (abbreviated M.I.)
(𝑝 → 𝑞) ≡ (¬𝑝 ∨ 𝑞)
8. Material Equivalence (abbreviated M.E.)
(𝑝 ↔ 𝑞) ≡ [(𝑝 → 𝑞) ∧ (𝑞 → 𝑝)]
(𝑝 ↔ 𝑞) ≡ [(𝑝 ∧ 𝑞) ∨ (¬𝑝 ∧ ¬𝑞)]
9. Exportation (abbreviated Exp.)
[(𝑝 ∧ 𝑞) → 𝑟] ≡ [𝑝 → (𝑞 → 𝑟)]
10. Tautology (abbreviated Taut.)
𝑝 ≡ (𝑝 ∨ 𝑝)
𝑝 ≡ (𝑝 ∧ 𝑝)

RULES OF INFERENCE FOR QUANTIFIED STATEMENTS

1. Universal instantiation – used to conclude that 𝑃(𝑐) is true, where 𝑐 ∈ domain of discourse,
given ∀𝑥, 𝑃(𝑥)
∀𝑥, 𝑃(𝑥)

∴ 𝑃(𝑐)
2. Universal generalization – used to conclude that ∀𝑥, 𝑃(𝑥) is true given the premise that 𝑃(𝑐) is
true for all 𝑐 ∈ domain of discourse.
𝑃(𝑐) for an arbitrary 𝑐

∴ ∀𝑥, 𝑃(𝑥)
3. Existential instantiation – used to conclude that there is at least one 𝑐 ∈ domain of discourse
that makes 𝑃(𝑐) true if we know ∃𝑥, 𝑃(𝑥) is true.
∃𝑥, 𝑃(𝑥)

∴ 𝑃(𝑐) for some element 𝑐


4. Existential generalization – used to conclude that ∃𝑥, 𝑃(𝑥) is true given that a particular
element 𝑐 that makes 𝑃(𝑐) true is known.
𝑃(𝑐) for some element 𝑐

∴ ∃𝑥, 𝑃(𝑥)
Prepared by: Nathaniel M. Cabansay, BSCpE

EXAMPLES FOR EACH RULE OF INFERENCE

Rule Example Statement


Modus Ponens If Sonic gets one hundred rings, he gets an extra
life.
Sonic grabbed one hundred rings
Therefore, he gets an extra life.
Modus Tollens If I add salt to the soup, it will taste better.
The soup did not taste better
Therefore, I did not add salt.
Hypothetical Syllogism If it is almost March, then Eri travels to Japan.
If she travels to Japan, then she can go cherry
blossom viewing.
Therefore, if it is almost March, then Eri can go
cherry blossom viewing.
Disjunctive Syllogism Fabio enjoys lasagna or risotto.
He does not enjoy risotto.
Therefore, he enjoys lasagna.
ALTERNATIVELY
Fabio enjoys lasagna or risotto.
He does not enjoy lasagna.
Therefore, he enjoys risotto.
Constructive Dilemma If Heidi heads north to Germany, she can visit
Gunther’s place, and if she heads west to France,
she can visit Clair’s place.
She either heads north to Germany or heads
west to France.
Therefore, she either visits Gunther’s place or
Clair’s place.
Destructive Dilemma If Igor made it to Saint Petersburg in time, he
took a taxi. If Julia made it to Saint Petersburg in
time, then she took a plane from London.
Either Igor did not take a taxi or Julia did not
take a plane from London.
Therefore, Igor or Julia did not make it to Saint
Petersburg in time.
Simplification A pencil can be sharpened and erased.
Therefore, a pencil can be sharpened.
ALTERNATIVELY
A pencil can be sharpened and erased.
Therefore, a pencil can be erased.
Prepared by: Nathaniel M. Cabansay, BSCpE

Conjunction The sun is bright


The road is dry
Therefore, the sun is bright, and the road is dry.
Addition A tube of paint can be white.
Therefore, a tube of paint can be either white or
black.
Resolution David goes out, or he will read the New York
Times.
David stays in, or he will watch CNN.
Therefore, he will either read the New York
Times or watch CNN.
Absorption If Gunther goes to Oktoberfest, then he eats
bratwurst sausages.
Therefore, if Gunther goes to Oktoberfest, then
he goes to Oktoberfest and he eats bratwurst
sausages.
Universal Instantiation All hedgehogs have spines.
Therefore, Sonic the Hedgehog has spines.
Universal Generalization Sonic the Hedgehog has spines.
Therefore, all hedgehogs have spines.
Existential Instantiation There is an integer one greater than a square
and one less than a cube.
26 is one greater than a square and one less
than a cube.
Existential Generalization 26 is one greater than a square and one less
than a cube.
Therefore, there is an integer one greater than a
square and one less than a cube.

CATEGORICAL SYLLOGISMS

Syllogisms are deductive arguments with two premises and one conclusion. Categorical syllogisms
consist of three categorical statements, where two are premises, and one is the conclusion.

Categorical syllogisms are structured this way:

Major premise
Minor premise
Conclusion.

The major premise contains the major term. The minor premise contains the minor term.

A categorical syllogism also contains three terms: the major term, the minor term, and the middle
term. The major term appears in the major premise and is the predicate in the conclusion, the minor
Prepared by: Nathaniel M. Cabansay, BSCpE

term appears in the minor premise and is the subject of the conclusion, and the middle term appears
with the same meaning in both premises and does not appear in the conclusion.

For example:

All men are mortal.


Socrates is a man.
Therefore, Socrates is mortal.

The major premise is “All men are mortal”. The minor premise is “Socrates is a man”. Since the term
“man” appears in both premises and with the same meaning, this is the middle term. The term “mortal”
appears in the major premise, so this is the major term, and is thus the predicate of the conclusion. The
term “Socrates” appears in the minor premise, so this is the minor term, and is thus the subject of the
conclusion.

A term can either be distributed or undistributed depending on the type of categorical proposition. A
term is distributed if all members of the term’s set are affected by the proposition (some sources call
this universal), and undistributed if only some of the members of the term’s set are affected.

The subject (first term) of a statement is distributed/universal if the statement is a universal statement
(A/E), and undistributed/particular if the statement is a particular statement (I/O). The predicate
(second term) of a statement is universal if the statement is a negative statement (E/O), and is particular
if the statement is an affirmative statement (A/I).

Form Statement Subject Predicate


A All S is/are P Distributed/Universal Undistributed/Particular
E No S is/are P Distributed/Universal Distributed/Universal
I Some S is/are P Undistributed/Particular Undistributed/Particular
O Some S is/are not P or Not all S is/are P Undistributed/Particular Distributed/Universal

EXAMPLES OF DISTRIBUTED AND UNDISTRIBUTED

Example 1 (A-proposition): “All men are mortal.”

The term “men” is distributed here because all men are indeed mortal. The term “mortal” however is
undistributed, as you cannot say that men are the only mortal beings that exist. There are other mortal
beings that exist, such as hedgehogs, echidnas, cats, dogs, rabbits, mice, and basically any other living
being.

Example 2 (E-proposition): “No apples are oranges.”

The term “apple”, or more specifically “not apple” applies to all members the set of oranges, so the
term “apple” is distributed. If we say: “No apples are oranges”, we could also say that “No oranges are
apples”, so the term “orange” is also distributed here. Both terms are thus distributed.

Example 3 (I-proposition): “Some men are wealthy.”

The term “men” applies only to some members of people who are wealthy, as there are women and
even non-binary people who are wealthy, thus the term “men” is undistributed. Likewise, the term
Prepared by: Nathaniel M. Cabansay, BSCpE

“wealthy” is undistributed here because the set of wealthy people only includes some members of the
set of men, not all of them. Both terms are thus undistributed.

Example 4 (O-proposition): “Some students are not CpE majors.”

The term “students” is undistributed here. It becomes clearer if we rewrite the proposition to “Not all
students are CpE majors”, since the rule of being a CpE major does not define all students, but only
some of them. The term “CpE majors”, however, is distributed since the set of students who are not
CpE majors would be removed. This leaves the set of students who are CpE majors, and all members
of that set are affected by the term.

RULES OF SYLLOGISM

A valid syllogism follows these eight rules:

1. There should only be three terms in the syllogism: the major, minor, and middle terms.
The meaning in the middle term should be the same in both premises.
Fallacy: Fallacy of Four Terms and Fallacy of Equivocation – instead of the syllogism having
three terms, it has four. This can also be because the middle term changes meanings between
premises.

Example of a syllogism committing this fallacy:


All stars are heavenly bodies.
Taylor Swift is a star.
Therefore, Taylor Swift is a heavenly body.

The term “star” has different meanings between the two premises, so there are technically four
terms in this syllogism.
2. The major and minor terms should only be distributed in the conclusion if they are
distributed in the premises.
Fallacies: Fallacy of Illicit Major and Fallacy of Illicit Minor – the major and/or minor term(s)
is/are distributed or universal in the conclusion, but not in the major and/or minor premise(s),
respectively.

Example of a syllogism committing the Fallacy of Illicit Major:


All sushi is Japanese food.
No ramen is sushi.
Therefore, no ramen is Japanese food.

The major term here is “Japanese food”. It is distributed in the conclusion, but not in the major
premise. If you say that “No ramen is Japanese food”, you could also say that “No Japanese
food is ramen”, so the term “Japanese food” is distributed here in the conclusion. However, if
you say that “All sushi is Japanese food”, you cannot say that “All Japanese food is sushi”, so
the term “Japanese food” is undistributed in the major premise.

Example of a syllogism committing the Fallacy of Illicit Minor:


All computer programmers are intelligent.
Prepared by: Nathaniel M. Cabansay, BSCpE

However, all computer programmers are loners.


Therefore, all loners are intelligent.

The minor term here is “loners”. It is distributed in the conclusion, but not in the minor premise.
If you say that “All loners are intelligent”, the term intelligent describes all loners, so the term
“loners” is distributed here in the conclusion. However, if you say that “All computer
programmers are loners”, you cannot say that “All loners are computer programmers”, so the
term “loners” is undistributed in the minor premise.

3. The middle term must be distributed at least once.


Fallacy: Fallacy of the Undistributed Middle – the middle term is not distributed at all.

Example of a syllogism committing this fallacy:


Some Australians do not live in New South Wales.
Katie is an Australian.
Therefore, Katie does not live in New South Wales.

The middle term here is “Australian”. In the statement “Some Australians do not live in New
South Wales”, the condition of living in New South Wales does not apply to all Australians, and
neither does the term Australian apply to all those not living in New South Wales, so the term
“Australian” is undistributed in the major premise. In the statement “Katie is an Australian”, the
term Australian does not always refer to Katie, so the term “Australian” is also undistributed in
the minor premise.

4. If the premises are affirmative, then the conclusion must be affirmative.


Fallacy: Negative Conclusion from Affirmative Premises or Illicit Affirmative – the
conclusion is negative, but both premises are affirmative.

Example of a syllogism committing this fallacy:


Some Swedish enjoy Baltic herring. (Note: herring is a kind of fish)
Lars is Swedish.
Therefore, Lars does not enjoy Baltic herring.

Lars may indeed not enjoy Baltic herring, but the argument does not logically support that. If
we compared it to sets and subsets, we have a set of people who enjoy Baltic herring and a set
of people who are Swedish. At least some part of the set of Swedish intersects with the set of
people who enjoy Baltic herring. The set containing Lars as its only element is a subset of the
set of people who are Swedish. We cannot conclude if Lars is part of the set of people who
enjoy Baltic herring or not, so this argument is invalid.

5. If one premise is affirmative and the other negative, then the conclusion must be
negative.
Fallacy: Affirmative Conclusion from a Negative Premise or Illicit Negative – the conclusion
is affirmative, but one of its premises is negative.
Prepared by: Nathaniel M. Cabansay, BSCpE

Example of a syllogism committing this fallacy:


No Eevee evolve into Pikachu.
All Pikachu evolve into Raichu.
Therefore, some Eevee evolve into Raichu.

The conclusion is obviously counterfactual. If you’ve played Pokémon before, you do know that
Raichu never evolve from any Eevee. The premises are true, though, since Eevee never evolves
into a Pikachu, and if a Pikachu evolves, it always evolves into a Raichu.

6. No valid conclusion can be drawn from two negative premises.


Fallacy: Exclusive Premises – a conclusion is drawn from two negative premises.

Example of a syllogism committing this fallacy:


No cookies have peanut butter.
Sliced bread is not a cookie.
Therefore, sliced bread has peanut butter.

Yes, sliced bread may indeed be spread with peanut butter, but it does not follow logically
from the premises. There is no way to logically deduce that sliced bread has peanut butter
from the fact that sliced bread is not a cookie, and no cookies have peanut butter.

7. At least one premise must be universal.


Fallacy: Any of Fallacy of the Undistributed Middle, Illicit Major, Illicit Minor, Illicit Affirmative,
Illicit Negative, or Exclusive Premises (if both are O-propositions/particular negatives).

Example of a syllogism from two particular statements:


Some fountain pens are objects that write in blue.
Some pencils are not fountain pens.
Therefore, some pencils are not objects that write in blue.

Some pencils may indeed not write in blue, but this commits the fallacy of Illicit Major, as the
term “objects that write in blue” is distributed in the conclusion, but not in the major premise.

8. If one premise is particular, then the conclusion must be particular. Similarly, if the
conclusion is particular, one premise must be particular.
Fallacy: Any of Fallacy of the Undistributed Middle, Illicit Major, Illicit Minor, Illicit Affirmative,
Illicit Negative, or Existential Fallacy. Existential Fallacy – a particular conclusion is drawn from
two universal premises

Example of a syllogism where a universal conclusion is drawn from at least one particular
premise:
Some plumbers are Italian.
No turtles are Italian.
Therefore, no turtles are plumbers.

This commits the fallacy of the Illicit Major, as the term “plumbers” is distributed in the
Prepared by: Nathaniel M. Cabansay, BSCpE

conclusion, but not in the major premise.

Example of a syllogism committing Existential Fallacy:


All British are people that drink tea.
All people that eat fish and chips are British.
Therefore, some people that eat fish and chips are people that drink tea.
Prepared by: Nathaniel M. Cabansay, BSCpE

LESSON 6: METHODS OF PROOF PART 2 – VARIOUS TYPES OF PROOF

TYPES OF PROOFS

There are many types of proofs, some of which are:

• Direct Proof
• Indirect Proof
• Proof by Contradiction
• Proof by Mathematical Induction

There are more methods of proofs than just these four.

DIRECT PROOF

Given 𝑝 → 𝑞, we assume p is true, then using p and other axioms, definitions, and previously derived
theorems, show directly that q is true.

Example: Prove using a direct proof that for all rational numbers 𝑥 and 𝑦, 𝑥 + 𝑦 is also rational.

No. Statement Reason


1 𝑝: 𝑥 ∈ ℚ ∧ 𝑦 ∈ ℚ Implication (ℚ is the set of rational numbers [the Q
𝑞: 𝑥 + 𝑦 ∈ ℚ is from the word “quotient”, which describes
rational numbers])
2 𝑥 ∈ℚ∧ 𝑦 ∈ ℚ Assume 𝑝 is true
3 𝑚 Definition of a rational number as the quotient of
∀𝑚∀𝑛 ∈ ℤ, 𝑛 ≠ 0 → ∈ℚ
𝑛 two integers.
4 Let 𝑎, 𝑏, 𝑐, 𝑑 ∈ ℤ Define 𝑥 and 𝑦 according to the definition in
𝑎 𝑐 statement 3
𝑥 = ,𝑦 =
𝑏 𝑑
5 𝑎 𝑐 Add 𝑥 and 𝑦 together.
𝑥+𝑦= +
𝑏 𝑑
6 𝑎𝑑 + 𝑏𝑐 Add both fractions on the right-hand side.
𝑥+𝑦=
𝑏𝑑
7 ∀𝑚∀𝑛 ∈ ℤ, 𝑚 + 𝑛 ∈ ℤ ∧ 𝑚𝑛 ∈ ℤ Adding two integers results in another integer and
multiplying two integers gives another integer.
8 ∴𝑥+𝑦 ∈ℚ From statement 7, 𝑎𝑑, 𝑏𝑐, 𝑏𝑑 ∈ ℤ, and 𝑎𝑑 + 𝑏𝑐 ∈ ℤ.
𝑎𝑑+𝑏𝑐
From statement 3, ∈ ℚ. This corresponds to
𝑏𝑑
𝑞.

INDIRECT PROOF

Since the implication 𝑝 → 𝑞 has the same truth value as its contrapositive, ¬𝑞 → ¬𝑝, we can prove the
implication by showing the contrapositive is also true.
Prepared by: Nathaniel M. Cabansay, BSCpE

Example: Prove using an indirect proof that if 𝑛2 is even, then 𝑛 is even.

No. Statement Reason


1 ∀𝑛 ∈ ℤ ∃𝑘 ∈ ℤ, 𝑛 = 2𝑘 → 𝑛 is even. Definition of an even number (Read as: “If for all
integers n, there exists an integer k such that n=2k,
then n is even”)
2 𝑝: 𝑛2 = 2𝑘 Implication
𝑞: 𝑛 = 2𝑘
3 ∀𝑛 ∈ ℤ ∃𝑘 ∈ ℤ, 𝑛 = 2𝑘 + 1 → 𝑛 is odd. Definition of an odd number (Read as: “If for all
integers n, there exists an integer k such that
n=2k+1, then n is odd”)
4 ¬𝑞: 𝑛 = 2𝑘 + 1 Contrapositive
¬𝑝: 𝑛2 = 2𝑘 + 1
5 𝑛 = 2𝑘 + 1 Assume ¬𝑞 is true
6 𝑛2 = (2𝑘 + 1)2 Square both sides
7 𝑛2 = 4𝑘 2 + 4𝑘 + 1 Binomial expansion on the right side
8 𝑛2 = 2(2𝑘 2 + 2𝑘) + 1 Factor a 2 from some terms of the right-hand side
9 ∀𝑚∀𝑛 ∈ ℤ, 𝑚 + 𝑛 ∈ ℤ ∧ 𝑚𝑛 ∈ ℤ Adding two integers results in another integer and
multiplying two integers gives another integer.
10 ∴ 𝑛2 is odd Since 2𝑘 2 + 2𝑘 is an integer, then 2(2𝑘 2 + 2𝑘) + 1
is an odd integer, which corresponds to ¬𝑝. Since
¬𝑞 → ¬𝑝 is true, 𝑝 → 𝑞 is true.

PROOF BY CONTRADICTION

This establishes that 𝑝 → 𝑞 is true by assuming 𝑝 is true and 𝑞 is false, then using 𝑝 and ¬𝑞 as well as
other axioms, definitions, and previously derived theorems, derives a contradiction.

Example: Prove by contradiction that √2 is irrational.

No. Statement Reason


1 𝑝: 𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ Define two integers 𝑎 and 𝑏. Conditional
𝑞: √2 ∉ ℚ
2 𝑚 Definition of a rational number
∀𝑚∀𝑛 ∈ ℤ, 𝑛 ≠ 0 → ∈ℚ
𝑛
3 ¬𝑞: √2 ∈ ℚ Negate 𝑞

4 𝑎 𝑎 Suppose √2 is rational
√2 = where is in lowest terms.
𝑏 𝑏
5 𝑎2 Square both sides
2=
𝑏2
6 𝑎2 = 2𝑏 2 Multiply both sides by 𝑏 2
Prepared by: Nathaniel M. Cabansay, BSCpE

7 (2𝑐)2 = 2𝑏 2 The square of 𝑎 is even, so we know that 𝑎 is itself


even, so define 𝑎 = 2𝑐
8 4𝑐 2 = 2𝑏 2 Square 2𝑐
9 𝑏 2 = 2𝑐 2 Divide both sides by 2
10 𝑎 2𝑐 This means 𝑏 is even, so let 𝑏 = 2𝑑 and we find a
=
𝑏 2𝑑 contradiction here.
𝑎
11 𝑎 2𝑐 We stated that is in lowest terms, but we found
√2 = = 𝑏
𝑏 2𝑑 that this is not the case, as both 𝑎 and 𝑏 are even.
12 ∴ √2 ∈ ℚ is false Since we found a contradiction, then our
assumption that √2 ∈ ℚ is false, which means that
∴ √2 ∉ ℚ is true
the original conclusion is true.

MATHEMATICAL INDUCTION

Mathematical induction is a way to prove a statement 𝑆𝑛 consisting of two steps:

1. Show that the statement 𝑆1 (the base case) is true.


2. Prove that 𝑆𝑘 → 𝑆𝑘+1 for all 𝑘 ∈ ℕ (the set of natural numbers)

Example 1: Prove that ∑𝑛𝑘=1(2𝑘 − 1) = 𝑛2 for all the natural numbers 𝑛 (Chua et al., 2016).

No. Statement Reason


𝑛
1 Statement to prove
𝑆𝑛 : ∑(2𝑘 − 1) = 𝑛2
𝑘=1

2 𝑆1 : 1 = 12 Set 𝑛 = 1. There is only one term,


and 2(1) − 1 = 1. 12 = 1, thus, the
base case is true.
3 𝑆𝑛 : 1 + 3 + 5 + ⋯ + (2𝑛 − 1) = 𝑛2 Assume 𝑆𝑛 is true
4 𝑆𝑛+1 : 1 + 3 + 5 + ⋯ + (2𝑛 − 1) + (2𝑛 + 1) = (𝑛 + 1)2 Set 𝑛 = 𝑛 + 1 to prove that 𝑛 + 1 is
true when 𝑛 is true.
5 𝑛2 + (2𝑛 + 1) = (𝑛 + 1)2 Substitute statement 3 into
statement 4
6 (𝑛 + 1)2 = (𝑛 + 1)2 Binomial expansion on the left
Since the two sides equal, we have proven not only 𝑆𝑛+1 side.
but also 𝑆𝑛 → 𝑆𝑛+1 , so we can conclude that 𝑆𝑛 is true for
all 𝑛 ∈ ℕ.
𝑛(𝑛+1)
Example 2: Prove that ∑𝑛𝑘=1 𝑘 =
2

No. Statement Reason


𝑛
1 𝑛(𝑛 + 1) Statement to prove
𝑆𝑛 : ∑ 𝑘 =
2
𝑘=1
Prepared by: Nathaniel M. Cabansay, BSCpE

2 1(2) Set 𝑛 = 1.
1(2)
= 1, thus, the base
𝑆1 : 1 = 2
2 case is true.
3 𝑛(𝑛 + 1) Assume 𝑆𝑛 is true
𝑆𝑛 : 1 + 2 + 3 + ⋯ + 𝑛 =
2
4 (𝑛 + 1)(𝑛 + 2) Set 𝑛 = 𝑛 + 1 to prove that 𝑛 + 1 is
𝑆𝑛+1 : 1 + 2 + 3 + ⋯ + 𝑛 + (𝑛 + 1) =
2 true when 𝑛 is true.
5 𝑛(𝑛 + 1) (𝑛 + 1)(𝑛 + 2) Substitute statement 3 into
+ (𝑛 + 1) =
2 2 statement 4
6 𝑛(𝑛 + 1) + 2(𝑛 + 1) = (𝑛 + 1)(𝑛 + 2) Multiply both sides by 2
7 (𝑛 + 1)(𝑛 + 2) = (𝑛 + 1)(𝑛 + 2) Factor by grouping on the left
Since the two sides equal, we have proven not only 𝑆𝑛+1 side.
but also 𝑆𝑛 → 𝑆𝑛+1 , so we can conclude that 𝑆𝑛 is true for
all 𝑛 ∈ ℕ.

OTHER METHODS OF PROOF

The methods of proofs shown here are not the only ways you can prove certain statements. In fact, we
even have a method for disproving a certain statement, or proving that a certain statement is false.

Example 1: Prove that 𝑘 3 − 𝑘 is divisible by 6 ∀𝑘 ∈ ℤ.

Here, we use a method known as proof by exhaustion, which manually and rigorously shows that all
cases will really make the statement true.

No. Statement Reason


1 𝑘 3 − 𝑘 = 𝑘(𝑘 2 − 1) Common monomial factor
2 𝑘 3 − 𝑘 = 𝑘(𝑘 − 1)(𝑘 + 1) Difference of two squares
3 𝑘 3 − 𝑘 = (𝑘 − 1)𝑘(𝑘 + 1) Rearrange to show that we are
multiplying 3 consecutive integers.
4 6=2⋅3 Break down 6 into its prime
factors.
5 Subsets of ℤ with 3 elements which are consecutive integers: There is always going to be at
{12, 13, 14}, {68, 69, 70}, {143, 144, 145}, {37, 38, 39} least one even number and exactly
one multiple of 3 in a set of 3
consecutive integers.
6 Since 𝑘 ∈ ℤ, 𝑘 is either even or odd: Consider 𝑘 then define an integer
𝑝 to prove that 𝑘 3 − 𝑘 is even.
• 𝑘 is even → ∃𝑝 ∈ ℤ, 𝑘 = 2𝑝. We then substitute
𝑘 = 2𝑝. So, 𝑘 3 − 𝑘 = (2𝑝 − 1)2𝑝(2𝑝 + 1).
Thus, 𝑘 3 − 𝑘 = 2[(2𝑝 − 1)𝑝(2𝑝 + 1)]
• 𝑘 is odd → ∃𝑝 ∈ ℤ, 𝑘 = 2𝑝 + 1. We then substitute
𝑘 = 2𝑝 + 1. So, 𝑘 3 − 𝑘 = (2𝑝)(2𝑝 + 1)(2𝑝 + 2)
Thus, 𝑘 3 − 𝑘 = 2[𝑝(2𝑝 + 1)(𝑝 + 1)]
Prepared by: Nathaniel M. Cabansay, BSCpE

7 ∀𝑚∀𝑛 ∈ ℤ, 𝑚 + 𝑛 ∈ ℤ ∧ 𝑚𝑛 ∈ ℤ Adding two integers and


multiplying integers results in
another integer
8 ∀𝑛 ∈ ℤ ∃𝑘 ∈ ℤ, 𝑛 = 2𝑘 → 𝑛 is even. Definition of an even number
9 ∴ ∀𝑘 ∈ ℤ, 𝑘 3 − 𝑘 is even From the definitions in statements
7 and 8, we can conclude that 𝑘 3 −
𝑘 is even from both cases shown in
statement 6.
10 Since 𝑘 ∈ ℤ, 𝑘 can be written as 3𝑛 − 1, 3𝑛, or 3𝑛 + 1 We then do something similar to
prove that 𝑘 3 − 𝑘 is a multiple of 3
• 𝑘 = 3𝑛 − 1 → 𝑘 3 − 𝑘 = (3𝑛 − 2)(3𝑛 − 1)(3𝑛), this
means 𝑘 3 − 𝑘 = 3[(3𝑛 − 2)(3𝑛 − 1)(𝑛)]
• 𝑘 = 3𝑛 → 𝑘 3 − 𝑘 = (3𝑛 − 1)(3𝑛)(3𝑛 + 1), this
means 𝑘 3 − 𝑘 = 3[(3𝑛 − 1)(𝑛)(3𝑛 + 1)]
• 𝑘 = 3𝑛 + 1 → 𝑘 3 − 𝑘 = (3𝑛)(3𝑛 + 1)(3𝑛 + 2), this
means 𝑘 3 − 𝑘 = 3[ 𝑛(3𝑛 + 1)(3𝑛 + 2)]
11 ∀𝑛 ∈ ℤ ∃𝑘 ∈ ℤ, 𝑛 = 3𝑘 → 𝑛 is a multiple of 3. Definition of a multiple of 3
12 ∴ ∀𝑘 ∈ ℤ, 𝑘 3 − 𝑘 is a multiple of 3 From the definitions in statements
7 and 11, we can conclude that
𝑘 3 − 𝑘 is a multiple of 3 from all
cases shown in statement 10.
13 ∀𝑛 ∈ ℤ ∃𝑘 ∈ ℤ, 𝑛 = 6𝑘 → 𝑛 is divisible by 6 Definition of a number divisible by
6
14 6𝑘 = 2(3𝑘) From statement 4, 6 = 2(3)
6𝑘 = 3(2𝑘)
15 𝑛 is divisible by 6 ↔ 𝑛 is divisible by 2 and 3. From statement 14, a
biconditional can be formed.
16 ∴ ∀𝑘 ∈ ℤ, 𝑘 3 − 𝑘 is divisible by 6 From statements 9 and 12
Example 2: Disprove that n4-n is divisible by 4 ∀𝑛 ∈ ℤ.

Here, we use a disproof by counterexample which shows a counterexample that makes the statement
false.

No. Statement Reason


1 𝑘4 − 𝑘 Statement to prove/disprove
2 𝑘 = 0 → 04 − 0 = 0 We test various cases, and quickly
𝑘 = 1 → 14 − 1 = 0 find a counterexample at 𝑘 = 2
𝑘 = 2 → 24 − 2 = 14
3 ∴ 𝑛4 − 𝑛 is not always divisible by 4 ∀𝑛 ∈ ℤ Since 14 is not divisible by 4, that
means the statement 𝑛4 − 𝑛 is
divisible by 4 for all integers 𝑛 is
false.
Prepared by: Nathaniel M. Cabansay, BSCpE

LESSON 7: SEQUENCES AND SUMMATIONS

SEQUENCES

Sequences are ordered lists of elements, usually numbers. They are sometimes called progressions.
They are similar to sets, but the elements can duplicate and are ordered. For example, the first element
and the fourth element of a sequence can both be 12, and the 12 as the first element of the sequence
is distinct from the 12 as the fourth element of the sequence.

It is a function from a subset of any set of numbers (usually ℤ, ℚ, or ℝ). Individual elements in the
sequence are denoted 𝑎𝑛 , which is the 𝑛th element of the sequence. For example: 𝑎5 is the fifth
element of a sequence. {𝑎𝑛 } denotes an entire sequence.

TYPES OF SEQUENCES

1. Arithmetic sequence – each term in the sequence is added by constant amount from the
previous one.
The 𝑛th term of an arithmetic sequence is obtained by 𝑎𝑛 = 𝑎1 + (𝑛 − 1)𝑑, where 𝑎1 is the first
term of the sequence, and 𝑑 is the common difference.

Example: 10, 14, 18, 22, 26, 30, …. Each term of the sequence is 4 more than the previous
term, so the common difference here is 4. The first term is 10, so the 𝑛th term of the sequence
is equal to 𝑎𝑛 = 10 + (𝑛 − 1)4

2. Geometric sequence – each term in the sequence is multiplied by a factor from the previous
one.
The 𝑛th term of a geometric sequence is obtained by 𝑎𝑛 = 𝑎1 𝑟 𝑛−1 , where 𝑎1 is the first term of
the sequence, and 𝑟 is the common ratio.

Example: 9, 18, 36, 72, 144, …. Each term of the sequence is twice the previous term, so the
common ratio here is 2. The first term is 9, so the 𝑛th term of the sequence is equal to 𝑎𝑛 = 9 ⋅
2𝑛−1

3. Harmonic sequence – sequence formed from the reciprocals of the elements of an arithmetic
sequence. Note: The reciprocal of a geometric sequence is a different geometric sequence.

1 4 2 4 1
Example: , , , , , …. The sequence is not immediately obvious, but if we rewrite the
3 13 7 15 4
4 4 4 4 4
sequence such that the numerators are all the same, we get the sequence , , , , , ….
12 13 14 15 16
12 13 14 15 16
Get the reciprocals of the terms and we get , , , , , …. The common difference of the
4 4 4 4 4
1
equivalent arithmetic sequence is .
4

Other types of sequences include the Fibonacci sequence and other sequences formed by other rules.

The Fibonacci sequence is a sequence whose next term is defined by the sum of its two previous
terms (Aufmann et al., 2013). Its first two terms are 1 and 1, then they are followed by 2, 3, 5, 8, 13, 21,
34, 55, …. A formula to find the 𝑛th Fibonacci number is shown below:
Prepared by: Nathaniel M. Cabansay, BSCpE

𝑛 𝑛
(1 + √5) − (1 − √5)
𝐹𝑛 =
√5 ⋅ 2𝑛

SOME USEFUL SEQUENCES

1. Sequence of Squares: 𝑛2 = 1, 4, 9, 16, 25, 36, …


2. Sequence of Cubes: 𝑛3 = 1, 8, 27, 64, 125, 216, …
3. Sequence of Fourth Powers: 𝑛4 = 1, 16, 81, 256, 625, 1296, …
4. Sequence of Powers of Two: 2𝑛 = 2, 4, 8, 16, 32, 64, …
5. Sequence of Powers of Three: 3𝑛 = 3, 9, 27, 81, 243, 729, …
6. Sequence of Powers of Five: 5𝑛 = 5, 25, 125, 625, 3 125, 15 625, …
7. Sequence of Powers of Ten: 10𝑛 = 10, 100, 1 000, 10 000, 100 000, …
8. Sequence of Factorials: 𝑛! = 1, 2, 6, 24, 120, 720, …

EXAMLES OF DETERMINING THE FORMULA OF A SEQUENCE

Example 1: Suppose we have the sequence 7, 14, 21, 28, 35, …. We can tell that this is an arithmetic
sequence with its first term equal to 7 and its common difference also equal to 7. We could
immediately tell that the formula for this sequence is 𝑎𝑛 = 7𝑛, but let’s just make sure. We have 𝑎𝑛 =
𝑎1 + (𝑛 − 1)𝑑. Just substitute the values in: 𝑎𝑛 = 7 + (𝑛 − 1)7, then multiply: 𝑎𝑛 = 7 + 7𝑛 − 7, then
combine like terms: 𝑎𝑛 = 7𝑛. This confirms that this is indeed the formula.

Example 2: Suppose we have the sequence 62, 50, 38, 26, …. We can tell that this is an arithmetic
sequence with its first term equal to 62 and its common difference equal to 12, but since it is a
decrease, that common difference is -12. We use our formula 𝑎𝑛 = 𝑎1 + (𝑛 − 1)𝑑 then substitute to get
𝑎𝑛 = 62 + (𝑛 − 1)(−12). We then multiply (𝑛 − 1) by -12, so our formula becomes 𝑎𝑛 = 62 − 12𝑛 + 12.
We combine like terms and we arrive at the simplest form of the rule: 𝑎𝑛 = 74 − 12𝑛.

Example 3: Suppose we have the sequence 18, 35, 52, 69, 86, …. We can tell that this is an arithmetic
sequence with its first term equal to 18 and its common difference equal to 17. We use our formula
𝑎𝑛 = 𝑎1 + (𝑛 − 1)𝑑, then substitute to get 𝑎𝑛 = 18 + (𝑛 − 1)(17). Multiply (𝑛 − 1) by 17 then combine
like terms and we get the simplest form of the rule: 𝑎𝑛 = 17𝑛 + 1

Example 4: Suppose we have the sequence 100, 50, 25, 12.5, 6.25, …. We can tell that this is a
1
geometric sequence with its first term equal to 100. Its common ratio equals since the quantities are
2
being divided by 2. We can then use our formula 𝑎𝑛 = 𝑎1 𝑟 𝑛−1 and then substitute the values so we
1 𝑛−1 1 𝑛−1
have 𝑎𝑛 = 100 ⋅ ( ) . We can simplify further by using laws of exponents to split ( ) so we get
2 2
1 𝑛 1 −1 100 1 𝑛 2 1 𝑛 1 𝑛
𝑎𝑛 = 100 ⋅ ( ) ( ) , then 𝑎𝑛 = 1 ⋅ ( ) , then 𝑎𝑛 = 100 ⋅ ⋅ ( ) , then 𝑎𝑛 = 200 ⋅ ( ) , and 𝑎𝑛 = 200 ⋅
2 2 2 1 2 2
2
1 1 200
. Finally, we can multiply 200 by to get 𝑎𝑛 =
2𝑛 2𝑛 2𝑛

Example 5: Suppose we have the sequence 2.5, 5, 10, 20, 40, …. We can tell that this is a geometric
sequence with its first term equal to 2.5. Each term is twice the previous term, so its common ratio is 2.
We can then use our formula 𝑎𝑛 = 𝑎1 𝑟 𝑛−1 and then substitute the values so we have 𝑎𝑛 = 2.5 ⋅ 2𝑛−1 . We
can simplify the formula by breaking up the exponent: 𝑎𝑛 = 2.5 ⋅ 2𝑛 ⋅ 2−1 then we get 𝑎𝑛 = 1.25 ⋅ 2𝑛 .
Prepared by: Nathaniel M. Cabansay, BSCpE

3 2 3 6 1
Example 6: Suppose we have the sequence , , , , , …. We cannot immediately tell if this is a
4 3 5 11 2
sequence, but if we express all these fractions in higher terms such that the numerator of the fraction is
6 6 6 6 6
6, we get: , , , , , …. This means we have a harmonic sequence. We get the reciprocals of the
8 9 10 11 12
8 9 10 11 12 8
terms, so we get , , , , . We get an arithmetic sequence whose first term is and common
6 6 6 6 6 6
1
difference is . We use our formula for an arithmetic sequence, but since these are reciprocals of the
6
1 8 1 1 8+𝑛−1 𝑛+7
original harmonic sequence, we have = + (𝑛 − 1) ( ). We then get = = . We then get its
𝑎𝑛 6 6 𝑎𝑛 6 6
6
reciprocal, so we have 𝑎𝑛 = .
𝑛+7

4 2 4 4
Example 7: Suppose we have the sequence , , , 1, , 2, 4. We cannot immediately tell if this is even a
7 3 5 3
sequence to begin with, but we shall try to express these fractions in higher terms. If we have all the
4 4 4 4 4 4 4
numerators be 4, we get , , , , , , . This means we have a harmonic sequence. We get the
7 6 5 4 3 2 1
7 6 5 4 3 2 1 7
reciprocals of the terms, so we get , , , , , , . We get an arithmetic sequence whose first term is
4 4 4 4 4 4 4 4
1
and common difference is − . We use our formula for an arithmetic sequence, but since these are
4
1 7 1 1 7−𝑛+1
reciprocals of the original harmonic sequence, we have = + (𝑛 − 1) (− ). We then get = =
𝑎𝑛 4 4 𝑎𝑛 4
8−𝑛 4
. We then get its reciprocal, so we have 𝑎𝑛 = .
4 8−𝑛

1 1 1
Example 8: Suppose we have the sequence 1, 1, , , , …. We cannot tell if this is a sequence to begin
2 6 24
with, but if we get the reciprocals, we get 1, 1, 2, 6, 24, …, which is the familiar sequence of factorials. Our
first term is 1, and our second term is also 1, which means our first term uses 0! and our second term
1
uses 1!. This means that the rule here is 𝑎𝑛 = (𝑛−1)!

SUMMATIONS

A summation, or series, is the sum of a few terms of a sequence. It is typically written in the sigma
notation or summation notation.
𝑛

∑ 𝑎𝑖
𝑖=𝑚

Here, 𝑖 is the index of summation; 𝑎𝑖 is the 𝑖th term of the sequence; 𝑚 is the starting value of the
summation; and 𝑛 is the final value of the summation. For example:

∑ 2𝑖
𝑖=1

This is a compact way of writing that we add the first 8 even numbers together, and is the same as 2 +
4 + 6 + ⋯ + 16 = 72.

In programming, it is similar to a for loop. ∑𝑛𝑘=0 𝑎𝑘 translates to the code snippet below:

int k, sum = 0;
for (k=0; k<=n; k++){
sum+=a(k); //For some function a defined elsewhere in the program
}
Prepared by: Nathaniel M. Cabansay, BSCpE

CALCULATOR TECHNIQUE
If you have the following model(s) of calculators, you can perform summations as follows:
A. CASIO fx-570/991 ES Plus
1. Press SHIFT then log ∎ □ (It reads ∑□□ ∎ above it in yellow)
2. Input the expression inside the summation, but use the variable x instead of the given
variables like 𝑖, 𝑗, 𝑘, 𝑛 or any other variable. For example, if the expression inside the
summation is 2𝑘 − 1, use the expression 2𝑥 − 1.
To input 𝑥, press ALPHA then closing parenthesis (it reads X above it in red)
3. Press the right arrow key then input the starting value for 𝑥
4. Press the right arrow key again, then input the final value for 𝑥
5. Press =
B. CASIO fx-570/991 EX
1. Press SHIFT then 𝑥 (It reads ∑□□ ∎ above it in yellow)
2. Input the expression inside the summation, but use the variable x instead of the given
variables like 𝑖, 𝑗, 𝑘, 𝑛 or any other variable.
To input 𝑥, you can either press the 𝑥 key or press ALPHA then closing parenthesis (it
reads 𝑥 above it in red)
3. Press the right arrow key then input the starting value for 𝑥
4. Press the right arrow key again then input the final value for 𝑥
5. Press =
C. Canon F-789SGA
1. Press “Apps” then 2.
2. Input the expression inside the summation, but use the variable x instead of the given
variables like 𝑖, 𝑗, 𝑘, 𝑛 or any other variable.
To input 𝑥, press ALPHA then closing parenthesis (it reads X above it in red)
3. Press the right arrow key then input the starting value for 𝑥
4. Press the right arrow key again then input the final value for 𝑥
5. Press =
D. SHARP EL-W506T
1. Press ALPHA then × (It reads Σ above it in green)
2. Input the starting value for 𝑥
3. Press the right arrow key then input the final value for 𝑥
4. Press the right arrow key again then input the expression inside the summation, but use
the variable x instead of the given variables like 𝑖, 𝑗, 𝑘, 𝑛 or any other variable.
To input 𝑥 press ALPHA then RCL (it reads X above it in green)
5. Press =

SEQUENCES AND THEIR RESPECTIVE SERIES

An arithmetic series is the sum of the terms of an arithmetic sequence.

𝑛 𝑛
𝑆𝑛 = (𝑎 + 𝑎𝑛 ) = [2𝑎1 + (𝑛 − 1)𝑑]
2 1 2

It is derived as follows:

No. Statement Reason


1 𝑎1 = 𝑎1 Terms of an arithmetic sequence
𝑎2 = 𝑎1 + 𝑑

𝑎𝑛 = 𝑎1 + (𝑛 − 1)𝑑
Prepared by: Nathaniel M. Cabansay, BSCpE

2 𝑆𝑛 = 𝑎1 + (𝑎1 + 𝑑) + ⋯ + (𝑎𝑛 − 𝑑) + 𝑎𝑛 Adding them all together starting


𝑆𝑛 = 𝑎𝑛 + (𝑎𝑛 − 𝑑) + ⋯ + (𝑎1 + 𝑑) + 𝑎1 from 𝑎1 and starting from 𝑎𝑛
3 2𝑆𝑛 = (𝑎1 + 𝑎𝑛 ) + (𝑎1 + 𝑎𝑛 ) + ⋯ + (𝑎1 + 𝑎𝑛 ) Add both equations together
4 2𝑆𝑛 = 𝑛(𝑎1 + 𝑎𝑛 ) Multiplication is repeated addition
5 𝑛 Divide both sides by 2. We could
𝑆𝑛 = (𝑎 + 𝑎𝑛 )
2 1 stop here, but another form of the
formula can be obtained
6 𝑛 𝑎𝑛 = 𝑎1 + (𝑛 − 1)𝑑
𝑆𝑛 = [𝑎 + (𝑎1 + (𝑛 − 1)𝑑)]
2 1
7 𝑛 Add 𝑎1 to 𝑎1
𝑆𝑛 = [2𝑎1 + (𝑛 − 1)𝑑]
2
For example, find the sum of the first 15 terms (𝑛 = 1 to 𝑛 = 15) of the sequence determined by the
formula 4𝑛 − 1. We have 15 terms, so 𝑛 = 15, then the first term of the sequence is 4(1) − 1 = 3, so
𝑎1 = 3, and 𝑑 = 4

15
𝑆15 = [2(3) + (15 − 1)4]
2
15
𝑆15 = [6 + 56]
2
15
𝑆15 = [62]
2
𝑆15 = 465

This means the sum of those 15 terms equals 465.

A geometric series is the sum of the terms of a geometric sequence.

It is derived as follows:

No. Statement Reason


1 𝑎1 = 𝑎1 Terms of an arithmetic sequence
𝑎2 = 𝑎1 𝑟

𝑎𝑛 = 𝑎1 𝑟 𝑛−1
2 𝑆𝑛 = 𝑎1 + (𝑎1 𝑟) + ⋯ + (𝑎1 𝑟 𝑛−1 ) Adding them all together starting
from 𝑎1
3 𝑟𝑆𝑛 = 𝑎1 𝑟 + (𝑎1 𝑟 2 ) + ⋯ + (𝑎1 𝑟 𝑛 ) Multiply both sides by 𝑟
4 𝑆𝑛 − 𝑟𝑆𝑛 = 𝑎1 − 𝑎1 𝑟 𝑛 Subtract the equation in statement
3 from the equation in statement 2.
5 𝑆𝑛 (1 − 𝑟) = 𝑎1 − 𝑎1 𝑟 𝑛 Factor 𝑆𝑛 from the left-hand side
6 𝑎1 − 𝑎1 𝑟 𝑛 Divide both sides by 1 − 𝑟
𝑆𝑛 = ,𝑟 ≠ 1
1−𝑟
7 𝑎1 − 𝑟𝑎𝑛 Since 𝑎𝑛 = 𝑎1 𝑟 𝑛−1
𝑆𝑛 = ,𝑟 ≠ 1
1−𝑟
Prepared by: Nathaniel M. Cabansay, BSCpE

For example, find the sum of the first seven powers of two (𝑛 = 1 to 𝑛 = 7). We have seven terms, so
𝑛 = 7, and the first power of 2 is 2, so 𝑎1 = 2, its common ratio is 2, so 𝑟 = 2

2 − 2(2)7
𝑆7 =
1−2
2 − 2(128)
𝑆7 =
−1
2 − 256
𝑆7 =
1
−254
𝑆7 =
−1
𝑆7 = 254

The sum of the first seven powers of two is 254.

If |𝑟| < 1, then an infinite geometric series approaches a certain number.

No. Statement Reason


1 𝑎1 − 𝑎1 𝑟 𝑛 Arithmetic series
𝑆𝑛 = ,𝑟 ≠ 1
1−𝑟
2 𝑎1 − 𝑎1 𝑟 𝑛 Get the limits of both sides as 𝑛
lim 𝑆𝑛 = lim
𝑛→∞ 𝑛→∞ 1−𝑟 approaches ∞
3 +∞ |𝑟| > 1 Limit of an exponential function
lim 𝑟 𝑛 = {
𝑛→∞ 0 |𝑟| < 1
4 𝑎1 𝑎1 , 1, and 𝑟 are all treated as
𝑆∞ =
1−𝑟 constants, so the limit will not
affect them. 𝑎1 𝑟 𝑛 , however, will
become 0 as that is the value it
approaches if |𝑟| < 1
1 1 1 1 1
For example, find the sum of the sequence 1, , , , , , …. We have our first term equal to 1 and its
2 4 8 16 32
1
common ratio equal to
2

1
𝑆∞ =
1
1−
2
1
𝑆∞ =
1
2
𝑆∞ = 2

The sum of this infinite geometric series is 2.

If 𝑟 = 1, we can simply multiply the first term by how many terms there are. For example, if we have a
geometric sequence consisting of nothing but the number 69. That sequence has 10 terms.

𝑆10 = 69(10) = 690

The sum of those terms is 690.


Prepared by: Nathaniel M. Cabansay, BSCpE

MULTIPLE SUMMATIONS

In programming, this is similar to a nested for loop.

For example:
𝑚 𝑛

∑ ∑ 𝑥𝑦
𝑥=0 𝑦=0

The formula above translates to this code snippet below.

int x, y, m, n, sum = 0;
for (x=0; x<=m; x++){
for(y=0; y<=n; y++){
sum+=(x*y);
}
}

SOME USEFUL SUMMATIONS, WITH PROOFS

1. Sum of First n Natural Numbers


𝑛
𝑛(𝑛 + 1)
∑𝑘 =
2
𝑘=1
We have proven this by mathematical induction back in Lesson 6, but here is the proof of the
formula

No. Statement Reason


𝑛
1 𝑛(𝑛 + 1) Statement to prove
𝑆𝑛 : ∑ 𝑘 =
2
𝑘=1

2 1(2) Set 𝑛 = 1.
1(2)
= 1, thus, the base
𝑆1 : 1 = 2
2 case is true.
3 𝑛(𝑛 + 1) Assume 𝑆𝑛 is true
𝑆𝑛 : 1 + 2 + 3 + ⋯ + 𝑛 =
2
4 (𝑛 + 1)(𝑛 + 2) Set 𝑛 = 𝑛 + 1 to prove that 𝑛 + 1 is
𝑆𝑛+1 : 1 + 2 + 3 + ⋯ + 𝑛 + (𝑛 + 1) =
2 true when 𝑛 is true.
5 𝑛(𝑛 + 1) (𝑛 + 1)(𝑛 + 2) Substitute statement 3 into
+ (𝑛 + 1) =
2 2 statement 4
6 𝑛(𝑛 + 1) + 2(𝑛 + 1) = (𝑛 + 1)(𝑛 + 2) Multiply both sides by 2
7 (𝑛 + 1)(𝑛 + 2) = (𝑛 + 1)(𝑛 + 2) Factor by grouping on the left
Since the two sides equal, we have proven not only 𝑆𝑛+1 side.
but also 𝑆𝑛 → 𝑆𝑛+1 , so we can conclude that 𝑆𝑛 is true for
all 𝑛 ∈ ℕ.
Prepared by: Nathaniel M. Cabansay, BSCpE

2. Sum of First n Odd Numbers


𝑛

∑(2𝑘 − 1) = 𝑘 2
𝑘=1

We have also proven this by mathematical induction back in Lesson 6, but here is the proof of
the formula

No. Statement Reason


𝑛
1 Statement to prove
𝑆𝑛 : ∑(2𝑘 − 1) = 𝑛2
𝑘=1

2 𝑆1 : 1 = 12 Set 𝑛 = 1. There is only one term,


and 2(1) − 1 = 1. 12 = 1, thus, the
base case is true.
3 𝑆𝑛 : 1 + 3 + 5 + ⋯ + (2𝑛 − 1) = 𝑛2 Assume 𝑆𝑛 is true
4 𝑆𝑛+1 : 1 + 3 + 5 + ⋯ + (2𝑛 − 1) + (2𝑛 + 1) = (𝑛 + 1)2 Set 𝑛 = 𝑛 + 1 to prove that 𝑛 + 1 is
true when 𝑛 is true.
5 𝑛2 + (2𝑛 + 1) = (𝑛 + 1)2 Substitute statement 3 into
statement 4
6 (𝑛 + 1)2 = (𝑛 + 1)2 Binomial expansion on the left
Since the two sides equal, we have proven not only 𝑆𝑛+1 side.
but also 𝑆𝑛 → 𝑆𝑛+1 , so we can conclude that 𝑆𝑛 is true for
all 𝑛 ∈ ℕ.

3. Sum of First n Even Numbers


𝑛

∑ 2𝑘 = 𝑛(𝑛 + 1)
𝑘=1
This can be derived easily from the formula for Sum of First n Natural Numbers

No. Statement Reason


𝑛
1 𝑛(𝑛 + 1) Sum of first n natural numbers
𝑆𝑛 : ∑ 𝑘 =
2
𝑘=1
𝑛
2 Multiply both sides by 2
2 ∑ 𝑘 = 𝑛(𝑛 + 1)
𝑘=1
𝑛
3 Constants can be brought inside
∑ 2𝑘 = 𝑛(𝑛 + 1) summations
𝑘=1
Prepared by: Nathaniel M. Cabansay, BSCpE

4. Sum of First n Squares


𝑛
𝑛(𝑛 + 1)(2𝑛 + 1)
∑ 𝑘2 =
6
𝑘=1
Like most summations, we can prove this by mathematical induction

No. Statement Reason


𝑛
1 𝑛(𝑛 + 1)(2𝑛 + 1) Statement to prove
𝑆𝑛 : ∑ 𝑘 2 =
6
𝑘=1

2 1(2)(3) Set 𝑛 = 1. There is only one term,


𝑆1 : 1 = 1(2)(3)
6 and = 1. Thus, the base case
6
is true.
3 𝑛(𝑛 + 1)(2𝑛 + 1) Assume 𝑆𝑛 is true
𝑆𝑛 : 1 + 4 + 9 + ⋯ + 𝑛2 =
6
4 𝑆𝑛+1 : 1 + 4 + 9 + ⋯ + 𝑛2 + (𝑛 + 1)2 Set 𝑛 = 𝑛 + 1 to prove that 𝑛 + 1 is
(𝑛 + 1)(𝑛 + 2)(2𝑛 + 3) true when 𝑛 is true.
=
6
5 𝑛(𝑛 + 1)(2𝑛 + 1) (𝑛 + 1)(𝑛 + 2)(2𝑛 + 3) Substitute statement 3 into
+ (𝑛 + 1)2 =
6 6 statement 4
6 𝑛(𝑛 + 1)(2𝑛 + 1) + 6(𝑛 + 1)2 = (𝑛 + 1)(𝑛 + 2)(2𝑛 + 3) Multiply both sides by 6
7 𝑛(𝑛 + 1)(2𝑛 + 1) + 6(𝑛2 + 2𝑛 + 1) Expand (𝑛 + 1)2
= (𝑛 + 1)(𝑛 + 2)(2𝑛 + 3)
8 2𝑛3 + 3𝑛2 + 𝑛 + 6𝑛2 + 12𝑛 + 6 = 2𝑛3 + 9𝑛2 + 13𝑛 + 6 Multiply all polynomials together
9 2𝑛3 + 9𝑛2 + 13𝑛 + 6 = 2𝑛3 + 9𝑛2 + 13𝑛 + 6 Combine like terms on the left
Since the two sides equal, we have proven not only 𝑆𝑛+1 side.
but also 𝑆𝑛 → 𝑆𝑛+1 , so we can conclude that 𝑆𝑛 is true for
all 𝑛 ∈ ℕ.

5. Sum of First n Cubes


𝑛
𝑛2 (𝑛 + 1)2
∑ 𝑘3 =
4
𝑘=1

As usual, we’ll prove this by mathematical induction

No. Statement Reason


𝑛
1 𝑛2 (𝑛 + 1)2 Statement to prove
𝑆𝑛 : ∑ 𝑘 3 =
4
𝑘=1

2 1(4) Set 𝑛 = 1. There is only


𝑆1 : 1 = 1(4)
4 one term, and = 1.
4
Thus, the base case is true.
Prepared by: Nathaniel M. Cabansay, BSCpE

3 𝑛2 (𝑛 + 1)2 Assume 𝑆𝑛 is true


𝑆𝑛 : 1 + 8 + 27 + ⋯ + 𝑛3 =
4
4 (𝑛 + 1)2 (𝑛 + 2)2 Set 𝑛 = 𝑛 + 1 to prove that
𝑆𝑛+1 : 1 + 8 + 27 + ⋯ + 𝑛3 + (𝑛 + 1)3 = 𝑛 + 1 is true when 𝑛 is true.
4
5 𝑛2 (𝑛 + 1)2 (𝑛 + 1)2 (𝑛 + 2)2 Substitute statement 3 into
+ (𝑛 + 1)3 = statement 4
4 4
6 𝑛2 (𝑛 + 1)2 + 4(𝑛 + 1)3 = (𝑛 + 1)2 (𝑛 + 2)2 Multiply both sides by 4
7 𝑛2 (𝑛2 + 2𝑛 + 1) + 4(𝑛3 + 3𝑛2 + 3𝑛 + 1) Expand all binomials
= (𝑛2 + 2𝑛 + 1)(𝑛2 + 4𝑛 + 4)
8 𝑛4 + 2𝑛3 + 𝑛2 + 4𝑛3 + 12𝑛2 + 12𝑛 + 4 Multiply all polynomials
= 𝑛4 + 6𝑛3 + 13𝑛2 + 12𝑛 + 4 together
9 𝑛4 + 6𝑛3 + 13𝑛2 + 12𝑛 + 4 = 𝑛4 + 6𝑛3 + 13𝑛2 + 12𝑛 + 4 Combine like terms on the
Since the two sides equal, we have proven not only 𝑆𝑛+1 but also left side.
𝑆𝑛 → 𝑆𝑛+1 , so we can conclude that 𝑆𝑛 is true for all 𝑛 ∈ ℕ.

6. Sum of Powers of Two


𝑛

∑ 2𝑘−1 = 2𝑛 − 1
𝑘=1

Again, we’ll prove this using mathematical induction.

No. Statement Reason


𝑛
1 Statement to prove
𝑆𝑛 : ∑ 2𝑘−1 = 2𝑛 − 1
𝑘=1

2 𝑆1 : 21−1 = 1 = 21 − 1 = 2 − 1 = 1 Set 𝑛 = 1. There is only


one term, and 2 − 1 = 1.
Thus, the base case is true.
3 𝑆𝑛 : 1 + 2 + 4 + ⋯ + 2𝑛−1 = 2𝑛 − 1 Assume 𝑆𝑛 is true
4 𝑆𝑛+1 : 1 + 2 + 4 + ⋯ + 2𝑛−1 + 2𝑛 = 2𝑛+1 − 1 Set 𝑛 = 𝑛 + 1 to prove that
𝑛 + 1 is true when 𝑛 is true.
5 (2𝑛 − 1) + 2𝑛 = 2𝑛+1 − 1 Substitute statement 3 into
statement 4
6 2(2𝑛 ) − 1 = 2𝑛+1 − 1 Combine like terms on the
left side
7 2𝑛+1 − 1 = 2𝑛+1 − 1 Product law of exponents
Since the two sides equal, we have proven not only 𝑆𝑛+1 but also on the left side.
𝑆𝑛 → 𝑆𝑛+1 , so we can conclude that 𝑆𝑛 is true for all 𝑛 ∈ ℕ.
Prepared by: Nathaniel M. Cabansay, BSCpE

LESSON 8: FUNCTIONS

CONCEPTS OF FUNCTIONS

A function 𝑓 relates a set of inputs 𝐴 to a set of outputs 𝐵. Exactly one element of 𝐵 is assigned to each
element of 𝐴. Functions can be written as 𝑓(𝑎) = 𝑏 to denote that an element 𝑎 of set A is assigned the
element 𝑏 of set B. If 𝑓 is a function from set A to set B, we write 𝑓: 𝐴 → 𝐵.

DOMAIN AND CODOMAIN OF A FUNCTION


The domain of a function is the set of all the values that can go into a function. The codomain of a
function is the set of all the values that may possibly come out from that function. If 𝑓: 𝐴 → 𝐵, then 𝐴 is
the domain of 𝑓 and 𝐵 is the codomain. If 𝑓(𝑎) = 𝑏, then 𝑏 is the image (output) of 𝑎 and 𝑎 is a pre-
image (input) of 𝑏. The range of the function is the set of all the values that actually do come out from
that function. These are all images of elements of the domain. If 𝑓 is a function from A to B, then we say
that 𝑓 maps A to B.

Example: if we a function 𝑓: ℝ → ℝ assign the square of a real number to another real number, we
have 𝑓(𝑥) = 𝑥 2 , where the domain of 𝑓 is the set of all real numbers, and the codomain of 𝑓 can also
be chosen to be the set of all real numbers. The range of 𝑓, however, is the set of all non-negative real
numbers, such as {0, 0.01, 1 × 10−8 , 3.1415926 … , 2.718 … , 12, 38, 69, 420, … }, better denoted as ℝ0+ ,
since no negative real numbers can be represented by perfect squares.

In programming languages, the domain and codomain of functions are almost always specified when
creating functions. For example, in C [and languages using a similar syntax], we have:

int floor(float real){


//some code that rounds down a real number to the nearest integer
}

int ceiling(float real){


//some code that rounds up a real number to the nearest integer
}

int factorial(int x){


//some code to multiply consecutive integers
}
As a matter of fact, in C, certain datatypes correspond to various number sets: The unsigned int
datatype (along with any modifiers like short or long) corresponds to ℕ (natural numbers). The int
datatype corresponds to ℤ (integers). The float data type corresponds to both ℚ (rational numbers)
and ℝ (real numbers).

OPERATIONS ON FUNCTIONS
Let 𝑓 and 𝑔 be two real-valued functions with the same domain. We can add, subtract, multiply, and
divide functions.

The four operations are: (𝑓 + 𝑔)(𝑥) = 𝑓(𝑥) + 𝑔(𝑥), (𝑓𝑔)(𝑥) = 𝑓(𝑥)𝑔(𝑥), (𝑓 − 𝑔)(𝑥) = 𝑓(𝑥) − 𝑔(𝑥) [this is
𝑓 𝑓(𝑥)
just the same as adding 𝑔(𝑥) multiplied by -1], and ( ) (𝑥) =
𝑔 𝑔(𝑥)
Prepared by: Nathaniel M. Cabansay, BSCpE

We can also do compositions of functions. In a composition of functions, the output of one function
becomes the input of a second function. For example: (𝑓 ∘ 𝑔)(𝑥) = 𝑓(𝑔(𝑥)) means that the output of
𝑔(𝑥) becomes the input of 𝑓(𝑥).

Of the five operations we can do on functions, only addition and multiplication of functions are
commutative

Example: Given 𝑓(𝑥) = 𝑥 − 4 and 𝑔(𝑥) = 𝑥 2

We have:

• (𝑓 + 𝑔)(𝑥) = 𝑓(𝑥) + 𝑔(𝑥) = (𝑥 − 4) + (𝑥 2 ) = 𝑥 2 + 𝑥 − 4 (Addition is commutative, which means


(𝑓 + 𝑔)(𝑥) = (𝑔 + 𝑓)(𝑥))
• (𝑓 − 𝑔)(𝑥) = 𝑓(𝑥) − 𝑔(𝑥) = (𝑥 − 4) − (𝑥 2 ) = 𝑥 − 4 − 𝑥 2 = −𝑥 2 + 𝑥 − 4
• (𝑔 − 𝑓)(𝑥) = 𝑔(𝑥) − 𝑓(𝑥) = (𝑥 2 ) − (𝑥 − 4) = 𝑥 2 − 𝑥 + 4 (Subtraction is not commutative, which
means (𝑓 − 𝑔)(𝑥) ≠ (𝑔 − 𝑓)(𝑥)

• (𝑓𝑔)(𝑥) = 𝑓(𝑥)𝑔(𝑥) = (𝑥 − 4)(𝑥 2 ) = 𝑥 3 − 4𝑥 2 (Multiplication is commutative, so (𝑓𝑔)(𝑥) =
(𝑔𝑓)(𝑥))
𝑓 𝑓(𝑥) 𝑥−4 𝑓 𝑔
• ( ) (𝑥) = = (Division is not commutative, which means ( ) (𝑥) ≠ ( ) (𝑥)
𝑔 𝑔(𝑥) 𝑥2 𝑔 𝑓
𝑔 𝑔(𝑥) 𝑥2
• ( ) (𝑥) = =
𝑓 𝑓(𝑥) 𝑥−4
• (𝑓 ∘ 𝑔)(𝑥) = 𝑓(𝑔(𝑥)) = 𝑓(𝑥 2 ) = (𝑥 2 ) − 4 = 𝑥 2 − 4 (Composition of functions is not commutative,
so (𝑓 ∘ 𝑔)(𝑥) ≠ (𝑔 ∘ 𝑓)(𝑥))
• (𝑔 ∘ 𝑓)(𝑥) = 𝑔(𝑓(𝑥)) = 𝑔(𝑥 − 4) = (𝑥 − 4)2 = 𝑥 2 − 8𝑥 + 16

IMAGE OF A SUBSET
Let 𝑓 be a function from set 𝐴 to set 𝐵, then let 𝑆 be a subset of 𝐴. The image of 𝑆 is the subset of 𝐵
consisting of all the images of the elements of 𝑆. We denote the image of a subset 𝑆 by 𝑓(𝑆), so we
have 𝑓(𝑆) = {𝑓(𝑠)|𝑠 ∈ 𝑆}.

Example: Let 𝐴 = {1, 3, 5, 7, 9, … } and 𝐵 = {2, 6, 10, 14, 18, … } with 𝑓(1) = 2, 𝑓(3) = 6, 𝑓(5) = 10, 𝑓(7) =
14, and 𝑓(9) = 18. We then define a subset 𝑆 = {3, 5, 7}. The image of the subset is the set 𝑓(𝑆) =
{6, 10, 14}.

ONE-TO-ONE AND ONTO FUNCTIONS

One-to-one functions or injective functions (or injections) have only one element in the domain
paired up with a single element in the codomain. This happens if and only if 𝑓(𝑥) = 𝑓(𝑦) implies that
𝑥 = 𝑦 for all 𝑥 and 𝑦 in the domain of 𝑓.

Onto functions or surjective functions (or surjections) have every element in the codomain assigned
to at least one element of the domain. This happens if for every element b in the codomain B, there is
an element a in the domain A with 𝑓(𝑎) = 𝑏.

One-to-one correspondences or bijective functions (or bijections) are functions that are both one-
to-one/injective and onto/surjective.
Prepared by: Nathaniel M. Cabansay, BSCpE

Functions can also be strictly increasing or strictly decreasing. They are strictly increasing if 𝑓(𝑥) <
𝑓(𝑦) whenever 𝑥 < 𝑦 and 𝑥 and 𝑦 are in the domain of 𝑓 and strictly decreasing if 𝑓(𝑥) > 𝑓(𝑦)
whenever 𝑥 < 𝑦 and 𝑥 and 𝑦 are in the domain of 𝑓. Functions that are strictly increasing or strictly
decreasing must be one-to-one (injective or bijective).

INVERSE FUNCTIONS

The inverse function assigns an element 𝑏 in the set 𝐵 to the unique element 𝑎 in 𝐴 such that 𝑓(𝑎) = 𝑏.
The inverse function of 𝑓 is denoted as 𝑓 −1 , so 𝑓 −1 (𝑏) = 𝑎 when 𝑓(𝑎) = 𝑏. Only bijective functions have
inverse functions.

A bijection is invertible since we can define an inverse of this function. A function is not invertible if it
is not a bijection, so no inverse can be defined. If an inverse were to be done, the result would not be a
function.

𝑥−1
Example: 𝑦 = 3𝑥 + 1 is invertible as this is a bijection. Its inverse is 𝑦 = .
3

GRAPH OF A FUNCTION

Let 𝑓 be a function from set 𝐴 to set 𝐵. The graph of the function 𝑓 is the set of ordered pairs
{(𝑎, 𝑏)|𝑎 ∈ 𝐴 and 𝑓(𝑎) = 𝑏}. An interesting fact about graphs of inverse functions is that the graph of the
inverse function is the reflection of the graph of the original function across the line 𝑦 = 𝑥.

Example 1: If we have the original function: 𝑦 = 3𝑥 + 1

In the graph above, the blue function above, 𝑦 = 3𝑥 + 1 has an inverse function, which is the red
𝑥−1
function 𝑦 = .
3

Example 2: If we have the original function: 𝑦 = e𝑥


Prepared by: Nathaniel M. Cabansay, BSCpE

In the graph above, the blue function above 𝑦 = e𝑥 has an inverse function, which is the red function
𝑦 = ln(𝑥).

SOME USEFUL FUNCTIONS

• Floor function – assigns the largest integer less than or equal to a real number 𝑥. It is denoted
by ⌊𝑥⌋. This basically always rounds down a decimal number. It is the same as the greatest
integer function denoted by ⟦𝑥⟧.
• Ceiling function – assigns the smallest integer greater than or equal to a real number 𝑥. It is
denoted by ⌈𝑥⌉. This basically always rounds up a decimal number.

Useful properties of the floor and ceiling functions (𝑛 ∈ ℤ, 𝑥 ∈ ℝ)

Property Statement
Basic Definitions of Floor and Ceiling ⌊𝑥⌋ = 𝑛 ↔ 𝑛 ≤ 𝑥 < 𝑛 + 1
⌈𝑥⌉ = 𝑛 ↔ 𝑛 − 1 < 𝑥 ≤ 𝑛
⌊𝑥⌋ = 𝑛 ↔ 𝑥 − 1 < 𝑛 ≤ 𝑥
⌈𝑥⌉ = 𝑛 ↔ 𝑥 ≤ 𝑛 < 𝑥 + 1
Floor and Ceiling in Relation to 𝒙 − 𝟏 and 𝒙 + 𝑥 − 1 < ⌊𝑥⌋ ≤ 𝑥 ≤ ⌈𝑥⌉ < 𝑥 + 1
𝟏
Floor and Ceiling Function Inversion ⌊−𝑥⌋ = −⌈𝑥⌉
⌈−𝑥⌉ = −⌊𝑥⌋
Adding an Integer ⌊𝑥 + 𝑛⌋ = ⌊𝑥⌋ + 𝑛
⌈𝑥 + 𝑛⌉ = ⌈𝑥⌉ + 𝑛
• Factorial function – the product of the first 𝑛 positive integers. 𝑓: ℕ → ℤ+ and denoted by
𝑓(𝑛) = 𝑛!. 𝑛! = 1 ⋅ 2 ⋅ … ⋅ (𝑛 − 1) ⋅ 𝑛. Note that 0! = 1.

CALCULATOR TECHNIQUE
If you have the following model(s) of calculators, you can use the factorial function in this way:
A. CASIO fx-570/991MS, CASIO fx-570/991ES PLUS, CASIO fx-570/991EX, and Canon F-
789SGA (only the button locations on the physical calculators differ)
1. Input the number 𝑛
2. Press SHIFT then 𝑥 −1 to insert the factorial symbol (it reads 𝑥! above it in yellow).
3. Press =
B. SHARP EL-W506T
1. Input the number 𝑛
2. Press 2ndF then 4 to insert the factorial symbol (it reads 𝑥! above it in orange).
3. Press =
• Mod and div functions – Known as integer division and remainder. If we have 𝑚 and 𝑛 be
natural numbers, the integer division 𝒎 div 𝒏 returns the whole number result of dividing 𝑚 by
𝑛 (if 𝑛 ≠ 0), while 𝒎 mod 𝒏 returns the remainder of that division.

CALCULATOR TECHNIQUE
If you have the following model(s) of calculators, you can use the integer division and the remainder
functions in this way:
A. Canon F-789SGA
Prepared by: Nathaniel M. Cabansay, BSCpE

1. Press “Apps”
2. Press 5 to perform both integer division and modulus and 6 to perform just the
modulus.
3. Input the first number 𝑚 then press shift then closing parenthesis to input a comma (It
reads “,” above it in orange), then input the second number 𝑛
4. Input the closing parenthesis and then press =.
b. If you pressed “5” during step 2, the result of 𝑚 div 𝑛 is represented by the number
that appears after the 𝑄 =, and the result of 𝑚 mod 𝑛 is represented by the number
that appears after the 𝑅 =.
c. If you pressed “6” during step 2, the result of 𝑚 mod 𝑛 appears.
B. SHARP EL-W506T
1. Input the first number 𝑚
2. Press 2ndF then STO (it reads “int÷” above it in orange)
3. Input the second number 𝑛
4. Press =. The number that appears in the first line (after the “Q: “) represents the result of
𝑚 div 𝑛 and the number that appears in the second line (after the “R: “) represents the
result of 𝑚 mod 𝑛.
OR
1. Press MATH
2. Press the down arrow once
3. Press 5 to select int
4. Press open parenthesis, input (First number) ÷ (Second number), then close parenthesis.
(Example: int(14÷5))
5. Press =. The result is only the result of 𝑚 div 𝑛.
• Hashing functions ℎ assign a memory location ℎ(𝑘) to the record/item with 𝑘 as its key. In
practice, many different hashing functions are used. One of these is commonly ℎ(𝑘) =
𝑘 mod 𝑚.

For a hash function 𝐻, a collision occurs if 𝐻(𝑥) = 𝐻(𝑦) but 𝑥 ≠ 𝑦. To handle these, a collision
resolution policy is required. A simple one would be to find the next highest unoccupied cell.

If we want to locate a certain stored value 𝑘, we compute 𝑚 = ℎ(𝑘) and begin looking at
location 𝑚. If 𝑘 is not in this position, we proceed to the next highest position until we reach an
empty cell or return to our original position. If that happens, we conclude that 𝑘 is not present,
otherwise, we obtain the position of 𝑘.
Prepared by: Nathaniel M. Cabansay, BSCpE

REFERENCES

Aufmann, R. N., Lockwood, J. S., Nation, R. D., Clegg, D. K. (2013). Mathematical excursions (3rd ed.).
Brooks/Cole.

Baronett, S. (2018). Logic: An emphasis on formal logic (4th ed.). Oxford University Press.

Bennett, B. (2020). Logically fallacious (Updated academic ed.). Archieboy Holdings.

Categorical proposition. (2021, May 6). In Wikipedia. https://en.wikipedia.org/w/index.php?


title=Categorical_proposition&oldid=1021787389

Chua, S., Ubarro, A., Baluca, R., Guerrero, R., Tan, J. L. (2016). Soaring 21st century mathematics:
Precalculus. Phoenix Publishing House.

Composition of Functions. (n.d.). Math is Fun. https://www.mathsisfun.com/sets/functions-


composition.html

Dimasuay, L., Alcala, J., Palacio, J. (2016). General mathematics. C & E Publishing.

Domain, Range, and Codomain. (n.d.). Math is Fun. https://www.mathsisfun.com/sets/domain-range-


codomain.html

Euclid’s Proof that √2 is irrational. (n.d.). Math is Fun. https://www.mathsisfun.com/numbers/euclid-


square-root-2-irrational.html

Injective, Surjective, and Bijective. (n.d.). Math is Fun. https://www.mathsisfun.com/sets/injective-


surjective-bijective.html.

Inverse Functions. (n.d.). Math is Fun. https://www.mathsisfun.com/sets/function-inverse.html.

Jain, M. [Exam Race] (2020, August 26). Distributed & Undistributed Terms in 4 Types of Categorical
Propositions (A, E, I & O) | Logic , NET [Video]. YouTube. https://www.youtube.com/
watch?v=W22-H1buywM

Johnsonbaugh, R. (2018). Discrete mathematics (8th ed.). Pearson.

Keef, P., Guichard, D. (n.d.). Quantifiers. https://www.whitman.edu/mathematics/higher_math_online/


section01.02.html

Lipschutz, S., Lipson, M. (2007). Schaum’s outline of discrete mathematics (3rd ed.). McGraw-Hill.

Mathematical induction. (n.d.). Math is Fun. https://www.mathsisfun.com/algebra/mathematical-


induction.html

Operations with Functions. (n.d.). Math is Fun. https://www.mathsisfun.com/sets/functions-


operations.html

Parsons, T. (2017). “The Traditional Square of Opposition”. In Zalta, E. (ed), The Stanford Encyclopedia
of Philosophy (Summer 2017 ed.). https://plato.stanford.edu/entries/square/#ModRevSqu
Prepared by: Nathaniel M. Cabansay, BSCpE

Quantifier (logic). (2021, April 24). In Wikipedia. https://en.wikipedia.org/w/index.php?


title=Quantifier_(logic)&oldid=1019642355

Representation of sets (n.d.). In OnlineMath4All. https://www.onlinemath4all.com/representation-of-


set.html

Rosen, K. (2019). Discrete mathematics and its applications (8th ed.). McGraw-Hill.

Square of opposition. (2020, August 29). In Wikipedia. https://en.wikipedia.org/w/index.php?


title=Square_of_opposition&oldid=975607686

Steph. (2018, November 26). 8 rules of syllogism. In Philo-Notes. https://philonotes.com/index.php/


2018/11/26/rules-of-syllogism/

What is a Function? (n.d.). Math is Fun. https://www.mathsisfun.com/sets/function.html

Woo, E. (2021, May 11). Proof: a3 – a is always divisible by 6 (1 of 2: Two different approaches) [Video].
YouTube. https://www.youtube.com/watch?v=5nilsaCdTfE

Woo, E. (2021, May 11). Proof: a3 – a is always divisible by 6 (2 of 2: Proof by exhaustion) [Video].
YouTube. https://www.youtube.com/watch?v=P-jn2SKD9O4

You might also like