# Amann/Escher, Analysis I, Exercise I.10.16: nest of intervals

I am doing Exercise I.10.16 from textbook Analysis I by Amann/Escher.

Could you please verify if my attempt contains logical gaps/errors?

My attempt:

Let $$I_n := [a_n, b_n]$$ for all $$n \in \mathbb N$$.

(a)

It follows from $$a_n \le b_n$$ for all $$n \in \mathbb N$$ that $$a_n$$ is a lower bound of $$\{n \in \mathbb N \mid b_n\}$$ and that $$b_n$$ is an upper bound of $$\{n \in \mathbb N \mid a_n\}$$. So $$\sup a_n, \inf b_n$$ exist and $$a_n \le \inf b_n$$, $$\sup a_n \le b_n$$ for all $$n \in \mathbb N$$. On the other hand, $$\inf b_n \le b_n$$, $$a_n \le \sup a_n$$ for all $$n \in \mathbb N$$. As a result, $$\inf b_n, \sup a_n \in [a_n, b_n]$$ and thus $$|\inf b_n - \sup a_n| \le b_n - a_n$$ for all $$n \in \mathbb N$$.

If $$\inf b_n - \sup a_n \neq 0$$ then $$|I_n| =b_n -a_n \ge |\inf b_n - \sup a_n| > 0$$ for all $$n \in \mathbb N$$. This contradicts $$(ii)$$. Thus $$\sup a_n = \inf b_n \in [a_n,b_n]$$.

If $$x \in \cap_n I_n$$ then $$a_n \le x \le b_n$$ for all $$n \in \mathbb N$$. So $$\sup a_n \le x \le \inf b_n$$ and thus $$x = \sup a_n = \inf b_n$$.

(b)

For $$x \in \mathbb R$$, there exist $$m,M \in \mathbb Q$$ such that $$m < x < M$$. Let $$A:= \{p \in \mathbb Q \mid m < p < x\}$$ and $$B:= \{p \in \mathbb Q \mid x < p < M\}$$. Then $$|A| = |B| = \aleph_0$$. Let $$(c_n)_{n \in \mathbb N}$$ and $$(d_n)_{n \in \mathbb N}$$ be enumerations of $$A$$ and $$B$$ respectively.

We define $$(a_n)_{n \in \mathbb N}$$ recursively by $$a_0 = m$$ and $$a_{n+1} = c_{i_0}$$ where $$i_0 := \min \{i \in \mathbb N \mid c_i > a_n\}$$. Similarly, We define $$(b_n)_{n \in \mathbb N}$$ recursively by $$b_0 = M$$ and $$b_{n+1} = d_{i_0}$$ where $$i_0 := \min \{i \in \mathbb N \mid d_i < b_n\}$$.

It is easy to verify that $$(I_n)_{n \in \mathbb N}$$, where $$I_n := [a_n, b_n]$$, is a nest of intervals that satisfies the conditions.

Update: From Asaf Karagila's elegant suggestion here, I present a shorter approach for (b).

For $$x \in \mathbb R$$, there exist $$m,M \in \mathbb Q$$ such that $$m < x < M$$. Let $$(c_n)_{n \in \mathbb N}$$ be an enumerations of $$\mathbb Q$$.

We define $$(a_n)_{n \in \mathbb N}$$ recursively by $$a_0 = m$$ and $$a_{n+1} = c_{i_0}$$ where $$i_0 := \min \{i \in \mathbb N \mid a_n < c_i < x\}$$, and $$(b_n)_{n \in \mathbb N}$$ by $$b_0 = M$$ and $$b_{n+1} = c_{i_0}$$ where $$i_0 := \min \{i \in \mathbb N \mid x < c_i < b_n\}$$.

It is easy to verify that $$(I_n)_{n \in \mathbb N}$$, where $$I_n := [a_n, b_n]$$, is a nest of intervals that satisfies the conditions.