You are on page 1of 12

LOGIC AND SET THEORY LOGIC

Gottfried Wilhelm Leibniz tries to advance the study of logic from a mere philosophical
subject to a formal mathematical subject. Leibniz never completely achieved this goal; however,
several mathematicians, such as Augustus de Morgan and George Boole, contributed to the
advancement of symbolic logic as a mathematical discipline.

LOGIC
Logic is the study of the methods and principles of reasoning.

LOGIC STATEMENT
A logic statement or proposition is a declarative sentence that is true or false but not
both. The key to constructing a good logical statement is that there must be no ambiguity. To
be a statement, a sentence must be true or false. It cannot be both. In logic, the truth of a
statement is established beyond ANY doubt by a well-reasoned argument.
Examples:
a. You will pass the licensure examination for teachers.
b. You will be a topnotcher.
c. You did well today.
d. It’s okay not to be okay.
e. Loving him was red.

Exercise: Determine whether each sentence is a statement.


1. Do you think you'll pass the LEPT?
2. I love Philippines.
3. Wena is a good dancer.
4. Did he cheat on Kath?
5. Please give me another chance.
6. 𝑥 + 11 = 21

SIMPLE STATEMENT
A simple statement is a statement that conveys a single idea.
Examples:
a) Zero times any real number is zero.
b) 1+1=2.
c) All birds can fly

COMPOUND STATEMENT
A compound statement is a statement that conveys two or more ideas. It contains several
simple statements. The ideas in a compound statement are connected by connectives.
Examples:
a) The grass is green and the sky is blue.

1
b) It is cold or it is sunny.
c) If a person is kind, then he is helpful.
d) The number 12 is an even number if and only if it is divisible by 2.

LOGICAL CONNECTIVES

Mathematical statements may be joined by logical connectives, such as and, or, if . . .


then, and if and only if, which are used to combine simple propositions to form compound
statements. These connectives are negation, conjunction, disjunction, implication, and
biconditional.
Starting from given mathematical statements, we can use logical operations to form new
mathematical statements that are either true or false. Let P and Q be two statements. Here
are the four basic logical constructions:
⎯ The statement “P and Q” is true if both P and Q are true statements.
⎯ The statement “P or Q” is true if at least one of P or Q is true.
⎯ The statement “if P then Q” is true if both P and Q are true, or if P is false. The
shorthand notation for “if P then Q” is 𝑃 ⟶ 𝑄.
⎯ The statement “P if and only if Q” is true whenever both 𝑃 ⟶ 𝑄 and 𝑄 ⟶ 𝑃 are true
statements. The shorthand notation for “P if and only if Q” is 𝑃 ↔ 𝑄.

LOGIC CONNECTIVES AND SYMBOLS


Statements can be represented by propositional variables 𝒑, 𝒒.

LOGIC SYMBOLS NOTATION MEANING


Negation ¬ ¬𝑝 𝑛𝑜𝑡 𝑝
Conjunction ˄ 𝑝˄𝑞 𝑝 𝑎𝑛𝑑 𝑞
Disjunction ˅ 𝑝˅𝑞 𝑝 𝑜𝑟 𝑞
Conditional / Implication → 𝑝→𝑞 𝑖𝑓 𝑝, 𝑡h𝑒𝑛 𝑞
Biconditional ↔ 𝑝↔𝑞 𝑝 𝑖𝑓 𝑎𝑛𝑑 𝑜𝑛𝑙𝑦 𝑖𝑓 𝑞

NEGATION OF STATEMENT
The negation of a statement is the opposite of a given mathematical statement.
Examples:
a) 2 is the smallest prime number. 2 is not the smallest prime number.
b) I am feeling well tonight. I am not feeling well tonight.
c) I am cute. I am not cute.

WRITING COMPOUND STATEMENTS IN SYMBOLIC FORM


Example: Consider the following simple statements.
p: Today is Tuesday.
q: It is raining.
r: I am going to a movie date.
s: I am not going to a basketball game.
Write the following compound statements in symbolic form.
1. Today is Tuesday and it is raining.

2
2. It is raining and I am going to a movie date.
3. I am going to the basketball game or I am going to a movie date.
4. If it is raining, then I am not going to the basketball game.

TRANSLATE SYMBOLIC STATEMENTS


Example: Consider the following simple statements.
p: The pageant will be held in Manila.
q: The pageant will be televised on ABS-CBN.
r: The pageant will not be shown in GMA.
s: The Philippines' candidate is favored to win.
Write each of the following symbolic statements in words.
1. 𝑞^𝑝
2. ~𝑟^𝑠
3. 𝑠 → ~𝑝

CONVERSE, INVERSE, & CONTRAPOSITIVE


