  We study the questions of how to recognize when a simplicial set X is of the
form X=map(Y,A) for a given space A, and how to recover Y from X, if so. A full
answer is provided when A=K(R,n), for $R=\mathbb{F}_p$ or $\mathbb{Q}$, in
terms of a mapping algebra structure on X (defined in terms of
product-preserving simplicial functors out of a certain simplicially-enriched
sketch). In addition, when A is a suitable infinite loop space for a suitable
connective ring spectrum, we can recover Y from map(Y,A) given such a mapping
algebra structure. Most importantly, our methods provide a new way of looking
at the classical Bousfield-Kan R-completion.
