I was watching some video lecture, and the following fact was left as an exercise: If $U$ is a universal set in $\Sigma_k$ (i.e. $U$ itself is $\Sigma_k$, and for any $V$ that is $\Sigma_k$, we have $x\in V\iff \exists n : (n,x)\in U$, i.e., all $\Sigma_k$ sets can be obtained as sections of $U$) and if it is $\Pi_k$, then $D=\{x:(x,x)\in U\}$ is also $\Pi_k$.
I must be missing something, but isn't it kind of obvious?
Since $U\in \Pi_k$, there is a computable $R\subset N^{2k+2}$ such that
$(a,b)\in U\iff \forall y_1\exists y_2\dots\exists y_k R(a,b,y_1,\dots,y_k)$
In particular, this holds for $a=b=x$. So
$x\in D\iff (x,x)\in U\iff \forall y_1\exists y_2\dots\exists y_k R(x,x,y_1,\dots,y_k)$
and hence $D$ is $\Pi_k$.
Are there any flaws in this proof?
Yup, the argument is that simple!
Specifically, given any $X\subseteq\mathbb{N}^2$, let $diag(X)=\{x: (x,x)\in X\}$. Then since $diag(X)$ is defined using $X$ only positively (that is, no clauses of the form "$\not\in X$") and only applies computable operations to $x$ (that is, the function $\mathbb{N}\rightarrow\mathbb{N}^2:x\mapsto (x,x)$ is computable), the set $diag(X)$ will live in exactly the same "reasonable complexity classes" as $X$ itself. I'm not going to define "reasonable complexity class," since in fact I don't have a definition for it, but it applies to each of the $\Sigma_k$, $\Pi_k$, and $\Delta_k$ classes.
This lets you prove (as you commented) that a $\Sigma_k$-universal set is not $\Pi_k$. Together with the construction of a $\Sigma_k$-universal set in the first place, this shows that the arithmetical hierarchy doesn't collapse. Another application is the nonexistence of $\Delta_k$-universal sets: if $U\subseteq\mathbb{N}^2$ is $\Delta_k$, then so is $A_U:=\{u: (u,u)\not\in U\}$ (since it's the complement of $\{u: (u,u)\in U\}$, which is $\Delta_k$ per the above observation, and the class $\Delta_k$ is closed under complements). But per Cantor we can't have $A_U$ be any of the "rows" of $U$.