# Generalization of properties of subgradient for convex function defined on arbitrary open convex subsets

In Bertsekas, Convex Optimization Algorithms The following Proposition is proved.

Let $$\Phi: \mathbb{R}^{n} \to \mathbb{R}$$ be a convex function. For every $$x \in \mathbb{R}^{n}$$, we have

(a) The subgradient $$\partial \Phi(x)$$ is a nonempty, convex and compact set, and we have $$\begin{equation} \label{eq-quotient} \Phi'(x;d):= \lim \limits_{\alpha \to 0} \dfrac{\Phi(x+\alpha d)-\Phi(x)}{\alpha} =\max_{g \in \partial f(x)} g^{\intercal} d \quad \forall \ d \in \mathbb{R^{n}} \end{equation}$$ (b) If $$\Phi$$ is differentiable at $$x$$ with gradient $$\nabla \Phi(x)$$, then $$\nabla \Phi(x)$$ is its unique subgradient at $$x$$, and we have $$\Phi'(x;d)= \nabla \Phi(x)^{\intercal}$$

What I want to show: I want to generalize the nonemptyness, closedness and compactness of the subgradient to convex functions, defined on arbitrary open convex subsets of $$\mathbb{R}^{n}$$. My Proof goes as follows: Let $$\Phi : X \to \mathbb{R}^{n}$$ be a convex function with $$X \subseteq \mathbb{R}^{n}$$ a convex open set.

We can (I think) extend $$\Phi$$ to a convex function $$\Phi _{\text{ext}}: \mathbb{R}^{n} \to \mathbb{R}$$ by defining

$$\begin{equation} \Phi_{\text{ext}}(x)=\Phi(x) \text{ if } x \in X \text{ and } \Phi_{\text{ext}}(x)= \infty \text{ if } x \notin X \end{equation}$$ . By the proposition stated above, we know that for $$p \in X$$, $$\partial \Phi_{\text{ext}}(p)$$ is non-empty, closed and compact. We also know that $$\partial \Phi_{\text{ext}}(p)= \partial \Phi(p)$$ holds, since $$\begin{gather} \partial \Phi_{\text{ext}}(p)=\{ y \in \mathbb{R}^{n} \ | \ \langle y, q-p \rangle \leq \Phi_{\text{ext}}(q) – \Phi_{\text{ext}}(p) \ \forall q \in \mathbb{R}^{n} \} \ = \{ y \in \mathbb{R}^{n} \ | \ \langle y, q-p \rangle \leq \Phi_{\text{ext}}(q) – \Phi(p) \ \forall q \in X \} \cap \{ y \in \mathbb{R^{n}} \ | \ \langle y, \rangle \leq \Phi_{\text{ext}}(q) – \Phi(p) \ \forall q \in \mathbb{R}^{n} \setminus X \} \ =\{ y \in \mathbb{R}^{n} \ | \ \langle y, q-p \rangle \leq \Phi_{\text{ext}}(q) – \Phi(p) \ \forall q \in X \} \cap \mathbb{R}^{n} \ =\{ y \in \mathbb{R}^{n} \ | \ \langle y, q-p \rangle \leq \Phi(q) – \Phi(p) \ \forall q \in X \} \ = \partial \Phi(p) \end{gather}$$

In particular, the fact that $$\partial \Phi(p)$$ is non empyt, closed and compact follows from the fact that $$\partial \Phi_{\text{ext}}(p)$$ fulfills the property.

Where my doubt lies: My doubt lies in the notion of $$\infty$$ and the fact that $$\phi_{\text{ext}}$$ is convex on the whole $$\mathbb{R}^{n}$$. To be more specific, it is clear that $$\Phi_{\text{ext}}$$ is convex on $$X$$ since $$\Phi$$ is. But note that,for $$x \in X$$ and $$y \in \mathbb{R}^{n} \setminus X$$ it might happen that $$\alpha x +(1-\alpha)y \notin X$$, $$\alpha \in [0,1]$$ which implies that $$\Phi_{\text{ext}}(\alpha x +(1-\alpha)y )= \infty$$. In particluar, we have

$$\begin{equation} \infty=\Phi_{\text{ext}}(\alpha x +(1-\alpha)y ) , \end{equation}$$

and

$$\begin{equation} \infty=\alpha \Phi_{\text{ext}}(x)+(1-\alpha)\Phi_{\text{ext}}(y). \end{equation}$$

Hence, in order for $$\Phi_{\text{ext}}$$ to be convex, it must satisfy $$\infty \leq \infty$$, which is not well defined.

Question: How can we make the above argument more regorous? I was thinking about taking an upper bound on the value of $$\Phi$$ instead of $$\infty$$ and repeat the argument, but $$\Phi$$ might be unboudnend on $$X$$, since $$X$$ is open. (Note for $$X$$ compact, continuity of $$X$$ would imply a finite upper bound and we would be fine).