When is $S^{-1}A$ smooth? Suppose $A$ is a smooth algebra over a ring $R$ ie $\operatorname{Spec}(A)\to\operatorname{Spec}(R)$ is smooth. My question (coming from exercise 8.5/2 in Bosch Algebraic Geometry) is: when is $S^{-1}A$ is a smooth $R$-algebra? It is clear to me that this is the case when $S=\{f^k\}$ because here $\operatorname{Spec}(S^{-1}A)$ is the open set $D(f)$ étale over $\operatorname{Spec}(A)$. Is there another case when this is true? To be precise the exercise asks one to "give a condition assuring that $S^{-1}A$ is smooth over $R$".
My definition of smooth: $f:X\to S$ is smooth at $x\in X$ if there exist a closed immersion $X\to W\subseteq \mathbb{A}^n_S$ with $W$ open such that the quasi-coherent sheaf of ideal $\mathcal{I}$ associated to $X\to W$ is generated by $g_{r+1},\ldots,g_n$ and the $dg_i(x)\in\Omega^1_{W/S}\otimes\kappa(x)$ are independants. Equivalently $f$ is flat at $x$ and with $s=f(x)$ the fiber $X_s$ is smooth at $x$ over $k(s)$.
 A: The identity map $\operatorname{Spec} \mathbb{Z} \to \operatorname{Spec} \mathbb{Z}$ is certainly smooth, but $\operatorname{Spec} \mathbb{Q} \to \operatorname{Spec} \mathbb{Z}$ is not because it is not locally of finite presentation [but it is flat with smooth geometric fibers]. The result you want certainly holds if $\operatorname{Spec}  S^{-1} A \to \operatorname{Spec} A$ is an open immersion (because open immersions are smooth).
Claim: The map $\operatorname{Spec}  S^{-1} A \to \operatorname{Spec} A$ is an open immersion if and only if it is locally of finite presentation.
Proof: The map is always a flat monomorphism, and flat monomorphisms are open immersions if and only they are locally of finite presentation.
Note that $\operatorname{Spec}  S^{-1} A \to \operatorname{Spec} A$ is locally of finite presentation if and only if it is locally of finite type if and only if $S^{-1}A$ is a finitely generated $A$-algebra. If $S$ is generated (multiplicatively) by $(f_1, \cdots, f_n)$ then this is certainly the case because we have a presentation of the following form.
\begin{align}
S^{-1}A=A[x_1 ,\cdots, x_n]/(f_1x_1=1, \cdots, f_n x_n=1)
\end{align}
I'm not sure if the converse holds, in general.
