Monetary equilibrium and the differentiability of the value function