I'm reading Leinster. On page 96, when introducing the Yoneda lemma, he says that $[\mathscr A^{\text{op}}, \textbf{Set}](H_A,X)$ is a set.
Why is $[\mathscr A^{\text{op}}, \textbf{Set}](H_A,X)$ a set? I assume it is possible to prove this without the Yoneda lemma, since at this point, he hasn't yet stated the Yoneda lemma. Also, to even state the Yoneda lemma, we first need to know that $[\mathscr A^{\text{op}}, \textbf{Set}](H_A,X)$ is a set.
Notation:
- $\mathscr A$ is a locally small category.
- $\textbf{Set}$ is the category of sets.
- $[\mathscr A^{\text{op}}, \textbf{Set}]$ is the category of functors $F : \mathscr A^{\text{op}} \to \textbf{Set}$.
- $X$ is a functor $\mathscr A^{op} \to \textbf{Set}$.
- For a category $\mathscr C$ and objects $C, D$ in $\mathscr C$, the class of morphisms from $C$ to $D$ is denoted $\mathscr C(C,D)$. In particular, $[\mathscr A^{\text{op}}, \textbf{Set}](H_A,X)$ is the class of natural transformations $H_A \to X$.
- For $A$ in $\mathscr A$, $H_A : \mathscr A^{\text{op}} \to \textbf{Set}$ is the functor defined by $$H_A(B) = \mathscr A(B, A),$$ for objects $B$ in $\mathscr A$ and \begin{align*} H_A(B \xrightarrow{g} B') : \mathscr A(B', A) &\longrightarrow \mathscr A(B, A) \\ p &\longmapsto p \circ g, \end{align*} for morphisms $B \xrightarrow{g} B'$ in $\mathscr A$.
No. The Yoneda-Lemma states that the canonical map of classes
$X(A) \to [A^{op},Set](H_A,X)$
is a bijection. The right hand side is a class, the left hand side is a set. Hence, the class can be identified with a set, and this everything we need in order to treat it as a set. In some foundations, actually every set which is isomorphic to a class is a set.