A new theory of nested decision processes with memory. Part I: The stochastic framework · Study