You are on page 1of 38

Information Set Theory (Self-study) Logic Proof

Singapore University of
Technology & Design

Advanced Math 1
Week 01 - Lecture 1

Sets, Logic and Proof

Singapore University of Technology & Design

May 14, 2018

1 / 38
Information Set Theory (Self-study) Logic Proof

A logician’s wife just had a baby. A colleague asked the


logician: “ is it a boy or a girl? ” He replied: “ yes. ”

2 / 38
Information Set Theory (Self-study) Logic Proof

Outline

Information

Set Theory (Self-study)

Logic

Proof

3 / 38
Information Set Theory (Self-study) Logic Proof

Practical information

Lecturer : Wei Pin Wong,


e-mail: weipin_wong@sutd.edu.sg
Textbook: George F. Simmons, Calculus with Analytic
Geometry, 2nd edition, McGraw Hill, 1996
Timetable: 1-hour lecture and two 2-hour cohort sessions.
eDimension: Here you can find
• the slides for lectures and cohort sessions.
• the course description.
• homework.
• pre-cohort checklists.
• additional practice problems.
• solutions.
• other useful information/links.

4 / 38
Information Set Theory (Self-study) Logic Proof

Practical information
Lectures: Slides will be on eDimension before the lecture.
However I will write on the slides, so take notes.
Exams: 2 midterms (6 June & 11 July) and a final exam
(17 Aug.).
Homework: 9 homework, which are due on Mondays at 6pm.
Copying or letting others to copy homework will be
punished equally.
Pre-cohort A checklist of concepts that will help you to
checklist: prepare for the cohort sessions. You need to
submit the checklist personally at the beginning of
the cohort session.
Course All details about the course (% of assessment,
description: syllabus, policies, etc.) are stated in the course
description available at eDimension. Please read
through it.
5 / 38
Information Set Theory (Self-study) Logic Proof

Practical information
A few hints on how to do well here at SUTD!
• Learn and understand the material!
• Retain the knowledge, you need it for other courses.
• Read the textbooks (before the lecture and the cohort
session), complete the pre-cohort checklist (before the
cohort session).
• If something is not clear...
• Try to look it up (book/internet/etc).
• Try looking at examples.
• Discuss it at Piazza.
• Come to office hours and ask.
• Ask the instructors in the cohort session.
• Go to help sessions (Fridays, 1:30pm-3:30pm at Cohort
Classroom 14 (2.507), starting from week 2).
• Talk to your peers!
• Practice makes perfect!!
6 / 38
Information Set Theory (Self-study) Logic Proof

Practical information
• Advanced Math 1 is a required subject which students
must pass in order to proceed to Advanced Math 2 and
Introduction to Design in Term 2.
• Failures will have to attend the bootcamp, which will be
held from 27th August to 7th September. The attendance
of the bootcamp is compulsory, failing to attend the
bootcamp will result in an immediate failure of the
bootcamp.
• Do not plan for any overseas trip during the bootcamp
period if you are in the danger zone of failing the course
based on your performance during the term (consult your
instructors if you are not sure).
• Students have to sit for a bootcamp exam at the end of the
bootcamp. Students who fail the bootcamp exam will have
to retake the course in the next academic year.
7 / 38
Information Set Theory (Self-study) Logic Proof

Prerequisites

Before we proceed to learn calculus, let’s make sure everybody


is on the same page :q

You need to have some basic understanding of the following


topics:
• Set theory
• Logic
• Proof

You can view them as the spelling, vocabulary and grammar of


Mathematics.

8 / 38
Information Set Theory (Self-study) Logic Proof

Notations
Notation: A : B means A is defined to be B. We use this to
introduce/define the new symbol A, whereas B is something
that we already know.
E.g.:
1.

2. Q : set of all rational numbers.


