lagrange_check function

Optimality check with Lagrange multipliers and bordered Hessian