The extension appeared in the previous post and is very simple: given a closed set and a bounded function , we define for all . It is easy to see that as . Indeed, the boundedness of implies that the infimum is actually taken only over the set where . As the distance tends to 0, the set shrinks at the same rate: indeed, is contained in the ball of radius with center . Thus, furnishes a continuous extension of whenever is continuous on .

Now suppose that is Lipschitz on . Will the extension be Lipschitz? Let’s consider a one-dimensional example with , , and on . When , the extension is

When , the infimum is at , hence . When , it shifts to , which yields . Here is the plot:

While the original function had Lipschitz constant 1, the extension has Lipschitz constant 5 (attained to the right of the transition point ). We can make this progressively worse by replacing 5 with larger numbers. So, the Lipschitz constant of the extension does not admit a bound in terms of alone. The oscillation enters the game as well… although it’s not entirely clear that it must. In the example above, there is no apparent reason for to decrease so quickly (or at all) when .

Should the a_{x,M} have M = 1 + sup f – inf f?

You are right. And then M+1 can be replaced by M below. Edited.

Thank. These notes definitely helped me to get better sense of the construction.