A conditional statement consists of two parts, a hypothesis in the “if” clause and a
conclusion in the “then” clause.
Every conditional statement has three related statements. For every implication or
conditional statement (𝑝→𝑞), we can construct its converse, inverse, and contrapositive.
⎯ To form the converse of the conditional statement, interchange the hypothesis and
the conclusion. (𝑞→ 𝑝)
⎯ To form the inverse of the conditional statement, take the negation of both the
hypothesis and the conclusion. (¬𝑝 → ¬𝑞)
⎯ To form the contrapositive of the conditional statement, interchange the hypothesis
and the conclusion of the inverse statement. (¬𝑞 → ¬𝑝)

Examples: If I get a job, then I can help my parents.


Converse: If I can help my parents, then I get a job.
Inverse: If I don’t get a job, then I cannot help my parents.
Contrapositive: If I can’t help my parents, then I won’t get a job.

TRUTH TABLES, TAUTOLOGIES, AND LOGICAL EQUIVALENCES


Mathematicians normally use a two-valued logic: Every statement is
either True or False. This is called the Law of the Excluded Middle.
A statement in sentential logic is built from simple statements using the logical
connectives , , , , and . The truth or falsity of a statement built with
these connectives depends on the truth or falsity of its components.
For example, the compound statement is built using the logical
connectives , , and . The truth or falsity of depends on the truth
or falsity of P, Q, and R.
A truth table shows how the truth or falsity of a compound statement depends
on the truth or falsity of the simple statements from which it's constructed. So, we'll
start by looking at truth tables for the five logical connectives.

3
Here's the table for negation:

This table is easy to understand. If P is true, its negation is false. If P is false,


then is true.

should be true when both P and Q are true, and false otherwise:

is true if either P is true or Q is true (or both --- remember that we're using
"or" in the inclusive sense). It's only false if both P and Q are false.

Here's the table for logical implication:

The statement “if P then Q” is true if both P and Q are true, or if P is false.

means that P and Q are equivalent. So, the double implication is true if P and Q
are both true or if P and Q are both false; otherwise, the double implication is false.

4
NOTE: (a) When you're constructing a truth table, you have to consider all possible
assignments of True (T) and False (F) to the component statements. For example,
suppose the component statements are P, Q, and R. Each of these statements can be
either true or false, so there are possibilities.
When you're listing the possibilities, you should assign truth values to the
component statements in a systematic way to avoid duplication or omission. The easiest
approach is to use lexicographic ordering. Thus, for a compound statement with three
components P, Q, and R, I would list the possibilities this way:

(b) There are different ways of setting up truth tables. You can, for instance,
write the truth values "under" the logical connectives of the compound statement,
gradually building up to the column for the "primary" connective.

Example. Construct a truth table for the formula .

A tautology is a formula which is "always true" --- that is, it is true for every
assignment of truth values to its simple components. You can think of a tautology as
a rule of logic.
The opposite of a tautology is a contradiction, a formula that is "always false". In
other words, a contradiction is false for every assignment of truth values to its simple
components.

Example. Show that is a tautology.

5
The last column contains only T's. Therefore, the formula is a tautology.

Two statements X and Y are logically equivalent if is a tautology. Another


way to say this is: For each assignment of truth values to the simple statements that
make up X and Y, the statements X and Y have identical truth values.
From a practical point of view, you can replace a statement in a proof by any
logically equivalent statement.
To test whether X and Y are logically equivalent, you could set up a truth table to
test whether is a tautology that is, whether "has all T's in its column".
However, it's easier to set up a table containing X and Y and then check whether the
columns for X and for Y are the same.

Example. Show that and are logically equivalent.

Since the columns for and are identical, the two statements are
logically equivalent. This tautology is called Conditional Disjunction. You can use this
equivalence to replace a conditional by a disjunction.

There are an infinite number of tautologies and logical equivalences, which are
listed few below.

When a tautology has the form of a biconditional, the two statements that make
up the biconditional are logically equivalent. Hence, you can replace one side with the
other without changing the logical meaning.

6
SET
A SET is a collection of well-defined objects. The objects in the set are called the
ELEMENTS of the set. To describe a set, we use braces { }, and use capital letters to represent
it. To indicate membership, we use the symbol ∈, when an element is not a membership, we use
∈.
Examples:
A = {2, 4, 6, 8, 10}
B = {all licensed professional teachers}
C = {𝑥 ∈ 𝑍 − | 𝑥 ≤ −1 }
D = {consonants of the English alphabet}
E = {Instagram, Facebook, X, TikTok}
F = {x ∈ N | x < 5}

SET REPRESENTATIONS
1. Recursive Rule. By defining a set of rules which generates or defines its members.
Examples:
B = {all licensed professional teachers}
D = {consonants of the English alphabet}

2. Listing / Roster Method. Writing or listing down all the elements between braces.
Examples:
A = {2, 4, 6, 8, 10}
E = {Instagram, Facebook, X, TikTok}

