Get[FileNameJoin[{NotebookDirectory[],"Packages","SpacetimeAlgebra.wl"}]]

Objects

r:=c t e[0]+x e[1]+y e[2]+z e[3]+e[4]

u:=γ c e[0]+γ ux e[1]+γ uy e[2]+γ uz e[3]

l:=lvx e[4,1,0]+lvy e[4,2,0]+lvz e[4,3,0]+lmx e[2,3,0]+lmy e[3,1,0]+lmz e[1,2,0]

Spacetime Translation

translation:=dx/2 e[2,3,0]+dy/2 e[3,1,0]+dz/2 e[1,2,0]-c dt/2 e[3,2,1]+e[0,1,2,3,4]

translation\[Antigeometric]r\[Antigeometric]Rev[translation]//BasisForm

OperatorMatrix[translation]//MatrixForm

Simplify[BulkNorm[translation]]//BasisForm

Relativistic Screw

Q[l_,ϕ_,δ_]:=(l Sin[ϕ/2]+e[0,1,2,3,4]Cos[ϕ/2]-(WeightDual[l]∧e[0])δ/2 Cos[ϕ/2]-δ/2 Sin[ϕ/2]e[0])\[Antigeometric](e[0,1,2,3,4]-c/2e[3,2,1])

Q[l,ϕ,δ]//BasisForm

Boost

B[ξ_,bx_,by_,bz_]:=(bx e[4,2,3]+by e[4,3,1]+bz e[4,1,2])Sinh[ξ/2]+e[0,1,2,3,4]Cosh[ξ/2]

OperatorMatrix[B[ξ,1,0,0]]//MatrixForm

OperatorMatrix[B[ξ,vx,vy,vz],{vx^2+vy^2+vz^2==1}]//MatrixForm

License

MIT License

Copyright (c) 2025 Eric Lengyel

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.