joint infima involved in relation to distance between sets Consider a metric space $(X,d)$, and let $A,K \subseteq X$ such that A is closed and K is compact. 
I have to show that there exists an element $k_0\in K$ which achieves the minimum between the sets, i.e. there exists a $k_0$ such that $d(k_0,A) = d(K,A) = \inf_{k \in K, a \in A}\; d(k,a)$ 
My method of argument is that since $f(x) = d(x,A)$ is a continuos function over a compact set, the range is also compact (i.e. the set $F=\{f(x) = d(x,A)\}$ is compact in R) and hence has a minimum. 
Thereby there exists a $k_0$ such that $d(k_0,A)  = \inf_{k \in K} d(k,A)$. 
But how do I show that this infimum is also equal to  $d(K,A)$, i.e. $\inf_{k \in K, a \in A}\; d(k,a)$ ?
This therefore proceeds to a general question: 
Is $\inf_{a \in A, b \in B} \;f(a,b) = \inf_{a\in A} inf_{b\in B}\;f(a,b)$ always? (my gut says no!)
If so then what are the conditions required on f(.) for such a condition to hold?
 A: It is always true that $$\inf_{a \in A, b \in B} f(a,b) = \inf_{a\in A} \inf_{b\in B} f(a,b)$$ (of course, assume $f$ to be minorized, $A$ and $B$ to be nonempty). It is simpler to show that for a (nonvacuous) family $\{A_\alpha\}$ of (nonvacuous) subsets of the real line such that $\cup \{A_\alpha\}$ is bounded bellow, one has $$\inf\left( \bigcup_\alpha A_\alpha\right) = \inf_\alpha \left( \inf A_\alpha \right). $$ Having proved this, the result follows from $$\inf_{a \in A,b \in B}f(a,b)= \inf f(A \times B) = \inf \bigcup_{a \in A}f\left( \{a\} \times B \right)=\inf_{a\in A} \inf f(\{a\}\times B)=\inf_{a \in A}\inf_{b \in B}f(a,b). $$ To see that, put $A = \cup \{A_\alpha\}.$ For each $\alpha$, $A_\alpha \subseteq A$, whence $\inf A_\alpha \geqq \inf A.$ Hence $$\inf_\alpha \inf A_\alpha \geqq \inf A.$$ Now, given $\epsilon > 0$, there is some $a \in A$ with $$\inf A + \epsilon > a \geqq \inf A.$$ For some $\alpha_0$, $a \in A_{\alpha_0}$. It follows that $$\inf_\alpha \inf A_\alpha \leqq \inf A_{\alpha_0} \leqq a < \inf A + \epsilon.$$ Since $\epsilon$ was arbitrary, we have $$\inf_\alpha \inf A_\alpha \leqq \inf A.$$ Combining the two inequalities we arrive at the desired result.
A: In what follows we assume that $f$ is a real function bounded from below.
Let $L= \inf_{a\in A} \inf_{b \in B} f(a,b)$. Then by the infimum property there is a sequence ${(a_n)}_{n \in \mathbb{N}}\subset A$ such that $L_n = \inf_{b \in B} f(a_n,b)$  satisfies $\left\lvert L - L_n \right\rvert\leq \frac1n$ for all $n \in \mathbb{N}$.
Now, once again by the infimum property, for each $k\in\mathbb{N}$ there is a sequence ${(b_{k,m})}_{m \in \mathbb{N}} \subset B$ such that $L_{k,m} = f(a_k,b_{k,m})$ satisfies $\left\lvert L_k - L_{k,m} \right\rvert\leq \frac1m$ for all $m \in \mathbb{N}$. Hence, if we consider the sequence ${\Big(g_n=f(a_{n},b_{n,n})\Big)}_{n\in \mathbb{N}}$, by the triangular inequality we have that
$$\left\lvert L-f(a_{n},b_{n,n})\right\rvert\leq \left\lvert L-L_n  \right\rvert+\big\lvert L_n-\underbrace{f(a_{n},b_{n,n})}_{L_{n,n}}  \big\rvert\leq \frac2n$$
This shows that $\inf_{a \in A,b\in B}f(a,b) \leq \inf_{a\in A} \inf_{b \in B} f(a,b)$.
Now, suppose that $l =\inf_{a \in A,b\in B}f(a,b)$ were strictly less than $L$. Then by the infimum property there is a sequence $${\Big(h_n=(\alpha_n,\beta_n)\Big)}_{n\in\mathbb{N}}\subset A \times B$$ such that $f(h_n) \to l$ as $n \to \infty$. In particular, for some large enough $n_0$, it holds that $f(h_{n_0}) < L$. But then $$\inf_{a\in A} \inf_{b \in B} f(a,b)\leq\inf_{b \in B} f(\alpha_{n_0},b)\leq f(\alpha_{n_0},\beta_{n_0})=f(h_{n_0})<L,$$
which is a clear contradiction. Hence, $l=L$.
