Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Logic and Sets: By: Mr. Paolo Rovic D. Suarez

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

Logic and

Sets
BY: MR. PAOLO ROVIC D. SUAREZ
MAIN TOPICS

2.1 Propositions
2.2 Compound Propositions
2.3 Sets
2.1 PROPOSITIONS
Mathematics is a language. As in any other types of language, we
use sentences to communicate thoughts and ideas. Mathematics is
not an exception. We use propositions to communicate mathematical
ideas precisely.
Definition
A proposition is a declarative sentence
that can be objectively identified as either
true or false, but not both. If a proposition
is true, then its truth value is true and is
denoted by T or 1; otherwise, its truth value
is false and is denoted by F or 0.
Example 1. Consider the following sentences.
(1) Douglas MacArthur arrived in the Philippines in 1521.
(2) Are you insane?
(3) 2 is a prime number.
(4) Find all x such that x^2 = 4.
(5) Is that your laptop?
(6) Basketball players are handsome.
(7) There is life in other planets.
(8) Welcome to the Philippines!
Immediately, we find that sentences ___, ___,
___, and ___ are not declarative sentences, so
they are not propositions.
Sentence (1) is a proposition because Douglas
MacArthur either arrived in the Philippines in 1521
or not. In fact, this proposition is false because
historical records shows that Douglas MacArthur
arrived in the Philippines some time in 1900s.
Sentence (3) is clearly a true proposition.
Although statement (6) is a declarative sentence,
it cannot be considered a proposition because
the meaning of the word “handsome” is subjective
in nature. Unless we could agree on an objective
definition of “handsome”, then statement (6)
cannot be considered a proposition.
Finally, statement (7) is a proposition. Whether there
is life or not in other planets, it doesn’t really matter.
The fact that this sentence is either true or false, and
cannot be both true and false, makes it a
proposition.
For this example, we still don’t have enough evidence
to claim that proposition (7) is true yet, and we don’t
have a proof that it is false either. Hence, only time
will tell when can we assign a truth value for (7), but
certainly, it has a truth value.

Symbolically, we denote propositions in this lesson


using lower case letters, such as p, q, r, s, etc.
Definition

The negation of a proposition p is the


proposition which is false when p is true;
and true when p is false. The negation of
p is denoted by ¬p.
In the English language, we can simply
state the negation of a proposition p by
saying “It is not the case that p.” However,
there are many ways to express negations
of statements grammatically by replacing
“is/are” by “is not/are not”, etc.
Example 2. Given the statements

p : Everyone in Visayas speaks Cebuano.


q : Today is Wednesday

The corresponding negations are

¬p : Not everyone in Visayas speaks Cebuano.


¬q : Today is not Wednesday.
2.2 COMPOUND
PROPOSITIONS
A simple proposition is a proposition with
only one subject and only one predicate.
For example, the proposition “Every cat
that barks has a PhD.” is a simple
proposition. The subject of this proposition
is “every cat that barks” and the predicate
is “has a PhD.”
In logic, we can combine simple
propositions to form compound
propositions using logical connectives.
Some of the most common connectives
are “or”, “and”, “but”, “unless”, etc.
Definition

Let p and q be given propositions. The


conjunction of p and q is the proposition
“p and q”, denoted by p ∧ q, which is true
only when both p and q are true.
In other words, if one of p or q is false,
then p ∧ q is false. We summarize this
idea using the following table.
Such a table is called a truth table for
p ∧ q. The truth table above illustrates
the different combinations of truth values
for p and q and the corresponding truth
value for the conjunction.
Example 3. Given the propositions:

p: Four is even.
q: A platypus is a monotreme.
r: Philippines is a first world country.

We know that p and q are ____ and r is ____.


Therefore,
p ∧ q : Four is even and a platypus is a monotreme.
is true, while
p ∧ r : Four is even and Philippines is a first world
country.
is false
For a more complicated example,
¬p ∧ ¬q :

¬p ∧ ¬r :
Definition

Let p and q be given propositions. The


disjunction of p and q is the proposition
“p or q”, denoted by p ∨ q, which is false
only when both p and q are false.
In other words, if one of p or q is true (or
both), then p ∨ q is true. The truth table
for p ∨ q is given below.
Example 4. Consider the statements p, q and r in
the preceding example. The statement

p ∨ q : Either four is even or a platypus is a


monotreme.
is ____. Also,
p ∨ r : Either four is even or Philippines is a first
world country
Example 5. The proposition “Either four is even or
there is life in other planets.” is technically true
since the component “Four is even.” is a true
proposition. Whether the proposition “There is life
in other planets.” is true or false, the disjunction is
always true.
Example 6. Construct a truth table for the
compound statement p (q∨ ∧(¬r )).

