# How to prove it (version 0.2.alpha :-) - IDA

How to prove it (version 0.2.alpha :-) - IDA

How to prove it (version 0.2.alpha :-) - IDA

### Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

**How** **to** **prove** **it** (**version** **0.2.alpha** :-)

Ulf Nilsson

September 25, 2000

The following are some examples illustrating how **to** **prove** certain typical

problems in discrete mathematics. Note that **it**’s not a complete list and that

there may be typos (please let me know if, or rather when, you find any). It is

recommended that you take a second look at the proofs below when studying

natural deduction in the last part of the course.

1 Sets

In order **to** show that a set is a subset of a set we must show that every

element in is also an element in . That is, if Ü ¾ , then Ü ¾ , for all

elements Ü (in some universe).

To **prove** that is not a subset of **it** is sufficient **to** find one element belonging

**to** , but not . Then we have found a so-called counter example.

Problem 1.1 Prove that Ò .

Solution: For instance, take , and Í . Then

and Ò . Then ¾ but ¾ Ò .

To show that two sets, and , areequal, i.e. we show that and

. For instance

Problem 1.2 Show that for arb**it**rary sets Í.

Solution: Let be arb**it**rary subsets of Í. We first show that ,

and then the converse.

1

For any sets Í:

½ Law of double negation

¾ DeMorgan’s laws

¿

Commutative laws

´ µ ´ µ Associative laws

´ µ ´ µ

´ µ ´ µ ´ µ Distributive laws

´ µ ´ µ ´ µ

½¼ Idempotent laws

½½

½¾ Ident**it**y laws

½¿

Í

½ Í Inverse laws

½

½ Í Í Domination laws

½

½ ´ µ Absorption laws

½

´ µ

Figure 1: Laws of set theory

First assume that Ü ¾ . Then Ü ¾ . Then ne**it**her Ü ¾ nor Ü ¾ .

That is, Ü ¾ and Ü ¾ . Then Ü ¾ and Ü ¾ , and finally Ü ¾ .

Next assume that Ü ¾ . Then Ü ¾ and Ü ¾ . Then Ü ¾ and Ü ¾ .

Then Ü ¾ , and finally Ü ¾ .

It is sometimes easier **to** use Venn diagrams **to** solve this type of problems. Yet

another technique which can be used is that of equivalence preserving rewr**it**ing;

i.e. **to** replace expressions by expressions which are known **to** be equal.

Figure 1 contains a collection of laws which hold for arb**it**rary sets from

some universe Í. Using laws such as these 1 we may do proofs more or less mechanically,

as illustrated below.

Problem 1.3 Show that ´ µ ´´ µ µ .

1 Different books usually list different laws.

2

Solution: We use the laws in Figure 1:

´ µ ´´ µ µ ´ µ ´ ´ µµ Associativ**it**y

´ ´ µµ Distributiv**it**y

Absorption

2 Functions

Problem 2.1 Consider the function Z· Z· defined as 2

Show that is injective.

´Òµ Ò ¡ ´Ò ½µ ¡ ¡ ¾ ¡ ½

Solution: We have **to** show that if Ü Ý then ´Üµ ´Ýµ. (This is equivalent **to**

proving that Ü Ý if ´Üµ ´Ýµ.)

Assume that Ü Ý (where Ü Ý ¾ Z·). Then there are two possibil**it**ies: e**it**her

ÜÝ ½ or Ý Ü ½. We have **to** show that both cases imply that ´Üµ

´Ýµ.

Consider the first case: if ÜÝthen

´Üµ Ü´Ü ½µ ´Ý ·½µÝ´Ý ½µ ½Ü´Ü ½µ ´Ý ·½µ ´Ýµ

Since Ü½ **it** follows that ´Üµ ´Ýµ.

The second case is analoguous.

Remark: **How** do we **prove** that a function, e.g. the fac**to**rial function 3 N

N, is not injective? In this case **it** is sufficient **to** find Ü Ý ¾ N such that Ü Ý,

and ´Üµ ´Ýµ. This is easy in our particular case, since ´¼µ ´½µ ½.

Problem 2.2 Show that if and are surjective, then ´ Æ µ

must be surjective.

2 This is the fac**to**rial function, restricted **to** the pos**it**ive integers.

3 The fac**to**rial function N N can be defined inductively/recursively as follows

´¼µ ½

´Òµ Ò ¡ ´Ò ½µ ´Ò ¼µ

3

Solution: Assume that and are surjective. Remember that

