Solution (source code)

= Solution

Define $U(x)=U_0(\delta_x)$, where $\delta_x$ is the <Dirac measure> at $x$. For the full <sigma-algebra> of subsets of a finite $E$, affineness directly gives $U_0(\lambda)=\sum_{x\in E}\lambda(\{x\})U(x)$.

The statement also holds for an arbitrary <sigma-algebra> on a <finite set>. List each <atom of a sigma-algebra> as $A_1,\ldots,A_r$ and choose $x_j\in A_j$. Points in one atom have identical <Dirac measures> on this <sigma-algebra>, so $U$ is constant on each atom and is measurable. Every <probability measure> decomposes as $\lambda=\sum_j\lambda(A_j)\delta_{x_j}$, whence
$$
\boxed{U_0(\lambda)=\sum_j\lambda(A_j)U(x_j)=\int_EU(x)\,\lambda(dx).}
$$
This is the <expected utility representation on a finite measurable space>. It does not silently assume that each singleton is measurable.