  We improve Knabe's spectral gap bound for frustration-free
translation-invariant local Hamiltonians in 1D. The bound is based on a
relationship between global and local gaps. The global gap is the spectral gap
of a size-$m$ chain with periodic boundary conditions, while the local gap is
that of a subchain of size $n<m$ with open boundary conditions. Knabe proved
that if the local gap is larger than the threshold value $1/(n-1)$ for some
$n>2$, then the global gap is lower bounded by a positive constant in the
thermodynamic limit $m\rightarrow \infty$. Here we improve the threshold to
$\frac{6}{n(n+1)}$, which is better (smaller) for all $n>3$ and which is
asymptotically optimal. As a corollary we establish a surprising fact about 1D
translation-invariant frustration-free systems that are gapless in the
thermodynamic limit: for any such system the spectral gap of a size-$n$ chain
with open boundary conditions is upper bounded as $O(n^{-2})$. This contrasts
with gapless frustrated systems where the gap can be $\Theta(n^{-1})$. It also
limits the extent to which the area law is violated in these frustration-free
systems, since it implies that the half-chain entanglement entropy is
$O(1/\sqrt{\epsilon})$ as a function of spectral gap $\epsilon$. We extend our
results to frustration-free systems on a 2D square lattice.
