[proofplan]
We construct the boundary-straightening diffeomorphism $\Phi$ in two stages. First, the [Local Graph Representation Theorem](/theorems/6) provides rotated coordinates in which $\partial U$ is the graph of a $C^k$ function $\gamma$. Second, we define $\Phi$ by subtracting $\gamma$ from the $n$-th coordinate, which flattens the boundary to $\{y_n = 0\}$ and maps the interior to $\{y_n > 0\}$. We then verify explicitly that $\Phi$ is a $C^k$ diffeomorphism by computing its inverse and checking regularity.
[/proofplan]
[step:Obtain the local graph representation of $\partial U$ near $z$]
By the [Local Graph Representation Theorem](/theorems/6), there exist a radius $r > 0$, a rotation matrix $R \in O(n)$, and a $C^k$ function
\begin{align*}
\gamma: \mathbb{R}^{n-1} &\to \mathbb{R} \\
(\tilde{x}_1, \ldots, \tilde{x}_{n-1}) &\mapsto \gamma(\tilde{x}_1, \ldots, \tilde{x}_{n-1})
\end{align*}
such that in the rotated coordinates $\tilde{x} := R(x - z) \in \mathbb{R}^n$, the [boundary](/page/Boundary) and interior of $U$ within the ball $V := B(z, r)$ are characterised by:
\begin{align*}
x \in \partial U \cap V &\iff \tilde{x}_n = \gamma(\tilde{x}_1, \ldots, \tilde{x}_{n-1}), \\
x \in U \cap V &\iff \tilde{x}_n > \gamma(\tilde{x}_1, \ldots, \tilde{x}_{n-1}).
\end{align*}
Here $\tilde{x}' := (\tilde{x}_1, \ldots, \tilde{x}_{n-1})$ denotes the first $n-1$ rotated coordinates.
[/step]
[step:Define the flattening map $\Phi$ by subtracting the graph function]
Define the map
\begin{align*}
\Phi: V &\to \mathbb{R}^n \\
x &\mapsto y = (y_1, \ldots, y_n)
\end{align*}
by setting $\tilde{x} := R(x - z)$ and
\begin{align*}
y_i &:= \tilde{x}_i \quad \text{for } i = 1, \ldots, n-1, \\
y_n &:= \tilde{x}_n - \gamma(\tilde{x}_1, \ldots, \tilde{x}_{n-1}).
\end{align*}
The map $\Phi$ is the composition of the rigid motion $x \mapsto R(x - z)$ (which is $C^\infty$) with the shear $({\tilde{x}_1, \ldots, \tilde{x}_n}) \mapsto (\tilde{x}_1, \ldots, \tilde{x}_{n-1}, \tilde{x}_n - \gamma(\tilde{x}'))$ (which is $C^k$ since $\gamma$ is $C^k$). Therefore $\Phi$ is $C^k$.
[guided]
The idea behind the construction is geometrically simple: the boundary $\partial U \cap V$ is the graph $\tilde{x}_n = \gamma(\tilde{x}')$ in rotated coordinates, and we want to flatten it to the hyperplane $\{y_n = 0\}$. The natural choice is to subtract the graph height: define $y_n = \tilde{x}_n - \gamma(\tilde{x}')$, which sends points on the boundary (where $\tilde{x}_n = \gamma(\tilde{x}')$) to $y_n = 0$, and points in the interior (where $\tilde{x}_n > \gamma(\tilde{x}')$) to $y_n > 0$.
The first $n-1$ coordinates are left unchanged: $y_i = \tilde{x}_i$ for $i = 1, \ldots, n-1$. This makes the map a "vertical shear" that only adjusts the height coordinate.
Explicitly, $\Phi = S \circ L$ where the rigid motion
\begin{align*}
L: V &\to \mathbb{R}^n, \quad x \mapsto R(x - z)
\end{align*}
is $C^\infty$ (linear plus translation), and the shear
\begin{align*}
S: \mathbb{R}^n &\to \mathbb{R}^n, \quad (\tilde{x}_1, \ldots, \tilde{x}_n) \mapsto (\tilde{x}_1, \ldots, \tilde{x}_{n-1}, \tilde{x}_n - \gamma(\tilde{x}'))
\end{align*}
is $C^k$ because each component is either the identity or involves the $C^k$ function $\gamma$. As a composition of $C^\infty$ and $C^k$ maps, $\Phi$ is $C^k$.
[/guided]
[/step]
[step:Verify that $\Phi$ maps boundary to $\{y_n = 0\}$ and interior to $\{y_n > 0\}$]
Let $W := \Phi(V)$, which is an [open set](/page/Open%20Set) in $\mathbb{R}^n$ (shown below once we establish $\Phi$ is a diffeomorphism).
**Boundary:** If $x \in \partial U \cap V$, then $\tilde{x}_n = \gamma(\tilde{x}')$ by the graph representation. Therefore
\begin{align*}
y_n = \tilde{x}_n - \gamma(\tilde{x}') = 0.
\end{align*}
Hence $\Phi(\partial U \cap V) \subset \{y \in W : y_n = 0\}$.
**Interior:** If $x \in U \cap V$, then $\tilde{x}_n > \gamma(\tilde{x}')$, so
\begin{align*}
y_n = \tilde{x}_n - \gamma(\tilde{x}') > 0.
\end{align*}
Hence $\Phi(U \cap V) \subset \{y \in W : y_n > 0\}$.
The reverse inclusions follow from the bijectivity of $\Phi$ (established in the next step), which gives equality: $\Phi(\partial U \cap V) = \{y \in W : y_n = 0\}$ and $\Phi(U \cap V) = \{y \in W : y_n > 0\}$.
[/step]
[step:Construct the inverse $\Phi^{-1}$ and verify it is $C^k$]
Given $y = (y_1, \ldots, y_n) \in W$, we recover the rotated coordinates $\tilde{x}$ by inverting the defining relations:
\begin{align*}
\tilde{x}_i &= y_i \quad \text{for } i = 1, \ldots, n-1, \\
\tilde{x}_n &= y_n + \gamma(y_1, \ldots, y_{n-1}).
\end{align*}
Then $x = R^\top \tilde{x} + z$ (since $R \in O(n)$ implies $R^{-1} = R^\top$), giving the explicit formula
\begin{align*}
\Phi^{-1}(y) = z + R^\top \bigl(y_1, \ldots, y_{n-1}, \, y_n + \gamma(y_1, \ldots, y_{n-1})\bigr)^\top.
\end{align*}
Each component of $\Phi^{-1}$ is a $C^k$ function of $y$: the map $y \mapsto (y_1, \ldots, y_{n-1}, y_n + \gamma(y'))$ is $C^k$ because $\gamma$ is $C^k$, and $R^\top$ is a constant linear map. Therefore $\Phi^{-1}$ is $C^k$, and $\Phi: V \to W$ is a $C^k$ [diffeomorphism](/page/Implicit%20Function%20Theorem).
[guided]
To verify bijectivity, we must show that the system defining $\Phi$ can be uniquely inverted. The first $n-1$ equations $y_i = \tilde{x}_i$ immediately give $\tilde{x}_i = y_i$. The $n$-th equation $y_n = \tilde{x}_n - \gamma(\tilde{x}')$ gives $\tilde{x}_n = y_n + \gamma(y_1, \ldots, y_{n-1})$, since $\tilde{x}' = y' := (y_1, \ldots, y_{n-1})$ is already determined. This shows the map $y \mapsto \tilde{x}$ is uniquely defined and explicit.
To recover $x$ from $\tilde{x}$: the rotation $\tilde{x} = R(x - z)$ inverts to $x = R^\top \tilde{x} + z$ (using $R^\top R = I$ since $R \in O(n)$). Combining:
\begin{align*}
\Phi^{-1}(y) = z + R^\top \bigl(y_1, \ldots, y_{n-1}, \, y_n + \gamma(y_1, \ldots, y_{n-1})\bigr)^\top.
\end{align*}
For regularity: the function $y \mapsto y_n + \gamma(y')$ is $C^k$ because $\gamma \in C^k$ and addition is smooth. The remaining components are either the identity or application of the constant matrix $R^\top$ and translation by $z$, all of which are $C^\infty$. Therefore $\Phi^{-1}$ is $C^k$.
Since both $\Phi$ and $\Phi^{-1}$ are $C^k$, the map $\Phi: V \to W$ is a $C^k$ diffeomorphism satisfying $\Phi(U \cap V) = \{y \in W : y_n > 0\}$ and $\Phi(\partial U \cap V) = \{y \in W : y_n = 0\}$, as claimed.
[/guided]
[/step]