\section{Introduction}

 We call a module $M$ \emph{countably pure-separable by pure-projectives} if every countable subset of $M$ is contained in a pure submodule of $M$ that is itself pure-projective. (A module is said to be \emph{pure-projective} if it is projective with respect to pure-exact sequences, which is equivalent to being a direct summand of a direct sum of finitely presented modules.) More than four decades ago, Raynaud and Gruson showed:
\begin{displaytext}\label{RG}
 A module is  Mittag-Leffler iff it is countably pure-separable by (in fact, countably generated) pure-projectives.
\end{displaytext}
One may take this as a definition. It implies that a countably generated module is Mittag-Leffler if and only if it is pure-projective. So `Mittag-Leffler' is a generalization of `pure-projective' (and `flat Mittag-Leffler' of `projective').
 The author, more than two decades ago, proved:
 \begin{displaytext}\label{MT}

A module is Mittag-Leffler iff it is positively atomic,
 \end{displaytext}
  in the sense that the positive primitive (henceforth \emph{pp}) type of every finite tuple in $M$ be finitely generated. This model-theoretic condition---to be explained below---makes many of the algebraic properties of Mittag-Leffler modules very transparent and easy to prove.

  For instance, since the pp type of a tuple  from $M$ does not change when passing to a pure submodule containing it  or when passing to a pure supermodule of $M$, one sees at once:
\begin{displaytext}\label{purechains}
 The union of a pure chain of Mittag-Leffler modules is Mittag-Leffler.
 \end{displaytext}
 Results (\ref{RG}) and (\ref{purechains}) imply:
\begin{displaytext}\label{RGdense}
The countably generated (automatically pure-projective) pure submodules of a Mittag-Leffler module form an $\aleph_1$-dense system,
\end{displaytext}
in the sense of  \cite[Def.\,2.4]{HT}:
\begin{displaytext}\label{aleph1dense}
An $\aleph_1$-dense system of a module $M$ is an upward directed system $\mathcal C$ of submodules of $M$ satisfying
\begin{enumerate}  [\upshape (a)]
  \item every countable subset of $M$ is contained in a member of $\mathcal C$;
  \item $\mathcal C$ is closed under unions of countable chains.
\end{enumerate}
\end{displaytext}
Note, this definition is a slight weakening of  \cite[Def.IV.1.1]{EM}, where, as an additional condition,  every member of $\mathcal C$ is required to be countably generated (in which case directedness of $\mathcal C$ is entailed by (a)).

A Mittag-Leffler module $M$  trivially has $\mathcal C=\{M\}$ as an $\aleph_1$-dense system of Mittag-Leffler submodules, but the one given in (\ref{RGdense}) is much more meaningful and,
by (\ref{MT}),  the converse of   (\ref{RGdense})  is true as well:
\begin{displaytext}\label{densepure}
A module $M$ is a Mittag-Leffler module iff it has an $\aleph_1$-dense system of Mittag-Leffler modules each of which is \emph{pure} in $M$  iff it has an $\aleph_1$-dense system of (countably generated) pure-projective modules each of which is \emph{pure} in $M$.
\end{displaytext}
Next we see how to drop `pure' in (\ref{densepure}).  In view of (\ref{MT}), a straightforward argument about finite generation of types in unions of directed systems of submodules yields:
\begin{displaytext}\label{3.6}
Suppose $M$ is the union of a directed system of submodules, $\mathcal C$, all of whose members are Mittag-Leffler.  Then $M$ is Mittag-Leffler iff every finite tuple $\bar{m}$ of $M$ is contained in a member $C_{\bar{m}}$ of $\mathcal C$ such that, for every $C\in \mathcal C$ containing $C_{\bar{m}}$, the pp type of $\bar{m}$ is the same whether considered in  $C_{\bar{m}}$ or in $C$.
  \end{displaytext}
 This condition requires precisely what is needed to make up for the dropped purity condition on the members of $\mathcal C$. Namely, it says that if a finite system of linear equations, given in matrix form as $\mathfrak B\bar y=\mathfrak A\bar m$, has a solution in $M$ (that is, in some  $C\supseteq C_{\bar{m}}$), it already has one in $C_{\bar{m}}$.
(A more general statement for direct limits, but essentially the same simple argument, has been made explicit in  \cite[Lemma 3.6]{PR}, see Lemma \ref{tails} below.)

If such a union $M=\bigcup\mathcal C$ is not Mittag-Leffler, there must be, by (\ref{3.6}), a tuple $\bar{m}$ in $M$ and an $\omega$-chain $C_0\subset C_1\subset C_2\subset \ldots $ in $\mathcal C$ such that the pp type of $\bar{m}$ keeps increasing (i.e., more and more equations   $\mathfrak B\bar y=\mathfrak A\bar m$   have a solution) when going up the chain. Then, by  (\ref{3.6}) applied to the directed system of the $C_i$ and their union $M'$, the module $M'$ is not Mittag-Leffler, that is:
\begin{displaytext}\label{omega}
If $\mathcal C$ is a  directed system of submodules of a module, then its union is Mittag-Leffler provided the union of every $\omega$-chain in $\mathcal C$ is.
  \end{displaytext}
This yields the missing direction of the strengthening of (\ref{densepure}) where purity is no longer required, see \cite[Cor.2.6]{HT} (whose proof is purely algebraic):
\begin{displaytext}\label{fulldense}
A module is Mittag-Leffler iff it has an $\aleph_1$-dense system of Mittag-Leffler modules  iff it has an $\aleph_1$-dense system of (countably generated) pure-projective modules.
\end{displaytext}

\textbf{The flat case.} One can  specialize
 the above to flat Mittag-Leffler modules by replacing `pure-projective' by `projective' and `finitely presented' by `finitely generated projective' (see  \cite{habil} for this), because
\emph{flat $+$ pure-projective $=$ projective} and hence \emph{flat $+$ finitely presented $=$ finitely generated projective}. In a `pure situation' this is immediate. For dense systems of not necessarily pure submodules, one may either repeat the above argument under the extra assumption of flatness, or, more elegantly, simply apply the following to the corresponding statements above.
\begin{displaytext}\label{flatdense}
A module is flat if and only if it has an $\aleph_0$-dense system of flat submodules.
\end{displaytext}
Here, naturally, $\aleph_0$-dense systems are defined like $\aleph_1$-dense systems in (\ref{aleph1dense}) above with `countable' replaced by `finite.' Then condition $(b)$ becomes vacuously true and so an $\aleph_0$-dense system in a module $M$ is simply an upward directed collection $\mathcal C$ of submodules of $M$ such that every finite subset of $M$ is contained in a member of $\mathcal C$. (Again, one direction is trivial: take $\mathcal C=\{M\}$.)

Either way, one deduces at once the following flat versions of (\ref{fulldense}), which was given an algebraic proof in \cite[Thm.2.9]{HT}:
\begin{displaytext}\label{flatMLdense}
A module is flat and Mittag-Leffler iff it has an $\aleph_1$-dense system of flat Mittag-Leffler modules  iff it has an $\aleph_1$-dense system of (countably generated) projective modules.
\end{displaytext}

\textbf{Contents.} In this paper, all of the above, except the previously mentioned flat case, will be done for relativized  Mittag-Leffler modules as introduced and for the first time systematically studied in \cite{habil},  and continued in \cite{AH}, \cite{HT} and others. The concordance for the relativized versions is:
(\ref{RG}) is Cor.\,\ref{Cor}(1) and Cor.\,\ref{puresep},
(\ref{MT}) is Thm.\,\ref{MThm},
(\ref{purechains}) is (part of) Cor.\,\ref{Cor}(1),
(\ref{3.6}) is Lemma \ref{tails},
(\ref{omega}) is Cor.\,\ref{closedunion}, and
(\ref{fulldense}) is Cor.\,\ref{denserel} and Prop.\,\ref{ctblesep}.

In Section \ref{KMLSect},  $\mathcal K$-Mittag-Leffler modules are introduced and their main properties developed. The classical case is that of  $\mathcal K=\text{\rm Mod-}R$. This and two others,  $\mathcal K$, the class $\flat_R$ of flat right $R$-modules, and  $\mathcal K$,  the class $\sharp_R$ of absolutely pure right $R$-modules, are considered in Section \ref{specialcases}. The fundamental countable separation result (\ref{RG}) (and thus the left-to-right direction of (\ref{fulldense})) above is proved for arbitrary $\mathcal K$-Mittag-Leffler modules in Section \ref{separation}, see Prop.\,\ref{ctblesep} and Cor.\,\ref{puresep}. For this,  one needs to relativize purity as well, which is done in the first part of Section \ref{Fpure}, the rest of which is preparation for the final
Section \ref{countablygenerated}, where countably generated $\mathcal K$-Mittag-Leffler modules are characterized.

\textbf{A general remark.} The point of the model-theoretic perspective taken here and in the previous work \cite{habil} is not to make possible all sorts of relativizations---it has been subsequently shown, for instance in \cite{AH}, that this can be done completely algebraically. The point rather is, and this applies to Mittag-Leffler modules in general---relativized or not---that this perspective reveals some features of the concept that have gone unnoticed previously. Take, for instance, the ease with which direct limits of  Mittag-Leffler modules can be treated, as in (\ref{omega}) above (and Section  \ref{imm} below for relativizations),  or the role of definable subcategories as revealed by  the relativized version of  (\ref{MT}), Theorem \ref{MThm}  below (and Sections  \ref{consequences} and \ref{test}), which showed---if stated in different terms---that the very concept of $\mathcal K$-Mittag-Leffler module depended only on the definable subcategory $\mathcal K$ generates.

\textbf{Thanks!} I wish to thank the referee for helpful comments resulting in improved  readability of this work.

\section{Preliminaries}
Most of the preliminaries can be found in Mike Prest's two monographs, \cite{P} and \cite{P2}, where the latter is closer in style to current usage. I will largely use its notation---with a few exceptions that are rather self-explanatory. \cite{habil} may also serve as an introduction with all necessary detail.

