2

Let $D\subset\mathbb R^n$ be a convex set and let $f\colon D\to\mathbb{R}$ be a convex function. $f^*$ denotes the Legendre transformation of $f$. If $f$ is doubly differentiable, $f=f^{**}$ (there's a proof on Wikipedia).

Problem: In thermodynamics we deal with functions that are not everywhere differentiable (for example piecewise defined continuous functions) and thus we have to stick to the definition involving the supremum.

Question: How can I prove / where can I find a proof of $f=f^{**}$ for a almost everywhere differentiable $f$?

Filippo
  • 3,536
  • 1
    If you look at theconvex conjugate, which per my understanding is a generalization of Legendre transform, you don't need the differentiability assumption. But it is required that $f$ is a proper, closed, convex function. Look at https://en.wikipedia.org/wiki/Fenchel%E2%80%93Moreau_theorem – iarbel84 Sep 10 '20 at 10:12
  • @iarbel84 Thank you very much, I wasn't expecting any more answers and this is very helpful :) Do you know what $f\equiv\infty$ means? – Filippo Sep 10 '20 at 15:25
  • 1
    I assume it's a constant function defined as $f(x)=\infty,;\forall x$ – iarbel84 Sep 10 '20 at 15:56
  • 1
    It means $f(x)=\infty$ for all $x$. – Stephen Montgomery-Smith Sep 10 '20 at 15:57

1 Answers1

2

First, it is not necessarily true on $\partial D$. Consider $D = [-1,1]$: $$ f(x) = \cases{\frac{x^2}2 & if $|x| < 1$ \\ 5 & if $|x| = 1$ .} $$ Then $$ f^*(p) = \cases{\frac{p^2}2 & if $|p| \le 1$ \\ |p|-\tfrac12 & if $|p| \ge 1$ .}$$ Then it can be seen that $f^{**}(1) = \tfrac12 \ne 5$.

Lemma 1: If $x_0 \in D$, then $f^{**}(x_0) \le f(x_0)$.

Proof: For any $p \in D^*$, and any $x \in D$, we have $f^*(p) \ge x \cdot p - f(x)$. In particular $f^*(p) \ge x_0 \cdot p - f(x_0)$, and so $f(x_0) \ge x_0 \cdot p - f^*(p)$. Taking the supremum over $p \in D^*$, the result follows. $\square$

Lemma 2: If $x_0 \in D^\circ$, then $f^{**}(x_0) \ge f(x_0)$.

Proof: By the Hahn Banach Theorem, there exists a separating hyperplane in $\mathbb R^n \times \mathbb R$ between $C = \{(x,y): x \in D, y \ge f(x)\}$ and $(x_0,f(x_0)$). Choose one such hyperplane.

This hyperplane is of the form $r\cdot (x - x_0) + s(y-f(x_0)) = 0$. See that $s \ne 0$, because both $C \cap \{(x,y) : r \cdot (x-x_0) > 0\}$ and $C \cap \{(x,y) : r \cdot (x-x_0) < 0\}$ are non-empty.

Let $p_0 = -r/s$ be the slope of this hyperplane. Thus the hyperplane is $ y = f(x_0) + (x-x_0) \cdot p_0 $. It may be seen $p_0 \in D^*$, and $f^*(p_0) = x_0 \cdot p_0 - f(x_0)$. Then $f^{**}(x_0) \ge x_0 \cdot p_0 - f^*(p_0) = f(x_0)$. $\square$

Stephen Montgomery-Smith
  • 26,430
  • 2
  • 35
  • 64
  • Thank you very much :) Which Hahn Banach Theorem are you referring to? I've had a look at the Hahn Banach Theorems on Wikipedia (and two papers) and I didn't find exactly what I hoped to find (what you said probably follows directly from one of those theorems and I just didn't get it). – Filippo Sep 09 '20 at 07:32
  • Looking here: https://en.wikipedia.org/wiki/Hahn%E2%80%93Banach_theorem#Geometric_Hahn%E2%80%93Banach_-_Hahn%E2%80%93Banach_separation_theorems at "Theorem[20] — Let X be a real locally convex topological vector space and let A and B be non-empty convex subsets. If Int A ≠ ∅ and B ∩ Int A = ∅ then there exists a continuous linear functional f on X such that sup f(A) ≤ inf f(B)..." – Stephen Montgomery-Smith Sep 09 '20 at 07:46
  • Also look at https://en.wikipedia.org/wiki/Hyperplane_separation_theorem, and use the interior of $C$ instead of $C$. – Stephen Montgomery-Smith Sep 09 '20 at 07:54
  • Thank you :) Assuming $D^={p\in\mathbb{R}^n:\text{sup}\ {\langle x,p\rangle-f(x):x\in D}<\infty}$, you have proven $D\subset D^{}$ while proving Lemma 1. And thanks to Lemma 2 we know $f(x)=f^{}(x)$ for all $x\in D$ if $D$ is an open set. But we can't prove $D=D^{}$ (and thus $f=f^{*}$), can we? – Filippo Sep 09 '20 at 09:57
  • No, I gave a counterexample to that at the beginning of my answer. – Stephen Montgomery-Smith Sep 09 '20 at 14:53
  • Right, but can we prove $D=D^{**}$ for continuous $f$ or open $D$? – Filippo Sep 09 '20 at 15:35
  • My guess is that generally $D^{}$ will be the closure of $D$. In the example I gave above, if $D = (-1,1)$, then $D^{}$ would be $[-1,1]$. If $D$ is closed, and $f$ is continuous on $D$, then I think $f = f^{}$ and $D = D^{}$. – Stephen Montgomery-Smith Sep 09 '20 at 15:55
  • I think what you want is that $f$ is lower semi-continuous. Remove the concept of $D$, but allow $f$ to take the value $+\infty$. Then I think you will get $f^{**} = f$. – Stephen Montgomery-Smith Sep 09 '20 at 16:26
  • Thats's a great result: Since the $f$ in your example is an element of $C^{\infty}$, we can forget about proving $D=D^{}$ for open sets :) The problem is that we have only proven $f(x)=f^{}(x)$ for inner points, so it seems like it just got even more difficult to prove $f=f^{**}$... – Filippo Sep 09 '20 at 19:30
  • I've had a look at two books on convex analysis (Rockafellar and Hiriart-Urrut) and I know that you can prove things like $f=f^{**}$ more easily if you allow functions to take the value $\infty$, but to me this seems like cheating. – Filippo Sep 09 '20 at 19:36
  • By the way: The example $f\colon\ ]-1,1[\ \to\mathbb R,x\mapsto x^2/2$ shows that it does make a difference which definition of the legendre transform I'm using: If I use the definition including the inverse of $f'$, $f=f^{}$, but as you said, if we use the definition including the supremum, $f\neq f^{}$, as in this case the domain of $f^{**}$ is the interval [-1,1]. – Filippo Sep 09 '20 at 20:18
  • I don't think it is cheating to allow $f$ to take the value $\infty$. It is just a another way to define the domain of $f$. What it does mean is that it makes it easier to state the results when I have an example like $f(x) = 1/(1-x^2)$. In the old way of talking, the domain is $(-1,1)$, and then $D^{}$ isn't the closure of $D$. In the new way of talking, $f^{}(1) = f(1) = \infty$. – Stephen Montgomery-Smith Sep 09 '20 at 20:36
  • But in physics the domain normally is the set of all possible states of the system (for example its position) and x=-1 or x=1 might simply not be allowed. But in some other scenario it might make sense to consider a function that takes the value $\infty$ in some point, so I think you are right... – Filippo Sep 09 '20 at 22:01
  • I'd be interested to delve into the subject (Legendre transformations of functions that can take the value $\infty$), but I don't know where to look (I didn't like the books I mentioned before, because I didn't understand the notation, especially in Rockafellars book, that doesn't include a symbols glossary). I'd be grateful if you could suggest some other sources (preferably modern and concise). – Filippo Sep 09 '20 at 22:04
  • I must admit that I tend to work things out for myself rather than read books. So I don't have good references. However, I think the thing to do is to look at the definitions, and ask yourself the question - does anything change if you say $f(x) = \infty$ rather than $x \notin D$? For example, I think with the definition of the Legendre transform, it will make no difference at all. Then the physical issue of saying $x \notin D$ compared to $f(x) = \infty$ is moot. – Stephen Montgomery-Smith Sep 09 '20 at 22:18
  • I'll think about it - thank you for your help :) – Filippo Sep 10 '20 at 05:49