Hi,
To every set $X$ there corresponds a group-like coalgebra $kX$, with basis $X$. "Grouplike" means that there is a basis $X$ with $\epsilon(x)=1$ and $\Delta(x)=x\otimes x$ for all $x\in X$.


First, somewhat vague, question: is there a standard way of proving that a coalgebra $C$ is group-like? I have a linearly independent subset, but can't prove yet that it's a basis.


Specifically, I'm interested in the following. For $C,D$ coalgebras, there is a "measuring coalgebra" $(C,D)$, see Sweedler, Hopf algebras, chapter VII. If $X,Y$ are sets, and $kX,kY$ are their coalgebras, then "obviously" one should have $(kX,kY)=k Map(X,Y)$. However, it doesn't seem to follow easily from the definitions.


Recall that $(C,D)$ is defined as follows. Consider the cofree coalgebra on $U$ on $Hom\_k(C,D)$; it admits an evaluation map $U\otimes C\to D$, simply written $u(c)$. Define then $(C,D)$ as the maximal subcoalgebra of $U$ such that $\epsilon(u(c))=\epsilon(u)\epsilon(c)$ and $\Delta(u(c))=\Delta(u)(\Delta(c))$.


Letting $TC,TD$ denote the tensor algebras ovec $C,D$ respectively, $U$ naturally sits inside $Hom\_{graded}(TC,TD)$. Then, if $f:X\to Y$ is a map, there corresponds the graded homomorphism $f(x\_1\otimes...\otimes x\_n)=f(x\_1)\otimes...\otimes f(x\_n)$ from $TC$ to $TD$, which is group-like. What is to be shown is that every homomorphism in $(C,D)$ is a linear combination of such $f$'s.



Maps between sets and coalgebras
**Edit:** The answer I gave before reached a conclusion *opposite* to the one that grok and I came to in discussion later, offline. It turns out the original answer was correct up until the very end where I did some unfortunate handwaving; these lines have been corrected. In short, I am happy to say that grok's original surmise was entirely correct. 


Note: we are working throughout with the category of *cocommutative* coalgebras over a field $k$ (from here on I will omit the words "cocomutative" and "commutative" as tacitly understood). This is a cartesian closed category whose cartesian product is given by $\otimes\_k$; essentially by definition, the measuring coalgebra $M(C, D)$ plays the role of the exponential or internal hom, which we also denote by $D^C$. 




---


The natural coalgebra map $k(Y^X) \to M(k(X), k(Y))$ is in fact an isomorphism for all sets $X$ and $Y$. If $X$ has *finite* cardinality $n$, this is easy to see as follows: the functor 


$$k(-): Set \to CocommCoalg$$ 


preserves arbitrary coproducts (in fact, arbitrary colimits), and also finite products because $k(-)$ takes cartesian products to tensor products, and tensor products $C \otimes\_k D$ give cartesian products in $CocommCoalg$. In particular, $k(-)$ preserves $n$-fold cartesian products $Y^n = Y \times \ldots \times Y$, and we have a series of canonical isomorphisms 


$$k(Y^n) \cong k(Y)^n \cong (k(Y)^k)^n \cong k(Y)^{\sum^n k} \cong k(Y)^{k(n)}$$ 


as desired. (The second isomorphism comes about because $k$ is the terminal coalgebra. Throughout we are using exponential notation for the measuring coalgebra, and using formal categorical properties of exponentials.) 


I do not know whether this line of argument extends to infinite $n$. But a longer-winded analysis will give us this conclusion anyway, as follows. 


First, here is a categorical way to think of coalgebras. By the fundamental theorem of coalgebras, every coalgebra is the union of its finite-dimensional subcoalgebras. As a consequence, one can show the category of coalgebras is locally finitely presentable, hence equivalent to the category of left exact functors to $Set$ from the category opposite to $Coalg\_{fd}$, the category of finite-dimensional coalgebras. That opposite category is (equivalent to) the category $Alg\_{fd}$ of finite-dimensional algebras. The equivalence 


$$Coalg \to Lex(Alg\_{fd}, Set)$$ 


sends a coalgebra $C$ to the functor that takes a finite-dimensional algebra $A$ to $Coalg(A^\ast, C)$, the set of coalgebra morphisms from the dual $A^\ast$ to $C$. 


Given coalgebras $C$ and $D$, the measuring coalgebra $D^C = M(C, D)$ is the coalgebra that represents the left-exact functor $A \mapsto Coalg(A^\ast \otimes C, D)$. 


Now let $C = k(X)$, $D = k(Y)$. Suppose for the moment that $Y$ is finite. Then the coalgebra $k(Y)$ represents the left exact functor on $Alg\_{fd}$ given by 


$$A \mapsto Coalg(A^\ast, k(Y)) = Alg(k^Y, A)$$ 


where $k^Y$ is the algebra product of $Y$ copies of $k$. An algebra map $k^Y \to A$ picks out $|Y|$ many mutually orthogonal idempotents in $A$ which sum to $1$. So $k(Y)$ represents the functor that takes $A$ to the set of functions $e: Y \to A$ where the $e\_y$ are mutually orthogonal idempotents summing to $1$. 


For $Y$ infinite, the coalgebra $k(Y)$ is the union or filtered colimit of $k(Y\_i)$ where $Y\_i$ ranges over finite subsets of $Y$. Consequently, $k(Y)$ represents the functor which takes $A$ to the set of functions $e: Y \to A$ of finite support, again where the $e\_y$ are mutually orthogonal idempotents summing to $1$. For short, let me call such functions "**distributions**", although "probability distribution" might be more accurate. (Of course, the phrase "of finite support" is somewhat redundant since $A$ is finite-dimensional; the point is that there is no uniform bound on the size of the support.) 


Now let us turn our attention to $M(k(X), k(Y))$. It represents the functor 


$$A \mapsto Coalg(A^\ast \otimes k(X), k(Y))$$ 


where $A^\ast \otimes k(X)$ is a coalgebra coproduct of $|X|$ copies of $A^\ast$. By some abstract nonsense, we see this functor is identified with 


$$A \mapsto Coalg(A^\ast, k(Y))^X$$ 


where the right side is an $X$-indexed product of copies of $Coalg(A^\ast, k(Y))$. This just gives us $X$-tuples of distributions $e: Y \to A$. 


In this language, the natural map 


$$\omega: Dist(Y^X, A) \to Dist(Y, A)^X$$ 


takes a distribution $\{e\_\phi\}$, where $\phi$ ranges over maps $X \to Y$, to an $X$-tuple whose component at $x$ is the distribution $e^x: Y \to A$ defined by 


$$e^x\_y = \sum\_{\phi: \phi(x) = y} e\_\phi$$ 


The map $\omega$ is invertible: given an $X$-tuple of distributions $\{e^x\_{-}: Y \to A\}$ indexed by $x \in X$, define a distribution $e\_{-}: Y^X \to A$ which takes a function $\phi: X \to Y$ to 


$$e\_\phi = \prod\_{x \in X} e^{x}\_{\phi(x)}$$ 


(This may look like an infinite product, but it's okay since each finite-dimensional algebra $A$ has only finitely many distinct idempotents, and idempotency plus commutativity allows us to coalesce infinitely many factors of the same idempotent into just one.) It is not hard to see that the $e\_\phi$ are mutually orthogonal and sum to $1$, and that this rule indeed gives the inverse to $\omega$, as desired. 


