Theoretical Analysis of Planning with Options