A function which is analytic and bounded in the Unit disk is called a
generator for the Hardy space or the Bergman space if polynomials in that
function are dense in the corresponding space. We characterize generators in
terms of sub-spaces which are invariant under multiplication by the generator
and also invariant under multiplication by z, and study wandering properties of
such sub-spaces. Density of bounded analytic functions in the sub-spaces of the
Hardy space which are invariant under multiplication by the generator is also
investigated.Comment: 9 page