For an integral domain \(A\) we consider the contravariant functor \(\hom(\_, A)\) from the category of sets to the category of commutative unital \(A\)-algebras. We note that since \(A\) is an integral domain the idempotents of \(\hom(L, A)\) for any set \(L\) are precisely the maps from \(L\) to \(A\) with values in \(\{0, 1\}\).

**Lemma.**\(\hom(\_, A)\) is pseudomonic.

*Proof.*\(\hom(\_, A)\) is faithful since for any map \(m \colon L \rightarrow K\) and \(k \in K\) we have \(m^{-1} (k) = \big(\hom(m, A) (1_k)\big)^{-1} (1)\) where \(1_k := 1_{\{k\}}\) and \(1_{K'}\) is the indicator function for any subset \(K' \subseteq K\).Now suppose \(\varphi\) is an isomorphism from \(\hom(K, A)\) to \(\hom(L, A)\) then \(\varphi\) induces a bijection between the non-zero centrally primitive idempotents of \(\hom(K, A)\) and \(\hom(L, A)\). Now the non-zero centrally primitive idempotents of \(\hom(K, A)\) are just the maps of the form \(1_k\) for some \(k \in K\) and similarly for \(\hom(L, A)\). Let \(m \colon L \rightarrow K\) be the corresponding inverse bijection, then for any \(c \in \hom(K, A)\) and \(l \in L\) we have \[ \begin{split} \varphi(c) \cdot 1_l & = \varphi(c \cdot 1_{m(l)}) = \varphi(c(m(l)) 1_{m(l)}) \\ & = c(m(l)) \varphi(1_{m(l)}) = c(m(l)) 1_l \\ & = \hom(m, A) (c) \cdot 1_l \end{split} \] and thus \(\varphi = \hom(m, A)\).

**Corollary.**The functor \(\hom(\_, A)\) induces an anti-equivalence between the category of sets and the replete image of \(\hom(\_, A)\).**Corollary.**For any category \(\mathcal{C}\) the functor \(\hom(\_, A)\) induces an anti-equivalence between the category of set-valued precosheaves on \(\mathcal{C}\) and the category of presheaves with values in the replete image of \(\hom(\_, A)\).**Lemma.**\(\hom(\_, A)\) is full when restricted to the category of finite sets.*Proof.*Let \(\varphi \colon \hom(K, A) \rightarrow \hom(L, A)\) be a homomorphism with \(K\) and \(L\) finite, then \(\varphi(1_k)\) is an idempotent for each \(k \in K\) and thus we have subsets \(L_k \subseteq L\) such that \(\varphi(1_k) = 1_{L_k}\). Further we have \(\sum_{l \in L} 1_l = 1 = \varphi(1) = \varphi\big(\sum_{k \in K} 1_k) = \sum_{k \in K} \varphi(1_k) = \sum_{k \in K} 1_{L_k}\) and thus \(L = \bigcup_{k \in K} L_k\). Now for any \(k, k' \in K\) with \(k \neq k'\) we have \(0 = \varphi(0) = \varphi (1_k \cdot 1_{k'}) = 1_{L_k} \cdot 1_{L_k'}\), hence \(L_k\) and \(L_{k'}\) are disjoint. Altogether we obtain that the subsets \(L_k\) with \(k \in K\) form a partition of \(L\) and we may define a map \(m \colon L \rightarrow K\) such that \(m(l) = k\) for \(l \in L_k\) for all \(k \in K\). With this definition we have \(\varphi = \hom(m, A)\) since the two maps agree on a basis of \(\hom(K, A)\).

The following example shows that we cannot assume the unrestricted functor \(\hom(\_, A)\) to be full, if \(A\) is a general ring.

*Example.*We consider \(\hom ({\mathbb{N}}, {\mathbb{Z}}/ p {\mathbb{Z}})\). Let \(\mathfrak{a}\) be the ideal of all \(c \in \hom ({\mathbb{N}}, {\mathbb{Z}}/ p {\mathbb{Z}})\) with \(c^{-1} (0)\) cofinite. By Krull’s theorem \(\hom ({\mathbb{N}}, {\mathbb{Z}}/ p {\mathbb{Z}})\) has a maximal ideal \(\mathfrak{m}\) with \(\mathfrak{a} \subset \mathfrak{m}\) and this gives a homomorphism of fields \(i \colon {\mathbb{Z}}/ p {\mathbb{Z}}\rightarrow \hom ({\mathbb{N}}, {\mathbb{Z}}/ p {\mathbb{Z}}) / \mathfrak{m}\). We further have \([c]^p - [c] = [c^p - c] = 0\) for all \([c] \in \hom ({\mathbb{N}}, {\mathbb{Z}}/ p {\mathbb{Z}}) / \mathfrak{m}\) and as \(X^p - X\) is a polynomial of degree \(p\) it has at most \(p\) roots in \(\hom ({\mathbb{N}}, {\mathbb{Z}}/ p {\mathbb{Z}}) / \mathfrak{m}\) and thus \(i\) is a bijection. Now the canonical homomorphism from \(\hom ({\mathbb{N}}, {\mathbb{Z}}/ p {\mathbb{Z}})\) to the quotient \(\hom ({\mathbb{N}}, {\mathbb{Z}}/ p {\mathbb{Z}}) / \mathfrak{m}\) yields a homomorphism \(\varphi \colon \hom ({\mathbb{N}}, {\mathbb{Z}}/ p {\mathbb{Z}}) \rightarrow \hom(\{1\}, {\mathbb{Z}}/ p {\mathbb{Z}}) \cong {\mathbb{Z}}/ p {\mathbb{Z}}\) which is not in the image of \(\hom(\_, {\mathbb{Z}}/ p {\mathbb{Z}})\), since for any map \(m \colon \{1\} \rightarrow {\mathbb{N}}\) the element \(1_{m(1)} \in \mathfrak{a} \subset \mathfrak{m}\) is mapped to \(1 \in {\mathbb{Z}}/ p {\mathbb{Z}}\) under \(\hom(m, {\mathbb{Z}}/ p {\mathbb{Z}})\).*Remark.*From a discussion similar to that of the previous lemma and example we can conclude that for sets \(K\) and \(L\) with \(L\) non-empty, the map from \(\hom(L, K)\) to \(\hom_{A\text{-algebras}} (\hom(K, A), \hom(L, A))\) induced by \(\hom(\_, A)\) is surjective if and only if all ideals^{[6]}\(\mathfrak{p}\) of \(\hom(K, A)\), with \(\hom(K, A) / \mathfrak{p} \cong A\) as \(A\)-algebras, are of the form \({\{c \in \hom(K, A) ~|~ c(k) = 0\}}\) for some \(k \in K\).**Lemma.**\(\hom(\_, A)\) is continuous as a functor from the opposed category of sets to the category of \(A\)-algebras.*Proof.*We argue that \(\hom(\_, A)\) is continuous as a functor to the category of commutative rings, the lemma then follows by a general result about limits in the under category. We fix a small category \(D\). For an object \(X\) of any category \(\mathcal{C}\) we denote by \(\Delta (X)\) the constant functor from \(D\) to \(\mathcal{C}\) that maps any object of \(D\) to \(X\) and any morphism of \(D\) to the identity. Let \(F\) be a functor from \(D\) to the category of sets, then we have the canonical natural transformation \(t \colon F \rightarrow \Delta( {\operatorname{colim}}(F) )\). Now \(\hom(\Delta({\operatorname{colim}}(F)), A) = \Delta(\hom({\operatorname{colim}}(F), A))\) and by the universal property of the limit of \(\hom(F(\_), A)\) we have a homomorphism of rings \(s \colon \lim(\hom(F(\_), A)) \rightarrow \hom({\operatorname{colim}}(F), A)\) such that \((\hom(\_, A) \circ t) \circ \Delta(s)\) is the canonical natural transformation from \(\Delta(\lim(\hom(F(\_), A)))\) to \(\hom(F(\_), A)\). Now the forgetful functor from the category of commutative rings to the category of sets is continuous as well as \(\hom(\_, A)\) as a functor to the category of sets, hence in the category of sets both \((\hom(\_, A) \circ t) \circ \Delta(s)\) and \(\hom(\_, A) \circ t\) itself satisfy the universal property of the limit of \(\hom(F(\_), A)\), and thus \(s\) is a bijection.**Corollary.**If \(D\) is a set-valued cosheaf, then \(\hom(D(\_), A)\) defines a sheaf with values in the category of \(A\)-algebras.*Example.*For any locally path connected topological space \(X\) the singular homology \(H_0 (X)\) is naturally isomorphic to the free abelian group with basis \(\Lambda(X)\) and by the universal property of the free ablian group the restriction from \(\hom_{{\mathbb{Z}}} (H_0 (X), A)\) to \(\hom(\Lambda(X), A)\) is an isomorphism of \(A\)-modules. Further we have a natural isomorphism of \(A\)-modules from \(H^0 (X, A)\) to \(\hom_{{\mathbb{Z}}} (H_0 (X), A)\) by the universal coefficient theorem and since for any \(x \in X\) and \(\alpha, \beta \in H^0 (X, A)\) we have \[ \begin{split} \langle \alpha \cup \beta, [x] \rangle & = \langle H^0 (d, A) (\alpha \times \beta), [x] \rangle = \langle \alpha \times \beta, H_0 (d) ([x]) \rangle \\ & = \langle \alpha \times \beta, [(x, x)] \rangle = \langle \alpha \times \beta, [x] \times [x] \rangle \\ & = \langle \alpha, [x] \rangle \langle \beta, [x] \rangle, \end{split} \] where \(d \colon X \rightarrow X \times X, x \mapsto (x, x)\) is the diagonal map, the composition of these two isomorphisms is an ismorphism of \(A\)-algebras. Since the above identifications are natural in \(X\), the functors \(\hom(\Lambda(\_), A)\) and \(H^0 (\_, A)\) define isomorphic sheaves on any locally path connected topological space.Given a continuous function \(f \colon X \rightarrow M\) from a locally path connected topological space \(X\) to \(M\), the sheaves \(f_* \hom(\Lambda(\_), A) \cong f_* H^0 (\_, A)\) and \(\hom(\lambda_f (\_), A)\) are identical. Bubenik, de Silva, and Scott (2014) define a generalized persistence module on the poset of open sets of \(M\) to be a functor to another category, thus \(\lambda_f\) is a generalized persistence module with values in the opposed category of sets and \(f_* H^0 (\_, A)\) is a persistence module with values in the category of \(A\)-algebras. A functor from a category \(\mathcal{C}\) to a category \(\mathcal{D}\) then gives rise to a map from the generalized persistence modules with values in \(\mathcal{C}\) to persistence modules with values in \(\mathcal{D}\), so in their language \(f_* H^0 (\_, A)\) is the image of \(\lambda_f\) under the map induced by \(\hom(\_, A)\) and thus their theory can be used to relate these two constructions in the context of topological persistence.