Does this "extension property" for polynomial rings satisfy a universal property?

On page 151 of Paolo Aluffi's Algebra: Chapter 0, an important property of the polynomial ring $\mathbb{Z}[x_1, \cdots, x_n]$ is introduced, namely that it's initial in the category of set functions from a fixed $n$-element set $A$ to commutative rings. (Or, to put it another way, a set function $f: A \to R$ with $R$ an arbitrary commutative ring factors uniquely through $\mathbb{Z}[x_1, \cdots, x_n]$.)

After establishing this property, two examples are given; the first, a special case when $n=1$, proves the existence of a unique ring homomorphism $\mathbb{Z}[x] \to S$ sending $x$ to an element $s \in S$ and extending the unique homomorphism from $\mathbb{Z} \to S$. So far so good.

The author then goes on to give a second example:

Let $a : R \to S$ be a fixed ring homomorphism, and let $s \in S$ be an element commuting with $a(r)$ for all $r \in R$. Then there is a unique ring homomorphism $\bar{a} : R[x] \to S$ extending $a$ and sending $x$ to $s$.

It is an exercise to provide the details of this construction. It's not hard to show what this map must be and prove that it's unique by "naive" methods, but, given its placement and the pedagogical bent of the text in general, I assume that there's a slicker way to define this map based solely on categorial considerations.

So: does this "extension homomorphism" satisfy a universal property?

(I've thought vaguely about this question for a little while but didn't hit upon anything; hints or full explanations would be much appreciated.)


Solution 1:

HINT $\:$ An $\:R$-algebra $\:A\:$ is a ring that contains a homomorphic image of $\:R\ $ in the center of $\:A\:$. The universal property at hand is that $\: R[x_1,\cdots,x_n]\:$ is the universal $\:R$-algebra on $n$ generators. Since every ring is a $\:\mathbb Z$-algebra, the first case is simply the special case $\:R = \mathbb Z\:$. This should be mentioned in your textbook. Indeed, it is, see Proposition 6.4 p. 168. enter image description hereenter image description here