Sie sind auf Seite 1von 17

Topic 3: Logic, proofs and induction

3.1 Symbolic logic

Tarig Abdelgadir1 : based on notes by P. Brown and D. Trennery

1
Room 5107, Red Centre (East)
tarig.abdelgadir@unsw.edu.au

August 31, 2017

1 / 17
Definition 3.1
A proposition (or statement) is a sentence or clause that is
unambiguously true or false.

Example 3.2
The following are propositions:
The number 57 is prime.
There are infinity many primes.
The shape of maximal area enclosed by a closed curve of fixed
length is that of a disc.
There are more than 8 1067 ways of ordering a standard deck of
cards 52.

Remark 3.3
Statements that are subjective (depend on opinion or perspective) or
paradoxical are not propositions. The following are not propositions:
Pizza is the best genre of food ever!
This sentence is false.
2 / 17
Notation 3.4
We use lowercase letter, like p and q, to denote propositions.
We will the uppercase letters T to denote true and F for false.

We use logical operators to make combine propositions resulting in new


shiny propositions.
Definition 3.5 (Negation)
For a proposition p, the negation of p or not p will be denoted p (or
p) and is defined by the following truth table:

p p
T F .
F T

Remark 3.6
The table we used to define negation is called a truth table.

3 / 17
Definition 3.7 (Conjunction)
Given two propositions p and q the proposition p and q will be denoted
by p q and defined by the following truth table:
p q pq
T T T
T F F .
F T F
F F F
That is, p q is true only when both p and q are true.
Definition 3.8 (Disjunction)
Given two propositions p and q the proposition p or q will be denoted by
p q and defined by the following truth table:
p q pq
T T T
T F T .
F T T
F F F
That is, p q is false only when both p and q are false.
4 / 17
Definition 3.9 (Implication)
Given two propositions p and q the proposition if p then q (or p implies
q) will be denoted by p q and defined by the following truth table:

p q pq
T T T
T F F .
F T T
F F T
That is, p q is only false when p is true and q is false.
Definition 3.10 (Equivalence)
Given two propositions p and q the proposition p if and only if q (or p iff
q) will be denoted by p q and defined by the following truth table:

p q pq
T T T
T F F .
F T F
F F T
That is, p q is true only when p and q have the same truth value. 5 / 17
Remark 3.11
Logical implication, i.e. p q, does not imply causation. It is to
understood as if p is true then q is true.

Remark 3.12
It might sound counter-intuitive to define p q to be true when p is
false and q is true. Consider the statement

If Scotland win the toss they will choose to bat first

and assume it is true. If you missed the toss and switched on to find that
Scotland did bat first does that imply Scotland won the toss? Logic
seems to err on the side of caution.

Notation 3.13
When interpreting a proposition with a combination of logical symbols we
will use the following order of precedence: 1) anything in parentheses 2)
3) , 4) , . Please always use parentheses to dispel any possible
ambiguity.

6 / 17
Notation 3.14
We call a proposition made by combining propositions using logical
operators (like , , , ) a propositional formula. We call its building
blocks (like p, q, . . . ) propositional variables.

Definition 3.15
We say a proposition formula is a tautology (denoted T) if it is true for
all possible truth values of its propositional variables. A proposition
formula is a contradiction (denoted F) if it is false for possible truth
values of its propositional variables.

Definition 3.16
Given two propositional formulas P and Q, we say P logically implies Q
and write P Q if P Q is a tautology.

Definition 3.17
Given two propositional formulas P and Q, we say P is logically
equivalent to Q and write P Q if P Q is a tautology.

Lemma 3.18
Two propositional formulae P and Q are logically equivalent if and only if
they have the same truth values in their truth tables.
7 / 17
Notation 3.19
We will use to denote logical equivalences.

Proposition 3.20
Some standard logical equivalences:
p T T, p F F.
p F p, p T p.
p p T, p p F.
p p p, p p p.
(Commutativity)
p q q p, p q q p.
(Associativity)
(p q) r p (q r ), (p q) r p (q r ).
(Distributivity)
p (q r ) (p q) (p r ), p (q r ) (p q) (p r ).
(De Morgans laws)
(p q) p q, (p q) p q.

