Let $f: X \times Y \rightarrow R$. We prove two theorems concerning the existence of a measurable function $\varphi$ such that $f(x, \varphi(x)) = \inf_y f(x,y)$. The first concerns Borel measurability and the second concerns absolute (or universal) measurability. These results are related to the existence of measurable projections of sets $S \subset X \times Y$. Among other applications these theorems can be applied to the problem of finding measurable Bayes procedures according to the usual procedure of minimizing the a posteriori risk. This application is described here and a counterexample is given in which a Borel measurable Bayes procedure fails to exist.