Optimality Conditions in Convex Optimization: A Finite-Dimensional View