Let $f_i:(X,\Sigma)\to\mathbb R^2$ be Borel measurable maps for $1\leq i\leq n$. Consider the map $f:(X,\Sigma)\to\mathbb R^2$ defined pointwise by
$$f=\min_{1\leq i \leq n} f_i$$
where the minimum is taken with respect to the lexicographic (dictionary) order on $\mathbb R^2$.
Question: How can I show that $f$ is Borel measurable?
My Attempt:
A function $g:(X,\Sigma)\to\mathbb R^2$ is Borel measurable if and only if $\pi_1(g),\pi_2(g):(X,\Sigma)\to\mathbb R$ are Borel measurable, where $\pi_1,\pi_2$ denote respectively the first and second projection maps.
By definition of dictionary order we have
$$ \pi_1(f)=\min_{1\leq i \leq n} \pi_1(f_i)$$
so $\pi_1(f)$ is Borel measurable. For each $1\leq i\leq n$ let $A_i:=\{ \pi_1(f_i)=\pi_1(f)\}\in \Sigma$ and define $g_i:(X,\Sigma)\to\overline{\mathbb R}$ by
$$g_i=\pi_2(f_i)1_{A_i}+\infty1_{A^c_i}$$
Then each $g_i$ is $\mathcal B(\overline{\mathbb R})$ measurable and we have
$$ \pi_2(f)=\min_{1\leq i \leq n} g_i$$
so $ \pi_2(f)$ is Borel measurable. We conclude that $f$ is Borel measurable.
Is this correct?
Notice that for any pair $(a,b),(x,y)\in\mathbb{R}^2$
$$\begin{align} \ell((a, b), (x, y))=\min_{lex}((a,b),(x,y))&=(a,b)\Big(\mathbb{1}(a<x)+\mathbb{1}(a=x, b\leq y)\Big)\,+\\ &\qquad (x,y)\Big(\mathbb{1}(x<a)+\mathbb{1}(x=a,y<b)\Big) \end{align} $$ Clearly $\ell$ is $\mathscr{B}(\mathbb{R}^2)\otimes\mathscr{B}(\mathbb{R}^2)$ --$\mathscr{B}(\mathbb{R}^2)$ measurable, for $\ell$ is the sum of measurable functions.
If $\mathbf{x}_1,\ldots,\mathbf{x}_n\in\mathbb{R}^2$, then $$\ell_n(\mathbf{x}_1,\ldots,\mathbf{x}_n):=\min_{lex}(\mathbf{x}_1,\ldots,\mathbf{x}_n)=\ell(\mathbf{a}_1,\ell_{n-1}(\mathbf{x}_2,\ldots,\mathbf{x}_n))$$ It follows by induction that each $\ell_n$ is $\mathscr{B}^{\otimes n}(\mathbb{R}^2)$-$\mathscr{B}(\mathbb{R}^2)$ measurable.
The result in the OP follows as $f=\min_{lex}(f_j:1\leq j\leq n)$ is a composition of measurable functions.