Let
${M}^{n}$,
$n\ge 3$,
be a compact differentiable manifold with nonpositive Yamabe invariant
$\sigma \left(M\right)$. Suppose
${g}_{0}$ is a continuous metric
with volume
$V\left(M,{g}_{0}\right)=1$, smooth
outside a compact set
$\Sigma $,
and is in
${W}_{loc}^{1,p}$ for some
$p>n$. Suppose the scalar
curvature of
${g}_{0}$ is
at least
$\sigma \left(M\right)$ outside
$\Sigma $. We prove that
${g}_{0}$ is Einstein
outside
$\Sigma $ if the
codimension of
$\Sigma $
is at least
$2$. If
in addition,
${g}_{0}$ is
Lipschitz then
${g}_{0}$
is smooth and Einstein after a change of the smooth structure. If
$\Sigma $ is a compact embedded
hypersurface,
${g}_{0}$ is
smooth up to
$\Sigma $
from two sides of
$\Sigma $,
and if the difference of the mean curvatures along
$\Sigma $ at two sides of
$\Sigma $ has a fixed appropriate
sign, then
${g}_{0}$ is also Einstein
outside
$\Sigma $. For manifolds
with dimension between
$3$
and
$7$,
without a spin assumption we obtain a positive mass theorem on an asymptotically
flat manifold for metrics with a compact singular set of codimension at least
$2$.
