Lagrangian submanifolds and the Hamilton–Jacobi equation