# Infrafunctions Proofs

$$\newcommand{\bol}[1]{\textbf{#1}}$$

**Proposition 1:**

*Given some compact metric space of options $X$, if $U:X\to\mathbb{R}$ is a bounded function, $\{\mu|\forall\nu\in\Delta X:\mu(U)\ge\nu(U)\}=\Delta\{x|\forall y\in X:U(x)\ge U(y)\}$*

PROOF: To do this, we must show that anything in the first set is in the second, and vice-versa. So, assume $\mu$ is in the first set. Then for any $\nu$, $\nu(U)\le\mu(U)$. However, if $\mu$ is not in the second set, then it has probability-mass on some points $x$ where there's a $y$ s.t. $U(y)>U(x)$. Moving that new probability mass to points of higher utility, we'd construct a new probability distribution $\nu$ s.t. $\nu(U)>\mu(U)$, which is impossible. So $\mu$ must be in the second set.

In the reverse direction, any probability distribution $\mu$ supported over the maximum of $U$ (let $x$ be an arbitrary point in it) has $\mu(U)=U(x)$. Thus, for any $\nu$, it's supported entirely over points with equal or lesser utility than this maximum value, so $\mu(U)\ge\nu(U)$. Both subset inclusion directions have been proved, so the equality holds.

**Theorem 1: Fundamental Theorem of Infrafunctions**

*There is a bijection between concave upper-semicontinuous functions of type $\Delta X\to\mathbb{R}\cup\{-\infty\}$, and closed convex upper-complete sets of continuous functions $X\to\mathbb{R}$.*

Proof: For the reverse direction, going from sets to functions, letting $\hat{\bol{F}}$ denote the set and $\bol{F}$ denote the function, we have that
$$\bol{F}(\mu):=\inf_{f\in\hat{\bol{F}}}\mu(f)$$
With this definition being made, let's verify that the resulting function fulfills the indicated property. For verifying concavity, we have
$$\bol{F}(p\mu+(1-p)\nu)=\inf_{f\in\hat{\bol{F}}}(p\mu+(1-p)\nu)(f)\ge p\inf_{f\in\hat{\bol{F}}}\mu(f)+(1-p)\inf_{f\in\hat{\bol{F}}}\nu(f)=p\bol{F}(\mu)+(1-p)\bol{F}(\nu)$$
For verifying upper-semicontinuity, let $\mu_n$ limit to $\mu$.
Now, for any particular function $f^*$, due to $\mu_n$ limiting to $\mu$, we have
$$\limsup_{n\to\infty}\mu_n(f^*)=\mu(f^*)$$
So, for any $f^*$ where $\mu(f^*)$ is an (arbitrarily close) approximation to $\inf_{f\in\hat{\bol{F}}}\mu(f)$, we can go
$$\bol{F}(\mu)=\inf_{f\in\hat{\bol{F}}}\mu(f)\simeq\mu(f^*)=\limsup_{n\to\infty}\mu_n(f^*)\ge\limsup_{n\to\infty}\inf_{f\in\hat{\bol{F}}}\mu_n(f)=\limsup_{n\to\infty}\bol{F}(\mu_n)$$
And so upper-semicontinuity is established, that 
$$\bol{F}(\mu)\ge\limsup_{n\to\infty}\bol{F}(\mu_n)$$
For the forwards direction, going from functions to sets, letting $\bol{F}$ denote the function, the corresponding set of functions is
$$\{f|\forall\mu\in\Delta X:\mu(f)\ge\bol{F}(\mu)\}$$
We must show that the result is closed, convex, and upper-complete.

For closure, if $f_m$ limits to $f$, and all the $f_m$ are in the set (so $\mu(f_m)\ge\bol{F}(\mu)$ for all $m$ and $\mu$) and $\mu$ is arbitrary, then due to $f_m$ limiting to $f$, we have that $\mu(f)=\lim_{m\to\infty}\mu(f_m)\ge\bol{F}(\mu)$ and this argument works for all $\mu$, so $f$ is in the indicated set.

For convexity, our job is to show that if $f$ and $g$ are in the set, $pf+(1-p)g$ are in the set too. Fix an arbitrary $\mu$.
$$\mu(pf+(1-p)g)=p\mu(f)+(1-p)\mu(g)\ge p\bol{F}(\mu)+(1-p)\bol{F}(\mu)=\bol{F}(\mu)$$
And convexity is shown. For upper-completeness, assume that $g\ge f$ according to the usual ordering on functions. Then
$$\mu(g)\ge\mu(f)\ge\bol{F}(\mu)$$

Now, all that remains is to show that the two translation directions compose to identity in both directions.

For function-to-set-to-function being identity, a sufficient property for this to hold is that, for every $\mu'\in\Delta X$ and $x>\bol{F}(\mu')$, there exists a continuous function $f$ s.t. $\forall\mu\in\Delta X:\mu(f)\ge\bol{F}(\mu)$ and $x\ge\mu'(f)$

Why? Well, every function $f$ that lies in the set $\hat{\bol{F}}$ has the property that $\forall\mu:\mu(f)\ge\bol{F}(\mu)$. Therefore, regardless of $\mu$, we have that 
$$\forall\mu':\inf_{f:\forall\mu,\mu(f)\ge\bol{F}(\mu)}\mu'(f)\ge\bol{F}(\mu')$$
Or, rephrasing
$$\forall\mu':\inf_{f\in\hat{\bol{F}}}\mu'(f)\ge\bol{F}(\mu')$$
And, \emph{if} we had the property that for every $\mu'\in\Delta X$ and $x>\bol{F}(\mu')$, there exists a continuous function $f$ s.t. $\forall\mu\in\Delta X:\mu(f)\ge\bol{F}(\mu)$ and $x\ge\mu'(f)$, that would mean that regardless of $\mu'$, you could find functions $f$ that would lie in $\hat{\bol{F}}$, and where $\mu'(f)$ would lie arbitrarily close to $\bol{F}(\mu')$. This would get equality, that
$$\forall\mu':\inf_{f:\forall\mu,\mu(f)\ge\bol{F}(\mu)}\mu'(f)=\bol{F}(\mu')$$
Or, rephrasing,
$$\forall\mu':\inf_{f\in\hat{\bol{F}}}\mu'(f)=\bol{F}(\mu')$$
Or, rephrasing,
$$\inf_{f\in\hat{\bol{F}}}=\bol{F}$$
Ie, going from function to set to function again is identity.

As for the other direction, in order for set-to-function-to-set to be identity, the $\subseteq$ inclusion direction is pretty easy to prove outright. For any $f$ in a set of functions, it'll exceed the inf of that set of functions, and so it'll end up being in the set generated by that inf.

The $\supseteq$ inclusion direction is harder. We'd need to show that given any closed convex upper-complete set of continuous bounded functions, $\hat{\bol{F}}$, any function $g$ which is outside of that set has some $\mu$ where $\mu(g)<\inf_{f\in\hat{\bol{F}}}\mu(f)$. The reason that showing that helps is it establishes that $g$ cannot be in the set induced by the inf of everything in $\hat{\bol{F}}$. Therefore, the set induced by the inf function can't be a strict superset of $\hat{\bol{F}}$, because any $g$ in the former set and not the latter one can be used to generate a witness that it's not in the former set.

So, our two missing results to prove to establish the entire isomorphism theorem are:

1: Establishing that for every $\mu'\in\Delta X$ and $x>\bol{F}(\mu')$, there exists a continuous function $f$ s.t. $\forall\mu\in\Delta X:\mu(f)\ge\bol{F}(\mu)$ and $x\ge\mu'(f)$.

2: Establishing that for any closed convex upper-complete set of continuous bounded functions, $\hat{\bol{F}}$, any function $g$ which is outside of that set has some $\mu$ where $\mu(g)<\inf_{f\in\hat{\bol{F}}}\mu(f)$.

For both of these, we'll use the Hahn-Banach theorem. For the first one, let the set $A$ (a subset of $\mathcal{M}^{\pm}(X)\oplus\mathbb{R}$) be $\{y,\mu|y\le\bol{F}(\mu)\}$, and the set $B$ be the set consisting of the single point $x,\mu'$. The set $B$ is clearly convex, compact, and nonempty. That leaves showing that $A$ is closed, convex, and nonempty.

What we'll do is prove our desired result outright if the set $A$ is empty. It's the region under the graph of $\bol{F}$, which can only be empty if $\bol{F}=-\infty$, in which case you could take any function $f$ and subtract a sufficiently large constant from it to get a function whose expectation w.r.t $\mu$ was below the $x$ you named.

So, we may safely assume that the set $A$ is nonempty. Closure works because if $y_n$ limits to $y$ and $\mu_n$ limits to $\mu$, we have that 
$$y=\lim_{n\to\infty}y_n\le\limsup_{n\to\infty}\bol{F}(\mu_n)\le\bol{F}(\mu)$$
by upper-semicontinuity. And convexity works because
$$py+(1-p)y'\le p\bol{F}(\mu)+(1-p)\bol{F}(\mu')\le\bol{F}(p\mu+(1-p)\mu')$$
due to concavity of $\bol{F}$. 

We must show that the two sets aren't disjoint, which is easy because the single point has $x>\bol{F}(\mu')$. Thus the Hahn-Banach hyperplane separation theorem may be used to find an continuous affine hyperplane with $B$ on the top side of it, and $A$ on the top side of it. All continuous affine functions $\mathcal{M}^{\pm}(X)\to\mathbb{R}$ can be decomposed as a continuous linear functional $\mathcal{M}^{\pm}(X)\to\mathbb{R}$ (which can be interpreted as expectation w.r.t a bounded continuous function $f$), plus a constant. So, there's some bounded continuous function $f$ and constant number $b$ s.t. $\forall\mu,y\in A:y\le\mu(f)+b$ (ie, $A$ is below the hyperplane induced by the affine function induced by $f,b$), and where $\mu'(f)+b\le x$ (ie, the point $B$ consisting of $\mu',x$ lies above the hyperplane induced by the affine function induced by $f,b$).

Now, specializing to the case where $y=\bol{F}(\mu)$, and observing that $\mu(f+b)=\mu(f)+b$ for probability distributions, we can take $f+b$ to be our function of interest, and get that
$$\forall\mu\in\Delta X:\mu(f+b)=\mu(f)+b\ge\bol{F}(\mu)$$
and also, $x\ge\mu'(f)+b=\mu'(f+b)$. So, we've found a function with the indicated properties, outright proving the first of our two unsolved problems.

This leaves the second one. The set $\hat{\bol{F}}$ is closed and convex, and $g$ is just a single point, so we can invoke the Hahn-Banach theorem to get a separating linear functional. Some signed measure $m$ where $m(g)<\inf_{f\in\hat{\bol{F}}}m(f)$.

We need to show that this signed measure is a measure. If there was any negative region in the signed measure, then there could be a continuous function $g\ge 0$ that acted as a massive spike in the negative region of $m$, and $m(f+ag)$ (for very large constants $a$ and some $f\in\hat{\bol{F}}$) would be arbitrarily negative, while $f+ag$ would lie in $\hat{\bol{F}}$ by upper-closure, and we'd have a contradiction.

So, $m$ is a measure. Multiplying it by a suitable nonnegative constant turns it into a probability distribution $\mu$ that still fulfills the property that $\mu(g)<\inf_{f\in\hat{\bol{F}}}\mu(f)$, and we're done.

Since our two missing part of the proof were cleaned up, we've proven the overall theorem.

**Theorem 2: $L_p$ Ball Theorem**

*For any $\epsilon>0$, $p\in[1,\infty]$, $f:X\to\mathbb{R}$, and $\nu:\Delta X$, the infrafunction corresponding to 
$\{g|\left(\int|f-g|^{p}d\nu\right)^{\frac{1}{p}}\le\epsilon\}$ (Knightian uncertainty over the $L_p$ ball of size $\epsilon$ centered at $f$, w.r.t $\nu$), is 
$\mu\mapsto\mu(f)-\epsilon||\frac{d\mu}{d\nu}||_{q}$ where $\frac{1}{p}+\frac{1}{q}=1$.
Further, given a function $f$, the optimal $\mu$ to pick is the distribution $a\cdot\nu\cdot\max(f-b,0)^{p-1}$ for some constants $a>0$ and $b\le\max(f)$.*

Proof: The Lp norm of a function w.r.t. $\nu$ will be denoted as $||g||_{p}$. The function associated with the worst-case amongst the $L_p$ ball centered at $f$ is
$$\lambda\mu.\inf_{g:||f-g||_{p}\le\epsilon}\mu(g)$$
We can rewrite this as $f$ plus a function $h$ that has an $L_p$ norm of $\epsilon$ or less. So we get the equivalent function
$$=\lambda\mu.\inf_{h:||h||_{p}\le\epsilon}\mu(f+h)$$
$$=\lambda\mu.\inf_{h:||h||_{p}\le\epsilon}\mu(f)+\mu(h)$$
$$=\lambda\mu.\mu(f)+\inf_{h:||h||_{p}\le\epsilon}\mu(h)$$
$$=\lambda\mu.\mu(f)-\sup_{h:||h||_{p}\le\epsilon}\mu(h)$$
Now, we'll show that $\sup_{h:||h||_{p}\le\epsilon}\mu(h)=||\frac{d\mu}{d\nu}||_q$ where $\frac{1}{p}+\frac{1}{q}=1$, by showing that it's both $\le$ and $\ge$ that quantity. For one inequality direction, we can go
$$\sup_{h:||h||_{p}\le\epsilon}\mu(h)=\sup_{h:||h||_{p}\le\epsilon}\int h d\mu=\sup_{h:||h||_{p}\le\epsilon}\int h\frac{d\mu}{d\nu} d\nu$$
And then apply Holder's inequality.
$$\le\sup_{h:||h||_{p}\le\epsilon}||h||_{p}\cdot||\frac{d\mu}{d\nu}||_{q}=\epsilon||\frac{d\mu}{d\nu}||_{q}$$
And so, we have one inequality direction, that
$$\sup_{h:||h||_{p}\le\epsilon}\mu(h)\le\epsilon||\frac{d\mu}{d\nu}||_{q}$$
For the other inequality direction, we can let $h$ be defined as $\epsilon\cdot\frac{\left(\frac{d\mu}{d\nu}\right)^{\frac{1}{p-1}}}{\left(\int\left(\frac{d\mu}{d\nu}\right)^{\frac{p}{p-1}}d\nu\right)^{\frac{1}{p}}}$

Our first order of business is showing that the $L_p$ norm of $h$ is $\epsilon$ or less. So, compute it.
$$\left(\int\left(\epsilon\cdot\frac{\left(\frac{d\mu}{d\nu}\right)^{\frac{1}{p-1}}}{\left(\int\left(\frac{d\mu}{d\nu}\right)^{\frac{p}{p-1}}d\nu\right)^{\frac{1}{p}}}\right)^{p}d\nu\right)^{\frac{1}{p}}$$
Distribute the power in.
$$=\left(\int\epsilon^{p}\cdot\frac{\left(\frac{d\mu}{d\nu}\right)^{\frac{p}{p-1}}}{\int\left(\frac{d\mu}{d\nu}\right)^{\frac{p}{p-1}}d\nu}d\nu\right)^{\frac{1}{p}}$$
Pull the $\epsilon^{p}$, group and cancel out.
$$=\left(\epsilon^{p}\right)^{\frac{1}{p}}=\epsilon$$
So, this is a valid choice of function $h$. So, we can compute (by pulling the multiplicative constants out)
$$\sup_{h:||h||_{p}\le\epsilon}\mu(h)\ge\mu\left(\epsilon\cdot\frac{\left(\frac{d\mu}{d\nu}\right)^{\frac{1}{p-1}}}{\left(\int\left(\frac{d\mu}{d\nu}\right)^{\frac{p}{p-1}}d\nu\right)^{\frac{1}{p}}}\right)=\epsilon\cdot\left(\int\left(\frac{d\mu}{d\nu}\right)^{\frac{p}{p-1}}d\nu\right)^{\frac{-1}{p}}\int\left(\frac{d\mu}{d\nu}\right)^{\frac{1}{p-1}}d\mu$$
Now, since 
$$\int\left(\frac{d\mu}{d\nu}\right)^{\frac{1}{p-1}}d\mu=\int\left(\frac{d\mu}{d\nu}\right)^{\frac{1}{p-1}}\frac{d\mu}{d\nu}d\nu=\int\left(\frac{d\mu}{d\nu}\right)^{\frac{p}{p-1}}d\nu$$
We can reexpress our old equation as
$$=\epsilon\cdot\left(\int\left(\frac{d\mu}{d\nu}\right)^{\frac{p}{p-1}}d\nu\right)^{\frac{-1}{p}}\left(\int\left(\frac{d\mu}{d\nu}\right)^{\frac{p}{p-1}}d\nu\right)^{\frac{p}{p}}=\epsilon\cdot\left(\int\left(\frac{d\mu}{d\nu}\right)^{\frac{p}{p-1}}d\nu\right)^{\frac{p-1}{p}}$$
$$=\epsilon\cdot\left(\int\left(\frac{d\mu}{d\nu}\right)^{q}d\nu\right)^{\frac{1}{q}}=\epsilon||\frac{d\mu}{d\nu}||_{q}$$
So we have
$$\sup_{h:||h||_{p}\le\epsilon}\mu(h)\ge\epsilon||\frac{d\mu}{d\nu}||_{q}$$
Since that's the other inequality direction, we have equality. Now, since we were last at
$$=\lambda\mu.\mu(f)-\sup_{h:||h||_{p}\le\epsilon}\mu(h)$$
we can proceed to
$$=\lambda\mu.\mu(f)-\epsilon||\frac{d\mu}{d\nu}||_{q}$$
And that addresses one part of the theorem, about the objective function we're minimizing.

Sadly, the last part, about the optimal $\mu$, can only be done according to a physics level of rigor. Given two points $x$ and $y$ which the optimal $\mu$ assigns probability to, the increase in the objective function from adding a tiny little $\delta$ of probability mass to $x$ must be the same as the increase from adding a tiny little $\delta$ of probability mass to $y$. This is because, otherwise, if $x$ got a higher score than $y$, you could steal a tiny amount of probability mass from $y$, reallocate it to $x$, and you'd get a higher score.

So, we can ask, what is $\frac{\partial}{\partial x}(\mu\mapsto\mu(f)-\epsilon||\frac{d\mu}{d\nu}||_{q})$ for the optimal $\mu$? We know that it will end up being equal for every $x$ which is in the support of the optimal $\mu$. Well, we can write it as
$$\frac{\partial}{\partial x}\left(\mu(f)-\epsilon||\frac{d\mu}{d\nu}||_{q}\right)$$
$$=\frac{\partial}{\partial x}\left(\int fd\mu-\epsilon\left(\int\left(\frac{d\mu}{d\nu}\right)^{q}d\nu\right)^{\frac{1}{q}}\right)$$
$$=\frac{\partial}{\partial x}\left(\int fd\mu\right)-\frac{\partial}{\partial x}\left(\epsilon\left(\int\left(\frac{d\mu}{d\nu}\right)^{q}d\nu\right)^{\frac{1}{q}}\right)$$
$$=f(x)-\epsilon\cdot\frac{1}{q}\left(\int\left(\frac{d\mu}{d\nu}\right)^{q}d\nu\right)^{\frac{1}{q}-1}\frac{\partial}{\partial x}\left(\int\left(\frac{d\mu}{d\nu}\right)^{q}d\nu\right)$$
$$=f(x)-\epsilon\cdot\frac{1}{q}\left(\int\left(\frac{d\mu}{d\nu}\right)^{q}d\nu\right)^{\frac{1}{q}-1}\nu(x)\frac{\partial}{\partial x}\left(\left(\frac{d\mu}{d\nu}\right)^{q}\right)$$
$$=f(x)-\epsilon\cdot\frac{1}{q}\left(\int\left(\frac{d\mu}{d\nu}\right)^{q}d\nu\right)^{\frac{1}{q}-1}\nu(x)\cdot\frac{1}{\nu(x)^{q}}\frac{\partial}{\partial x}(d\mu)^{q}$$
$$=f(x)-\epsilon\cdot\frac{1}{q}\left(\int\left(\frac{d\mu}{d\nu}\right)^{q}d\nu\right)^{\frac{1}{q}-1}\nu(x)\cdot\frac{1}{\nu(x)^{q}}\cdot q\cdot\mu(x)^{q-1}$$
And cancel
$$=f(x)-\epsilon\left(\int\left(\frac{d\mu}{d\nu}\right)^{q}d\nu\right)^{\frac{1}{q}-1}\left(\frac{d\mu}{d\nu}(x)\right)^{q-1}$$
Now, since $\epsilon\left(\int\left(\frac{d\mu}{d\nu}\right)^{q}d\nu\right)^{\frac{1}{q}-1}$ is the same regardless of which $x$ was picked, we can abbreviate it as $\alpha$, and write things as
$$\frac{\partial}{\partial x}\left(\mu(f)-\epsilon||\frac{d\mu}{d\nu}||_{q}\right)=f(x)-\alpha\left(\frac{d\mu}{d\nu}(x)\right)^{q-1}$$
As previously explained, this quantity must be the same for all $x$ that are supported by the optimal $\mu$. In fact, this quantity can be called $b$. So, for every $x$ with support, we have that
$$b=f(x)-\alpha\left(\frac{d\mu}{d\nu}(x)\right)^{q-1}$$
We can rearrange this
$$\alpha\left(\frac{d\mu}{d\nu}(x)\right)^{q-1}=f(x)-b$$
$$\left(\frac{d\mu}{d\nu}(x)\right)^{q-1}=\frac{f(x)-b}{\alpha}(f(x)-b)$$
$$\frac{d\mu}{d\nu}(x)=\left(\frac{f(x)-b}{\alpha}\right)^{\frac{1}{q-1}}$$
And now we see that, since the left-hand side is always nonnegative, $f(x)-b$ must also be nonnegative too. And for any $x$ which fulfilled the above equation, it can be rearranged to show that this $x$ must have its partial derivative in the $x$ direction being the maximal value of $b$, as expected, and so $\mu$ would not be harmed by placing any probability mass on that $x$. So, without loss of generality, we can assume that $\mu$ is supported over all $x$ which fulfill the above equation, and make it into an equation that's valid for \emph{all} $x$ by going
$$\frac{d\mu}{d\nu}(x)=\left(\frac{\max(f(x)-b,0)}{\alpha}\right)^{\frac{1}{q-1}}$$
Rearrange.
$$\mu(x)=\nu(x)\cdot\left(\frac{\max(f(x)-b,0)}{\alpha}\right)^{\frac{1}{q-1}}$$
Now, $\left(\frac{1}{\alpha}\right)^{\frac{1}{q-1}}$ is a constant, so call it $a$. And since it's valid over all $x$, we can rephrase it as
$$\mu=a\cdot\nu\cdot\max(f-b,0)^{\frac{1}{q-1}}$$
And now, since $\frac{1}{p}+\frac{1}{q}=1$, we can rearrange this into $q=\frac{p}{p-1}$, and so 
$$\frac{1}{q-1}=\frac{1}{\frac{p}{p-1}-\frac{p-1}{p-1}}=\frac{1}{\frac{1}{p-1}}=p-1$$
And so our equation rearranges into
$$\mu=a\cdot\nu\cdot\max(f-b,0)^{p-1}$$
As desired.

**Theorem 3: Dynamic Consistency**

*For any environment $e$, finite history $h$, off-history policy $\pi_{\neg h}$, and infrafunctions $\bol{U}$ and $\bol{V}$, we have that}
$$\bol{U}\left(\left(\pi_{\neg h}\bullet\text{argmax}_{\pi^*}(\bol{U}|e,h,\pi_{\neg h})(\pi^*\cdot(e|h))\right)\cdot e\right)\ge\bol{U}\left(\left(\pi_{\neg h}\bullet\text{argmax}_{\pi^*}\bol{V}(\pi^*\cdot(e|h))\right)\cdot e\right)$$
\emph{Or, restating in words, selecting the after-h policy by argmaxing for $\bol{U}|e,h,\pi_{\neg h}$ makes an overall policy that outscores the overall policy made by selecting the after-h policy to argmax for $\bol{V}$.*

Proof:
$$\bol{U}\left(\left(\pi_{\neg h}\bullet\text{argmax}_{\pi^*}(\bol{U}|e,h,\pi_{\neg h})(\pi^*\cdot(e|h))\right)\cdot e\right)$$
Use $\pi^*$ to abbreviate the optimal policy for $\bol{U}|e,h,\pi_{\neg h}$, and interacting with the environment $e|h$.
$$=\bol{U}((\pi_{\neg h}\bullet\pi^*)\cdot e)$$
$$=\min_{U\in\hat{\bol{U}}}\mathbb{E}_{(\pi_{\neg h}\bullet\pi^{*})\cdot e}[U]$$
$$=\min_{U\in\hat{\bol{U}}}\mathbb{E}_{(\pi_{\neg h}\bullet\pi^{*})\cdot e}[\textbf{1}_{\neg h}U]+\mathbb{E}_{(\pi_{\neg h}\bullet\pi^*)\cdot e}[\textbf{1}_{h}U]$$
$$=\min_{U\in\hat{\bol{U}}}\mathbb{E}_{\pi_{\neg h}\cdot e}[\textbf{1}_{\neg h}U]+\mathbb{E}_{\pi_{\neg h}\cdot e}[\textbf{1}_{h}]\cdot\mathbb{E}_{\pi^{*}\cdot(e|h)}[U_{\downarrow h}]$$
Now, since $\pi^*$ is optimal for $\bol{U}|e,h,\pi_{\neg h}$ and interacting with $e|h$, that means that for all other post-h policies $\pi'$, we have that
$$(\bol{U}|e,h,\pi_{\neg h})(\pi^{*}\cdot(e|h))\ge(\bol{U}|e,h,\pi_{\neg h})(\pi'\cdot(e|h))$$
Unpacking the definition of the updated infrafunction, since everything in the set associated with $\bol{U}|e,h,\pi_{\neg h}$ came from the set associated with $\bol{U}$, this turns into
$$\min_{U\in\hat{\bol{U}}}\mathbb{E}_{\pi^{*}\cdot(e|h)}[\mathbb{E}_{\pi_{\neg h}\cdot e}[\textbf{1}_{h}]\cdot U_{\downarrow h}+\mathbb{E}_{\pi_{\neg h}\cdot e}[\textbf{1}_{\neg h}U]]\ge\min_{U\in\hat{\bol{U}}}\mathbb{E}_{\pi'\cdot(e|h)}[\mathbb{E}_{\pi_{\neg h}\cdot e}[\textbf{1}_{h}]\cdot U_{\downarrow h}+\mathbb{E}_{\pi_{\neg h}\cdot e}[\textbf{1}_{\neg h}U]]$$
Reshuffling some expectations, this turns into
$$\min_{U\in\hat{\bol{U}}}\mathbb{E}_{\pi_{\neg h}\cdot e}[\textbf{1}_{\neg h}U]+\mathbb{E}_{\pi_{\neg h}\cdot e}[\textbf{1}_{h}]\mathbb{E}_{\pi^{*}\cdot(e|h)}[U_{\downarrow h}]\ge\min_{U\in\hat{\bol{U}}}\mathbb{E}_{\pi_{\neg h}\cdot e}[\textbf{1}_{\neg h}U]+\mathbb{E}_{\pi_{\neg h}\cdot e}[\textbf{1}_{h}]\mathbb{E}_{\pi'\cdot(e|h)}[U_{\downarrow h}]$$
Let $\pi'$ be the policy that optimizes $\bol{V}(\pi'\cdot(e|h))$. Now, we were previously at
$$=\min_{U\in\hat{\bol{U}}}\mathbb{E}_{\pi_{\neg h}\cdot e}[\textbf{1}_{\neg h}U]+\mathbb{E}_{\pi_{\neg h}\cdot e}[\textbf{1}_{h}]\cdot\mathbb{E}_{\pi^{*}\cdot(e|h)}[U_{\downarrow h}]$$
but using the above inequality, we can proceed to
$$\ge\min_{U\in\hat{\bol{U}}}\mathbb{E}_{\pi_{\neg h}\cdot e}[\textbf{1}_{\neg h}U]+\mathbb{E}_{\pi_{\neg h}\cdot e}[\textbf{1}_{h}]\cdot\mathbb{E}_{\pi'\cdot(e|h)}[U_{\downarrow h}]$$
$$=\min_{U\in\hat{\bol{U}}}\mathbb{E}_{(\pi_{\neg h}\bullet\pi')\cdot e}[\textbf{1}_{\neg h}U]+\mathbb{E}_{(\pi_{\neg h}\bullet\pi')\cdot e}[\textbf{1}_{h}U]$$
$$=\min_{U\in\hat{\bol{U}}}\mathbb{E}_{(\pi_{\neg h}\bullet\pi')\cdot e}[U]$$
$$=\bol{U}((\pi_{\neg h}\bullet\pi')\cdot e)$$
$$=\bol{U}\left(\left(\pi_{\neg h}\bullet\text{argmax}_{\pi'}\bol{V}(\pi'\cdot(e|h))\right)\cdot e\right)$$
And we're done, we've shown our desired inequality
$$\bol{U}\left(\left(\pi_{\neg h}\bullet\text{argmax}_{\pi^*}(\bol{U}|e,h,\pi_{\neg h})(\pi^*\cdot(e|h))\right)\cdot e\right)\ge\bol{U}\left(\left(\pi_{\neg h}\bullet\text{argmax}_{\pi^*}\bol{V}(\pi^*\cdot(e|h))\right)\cdot e\right)$$
And the $\bol{U}$, $\bol{V}$, and everything else was arbitrary, so it's universally valid.

**Proposition 2: $L_p$ Double Integral Inequality**

*If $f\ge 0$, let $\oint^{p}fd\mu$ be an abbreviation for $\left(\int f^{p} d\mu\right)^{\frac{1}{p}}$. Then for all $p\in[-\infty,1]$, and $\mu:\Delta X$ and $\nu:\Delta Y$ and $f:X\times Y\to\mathbb{R}^{\ge 0}$, we have that
$$\int\oint^{p}f(x,y)d\nu d\mu\le\oint^{p}\int f(x,y)d\mu d\nu$$*

Here's why. Define the function $g:Y\to\mathbb{R}^{\ge 0}$ as $g(y)=\left(\int f(x,y)d\mu\right)^{p-1}$. Reverse Holder's inequality, because $p\le 1$, says that, for all $x$,
$$\int f(x,y)g(y)d\nu\ge\oint^{p}f(x,y)d\nu\cdot\oint^{q}g(y)d\nu$$
Where $\frac{1}{p}+\frac{1}{q}=1$. So, using that inequality, we can derive that
$$\frac{\int f(x,y)g(y)d\nu}{\oint^{q}g(y)d\nu}\ge\oint^{p}f(x,y)d\nu$$
And so we derive that
$$\int\oint^{p}f(x,y)d\nu d\mu\le\int\frac{\int f(x,y)g(y)d\nu}{\oint^{q}g(y)d\nu}d\mu$$
Pull the constant out, and group this into a double integral.
$$=\left(\oint^{q}g(y)d\nu\right)^{-1}\cdot\int\int f(x,y)g(y)d\nu d\mu$$
Swap the order of double integration, and unpack what $\oint^{q}$ is.
$$=\left(\left(\int g(y)^{q}d\nu\right)^{\frac{1}{q}}\right)^{-1}\cdot\int\int f(x,y)g(y)d\mu d\nu$$
Pull the constant $g(y)$ partway out of the inner integral, and also collapse the two powers on the left-hand side.
$$=\left(\int g(y)^{q}d\nu\right)^{\frac{-1}{q}}\cdot\int g(y)\int f(x,y)d\mu d\nu$$
Now, since $\frac{1}{q}+\frac{1}{p}=1$, solving for $q$, we get that it is equal to $\frac{p}{p-1}$. Similarly, $\frac{-1}{q}=\frac{1}{p}-1$. Make those substitutions.
$$=\left(\int g(y)^{\frac{p}{p-1}}d\nu\right)^{\frac{1}{p}-1}\cdot\int g(y)\int f(x,y)d\mu d\nu$$
Unpack what $g(y)$ is.
$$=\left(\int\left(\left(\int f(x,y)d\mu\right)^{p-1}\right)^{\frac{p}{p-1}}d\nu\right)^{\frac{1}{p}-1}\cdot\int\left(\int f(x,y)d\mu\right)^{p-1}\left(\int f(x,y)d\mu\right) d\nu$$
Simplify
$$=\left(\int\left(\int f(x,y)d\mu\right)^{p}d\nu\right)^{\frac{1}{p}-1}\cdot\int\left(\int f(x,y)d\mu\right)^{p}d\nu$$
Cancel
$$=\left(\int\left(\int f(x,y)d\mu\right)^{p}d\nu\right)^{\frac{1}{p}}$$
Rewrite
$$=\oint^{p}\int f(x,y)d\mu d\nu$$
And we're done! We've shown that
$$\int\oint^{p}f(x,y)d\nu d\mu\le\oint^{p}\int f(x,y)d\mu d\nu$$
For some values of $p$, like 0 or 1 or $-\infty$, these quantities will be ill-defined, but this can be handled by taking limits of the $p$ where this argument works.

**Corollary 1: Lp-Averaging is Well-Defined**

*Given any distribution $\nu$ over a family of functions or infrafunctions, define the $L_p$-average of this family (for $p\in[-\infty,1]$) as the function
$$\mu\mapsto\oint^{p}\textbf{F}_i(\mu)d\nu$$
If all infrafunctions $\textbf{F}_i(\mu)$ are $\ge 0$, then the $L_p$-average will be an infrafunction as well.*

Proof: The main thing we need to verify is concavity of the resulting function. So, fix some $\mu_1$ and $\mu_2$, and use $q$ as our mixing parameter. Then,
$$q\left(\oint^{p}\textbf{F}_i d\nu\right)(\mu_1)+(1-q)\left(\oint^{p}\textbf{F}_i d\nu\right)(\mu_2)$$
$$=q\oint^{p}\textbf{F}_i(\mu_1) d\nu+(1-q)\oint^{p}\textbf{F}_i(\mu_2) d\nu$$
Now, this can actually be interpreted as an ordinary integral outside of a p-integral. The outer integral is over the space of two points, and $f(1,\textbf{F})=\textbf{F}(\mu_1)$ and $f(2,\textbf{F})=\textbf{F}(\mu_2)$. So applying our inequality from the previous theorem, we get
$$\le\oint^{p}q\textbf{F}_i(\mu_1)+(1-q)\textbf{F}_i(\mu_2)d\nu$$
And then apply concavity of each $\textbf{F}$.
$$\le\oint^{p}\textbf{F}_i(q\mu_1+(1-q)\mu_2)d\nu$$
Concavity has been proved.

**Theorem 4: Crappy Optimizer Theorem**

*For any selection process $s$ where $Q(s)$ fulfills the four properties, $\forall f:Q(s)(f)=\max_{\mu\in\Psi}\mu(f)$ will hold for some closed convex set of probability distributions $\Psi$. Conversely, the function $f\mapsto\max_{\mu\in\Psi}\mu(f)$ for any closed convex set $\Psi$ will fulfill the four properties of an optimization process.*

It's already a theorem that any function $\psi:(X\to\mathbb{R})\to\mathbb{R}$ which fulfills the three properties of concavity, monotonicity, and $\psi(af+c)=a\psi(f)+c$, has a representation as minimizing over a closed convex set of probability distributions, and that minimizing over a closed convex set of probability distributions will produce a functional which fulfills those four properties. It's somewhere in Less Basic Inframeasure Theory. Well, actually, I proved some stuff about ultradistributions and all the proofs were the same just flipping concave to convex, and minimization to maximization, in an extremely straightforward way. And I proved that those three properties (but with convex flipped to concave) were equivalent to minimizing over a closed convex set of probability distributions, so the same result should hold.

Very similar arguments prove that any function which fulfills the three properties of convexity, monotonicity, and being able to pull multiplicative and additive constants out, has a representation as maximizing over a closed convex set of probability distributions $\Psi$, and vice-versa.

So, that just leaves proving the three defining properties of an ultradistribution from the four properties assumed of the function $Q(s)$, and vice-versa. As a recap, the four properties assumed were
$$P1:\forall f,c\in\mathbb{R}:Q(s)(f+c)=Q(s)(f)+c$$
$$P2:\forall f,a\ge 0:Q(s)(af)=aQ(s)(f)$$
$$P3:\forall f,g:Q(s)(f+g)\le Q(s)(f)+Q(s)(g)$$
$$P4:\forall f:f\le 0\to Q(s)(f)\le 0$$
And the four defining properties of ultradistributions are
$$U1:\forall f,g,p\in[0,1]:\psi(pf+(1-p)g)\le p\psi(f)+(1-p)\psi(g)$$
$$U2:\forall f,g:f\le g\to\psi(f)\le\psi(g)$$
$$U3:\forall f,c\in\mathbb{R},a\ge 0:\psi(af+c)=a\psi(f)+c$$
Proof of U1 from P2 and P3:
$$Q(s)(pf+(1-p)g)\le Q(s)(pf)+Q(s)((1-p)g)=pQ(s)(f)+(1-p)Q(s)(g)$$
Proof of U2 from P3 and P4 and $f\le g$
$$Q(s)(f)=Q(s)((f-g)+g)\le Q(s)(f-g)+Q(s)(g)\le Q(s)(g)$$
Proof of U3 from P1 and P2:
$$Q(s)(af+c)=Q(s)(af)+c=aQ(s)(f)+c$$
Now for the reverse direction!

Proof of P1 from U3:
$$\psi(f+c)=\psi(f)+c$$
Proof of P2 from U3:
$$\psi(af)=a\psi(f)$$
Proof of P3 from U1 and U3:
$$\psi(f+g)=\psi(p\frac{1}{p}f+(1-p)\frac{1}{1-p}g)\le p\psi(\frac{1}{p}f)+(1-p)\psi(\frac{1}{1-p}g)=\psi(f)+\psi(g)$$
Proof of P4 from U2 and U3 and $f\le 0$
$$\psi(f)\le\psi(0)=\psi(0\cdot 0)=0\cdot\psi(0)=0$$
And done!

**Proposition 3:**

*The space of infrafunctions is a $\Box$-algebra, with the function $flat_{\mathcal{F}X}:\Box\mathcal{F}X\to\mathcal{F}X$ being defined as $\lambda\psi.\lambda\mu.\psi(\lambda\bol{F}.\bol{F}(\mu))$.*

We just need to show two commuting diagrams. For the square one, fix an arbitrary $\Psi:\Box\Box\mathcal{F}X$ and $\mu\in\Delta X$.
$$flat_{\mathcal{F}X}(flat_{\Box\mathcal{F}X}(\Psi))(\mu)$$
Unpack the outer layer of flattening.
$$=flat_{\Box\mathcal{F}X}(\Psi)(\lambda\bol{F}.\bol{F}(\mu))$$
Unpack the next layer of flattening, via the usual way that flattening works for infradistributions.
$$=\Psi(\lambda\psi.\psi(\lambda\bol{F}.\bol{F}(\mu)))$$
Regroup this back up in a different way with how $flat_{\mathcal{F}X}$ works.
$$=\Psi(\lambda\psi.flat_{\mathcal{F}X}(\psi)(\mu))$$
Write this as the beta reduction of the more complicated term
$$=\Psi(\lambda\psi.(\lambda\bol{F}.\bol{F}(\mu))(flat_{\mathcal{F}X}(\psi)))$$
Write this as a pushforward along an infrakernel.
$$=flat_{\mathcal{F}X*}(\Psi)(\lambda\bol{F}.\bol{F}(\mu))$$
Write this as a flattening.
$$=flat{\mathcal{F}X}(flat_{\mathcal{F}X*}(\Psi))(\mu)$$
Now, since this holds for all $\mu$, that means that
$$flat_{\mathcal{F}X}(flat_{\Box\mathcal{F}X}(\Psi))=flat_{\mathcal{F}X}(flat_{\mathcal{F}X*}(\Psi))$$
And since this holds for all $\Psi$, this means that
$$flat_{\mathcal{F}X}\circ flat_{\Box\mathcal{F}X}=flat_{\mathcal{F}X}\circ flat_{\mathcal{F}X*}$$
This demonstrates the first commutative diagram of an algebra of a monad, the one that looks like a square. Now for the forward-and-back digram composing to identity.

We need that the usual embedding $e:\mathcal{F}X\to\Box\mathcal{F}X$ given by $e(\bol{F})=\lambda g.g(\bol{F})$ where $g:\mathcal{F}X\to\mathbb{R}$, has $flat_{\mathcal{F}X}\circ e=id_{\mathcal{F}X}$. Let's compute it. Fix an arbitrary $\bol{F}:\mathcal{F}X$ and a $\mu:\Delta X$. Then
$$flat_{\mathcal{F}X}(e(\bol{F}))(\mu)$$
$$=flat_{\mathcal{F}X}(\lambda g.g(\bol{F}))(\mu)$$
$$=(\lambda g.g(\bol{F}))(\lambda\bol{G}.\bol{G}(\mu))$$
$$=(\lambda\bol{G}.\bol{G}(\mu))(\bol{F})$$
$$=\bol{F}(\mu)=id_{\mathcal{F}X}(\bol{F})(\mu)$$
And this holds for all $\mu$ and $\bol{F}$, so composing flattening and the usual embedding produces the identity, which is the second property to declare something a $\Box$-algebra.

**Proposition 4:**

*All continuous infrakernels $k:X\to\Box Y$ induce a function $\mathcal{F}Y\to\mathcal{F}X$ via $\bol{G}\mapsto(\mu\mapsto\bol{G}(k_{*}(\mu))$*

We've got two things to verify. Namely, concavity, and upper-semicontinuity, of $\lambda\mu.\bol{G}(k_{*}(\mu))$. Upper-semicontinuity is easy, because if $\mu_n$ converges to $\mu$, then $k_{*}(\mu_n)$ converges to $k_{*}(\mu)$, and then upper-semicontinuity of $\bol{G}$ takes over. For concavity, we have
$$\bol{G}(k_{*}(p\mu_1+(1-p)
\mu_2))=\bol{G}(pk_{*}(\mu_1)+(1-p)k_{*}(
\mu_2))\ge p\bol{G}(k_{*}(\mu_1))+(1-p)\bol{G}(k_{*}(
\mu_2))$$
And it's proved.