Theoretical astronomy