Good afternoon, I'm doing Problem III.2.14 from textbook Analysis I by Amann.
My attempt:
(a)
Let $A \subseteq \mathbb R$ be open w.r.t $d$. For $y \in A$, the open ball $\mathbb B_\delta (y, 1/2) = \{y\} \subseteq A$. As such, $\operatorname{id}[A]= A$ is open w.r.t $\delta$. Hence $\operatorname{id}$ is open.
Let $B \subseteq \mathbb R$ be closed w.r.t $d$. Then $\mathbb R - B$ is open w.r.t $d$. As such, $\operatorname{id}[\mathbb R - B]= \mathbb R - B$ is open w.r.t $\delta$ and thus $\operatorname{id}[B] = B$ is closed w.r.t $\delta$. Hence $\operatorname{id}$ is closed.
For $x \in \mathbb R$ and $U$ is an arbitrary neighborhood of $x$ w.r.t $d$. Then $U -\{x\} \neq \emptyset$. For $x' \in (U -\{x\})$ , we have $d_\delta (x',x) = 1$. As such, $f$ is discontinuous at any $x \in \mathbb R$.
(b)
Let $x \in \mathbb R$ and $U$ be an arbitrary neighborhood of $\operatorname{id}(x)$ w.r.t $d$. We have $\operatorname{id}[\mathbb B_\delta (x, 1/2)] = \operatorname{id}[\{x\}] = \{x\} = \{\operatorname{id}(x)\} \subseteq U$. As such, $\operatorname{id}$ is continuous on $\mathbb R$.
For $x \in \mathbb R$, $\operatorname{id}[\mathbb B_\delta (x, 1/2)] = \operatorname{id}[\{x\}] = \{x\}$. On the other hand, $\mathbb B_\delta (x, 1/2)$ is open w.r.t $\delta$ and $\{x\}$ is not open w.r.t $d$. As such, $\operatorname{id}$ is not open.
For $x \in \mathbb R$, $\mathbb B_\delta (x, 1/2)$ is open w.r.t $\delta$. Then $\mathbb R - \mathbb B_\delta (x, 1/2)$ is closed w.r.t $\delta$. We have $\operatorname{id} [\mathbb R - \mathbb B_\delta (x, 1/2)] = \mathbb R - \operatorname{id} [\mathbb B_\delta (x, 1/2)] = \mathbb R - \{\operatorname{id}(x)\} = \mathbb R - \{x\}$, which is not closed w.r.t $d$. As such, $\operatorname{id}$ is not closed.
My questions:
- Could you please verify if my proof look fine or contains logical gaps/errors? Any suggestion is greatly appreciated.
2.
Lemma: Any one element subset of a metric space is closed.
We have $\mathbb B_\delta (y, 1/2)$ is an open ball w.r.t $\delta$. Moreover, $\mathbb B_\delta (y, 1/2) = \{y\}$, which is closed w.r.t $\delta$ by our Lemma. As such, $\mathbb B_\delta (y, 1/2)$ is both open and closed w.r.t $\delta$.
Could you please confirm if my understanding is correct? Thank you so much!

Yes, it is fine. In order to prove that $\operatorname{id}\colon(\mathbb R,\delta)\longrightarrow(\mathbb R,d)$ is neither open nor closed, I would just say that, for instance, $[0,1)$ is both open and closed in $(\mathbb R,\delta)$, but it is neither open nor closed in $(\mathbb R,d)$.