completion of category is idempotent The question belongs to elementary category theory, so please forgive me if this is trivial. I think I even read a proof for this some weeks ago, but I can't find it.
In topology, you have the equation $\overline{\overline{A}}=\overline{A}$ for subsets $A$ of a topological space $X$. An analogous theorem in category theory would be: let $X$ be a complete category, and $A$ be a full subcategory of $X$. define $\overline{A}$ as the full subcategory of $X$ consisting of those objects that are limits of small diagrams in $C$, whose objects are in $A$. Do we have $\overline{\overline{A}}=\overline{A}$?
Let's try it: assume $x_i$ is a diagram in $\overline{A}$ and $(y_{ij})_j$ is a diagram in $A$ such that $x_i = \lim_j y_{ij}$. then $\lim_i x_i = \lim_i \lim_j y_{ij}$ and we want to interchange limits. But to do this, we have to make $y_{ij}$ to a diagram in two parameters $i,j$. Perhaps the claim can't be proved in that naive way?
It is easy to see that $\overline{A}$ is closed under products: with the notation above, a morphism $(i,j) \to (i',j')$ corresponds to $i=i'$ and a morphism $j \to j'$. Then $y_{ij}$ is a diagram in two parameters with limit $lim_i x_i$. so it remains to consider equalizers, but how? The problem is here that morphisms between two limits cannot be described in terms of the factors.
Perhaps one should look at examples. Let $X$ be the category of groups, and $A$ the category of finite groups. Then $\overline{A}$ consists of the groups which come from profinite groups, which are exactly the compact, hausdorff, totally disconnected topological groups. Now the category of profinite groups is complete (due to this description) and the forgetful functor to groups preserves limits. Thus in this case, $\overline{\overline{A}} = \overline{A}$. if we put $A=\{\mathbb{Z}/n\}$, $X$ as before, then a similar argument works with the help of $\mathbb{Z}/n$-modules.
EDIT: ok david has given a counterexample. does anyone have an idea how to "fix" this? So what is the "right" definition of $\overline{A}$, so that $\overline{\overline{A}} = \overline{A}$? also, Harry asked for a condition in order this becomes true with my definition.
 A: The answer is no. Here is my counterexample:
ARGUMENT SIMPLIFIED, THANKS TO SUGGESTIONS BY Reid, Scott Carnahan AND t3suji
Let $X$ be the category of abelian groups. Let $A$ be the full subcategory on groups of the form $(\mbox{finite group}) \oplus (\mathbb{Q}-\mbox{vector space})$.
Let $D$ be any diagram in $A$. Every object $G$ in $D$ decomposes as $G_{\mathrm{fin}} \oplus G_{\mathbb{Q}}$. Because there are no nonzero homs from a finite group to $\mathbb{Q}$ or vice versa, the diagram $D$ decomposes correspondingly as $D_{\mathrm{fin}} \oplus D_{\mathbb{Q}}$. Let $P$ be the limit of $D_{\mathrm{fin}}$; this is a pro-finite group. Let $V$ be the limit of $D_{\mathbb{Q}}$; this is a $\mathbb{Q}$ vector space. Then $P \oplus V$ is the limit of $D$.
Fix a prime $p$. Let $R \subset \mathbb{Q}$ be the abelian group of rational numbers whose denominator is relatively prime to $p$. Notice that $R = \mathbb{Q} \cap \mathbb{Z}_p$, where the intersection takes place in $\mathbb{Q}_p$. The group $R$ is not an object of $\overline{A}$, because it is not of the form $P \oplus V$ as above.
Let $W$ be the set of all linear maps $\mathbb{Q}_p \to \mathbb{Q}$ for which the element $1$ of $\mathbb{Q}_p$ is sent to the element $1$ in $\mathbb{Q}$. Assuming the axiom of choice, the subspace of $\mathbb{Q}_p$ where all the maps in $W$ coincide is $\mathbb{Q}$.
Consider the diagram in $\overline{A}$ whose objects are $\mathbb{Z}_p$ and $\mathbb{Q}$, and whose maps are the restrictions to $\mathbb{Z}_p$ of the maps in $W$. Then the equalizer of this diagram is $\mathbb{Z}_p \cap \mathbb{Q}$. As observed above, this is $R$, which is not in $\overline{A}$.
A: The right definition is rather trivial: take $\bar A$ to be the intersection of all full subcategories of C containing A and which are closed in C under limits.  Clearly, if A was already closed under limits, then $A = \bar A$.
The question is then, when can one give a more concrete description of $\bar A$.
A: The answer to your question is: No.
Let A be a complete category and M be a subcategory. Assume it full and isomorphism closed to simplify things. Form the subcategory C(M) as the full iso-closed subcategory generated by the objects of M together with the limits of all small diagrams in M. Is C(M) complete? Not necessarily. I do not have an example by me, so you just have to take my word for it. Do the next best thing: form C(C(M)) = C^2(M). Is C^2(M) complete? Not necessarily (C(M) wasn't so why should C^2(M) be, right?). You should see where this is going. One keeps iterating the C construction going into the transfinite range until it eventually stabilizes (e.g. when the cardinal of the ambient category is reached).
Transfinite constructions of completions are... ugly (to put it mildly). There are all sorts of technical complications. For a taste, read the chapter on locally presentable categories in Borceux's second volume. The completion of categories under classes of (co)limits has been studied intensively by some category theorists, most notably Max Kelly. His book on enriched categories has some material on this. He has also several articles on the subject, just google them.
