Existence of countably generated free algebra in the universal class I'm trying to solve the following exercise (from Smirnov's "Varieties of algebras"):
Problem:

Let $K$ be the universal class of $\Omega$-algebras, i.e. $K = Mod(\Sigma)$, where $\Sigma$ is the set of sentences which are the universal closures of some set of formulas of the form: $F_1 \vee \dots \vee F_k$, where each $F_i$ is the atomic $\Omega$-formula or its negation. If $\forall n \in \omega$ there exists $K$-free algebra $\mathfrak{F}_K(n)$ of rank $n$, then there exists $K$-free algebra $\mathfrak{F}_K(\omega)$ of countable rank.

Attempted solution:
Let $t_1, t_2, \dots, t_n$ be the generators of $\mathfrak{F}_K(n)$. For all $n \in \omega$ there is an embedding $i_n\colon F_K(n) \to F_K(n + 1)$, which is the identity mapping on the set of generators of $\mathfrak{F}_K(n)$. So we identify $\mathfrak{F}_K(n)$ with the subalgebra $i_n(\mathfrak{F}_K(n))$ of $\mathfrak{F}_K(n + 1)$, $\forall n \in \omega$.
My idea is to take $F_K(\omega) = \bigcup_{n < \omega} F_K(n)$ as a universe of $\mathfrak{F}_K(\omega)$ and for any $f \in \Omega_n$ we define: $$f^{\mathfrak{F}_K(\omega)}(a_1, \dots, a_n) = f^{\mathfrak{F}_K(m)}(a_1, \dots, a_n),$$ for suffiently large $m \in \omega: a_1, \dots, a_n \in F_K(m)$. Hence $\mathfrak{F}_K(\omega)$ is the $\Omega$-algebra.
Let $\phi \in \Sigma$ be some sentence of the form $\forall x_1 \dots \forall x_n(F_1 \vee \dots \vee F_k).$ Choose arbitrary elements $a_1, \dots, a_n \in F_K(\omega)$ and $m \in \omega: a_1, \dots, a_n \in F_K(m)$. 
Since $\mathfrak{F}_K(m) \in K$ we have $\mathfrak{F}_K(m) \models \phi$, then $\mathfrak{F}_K(\omega) \models F_1(a_1, \dots, a_n) \vee \dots \vee F_k(a_1, \dots, a_n),$ hence $\mathfrak{F}_K(\omega) \models \phi$, which means that $\mathfrak{F}_K(\omega) \in K$.
Choose some $X = \{x_1, x_2, \dots, x_n, \dots\}$ and $i \colon X \to F_K(\omega), x_n \mapsto t_n \in F_K(n)$, an arbitrary algebra $\mathfrak{A} \in K$ and let $\psi \colon X \to A$ be some mapping. We need to show that there exists the homomorphism $\hat{\psi} \colon F_K(\omega) \to A$ such that $\hat{\psi}i = \psi$. 
Let $x \in F_K(\omega)$, it means that $x = t(x_1, \dots, x_m)$, where $t(x_1, \dots, x_m)$ is some $\Omega$-term over $\{x_1, \dots, x_m\}$. Hence $x \in F_K(m)$ and since $\mathfrak{F}_K(m)$ is $K$-free there is a homomorphism $\psi_m \colon F_K(m) \to A$, which extends $\psi$. Set $\hat{\psi}(x) = \psi_m(x)$.
Questions:


*

*Is this construction yields the desired result? Is my reasoning correct? I think I should also prove that all operations of $\mathfrak{F}_K(\omega)$ and $\hat{\psi}$ are well-defined or this is obvious in case of this construction?

*Am I supposed to use the direct limit construction here and take $\mathfrak{F}_K(\omega) = \varinjlim \mathfrak{F}_K(n)$? Or this is not that case?

*What are the weakest conditions on the class of algebras to be closed under taking the direct limits? I have used only the universality of sentences, but not the part about atomic formulas or its negations and it seems strange.
Thank you in advance!
 A: Regarding 1. and 2., your solution is correct, and yes, it's a special case of the direct limit construction. Checking that the operations on $\mathfrak{F}_K(\omega)$ are well-defined is a special case of checking that that definition of the direct limit makes sense, and the well-definedness of $\hat{\psi}$ follows from the universal property of the direct limit. Whether you need to check these things probably depends on how comfortable you are with direct limits. 
Regarding 3., it's a well-known theorem in model theory that an elementary class $K$ (i.e. the class of models of some first-order theory) is closed under direct limits if and only if it is $\forall\exists$-axiomatizable (i.e. axiomatizable by sentences of the form $\forall \overline{x}\, \exists \overline{y}\, \phi(\overline{x},\overline{y})$, $\phi$ quantifier-free). There may be weaker conditions on non-elementary classes of algebra, but these tend to be much harder to say anything about...
For a reference, see Theorem 5.4.9. in Hodges' A Shorter Model Theory. This theorem just covers the case of unions of chains, but the extension to arbitrary direct limits is not hard - its an exercise in the corresponding section of Hodges' longer Model Theory.
You write "I have used only the universality of sentences, but not the part about atomic formulas or its negations and it seems strange." That part of the problem is just pointing out that any set of universal sentences is equivalent to one of the particular form given. To see this, recall that any quantifier-free formula $\phi$ is equivalent to one in "conjunctive-normal form": $\bigwedge_{i = 1}^n \bigvee_{j = 1}^m \psi_{i,j}$, where each $\psi_{i,j}$ is an atomic formula or its negation. Then, since universal quantifiers distribute over conjunction, we can replace the formula $\forall\overline{x}\,\bigwedge_{i = 1}^n \bigvee_{j = 1}^m \psi_{i,j}$ with the set of formulas $$\{\forall \overline{x} \bigvee_{j = 1}^m \psi_{i,j}\mid 1 \leq i \leq n\}.$$
Finally, I think the statement of the problem is a little off, owing to a translation problem with the words "a" and "the" in English. It should read:

Let $K$ be a universal class of $\Omega$-algebras, i.e. $K=\text{Mod}(\Sigma)$, where $\Sigma$ is a set of sentences which are the universal closures of some set of formulas of the form: $F_1\lor\dots \lor F_k$, where each $F_i$ is an atomic $\Omega$-formula or its negation.

As written, it sounds like $\Sigma$ should be the set of all universal $\Omega$-sentences. This set would be inconsistent or have only the empty model.
