# Density of a set. Exercise from Spivak.

I'm trying to do a series of exercises from Spivak's Calculus, in chapter 8, Least Upper Bounds.

I'm trying to tackle these two exercises, $5.$ and $^*.6$

From $5.$ I have proven the first claim

$(a)$ Let $x-y>1$. Prove there is an integer $k$ such that $x<k<y$.

P Let $\ell$ be the greatest integer such that $\ell \leq x$. Then

$$y-x >1$$

$$y-\ell >1$$

$$y>1+\ell$$

Thus the integer $\ell +1$ is between $y$ and $x \text{ }\blacktriangle$.

$(b)$ Let $x<y$. Show there is a rational $r$ such that $x<r<y$.

P If $x<y$ then there is $\epsilon>0$ such that $x+\epsilon=y$. Thus $\epsilon=y-x$. But from T3, we have that there is an $n$ such that $1/n < \epsilon$, thus

$$\frac{1}{n} < y-x$$

$$1<ny-nx \text{ }\blacktriangle$$

and from the last theorem we have that there is a integer $k$ such that

$$nx<k<ny$$

$$x< \frac{k}{n}<y \text{ }\blacktriangle$$

$(c)$ Let $r<s$ be rational numbers. Prove there is an irrational number between $r$ and $s$. Hint: it is known there is an irrational number between $0$ and $1$.

P Since $\sqrt 3$ is irrational and $\sqrt{3}<3$, then $\ell = \sqrt{3}/3<1$ and thus it is in $[0,1]$.

Now, $r<s \Rightarrow 0<s-r$. Then

$$0<\ell < 1$$

$$0<\ell(s-r) < s-r$$

$$r<r+\ell(s-r) < s$$

And since $\ell$ is irrational $r+\ell(s-r)$ is irrational. $\blacktriangle$

$(d)$ Show that if $x<y$ then there is an irrational number between $x$ and $y$: There is no need to work here, this is consequence of $(b)$ and $(c)$

This one was quite straightforward, but thanks anyways.

P

$$x<y$$

$$(b)\Rightarrow x<r<y,r<y \Rightarrow r<q<y \Rightarrow x<r<q<y$$

Then by $(c)$, there is an irrational $\ell$ such that

$$x<r<\ell<q<y \text{ } \blacktriangle$$

This will let me conclude

• $\mathbb Q$ is dense on any $[a,b]\subset \Bbb R$

• $\mathbb I$ is dense on any $[a,b] \subset \Bbb R$

and will let me move on into $^*6.$ which is

$(a)$ Show that $f$ is continuous and $f(x)=0$ for all $x$ in a dense set $A$, then $f$ is $f(x)=0$ for all $x$.

$(b)$ Show that $f$ and $g$ are continuous and $f(x)=g(x)$ for all $x$ in a dense set $A$, then $f(x)=g(x)$ for all $x$.

$(c)$ If we suppose $f(x)\geq g(x)$ for all $x$ in $A$, then $f(x)\geq g(x)$ for all $x$. ¿Can $\geq$ be substituted with $>$ everywhere?

I'm not asking for solutions for this last problems (which will be asked separately), but for $(c)$ and $(d)$ in $5.$

The chapter has several important proofs, which might or might not be relevant here, but I think it is important you know what tools we have at hand:

THEOREM 7-1 If $f$ is continuous on $[a,b]$ and $f(a)<0<f(b)$, then there is $x \in [a,b]:f(x)=0$

THEOREM 1 If $f$ is continuous in $a$, then there exists a $\delta>0$ such that $f$ is bounded above in $(a-\delta,a+\delta)$.

THEOREM 7-2 If $f$ is continuous on $[a,b]$ then $f$ is bounded on $[a,b]$.

THEOREM 7-3 If $f$ is continuous on $[a,b]$ then there is an $y$ in $[a,b]$ such that $f(y)\geq f(x)$ for all $x$ in $[a,b]$.

THEOREM 2 $\Bbb N$ is not bounded above.

THEOREM 3 If $\epsilon >0$, there is an $n \in \Bbb N$ such that $1/n < \epsilon$.