Solution: Since each of p, q, and r may assume


two distinct truth values, then there are a total of
2×2×2 = 8 combinations, hence the truth table
must contain eight rows as shown on the next
slide.
Definition
Let p and q be propositions. The
conditional statement p → q is the
proposition “If p, then q.” is the
proposition which is false only when p is
true and q is false.
Definition
The converse, inverse, and
contrapositive of p → q are the
conditional statements q 􀀀→ p,
(¬p) → (¬q), and (¬q) 􀀀→ (¬p),
respectively.
The following is the truth table for p􀀀 → q.
In the proposition p􀀀 → q, the proposition p
is also called as the premise and q is
called as the conclusion. From the truth
table, we can see that a conditional
statement is trivially true when the
premise is false.
Example 7. Suppose that your mother exclaims “If
you don’t wash the dishes, then you don’t get
money for a buffet.” In this conditional statement,
the premise is “You don’t wash the dishes.” and
the conclusion is “you don’t get money for a
buffet.” This statement can only false only when
you don’t wash the dishes but you still get money
for the buffet.
Note that there are many ways to say p􀀀 →
q aside from “If p, then q.” Alternatively,
we can say “q if p” or “p implies q”, “p is
sufficient for q” or “q is necessary for p.”
Example 8. Given the statements p : “π is
irrational.” and q : “3 is less than 2.”, then


p􀀀 q:

q􀀀 p:

(¬p) (¬q) :

(¬q) 􀀀 (¬p) :
If we assume that p is true and q is false (just like
how they really are in mathematics), one verifies
→ →
that both p 􀀀 q and (¬q) 􀀀 (¬p) are false, while

both q 􀀀 p and (¬p) → (¬q) are true.
We like to emphasize that we write the negation
of “π is irrational” as “π is not irrational” to
emphasize the fact that we actually don’t assume
that the opposite of being irrational is being
rational, unless otherwise stated.
Definition
Let p and q be propositions. The
biconditional statement p ↔ q to be
read as “p if and only if q” is the
proposition which is true only if both p and
q are true or both p and q are false.
The following is the truth table for p ↔q
Definition
A compound proposition is a tautology if its
truth value remains true regardless of the
truth values of its component propositions. On
the other hand, a compound proposition is a
contradiction if its truth value remains false
regardless of the truth values of its
component propositions.
Example 9. The compound statement p ∨ (¬p) is
a tautology and the compound statement p ∧
(¬p) is a contradiction. This can be observed by
looking at the truth table below.
Definition

Let p and q be propositions (possibly


compound). We say that p logically implies
q, expressed as p ⇒
q, if the conditional
statement p → q is a tautology.
Definition


If p q and q ⇒ p, we say that p and q are
logically equivalent and we write p ⇔ q. A
compound proposition that is neither a
tautology nor a contradiction is called a
contingency.
Example 10. By constructing truth tables, show
that p⇒ ∨p q and p ∧ ⇒ q p.
In logic, the implication p ⇒ ∨(p q) is
called as the law of addition and the
implication (p ∧ ⇒ q) p is the law of
simplification.
Theorem
Let p, q, and r be propositions.
Theorem
Let p, q, and r be propositions.
2.3 SETS
One of the basic concepts every student of
mathematics must know is that of sets.
Definition

A set is a well-defined collection of


objects called elements.
Definition
A collection is well-defined if for any given
object we can objectively decide whether it is
or is not in the collection. Any object which
belongs to a given set is said to be an
element of or a member of the given set.
Example 11.
1. The collection of all letters in the English
Alphabet is a set.
2. The collection of all beautiful girls is not a set,
because one cannot objectively identify if a given
girl is beautiful or not, because the word
“beautiful” is subjective in nature
Definition
A collection is well-defined if for any given
object we can objectively decide whether it is
or is not in the collection. Any object which
belongs to a given set is said to be an
element of or a member of the given set.
Upper case letters are usually used to name
sets.
SET
DESCRIPTION

LISTING (ROSTER) SET-BUILDER


METHOD NOTATION

DESCRIPTIVE
METHOD
The listing method describes the set by
listing all the elements between braces and
separated by commas (note: in enumerating
the elements of a certain set, each element is
listed only once and the arrangement of
elements in the list is immaterial).
The set-builder notation uses a variable (a
symbol, usually a letter, that can represent
different elements of a set), braces, and a
vertical bar | that is read as "such that". This
is usually used when the elements are too
many to list down.
The descriptive method uses a
short verbal statement to describe the set.
Example 12. Using the roster method, the set of
months in a year that ends with letter ‘y’ can be
represented by _________________.

