# continuation of monotone function in $R^n$

Let $f(x_1,...,x_n)$ be $C^0$ continuous function $R^n\to R$ defined on a compact domain $A\subset R^n$. Let $f$ be monotonously increasing w.r.t every argument in the domain of definition. I'm looking for a method to continue $f$ to the whole $R^n$ as $C^0$ continuous function monotone w.r.t every argument.

Particularly, I have a computational problem with the values of a function $f(x,y)$ sampled on 2D grid. The function is given in a compact domain of a grid and it is monotonous w.r.t. $x$ and $y$ in the domain. It should be continued to the whole grid, in any way, with the only requirement of being continuous and monotone w.r.t. every argument.

In a special case, when the domain is a square, I can construct an explicit formula for such continuation. So what I miss is a formula or an algorithm to continue the function to the bounding box of the domain, supporting the monotonic property above.

For nice domains, you can define $$f(x_1,\dots,x_n) = \sup_{\substack{(y_1,\dots,y_n)\in A \\ y_1\le x_1,\, \dots, y_n\le x_n}} f(y_1,\dots,y_n).$$ But note that this doesn't always equal $f$ on the domain itself: for example, $any$ continuous function on the unit circle (not disk) in $\Bbb R^2$ vacuously is "increasing w.r.t every argument".
• My domains in $R^2$ are full-dimensional, simply connected, not always convex. Thank you for the formula. I see two possible problems: (1) the selected $y$-set, i.e., intersection of $A$ and a corner with origin in $x$ can be empty for some points in the bounding box; (2) if $\sup$ is reached in an interior point of the $y$-set, the resulting function will be locally constant. I should refine that the functions must be strictly monotonous throughout. – Igor Sep 7 '16 at 17:24
• Fair enough; even full-dimensional sets can be problematic though (for example, a crescent moon with corners at $(0,1)$ and $(1,0)$). – Greg Martin Sep 7 '16 at 18:14