Preimage of elementary Open Set $D(g)$ Tensor Product

125 Views Asked by At

Let $\phi: A \to B$ is ring morphism and $f: \operatorname{Spec}(B) \to \operatorname{Spec}(A)$ the corresponding morphism between affine schemes. Let $g\in A$ and consider the open set $$D(g) = \{x \in \operatorname{Spec}(A) \vert g \not \in x\} = \operatorname{Spec}(A_g).$$

My question how to see that $f^{-1}(D(g)) \cong \operatorname{Spec}(B \otimes_A A_g)$?

My attempts: $y \in f^{-1}(D(g)) \Leftrightarrow g \not \in f(y) = \phi^{-1}(y) \Leftrightarrow \phi(g) \not \in y \Leftrightarrow y \in D(\phi(g))$

Therefore I have to show that $\operatorname{Spec}(B_{\phi(g)})= D(\phi(g)) = \operatorname{Spec}(B \otimes_A A_g)$ but don't see how to show this.