Textbook on the mathematics of RBC/DSGE models? I'm reading David Romer's Macroeconomics. However, what I don't like is that he doesn't go at all into detail about the mathematical underpinnings of RBC/DSGE models. When it comes to the central mathematical parts of these models, such as how to derive and solve an expectational recurrence equation in a mathematically rigorous way, Romer instead treats it very hand-wavy and skips over steps. 

Perhaps that is fine for some people, but I would like more mathematical rigour.

However, the problem is that every textbook I've found so far that is about mathematical economics only treats deterministic dynamic models.

So my question is: Is there a good textbook that treats stochastic dynamic models in a mathematically rigorous way? Note I am NOT talking about the econometric estimation of these models, but merely the purely theoretical treatment of dynamic stochastic models.
The mathematical theory behind DSGE models can be found in any textbook on stochastic dynamic optimisation.

One common reference that economists use for this is Stokey, Lucas and Prescott. Of course, they focus exclusively on recursive methods, but (perhaps) the lion’s share of dynamic problems in economics are solved in this way.

There is also a treatment of dynamic optimisation (including non-recursive and/or continuous-time methods) in Acemoglu.