3. Set-Builder Notation. Enumerating its elements by stating the properties that its
members must satisfy.
Examples:
C = {𝑥 ∈ 𝑍 − | 𝑥 ≤ −1 }
𝐹 = {𝑥 ∈ 𝑁 | 𝑥 < 5}

TYPES OF SETS
1. A finite set contains elements that can be counted and terminates at a certain natural
number, otherwise, it is an infinite set.
Examples of Finite Set:
A = {2, 4, 6, 8, 10}
D = {consonants of the English alphabet}
E = {Instagram, Facebook, X, TikTok}
F = {x ∈ N | x < 5}
Examples of Infinite Set:
B = {all licensed professional teachers}
C = {𝑥 ∈ 𝑍 − | 𝑥 ≤ −1 }

2. Null Set or Empty Set. This is a set with no elements, often symbolized by ∅ or { }.
Examples:
G = {vowel in the word “CRYPT”}

7
G=∅

3. Singleton set. A set with only one member.


Example:
H = {number that is an even prime number}
H = {2}

4. Equal Sets. Two sets are equal if they contain the same elements.
Example:
F = {x ∈ N | x < 5}
I= {1, 2, 3, 4}
Sets F and I are equal since the members of both of these sets are 1, 2, 3, 4.

5. Equivalent Sets. Two sets are equivalent if they contain the same number of elements.
Example:
E = {Instagram, Facebook, X, TikTok}
F = {x ∈ N | x < 5}
The set E has 4 elements: Instagram, Facebook, X, and TikTok, whereas set F
contains also 4 elements making them equivalent sets.

6. Universal Set. A set that contains all the elements considered in a particular situation
and denoted by U.
Example:
U = {letters of the English alphabet}
J={b,c,d,e,f,g,h,i,j}
In this example, set U is considered the universal set since this is the set where
the elements of set J can be drawn.

7. Subset. A set A is called a subset of B if every element of A is also an element of B. “A


is a subset of B” is written as A  B.
⎯ ∅ is a subset of every set.
⎯ A set is always a subset of itself.
Example: I = { 1, 2, 3, 4}
Subsets:
{ 1 }, { 2 }, { 3 }, { 4 },
{ 1 , 2 }, { 1 , 3 }, { 1 , 4 }, { 2 , 3 }, { 2 , 4 }, { 3 , 4 },
{ 1 , 2 , 3 }, { 1 , 2 , 4 }, { 1 , 3 , 4 }, { 2 , 3 , 4 },
{ 1 , 2 , 3 , 4 }, and ∅

8. Power Set. This is defined to be the set of all subsets of a given set, written as P(A).
Example: I = { 1 , 2 , 3 , 4 }
P (L) = { { 1 } , { 2 } , { 3 } , { 4 } , { 1 , 2 } , { 1 , 3 } , { 1 , 4 }, { 2 , 3 } , { 2 , 4 } , { 3 ,
4 } , { 1 , 2 , 3 } , { 1 , 2 , 4 }, { 1 , 3 , 4 } , { 2 , 3 , 4 }, { 1 , 2 , 3 , 4 }, ∅ }
| 𝑃 (𝐼) | = 2𝑛 = 24 = 16 elements / subsets in the 𝑃(𝐼).

8
9. Disjoint Sets. Two sets are disjoint if they have no element in common.
Example:
D = { consonants of the English alphabet }
K = { vowels of English alphabet }
Sets K and C are disjoint since they do not have elements in common.

Cardinality of the Set. The cardinality of a set is its size. For a finite set, the
cardinality of a set is the number of members it contains. In symbolic notation the size of a set
S is written |S|.

Axiom of Extension. This states that a set is completely determined by what its
elements are – not the order in which they might be listed or the fact that some elements might
be listed more than once.
Through the Axiom of Extension, sets can be written not like this:
× L={a,b,b,c,d,e,e,f,g,h,h,i,j}

But can be written like any of these:


✓ L={a,b,c,d,e,f,g,h,i,j}
✓ L= { j , g , c , a , e , b , h , f , i , d }

SET OPERATIONS
VENN DIAGRAMS
The English logician John Venn (1834–1923) developed diagrams, which we now refer to
as Venn diagrams, that can be used to illustrate sets and relationships between sets. In a Venn
diagram, the universal set is represented by a rectangular region, and subsets of the universal
set are generally represented by oval or circular regions drawn inside the rectangle. In a Venn
Diagram, the size of the rectangle or circle is not a concern.

OPERATIONS ON SETS
I. The union of sets A and B, denoted by A∪B, is the set consisting of all elements that
belong to either A or B or both.

𝐴 ∪ 𝐵 = { 𝑥 │ 𝑥 ∈ 𝐴 𝑜𝑟 𝑥 ∈ 𝐵 }