´ Æ µ is a function from **to** defined as ´ Æ µ´Üµ ´ ´Üµµ. We must

show that every element in is the image of some element in . Hence, take

an arb**it**rary element Þ ¾ . Since is surjective, there must be some element,

say Ý ¾ , such that Þ ´Ýµ. Moreover since is also surjective there must be

some element, say Ü ¾ , such that Ý ´Üµ. That is, Þ ´ ´Üµµ ´ Æ µ´Üµ.

Hence, for any element Þ ¾ there exists at least one element Ü ¾ such that

Þ ´ Æ µ´Üµ, which means that ´ Æ µ is surjective.

3 Relations

Problem 3.1 Assume that ´ µ is a poset (partially ordered set). Let Ú be a

relation on ¢ defined as follows

Show that ´ ¢ Úµ is a poset.

´Ü ½ Ü ¾ µ Ú ´Ý ½ Ý ¾ µ iff Ü ½ Ý ½ and Ü ¾ Ý ¾

Solution: To **prove** this you have **to** show that Ú is reflexive, trans**it**ive and

antisymmetric. (Before reading on, make sure that you understand what these

properties mean.)

Take an arb**it**rary ´Ü ½ Ü ¾ µ ¾ ¢ . Since Ü ½ ¾ and since is reflexive, **it**

follows that Ü ½ Ü ½ . For the same reason, Ü ¾ Ü ¾ . Since both Ü ½ Ü ½ and

Ü ¾ Ü ¾ **it** must follow that ´Ü ½ Ü ¾ µ Ú ´Ü ½ Ü ¾ µ. That is, Ú is reflexive.

Next assume that ´Ü ½ Ü ¾ µ Ú ´Ý ½ Ý ¾ µ and that ´Ý ½ Ý ¾ µ Ú ´Þ ½ Þ ¾ µ. Then Ü ½ Ý ½

Þ ½ and Ü ¾ Ý ¾ Þ ¾ . Since is trans**it**ive, **it** follows that Ü ½ Þ ½ and Ü ¾ Þ ¾ .

It must follow that ´Ü ½ Ü ¾ µ Ú ´Þ ½ Þ ¾ µ. That is, Ú is also trans**it**ive.

Finally assume that ´Ü ½ Ü ¾ µ Ú ´Ý ½ Ý ¾ µ and that ´Ý ½ Ý ¾ µ Ú ´Ü ½ Ü ¾ µ. Then Ü ½

Ý ½ Ü ½ and Ü ¾ Ý ¾ Ü ¾ . Since is antisymmetric, **it** follows that Ü ½ Ý ½

and Ü ¾ Ý ¾ . In that case ´Ü ½ Ü ¾ µ´Ý ½ Ý ¾ µ. (Here you must understand what

**it** means for two tuples **to** be equal.) That is, Ú is antisymmetric.

4 Inductive defin**it**ions and proofs

The Fibonacci numbers is an infin**it**e sequence ¼ ½ ¾ of natural numbers

such that each number is the sum of the two preceeding numbers in the

sequence (the first two numbers are ¼ and ½). We often describe the Fibonacci

4

numbers by the following inductive/recursive defin**it**ion.

¼ ¼

½ ½

½ · ¾ ´Ò ¾µ

That is ¾ ½ ¿ ¾ ¿ Inductive defin**it**ion often

lead **to** inductive proofs.

Problem 4.1 Show that

for every Ò ¼.

Ò

¼

Ò·¾ ½

Solution: We have **to** show that the equal**it**y holds for Ò ¼ ½ ¾. That is,

an infin**it**e number of cases. We **prove** this using an inductive proof: We first

show that the equal**it**y holds for the extremal case, Ò ¼. Secondly we show

that if the equal**it**y holds for the case Ò ¼, then **it** must hold also for the case

Ò ·½. Hence, if the equal**it**y holds for Ò ¼, then **it** must hold also for Ò ½,

in which case **it** must hold for Ò ¾, in which case **it** must hold for Ò ¿, etc.

We first **prove** the so-called base case, Ò ¼. For Ò ¼we have

¼

¼

¼ ¼½ ½ ¾

Ò

Next we show the inductive case, that is we assume that

We then want **to** show that

¼

Ò·¾ ½ ´Ò ¼µ

Ò·½

¼

´Ò·½µ·¾ ½

We show this by a sequence of equal**it**ies. First

Ò

Ò·½

¼

Ò

¼

· Ò·½

According **to** our in**it**ial assumption (the so-called induction hypothesis)

