The Zel'dovich approximation and the relativistic Hamilton–Jacobi equation