Neural Lyapunov and Optimal Control