# Adjoining a function to a ring: what is this called?

There's a kind of construction of an extension of a ring, and that I've seen used e.g. here (although that may not be the best example) which is essentially adding a function into the ring, and taking the closure under the function.

So for every element $$r$$ in $$R_0$$ you would adjoin elements $$f(r)$$ with no relations to make $$R_1$$, and do this again to $$R_1$$ to make $$R_2$$ etc. so that $$R_\omega$$, the limit of these, is closed under a free unary operation $$f$$.

I hope I have described this clearly. I would like to know what the terminology here is, and where I can learn more about using this construction and generalisations of it.

E.g. with what I currently know, even defining a quotient by a relation, like $$f(0)=1$$ seems very messy, as you have to be able to describe all the other elements in the ring that have $$f(0)$$ as part of their construction. So I want to see how this is usually dealt with, and if there's a convenient way of defining variations like that which makes it easy to work with.

Worse, proving that any two things aren't equal after taking a massive quotient seems a near-impossible task, but I'm sure there are neat ways of doing it that I'm just not aware of.

Edit: @diracdeltafunk provided a nice universal property that makes this easier to work with. I would still like a reference for where to learn more about constructions like this, though.

Interesting question. Let's use $$R \mapsto R\{f\}$$ to denote this construction.

Note that there is a function $$R\{f\} \to R\{f\}$$ defined by $$r \mapsto f(r)$$. By abuse of notation, we'll also call this function $$f$$.

Now I claim that the pair $$(R\{f\}, f)$$ has a universal property. First, I need to define the category in which $$(R\{f\}, f)$$ lives.

Definition. Let $$\mathsf{C}$$ be the category

• whose objects are pairs $$(A,a)$$ where $$A$$ is a ring and $$a : A \to A$$ is some function,
• whose morphisms $$(A,a) \to (B,b)$$ are the ring homomorphisms $$\varphi : A \to B$$ such that $$\varphi(a(x)) = b(\varphi(x))$$ for all $$x \in A$$,
• and whose composition is just ordinary composition of ring homomorphisms.

Proposition. (Universal Property of $$(R\{f\},f)$$)

$$\operatorname{Hom}_{\mathsf{C}}((R\{f\},f), (A,a)) \cong \operatorname{Hom}_{\mathsf{Rng}}(R,A)$$ naturally in $$(A,a)$$.

This is relatively easy to prove, and of course uniquely characterizes $$(R\{f\}, f)$$ as an object of $$\mathsf{C}$$ up to isomorphism.

The above is a bit ad-hoc, but it is a special case of a more general idea.

Let $$\mathsf{X}$$ be any category (this was $$\mathsf{Rng}$$ in the special case above).

Let $$P : \mathsf{X}^\text{op} \times \mathsf{X} \to \mathsf{Set}$$ be any functor (this was $$\operatorname{Hom}_{\mathsf{Set}}$$ in the special case above).

Define $$\mathsf{E}(\mathsf{X},P)$$ to be the category

• whose objects are pairs $$(A,a)$$ where $$A$$ is an object of $$\mathsf{X}$$ and $$a \in P(A,A)$$,
• whose morphisms $$(A,a) \to (B,b)$$ are the morphisms $$\varphi : A \to B$$ in $$\mathsf{X}$$ such that $$\varphi_* a = \varphi^* b$$,
• and whose composition is just ordinary composition of morphisms in $$\mathsf{X}$$.

There is a forgetful functor $$U : \mathsf{E}(\mathsf{X},P) \to \mathsf{X}$$ given by $$(A,a) \mapsto A$$.

In the special case above, $$U$$ has a left adjoint, namely the construction $$R \mapsto (R\{f\},f)$$. This is precisely what is encoded by the universal property of $$(R\{f\},f)$$.

In general, I think $$U$$ may or may not have a left adjoint. But with some assumptions on $$\mathsf{X}$$ and $$P$$, this can probably be guaranteed! See e.g. the adjoint functor theorems.

One more note: in this case, $$U$$ was a forgetful functor of varieties (in the sense of universal algebra). This sort of functor always has a left adjoint, and things can be made even more general than this: you may want to look into locally presentable categories.