I took a break, and then thought everything over. This is what I got:

let x be a boundary point of U, i.e. in every neighborhood of x in N is a point of U and a point of N\U.

I want to show the following:(*)

You can choose a neighborhood of A of x in N so that there is not point of in A.

If I have shown this, the defined map B is the identity on A and therefore smooth in x.

Proof of(*):

.... that was wrong ....

engmaths