¼

· Ò·½ ´ Ò·¾ ½µ · Ò·½

5

½

The next step is trivial

´ Ò·¾ ½µ · Ò·½ ´ Ò·¾ · Ò·½ µ ½

Finally using the defin**it**ion of the Fibonacci numbers

The proof is now complete.

´ Ò·¾ · Ò·½ µ ½ Ò·¿ ½´Ò·½µ·¾ ½

Problem 4.2 Show that if is a fin**it**e set, then ¾ ¾ .

Solution: We **prove** the equal**it**y using an inductive argument. That is, we first

**prove** that the equal**it**y holds for all sets of size ¼ and then we **prove** that if the

equal**it**y holds for all sets of size Ò ¼ then **it** must hold for all sets of size Ò·½.

We begin w**it**h all sets of size 0; there is only one set such that ¼; namely

. We know that

¾ ½¾ ¼ ¾

Hence the equal**it**y holds for all sets of size 0.

Now assume that Ò is an arb**it**rary set of size Ò ¼ and that ¾ Ò ¾ Ò

¾ Ò . Moreover assume that Ò·½ is Ò extended w**it**h one arb**it**rary new element,

that is Ò·½ Ò ·½Ò ·½. We now want **to** **prove** that ¾ Ò·½

¾ Ò·½ .

**How** many subsets does Ò·½ have? Well, every subset of Ò is also a subset

of Ò·½ . But since Ò·½ contains one new element (say Ü) in add**it**ion **to** those

in Ò every subset (say ) in Ò gives rise **to** two subsets in Ò·½ (namely

and Ü). That is Ò·½ contains twice as many subsets as Ò . That is,

which completes the proof.

¾ Ò·½ ¾¡¾ Ò ¾´¾ Ò µ¾ Ò·½ ¾ Ò·½

5 Boolean algebra

A Boolean algebra is a structure ´¡ · ¼ ¼ ½µ where

¯ is a set w**it**h at least two elements ¼ ½,

¯ ¡ ¢ ,

6

¯ · ¢ ,

¯ ¼ ,

satisfying the following ten laws for all Ü Ý Þ ¾ :

Ü ·¼ Ü

Ü ¡ ½ Ü

Ü · Ü ¼ ½

Ü ¡ Ü ¼ ¼

´Ü · Ýµ ·Þ Ü ·´Ý · Þµ

´Ü ¡ Ýµ ¡ Þ Ü ¡ ´Ý ¡ Þµ

Ü · Ý Ý · Ü

Ü ¡ Ý Ý ¡ Ü

Ü ·´Ý ¡ Þµ ´Ü · Ýµ ¡ ´Ü · Þµ

Ü ¡ ´Ý · Þµ ´Ü ¡ Ýµ ·´Ü ¡ Þµ

Ident**it**y laws

Domination laws

Associative laws

Commutative laws

Distributive laws

Problem 5.1 Show that Ü ¡ ¼¼for any Ü ¾ .

Solution: In case of the binary Boolean algebra we can **prove** this using e.g.

truth tables because ¼ ½ and we can simply investigate all possibil**it**ies;

however, in the general case we cannot because all we know is that ¼ ½ ¾ ,

but may contain also other elements (**it** may even be infin**it**e).

**How**ever, we can always use the laws above which are laws that hold for all

Boolean algebras. (Since they characterize what a Boolean algebra is!) Using

these laws we can replace expressions by equal expressions in the same way as

in “ordinary calculus”, or when using the laws of set theory:

Ü ¡ ¼ Ü ¡ ¼·¼ ident**it**y

´Ü ¡ ¼µ·´Ü ¡ Ü ¼ µ domination

Ü ¡ ´¼ · Ü ¼ µ distributiv**it**y

Ü ¡ ´Ü ¼ ·¼µ commutat**it**iv**it**y

Ü ¡ Ü ¼ ident**it**y

¼ domination

In this case the proof is fairly simple, but **to** **prove** more complex equal**it**ies

(e.g. ´Ü · Ýµ ¼ Ü ¼ Ý ¼ ) is usually qu**it**e complicated, having only the ten laws

above at our disposal. On the other hand, once we have **prove**n a new law that

law can be used as a derived law, **to** shortcut proofs; if we have a sufficient number

of such derived laws, proofs become much easier. This is why many text

books list many more laws than the ten laws above when introducing Boolean

algebras. **How**ever, all of these extra laws can be **prove**n using only the prim**it**ive

ones.

7