Under the assumptions of Lemma 1.3, has a finite number of connected components, each of which satisfies the same assumptions as itself. Thus, with no loss of generality, we will assume that is connected.

If and are -manifolds of class with and and are diffeomorphic, they are also diffeomorphic ([10, Theorem , page 57]). Thus, since is of class with it suffices to find a bounded open subset of such that is and diffeomorphic to

In a first step, we find a function such that and on while in , in and This can be done in various ways and even when However, since the most convenient argument is to rely on the fact that the signed distance function

is in , where , and

is an open neighborhood of in This is shown in Gilbarg and Trudinger [11, page 355] and also in Krantz and Parks [12]. Both proofs reveal that when that is, when (Without further assumptions, the regularity of breaks down when )

Let be nondecreasing and such that if and if where is given. Then, is in vanishes only on , and on Furthermore, since on a neighborhood of in and on a neighborhood of in , remains after being extended to by setting if and if

This satisfies all the required conditions except Since for large enough, this can be achieved by replacing by Since off it follows from a classical theorem of Whitney [13, Theorem III] (with in that theorem) that there is a function on of class in such that, if then if and if

Evidently, does not vanish on and has the same sign as off , that is, in and in Furthermore, for every so that for for some Upon shrinking we may assume that Also, For convenience, we summarize the relevant properties of below:

(i) is on and off ,

(ii) for ,

(iii),

(iv),

(v)

Choose It follows from (v) that is compact and, from (iii) and (iv), that if is small enough (argue by contradiction). Since by (iii) and (iv) and since this implies Thus, by (i) and (ii), is a submanifold of and the boundary of the open set In fact, is a -manifold of class since, once again by (ii), lies on one side of its boundary.

We now proceed to show that is diffeomorphic to This will be done by a variant of the procedure used to prove that nearby noncritical level sets on compact manifolds are diffeomorphic. However, since we are dealing with sublevel sets and since critical points will abound, the details are significantly different.

Let be such that and on Since on by (ii), the function extended by outside is a bounded vector field on Since the function defined by

is well defined and of class and is an orientation-preserving diffeomorphism of for every We claim that produces the desired diffeomorphism from to

It follows at once from (3.3) that so that is decreasing along the flow lines and hence that maps into itself for every Also, if then for every so that by (iii). If now then and is strictly decreasing for small enough. It follows that that is, for Altogether, this yields

Suppose now that Then, and hence For small enough, and so for small enough. In fact, it is obvious that until is large enough that But since and is decreasing along the flow lines, implies Since this means that for some Call the first (and, in fact, only, but this is unimportant) time when From the above, for and hence for since Then, for so that for In particular, since and hence it follows that In other words, Thus, that is, If (so that and hence ), this yields On the other hand, if then Since , is strictly decreasing for near and so whence

The above shows that maps into , into , and into That it actually maps *onto* follows from a Brouwer's degree argument: is connected and no point of is in since, as just noted, Thus, for is defined and independent of Now, choose so that Then, for every and so Since is one to one and orientation-preserving, it follows that and so for every Thus, there is such that which proves the claimed surjectivity.

At this stage, we have shown that is a diffeomorphism of mapping into , into , and into and onto It is straightforward to check that such a diffeomorphism also maps onto (approximate by a sequence from ) and hence it is a boundary-preserving diffeomorphism of onto This completes the proof of Lemma 1.3.

Remark 3.1.

The diffeomorphism above is induced by a diffeomorphism of but this does not mean that the same thing is true of the diffeomorphism of Lemma 1.3.