Example 13. The set {2, 3, 4, 5, 6, 7, 8, 9} in set-


builder notation is _____________________.

If a is an element of a set A, we write a A.
Otherwise, we write a ∉ A. There are sets
with no elements. Such a set is said to be
empty and we use the symbol {} or Ø to
denote the empty set. A set with only one
element is called a unit set or a singleton.
Example 14. The set of integers between 1
and 2 is empty, while the set of even
prime numbers is a singleton.
For future discussion, we will use the
following notations:

ℕ for the set of natural or counting numbers


(positive integers): {1, 2, 3, 4, ... }

ℤ for the set of integers: { ..., -3, -2, -1, 0, 1, 2,


3, ... }
ℚ for the set of rational numbers:
{a/b | a,b ∈ ℤ, b ≠ 0}
ℝ for the set of real numbers.
A set A is said to be finite if it is possible to
list down all the elements of A in a list.
Otherwise, A is said to be infinite. If A is
finite, the cardinality of A is the number of
elements of A, which is denoted by n(A).
Example 15. The set of all letters in the
English Alphabet is finite and its
cardinality is ___, because there are ___
distinct letters in the English alphabet. On
the other hand, the set of all even integers
is infinite.
Definition
Let A and B be sets. We say that A is a

subset of B and write A B if every element
of A is an element of B. We say that A and B
⊆ ⊆
are equal and write A = B if A B and B A.
Remarks.
1. For any set A, A ⊆A and ∅⊆A.
2. If A and B are finite sets and A = B, then
n(A) = n(B).
Example 16. Let A be the set of all
elephants that can jump 10 feet high and
B be the set of all SPUSM students.

Then A = . By Remark (1) above, A B:⊆
Therefore, we can conclude that every
elephants that can jump 10 feet high is a
SPUSM student.
Two finite sets A and B are said to be
equivalent if and only if n(A) = n(B). Note that
equal sets are necessarily equivalent but
equivalent sets need not be equal.
Example 17. Let A = {x | x is a prime
number less than 20} and B = {1, 2, 3, 4, 5,
6, 7, 8} are equivalent since n(A) = __ =
n(B), however A ≠ B
Definition
Let A and B be sets. The union of A and B is
defined as

A ∪B = {x | (x∈A)∨(x∈B)}
Definition
The intersection of A and B is defined as

∩B = {x |(x∈A)∧(x∈B)}.
A

If A∩B =∅, the sets are said to be disjoint.


Definition
The relative complement of B in A is the set

A\B = {x |(x ∈A)∧(x∉B)}= A ∩ B'.


We can further say that a relative


complement is the set of elements that
belong to a set but not to another.
Venn Diagram
Example 18. Let A = {0, 1, 3, 5, 7} and B =
{1, 2, 4, 7, 9}.


Then A B =

and A B =
In most of the interesting instances in
mathematics, we normally talk about a
particular set of objects at a given time. The
set of all objects of interest is called as the
universal set, generically denoted as U.

If A U , the complement of A is defined as
the set

A' = U\A = { x ∈U | x∉A }


Using the De Morgan’s Law of logic, one can
readily verify that
∪ ∩ ∩ ∪
(A B)' = A' B' and (A B)' = A' B':
Example 19. At a certain high school, each
student is a member of the English Club, the
Science Club, or the Mathematics Club. Of the 79
students asked, 33 are members of the English
Club, 37 are members of the Math Club, and 37
are members of the of the Science club.
Furthermore, 7 are members of both the English
and the Math Clubs, 12 are members of both the
English and the Science Clubs,and 9 are members
of the Science and Math Clubs. No high school
student is a member of all the three clubs. How
many joined only the Math Club?
Solution: Let E, S, and M denote the sets
of members of English, Science, and
Mathematics Club, respectively. As given
in the problem, the universal set U has
cardinality n(U) = __, n(E) = __, n(M) = __,
and n(S) = __.
∩ ∩
Furthermore, n(E M) = __, n(E S) = __,

and n(S M) = __. The last condition imply
∩∩
that E S M = __. This situation can be
represented by the following Venn
diagram.
∩∩
Since n(E S M) = 0, then the number of
students who only joined the Mathematics
Club is

n(M) - n(E ∩M) - n(S∩M) = 37 - 7 - 9 = 21.

You might also like