For a closed universe, the spatial Cauchy hypersurface is compact without boundary. There is consequently no asymptotic surface term in the gravitational Hamiltonian. On solutions, the Hamiltonian constraint and momentum constraint give
This is the vanishing canonical Hamiltonian of a closed universe: evolution generated by lapse and shift is a gauge transformation, and there is no asymptotic time-translation charge. It does not mean the local stress-energy tensor or Riemann curvature tensor is zero. In an asymptotically flat universe the same bulk constraint equations in field theory hold, but a boundary Arnowitt-Deser-Misner energy can be nonzero.
A closed spatial Cauchy hypersurface is compact and has no boundary. Thus there is no asymptotic surface charge, and the complete gravitational Hamiltonian is the integral of the Hamiltonian constraint and momentum constraint derived above. Both constraints vanish on solutions, giving
This is the vanishing canonical Hamiltonian of a closed universe: canonical evolution is generated by constraints and there is no asymptotic time translation whose boundary charge could define an Arnowitt-Deser-Misner energy. It does not require local matter energy densities or local curvature to vanish. With matter included, the corresponding total constraints still vanish.