[Math] Continuous extension / Closed set in $\mathbb{R}$

real-analysis

I have two questions.

First: Let $E$ be a unbounded closed set in $\mathbb{R}$ and $a\in E$. Suppose $\inf \{x\in E : a<x\} = a$. Here, i think it must be true that "$\exists \epsilon>0$ such that $(a,a+\epsilon) \subset E$". How do i prove this?

Secondly,

PMA, Rudin p.99 states;

It can be proven that "If $E$ is a closed set in $\mathbb{R}$ and $f:E\rightarrow X$ is a continuous function from $E$ to a metric space $X$, then $\exists$ continuous extensions $g:\mathbb{R} \rightarrow X$ such that $\forall x\in E, f(x)=g(x)$. However proof is not simple".

How exactly not simple?
Is this almost impossible to prove this with only basic concept of topology?
I googled it, but it seems like the theorem above is not even generally called 'continuous extension' since the proof for continuous extension on wikiproof shows that "There exists an extension of $f:E\rightarrow \mathbb{R}$ where $E\subset X$, a metric space".
Anyway, how do i prove that with relatively easy concepts?

Best Answer

Take $E = X = \{0,1\}$, and $f(x) = x$. Then there is no continuous extension $g\colon \mathbb{R} \to X$ because $\mathbb{R}$ is connected while $X$ isn't.

Related Question