  We numerically study the unitary time evolution of a nonintegrable model of
hard-core bosons with an extensive number of local Z2 symmetries. We find that
the expectation values of local observables in the stationary state are
described better by the generalized Gibbs ensemble (GGE) than by the canonical
ensemble. We also find that the eigenstate thermalization hypothesis fails for
the entire spectrum, but holds true within each symmetry sector, which
justifies the GGE. In contrast, if the model has only one global Z2 symmetry or
a size-independent number of local Z2 symmetries, we find that the stationary
state is described by the canonical ensemble. Thus, the GGE is necessary to
describe the stationary state even in a nonintegrable system if it has an
extensive number of local symmetries.
