Let $A$ be an $n\times n$ real symmetric random matrix. Then $A$ has a spectral decomposition $A=Q\Lambda Q'$ with $Q$ orthogonal and $\Lambda$ diagonal. Am trying to show that we can choose $Q$ and $\Lambda$ to be random matrices, i.e. to have measurable entries.
Let $M_n$ denote the space $n\times n$ real matrices, and let $S_n$ denote the subspace of symmetric matrices in $M_n$. I endow $M_n$ with the Frobenius norm and the corresponding metric topology. I will use the following principle of measurable choice proven here:
Theorem. Let $X,Y$ be complete separable metric spaces and $E$ a closed $\sigma$-compact subset of $X\times Y$. Then $\pi_1(E)$ is a Borel set in $X$ and there exists a Borel function $\varphi:\pi_1(E)\to Y$ whose graph is contained in $E$. (Here $\pi_1$ denotes the projection of $X\times Y$ on $X$).
Let $X=M_n$, $Y=M_n\times M_n$ and
$$E=\bigg\{\big(A,Q,\Lambda\big)\in M_n\times M_n\times M_n: A \text{ is symmetric}, U \text{ is orthogonal},\Lambda \text{ is diagonal}\text{ and } A=Q\Lambda Q' \bigg\}$$
By identification of $M_n$ and $M_n\times M_n$ with $\mathbb{R}^{n^2}$ and $\mathbb R^{2n^2}$ we see that $X,Y$ are separable complete metric spaces, and by identification of $M_n\times M_n\times M_n$ with $\mathbb R^{3n^2}$ we see that $E$ is $\sigma$-compact. Using the sequential characterization of a closed set in a metric space and continuity of matrix multiplication we see that $E$ is closed. By the spectral theorem we have $\pi_1(E)=S_n$.
Therefore the above theorem provides us with a Borel function $\varphi:S_n\to M_n\times M_n$ whose graph is contained in $E$, i.e. such that $\varphi_1(A)$ is orthogonal, $\varphi_2(A)$ is diagonal and $A=\varphi_1(A)\varphi_2(A)\varphi_1(A)'$ for all $A\in S_n$. Since projections are continuous, $\varphi_1,\varphi_2:S_n\to M_n$ are also Borel measurable.
$A$ being a random matrix means that each entry of $A$ is a random variable on some measure space $(\Omega,\mathcal F)$. By identification of the measure spaces $(M_n,\mathcal B(M_n))$ and $(\mathbb{R}^{n^2},\mathcal B(\mathbb{R}^{n^2}))$ we see that $A:\Omega\to M_n$ is Borel measurable. By assumption $A$ take values in the closed subset $S_n$ of $M_n$, and so in fact $A:\Omega\to S_n$ is Borel measurable.
We conclude that the composition maps $\omega\mapsto Q(\omega):= \varphi_1(A(\omega))$ and $\omega\mapsto \Lambda(\omega):=\varphi_2(A(\omega))$ from $\Omega$ to $M_n$ are both Borel measurable and such that $A(\omega)=Q(\omega)\Lambda(\omega)Q'(\omega)$ for all $\omega\in\Omega$.
Is this proof legitimate? Thank you for your help.