I freely use the fundamental tool of \emph{pp formulas} (called  \emph{pp condition} in  \cite{P2})\footnote{One may work with Zimmermann's (equivalent) concept of \emph{finite matrix group} and the correponding \emph{p-functors} or the subgroups of finite definition of Gruson and Jensen \cite{GJ} instead.}
and the lattice order $\leq$ between them, often adorned by a class $\mathcal L\subseteqR\text{\rm -Mod}$.

\subsection{Modules and tuples}  Module means \emph{left module} (unless otherwise indicated) over an associative ring $R$ with $1$.

A \emph{tuple} is a finite sequence. Given an $i$-tuple $\bar r = (r_0, \ldots, r_{i-1})$ of ring elements and an $i$-tuple $\bar m = (m_0, \ldots, m_{i-1})$ of elements of a module $M$,
I use $\bar r \,\bar m$ to denote the corresponding linear combination, i.e.,  $\bar r \,\bar m=\sum_{j<i} r_i m_i$. In doing so I  assume that those tuples match and that the tuple $\bar m$ is tacitly transposed to a column vector. (This is for left modules. For right modules it would, naturally, be the other way around.)

It is convenient to expand (this is the syntactic term) a module $M$ by a tuple $\bar m$ from $M$. The resulting object is denoted $(M, \bar m)$, an \emph{$i$-pointed module}. Morphisms in the pointed category are supposed to send each entry of a (source) tuple to the corresponding  entry of the (target) tuple.

I use $\langle\, \rangle$ for generation of various objects.  If $C\subseteq M$, then , or more precisely, $\langle\, C\rangle_M$, denotes the submodule of $M$ generated by $C$. In the lattices of pp formulas (see below),
specifically, for finite generation of types, these symbols are used thus: $\langle \phi\rangle_{\mathcal L} = \{\psi\,|\, \phi\leq_{\mathcal L}\psi\}$. For a class $\mathcal K$ of modules, $\langle\, \mathcal K\rangle$ denotes the definable subcategory generated by $\mathcal K$, see Section \ref{defcat} below.

$\mathop{{\rm Add}}\nolimits({\mathcal K})$    (resp., $\mathop{{\rm add}}\nolimits({\mathcal K}))$ denotes the smallest class of modules containing $\mathcal K$  that is closed under  direct summands and (resp., finite) direct sum.
${\rm Zg}_R$ stands for the Ziegler spectrum of $R\text{\rm -Mod}$, that is the space of  indecomposable pure-injective left $R$-modules as introduced in \cite{Zie}, cf.\, \cite{P} or \cite{P2}.

\subsection{Formulas and types} The atomic formulas (in the common first-order language of $R$-modules where the scalars figure as unary function symbols) are precisely the linear equations over $R$.  But for us the more important syntactic object are the finite conjunctions of atomic formulas, which are also known as \emph{quantifier-free pp formulas},  the term I use. These are the finite (homogeneous) systems of  linear equations (over the ring). We write them in matrix form with two kinds of variables, $\mathfrak A \bar x \doteq\mathfrak B \bar y$, where $\mathfrak A$ and $\mathfrak  B$ are matching matrices  over $R$. Given such a  quantifier-free pp formula $\alpha=\alpha(\bar x, \bar y)$, we obtain a typical \emph{pp formula} by existentially quantifying out $\bar y$, that is,  $\exists \bar y\alpha$, or,  more explicitly,  $ \exists \bar y\alpha(\bar x, \bar y)$, which we also write as  $\mathfrak B | \mathfrak A \bar x$.

Denote this formula by $\phi$ or $\phi(\bar x)$.  In any given module $M$ it defines the set, $\phi(M)$, of all $l(\bar x)$-tuples $\bar a$ for which the inhomogeneous system  $\alpha(\bar a, \bar y)$ has a solution  in $M$. Obviously, $\phi(M)$ forms an additive group, in fact, a subgroup of $M^{l(\bar x)}$.  It is  called a(n \emph{$l(\bar x)$-place}) \emph{pp subgroup} of $M$. Clearly, $\phi(M)$ is the projection of $\alpha(M)$ onto the first $l(\bar x)$ coordinates.

It is easily verified that the $n$-place pp subgroups of $M$   form a sublattice, denoted by $\Lambda^n(M)$, of the subgroup lattice of $M^n$.

In fact, the $n$-place pp formulas themselves form a lattice, whose meet is conjunction $\wedge$ and whose join is $+$. We  denote this lattice  by $_R\Lambda^n$ (and for right $R$-modules by $\Lambda^n_R$). It turns into $\Lambda^n(M)$ when specialized at $M$. When we specialize it at a class $\mathcal L$, we obtain a lattice whose order plays a major role in this work and is discussed in the next subsection.

A \emph{pp $n$-type} is a subset of $_R\Lambda^n$. Of particular importance are those that form a filter in $_R\Lambda^n$, as  the \emph{pp type} of a  given  $n$-tuple $\bar a$ in $M$, denoted  ${\rm{pp}}_M(\bar a)$, which is, by definition, the collection of all $n$-place pp formulas $\bar a$ satisfies in $M$. The \emph{quantifier-free pp type} of  $\bar a$ in $M$, denoted ${\rm{qf}}_M(\bar a)$, is the subset  consisting of all quantifier-free pp formulas in  ${\rm{pp}}_M(\bar a)$.

It is easily seen that every pp formula (and thus every pp type) constitutes a subfunctor of the forgetful functor $R\text{\rm -Mod} \to \mathop{\text Ab}$, from left $R$-modules to abelian groups.

While often times  the actual lengths  of tuples are irrelevant,  care has to be taken, however, that they match. It is assumed that they (as well as sizes of corresponding matrices) \emph{always} do.

\subsection{The lattice order}\label{latord}
Given pp formulas  $\phi$ and $\psi$, I use $\phi\leq_{\mathcal L}\psi$ to mean that the sentence $\forall \bar x (\phi(\bar x)\rightarrow\psi(\bar x))$ is true in all members of $\mathcal L$. We say $\psi$ is \emph{$\mathcal L$-implied} by $\phi$. When the class $\mathcal L$ is a singleton $L$, I simple write $\phi\leq_{L}\psi$ for $\phi\leq_{\{L\}}\psi$. When $\mathcal L=R\text{\rm -Mod}$, the subscript will be dropped.

Equivalence is denoted by $\sim$  (which stands for `$\leq$ \emph{and} $\geq$'),  adorned or unadorned. So to be  \emph{$\mathcal L$-equivalent}, i.e., $\phi\sim_{\mathcal L}\psi$, means that  $\phi$ and $\psi$ are equivalent everywhere in ${\mathcal L}$ (hence everywhere in $\langle \mathcal L\rangle$, see Section \ref{defcat}).

All this extends to types in an obvious fashion. Given two pp-$n$-types $p$ and $q$, I say $q$ is \emph{$\mathcal L$-implied} by $p$ and write $p\leq_{\mathcal L} q$ if, in every member $L$ of $\mathcal L$, every realization (= solution) of $p$ realizes $q$ as well. (That is, $p\leq_{\mathcal L} q$ really means $\bigwedge p  \leq_{\mathcal L} \bigwedge q$.) Note, if $p={\rm{pp}}_L(\bar a)$ with $L\in \mathcal L$, then $p\leq_{\mathcal L} q$ if and only if $q\subseteq p$ (iff $p\leq  q$), but if $p={\rm{pp}}_M(\bar a)$ with $M$ \emph{not} in $\mathcal L$, no such relationship is entailed in general.
The proper context for this relation between types is therefore that of the definable subcategory generated by $\mathcal L$.

\subsection{Definable subcategories}\label{defcat}
A \emph{definable subcategory} of left $R$-modules is a full subcategory of $R\text{\rm -Mod}$ whose object class is the model class of a set of pp implications, i.e., of statements of the form $\forall \bar x (\phi(\bar x)\rightarrow \psi(\bar x))$ where $\phi$ and $\psi$ are pp formulas whose free variables are among those of $\bar x$. This is equivalent to  being closed under direct product, direct limit and pure submodule, cf.\  \cite{purity} or \cite[Thm.3.4.7]{P2}.

It is clear from the definition that every class  $\mathcal L$ of left $R$-modules is contained in a smallest definable subcategory (namely the intersection of all of those that contain $\mathcal L$), which is denoted by $\langle \mathcal L \rangle$ and called the  \emph{definable subcategory generated by $\mathcal L$}. Here is a concrete way to obtain it: if ${\rm T}_{\mathcal L}$ denotes the set of axioms $\{\forall \bar x (\phi(\bar x)\rightarrow \psi(\bar x))\,|\, \phi\leq_{\mathcal L}\psi\}$ (together with the axioms for left $R$-modules), $\langle \mathcal L \rangle$ is the class of models of ${\rm T}_{\mathcal L}$, i.e., the class of modules for which all of those implications hold. That is, $C\in\langle\mathcal L\rangle$ iff $\phi\leq_{\mathcal L}\psi$ implies $\phi\leq_{C}\psi$.

Note, two classes $\mathcal L$ and $\mathcal L'$ generate the same definable subcategory if and only if the corresponding lattice orderings on pp formulas, $\leq_{\mathcal L}$ and $\leq_{\mathcal L'}$, are the same. In particular, $\leq_{\mathcal L}$ and $\leq_{\langle\mathcal L\rangle}$ are the same---at least on formulas.

As a  special case  we have that $\leq_{R\text{\rm -Mod}}$, $\leq_{R\mathop{-\rm mod}}$ and $\leq_{_R{\rm Zg}}$ (with $_R{\rm Zg}$ the left Ziegler spectrum of $R$) are the same.
More cases are listed in Corollary \ref{sameside} below.

 The lattice orderings of $\mathcal L$-implication between types as introduced above behave better when the context indicated by the subscript is a definable subcategory (as then compactness of first order logic is available).

\begin{rem}\label{Limpltypes}
Let $p$ and $q$ be pp types of the same arity with $p$ closed under finite conjunction. Then  $p\leq_{\langle\mathcal L\rangle}q$ if and only if
for all $\psi\in q$ there is $\phi\in p$ such that $\phi\leq_{\mathcal L}\psi$.

First of all, $p \leq_{\mathcal L} q$ if and only if $p \leq_{\mathcal L} \psi$ for all $\psi\in q$ (and this is true for \emph{any} $\mathcal L$). But as $\langle\mathcal L\rangle$ is first order axiomatizabl
, the statement $p \leq_{\langle\mathcal L\rangle} \psi$ is equivalent to the inconsistency  of $p\cup \{\neg\psi\}$ (with  ${\rm T}_{\mathcal L}$). By compactness, we can replace $p$ by a finite subset. Finite conjunctions of pp formulas being pp, a single $\phi$ from $p$ will do. But inconsistency of $\{\phi\wedge\neg\psi\}$ with  ${\rm T}_{\mathcal L}$ means
$\phi\leq_{\mathcal L}\psi$.
\end{rem}

\begin{rem} This may be a good opportunity to emphasize why sometimes $\langle\mathcal L\rangle$ and sometimes only $\mathcal L$.
In order  to apply compactness to a statement $p \leq_{\mathcal X} \phi$ when $p$ is an infinite type, we need $\mathcal X$ to be axiomatizable (so we take $\mathcal X=\langle\mathcal L\rangle$). In contrast, for $\phi  \leq_{\mathcal X}  q$  it doesn't matter, because all that says is that $\phi  \leq_{\mathcal X} \psi$ for every $\psi\in q$, so we can go interchangeably  with  $\mathcal X=\langle\mathcal L\rangle$ or  $\mathcal X=\mathcal L$.
\end{rem}

\begin{rem}\textbf{}
\begin{enumerate}[\upshape(1)]
\item
\cite[Fact 7.7.]{purity} about pure embeddability of any structure from $\langle \mathcal K\rangle$ in a reduced product of structures from $\mathcal K$ shows that in order to generate the definable subcategory, one may first take all direct products, then all direct limits, and finally all pure substructures; see also the note before \cite[Prop.3.4.9]{P2}. This is true for any first-order structures, not just modules, cf.\,\cite{purity}.
 \item It is easy to check that for $\mathcal K\subseteq\mathcal K'\subseteq\mathop{{\rm Add}}\nolimits(\mathcal K)$, the preorders $\leq_\mathcal K$ and $\leq_{\mathcal K'}$ are the same, hence  $\mathcal K$,  $\mathcal K'$, and $\mathop{{\rm Add}}\nolimits(\mathcal K)$ generate the same definable subcategories.
\end{enumerate}
\end{rem}

\subsection{Elementary duality}
\emph{Elementary duality} as introduced by Prest and further developed by Herzog is a major tool to switch sides. Namely, for all $n$, this duality, denoted by $\rm{D}$,  constitutes an anti-isomorphism between the  lattices $_R\Lambda^n$ and   $\Lambda^n_R$, see \cite{P}, \cite{P2},  \cite{Her},  \cite{ZZ-H}, or \cite{habil} for an introduction.

Elementary duality turns the relation $\leq_{\mathcal K}$ upside down in $\rm{D}\mathcal K$, the class of all character duals of members of $\mathcal K$ (here we use character modules obtained by hom-ing into $\mathbb Q/\mathbb Z$). More precisely,  $\phi\leq_{\mathcal K}\psi$ if and only if $\rm{D}\psi\leq_{\rm{D}\mathcal K}\rm{D}\phi$.

The use of $D$ is illustrated by the following elegant criterion for a tensor to be zero. Note that we take the same liberty as in linear combinations and write $\bar n \otimes \bar m$ instead of  $\sum_{j<i} n_i  \otimes m_i$ (assuming, as always, that the tuples match).

\begin{fact}[Herzog's Criterion]\label{HC}
Given  a $k$-tuple  $\bar n$ in a right $R$-module $N$ and  a $k$-tuple $\bar m$ (of the same length) in a  left $R$-module $M$, the following are equivalent.
\begin{enumerate}[\upshape(i)]
\item $\bar n \otimes \bar m=0$
 \item There is a (left) $k$-place pp formula $\phi$ such that $\bar n\in\rm{D}\phi(N)$ and  $\bar m\in\phi(M)$.
 \item There is a (right) $k$-place pp formula $\phi$ such that $\bar n\in\phi(N)$ and  $\bar m\in\rm{D}\phi(M)$.
\end{enumerate}
\end{fact}

\begin{definition} By  \emph{definably dual classes}  we mean classes  ${\mathcal K}\subseteq\text{\rm Mod-}R$ and ${\mathcal L}\subseteqR\text{\rm -Mod}$ such that $\rm{D}\langle\mathcal  K  \rangle= \langle\mathcal  L  \rangle$.
\end{definition}

Since elementary duality goes both ways and is an involution,  this definition is completely symmetric. That is, $\cal K$ and $\mathcal L$ are definably dual iff $\langle\mathcal  K  \rangle=\rm{D}\langle\mathcal  L  \rangle$.

\begin{cor
Two families, ${\mathcal K}$ and ${\mathcal L}$,  of right, resp.\,left  $R$-modules are definably dual, provided any of the following holds.

\begin{enumerate}[\upshape(a)]
\item
$\phi\leq_\mathcal L\psi$ iff $\rm{D}\psi\leq_\mathcal K\rm{D}\phi$, for all left pp formulas $\phi$ and $\psi$.
 \item ${\mathcal L}$ consists of all character duals of members of ${\mathcal K}$.
 \item Any of the corresponding symmetric statements.
\end{enumerate}
\end{cor}

\begin{conv}\label{conv}
Unless indicated otherwise, $\cal K$ and $\mathcal L$ are \emph{\bf definably dual} classes of $R$-modules in the sense of the above definition.
\end{conv}

Prominent examples of this situation are the flat right $R$-modules $\mathcal K={\flat_R}$ and the absolutely pure left $R$-modules $\mathcal L={_R\sharp}$  \cite[Prop.3.4.26]{P2}, and the symmetric situation $\mathcal K=\sharp_R$ and $\mathcal L={_R\flat}$, considered in Sections  \ref{flat-ML} and \ref{sharp-ML} respectively. See \cite{Tf} for other examples.

\subsection{Finite generation of types}
Following \cite{P}, a pp type $p$ is called \emph{finitely generated} if there is a pp formula $\phi$ with $\langle \phi\rangle=p$. I emphasize that this means that $\phi\leq p$ \emph{and} $\phi\in p$. In \cite[Sect.2.1]{habil} this was relativized to any context $\mathcal L\subseteqR\text{\rm -Mod}$. Since there is a subtlety with partial types here (even when the context $\mathcal L$ is all of $R\text{\rm -Mod}$), let me be very precise. Consider $p$, the pp type of  a tuple $\bar a$ in a module $M$, i.e., $p={\rm{pp}}_M(\bar a)$. A subtype $q\subseteq p$ is said to be \emph{$\mathcal L$-finitely generated} if $q$ is  $\mathcal L$-implied by some $\phi\in p$, i.e., when there is $\phi\in p$ such that $q\subseteq\langle \phi\rangle_{\mathcal L}$, where $\langle \phi\rangle_{\mathcal L}=\{\psi\,|\,\phi \leq_{\mathcal L}\psi\}$.

Note, $p$ is $\mathcal L$-finitely generated iff it is $\mathcal L$-implied by some formula \emph{it contains}. No such assumption is made if $q$ is partial. The `generator' is only required to be in $p$, not in $q$. This will be of importance below where we will encounter finitely generated quantifier-free types, i.e., the case where $q={\rm{qf}}_M(\bar a)$. According to the definition just made, such $q$ is said to be $\mathcal L$-finitely generated when there is a pp formula true of $\bar a$---quantifier-free or not!---that  $\mathcal L$-implies $q$. Certainly $q$ is so generated when $p$ is. But we will see cases where $q$ is finitely generated, while $p$ is not.

Consider types $p={\rm{pp}}_M(\bar a)$ and $q={\rm{pp}}_N(\bar b)$ with  $p\leq_{\mathcal L} q$. If $p$ is $\mathcal L$-implied by a single formula $\phi$, so is $q$. But $\phi$ may not be in $q$ and thus  $q$ may not be $\mathcal L$-finitely generated in the sense of the definition above.

However, if the types in question are  $\mathcal L$-equivalent, $p\sim_{\mathcal L} q$, \emph{and}  $\mathcal L=\langle\mathcal L\rangle$,  then, by compactness,  every formula in $p$ is  $\mathcal L$-implied by some formula in $q$ (see Rem.\,\ref{Limpltypes} above). Hence, if $p$ is $\mathcal L$--implied by  $\phi\in p$, this formula must be  $\mathcal L$-implied by a formula $\psi\in q$, which then $\mathcal L$-implies all of $q$, making $q$  in turn $\mathcal L$-finitely generated as desired. Let us summarize.

\begin{rem}
 Let $p={\rm{pp}}_M(\bar a)$ and $q={\rm{pp}}_N(\bar b)$ be $\langle\mathcal L\rangle$-equivalent. If $p$ is $\mathcal L$-finitely generated, then so is $q$.
\end{rem}

I close this section with the simple fact  (known at least  since \cite[Rem.1.6]{habil}) that to check $\mathcal L$-finite generation of types in a finitely generated module it suffices to consider a generating tuple (cf.\ Lemma \ref{Fpurefg} for a similar phenomenon).

\begin{lem}\label{Latfg}
If the pp type of some generating tuple of a finitely generated module is $\mathcal L$-finitely generated, then the pp type of every other tuple in that module is $\mathcal L$-finitely generated as well.
\end{lem}
\begin{proof}
 Suppose  $A$  is generated by $\bar a$  and ${\rm{pp}}_A(\bar a)$ is $\mathcal L$-generated by $\phi\in{\rm{pp}}_A(\bar a)$. Any other tuple $\bar b$ in $A$ can be written as $\mathfrak B\bar a$ for some matrix $\mathfrak B$ over the ring. Let $\phi_{\mathfrak B}$ be the pp formula $\exists\bar x(\bar z=\mathfrak B\bar x \wedge \phi(\bar x))$ (in the free variables $\bar z$). Clearly, this formula is in ${\rm{pp}}_A(\bar b)$, and I claim it $\mathcal L$-generates this type. Indeed, for any other $\psi=\psi(\bar z)\in{\rm{pp}}_A(\bar b)$, the formula  $\psi(\mathfrak B\bar x)$  is in  ${\rm{pp}}_A(\bar a)$, hence $\mathcal L$-implied by $\phi$.  It is, finally, straightforward to verify that $\phi\leq_{\mathcal L} \psi(\mathfrak B\bar x)$ entails  $\phi_{\mathfrak B}\leq_{\mathcal L} \psi$.
\end{proof}

\section{Mittag-Leffler modules}\label{KMLSect}
Here we state the main theorem of \cite{habil}---and draw some more or less immediate consequences---about relative Mittag-Leffler modules. It is the basis for everything in this and other work of mine on Mittag-Leffler modules, yet it has, though widely circulated, never been published other than in the thesis \cite[Thm.2.2]{habil}.
(It appeared in the classical case (with no relativization) as the main theorem of \cite{ML}, cf.\,\cite[Thm.1.3.22]{P2}.)

\begin{definition}\label{MLdef}\cite[Ch.\,2]{habil}
\begin{enumerate}[\upshape(1)]
 \item Given a family ${\mathcal K}$ of right $R$-modules, a \emph{${\mathcal
K}$-Mittag-Leffler module}
is
a left $R$-module $M$ such that the canonical map
\[\tau^I: (\prod_I N_i) \otimes M\to\prod_I (N_i\otimes M)\]
is monic for all subfamilies $\{N_i : i\in I\}$ of ${\mathcal K}$.
\item A  right $R$-module $N$ is called a \emph{test module} for ${\mathcal
K}$-Mittag-Leffler if, in the previous definition, it suffices to let all the $N_i$ be equal to $N$. We then write $\tau^I_N$ for the transformation $N^I\otimes - \to (N\otimes -)^I$.
\item Given a test module $N$ as before, a \emph{test transformation}  for ${\mathcal
K}$-Mittag-Leffler is a transformation $\tau^I_N$ as before for a particular set $I$ that suffices to test the ${\mathcal
K}$-Mittag-Leffler condition above.
\item We omit `$\mathcal K$-' if ${\mathcal K}=$ Mod-$R$ and write `$N$-' if
${\mathcal K}=\{N\}$\,.
\end{enumerate}
\end{definition}

The two cases of $\mathcal K$ that led to this definition in \cite{habil} were $R\text{\rm -Mod}$,   the case of (classical) Mittag-Leffler modules as
introduced in
\cite{RG},  and $\{R_R\}$, which was investigated in \cite{Goo}.

\begin{rem}\label{product}
  Clearly, a direct sum of modules is $\mathcal K$-Mittag Leffler if and only if every summand is.
Since the canonical map
$(\prod_I\prod_J N_{ij}) \otimes M\to\prod_I\prod_J
(N_{ij}\otimes M)$
factors through the canonical map
$(\prod_I\prod_J N_{ij}) \otimes M\to\prod_I(\prod_J
N_{ij}\otimes M)$, we see that ${\mathcal K}$-Mittag-Leffler implies ${\mathcal K}'$-Mittag-Leffler
whenever ${\mathcal K}'$ consists of products of members of $\mathcal K$.
\end{rem}

\subsection{Atomic modules}\label{at}
The main theorem below describes $\mathcal K$-Mittag-Leffler modules in terms of the following concept, which is a variant of a classical notion from first-order model theory.

\begin{definition}\label{D-at
Suppose $\mathcal L$ is  a family of left $R$-modules.  An \emph{$\mathcal L$-atomic}\footnote{Be aware of different usage of this term in \cite[\S3.3]{habil}.}
 module is a left $R$-module $M$ such that the pp type of every tuple in $M$ is $\mathcal L$-finitely generated.
\end{definition}

In case $\mathcal L$ is the class of all $R$-modules (or all finitely presented ones), this is what was called \emph{positively atomic} in \cite{habil} and \cite{ML}.

The definition can be reformulated in terms of linear algebra as follows. For every tuple $\bar  a$ in $M$ there is a tuple $\bar b$ in $M$ and a finite system of linear equations, $\alpha(\bar x, \bar y)$ or $\mathfrak A\bar x \doteq \mathfrak B\bar y$, with solution $(\bar a, \bar b)$
and such that
\begin{displaytext}\nonumbe
 if  $\mathfrak C\bar x \doteq \mathfrak D \bar z$ is a finite system of linear equations whose
  inhomogeneous instance  $\mathfrak C\bar a \doteq \mathfrak D \bar z$ has a solution in $M$, then for every $L\in\mathcal L$ and every matching tuple $\bar c$ in $L$, if the  inhomogeneous system
$\mathfrak A\bar c \doteq \mathfrak B\bar y$ has a solution in $L$, so does the inhomogeneous system  $\mathfrak C\bar c \doteq \mathfrak D \bar z$.
\end{displaytext}

 \begin{rem}\label{LLatfg} Lemma \ref{Latfg} above says that
a finitely generated module is $\mathcal L$-atomic if and only if the pp type of some \emph{generating} tuple is $\mathcal L$-finitely generated.

Clearly, $\mathcal L$-atomicity   depends only on $\leq_{\mathcal L}$, so if this relation is the same as $\leq_{\mathcal L'}$, then ${\mathcal L}$-atomic is the same as ${\mathcal L'}$-atomic.
(This shows that the concept can be extended to theories, as was done in \cite{habil}).
\end{rem}

\subsection{The main theorem}

\begin{thm}\label{MThm}{\rm \cite[Thm.2.2]{habil}}
Let ${\mathcal K}$ and ${\mathcal L}$  be definably dual classes  of right and left  $R$-modules (i.e., such that
$\phi\leq_\mathcal L\psi$ iff $\rm{D}\psi\leq_\mathcal K\rm{D}\phi$, for all left pp formulas $\phi$ and $\psi$).

 Then a  module is ${\mathcal K}$-Mittag-Leffler if and only if it is ${\mathcal L}$-atomic.
\end{thm}
\begin{proof}
 The case $\mathcal K=R\text{\rm -Mod}$ is  contained in \cite[Thm.2.2]{ML} and in \cite[Thm.1.3.22]{P2}. The proof of the general case is almost verbatim the same (and carried out in detail in \cite{habil}). The main adjustment to be made is to replace every unrelativized occurrence of an implication $\leq$ between left pp formulas by the relativized implication $\leq_{\mathcal L}$ and every implication between right pp formulas by the relativized implication $\leq_{\mathcal K}$.
\end{proof}

Because of space concerns I state the following more or less  immediate consequences  without proof.

\begin{cor}\label{Cor}\cite[Cor.2.4]{habil}
\begin{enumerate}[\upshape(1)]
\item  A module $M$ is ${\mathcal K}$-Mittag-Leffler iff every finite subset
of $M$ is contained in a pure submodule of $M$ which is ${\mathcal K}$-Mittag-Leffler. In particular, the class of  $\mathcal K$-Mittag-Leffler modules is closed under taking  unions of pure chains.
\item \label{closed}The class of $\mathcal K$-Mittag-Leffler modules is closed under pure
submodules and pure extensions.
\item A direct sum is $\mathcal K$-Mittag-Leffler iff all summands are $\mathcal K$-Mittag-Leffler.
\item A finitely generated module is finitely presented iff it is Mittag-Leffler.
\item If $N$ is a finitely generated pure submodule of a ${\mathcal K}$-Mittag-Leffler module $M$
(hence $N$ is finitely presented), then $M/N$ is ${\mathcal K}$-Mittag-Leffler too.
\end{enumerate}
\end{cor}

\subsection{Definable subcategories}\label{consequences}
As was stressed in its original form---albeit in different terminology---one of the most powerful direct consequences of this theorem is that the concept of $\mathcal K$-Mittag-Leffler module is invariant under passing to the generated definable subcategory. Many a preservation result for classes $\mathcal K$ found in the literature follow directly from this. We make it explicit in (1) below. The other statements are special cases contained in one way or another in \cite[Ch.\,2]{habil}, for (3), see \cite[Rem.2.3(b)]{habil}.

\begin{cor}\label{sameside}
 Let ${\mathcal K}$ and ${\mathcal K}'$  be  families of right $R$-modules.

Then a  module is ${\mathcal K}$-Mittag-Leffler if and only if it is ${\mathcal K}'$-Mittag-Leffler, provided any of the following holds.

\begin{enumerate}[\upshape(a)]
\item ${\mathcal K}$ and ${\mathcal K}'$ generate the same definable subcategory.
 \item $\mathop{{\rm Add}}\nolimits({\mathcal K})=\mathop{{\rm Add}}\nolimits(\mathcal K')$  (or $\mathop{{\rm add}}\nolimits({\mathcal K})=\mathop{{\rm add}}\nolimits(\mathcal K')$).
 \item ${\mathcal K}$ and ${\mathcal K}'$ have the same associated Ziegler-closed set, i.e., $${\rm Zg}_R\cap \langle \mathcal K\rangle ={\rm Zg}_R\cap \langle \mathcal K'\rangle.$$
 \item ${\mathcal K}'$ consists of all direct products of members of $\mathcal K$.
 \item Every member of $\mathcal K$ is elementarily equivalent to a member of $\mathcal K'$, and vice versa.\qed
\end{enumerate}
\end{cor}

The converses do not hold. For example, over a left noetherian ring, every left module is $\flat$-Mittag-Leffler, cf.\ Cor.\,\ref{noeth}(2) below. Hence the latter is the same as $\{0\}$-Mittag-Leffler, while  $\langle\flat\rangle$ and $\{0\}$ are two different definable subcategories.

Since the definable subcategory generated by $R\mathop{-\rm mod}$ is $R\text{\rm -Mod}$, as a special case of (1) we get that $R\mathop{-\rm mod}$-Mittag-Leffler modules are Mittag-Leffler  \cite[Lemma 3.1]{Fac}.

\subsection{Direct limits}\label{imm}
Consider  an upward directed poset  $I=(I, \leq)$ and  an  $I$-directed system $\mathcal M = \{ M_i\}_{I}$ of modules with connecting maps $f_i^j: M_i\to M_j$ for all $i\leq j$ in $I$ (and $f_j^k f_i^j = f_i^k$ for $i\leq j\leq k$). Let  $M$ be its direct limit with canonical maps $f_i: M_i \to M$ (such that $f_j f_i^j = f_i$ for $i\leq j$).

 A \emph{tail} in $\mathcal M$ is a set of the form $\{f_i^j(\bar{m}_i) | i\leq j\in I\}$, where $i\in I$ and $\bar{m}_i$ is a tuple in $M_i$. Clearly, the canonical maps $f_j$ send each entry $\bar{m}_j=f_i^j(\bar{m}_i)$ in this tail to the same tuple,  $\bar{m}$ say, in $M$. All entries in this tail being preimages of $\bar{m}$ under the corresponding canonical maps, we also call this tail a \emph{tail of $\bar{m}$}. Clearly, any two, and hence any finitely many tails of a given tuple merge at some $j$th entry. So, as far as eventual behavior in tails is concerned, it makes no difference with  which tail we start. Let's make this explicit.

\begin{rem}\label{limittruth}
 A tuple $\bar{m}$ in the limit $M$ satisfies a pp formula $\phi$ if and only if a(ny)  tail  of $\bar{m}$ eventually does.
\end{rem}

 Suppose now the $M_i$ are  $\mathcal K$-Mittag-Leffler, hence $\mathcal L$-atomic. We want to know what makes the limit $\mathcal K$-Mittag-Leffler, i.e., $\mathcal L$-atomic, too. For this, as we will see,
 it suffices to consider countable chains in the direct system at hand.

By atomicity,   the pp type of the $j$th entry $\bar{m}_j$ in a tail $\{\bar{m}_j | j\geq i\}$ is $\mathcal L$-generated by some pp formula $\phi_j$. For every  $k\geq j$, the $k$th entry is an image of the $j$th and thus satisfies $\phi_j$. Therefore these formulas form a descending chain, $\phi_i \geq_{\mathcal L} \phi_j \geq_{\mathcal L} \phi_k$ for all $i\leq j \leq k$ in $I$. And they are all contained in the pp type of the limit $\bar{m}=f_i(\bar{m}_i)$.

 We say a tail as above $\mathcal L$-\emph{stabilizes at $\phi_j$} if $\phi_k \sim_{\mathcal L}  \phi_j$ for all $k\geq j$.

\begin{lem}{\rm(Essentially \cite[Lemma 3.6]{PR})}\label{tails} Given  a limit tuple $\bar{m}$ and a pp formula $\phi$, the following are equivalent.
 \begin{enumerate}  [\upshape (i)]
 \item ${\rm{pp}}_M(\bar{m})$ is $\mathcal L$-generated by  $\phi$.
 \item A(ny) tail $\{f_i^j(\bar{m}_i) | i\leq j\in I\}$ of $\bar{m}$ $\mathcal L$-stabilizes at some $\phi_j$ (in which case $\phi_j\sim_{\mathcal L}  \phi$  and hence $\phi_k \sim_{\mathcal L}  \phi$ for \emph{all} $k\geq j$).
 \end{enumerate}
\end{lem}
\begin{proof} Let $\{\bar{m}_j | j\geq i\}$ be a tail of the tuple $\bar{m}$.

 (i) $\Rightarrow$ (ii):
For $\bar{m}$ to satisfy  $\phi$ in $M$, the tail must eventually satisfy it in the respective $M_j$'s, Rem.\,\ref{limittruth}. As $\phi_k$ ${\mathcal L}$-generates ${\rm{pp}}_{M_k}(\bar{m}_k)$, this implies $\phi_k\leq_{\mathcal L} \phi$ (from some $j$ on). But all these formulas are contained in ${\rm{pp}}_M(\bar{m})$ and are therefore, conversely,   ${\mathcal L}$-implied by $\phi$, so the tail stabilizes at $\phi_j$  and $\phi_k \sim_{\mathcal L}  \phi$ from $j$ on.

(ii) $\Rightarrow$ (i). Suppose the tail stabilizes at $\phi_j$. To verify that ${\rm{pp}}_M(\bar{m})$ is $\mathcal L$-generated by $\phi_j$, let $\psi\in{\rm{pp}}_M(\bar{m})$. Then the tail eventually satisfies  $\psi$. In particular, there is $M_k$ with
$k\geq j$ where $\bar{m}_k$ satisfies $\psi$.
Then $\phi_k\leq_{\mathcal L}  \psi$ and so $\phi_j\sim_{\mathcal L}  \phi_k$ $\mathcal L$-implies $\psi$ as well.
 \end{proof}

\begin{definition}\label{wlimit}\textbf{}
\begin{enumerate}[\upshape(1)]
\item By an \emph{$\omega$-limit} we mean a direct limit of a chain of order type $\omega$.
 \item
 By an \emph{$\omega$-sublimit} of the system $\mathcal M=\{ M_i, f_i^j \}_{i\leq j\in I}$  we mean an $\omega$-limit of the form
 $M_{i_0}\stackrel{f_{i_0}^{i_1}}\to M_{i_1} \stackrel{f_{i_1}^{i_2}}\to M_{i_2} \stackrel{f_{i_2}^{i_3}}\to \ldots \stackrel{f_{i_{k-1}}^{i_k}}\to M_{i_k} \stackrel{f_{i_k}^{i_{k+1}}}\to\ldots$ ($k<\omega$),  where $i_0< i_1< i_2< \ldots < i_k < \ldots $  ($k<\omega$) in $I$.
 \item Call the directed system $\mathcal M$ (or its limit) \emph{$\omega$-closed} if every $\omega$-sublimit (as a structure) is itself a member of $\mathcal M$.
 \end{enumerate}
\end{definition}

\begin{prop} {\rm \cite[Prop.2.2]{HT}}
A direct limit of   $\mathcal K$-Mittag-Leffler modules is  $\mathcal K$-Mittag-Leffler provided all $\omega$-sublimits are. Thus, an $\omega$-closed direct limit of   $\mathcal K$-Mittag-Leffler modules is  $\mathcal K$-Mittag-Leffler.
\end{prop}
\begin{proof}
 In the notation introduced in the beginning of this subsection, assume the limit $M$ is \emph{not}  $\mathcal K$-Mittag-Leffler. By Thm.\ \ref{MThm}, there's a tuple  $\bar{m}$ in $M$ whose pp type is not
$\mathcal L$-finitely generated. Then, by the previous lemma, some (hence every) tail $\{f_i^j(\bar{m}_i) | i\leq j\in I\}$ of $\bar{m}$ does not stabilize. Hence there's a sequence  $i\leq i_0< i_1< i_2< \ldots < i_k < \ldots $  ($k<\omega$) in $I$ for which the pp formulas corresponding to this subtail form a strictly descending chain:   $\phi_{i_0}>_{\mathcal L} \phi_ {i_1}>_{\mathcal L} \phi_{i_2}>_{\mathcal L}  \ldots >_{\mathcal L} \phi_ {i_k} >_{\mathcal L} \ldots $  ($k<\omega$) in $I$.

Consider the sublimit $N$ of the $M_{i_k}$ (an $\omega$-limit) with canonical maps $g_k: M_{i_k}\to N$ ($k<\omega$) and the tuple $\bar{n}=g_k(f_i^{i_k}(\bar{m}_{i}))$ therein. Its tail $\{f_i^{i_k}(\bar{m}_i) | k<\omega\}$ does not stabilize and so its pp type is, by the previous lemma,  not $\mathcal L$-finitely generated and $N$, by Thm.\ \ref{MThm},  not $\mathcal K$-Mittag-Leffler, as desired.
\end{proof}

We show in Section \ref {ctblechains} below what it takes to make an $\omega$-limit  $\mathcal K$-Mittag-Leffler.

\begin{cor}\label{closedunion} The union of an  $\omega$-closed direct system of
 of  $\mathcal K$-Mittag-Leffler submodules is  $\mathcal K$-Mittag-Leffler.\qed
\end{cor}

\subsection{Density}
In the spirit of \cite{EM}, Herbera and Trlifaj \cite[Def.2.5]{HT} call a collection, $\mathcal C$,  of submodules of a module $M$ a \emph{$\kappa$-dense system} (in $M$) provided that

\begin{enumerate}[\upshape(a)]
 \item every subset of $M$ of power less than $\kappa$ is contained in some $C\in\mathcal C$;
 \item $\mathcal C$ is  closed under chains of length less than $\kappa$;
 \item $\mathcal C$ is directed, i.e., every two members of $\mathcal C$ are contained in a member of $\mathcal C$.
 \end{enumerate}

The case of interest here is $\kappa=\aleph_1$ (but the general definition reveals the role of "$<$" more visibly).

 \begin{cor} {\rm \cite[Thm.2.6]{HT}}\label{denserel}
 A module is  $\mathcal K$-Mittag-Leffler if and only if it possesses  an $\aleph_1$-dense system of  $\mathcal K$-Mittag-Leffler submodules. Furthermore, in that case these submodules can always be chosen to be countably generated.
\end{cor}
\begin{proof}
A module with an $\aleph_1$-dense system of  $\mathcal K$-Mittag-Leffler submodules is the union of that system, by (a). This union is  $\omega$-closed by (b), and so the module is  $\mathcal K$-Mittag-Leffler by the previous corollary.

 That, conversely,  every  $\mathcal K$-Mittag-Leffler  module has such an $\aleph_1$-dense system
will be immediate from Prop.\ \ref{ctblesep} below, which shows that one can take for $\mathcal C$ the set of all countably generated $\mathcal L$-pure submodules.
\end{proof}

\subsection{Test modules and test maps}\label{test} It follows from the Main Theorem that a test module  for $\mathcal K$-Mittag-Leffler in the sense of Definition \ref{MLdef} above is a module that generates the same definable subcategory as does $\mathcal K$. Another way of saying this is  (1) of the following corollary. The rest are immediate consequences of that---for (4) invoke
the L\"owenheim-Skolem Theorem.

\begin{cor}\cite[Cor.2.6]{habil}\label{testmod}
 Test modules for $\mathcal K$-Mittag-Leffler are:
\begin{enumerate}[\upshape(1)]
 \item Any right module $N$ such that $\leq_{\mathcal K}$ and $\leq_N$ are the same.
 \item $N$ the direct sum (or product)  of all pure-injective indecomposables in the Ziegler-closed set corresponding to  $\mathcal K$.
 \item $N$ the direct sum (or product) of one model of every completion of the first-order (or the implicational) theory of $\mathcal K$.
 \item Any module elementarily equivalent to a test module; so there are test modules of power $|R|+\aleph_0$.\qed
\end{enumerate}
\end{cor}

In the remainder of this subsection I discuss, without detailed proofs, a bound on the \emph{exponent} $I$ occurring in a test transformation $\tau_N^I$, see Definition \ref{MLdef}. To minimize this exponent, we need some
more notation.
Given a lattice $\Lambda$\,, let $\triangle(\Lambda)$
\label{delta}
be the smallest cardinal $\kappa$ such that every ideal  is generated by
$\kappa$ elements. Note that $\triangle(\Lambda)$   is finite if
and only if it is 1 if and only if all ideals  in $\Lambda$ are
principal iff $\Lambda$ has no infinite (strictly) ascending chains, in
which case $\Lambda$ is called a \emph{noetherian lattice}, cf.
\cite[Ch.III, ex.10]{S}. Since finitely generated  left ideals are pp definable in
$R_R$\,, we see that  $\triangle(R_R)=1$ iff $R$ is left noetherian.
For a module $N$\,, let  $\triangle(N)$
denote the
supremum of the cardinals $\triangle(\Lambda^n(N))$, where, recall, $\Lambda^n(N)$ is the lattice of $n$-place pp subgroups of $N$ and $n$ runs over the natural numbers.
Since there are no more than $|R|+\aleph_0$ pp formulas altogether, $\triangle(N)$ is always bounded by this number.

\begin{fact}\label{testfact}
 {\rm \cite[Cor.2.6]{habil}.}
\begin{enumerate}[\upshape(1)]
 \item Given a test module $N$ for  $\mathcal K$-Mittag-Leffler, $\tau^{\triangle(N)+|N|}_N$ is a test transformation.
 \item If this test module $N$ has power $|R|+\aleph_0$, then $\tau^N_N$ is a test transformation.
\end{enumerate}
\end{fact}

It was noted in
\cite[Rem.2.3(c),(d)]{habil} that  in case  $\triangle(N)=1$,  the entire exponent in $\tau^{\triangle(N)+|N|}_N$
can be taken to be $1$, and  \emph{every} left module $M$ is
$N$-Mittag-Leffler.
In particular, over a left noetherian ring $R$ all left modules
are $R$-Mittag-Leffler. This goes back to \cite[p.1]{Goo}; see Cor.\,\ref{noeth}(2) below for the converse.

\section{Special cases}\label{specialcases}
Here we specialize some of the previous results to the following three cases: $\mathcal K=\text{\rm Mod-}R$ and   $\mathcal L=R\text{\rm -Mod}$,  $\mathcal K=\flat_R$ and   $\mathcal L= {_R\sharp}$,  and  $\mathcal K=\sharp_R$ and   $\mathcal L= {_R\flat}$ (notation as introduced after CONVENTION \ref{conv}).

\subsection{(Classical) Mittag-Leffler modules, i.e., $\mathcal K=\text{\rm Mod-}R$}  Corollary \ref{sameside} yields at once:

\begin{cor}{\rm \cite[Rem.2.3]{habil}}
Given a left $R$-module $M$, the following are equivalent.

\begin{enumerate}[\upshape(i)]
\item $M$ is Mittag-Leffler.
\item $M$ is  ${\mathcal K}$-Mittag-Leffler and $\langle {\mathcal K}\rangle=\text{\rm Mod-}R$.
\item $M$ is   ${\rm Zg}_R$-Mittag-Leffler.
\item $M$ is  ($\text{\rm mod-}R$)-Mittag-Leffler.
 \end{enumerate}
\end{cor}

\begin{cor}
Besides the test modules one obtains by specializing Cor.\,\ref{testmod} to the case $\mathcal K=\text{\rm Mod-}R$, another test module is $P_*$, the direct sum of one representative of each isomorphism type from $\text{\rm mod-}R$. (This module has power at most $|R|+\aleph_0$.)
\end{cor}

\subsection{$\flat$-Mittag-Leffler modules}\label{flat-ML} The first concrete instance of relativized Mittag-Leffler module in the literature seems to have been considered in  \cite{Goo}  (not under this name) with $\mathcal K = {\flat_R}$. By a result of Zimmermann  \cite{Zim}, $\leq_{\flat_R}$ and $\leq_{R_R}$ are the same (i.e., ${\flat_R}$ and ${R_R}$ generate the same definable subcategory), see also \cite[Thm.2.3.9]{P2}. Thus $\flat$-Mittag-Leffler is the same as $R_R$-Mittag-Leffler, or $R$-Mittag-Leffler for short. The following basic properties of these modules are immediate from the main theorem. All but condition (v) (from \cite[Cor.2.7]{habil}) are contained in \cite{Goo}.

\begin{cor}\label{Goo}\label{noeth}\textbf{}
\begin{enumerate}[\upshape(1)]
\item For any left $R$-module $M$ the following are
equivalent.
\begin{enumerate}  [\upshape (i)]
\item $M$ is $\flat$-Mittag-Leffler.
\item $M$ is $R_R$-Mittag-Leffler, i.e., $R_R$ is a test module.
\item $R^R \otimes M \to M^R$ is monic
(i.\,e. $R^R \otimes - \to (R\otimes -)^R$ \quad is a test
transformation for $\flat$-Mittag-Leffler).
\item  For every
finitely generated  submodule $A$ of $M$, the inclusion $A\subseteq M$ factors through a finitely presented module.
\item All quantifier-free types realized in $M$ are finitely generated.
\end{enumerate}

\item
\cite[p.1]{Goo} Every left $R$-module is
$R$-Mittag-Leffler iff $R$ is left noetherian.
\end{enumerate}
\end{cor}
\begin{proof}
The second part follows from (iv) of the first.

Since $\le_{\flat_R}$ and $\le_{R_R}$ are the same, we see from the theorem that $R_R$ is a test module, hence
we have
(i) $\Leftrightarrow$ (ii). To prove
(ii) $\Leftrightarrow$ (iii) we are thus left with
checking that the exponent can be taken to be $R$\,. If $R$ is infinite,
$|R|+\aleph_0=|R|=\triangle(R_R)\cdot |R_R|$\,, hence we get the desired
exponent from this and the second part of the above corollary. If $R$ is
finite, $\triangle(R_R)=1$ and we get exponent $1$ from the discussion after Fact \ref{testfact}.

(iv) $\Rightarrow$ (v): Let $A=\langle\bar a\rangle_M$ and $(A, \bar a)\to (P, \bar c)\to (M, \bar a)$ the factorization given, with $P$ finitely presented. Then ${\rm{qf}}_M(\bar a)={\rm{qf}}_A(\bar a)\subseteq{\rm{pp}}_P(\bar c)\subseteq{\rm{pp}}_M(\bar a)$, so the pp formula that generates ${\rm{pp}}_P(\bar c)$ also generates ${\rm{qf}}_M(\bar a)$.

(Of course this suffices for the proof, but it's interesting to note a direct proof of the converse: if $\phi\in{\rm{pp}}_M(\bar a)$ generates ${\rm{qf}}_M(\bar a)$, then any finitely presented free realization $(P, \bar c)$ of $\phi$ maps to $(M, \bar a)$; it remains to find $(A, \bar a)\to (P, \bar c)$, which is easily done by extending the map $\bar a\to\bar c$ by linearity; this is well defined, for if $\bar r\bar a=0$, then $\bar r\bar x\dot=0$ is in ${\rm{qf}}_A(\bar a)$, hence implied by $\phi$, and so $\bar r\bar c=0$.)

(i) $\Leftrightarrow$ (v). By the theorem,
(i) is equivalent to every pp type in $M$ being $\rm{D}
(\flat_R)$-finitely generated. We will show that this is the same as every
quantifier-free type in $M$ being ($R\text{\rm -Mod}$-) finitely generated. First of all, by the duality of
flat and absolutely pure \cite{Her} (for another reference, if somewhat in disguise, see \cite[Prop.3.4.26]{P2}), $\le_{\rm{D}
(\flat_R)}$ is the same as $\le_{_R\sharp}$\,. So we have to show
that ${\rm{pp}}_M(\bar{a})$ is $\sharp$-finitely generated iff the type  ${\rm{qf}}_M(\bar{a})$ is
finitely generated. Because of its significance, we make this claim a separate lemma.
\end{proof}

\begin{lem}\label{qfgen} Given a tuple $\bar a$ in a module $M$, the following are equivalent.
\begin{enumerate}  [\upshape (i)]
\item ${\rm{qf}}_M(\bar{a})$ is
finitely generated.
\item ${\rm{qf}}_M(\bar{a})$ is
 $\sharp$-finitely generated.
\item ${\rm{pp}}_M(\bar{a})$ is $\sharp$-finitely generated.
\end{enumerate}
Moreover, the same pp (not necessarily quantifier-free!)  formula  works in all three cases.
\end{lem}
\begin{proof}
 For the nontrivial implications, first suppose $\psi\in {\rm{pp}}(\bar{a})$ generates ${\rm{qf}}_M(\bar{a})$. To show this formula $\sharp$-generates ${\rm{pp}}_M(\bar{a})$, let $\varphi\in {\rm{pp}}(\bar{a})$ and $N$ be absolutely pure.
We have to show that $\psi(N)\subseteq\varphi(N)$\,.
Since $\bar{a} \in \varphi(M) \subseteq {\rm{ann}}_M\rm{D}\varphi(R_R)$\,, for all
$\bar{r}\in\rm{D}\varphi(R_R)$ the formula $\bar{r}\, \bar x \doteq 0$ is in
${\rm{qf}}_M(\bar{a})$\,, hence $\psi\le\bar{r}\,\bar{x} \doteq 0$. In particular,
$\psi(N)\subseteq{\rm{ann}}_N\rm{D}\varphi(R_R)$. But as $N$ is absolutely pure, by \cite[Prop.2.3.3]{P2}, this latter set \emph{is} $\varphi(N)$.

Now assume ${\rm{qf}}_M(\bar{a})$ to be $\sharp$-generated by
$\psi\in{\rm{pp}}_M(\bar{a})$\,. To show $\psi$ generates ${\rm{qf}}_M(\bar{a})$,
  let $\alpha\in{\rm{qf}}_M(\bar{a})$ and $N$ be any module and $\bar b\in \psi(N)$. We have to show $\bar b\in \alpha(N)$. Let $N\subseteq E$ be an injective envelope. Being existential, the formula
  $\psi$ is satisfied by $\bar b$ also in $E$. Since
$\psi\le_{\sharp}\alpha$, therefore $\bar b\in \alpha(E)$. But $\alpha$ is quantifier-free and $\bar b$ is in $N\subseteq E$, hence  $\bar b\in \alpha(N)$, as desired.
\end{proof}

\subsection{$\sharp$-Mittag-Leffler modules}\label{sharp-ML}
Another instance is $\mathcal K=\sharp_R$. As $\rm{D}(_R\flat)$ and $\sharp_R$ generate the same definable subcategory \cite[Prop.3.4.26]{P2}, we may then take $\mathcal L={_R\flat}$, and  the theorem shows that a module is $\sharp$-Mittag-Leffler iff it is $\flat$-atomic. Symmetrically,  $\rm{D}(\flat_R)$ and $_R\sharp$ generate the same definable subcategory, hence a module is $\flat$-Mittag-Leffler iff it is $\sharp$-atomic, a fact we haven't exploited in the previous subsection.

 The next example, though rather trivial, may be instructive as to what the role of $\mathcal K$ and $\mathcal L$.

\begin{exam} \label{torsion}
 Let $R$ be a (not necessarily commutative) domain and let $\rm{\bf Div}$ denote the class of divisible right $R$-modules. Then any torsion left $R$-module is $\rm{\bf Div}$--Mittag-Leffler (hence also  $\sharp$-Mittag-Leffler, for every absolutely pure module over a domain  is divisible): as a divisible module tensored with a torsion module is zero and direct products of divisible modules are divisible, the canonical map figuring in the definition  of  Mittag-Leffler module is vacuously monic, cf.\ \cite{Tf}.
  \end{exam}

\begin{exam} \label{notfp}
 Let $R$ be a (not necessarily commutative) domain with a two-sided ideal $I$ that is not finitely generated as a left ideal. Then the cyclic left $R$-module $R/I$ is not finitely presented. Yet it  is $\sharp$-Mittag-Leffler (even $\rm{\bf Div}$--Mittag-Leffler), for it is torsion, see Example \ref{torsion}.

In order to elucidate the concept, let us give another proof via atomicity. We have to verify that  $R/I$ is $\flat$-atomic. We know from Lemma \ref{Latfg} that it is enough to verify that the generator $1/I$ has $\flat$-finitely generated pp type. Now, this type is equivalent to saying $Ix=0$ or, more precisely, to the set of all formulas $rx=0$ with $r\in I$. Let $s$ be any non-zero element of $I$. I claim that the pp type of $1/I$ in $R/I$ is  $\flat$-generated by the formula $sx=0$. First of all, of course this formula is in the type, for $s(1/I)=0$ in $R/I$. To see, it $\flat$-implies the the rest of it, we have to verify that $sx=0\le_{\flat} rx=0$ for all $r\in I$. It satisfies to verify this implication in the left regular module $R$. But there, the only element satisfying $sx=0$ is $0$. And $0$ realizes \emph{any} pp type. (This shows that, given any pp type $p$ in any left $R$-module $M$, if $p$ contains a formula $sx=0$ for some non-zero $s\in R$, then this formula $\flat$-generates $p$.)
 \end{exam}

For other relativized Mittag-Leffler modules see \cite{Tf}.

\section{Purity}\label{Fpure}
Here we investigate three kinds of relativized purity.  The first of these is needed in the next section, the other two in the last.

\subsection{Left purity: pure monomorphisms}
To prove the relativized version, Corollary \ref{puresep} below, of Raynaud and Gruson's separability result (\ref{RG}) at the top of this paper, one needs relativized versions of purity. An algebraic one was given in \cite[Thm.2.5(ii)]{HT} and a rather model-theoretic one in \cite[Prop.3.3]{Tf}. Here we show that they are the same. As it turns out, this purity goes back to Herzog's thesis
\cite[Sect.8]{Her}, where it was called  \emph{local}.

\begin{definition}[Herzog]\label{FpureHerzog}
An \emph{$\mathcal L$-pure monomorphism} is a monomorphism $f: N\to M$ (of left $R$-modules) such that $K\otimes f$  is a monomorphism for every $K\in\rm{D}\langle\mathcal L\rangle$ (the dual of the definable category generated by $\mathcal L$). An  \emph{$\mathcal L$-pure submodule}  of a module $M$ is  a submodule $N$ whose inclusion in $M$ is $\mathcal L$-pure, i.e., such that the corresponding map
$K\otimes N \to K\otimes M$ is monic for every  $K\in\rm{D}\langle\mathcal L\rangle$. As usual, we drop curly brackets around singletons.
\end{definition}

\begin{rem}
 It is an easy exercise using Herzog's criterion (and elementary duality) to show that it suffices to check the above monomorphism for all $K\in\mathcal K$, where $\mathcal K$ is any class such that $\langle\mathcal K\rangle=\rm{D}\langle\mathcal L\rangle$. In particular, $\mathcal L$-purity is the same as $\langle\mathcal L\rangle$-purity.
\end{rem}

 The next result  is essentially \cite[Prop.8.3]{Her}. Herzog's original proof was in terms of closed sets of the Ziegler spectrum. The above remark allows us to pass to a class that is closed under product and thus to apply McKinsey's Lemma, see \cite[Cor.9.1.7, p.417]{H} (or  \cite[Cor.6.3]{purity}), instead  of Ziegler's indecomposability calculus. I include such a proof.

\begin{lem}[]\label{FpureDef}

 Given a submodule $N$ of a module $M$, the following are equivalent.
 \begin{enumerate}  [\upshape (i)]
\item $N$ is an $\mathcal L$-pure submodule of $M$.
\item For every tuple $\bar{n}$ in $N$, its pp type in $N$ is $\langle\mathcal L\rangle$-equivalent to its  pp type in $M$.
\end{enumerate}
\end{lem}
\begin{proof}
Consider a  tuple $\bar{n}$ in $N$ and denote its pp type in $M$ by $p$ and its pp type in $N$ by $q$. Clearly, $q\subseteq p$, hence, by compactness, these types are  $\langle\mathcal L\rangle$-equivalent  precisely when every $\phi\in p$ is  $\langle\mathcal L\rangle$-implied by some $\psi\in q$. As $\leq_\mathcal L$ is the same as $\leq_{\langle\mathcal L\rangle}$,  the last two conditions are indeed equivalent.

It is an(other) easy exercise using Herzog's criterion  to show that any of these two conditions implies the first.
So we are left with the less straightforward implication (i) $\Rightarrow$ (ii). We have to show that for every tuple $\bar{n}$ in $N$ and every pp formula $\phi$ it satisfies in $M$, there is a pp formula $\psi\leq_{\mathcal L} \phi$ that  $\bar{n}$ satisfies in $N$. To this end, consider $\phi\in p$ and let let $\mathcal K$ be any class closed under product such that $\langle\mathcal K\rangle=\rm{D}\langle\mathcal L\rangle$. Notice, this latter equality means that  $\psi\leq_{\mathcal L} \phi$ iff $\rm{D}\phi\leq_{\mathcal K} \rm{D}\psi$.

First note that for every choice of $\bar{k}\in \rm{D}\phi(K)$  in any $K\in \mathcal K$, there is $\psi\in q$ such that $\bar{k}\in \rm{D}\psi(K)$. Indeed, as $\bar{n}$ satisfies $\phi$, we have $\bar{k}\otimes \bar{n}=0$ in $K\otimes M$, hence, by (i), also in  $K\otimes N$, which yields $\psi\in q$ such that $\bar{k}$ satisfies $\rm{D}\psi$ in $K$.

This shows that $\forall\bar{x}(\rm{D}\phi\rightarrow \bigvee_{\psi\in q}\rm{D}\psi)$ holds in every member of $\mathcal K$. McKinsey's Lemma yields a single $\psi\in q$ such that $\forall\bar{x}(\rm{D}\phi\rightarrow \rm{D}\psi)$ holds in every member of $\mathcal K$, i.e., $\rm{D}\phi\leq_{\mathcal K} \rm{D}\psi$. By duality, $\psi\leq_{\mathcal L} \phi$, as desired.
\end{proof}

We see immediately how this looks when all the types $p$ are $\mathcal L$-finitely generated.

\begin{cor}\label{FpureDefCor}
Suppose $N$  is a submodule of  an $\mathcal L$-atomic module $M$. Given  a tuple $\bar{n}$  in $N$, let  $\phi_{\bar{n}}$ be an $\mathcal L$-generator of ${\rm{pp}}_M(\bar{n})$.

 Then the following are equivalent.
 \begin{enumerate}  [\upshape (i)]
\item $N$ is an $\mathcal L$-pure submodule of $M$.
\item For every tuple $\bar{n}$ in $N$, the type ${\rm{pp}}_N(\bar{n})$ is $\langle\mathcal L\rangle$-equivalent to  $\phi_{\bar{n}}$.
\item For every tuple $\bar{n}$ in $N$,  the type ${\rm{pp}}_N(\bar{n})$ contains a pp formula $\psi_{\bar{n}}\leq_{\mathcal L} \phi_{\bar{n}}$ (and hence $\psi_{\bar{n}}\sim_{\mathcal L} \phi_{\bar{n}}$).
\end{enumerate}

\noindent
In this case $N$ is  $\mathcal L$-atomic too.
\end{cor}
\begin{proof}
Just note that $\phi_{\bar{n}}$ is $\mathcal L$- (hence $\langle\mathcal L\rangle$-) equivalent  to ${\rm{pp}}_M(\bar{n})$.
\end{proof}

To check $\mathcal L$-purity of a  finitely generated submodule it suffices to consider a generating tuple in Lemma \ref{FpureDef}. The argument is standard and similar to the one in  Lemma \ref{Latfg}:

\begin{lem}\label{Fpurefg}
Let $\bar a$ be a tuple in $M$ and $N$ the submodule it generates. Then the following are equivalent.
 \begin{enumerate}  [\upshape (i)]
\item $N$ is an $\mathcal L$-pure submodule of $M$.
\item ${\rm{pp}}_N(\bar{a})$ is $\langle\mathcal L\rangle$-equivalent to ${\rm{pp}}_M(\bar{a})$.
\item For every pp formula $\phi$ in ${\rm{pp}}_M(\bar{a})$, there is a pp formula $\psi\leq_{\mathcal L} \phi$  (and hence $\psi\sim_{\mathcal L} \phi$) in ${\rm{pp}}_N(\bar{a})$.
\end{enumerate}
\end{lem}
\begin{proof}
As $\bar a$ generates $N$, for every tuple $\bar n$ in $N$ there is a matrix $\mathfrak B$ such that $\bar n = \mathfrak B\bar a$. For every pp formula $\phi$ in the type of $\bar n$ (in $N$ or $M$), the pp formula $\phi(\mathfrak B\bar x)$  is in the corresponding type of $\bar a$. Using this it is straightforward to verify that (ii) entails  $\langle\mathcal L\rangle$-equivalence of ${\rm{pp}}_N(\bar{n})$ and ${\rm{pp}}_M(\bar{n})$.
\end{proof}

The next, trivial example may serve to clarify some of the purity issues involved in relative implication (localized at a definable subcategory).

\begin{exam} Consider $\mathcal K$ the class of divisible (=injective) and $\mathcal L$ the class of torsionfree (=flat) abelian groups. Recall, they form definably dual definable subcategories of  $ \mathop{\text Ab}=\mathbb Z$-${\rm Mod}$.

Let $M$ be the cyclic abelian group of order $4$ and $N$ its subgroup of order $2$. Of course, there is nothing pure about the inclusion of $N$ in $M$. Yet, it is trivially $\mathcal L$-pure, for tensoring with a divisible group (with $\mathcal K$) annihilates every torsion group.

What's happening on the level of pp formulas? Let $n$ be the generator of $N$ and consider its pp type $p$ in $M$ and $q$ in $N$. Clearly $q\subseteq p$. Consider the formula  $2|x \wedge 2x=0$. Call it $\phi$. Clearly, it is a generator of the type $p$. Let $\psi$ be the formula $2x=0$. This is a generator of the type $q$. So, in particular, they are both $\mathcal L$-generators of their corresponding types. But they are also  $\mathcal L$-equivalent, in fact, to $x=0$ (as $\mathbb Z$ is a domain), whence $\psi$ $\mathcal L$-implies \emph{any} pp formula. So $\psi$ is also an  $\mathcal L$-generator of $p$, but $\phi$ is not an  $\mathcal L$-generator  of the type $q$ for the mere reason that it is not contained in it.
\end{exam}

\subsection{Partial/Restricted left purity}

We need a restricted form of purity  in Section \ref{ctblechains} below.

\begin{definition}\label{restricted}
Let $C$ be a submodule (or even subset) of the module $N$ and $f: N\to M$ a homomorphism.
 \begin{enumerate}[\upshape(1)]
\item The map $f$  is said to be \emph{$\mathcal L$-pure on $C$} if for every tuple $\bar{c}$ in $C$, its pp type in $N$ is $\langle\mathcal L\rangle$-equivalent to the  pp type of $f(\bar{c})$ in $M$.
\item $f$ is said  to be \emph{monic on $C$} if $\ker f \cap C=\emptyset$.
\end{enumerate}
\end{definition}

\begin{rem}\textbf{}
\begin{enumerate}[\upshape(1)
 \item Clearly, $f: N\to M$ is $\mathcal L$-pure iff it is $\mathcal L$-pure on $N$.
 \item It is easy to see that the versions of Lemma \ref{FpureDef} and Cor.\ \ref{FpureDefCor} hold for $\mathcal L$-purity on $C$ when the tuple $\bar{n}$ runs only over $C$ (instead of over all of $N$).
\end{enumerate}
\end{rem}

We are not trying to study this restricted concept in generality here, but rather make use of it in the special context of $\cal L$-\,$\omega$-limits below.

\subsection{A special assumption}\label{special}
The relevance of  $R_R$ being a member of $\mathcal K$ was pointed out in \cite{HT}. The underlying reason is the following. While, in general, under an $\mathcal L$-pure homomorphism, a given tuple in the domain and its image have  $\mathcal L$--equivalent pp types, under the assumption $R_R\in\langle\mathcal K\rangle$,  the \ quantifier-free parts of those pp types are actually \emph{equal} (or  $R\text{\rm -Mod}$--equivalent). Note, as $\langle R_R\rangle = \langle\flat_R\rangle $, the clause $R_R\in\langle\mathcal K\rangle$ is, by elementary duality, equivalent to $_R\sharp\subseteq\langle\mathcal L\rangle$.

\begin{lem}
 $\sharp$-equivalent types of tuples (in any modules) have identical quantifier-free part.
\end{lem}
\begin{proof}
 Let $p ={\rm{pp}}_N(\bar{c})$ and $q ={\rm{pp}}_M(\bar{b})$. We are going to show that $p\leq_{\sharp}q$ implies that the quantifier-free part of $q$ is in $p$, i.e., ${\rm{qf}}_M(\bar{b})\subseteq {\rm{qf}}_N(\bar{c})$.
 To this end, embed $N$ in an injective module $E$. Then $\bar{c}$ satisfies $p$ also in $E$. As $E\in \sharp$, $\bar{c}$ satisfies also $q$ in $E$. The quantifier-free part ${\rm{qf}}_M(\bar{b})$ passes down to the submodule $N$, so $\bar{c}$ satisfies ${\rm{qf}}_M(\bar{b})$ in $N$, whence  ${\rm{qf}}_M(\bar{b})\subseteq {\rm{qf}}_N(\bar{c})$, as desired.
\end{proof}

\begin{rem}\label{qfsharpimpl}
 The same proof shows that $\alpha\leq_{\sharp}\phi$ implies $\alpha\leq\phi$ provided $\alpha$ is quantifier-free.
\end{rem}
\begin{lem}\label{specialmonic} Suppose $R_R\in\langle\mathcal K\rangle$ or, equivalently, $_R\sharp\subseteq\langle\mathcal L\rangle$.

\begin{enumerate}[\upshape(1)]
\item Every map  $\mathcal L$-pure on a  submodule preserves quantifier-free parts of pp types of tuples from that submodule.
\item Every map  $\mathcal L$-pure on a  submodule is  monic on it.
\item $_R\sharp$-pure maps are monomorphisms.
 \end{enumerate}
\end{lem}
\begin{proof}
The last statement is a special case of the second, where the subset in question is the entire module, while the second is a special case of the first, for the (quantifier-free) formula $\bar{x}\, \dot=\, \bar{y}$.

For the first statement, let $f: N\to M$ be $\mathcal L$-pure on a set $C\subset N$ and let $\bar{c}$ be a tuple in $C$ and $\bar{b}$  the image of $\bar{c}$  in $M$. The assertion now is ${\rm{qf}}_N(\bar{c})= {\rm{qf}}_M(\bar{b})$, which readily follows from the previous lemma.

\end{proof}

\subsection{Right purity: pure epimorphisms}
Dually to the lemma characterizing  $\mathcal L$-pure monomorphisms, we make the following definition.

\begin{definition}\label{FpureEpiDef}
 A \emph{uniform $\mathcal L$-pure epimorphism} is a homomorphism $g: N\to M$ (of left $R$-modules) such for every tuple $\bar m$ in $M$ there is a $g$-preimage $\bar n$ in $N$ such that
their corresponding pp types are $\mathcal L$-equivalent. We drop the prefix $\mathcal L$ when it is all of $R\text{\rm -Mod}$.
\end{definition}

We will encounter uniform pure epimorphisms in Thm.\,\ref{???Existence}. For reference there, we state the following easy fact.

\begin{lem}\label{Lpureepic}
 Every uniformly $\mathcal L$-pure epimorphic image of a $\mathcal K$-Mittag-Leffler module is $\mathcal K$-Mittag-Leffler.
\end{lem}
\begin{proof}
 Let $g: N\to M$ be a uniform $\mathcal L$-pure epimorphism and $\bar m$ a tuple in $M$. Let $p$ be its pp type. To see that $p$ is finitely $\mathcal L$-generated, choose a preimage  $\bar n$  with $\mathcal L$-equivalent pp type, $q$ say. By hypothesis, the pp type $q$  contains a pp formula $\phi$ that $\mathcal L$-generates it. This formula is contained in  its image $p$ too, and as $p$ and $q$ are $\mathcal L$-equivalent, the former is $\mathcal L$-generated by $\phi$ as well.
\end{proof}

\section{Pure separation}\label{separation}

 In the first part I prove  the relativized version of Raynaud and Gruson's separability result (\ref{RG}) from the introduction. Previous, and equivalent versions are \cite[Thm.2.5(ii)]{HT} and  \cite[Prop.3.3]{Tf}. But with a new and more systematic view on relativized purity, it seems justified to include a proof of this result, especially since that very proof goes back again to the unpublished \cite{habil}.\footnote{Where it was the definition that was missing, see the introduction to Section \ref{Fpure}.} Another variant of this phenomenon is considered in the second part. I make a uniform definition.

\begin{definition}
 Let $\kappa$ be a cardinal and $\mathcal C\subseteqR\text{\rm -Mod}$. A module $M$ is said to be \emph{$\kappa$-$\mathcal L$-pure separable by (modules from) $\mathcal C$} if every subset $A$ of $M$ of cardinality $<\kappa$ is contained in an $\mathcal L$-pure submodule of $M$ that is a member of $\mathcal C$.

 I say \emph{countably $\mathcal L$-pure separable} for $\aleph_1$-$\mathcal L$-pure separable and  \emph{finitely $\mathcal L$-pure separable} for $\aleph_0$-$\mathcal L$-pure separable.
\end{definition}

The focus here lies in classes $\mathcal C$ of $\mathcal K$-Mittag-Leffler (=$\mathcal L$-atomic) modules.

\begin{rem}\label{sepML} (1) By the Main Theorem, a module $\mathcal L$-pure separable by $\mathcal K$-Mittag-Leffler modules is certainly $\mathcal K$-Mittag-Leffler.

\noindent
(2)  Since unions of chains of $\mathcal L$-pure submodules are $\mathcal L$-pure, it is easy to see that  a module finitely $\mathcal L$-pure separable by finitely generated  $\mathcal K$-Mittag-Leffler modules is also countably $\mathcal L$-pure separable by countably generated  $\mathcal K$-Mittag-Leffler modules.
\end{rem}

\subsection{Countable separation}
First of all, Corollary \ref{FpureDefCor} implies

\begin{cor}
$\mathcal L$-pure submodules  of $\mathcal K$-Mittag-Leffler modules are $\mathcal K$-Mittag-Leffler.\qed
\end{cor}

That there are enough such $\mathcal L$-pure submodules
 can be viewed as a version of the downward L\"owenheim-Skolem Theorem, where `elementary submodule' is weakened to `pure submodule' (which means that the realm of formulas is restricted to pp formulas) and `cardinality of the language' is strengthened to `countably generated' (no matter what that cardinality). Accordingly, a proof of (\ref{RG}) using pp formulas was given in \cite[Lemma 3.11]{habil}\footnote{For another generalization of Mittag-Leffler module, where purities given by classes of finitely presented modules other than $R\mathop{-\rm mod}$ are considered.} and \cite{ML}.  A version of this proof closer to the original L\"owenheim-Skolem Theorem, \cite[Thm.1.3.27]{P2}, carries over one-to-one to the more general case of  $\mathcal K$-Mittag-Leffler  modules.

\begin{prop}\label{ctblesep} Every countable subset of a $\mathcal K$-Mittag-Leffler   module is contained in a countably generated $\mathcal L$-pure submodule that is  $\mathcal K$-Mittag-Leffler.
\end{prop}
\begin{proof}
Suppose  $M$ is a  $\mathcal K$-Mittag-Leffler module and $C$ a countable subset.  We are going to construct an $\mathcal L$-pure submodule $N$ of $M$ that contains $C$ (which then is $\mathcal K$-Mittag-Leffler).

First, list $C$ as $( c_i )_{i<\omega}$. Then successively extend this  to a list of  tuples  as follows.
 Starting with  $\bar a_0$ the singleton $c_0$, (or any other tuple containing it), in the $i$th step ($i\geq 0$), choose a pp formula $\phi_i(\bar x_0, \ldots, \bar x_i)$ in $p_i:={\rm{pp}}_M(\bar a_0, \ldots,\bar a_i)$ that $\mathcal L$-generates $p_i$. Write $\phi_i$ as $\exists\bar x'_{i+1} \alpha_i(\bar x_0, \ldots, \bar x_i, \bar x'_{i+1})$ with $\alpha_i$ quantifier-free. Choose a witness $\bar a'_{i+1}$ for $\bar x'_{i+1}$  in $M$, concatenate it with $c_{i+1}$ and call the resulting tuple $\bar a_{i+1}$. Accordingly, let $\bar x_{i+1}$ be the tuple of variables obtained from  $\bar x'_{i+1}$ by concatenating one more variable for $c_{i+1}$. We add a dummy variable for that also in $\alpha_i$ so that we may think of its variables as being $\bar x_0, \ldots, \bar x_i, \bar x_{i+1}$ (rather than ending in $\bar x'_{i+1}$). (In case, $\phi_i$ is quantifier-free, $\bar a_{i+1}$ would be the singleton $c_{i+1}$.)

Now, the module, $N$, generated by the $\bar a_i$  is $\mathcal L$-pure by construction. Indeed,  since $\phi_i$ $\mathcal L$-generates $p_i$ while its witnesses are inside $N$, $\mathcal L$-purity is guaranteed for the generators of $N$. But it's a simple exercise to verify the same for any other tuple in $N$ (this was done in \cite[Lemma 1.5]{habil}, cf.\, \cite[Fact 2.4]{PR}).
\end{proof}

\begin{cor}\label{puresep}
 A module is $\mathcal K$-Mittag-Leffler iff it is countably $\mathcal L$-pure separable by countably generated $\mathcal K$-Mittag-Leffler  modules.\qed
\end{cor}

\subsection{Finite separation}
Finitely pure separated modules were characterized  in \cite[Rem.3.13]{habil}.\footnote{and called \emph{strong Mittag-Leffler modules}---for purities as mentioned in the previous footnote.} We desribe the $\mathcal L$-pure variant of this particular kind of $\mathcal K$-Mittag-Leffler module in the same way now.
 Key is the following.

\begin{lem} \cite[Rem.3.13]{habil}
If the pp type of a tuple $\bar a$ in a module $M$ is $\mathcal L$-generated by a quantifier-free pp formul
, then the submodule generated by $\bar a$ is $\mathcal L$-pure in $M$.

If $M$ is $\mathcal K$-Mittag-Leffler, the converse is true.
\end{lem}
\begin{proof}
Suppose,  ${\rm{pp}}_{M}(\bar a)$ is   $\mathcal L$-generated by the quantifier-free formula $\alpha$. Then $\alpha\leq_{\mathcal L}\phi$ for every $\phi\in{\rm{pp}}_{M}(\bar a)$. But being quantifier-free, $\alpha$ is already in ${\rm{pp}}_{A}(\bar a)$, so $\alpha$ makes (iii) of Lemma \ref{Fpurefg} true uniformly, and $A$ is $\mathcal L$-pure in $M$.

If, conversely, $A$ is $\mathcal L$-pure in  the $\mathcal K$-Mittag-Leffler $M$, then ${\rm{pp}}_{M}(\bar a)$ is  $\mathcal L$-generated by a single pp formula $\phi$ and it suffices that this be $\mathcal L$-implied by a quantifier-free formula $\alpha\in{\rm{pp}}_{M}(\bar a)$.  By purity,  $\phi$ is $\mathcal L$-implied by some $\psi$ in ${\rm{pp}}_{A}(\bar a)$. Write $\psi$ as $\exists\bar y \theta(\bar x, \bar y)$, where $\theta$ is quantifier-free, and pick a witness $\bar b\in A$ for $ \theta(\bar a, \bar y)$. As $\bar a$ generates $A$, we can write $\bar b$ as a term in $\bar a$ or, put in more linear algebraic terminology, there's a matrix $\mathfrak B$ over the ring such that $\bar b=\mathfrak B\bar a$. Let $\alpha(\bar x)$ be the formula $ \theta(\bar x, \mathfrak B\bar x)$. It is quantifier-free and in ${\rm{pp}}_{A}(\bar a)\subseteq{\rm{pp}}_{M}(\bar a)$.
The  sequence of implications $\alpha\sim \theta(\bar x, \mathfrak B\bar x)\leq \exists\bar y \theta(\bar x, \bar y)\sim\psi\leq_{\mathcal L}\phi$ concludes the proof.
\end{proof}

\begin{rem}\label{specialfp}
 Applied to the case where a $\mathcal K$-Mittag-Leffler module $M$ itself is generated by $\bar a$, this lemma shows that ${\rm{pp}}_M(\bar a)$ is $\mathcal L$-generated by a quantifier-free formula.

 Together with Remark \ref{qfsharpimpl}, this entails that finitely generated $\sharp$-atomic modules are atomic (that is, $R\text{\rm -Mod}$-atomic). Thus finitely generated  $R_R$-Mittag-Leffler modules are Mittag-Leffler and hence finitely presented (a fact presumably known since \cite{Goo}).

\end{rem}

\begin{thm}
A module $M$ is finitely $\mathcal L$-pure separable by finitely generated  $\mathcal K$-Mittag-Leffler modules if and only if every finite tuple in $M$ can be extended  to a finite tuple whose pp type  is $\mathcal L$-generated by a quantifier-free pp formula.

If $R_R\in\langle\mathcal K\rangle$  (or, equivalently, $_R\sharp\subseteq\langle\mathcal L\rangle$), then such a
module $M$ is finitely $\mathcal L$-pure separable by finitely presented modules.
\end{thm}
\begin{proof}
Suppose $M$ is finitely $\mathcal L$-pure separable by finitely generated  $\mathcal K$-Mittag-Leffler modules.
Then $M$ is $\mathcal K$-Mittag-Leffler (see the remark at the beginning of this section), and  the second part (the converse) of the lemma applies to prove the direction from left to right.

For the converse, let $\bar c$ be a finite subset of $M$ (written as a tuple). By hypothesis, it can be extended to a tuple $\bar a$ whose pp type is  $\mathcal L$-generated by a quantifier-free formula. Call the submodule it generates $C$. By the lemma, $C$ is $\mathcal L$-pure in $M$. Finally, $C$ is    $\mathcal L$-atomic by Remark \ref{LLatfg}, hence $\mathcal K$-Mittag-Leffler.
\end{proof}

\section{Countably generated modules} \label{countablygenerated}
The previous section points to the importance of countably generated $\mathcal K$-Mittag-Leffler modules as building blocks. The classical ones, i.e., the  countably generated Mittag-Leffler modules (when $\mathcal K=\text{\rm Mod-}R$) are precisely the countably generated pure-projectives in $R\text{\rm -Mod}$ (and this fact is essential ingredient in fact (1) at the very top of this paper).
For general $\mathcal K$, this is no longer the case---in fact, it can be seen that it is the case exactly when $\langle\mathcal K\rangle=\text{\rm Mod-}R$. In this final section we prove the best approximation
we were able to find, namely,  Thm.\,\ref{???Existence}, which characterizes countably generated $\mathcal K$-Mittag-Leffler modules as the uniformly  $\mathcal L$-pure images of what is called $\mathcal L$-$\omega$-limits in Section \ref{ctblechains}.

\subsection{Descending chains of pp formulas}
We  first  refine the method of successive realization of pp formulas as follows.

 \begin{rem}\label{Lchain}
 Replacing, in the proof of Proposition \ref{ctblesep}, each $\phi_i$ by its conjunction with $\alpha_{i-1}$, we may (for every $i>0$) ensure that not only $\phi_{i-1}\geq\phi_i$, but even $\alpha_{i-1}\geq \alpha_i$. Note the role of the variables: $\alpha_{i-1}(\bar x_0, \ldots, \bar x_i)\geq \alpha_i(\bar x_0, \ldots, \bar x_i, \bar x_{i+1})$, hence also $\alpha_{i-1}(\bar x_0, \ldots, \bar x_i)\geq \exists\bar x_{i+1} \alpha_i(\bar x_0, \ldots, \bar x_i, \bar x_{i+1})$ (which is equivalent to $\phi_i$). So, not only do we have a descending chain $\phi_0\geq\phi_1\geq\phi_2\geq\ldots$ of pp formulas, but it can be chosen so that the underlying quantifier-free formulas $\alpha_i$ also form a descending chain.
 Further, as $\phi_{i+1}\in p_{i+1}$, we see that $\exists\bar x_{i+1}\phi_{i+1}$ is contained in the type $p_i$ and therefore $\mathcal L$-implied by $\phi_i$. So, on top of the `implications'  $\phi_0\geq\phi_1\geq\phi_2\geq\ldots$ and thus,  for all $j>i$, the implications  $\exists \bar x_{i+1} \ldots \exists \bar x_{j}\phi_{j}\leq\phi_{i}$ (in $R\text{\rm -Mod}$),  we also have the
converse $\mathcal L$-implications and therefore $\mathcal L$-equivalences  $\exists \bar x_{i+1} \ldots \exists \bar x_{j}\phi_{j}\sim_{\mathcal L}\phi_{i}$ (which may hold only in members of $\mathcal L$).

\begin{definition}
 A  chain $\phi_0\geq\phi_1\geq\phi_2\geq\ldots$ as in the above remark is called  an \emph{$\mathcal L$-chain}.
\end{definition}

A model theory of  $\mathcal L$-chains may be developed that allows to speak about their free realizations, radicals (in the sense of Herzog, cf.\,\cite{HR}), and the like.
\end{rem}

\begin{lem}\label{existLchain}
Every countable sequence generating a (countably generated)  $\mathcal K$-Mittag-Leffler module can be arranged as a sequence of tuples satisfying an $\mathcal L$-chain of pp formulas.
\end{lem}
\begin{proof} Let $N$ be a $\mathcal K$-Mittag-Leffler module generated by $c_i$  ($i<\omega$). As in Lemma \ref{ctblesep} (and the following remark) we choose tuples $\bar a_0, \bar a_1, \bar a_2, \ldots$ satisfying an $\mathcal L$-chain of pp formulas, except, this time we choose them only among the generators, i.e., we rearrange the $c_0, c_1, c_2, \ldots$ in such a sequence of tuples. This can be accomplished as follows.

Each time we choose a witness, we express it in terms of the generators. To be specific, when we choose a witness for $\bar x_{i+1}$ in $\phi_i = \exists\bar x_{i+1} \alpha_i(\bar x_0, \ldots, \bar x_i, \bar x_{i+1})$ we  rewrite it in the generators, i.e., we write it as $\mathfrak B\bar a_{i+1}$, where $\bar a_{i+1}$ is a tuple of generators and $\mathfrak B$ a matrix over the ring.
Replacing the original $\alpha_i$ by $\alpha_i(\bar x_0, \ldots, \bar x_i, \mathfrak B\bar x_{i+1})$, we may assume that  $\alpha_i(\bar x_0, \ldots, \bar x_i, \bar x_{i+1})\in {\rm{qf}}(\bar a_0, \ldots, \bar a_i, \bar a_{i+1})$ and $\phi_i=\exists\bar x_{i+1}\alpha_i $.

As before, we also make sure to include the next $c_{i+1}$ from the list of generators in our choice of $\bar a_{i+1}$.  Filling in redundant generators and deleting those that are already listed in $\bar a_0, \ldots, \bar a_i$, we may ensure that they are pairwise disjoint and that their concatenation followed by $\bar a_{i+1}$ constitutes another initial segment of the original list of generators
\end{proof}

\subsection{Countable chain limits}\label{ctblechains}

\begin{definition}\label{Lpure}\textbf{}
 \begin{enumerate}[\upshape(1)]
\item  Call a chain $M_0 \stackrel{g_0}\to M_1 \stackrel{g_1}\to \ldots \stackrel{g_{k-1}}\to M_k \stackrel{g_k}\to\ldots$ ($k<\omega$)

---by extension also its $\omega$-limit---
 \emph{$\mathcal L$-pure on images} if the map $g_{i+1}$ is $\mathcal L$-pure on ${\rm{im}\,} g_i$ (in the sense of Def.\,\ref{restricted}), for every  $i\in I$.
\item An  \emph{$\cal L$-\,$\omega$-limit}
is an $\omega$-limit of finitely presented modules that is $\mathcal L$-pure on images.
\item {\rm (Notation)} Given such a chain, we  fix the connecting maps $f_i^{i}$, the identity map on $M_i$,  $f_i^{i+1}=g_i$, and  $f_i^{j+1} = g_{j}\ldots g_i$ for $i < j< \omega$; and  the limit  $M_\omega$ with the canonical maps $f_i: M_i \to M_\omega$ where $f_j f_i^j = f_i$ for all $i\leq j$.

\end{enumerate}
\end{definition}

The definition makes sense for more general direct systems and limits, but this is all we need here.

\begin{lem}\label{LlimitLpure}
Given such a chain  that is $\mathcal L$-pure on images,  the connecting maps $f_{i+1}^j$ ($j>i$), as well as the canonical map $f_{i+1}$, are   $\mathcal L$-pure  on ${\rm{im}\,} g_i$, for all $i$.

If, in addition, $R_R\in\langle\mathcal K\rangle$, all these maps are  monic and the  $g_i(M_i)$ are finitely presented.

\end{lem}
\begin{proof} The assertion on the connecting maps follows directly from the transitivity of $\mathcal L$-equivalence of types. For the second, we have to show that, given $\bar{b}$ in $M_i$, the type $p={\rm{pp}}_{M_{i+1}}(g_i(\bar{b}))$ and the type $q={\rm{pp}}_M(f_{i+1}(g_i(\bar{b})))$  are $\mathcal L$-equivalent. As $p\subseteq q$, we have (even) $q\leq p$ and it remains to verify that, conversely, every $\phi\in q$ is $\mathcal L$-implied by $p$.

By Rem.\,\ref{limittruth}, $\phi$ is eventually true in the tail of $f_{i+1}(g_i(\bar{b}))$ starting at $g_i(\bar{b})$. Pick any $M_k$ with $k$ above $i+1$, where $f_{i+1}^k(g_i(\bar{b}))$ satisfies $\phi$. The pp type of this tuple being $\mathcal L$-equivalent to $p$ by the first part, we see that, in particular, $p$ $\mathcal L$-implies $\phi$.

The moreover clause follows from Lemma \ref{specialmonic} and  Remark \ref{specialfp}.
 \end{proof}

\begin{rem}\label{gi}
(1) To avoid any misconception, while the $\cal L$-\,$\omega$-limit $M_\omega$ is always the direct limit of the chain of monomorphisms $g_0(M_0) \hookrightarrow g_1(M_1) \hookrightarrow g_2(M_2)\ldots$, these images may no longer be finitely presented.

 \noindent
(2)  If $\mathcal S$ is an ascending chain of coherent modules that is $\mathcal L$-pure on images, then its direct limit is  a direct limit of an $\mathcal L$-pure chain of finitely presented modules. Namely, the images of all the maps along the chain are themselves finitely presented and $\mathcal L$-pure in the next member of the chain. In particular, countably generated left $\mathcal K$-Mittag-Leffler modules over left coherent rings are `unions' of $\mathcal L$-pure chains of finitely presented modules (and conversely).
\end{rem}

\begin{lem}\label{LoLatomic}
 Every $\cal L$-\,$\omega$-limit is $\mathcal L$-atomic, hence $\mathcal K$-Mittag-Leffler.
\end{lem}
\begin{proof}
 Consider a  chain as in \ref{Lpure}(1) where all $M_i$ are finitely presented. Every tuple in its limit   $M_\omega$ is the image under a canonical map of a $g_i$-image in $M_{i+1}$ for some $i$. By the previous lemma, its pp type, $q$, in $M_\omega$ is $\mathcal L$-equivalent to that of the image tuple in $M_{i+1}$. The latter module being $\mathcal L$-atomic, we see that also $q$ is $\mathcal L$-finitely generated.
 \end{proof}

\begin{rem}
The proof shows the same for  a limit  of a chain $\mathcal L$-pure on images of \emph{arbitrary} $\mathcal K$-Mittag-Leffler modules.
\end{rem}

Next we establish a connection between $\cal L$-\,$\omega$-limits and $\mathcal L$-chains of pp formulas.

\begin{notat}\label{MPhiDefined}
Suppose  $\Phi=(\phi_i : i<\omega)$ is an $\mathcal L$-chain with corresponding chain of quantifier-free formulas $(\alpha_i : i<\omega)$  as in Remark \ref{Lchain}.
Every quantifier-free pp formula $\alpha_i$ has a  free realization $(M_i, \bar p_{0}^i, \ldots, \bar p_{i+1}^i)$ with $M_i$ finitely presented and generated by the realizations $\bar p_{0}^i, \ldots, \bar p_{i+1}^i$ of $\alpha_i$.
 Then $(M_{i+1}, \bar p_0^{i+1}, \ldots, \bar p_{i+1}^{i+1})$ realizes $\alpha_i$, hence  there is a map
$$g_{i}: (M_i, \bar p_{0}^i, \ldots, \bar p_{i+1}^i)\to (M_{i+1}, \bar p_0^{i+1}, \ldots, \bar p_{i+1}^{i+1}).$$

Note, $(M_i, \bar p_{0}^i, \ldots, \bar p_{i}^i)$ is a free realization of $\phi_i$ for all $i$.

Define the connecting maps $f_i^j$ and the canonical maps $f_i: M_i \to M_\omega$  as in \ref{Lpure}(3). To indicate the origin of this limit, we may denote $M_\omega$ by $M_\Phi$. By the \emph{$i$th tail} in  $M_\Phi$ we mean the tail $\{ p_{i}^j | j\geq i\}$ and denote its limit in  $M_\Phi$ by $\bar q_i$, i.e.,
 $\bar q_i =f_i(\bar p_{i}^i)$ for $i<\omega$ (hence $\bar q_i =f_j(\bar p_{i}^j)$ for any $j\geq i$).

For every $i$, let $\Phi_i:=\{ \exists \bar x_{i+1} \ldots \exists \bar x_{j} \phi_j  : i\leq j<\omega\}$ (this is also a chain of pp formulas, but in finitely many free variables; for $j=i$, the formula is taken to be just $\phi_i$).
\end{notat}

\begin{lem}\label{basicchainstuff}\textbf{
\begin{enumerate}[\upshape (1)]
\item The tuples $\bar q_0, \bar q_1, \bar q_2, \ldots$ generate the module  $M_\Phi$.
\item For every $i$, the type ${\rm{pp}}_{M_\Phi}(\bar q_0, \ldots, \bar q_i)$ is equivalent to $\Phi_i$.
 \item ${\rm{pp}}_{M_\Phi}(\bar q_0, \ldots, \bar q_i)$ is $\mathcal L$-generated by  $\phi_i$.
 \end{enumerate}
\end{lem}
\begin{proof}
(1) is clear from the construction. (3) follows from (2), since all the formulas in $\Phi_i$ are $\mathcal L$-equivalent to $\phi_i$ in an  $\mathcal L$-chain.

 To prove (2), first note that, by  the defining properties of direct limit, $\Phi_i\subseteq {\rm{pp}}_{M_\Phi}(\bar q_0, \ldots, \bar q_i)$, for $f_j( \bar p_{0}^j, \ldots, \bar p_{i}^j)=(\bar q_0, \ldots, \bar q_i)$ for every $j\geq i$ (remember, pp formulas are preserved under homomorphisms).

 Now let $\phi=\phi(\bar x_0, \ldots, \bar x_i)\in {\rm{pp}}_{M_\Phi}(\bar q_0, \ldots, \bar q_i)$. Then there must be $j\geq i$ such that $(P_j, \bar p_{0}^j, \ldots, \bar p_{i}^j)\models \phi$. But then,
 as $(P_j, \bar p_{0}^j, \ldots, \bar p_{j}^j)$ freely realizes $\phi_j$, the formula $\exists \bar x_{i+1} \ldots \exists \bar x_{j} \phi_j $ is freely realized by $(P_j, \bar p_{0}^j, \ldots, \bar p_{i}^j)$ and thus implies  $\phi$, as desired.
\end{proof}

\begin{rem}  If $\sharp\subseteq\langle\mathcal L\rangle$, then, by Lemma \ref{qfgen},  $\phi_i$  generates the corresponding quantifier-free type in all of $R\text{\rm -Mod}$.
\end{rem}

\begin{lem}\label{MPhiisLo}
 For every $\mathcal L$-chain  $\Phi=(\phi_i : i<\omega)$, the limit $M_\Phi$ is an $\cal L$-\,$\omega$-limit (hence $\mathcal K$-Mittag-Leffler). Conversely, every  $\cal L$-\,$\omega$-limit  is of the form $M_\Phi$ for some $\mathcal L$-chain $\Phi$.
\end{lem}
\begin{proof}
 To prove the first assertion, we show $M_\Phi$ is $\mathcal L$-pure on images. The image of $g_i$  is the submodule of $M_{i+1}$ generated by $\bar p_0^{i+1}, \ldots, \bar p_{i+1}^{i+1}$. That is, we have to verify that the pp type of this tuple of $i+2$ tuples in  $M_{i+1}$ is $\mathcal L$-equivalent to
 ${\rm{pp}}_{M_{i+2}}(\bar p_0^{i+2}, \ldots, \bar p_{i+1}^{i+2})$.
 Now, $(M_{i+1}, \bar p_0^{i+1}, \ldots, \bar p_{i+1}^{i+1})$ is a free realization of $\phi_{i+1}$, hence this formula generates ${\rm{pp}}_{M_{i+1}}(\bar p_0^{i+1}, \ldots, \bar p_{i+1}^{i+1})$. Similarly,  $\phi_{i+2}$ generates the type
  ${\rm{pp}}_{M_{i+2}}(\bar p_0^{i+2}, \ldots, \bar p_{i+2}^{i+2})$, hence $\exists \bar x_{i+2}\phi_{i+2}$ generates ${\rm{pp}}_{M_{i+2}}(\bar p_0^{i+2}, \ldots, \bar p_{i+1}^{i+2})$. But in an $\mathcal L$-chain, the formulas $\exists \bar x_{i+2}\phi_{i+2}\leq\phi_{i+1}$ are in fact $\mathcal L$-equivalent, hence so are the generated types, as desired.

  For the converse, consider any $\cal L$-\,$\omega$-limit $M_\omega$ as in  \ref{Lpure}. Being finitely presented, the module $M_0$, has a tuple of generators, $\bar p^0_0$, that freely realizes a quantifier-free pp formula $\alpha_0(\bar x_0)$. Extend its image $\bar p^1_0 := g_0(\bar p^0_0)$ to a generating tuple $(\bar p^1_0, \bar p^1_1)$ freely realizing a quantifier-free pp formula $\alpha_1(\bar x_0, \bar x_1)$, and so on. As $g_1$ is $\mathcal L$-pure on ${\rm{im}\,} g_0$, the submodule of $M_1$ generated by $\bar p^1_0$, we see that its pp type in $M_1$ is $\mathcal L$-equivalent to the pp type of  $\bar p^2_0 := g_1(\bar p^1_0)$ in $M_2$. Now the former is generated by $\exists \bar x_1\alpha_1(\bar x_0, \bar x_1)$, while the latter is generated by $\exists \bar x_1\exists \bar x_2\alpha_2(\bar x_0, \bar x_1, \bar x_2)$, which are therefore $\mathcal L$-equivalent too. Continuing like this we see that the chain $\exists \bar x_1\alpha_1\geq \exists \bar x_2\alpha_2\geq \ldots$ forms an $\mathcal L$-chain, whose limit is $M_\omega$. (One may have to drop $M_0$ to make the indices match, but that is irrelevant in the limit.)
 \end{proof}

 \subsection{Structure of countably generated Mittag-Leffler modules}
\begin{thm}[Characterization]
\label{???Existence} {\hspace{1mm}}

\begin{enumerate}[\upshape(1)]
\item  The following are equivalent for any given module $N$.
\begin{enumerate}[\upshape(i)]
\item $N$  is a countably  generated $\mathcal K$-Mittag-Leffler module.
\item $N$  is a countably  generated and  some (in fact every) countable sequence of generators  can be arranged as a sequence of tuples satisfying an $\mathcal L$-chain of pp formulas.
\item $N$ is  a uniform $\mathcal L$-pure image of an $\cal L$-\,$\omega$-limit.
  \end{enumerate}

\item  If $R_R\in \langle\mathcal K\rangle$  or $M_\Phi\in \langle\mathcal L\rangle$,  the countably generated $\mathcal K$-Mittag-Leffler modules  are precisely  the $\cal L$-\,$\omega$-limits, which, in turn, are unions of $\mathcal L$-pure chains of  finitely presented modules.

\end{enumerate}
\end{thm}
\begin{proof}
(1). As $\cal L$-\,$\omega$-limits are countably generated, Lemmas \ref{Lpureepic} and \ref{LoLatomic} show that (iii) implies (i).  By Lemma \ref{existLchain}, (i) implies (ii). For the remaining implication, assume (ii), that is, a countable sequence of tuples $\bar a_0, \bar a_1, \bar a_2, \ldots$ realizing an $\mathcal L$-chain $\Phi$ as in Remark \ref{Lchain}. Construct the $\cal L$-\,$\omega$-limit $M_\Phi$ according to Notation \ref{MPhiDefined}. By Lemma \ref{MPhiisLo}, $M_\Phi$ is an $\cal L$-\,$\omega$-limit and we are going to exhibit a uniform $\mathcal L$-pure epimorphism from it to $N$.

As   $(P_i, \bar p_{0}^i, \ldots, \bar p_{i+1}^i)$ is a free realization of $\alpha_i$, we may send it to $(N, \bar a_{0}, \ldots, \bar a_{i+1})$ by a  map $h_i$.   Clearly,  the maps $h_i$ and $h_j f_i^j$ coincide on the
generators $\bar p_{0}^i, \ldots, \bar p_{i+1}^i$ of $P_i$. Hence $h_i=h_j f_i^j$, and the universal property of direct limit yields a map $h: M_\Phi\to N$ such that $h_i=h f_i$. Note,
 $h(\bar q_i)=\bar a_i$ for all $i$.

 That $h$ is surjective is immediate from generator considerations.
 By Lemma \ref{LlimitLpure},  every tuple in $N$ has a preimage under $h$ with $\mathcal L$-equivalent pp type, whence $h$ is uniformly  $\mathcal L$-pure.

 (2) Under the extra assumption on $\mathcal K$, the epimorphism $h$ is a monomorphism by Lemma \ref{specialmonic}, hence an isomorphism. The same holds true if $M_\Phi\in \langle\mathcal L\rangle$, for then the $\mathcal L$-equivalent types of, say $\bar m$, in $M_\Phi$ and its image in $N$ are equivalent on $M_\Phi$, so equality of two entries in  $h(\bar m)$ would imply that of the corresponding entries in $\bar m$.

 Further, Lemma \ref{LlimitLpure} implies that $\cal L$-\,$\omega$-limits are  unions of the finitely presented $g_i(M_i)$.
\end{proof}

 \subsection{The case $\mathcal L=\flat$} \label{Pruefer}
 In general, the connection between the limit and its uniformly pure image may be quite loose, as we demonstrate in a final note.

Consider $R=\mathbb{Z}$ (or any other domain) and let $\mathcal L=\flat$ (the torsion-free abelian groups). As was noted in \cite{Tf}, any torsion group is $\sharp$-Mittag-Leffler. Equivalently, every torsion group is $\flat$-atomic, which can also be seen thus:  the formula $rx\doteq 0$ is $\flat$-equivalent to $x\doteq 0$ and thus $\flat$-implies every pp formula. So, whatever torsion formula is contained in the pp type of an element, it  $\flat$-generates its pp type. The same applies to finite tuples  of torsion elements, since the conjunction of the annihilation formulas  $\flat$-implies that the tuple must be the zero tuple and therefore  $\flat$-implies the entire pp type of the tuple.
For the same reason, any two tuples of the same length of torsion elements have $\flat$-equivalent pp types, which is responsible for the fact that uniform $\flat$-purity does not say much.

Let me  illustrate this further by looking at two different kinds of $\flat$-limit that have a uniform $\flat$-pure image in common. For the first, consider any  quantifier-free chain of the form $r_0x_0\doteq0\geq r_0x_0\doteq0\wedge r_1x_1\doteq0 \geq \ldots$. Let $\tau_i$ denote its $i$th member, i.e., the conjunction $\bigwedge_{j\leq i} r_jx_j\doteq0$. As the variables are completely separate and $0$ is always there as a witness, we see that this chain is a $\flat$-chain (as a matter of fact, even an $R\text{\rm -Mod}$-chain). Denote the corresponding limit by $T$. It is not hard to see from the construction in Notation \ref{MPhiDefined} that $T$ is the union of the finitely generated groups $P_i=\bigoplus_{j\leq i} \mathbb Z/r_j\mathbb Z$, i.e., $T$ is isomorphic to $\bigoplus_{j< \omega} \mathbb Z/r_j\mathbb Z$. This group is pure-projective and can be mapped onto any other  group generated by a sequence of elements annihilated by those ring elements $r_i$, respectively.  As noted before, any such group is $\flat$-atomic (i.e., $\sharp$-Mittag-Leffler) and hence, by (the proof of) Thm.\ \ref{???Existence}, a uniform  $\flat$--pure image of $T$.

So \emph{every} image of $T$ is uniformly $\flat$-pure.
Setting $r_i=p^{i+1}$ in the above, we see that the Pr\"ufer group $\mathbb Z_{p^\infty}$ is  a uniform  $\flat$--pure image of $T=\bigoplus_{i< \omega} \mathbb Z/p^{i+1}\mathbb Z$.

Of course, letting $\alpha_i$ be the formula  $px_0 \doteq 0\ \wedge\  \bigwedge_{j<i} x_j\doteq px_{j+1}$, we obtain a much more meaningful pp chain in $\mathbb Z_{p^\infty}$. As each of these formulas implies torsion in all variables, again they $\flat$-imply just any pp formula, whence these  form a $\flat$-chain. This shows that the Pr\"ufer groups  are  themselves $\flat$-limits.

Namely, a free realization of $\alpha_i$ is given by $(\mathbb Z/p^i \mathbb Z, p^{i-1}c_i, p^{i-2}c_i, \ldots, c_i)$, where $c_i$ is a generator of that group. Obviously, the corresponding map $\rho_i$ from the $i$th free realization to the $(i+1)$st sends $p^j c_i$ to $p^{j+1} c_{i+1}$ and the limit of this chain is (isomorphic to) $\mathbb Z_{p^\infty}$ itself.  This isomorphism is also the uniform $\flat$-pure epimorphism in question.

Note, the chain of these $\alpha_i$ is obviously also a $\sharp$-chain, whence  the Pr\"ufer groups  are  also $\sharp$-limits.

\bibliographystyle{amsplain}