We study general dynamic programming problems with continuous and discrete choices and general constraints. The value functions may have kinks arising (1) at indifference points between discrete choices and (2) at constraint boundaries. Nevertheless, we establish a general envelope theorem: first-order conditions are necessary at interior optimal choices. We only assume differentiability of the utility function with respect to the continuous choices. The continuous choice may be from any Banach space and the discrete choice from any non-empty set.
Andrew Clausen and Carlo Strub (2012). Envelope Theorems for Non-Smooth and Non-Concave Optimization. ECON - Working Papers 062, Department of Economics - University of Zurich.