The Garden of Eden theorem for cellular automata and for symbolic dynamical systems