Another model-theoretic exercise from Smirnov's book.
Problem: Construct infinite family of varieties such that their union is not axiomatizable.
My solution: Denote by $\mathcal{A}_n$ the variety of all groups satisfying the sentence $\varphi_n : (\forall x) x^n = e.$ Let $\mathcal{A} = \bigcup_{i = 1}^{\infty}\mathcal{A_i}.$ In order to prove that $\mathcal{A}$ is not axiomatizable class I am trying to prove that it is not closed under ultraproducts.
There is a statement in the book:
Assume a class $\mathcal{K}$ is closed under ultraproducts and satisfies infinite disjunction $\bigvee_{i = 1}^{\infty} \varphi_n$, then it satisfies some finite disjunction $\varphi_{i_1} \vee \dots \vee \varphi_{i_n}.$
$\mathcal{A}$ satisfies $\bigvee_{i = 1}^{\infty} \varphi_n$, but for every finite disjunction $\varphi_{i_1} \vee \dots \vee \varphi_{i_n}$ we can choose $\mathbb{Z}_p$, where $p$ is relatively prime to each $i_k$, $k = \overline{1, n}$, which does not satisfy this disjunction. So $\mathcal{A}$ satisfies no finite disjunction and by the proposition above it is not closed under ultraproducts and hence is not axiomatizable.
Question: Is this proof correct? I am new to model theory, but I am convinced that there is more elegant proof which uses the compactness theorem directly. Can you explain me on this example how to use the compactness theorem for disproving axiomatizability? Thank you!