checking the functor $\texttt{Nil}_n$ is represented by $(\mathbb{Z}[x]/(x^n), \tau_R)$ This is the continuation of another question I did some days ago. Here.
I have been working on it and I would like to know if my try to prove it is right or not. I would appreciate a lot any feedback I can get.
I want to prove that $\texttt{Nil}_n$ is represented by $(\mathbb{Z}[x]/(x^n), \tau_R)$. Meaning that there exists a family of functions for every ring $R$, $\tau_R: h^{\mathbb{Z}[x]/(x^n)}(R) \longrightarrow \texttt{Nil}_n(R): f \mapsto f(\overline{x})$ that is an isomorphism (for each $R$)(bijective application, since it is a function between sets). And $\tau_R$ is natural, i.e. the following map commutes for every map $g:A\longrightarrow B$ of rings:
$$\require{AMScd}\begin{CD}h^{\mathbb{Z}[x]/(x^n)}(A) @>g \circ - >> h^{\mathbb{Z}[x]/(x^n)}(B) \\ @V\tau_AVV @V\tau_BVV\\\texttt{Nil}_n(A) @>>\texttt{Nil}_n(g)> \texttt{Nil}_n(B) \end{CD}$$
Proof:


*

*NATURALITY.


This means that we have to check $\tau_S \circ h^{\mathbb{Z}[x]/(x^n)}(f)= \texttt{Nil}_n (f) \circ \tau_R$.
Let $h\in h^{\mathbb{Z}[x]/(x^n)}$ be an arbitrary element.
On the one hand, we have $(\tau_S \circ h^{\mathbb{Z}[x]/(x^n)}(f))(h)= \tau_S(h^{\mathbb{Z}[x]/(x^n)}(f)(h)) = \tau_S (f\circ h) = (f\circ h)(\overline{x})\in \texttt{Nil}_n(S)$.
On the other hand, we have $(\texttt{Nil}_n (f) \circ \tau_R)(h)=\texttt{Nil}_n (f)(\tau_R(h))= \texttt{Nil}_n (f)(h(\overline{x}))= f(h(\overline{x}))= (f\circ h)(\overline{x}) \in \texttt{Nil}_n(S)$.
Hence, $\tau_S \circ h^{\mathbb{Z}[x]/(x^n)}(f)= \texttt{Nil}_n (f) \circ \tau_R$.


*

*INJECTIVITY.


Let $a,a'\in h^{\mathbb{Z}[x]/(x^n)}$ be two different elements.
$a: h^{\mathbb{Z}[x]/(x^n)} \longrightarrow R: \overline{x} \mapsto a(\overline{x})$
$a': h^{\mathbb{Z}[x]/(x^n)} \longrightarrow R: \overline{x} \mapsto a'(\overline{x})$
Since $\texttt{Nil}_n(R) \subseteq R$, $\tau_R(a)$ or $\tau_R(a')$ is nothing else than the restriction of $a,a'$ to the subset $\texttt{Nil}_n(R)$. Hence, $\tau_R(a)\neq \tau_R(a')$ when $a\neq a'$.


*

*SURJECTIVITY.


Let $b\in \texttt{Nil}_n(R)$. Since it is a nilpotent element, we know that $b^n=0$. We know that there exists an homomorphism in $h^{\mathbb{Z}[x]/(x^n)}$, namely $h$, such that $h(0)=0$. That means $b^n=0=h(0)$. But since $\overline{0}=\overline{x^n}$, $b^n=0=h(0)=h(\overline{x^n})=h(\overline{x})^n$.
Hence $b=h(\overline{x})$.
Are Naturality, Injectivity and Surjectivity well-proven?
Thank you.
 A: Naturality looks good to me.
Injectivity and surjectivity both look problematic to me though.
Again, let $A=\Bbb{Z}[x]/(x^n)$ for notational brevity.
Injectivity:
You say $\tau_R(a)$ is the restriction of $a$ to $\newcommand\Nil{\operatorname{Nil}}\Nil_n(R)$, which isn't right. $\tau_R(a)=a(\bar{x})$.
Thus you need to prove that if $a\ne a'$, then $a(\bar{x})\ne a'(\bar{x})$. However, this is immediate, since $a$ and $a'$ are maps from $A$ to $R$, which is generated over $\Bbb{Z}$ by $\bar{x}$, so if $a(\bar{x})=a'(\bar{x})$, then $a(p(\bar{x}))=a'(p(\bar{x}))$ for any polynomial $p\in \Bbb{Z}[x]$, and any element of $A$ can be expressed as $p(\bar{x})$ for some polynomial, so we must have $a=a'$.
Note I am being much more explicit above than I usually would be, since I'm trying to explain it. It should suffice to write:
If $\tau_R(a)=\tau_R(a')$, then $a(\bar{x})=a'(\bar{x})$, so $a=a'$, since $A$ is generated over $\Bbb{Z}$ by $\bar{x}$.
Surjectivity:
Your argument for surjectivity doesn't make sense. You're saying there exists $h\in h^A$ such that $h(0)=0$, and then concluding that therefore $h(\bar{x})=b$. That doesn't make any sense, since every element $h\in h^A$ satisfies $h(0)=0$, but we just showed in the injectivity section that if $h(\bar{x})=h'(\bar{x})$, then $h=h'$, so they can't possibly all have $h(\bar{x})=b$.
Instead, do the following.
Define $\phi : \Bbb{Z}[x]\to R$ by $x\mapsto b$. Since $b^n=0$, $x^n$ is in the kernel of $\phi$, so $\phi$ induces a map $\tilde{\phi}:A\to R$ with $\tilde{\phi}(\bar{x})=b$. $\tilde{\phi}$ is thus the desired map.
