Generalized Weighted Sobolev Spaces and Applications to Sobolev Orthogonal Polynomials I