**Imprecise Question**: Suppose I have a function defined on non-codimension-zero strata of a smooth manifold with a stratification, and I know the function is smooth when restricted to each of these strata. Is there any setting in which the function extends smoothly to the whole smooth manifold?


Here is the baby case in which I am interested (where corners also come into play).


Fix $n \geq 0$ and let $\mathbb{R}\_{\geq 0}^n$ denote standard Euclidean octant -- vectors whose coordinates are non-negative.


For any subset $P \subset \{1,\ldots,n\}$, we let $C\_P \subset \mathbb{R}\_{\geq 0}^n $ denote the locus of points whose $i$th coordinate vanishes for all $i \in P$. Note we know abstractly what it means for a function $f\_P : C\_P \to \mathbb{R}$ to be smooth, treating each $C\_P$ as a smooth manifold with corners in the standard way.


Suppose that for every non-empty $P$, we are given a smooth function $f\_P$, and we also know that $f\_P|\_{C\_Q} = f\_{P \cup Q}$ for all pairs $P,Q$ with $P \cap Q \neq \emptyset$.


**Precise Question:** Then is there a globally defined function $f = f\_{\emptyset}: \mathbb{R}\_{\geq 0}^n \to \mathbb{R}$ which is smooth, and for which $f|\_{C\_P} = f\_P$?


A colleague remarked this is a consequence of Whitney's Extension Theorem, but I was not able to see why even after looking up the theorem.



Smooth extension of piecewise smooth function on a corner
You have a function defined on the boundary of $\mathbb R^n\_{\ge 0}$. Its restriction to each face is smooth. You can extend it to all of $\mathbb R^n\_{\ge 0}$ by writing
$$
f(x)=\sum\_P (-1)^{|P|-1}f\_P(x\_P),
$$
where $x\mapsto x\_P$ is the projection $\mathbb R^n\_{\ge 0}\to C\_P$.