One cannot question the truth of a definition. It is defined as it
is, although one can question the choice of the new
symbol/word, but this is just matter of taste or historical
background (why don’t we call a Papple? Bapple? Capple,
etc.).
9 / 38
Information Set Theory (Self-study) Logic Proof

Notations

Notation: a  b means a is equal to b. a, b are something that


we already know (they have been defined earlier) and we claim
that they are equal.

E.g.:
1. 1 1  2.
2. 2
4  12 .

One can question the truth of an equation. For instance, 1  2


is false, because we already know what 1 and 2 are and we
know that they are not equal.

10 / 38
Information Set Theory (Self-study) Logic Proof

Outline

Information

Set Theory (Self-study)

Logic

Proof

11 / 38
Information Set Theory (Self-study) Logic Proof

Sets
Sets are one of the fundamental concepts in mathematics.
Definition:
Informally, a set is a collection of distinct objects. These ob-
jects are called the elements of the set.

E.g./Notations:
• The set of all students in SUTD.
t1, 3, 4, 13u.

• tsun, moon, earthu.
• t0, 2, 4, 6, 8, . . .u.
The curly brackets t u are the standard notations used to
represent a set. The things inside the curly brackets are the
elements of the set.
We use three dots ". . . " to represent the rest of the elements
when the pattern is clear.
12 / 38
Information Set Theory (Self-study) Logic Proof

Examples of sets

Some common sets/notations:


• N0 :  t0, 1, 2, . . .u, the set of natural numbers including 0.
• N : t1, 2, 3, . . .u, the set of natural numbers excluding 0.
• Z : t. . . , 3, 2, 1, 0, 1, 2, 3, . . .u, the set of all integers.
• Q : the set of all rational numbers.
• R : the set of all real numbers.
• R2 : tpx, y q : x, y are real numbersu, the set of all
ordered pairs of real numbers.
• C:  the set of all complex numbers.
• H or tu : the empty set, i.e. the set with no elements.

13 / 38
Information Set Theory (Self-study) Logic Proof