-
Theorem 7-3 must actually be "$\,f(y)\geq f(x)$" Besides this, your question is awfully long. Could it be possible to shorten it? Or, perhaps, to subdivided it in several related questions? –  DonAntonio May 24 '12 at 19:53
@DonAntonio Don't get confused by the long exposition. I'm asking for a proof of $(c)$ only. –  Pedro Tamaroff May 24 '12 at 19:53
@PeterTamaroff: You might want to move that to the top and put the background later for people who want to read it. –  Chris Eagle May 24 '12 at 21:17

Your idea on contracting or dilating the interval seems slightly confusing to me. For example, I don't understand what you mean by "if $x\ell > y$, then $x\ell \in [x,y]$". This does not make sense to me because the interval

$$[x,y] \stackrel{\text{def}}{\equiv} \{z \in \Bbb{R} : x \leq z \leq y \}.$$

What I would do is to use Keivan's hint. If you want to produce explicitly such an irrational number between 0 and 1 you can look at $\sqrt{2}/2$. Now why is it that given rationals $a$ and $b$ we have the inequality

$$a < a + (b-a)\frac{\sqrt{2}}{2}<b$$

with $a + (b-a)\frac{\sqrt{2}}{2}$ irrational? In general if you are given real numbers $x$ and $y$ you can invoke the existence of rationals $a,b$ such that

$$x < a < b < y$$

and then apply the earlier inequality to complete the problem.

-
Sorry Ben, I was writing $[x,y]$ when I should've written $[y,x]$. –  Pedro Tamaroff May 24 '12 at 23:53
I'd like to know if my previous idea was wrong. Could you read it now that it is corrected? –  Pedro Tamaroff May 25 '12 at 1:01
@PeterTamaroff Dear Peter, I will be busy for the next $\sim$ 3 hours, but I will read it after that. –  fpqc May 25 '12 at 3:49
Ben, nevermind. My idea was well oriented, but I don't think it is fully right, so I leave the final results. I will try and focus on $^*6.$. Thanks! –  Pedro Tamaroff May 25 '12 at 4:22
@PeterTamaroff I can definitely help you out with 6 if you post a question. –  fpqc May 25 '12 at 4:54
show 1 more comment

FURTHER HINT: The hint only allows you to assume the existence of one irrational number in $(0,1)$; you may not assume anything about where in the interval it lies. In addition to expanding or contracting the unit interval, you’ll want to translate it left or right by some rational amount.

-
Is my idea flawed? –  Pedro Tamaroff May 24 '12 at 22:34
@Peter: What you did originally was flawed, because you assumed that you could find an irrational in $[r/s,1]$, and that wasn’t given. I was suggesting that you multiply $[0,1]$ by $s-r$ to get the interval $[0,s-r]$ and then add $r$ to get $[r,s]$. The irrational $x\in[0,1]$ whose existence you’re given is transformed to $y=(s-r)x+r\in[r,s]$, which must be irrational: if it weren’t, $x=(y-r)/(s-r)$ would be rational, which is false. This is the most straightforward way to use the given irrational to get what you want. –  Brian M. Scott May 25 '12 at 5:12
@Peter: I’d say that it’s mostly a case of just about anything reasonable works the way it ought, provided that you remember that what you’re really doing is operating on each point of the interval. –  Brian M. Scott May 25 '12 at 5:25
I see. Oh, and this question deserves an answer from a professor which might give a more interesting and comprehensive account on Taylor's theory. Good night! –  Pedro Tamaroff May 25 '12 at 5:25

For a proof of part c: Let $a\in [0,1]$ be irrational. Let $b=r+a(s-r)$. First, $b\in(r,s)$, since $b=(1-a)r+as$ (a convex linear combination of two numbers). Second, $b$ is irrational since it is multiplied by a rational number and added to a rational number.

-
For part $(d)$:
$x<y$, then by part $(b)$ there is a rational number $r$ such that $x<r<y$, and using it one more time for $r,y$, there is a rational number $s$ such that $r<s<y$. Altogether it says if $x<y$ then there are rational numbers $r,s$ such that $$x<r<s<y.$$
Now use part $(c)$ to conclude there's an irrational number between $r,s$ and hence between $x,y$.