I am trying to understand the completion $\hat R$ of a commutative unitary ring $R$ w.r.t. an ideal $J$. Please let me first recall, what I think is true (since if there is a misunderstanding already, I would be very glad for pointing it out).
The ideal $J$ defines the $J$-adic topology on $R$ by defining $$ V\subseteq R \mbox{ open} \Leftrightarrow \forall v\in V~\exists m\geq 0\mbox{ with }v+J^m\subseteq V. $$ In this topology, the closure of subset $S\subseteq R$ is the set $\cap_{m\geq 0}(S+J^m)$. This topology on $R$ is Hausdorff iff $\cap_{m\geq 0}J^m=\{0\}$ and in this case (I hope that I got this right! I am not sure about this part.) the topology is induced by a metric $d$, setting $$ d(x,y)=\delta^{-r} $$ for $x,y\in R$ where $r$ is the unique integer such that $x-y\in J^r$ but $x-y\notin J^{r+1}$ (some sources on the internet say only that ''$\delta>1$'' and I think this means that one can choose an arbitrary $\delta$ with this property and they all induce the same topology, correct?).
Now the completion $\hat R$ of $R$ w.r.t. $J$ is defined as the inverse limit $$ \hat R:=\underset{\leftarrow}{\lim}\left(\ldots\to R/J^3\to R/J^2\to R/J^1\right) $$ and I have some questions on this construction:
In what category is the limit taken? Just in the category of (commutative unitary) Rings? I am asking, since the $R/J^m$ admit also a topology (the quotient topology, i.e. the final topology) induced from the topology on $R$ described above, or the discrete topology.
I've read on the internet, that if one takes the limit in the category of topological rings where all the $R/J^m$ are equipped with the discrete topology (perhaps not the quotient topology from above), the induced topology on $\hat R$ is the right one, i.e. $$ q:R\to \hat R $$ is a continuous injective ring homomorphism and the universal one into a completion of the metric on $R$. If this is true, what happens if one takes the quotient topology on the $R/J^m$?
What if I take the limit in the category of topological spaces instead? Then, $\hat R$ admits a ring structure since every $R/J^m$ has a ring structure. Here the question is the same as before: What if I take once the discrete topology on the $R/J^m$ and once the quotient topology?
Thank you!
Fix an integer $m\geq 0$, and let $\pi:R\to R/J^m$ be the quotient map. For every subset $S\subset R/J^m$, $\pi^{-1}(S)\subset R$ is an open subset of $R$: for each $u\in\pi^{-1}(S)$, $u+J^m\subset\pi^{-1}(S)$. This means $S$ is open in $R/J^m$, so the quotient topology on $R/J^m$ is the discrete topology.
The underlying set that we get is the same whether we take the inverse limit of rings, topological spaces, or sets. One might define $\hat{R}$ to be the inverse limit of the sets $R/J^m$, given the inverse limit ring structure and the inverse limit topology (where $R/J^m$ has the quotient, i.e. discrete, topology).