A question on continuous extension.

82 Views Asked by At

Suppose $X$ and $Y$ are metric spaces and $A$ is a dense subset of $X$ and assume $Y$ is complete.Suppose $f:A\to Y$ is a continuous function.Then a natural question arises whether this can be extended continuously to $X$.The answer is no.So,I was thinking of a counterexample,one simple example is $f(x)=1/x$ on from $(0,\infty)$ to $\mathbb R$.consider $(0,\infty)$ to be a metric subspace of $[0,\infty)$,the metric being the usual distance $(x,y)\to|x-y|$.Note that $(0,\infty)$ is dense in $[0,\infty)$ and the codomain metric space $\mathbb R$ is complete.The function $f$ cannot be continuously extended to a function $g :[0,\infty)\to \mathbb R$.I was trying to find an example when $A=\mathbb Q$ and $Y=\mathbb R$ and $X=\mathbb R$.Can someone help me to find one example.I was trying to do something using Thomae function but it is not working.

1

There are 1 best solutions below

2
On BEST ANSWER

Just take $f(x)=\frac 1 {x-\sqrt 2}$ for $x \in \mathbb Q$.