Convexity and multi-valued Hamiltonians