TITLE: Quotient of smooth variety is smooth if fixed point set is a divisor?
QUESTION [5 upvotes]: I've heard (a variant of) the following result being mentioned , but haven't been able to find a reference. I would like to know if the following is true, and if so, I'd very much appreciate a good reference (or a proof, if it is sufficiently short).
Let $X$ be a smooth quasi-projective variety, and let the finite group $G$ act on $X$. We know that the quotient $X/G$ exists as a scheme. If the set of fixed points of the action $X^G$ is a divisor (I guess we have to assume that the action is free outside $X^G$), then $X/G$ is smooth (and thus a variety).

REPLY [4 votes]: $\require{AMScd}$
$\newcommand\sco{{\mathscr O}}$
$\newcommand\spec{\text{Spec }}$
$\newcommand\ra{\rightarrow}$
$\newcommand\fm{\mathfrak m}$
I don't know a reference, but here's a proof, at least when $|G|$ is invertible on $X$. I'm not sure whether this hypothesis is necessary. Some of the ideas in what follows were taught to me by Ravi Vakil and Ben Lim.
I'll just prove it for the case of a surface $Y$ (so I'm calling $Y$ what you call $X$ and I'm calling $X$ the quotient) and the case that $G$ is $\mu_2$, but the general case for $|G|$ invertible on $Y$ and $Y$ of arbitrary dimension is analogous.
I'll show the slightly stronger statement with regularity, but if you want to prove the statement with smoothness instead, just note that you can check smoothness upon base change to the algebraic closure, in which case regularity and smoothness are the same.
$\mathbf{Lemma:}$
Let $k$ be a field of characteristic not $2$ and suppose $Y$ is a regular quasi-projective surface with a $\mu_2$ action so that the fixed locus is a divisor $R$.
Then the schematic quotient $X:= Y/\mu_2$ is again regular.
$\mathbf{Proof}:$
First, as will be used later, note that the fixed locus $R$ is in fact smooth, hence a regular divisor. See, for example Prop. A.8.10(2) in the second edition of "Pseudo-reductive groups" by Conrad, Gabber, and Prasad.
The quotient $Y/\mu_2$ is certainly regular away from the branch locus of the canonical quotient map $\pi: Y \ra X$, since away from the branch locus,
    the action is free.
    So, it suffices to check $X$ is regular along the branch locus of $\pi$.
    For this, choose a point $x \in X$ in the branch locus, so there is a unique $y \in Y$ lying over $x$ and we will show $X$ is regular at $x$.
    Let $\spec \widehat{\sco_{X,x}}$ denote the completion of the local ring at $y$, and note that because $Y \ra X$ is finite and $x$ is the unique preimage of $y$, we have a fiber square
\begin{CD}
\spec \widehat{\sco_{Y,y}} @>{}>> Y\\
@VVV @VVV\\
\spec \widehat{\sco_{X,x}} @>{}>> X
\end{CD}
Note that $\mu_2$ naturally acts on 
$\spec \widehat{\sco_{Y,y}}$ and $\spec \widehat{\sco_{X,x}}$
is the quotient. This is because
$\spec \widehat{\sco_{X,x}} \ra X$ is flat, and the formation
of invariants commutes with flat base change.
Now, rename $B := \widehat{\sco_{Y,y}}$ and $A := \spec \widehat{\sco_{X,x}}$.
It suffices to verify $A$ is regular.
Because $Y$ is regular of dimension $2$, we can write $B = k⟦x,y⟧$, with maximal ideal $\fm = (x,y)$.
Since the curve $R$ is regular, it is given locally by a single nonzero divisor $f \in \fm - \fm^2$. 
Now, let $\iota$ be the nontrivial element of $\mu_2$.
Note that $\iota$ acts on $\fm/\fm^2$. Since $\iota$ acting on the cotangent space as order $2$, all eigenvalues
must be $\pm 1$.
We claim $\iota$ in fact has a basis of eigenvectors.
Indeed, if it did not, over an algebraic closure, by Jordan normal form, it would have the form
\begin{align*}
 \begin{pmatrix}
  \pm 1 & 1 \\
  0 & \pm 1
 \end{pmatrix}
\end{align*}
which does not have order $2$ because our field does not have characteristic $2$.
Therefore, $\iota$ must have a basis of eigenvalues when acting on $\fm/\fm^2$.
Let $u,v$ be elements so that $u \bmod \fm^2, v \bmod \fm^2$ are the two eigenvectors with $\iota(u) = \lambda u \bmod \fm^2, \iota(v) = \lambda' v \bmod \fm^2$.
By Hensel's lemma, replacing $u$ and $v$ with suitable lifts of $u, v \bmod \fm^2$, we can assume that in fact $\iota(u) = \lambda u$ and $\iota(v) = \lambda' v$ in $B$.
Since the restriction of $\iota$ acts trivially on the quotient $B/f$, by the assumption that $R$ is fixed by $\iota$,
at least one of the eigenvalues must equal $1$. Hence, we assume $\lambda' = 1$, meaning $\iota(v) = v$.
To start, we claim that $\lambda = -1$. Indeed, if $\lambda = 1$, then
both $u$ and $v$ are invariant under $\iota$.
Note further that $u$ and $v$ generate $\fm$ by Nakayama's lemma, because
$u \bmod \fm^2$ and $v \bmod \fm^2$ generate $\fm/\fm^2$.
Hence $\fm$ is invariant
and so $B$ is invariant. But this implies
$\spec B \ra \spec A$ is isomorphism, hence unramified, contradicting
our assumption.
Therefore, we now have determined that $\iota$ acting on $\fm/\fm^2$ has both eigenvalues $1$ and $-1$. Certainly the polynomials $v, u^2$ are invariant under $\iota$, and hence lie in $A$,
    and therefore we have an injection $\phi: k ⟦v, u^2⟧ \ra A$.
We claim that this is an isomorphism.
To see this, observe that the map $\phi$ is birational because we have
maps $\alpha: A \ra B, \beta: A \ra k ⟦v, u^2⟧$ so that $\phi \circ \alpha = \beta$.
Since the maps $\alpha$ and $\beta$ are both
generically of degree $2$, $\phi$ is generically of degree $1$, hence birational.
To conclude, observe that $\phi$ is a birational map between two
normal varieties, and therefore an isomorphism by the universal
property of normalization.