Elements, subsets
Notation: The symbol P means ‘is an element of’, where as R
means ‘is not an element of’.
E.g.:
• 1 P t1, 3, 4, 13u.
• 7 P Z.
• π R Z.
Notation: In general, writing a slash { over a symbol means
‘not’.
Definition:
A set X is a subset of a set Y if every element of X is also an
element of Y . We write this as X „ Y .
E.g.:
t u „ Z.
• 1, 3, 4, 13
„
• Q R.
„
• R / Z.
R
• Z R, but Z „ R.
14 / 38
Information Set Theory (Self-study) Logic Proof

Equal sets
Definition:
Two sets, X and Y , are equal precisely when X „ Y and Y „
X . We write this as X  Y .
E.g.: S1 : t integers that are multiple of ten u,
S2 : t integers with zero as their last digit u.
For any element x P S1 , x is a multiple of ten, so x  10n for
some integer n. Thus the last digit of x is 0 and x P S2 . We
have just shown that S1 „ S2 .
For the opposite inclusion, for any element y P S2 , the last digit
y
of y is 0 and so 10 is an integer, say k . Thus y  10k and
y P S1 . This shows that S2 „ S1 .
With S1 „ S2 and S2 „ S1, we conclude that S1  S2.
4! Remember this method, especially when the two sets are

very complicated and you can’t eyeball that they are equal.
15 / 38
Information Set Theory (Self-study) Logic Proof

Defining a set by properties

Notation: The notations


S : tx PX : some properties/propositions involving x u
and
S : tx
P X | some properties/propositions involving x u
means S is the set containing exactly those x P X that satisfy
all the properties/propositions stated after the colon : or vertical
line |.

E.g.: The open interval pa, bq : tx P R : a   x   bu .


The closed interval ra, bs : tx P R : a ¤ x ¤ bu .

4! Make sure you understand this notation, you will see it a lot

in the future as it’s a concise way of defining a set.

16 / 38
Information Set Theory (Self-study) Logic Proof

Set operations
Definition:
The union of sets A and B, denoted by A Y B, is the set whose
elements are either in A or B (or both).
The intersection of sets A and B, denoted by A X B, is the set
whose elements are in both A and B.
These notions can be represented on a Venn diagram.

E.g.: Let A „ R2 be the line y  0 and let B „ R2 be the line


x  0. Then A Y B is the coordinate axes and A X B is the set
containing just the origin.
17 / 38
Information Set Theory (Self-study) Logic Proof

Set operations
Definition:
Let A, B be two sets. The complement of A relative to B, de-
noted by B zA, is the set of elements of B that are not in A,
i.e.
B zA : tx P B : x R Au.

Definition:
Let A „ U (U is called the universal set, it should be clear in
the given context), the complement of A, denoted by Ac , is the
set of elements of U that are not in A, i.e. Ac  U zA.

18 / 38
Information Set Theory (Self-study) Logic Proof

Outline

Information

Set Theory (Self-study)

Logic

Proof

19 / 38
Information Set Theory (Self-study) Logic Proof

Logic

Definition:
A proposition is a statement that has a truth value: it is either
true (T) or false (F) but not both.

Examples and non-examples of propositions:


• p:1 2  3.
• q : The sky is always blue.
• r : Why do you choose SUTD?
• s : Remember to do your maths homework.
• t : There are infinitely many prime numbers.
• u : There is life on Mars.

We can combine propositions using NOT, AND, OR to form


(composite) propositions.

20 / 38
Information Set Theory (Self-study) Logic Proof

NOT
Definition:
The negation of a proposition p can be denoted by ‘NOT p’.
NOT p has the opposite truth value to p. We can express this
using a truth table:
p NOT p
T F
F T

E.g.: p : 7 is divisible by 3.
NOT p : 7 is not divisible by 3.
E.g.: q : John attended every lecture of Math 1.

4! Negating complicated propositions can be tricky. You’ll learn

the rules in the later slides.


21 / 38
Information Set Theory (Self-study) Logic Proof

AND and OR

Definition:
Let p, q be propositions. ‘p AND q’ is only true when both p
and q are true and false otherwise.
‘p OR q’ is true when p is true or q is true, or both (i.e. inclusive)
and false otherwise.

p q p AND q p q p OR q
T T T T T T
T F F T F T
F T F F T T
F F F F F F

E.g.: ‘ 2  0 AND 2 ¡ 0 ’ is false.


But ‘ 2  0 OR 2 ¡ 0 ’ (denoted as 2 ¥ 0) is true.

22 / 38
Information Set Theory (Self-study) Logic Proof

Connections with sets

AND can be thought of as set intersection; OR can be thought


of as set union.

E.g.: Let P be the set of all prime numbers, let E be the set of
all even numbers. Then P X E is the set of numbers that are
prime AND even, i.e. P X E  t2u; P Y E is the set of numbers
that are prime OR even.

The mathematical usage of AND and OR can be different from


their everyday usage: AND is always an intersection, never a
union; OR is always inclusive (can be both).

You should now be able to understand the jokes shown at the


beginning of this lecture.

23 / 38
Information Set Theory (Self-study) Logic Proof

Conditional propositions
Definition:
Let p, q be propositions. The proposition ‘if p, then q’ is de-
noted by p ñ q. p ñ q can be defined by its truth table:

p q p ñq
T T T
T F F
F T T
F F T

Intuitively, p ñ q is true when the deduction is true, i.e. the


case where p is true and q is false cannot happen. Do not
confuse this with the truth value of p.
E.g.: The proposition ‘ if I am Superman, then I can fly ’ is true,
although ‘ I am Superman ’ is false.
24 / 38
Information Set Theory (Self-study) Logic Proof

Conditional propositions, continued

Equivalent ways to say p ñq:


• If p, then q.
• p implies q.
• q, if p.
• p, only if q.
• p is a sufficient condition for q.
• q is a necessary condition for p.

Try to understand the sentences above using p : I am a father,


q : I am a man.

Negation: The negation of p ñ q is the case when the


deduction is false, which is p AND (NOT q).

25 / 38
Information Set Theory (Self-study) Logic Proof

Logical equivalences
Definition:
The proposition ‘pp ñ q q AND pq ñ pq’ is denoted by p ô q.
This is read as ‘ p if and only if q ’ (abbreviated as p iff. q), ‘ p
is equivalent to q ’ or ‘ p is a necessary and sufficient condition
for q ’.
For p ô q to be true, p and q must have the same truth values:

p q p ôq
T T T
T F F
F T F
F F T

E.g.: xy  0 if and only if x  0 or y  0.


E.g.: I am a father iff. I am a man and I have children.
26 / 38
Information Set Theory (Self-study) Logic Proof

Converse and contrapositive


Definition:
The converse of the proposition ‘ p ñ q ’ is ‘ q ñ p ’.
The contrapositive of ‘ p ñ q ’ is ‘ ( NOT q ) ñ ( NOT p ) ’.
E.g.: For the proposition ‘ if I am a father, then I am a man ’, the
converse is ‘ if I am a man, then I am a father ’ ; the
contrapositive is ‘ if I am not a man, then I am not a father ’.
The converse of a proposition doesn’t always have the same
truth value as the original proposition.
The contrapositive of a proposition is always equivalent to the
original proposition. You can prove this by checking that they
always have the same truth values.
4! People tend to confuse a proposition with its converse, so

pay extra attention.


27 / 38
Information Set Theory (Self-study) Logic Proof

De Morgan’s laws
Theorem: (de Morgan’s laws)
1. NOT ( p OR q ) ô ( NOT p ) AND ( NOT q ).
2. NOT ( p AND q ) ô ( NOT p ) OR ( NOT q ).

Proof: We will prove the first law; the second one is similar. We
just have to show the truth value of ‘ NOT ( p OR q ) ’ is always
the same as the truth value of ‘ ( NOT p ) AND ( NOT q ) ’.

p q NOT (p OR q) NOT p NOT q (NOT p) AND (NOT q)


T T F F F F
T F F F T F
F T F T F F
F F T T T T

The 3rd and 6th columns are identical.


28 / 38
Information Set Theory (Self-study) Logic Proof

Quantifiers
Many mathematical statements can be written in the form ‘ for
all x, there exists a y , such that ... ’ .
E.g.: For all x ¡ 0, there exists a y P Q, such that 0   y   x.
Notations:
@
• ‘ For all x ’ (or ‘ for every x ’) is denoted by x.
D
• ‘ There exists a y ’ (or ‘ for some y ’) is denoted by y .

4
! These concepts are very different; do not mix them up!

Negation rules: The rules to negate a proposition involving


quantifiers are : keep the order of the sentence, change @ to D,
change D to @, negate the rest of the statement (the parts
without quantifiers) as usual.
E.g.: The negation of the example above is: there exists a
x ¡ 0, such that for all y P Q, y R p0, x q.
29 / 38
Information Set Theory (Self-study) Logic Proof

Logic puzzle: Knights and Knaves

If you think you have mastered logic and want to have some fun
with it, try solving the Knights and Knaves logic puzzle at
http://philosophy.hku.hk/think/logic/knights.php.

You can discuss the solution at Piazza!

30 / 38
Information Set Theory (Self-study) Logic Proof

Outline

Information

Set Theory (Self-study)

Logic

Proof

31 / 38
Information Set Theory (Self-study) Logic Proof

Why do we need proofs?

In mathematics, a proof is a finite sequence of logical deductive


arguments to reach a mathematical statement/proposition.

Proofs guarantee the certainty of mathematics results. Many


experts believe that mathematical proofs are the only way to
obtain results which resemble absolute truths.

An understanding of logic and proof will enable you to reason


correctly, spot fallacies in other people’s arguments and
become less likely to be misled.

32 / 38
Information Set Theory (Self-study) Logic Proof

Given p, prove q

A typical proof question looks like this: given p, prove q.

That is, you are asked to show that ‘ p ñ q ’ is true.


The correct approach is to assume that p is true, then try to
arrive at q.

To do so, we apply a sequence of logically correct


manipulations, known results, theorems, etc. There is no
recipe, you need to be creative!

4! Do not assume q to be true at any point! A common mistake

is to assume q to be true, then arrive at p. This is proving the


converse of the proposition, but not the original proposition.

33 / 38
Information Set Theory (Self-study) Logic Proof

Proof by contradiction

To prove a proposition p, you can never assume that p is true.

However, you can assume that p is false (i.e. NOT p) and then
explore the consequences, etc, until you arrive at a conclusion
that is false.

This means the original assumption NOT p is false, therefore p


is true.

This method is called proof by contradiction.

34 / 38
Information Set Theory (Self-study) Logic Proof

Proof by contradiction: example


A positive integer n ¡ 1 is called a prime if it has exactly two
positive divisors 1 and n.
Question: Prove that there are infinitely many primes.

Answer:
We proceed by contradiction. Assume that there are only
finitely many primes and so we can list them all : p1 , p2 , . . . , pk .

Construct the number M : p1 p2    pk 1.

M is not a prime because it is larger than all the primes


p1 , p2 , . . . , pk . So M has a divisor p that is a prime, but this
prime divisor p cannot be any of p1 , p2 , . . . , pk , because of the
1 remainder. We have a prime p that is not in our complete
list of primes, which is a contradiction. Therefore the
assumption is false and there are infinitely many primes.
35 / 38
Information Set Theory (Self-study) Logic Proof

If and only if

To prove the proposition ‘ p iff. q ’, you need to prove both


‘ p ñ q ’ and ‘ q ñ p ’.
E.g.:
Question: Let px, y q P R2 . Prove that

x2 y2  0 iff. px, y q  p0, 0q.


Answer:
pñq We need to prove that if x 2 y 2  0, then px, y q  p0, 0q.
So assume x 2 y 2  0. If x  0, then x 2 ¡ 0 and so
x 2 y 2  0 would not hold. Therefore x  0. We deduce
similarly that y  0 and so px, y q  p0, 0q.
pðq We need to prove that if px, y q  p0, 0q, then x 2 y2  0.
This is obvious, because x 2 y 2  02 02  0.

36 / 38
Information Set Theory (Self-study) Logic Proof

Proofs with quantifiers


Common error: A question asks you to prove that all elements
of a set A satisfy a property p, but an attempted proof only
gives some examples in A for which p is true. This is an
example of confusing ‘ for all ’ with ‘ for some ’.
Simply listing some examples is not a proof. Instead, you need
to find an argument that works in general for all elements in A.
E.g. For all r P R, is r 2 ¥ 0? Yes, because r 2  r  r is a
product of two numbers of the same sign, which is always
positive or 0.
However, to disprove such a statement (that all elements of A
satisfy p), we only need to produce one counterexample, that
is, one element in A that does not satisfy p.
E.g. Are all real numbers positive? No. Counterexample: 1 is
real and it’s not positive.
37 / 38
Information Set Theory (Self-study) Logic Proof

Conclusion

• Check out eDimension, read the course description.


• Download the 1st homework.
• Look at the slides for the cohort session. There’s no
pre-cohort checklist this week.
• Attend the cohort session (new material will be covered).
• Attend office hours if you need help.
• Additional resource for Lecture 1: appendix A of the
textbook David Poole, Linear Algebra: A Modern
Introduction, Brooks Cole, 3rd edition, 2010.

Any Questions?
38 / 38

You might also like