Continuous function from Sorgenfrey line to real line. Let $\mathbb R_l$ be the Sorgenfrey line,$\mathbb R$ be the real line.
Describe a continuous function $f:\mathbb R_l\to \mathbb R$ such that $f:\mathbb{R\to R}$ is not continuous.
Does the function $f(x)=0$ if $x<0$ and $f(x)=1 $ if $x\geq 0$ work?
What about $f(x)=\ln|x|,x\neq 0$ and $f(0)=0$?
 A: You can prove with no difficult that $[1,2)$ is a clopen set in Sorgenfrey line. Therefore $f:\mathbb{R}_{l}\to\mathbb{R}$ given by
\begin{equation}
f(x)=\left\{
\begin{array}{ccc}
1 & \text{if} & x\in [1,2)\\ 
0 & \text{if} & x\in\mathbb{R}\setminus[1,2)
\end{array}
\right.
\end{equation}
is continuous (see here for reference). Clearly $f$ is not continuous when it is taked as $f:\mathbb{R}\to\mathbb{R}$. Can you prove it? Hint: use limit characterization of continuity.
Edit: note that your example, $f(x)=0$ if $x<0$ and $f(x)=1$ if $x\geq 0$ also works and is the same proof that have my answer. Your function is only the characteristic function of $[0,\infty)$, a clopen set in Sorgenfrey line.
A: *

*Does the function $f(x)=0$ if $x<0$ and $f(x)=1$ if $x\ge0$ work?

Yes, it does. For me the easiest way to see it is continuous from $\mathbb R_l$ to $\mathbb R$ is to use the characterization of continuity "the preimage of every closed set is closed". Note that $f^{-1}(0)=(-\infty,0)$, and $f^{-1}(1)=[0,\infty)$,
and both $(-\infty,0)$ and $[0,\infty)$ are closed in $\mathbb R_l$. (Assuming basic open sets are half-open intervals of the form $[a,b).$)


*What about $f(x)=\ln|x|,x\not=0$ and $f(0)=0$?

No, this one is not continuous, whether you think of is as a function from $\mathbb R_l$ or from $\mathbb R$ into $\mathbb R$. Note that $\frac1n\to0$ (both in $\mathbb R_l$ and in $\mathbb R$) but $f(\frac1n)\to-\infty$.


*Combining ideas from 2 and 1 above,
let $f(x)=\ln(-x),x<0$ and $f(x)=0, x\ge0$ (or, if you prefer, $f(x)=x, x\ge0$).

Then $f:\mathbb R\to\mathbb R$ is not continuous since
$f(\frac{-1}n)\to-\infty$. But $f:\mathbb R_l\to\mathbb R$ is continuous. You could use that the restriction of $f$ to each of $(-\infty,0)$ and $[0,\infty)$ is continuous, and each of $(-\infty,0)$ and $[0,\infty)$ is a clopen (=closed-and-open) set. (Formally you could also involve the pasting lemma in the last step.)