8 / 17
Proposition 3.21
The propositional formula p q is logically equivalent to p q.

Notation 3.22
The converse of p q is q p.
The contrapositive of p q is q p.

Proposition 3.23
The contrapositive of p q is logically equivalent to q p.

Proposition 3.24
The propositional formula p q is logically equivalent to
(p q) (q p).

Corollary 3.25
Every propositional formula is logically equivalent to comprising of
propositional variables decorated by and .

9 / 17
Definition 3.26
An argument is a finite sequence of propositions written in the form
P1

Pn
Q.
The propositions P1 , . . . , Pn are called the hypotheses and Q the
conclusion. The argument is said to be valid if P1 Pn Q.

Example 3.27 (Proof by contradiction)


The following is a valid argument:
pF
p

10 / 17
Example 3.28 (Proof by cases)
The following is a valid argument:
pq
pr
qr
r

Example 3.29 (Transitivity)


The following is a valid argument:
pq
qr
pr

11 / 17
3.2 Proofs

The idea here is to understand what a proof looks like. We will do this by
exhibiting all sorts of different methods of proving a mathematical result.
A couple of things to keep in mind:
The set of examples we do here by no means exhaust all possible
proof structures. See Proofs from the Book or the proofs of Godels
incompleteness theorems.
Clarity is paramount! Almost insult the readers intelligence for the
sake of comprehensibility.
A proof should flow seamlessly. It should be highlighted whenever a
hypothesis or a previous result is used.

12 / 17
Example 3.30
On the document camera we proved
1 1 1
< .
1000 1001 10002
The proof, however, did only relied on the fact that 1000 and 1001 are
positive. One may therefore generalise it to the following statement: for
all n Z+ ,
1 1 1
< 2.
n n+1 n

Example 3.31

Similarly the proof that 8! < 9! is true only relied on positivity of 8
8 9

and 9. We may again generalise: for all n Z+ ,



n! < n+1 (n + 1)!.
n

Notation 3.32
We will use the symbol as shorthand for for all. This is called a
universal quantifier. 13 / 17
We have gone through some different proofs trying to exhibit different
methods:
some were straight forward algebraic manipulations,
others were universal statements about a specific set i.e. those with
,
and some involved some case-by-case analysis of the statements.
We then had statements that looked like If ... then ...,,
and some with ... if and only if ....

Notation 3.33
The converse of an If A then B statement is If B then A. These are,
weve seen before are not logically equivalent. Say If n is divisible by 4
then it is divisible by 2 is not equivalent to its converse.

14 / 17
Notation 3.34
We will use the symbol as shorthand for for all. This is called a
existential quantifier.
When proving a There exists .... statement it suffices to exhibit an
object that satisfies the statement in question. This is called a
constructive proof.
It is sometimes easier to show an object exists without explicitly
constructing it.

Remark 3.35
There has been debate in philosophy of mathematics circles about
whether or not non-constructive proofs should be allowed into
mathematics. There is in some well-respected mathematicians who feel
strongly about constructivism and have been trying to translate a lot of
the well known proofs using only constructive methods. Apparently, the
mean value theorem in analysis is a bit of a stumbling block.

15 / 17
Definition 3.36
A predicate is a statement that contains one or more free variables that
becomes a proposition when each free variable is assigned a definite value.

Example 3.37
The statement n is a prime number is a predicate evaluated in the
natural numbers.
One way of turning predicates into propositions by using quantifiers
(universal or existential).

Example 3.38
We can turn the predicate in Example 3.37 into a proposition by adding a
quantifier like n Z+ , n is prime.
Some mathematical statements involve more than one quantifier.

Example 3.39
A function f R R is said to be continuous at x0 R if

 > 0 > 0 such that x x0 < f (x) f (x0 ) < .

16 / 17
The order of the quantifiers is crucial!
Example 3.40
These following are not logically equivalent

x R y R such that x < y .

and
x R y R such that x < y .

Proposition 3.41
Given a predicate P(x).
(x P(x)) x(P(x)).
(x P(x)) x (P(x)).

Example 3.42
The negation of continuity, that is the statement: A function f R R is
not continuous at x0 R if

 > 0 > 0 such that x x0 < and f (x) f (x0 ) .


17 / 17

Das könnte Ihnen auch gefallen