Smallest constant of Lipschitz retraction from bounded to continuous functions
Let $B$ be the space of all bounded functions $f:[0,1]\to\mathbb R$ equipped with the supremum norm*. It contains $C$, the space of continuous functions on $[0,1]$, as a subspace. An $L$-Lipschitz retraction $R:B\to C$ is, by definition, a map such that $$R(f)=f \qquad \forall f\in C$$ $$\|R(f)-R(g)\|\le L\|f-g\| \qquad \forall f,g\in B$$
Question: Does there exist a $2$-Lipschitz retraction from $B$ onto $C$?
I expect the answer to be negative, but so far was unable to find a suitable obstruction.
Motivation
It is known that there is a $20$-Lipschitz retraction; such a map (pretty complicated) is constructed in Theorem 1.6 in Geometric Nonlinear Functional Analysis by Benyamini and Lindenstrauss. The constant $20$ could probably be lowered by tweaking their construction, but I am not interested in that right now.
There is no $L$-Lipschitz retraction for $L<2$. (Proof below).
The constant $2$ is known to be smallest possible for Lipschitz retraction from $\ell_\infty$ onto $c_0$ (Example 1.5 in the same book).
Proof of item 2 above. For $n\in \mathbb N$, let $f_n\in C$ be a function such that $f_n(x)=-1$ for $x\le \frac12-\frac1n$, $f_n(x)=1$ for $x\ge \frac12+\frac1n$, and $f_n$ is linear in between. Let $f(x)=\frac12 \operatorname{sign}(x-1/2)$. Note that $\|f-f_n\|\le 1/2$ for all $n$. Here is an illustration: $f$ in red, $f_n$ in blue.
The function $R(f)$ must satisfy $\|R(f)-f_n\|\le L/2$ for all $n$. Therefore, $R(f)(x)\ge 1-L/2$ for $x>1/2$ and $R(f)(x)\le -1+L/2$ for $x<1/2$. Since $R(f)$ is continuous, it follows that $L\ge 2$.
Remark on item 3: a $2$-Lipschitz retraction from $\ell_\infty$ onto $c_0$ is obtained by mapping each $(x_n)\in \ell_\infty$ to $(x_n-\min(|x_n|,s)\operatorname{sign}x_n)$ where $s=\limsup|x_n|$. Since $s$ is a $1$-Lipschitz function on $\ell_\infty$, the resulting map is $2$-Lipschitz.
(*) That is, $\|f\|=\sup_{[0,1]}|f|$. Note that $B$ is different from $L^\infty[0,1]$ because the functions that are equal a.e. are not identified, nor is there any measurability requirement.
It seems that Nigel Kalton gave an answer to your question. He proved in [1], theorem 3.5, that for every compact metric space $K$, $C(K)$ is a $2$-absolute Lipschitz retract.
[1]: Kalton, N. J. Extending Lipschitz maps into C(K)-spaces. Israel J. Math. 162 (2007), 275–315. Link to article
Added by OP: For completeness, I'll outline the steps of Kalton's proof. Given $f\in B$, Let $Lf$ be its lower semicontinuous regularization, defined by $$Lf(x) = \liminf_{y\to x} f(y)$$ Clearly, the map $f\mapsto Lf$ is a $1$-Lipschitz map of $B$ to itself, fixing $C$. Same holds for the upper semicontinuous regularization, denoted $Uf$.
For any $g\in C$ we have $f\ge g-\|f-g\|$. Since the right hand side is continuous, $Lf\ge g-\|f-g\|$. Similarly, $Uf\le g+\|f-g\|$. It follows that $Uf-Lf\le 2\|f-g\|$. Taking the infimum over $g\in C$ yields $$Uf-Lf\le 2\operatorname{dist} (f,C)$$ Hence, the pair of functions $F_u(f) = Uf-\operatorname{dist} (f,C)$ and $F_l(f) = Lf+\operatorname{dist} (f,C)$ satisfies
- $F_u(f)\le F_l(f)$
- $F_u(f)$ upper semicontinuous, $F_l(f)$ lower semicontinuous
- The operators $F_u$ and $F_l$ are $2$-Lipschitz, and restrict to the identity on $C$.
Consider the set of pairs $(h_1,h_2)\in B\times B$ such that $h_1$ is usc, $h_2$ is lsc, and $h_1\le h_2$. The main step of the proof is a $1$-Lipschitz retraction of this set onto its diagonal $\{(h,h) : h\in C\}$. This can be done via an iterative process, since the Lipschitz constant $1$ is preserved under composition. For the purpose of this construction, Kalton replaces a general compact set $K$ with the Cantor set, due to universality of the latter.