Determining if a given solution is a solution for a system of equations