Localization and a particular exact sequence Look at this proposition:

Let $R$ be a commutative ring with unity, and let $f_1,\ldots,f_n\in R$
  generate the unit ideal in $R$. Then the following sequence is exact:
$$0\longrightarrow R\xrightarrow{\alpha} \bigoplus_{i=1}^n
R_{f_i}\xrightarrow{\beta} \bigoplus_{i,j=1}^n R_{f_if_j}$$
where $\alpha(x)=(\frac{x}{1},\ldots,\frac{x_1}{1})$ and
  $\beta(\frac{x_1}{x_n},\ldots\frac{x_n}{f_n})=\left(\frac{x_i}{f_i}-\frac{x_j}{f_j}\;\textrm{in
 $R_{f_if_j}$}\right)$

Now, from this, should follow that for a fixed $f\in R$, also the following sequence should be exact (in this case the functions are the obvious ones arising from universal properties of localizations and moreover we suppose that $f_1\ldots,f_n$ generate the unit ideal in $R_f$ ): 
$$0\longrightarrow R_f\xrightarrow{\alpha} \bigoplus_{i=1}^n
R_{ff_i}\xrightarrow{\beta} \bigoplus_{i,j=1}^n R_{ff_if_j}$$
but i don't understand why. 
In general ${(R_f)}_{g}\ncong R_{fg}$ so why is the second sequence  exact?
 A: Please double check my work, but I believe that isomorphism actually does hold.
Here is why I think so. The following appears in Atiyah-MacDonald (Introduction to Commutative Algebra, p. 43, exercise 3):

Let $R$ be a ring (commutative with identity), let $S$ and $T$ be two multiplicatively closed subsets of $R$, and let $U$ be the image of $T$ in $S^{-1}R$. Show that the rings $(ST)^{-1}R$ and $U^{-1}(S^{-1}R)$ are isomorphic.

This is proved easily by showing $U^{-1} (S^{-1}R)$ satisfies the universal property of localization of $R$ at $ST$.
Now, if we take $S=\{1,f,f^2,\ldots\}$ and $T=\{1,g,g^2,\ldots\}$, then we conclude $(R_f)_{g/1} \cong R_{fg}$. One might be a little worried that $R_{fg}$ and $(ST)^{-1}R$ actually are the same ring; but...
EDIT: One can show that $(ST)^{-1}R$ satisfies the universal property of localization of $R$ at powers of $fg$.
MORE EXPLANATION: From the exercise we know $(R_f)_{g/1}$ and $(ST)^{-1}R$ are isomorphic. We only want to show $(ST)^{-1}R$ and $R_{fg}$ are the same ring. A-M give a nice criteria for showing a ring is a localization based on the universal property of localizations (corollary 3.2):

Let $S$ be a multiplicatively closed subset of a ring $R$, and suppose $\phi: R \to S^{-1}R$ is the canonical map. If $\psi: R \to Q$ is a ring homomorphism such that i) $s\in S \Rightarrow \psi(s)$ is a unit in $Q$; ii) $\psi(r)=0 \Rightarrow sr=0$ for some $s\in S$; iii) every element of $Q$ is of the form $\psi(r)\psi(s)^{-1}$; then there is a unique isomorphism $h:S^{-1}R \to Q$ such that $\psi = h\phi$.

Usually when I'm trying to show a ring is a localization, I don't build a homomorphism and then try to construct its inverse, I use this proposition.
Now, take $\phi: R \to R_{fg}$ and $\psi: R \to (ST)^{-1}R$. We verify i)-iii):
i) $\psi$ clearly maps any $(fg)^n$ to a unit in $(ST)^{-1}R$.
ii) If $\psi(r) = r/1=0$ in $(ST)^{-1}R$, then we have $f^ng^m r=0$ for some nonnegative integers $n,m$. If $n=m$, then we're done. If not, assume $m<n$ and mulitply both sides of this equality by $g^{n-m}$ (and similarly if $m>n$).
iii) Take $r/f^ng^m \in (ST)^{-1}R$. Then
$$\frac{r}{f^ng^m} = \frac{rf^mg^n}{1} \cdot \frac{1}{(fg)^n(fg)^m} = \psi(rf^mg^n) \psi((fg)^n(fg)^m)^{-1}.$$
Now invoke the above mentioned universal property.
