Then set
To do this relativistically, make sure that S is a lorentz scalar. , so we want to be a lorentz scalar.
For a free particle, position does not matter, so so .
With a potential, you get:
For a free particle in EM field: possible lorentz invariants: . Which means so .
This is not a lorentz covariant formulation.