Emmy, the Algebra System: Lorentz Covariant Mechanics

A single particle in the four flat dimensions of Special Relativity
Published

January 11, 2026

I investigate a Lorentz covariant Lagrangian that is not widely known. It is discussed in the textbooks of Greiner, “Systems of Particles and Hamiltonian Mechanics” (chapter 21), and also on-line in: Cline, “Variational Principles in Classical Mechanics”.

Then I derive, along deBroglie’s argument, the momentum-wavelength relation of a free particle.

Extended Lagrangian

I start with the conventional case

(define ((L-free-particle mass) local)
  (let ((v (velocity local)))
    (* 1/2 mass (square v))))
(define (test-path t)
  (up (+ (* 4 t) 7)
      (+ (* 3 t) 5)
      (+ (* 2 t) 1)))
(show-tex-expression
  (test-path 't))

\[\begin{pmatrix}\displaystyle{4\,t + 7} \cr \cr \displaystyle{3\,t + 5} \cr \cr \displaystyle{2\,t + 1}\end{pmatrix}\]

(Lagrangian-action (L-free-particle 3.0) test-path 0.0 10.0)
435.0

The extended Lagrangian:

(define ((Lc-free-particle mass c) local)
  (let ((v (velocity local)))
    (* 1/2 mass (square c)
       (- (* (/ 1 (square c))
             (+ (square (ref v 1))
                (square (ref v 2))
                (square (ref v 3))))
          (square (ref v 0))
          1))))

According to chapter 4.3.2 of Struckmeier “Extended Lagrange and Hamilton Formalism for Point Mechanics and Covariant Hamilton Field Theory”, this “case is largely disregarded in the literature covering the extended Hamilton- Lagrange formalism (cf., for instance, Lanczos, 1949; Dirac, 1950; Synge, 1960; Goldstein et al., 2002; Johns, 2005), namely there exist extended Lagrangians that are related to a given conventional Lagrangian without being homogeneous forms in the n + 1 velocities”.

(define (Lc-test-path s)
  (up s
      (+ (* 4 s) 7)
      (+ (* 3 s) 5)
      (+ (* 2 s) 1)))
(show-tex-expression
  (Lc-test-path 's))

\[\begin{pmatrix}\displaystyle{s} \cr \cr \displaystyle{4\,s + 7} \cr \cr \displaystyle{3\,s + 5} \cr \cr \displaystyle{2\,s + 1}\end{pmatrix}\]

(Lagrangian-action (Lc-free-particle 3.0 1.0) Lc-test-path 0.0 10.0)
405.0

That’s 30 less, let’s see where we lost those 30

(show-tex-expression
  ((Gamma test-path) 't))

\[\begin{pmatrix}\displaystyle{t} \cr \cr \displaystyle{\begin{pmatrix}\displaystyle{4\,t + 7} \cr \cr \displaystyle{3\,t + 5} \cr \cr \displaystyle{2\,t + 1}\end{pmatrix}} \cr \cr \displaystyle{\begin{pmatrix}\displaystyle{4} \cr \cr \displaystyle{3} \cr \cr \displaystyle{2}\end{pmatrix}}\end{pmatrix}\]

Can you guess the following? (if not, use the sidebar!)

^{:kindly/kind :kind/hidden}
(show-tex-expression
  ((Gamma Lc-test-path) 's))
(define three-path (up (literal-function 'x)
                       (literal-function 'y)
                       (literal-function 'z)))
(show-tex-expression
  ((Gamma three-path) 't))

\[\begin{pmatrix}\displaystyle{t} \cr \cr \displaystyle{\begin{pmatrix}\displaystyle{x\left(t\right)} \cr \cr \displaystyle{y\left(t\right)} \cr \cr \displaystyle{z\left(t\right)}\end{pmatrix}} \cr \cr \displaystyle{\begin{pmatrix}\displaystyle{Dx\left(t\right)} \cr \cr \displaystyle{Dy\left(t\right)} \cr \cr \displaystyle{Dz\left(t\right)}\end{pmatrix}}\end{pmatrix}\]

(show-tex-expression
  ((compose (L-free-particle 'm) (Gamma three-path)) 't))

\[\frac{1}{2}\,m\,{\left(Dx\left(t\right)\right)}^{2} + \frac{1}{2}\,m\,{\left(Dy\left(t\right)\right)}^{2} + \frac{1}{2}\,m\,{\left(Dz\left(t\right)\right)}^{2}\]

(define four-path (up identity
                      (literal-function 'x)
                      (literal-function 'y)
                      (literal-function 'z)))
(show-tex-expression
  ((Gamma four-path) 's))

\[\begin{pmatrix}\displaystyle{s} \cr \cr \displaystyle{\begin{pmatrix}\displaystyle{s} \cr \cr \displaystyle{x\left(s\right)} \cr \cr \displaystyle{y\left(s\right)} \cr \cr \displaystyle{z\left(s\right)}\end{pmatrix}} \cr \cr \displaystyle{\begin{pmatrix}\displaystyle{1} \cr \cr \displaystyle{Dx\left(s\right)} \cr \cr \displaystyle{Dy\left(s\right)} \cr \cr \displaystyle{Dz\left(s\right)}\end{pmatrix}}\end{pmatrix}\]

Note the number 1 on top of the last 4-tuple. This will be relaxed later.

(show-tex-expression
  ((compose (Lc-free-particle 'm_0 'c) (Gamma four-path)) 's))

\[- {c}^{2}\,m_0 + \frac{1}{2}\,m_0\,{\left(Dx\left(s\right)\right)}^{2} + \frac{1}{2}\,m_0\,{\left(Dy\left(s\right)\right)}^{2} + \frac{1}{2}\,m_0\,{\left(Dz\left(s\right)\right)}^{2}\]

In calculating the Lagrangian action above, \(m_0\) was \(3\), \(c\) set to \(1\) and time was \(10\). Thus the \(-30\) stems from the \(-m_0 c^2\).

(define ((Lagrange-equations Lagrangian) w)
  (- (D (compose ((partial 2) Lagrangian) (Gamma w)))
     (compose ((partial 1) Lagrangian) (Gamma w))))
(show-tex-expression
  (((Lagrange-equations (L-free-particle 'm)) three-path) 't))

\[\begin{bmatrix}\displaystyle{m\,{D}^{2}x\left(t\right)}&\displaystyle{m\,{D}^{2}y\left(t\right)}&\displaystyle{m\,{D}^{2}z\left(t\right)}\end{bmatrix}\]

(show-tex-expression
  (((Lagrange-equations (Lc-free-particle 'm_0 'c)) four-path) 's))

\[\begin{bmatrix}\displaystyle{0}&\displaystyle{m_0\,{D}^{2}x\left(s\right)}&\displaystyle{m_0\,{D}^{2}y\left(s\right)}&\displaystyle{m_0\,{D}^{2}z\left(s\right)}\end{bmatrix}\]

The first \(0\) is because we set \(t=s\) for the path. This reduces the extended Lagrangian to the “conventional” case. Reassuring. Now we can allow arbitrary functions \(t(s)\), making the path truely 4-dimensional.

(define Lc-path (up (literal-function 't)
                    (literal-function 'x)
                    (literal-function 'y)
                    (literal-function 'z)))
(show-tex-expression
  (((Lagrange-equations (Lc-free-particle 'm_0 'c)) Lc-path) 's))

\[\begin{bmatrix}\displaystyle{- {c}^{2}\,m_0\,{D}^{2}t\left(s\right)}&\displaystyle{m_0\,{D}^{2}x\left(s\right)}&\displaystyle{m_0\,{D}^{2}y\left(s\right)}&\displaystyle{m_0\,{D}^{2}z\left(s\right)}\end{bmatrix}\]

State the Lagrangian.

(show-tex-expression
  ((compose (Lc-free-particle 'm_0 'c) (Gamma Lc-path)) 's))

\[\frac{-1}{2}\,{c}^{2}\,m_0\,{\left(Dt\left(s\right)\right)}^{2} + \frac{-1}{2}\,{c}^{2}\,m_0 + \frac{1}{2}\,m_0\,{\left(Dx\left(s\right)\right)}^{2} + \frac{1}{2}\,m_0\,{\left(Dy\left(s\right)\right)}^{2} + \frac{1}{2}\,m_0\,{\left(Dz\left(s\right)\right)}^{2}\]

According to Struckmeier p80, “In contrast to the non-relativistic description, the constant rest energy term \(− 1/2 mc^2\) in the extended Lagrangian is essential”. I guess this constant term makes the Lagrangian “not being a homogeneous form in the velocities”.

It is very interesting that a constant term can lead to a new formalism. Cline: “It provides a plausible manifestly-covariant Lagrangian for the one-body system, but serious problems exist extending this to the N-body system when N>1”.

Nobody possesses a Lorentz covariant N-body mechanics. Goldstein “Classical Mechanics”, chapter 7,9: “Hitherto, there does not exist a satisfying description of the relativistic many body system.”

This non-homogeneous business requires an implicit \(L - pv = 0\) constraint (Cline Eq. 17.6.12, Struckmeier Eq. 21.9)

(define (Lc1-Lagrange-constraint Lagrangian)
  (- Lagrangian (* ((partial 2) Lagrangian) velocity)))

By multiplication this with a constant factor, this leads to Struckmeier Eq. 21.12:

(define Lc1-constr (compose (* (/ 2 (square 'c) 'm_0)
                               (Lc1-Lagrange-constraint (Lc-free-particle 'm_0 'c))) (Gamma Lc-path)))
(show-tex-expression
  (Lc1-constr 's))

\[\frac{{c}^{2}\,{\left(Dt\left(s\right)\right)}^{2} - {c}^{2} - {\left(Dx\left(s\right)\right)}^{2} - {\left(Dy\left(s\right)\right)}^{2} - {\left(Dz\left(s\right)\right)}^{2}}{{c}^{2}}\]

This constraint cannot be dealt with easily (contrary to constraints that do not depend on velocity but position which can be treated via Lagrange multipliers.)

Calculate \(dt/ds\)

(define t-prime (sqrt (+ (- Lc1-constr)
                      (square (ref (ref (Gamma Lc-path) 2) 0)))))
(show-tex-expression
  (t-prime 's))
NoteOUT
2026-01-11T17:27:44.476Z runnervmi13qx WARN [emmy.util.logic:22] - Assuming (non-negative? (+ (expt c 2) (expt ((D x) s) 2) (expt ((D y) s) 2) (expt ((D z) s) 2))) in e3
2026-01-11T17:27:44.489Z runnervmi13qx WARN [emmy.util.logic:22] - Assuming (non-negative? (expt c 2)) in e3
2026-01-11T17:27:44.492Z runnervmi13qx WARN [emmy.util.logic:22] - Assuming (= (sqrt (expt c 2)) (expt c 1)) in simsqrt1

\[\frac{\sqrt {{c}^{2} + {\left(Dx\left(s\right)\right)}^{2} + {\left(Dy\left(s\right)\right)}^{2} + {\left(Dz\left(s\right)\right)}^{2}}}{c}\]

Maybe not useful, but one could also calculate \(d^2t/ds^2\)

^{:kindly/kind :kind/hidden}
(show-tex-expression
  ((D t-prime) 's))

Important is that \(dt/ds\) leads to \(ds/dt\) and the famous \(\gamma\) factor (see e.g. Cline)

\[\frac{ds}{dt} = \sqrt{1- \frac{v^2}{c^2}} = \sqrt{1 - \beta ^ 2} = \frac{1}{\gamma}\]

The deBroglie wavelength

In the following I follow deBroglies arguments. There is also a version with infix notation.

Internal Vibrations

as always with Einstein, we start with E = mc^2

(define (E0 m) (* m (square 'c)))
(show-tex
  (E0 'm))

\[m\,{c}^{2}\]

deBroglies first hypothesis was to assume that every particle has a hypothetical internal vibration at frequency nu0 which relates to the rest energy in rest frame of particle (only there this energy-frequency relation holds)

(define (nu_naught E0) (/ E0 'h))

particle travels at velocity vp

(define (vp beta) (* beta  'c))
(define (beta v) (/ v 'c))
(define (gamma beta) (/ 1 (sqrt (- 1 (square beta)))))

time dilation: internal vibration is slower for observer. so the frequency-energy relation does not hold: the frequency indeed decreases instead of increasing with energy. this is the conundrum deBroglie solved. so hang on.

(define (nu_one nu_naught gamma) (/ nu_naught gamma))

sine formula for internal vibration. we do not know what exactly vibrates so we set the amplitude to one

(define ((internal-swing nu_one) t)
 (sin (* 2 'pi nu_one t)))
(show-tex
  ((internal-swing 'nu_one) 't))

\[\sin\left(2\,\pi\,{\nu}_{one}\,t\right)\]

calculate the phase of the internal swing at particle point x = v * t

(define ((internal-phase nu_one v) x)
 (asin ((internal-swing nu_one) (/ x v))))
(is-equal (* 2 'pi 'nu_one (/ 'x 'v))
          ((internal-phase 'nu_one 'v) 'x))
NoteOUT
2026-01-11T17:27:44.605Z runnervmi13qx WARN [emmy.util.logic:22] - Assuming (= (asin (sin (/ (* 2 nu_one pi x) v))) (/ (* 2 nu_one pi x) v)) in asin-sin

\[2\,\pi\,{\nu}_{one}\,\left(\frac{x}{v}\right)\]

personal note: to me, this is the sine-part of a standing wave, the standing vibration.

A general Wave

now for something completely different: general definition of a wave

(define ((wave omega k) x t)
 (sin (- (* omega t) (* k x))))

with the usual definition of omega

(define (omega nu) (* 2 'pi nu))

and the simplest possible definition for the wave-vector k: a dispersion free wave traveling at phase-velocity V

(define (k omega V) (/ omega V))

calculate the phase of the wave

(define ((wave-phase nu V) x t)
 (asin ((wave (omega nu) (k (omega nu) V)) x t)))
(is-equal (* 2 'pi 'nu (- 't (/ 'x 'V)))
          ((wave-phase 'nu 'V) 'x 't))
NoteOUT
2026-01-11T17:27:44.632Z runnervmi13qx WARN [emmy.util.logic:22] - Assuming (= (asin (sin (/ (+ (* 2 V nu pi t) (* -2 nu pi x)) V))) (/ (+ (* 2 V nu pi t) (* -2 nu pi x)) V)) in asin-sin

\[2\,\pi\,\nu\,\left(t - \left(\frac{x}{V}\right)\right)\]

Phase difference

calculate the phase difference between the vibration and some wave at time t = x / v as a function of the ratio of the frequencies

(define ((phase-difference x v nu V) ratio)
  (- ((internal-phase (* ratio nu) v) x)
     ((wave-phase nu V) x (/ x v))))
(is-equal (* 2 'pi 'nu (+ (* (- 'ratio 1) (/ 'x 'v)) (/ 'x 'V)))
          ((phase-difference 'x 'v 'nu 'V) 'ratio))
NoteOUT
2026-01-11T17:27:44.651Z runnervmi13qx WARN [emmy.util.logic:22] - Assuming (= (asin (sin (/ (* 2 nu pi ratio x) v))) (/ (* 2 nu pi ratio x) v)) in asin-sin
2026-01-11T17:27:44.653Z runnervmi13qx WARN [emmy.util.logic:22] - Assuming (= (asin (sin (/ (+ (* 2 V nu pi x) (* -2 nu pi v x)) (* V v)))) (/ (+ (* 2 V nu pi x) (* -2 nu pi v x)) (* V v))) in asin-sin

\[2\,\pi\,\nu\,\left(\left(\mathsf{ratio} - 1\right)\,\left(\frac{x}{v}\right) + \left(\frac{x}{V}\right)\right)\]

state the general ratio of frequencies that keeps the vibration of the particle in phase with some wave of velocity V in terms of the velocity of the particle

(define (phase-ratio v V) (- 1 (/ v V)))
(solves (phase-ratio 'v 'V)
        (phase-difference 'x 'v 'nu 'V))

\[\mathsf{root:}\,\left(1 - \left(\frac{v}{V}\right)\right)\]

the Energy of the particle for the observer

(define (Ev E0 gamma) (* E0 gamma))

we assume the deBroglie wave has the frequency: energy divided by Planck’s constant. reminder: this relation holds in every frame of reference, especially for the observer who is not in the rest frame.

(define (nu Ev) (/ Ev 'h))

now that nu is set, calculate the physically viable ratio of the frequencies in terms of beta

(define (physical-ratio beta)
  (/ (nu_one (nu_naught 'E0) (gamma beta))
     (nu (Ev 'E0 (gamma beta)))))
(is-equal (- 1 (square 'beta))
          (physical-ratio 'beta))

\[1 - {\beta}^{2}\]

state, in terms of the particle velocity beta, the value of the physical phase-velocity V that keeps the vibration and the deBroglie wave in phase

(define (phase-velocity beta) (/ 'c beta))
(solves (phase-velocity 'beta)
        (lambda (V) (- (physical-ratio 'beta)
                       (phase-ratio (vp 'beta) V))))

\[\mathsf{root:}\,\left(\frac{c}{\beta}\right)\]

note: the phase-velocity is always greater than the speed of light. It is independent of the position x and the mass of the particle

the relativistic momentum is defined as

(define (p m v gamma)
 (* m v gamma))

calculate the deBroglie wavelength (by dividing the phase-velocity by the frequency) and show that it indeed is h divided by the momentum

(define de-broglie-wavelength
  (/ (phase-velocity (beta 'v))
     (nu (Ev (E0 'm) 'gamma))))
(is-equal (/ 'h (p 'm 'v 'gamma))
          de-broglie-wavelength)

\[\frac{h}{m\,v\,\gamma}\]

(repl/scittle-sidebar)
source: src/mentat_collective/emmy/silcm_ch01.clj