Example for union of sets:


M = {1, 2, 3, 4, 5, 6, 7, 11}
J = {2, 4, 6, 8, 10, 12}
M ∪ J = {1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12}

9
II. The intersection of sets A and B, denoted by A∩B, is the set consisting of all elements
that belong both A and B.

𝐴 ∩ 𝐵 = {𝑥 │ 𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥 ∈ 𝐵 }

Example for intersection of sets:


M = {1, 2, 3, 4, 5, 6, 7, 11}
J = {2, 4, 6, 8, 10, 12}
M ∩ J = {2, 4, 6}

III. The complement of set A is defined as the set consisting of all elements in U that are
not in A.
𝐴 = { 𝑥 ∈ 𝑈 | 𝑥  𝐴 }

Example for set complement:


U = { 𝑥 ∈ 𝑁 | 𝑥 < 21}
J = {2, 4, 6, 8, 10, 12}
J′ = { 1, 3, 5, 7, 9, 11, 13, 14, 15, 16, 17, 18, 19, 20}

IV. The difference or relative complement of two sets A and B, denoted by A–B, is the
set consisting of all elements in A that are not in B.

𝐴 − 𝐵 = {𝑥 │ 𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥  𝐵 } 𝐵 – 𝐴 = {𝑥 | 𝑥 ∈ 𝐵 𝑎𝑛𝑑 𝑥  𝐴}

10
Example for difference of sets:
M = {1, 2, 3, 4, 5, 6, 7, 11}
J = {2, 4, 6, 8, 10, 12}
M − J = {1, 3, 5, 7, 11}
J − M = {8, 10, 12 }

ADDITIONAL NOTES

Symbol Symbol Name Meaning Example


A = {1, 7, 9, 13, 15, 23},
{} set a collection of elements
B = {7, 13, 15, 21}
Elements that belong to set A A ∪ B = {1, 7, 9, 13, 15, 21,
A∪B union
or set B 23}
Elements that belong to both
A∩B intersection A ∩ B = {7, 13, 15 }
the sets, A and B
subset has few or all
A⊆B subset {7, 15} ⊆ {7, 13, 15, 21}
elements equal to the set
left set is not a subset of right
A⊄B not subset {1, 23} ⊄ B
set
proper subset subset has fewer elements {7, 13, 15} ⊂ {1, 7, 9, 13,
A⊂B
/ strict subset than the set 15, 23}
proper
set A has more elements than {1, 7, 9, 13, 15, 23} ⊃ {7,
A⊃B superset /
set B 13, 15, }
strict superset

11
set A has more elements or {1, 7, 9, 13, 15, 23} ⊇ {7,
A⊇B superset
equal to the set B 13, 15, 23}
Ø empty set Ø={} C = {Ø}
C = {4,7},
P(C) = {{}, {4}, {7}, {4,7}}
P (C) power set all subsets of C
Given by 2s, s is number of
elements in set C
set X is not a superset of set
A⊅B not superset {1, 2, 5} ⊅{1, 6}
Y
both sets have the same
A=B equality {7, 13,15} = {7, 13, 15}
members
A \ B or relative objects that belong to A and
{1, 9, 23}
A-B complement not to B
We know, U = {1, 2, 7, 9,
c all the objects that do not
A complement 13, 15, 21, 23, 28, 30}
belong to set A
Ac = {2, 21, 28, 30}
symmetric objects that belong to A or B
A∆B A ∆ B = {1, 9, 21, 23}
difference but not to their intersection
B = {7, 13, 15, 21},
a∈B element of set membership
13 ∈ B
(a, b) ordered pair collection of 2 elements (1, 2)
A = {1, 7, 8, 13, 15, 23}, 5 ∉
x∉A not element of no set membership
A
the number of elements of
|B| cardinality B = {7, 13, 15, 21}, |B|= 4
set B
cartesian set of all ordered pairs from {3,5} × {7,8} = {(3,7), (3,8),
A×B
product A and B (5,7), (5, 8)}
natural
numbers /
N1 whole N1 = {1, 2, 3, 4, 5,…} 6 ∈ N1
numbers set
(without zero)
natural
numbers /
N0 whole N0 = {0, 1, 2, 3, 4,…} 0 ∈ N0
numbers set
(with zero)
rational
Q Q= {x | x=a/b, a, b ∈ Z} 2/6 ∈ Q
numbers set
integer
Z Z= {…-3, -2, -1, 0, 1, 2, 3,…} -6 ∈ Z
numbers set
complex C= {z | z = a + bi, -
C 6 + 2i ∈ C
numbers set ∞<a<∞, -∞<b<∞}
real numbers
R R= {x | -∞ < x <∞} 6.343434 ∈ R
set

12

You might also like