Preliminaries
Lorentz Form (metric) applied to a vector ( matrix)
produces a co-vector ( matrix). Scalar and tensor
products use matrix multiplication.
fricas
ID:=diagonalMatrix [1,1,1,1];
Type: Matrix(Integer)
fricas
G:=diagonalMatrix [-1,1,1,1]
Type: Matrix(Integer)
fricas
Scalar := Expression Integer
Type: Type
fricas
vect(x:List Scalar):Matrix Scalar == matrix map(y+->[y],x)
Function declaration vect : List(Expression(Integer)) -> Matrix(
Expression(Integer)) has been added to workspace.
Type: Void
fricas
g(x:Matrix Scalar):Matrix Scalar == transpose(x)*G
Function declaration g : Matrix(Expression(Integer)) -> Matrix(
Expression(Integer)) has been added to workspace.
Type: Void
fricas
dot(x:Matrix Scalar,y:Matrix Scalar):Scalar == g(x)*y
Function declaration dot : (Matrix(Expression(Integer)),Matrix(
Expression(Integer))) -> Expression(Integer) has been added to
workspace.
Type: Void
fricas
tensor(x:Matrix Scalar,y:Matrix Scalar):Matrix Scalar == x*g(y)
Function declaration tensor : (Matrix(Expression(Integer)),Matrix(
Expression(Integer))) -> Matrix(Expression(Integer)) has been
added to workspace.
Type: Void
Verification
fricas
htrigs2exp == rule
cosh(a) == (exp(a)+exp(-a))/2
sinh(a) == (exp(a)-exp(-a))/2
Type: Void
fricas
sinhcosh == rule
?c*exp(a)+?c*exp(-a) == 2*c*cosh(a)
?c*exp(a)-?c*exp(-a) == 2*c*sinh(a)
?c*exp(a-b)+?c*exp(b-a) == 2*c*cosh(a-b)
?c*exp(a-b)-?c*exp(b-a) == 2*c*sinh(a-b)
Type: Void
fricas
expandhtrigs == rule
cosh(:x+y) == sinh(x)*sinh(y)+cosh(x)*cosh(y)
sinh(:x+y) == cosh(x)*sinh(y)+sinh(x)*cosh(y)
cosh(2*x) == 2*cosh(x)^2-1
sinh(2*x) == 2*sinh(x)*cosh(x)
Type: Void
fricas
expandhtrigs2 == rule
cosh(2*x+2*y) == 2*cosh(x+y)^2-1
sinh(2*x+2*y) == 2*sinh(x+y)*cosh(x+y)
cosh(2*x-2*y) == 2*cosh(x-y)^2-1
sinh(2*x-2*y) == 2*sinh(x-y)*cosh(x-y)
Type: Void
fricas
Simplify(x:Scalar):Scalar == htrigs sinhcosh simplify htrigs2exp x
Function declaration Simplify : Expression(Integer) -> Expression(
Integer) has been added to workspace.
Type: Void
fricas
possible(x)==subst(x, map(y+->(y=(random(100) - random(100))),variables x) )
Type: Void
fricas
is?(eq:Equation Scalar):Boolean == (Simplify(lhs(eq)-rhs(eq))=0)::Boolean
Function declaration is? : Equation(Expression(Integer)) -> Boolean
has been added to workspace.
Type: Void
fricas
Is?(eq:Equation(Matrix(Scalar))):Boolean == _
(map(Simplify,lhs(eq)-rhs(eq)) :: Matrix Expression AlgebraicNumber = _
zero(nrows(lhs(eq)),ncols(lhs(eq)))$Matrix Expression AlgebraicNumber )::Boolean
Function declaration Is? : Equation(Matrix(Expression(Integer))) ->
Boolean has been added to workspace.
Type: Void
Massive Objects
A material object (also referred to as an observer) is
represented by a time-like 4-vector
fricas
P:=vect [p0,p1,p2,p3]
fricas
Compiling function vect with type List(Expression(Integer)) ->
Matrix(Expression(Integer))
Type: Matrix(Expression(Integer))
fricas
dot(P,P)
fricas
Compiling function g with type Matrix(Expression(Integer)) -> Matrix
(Expression(Integer))
fricas
Compiling function dot with type (Matrix(Expression(Integer)),Matrix
(Expression(Integer))) -> Expression(Integer)
Type: Expression(Integer)
fricas
solve(%=-1,p0)
Type: List(Equation(Expression(Integer)))
fricas
Q:=vect [q0,q1,q2,q3];
Type: Matrix(Expression(Integer))
fricas
S:=1/sqrt(1-s1^2-s2^2-s3^2)*vect [1,-s1,-s2,-s3]
Type: Matrix(Expression(Integer))
fricas
dot(S,S)
Type: Expression(Integer)
fricas
T:=1/sqrt(1-t1^2-t2^2-t3^2)*vect [1,-t1,-t2,-t3];
Type: Matrix(Expression(Integer))
fricas
U:=vect [cosh(u),sinh(u),0,0]
Type: Matrix(Expression(Integer))
fricas
simplify dot(U,U)
Type: Expression(Integer)
fricas
V:=vect [cosh(v),sinh(v),0,0];
Type: Matrix(Expression(Integer))
Observer "at rest"
fricas
R:=vect [1,0,0,0]
Type: Matrix(Expression(Integer))
fricas
dot(R,R)
Type: Expression(Integer)
Associated with each such vector is the orthogonal 3-d Euclidean subspace
Relative Velocity
An object P has a unique relative velocity ω(P,Q) with respect
to object Q given by
fricas
ω(P,Q)==-P/dot(P,Q)-Q
Type: Void
fricas
map(Simplify, ω(P,Q))
fricas
Compiling function ω with type (Matrix(Expression(Integer)),Matrix(
Expression(Integer))) -> Matrix(Expression(Integer))
fricas
Compiling body of rule htrigs2exp to compute value of type Ruleset(
Integer,Integer,Expression(Integer))
fricas
Compiling body of rule sinhcosh to compute value of type Ruleset(
Integer,Integer,Expression(Integer))
fricas
Compiling function Simplify with type Expression(Integer) ->
Expression(Integer)
Type: Matrix(Expression(Integer))
fricas
map(Simplify, ω(P,R))
Type: Matrix(Expression(Integer))
fricas
map(Simplify, ω(S,T))
Type: Matrix(Expression(Integer))
fricas
map(Simplify, ω(S,R))
Type: Matrix(Expression(Integer))
fricas
map(Simplify, ω(U,V))
Type: Matrix(Expression(Integer))
Idempotent Observers
fricas
PP:=tensor(-P,P)
fricas
Compiling function tensor with type (Matrix(Expression(Integer)),
Matrix(Expression(Integer))) -> Matrix(Expression(Integer))
Type: Matrix(Expression(Integer))
fricas
QQ:=tensor(-Q,Q);
Type: Matrix(Expression(Integer))
fricas
RR:=tensor(-R,R)
Type: Matrix(Expression(Integer))
fricas
SS:=map(Simplify,tensor(-S,S))
Type: Matrix(Expression(Integer))
fricas
Is?(SS*SS=SS)
fricas
Compiling function Is? with type Equation(Matrix(Expression(Integer)
)) -> Boolean
Type: Boolean
fricas
trace(SS)
Type: Expression(Integer)
fricas
TT:=map(Simplify,tensor(-T,T));
Type: Matrix(Expression(Integer))
fricas
is?(trace(SS*TT)=dot(S,T)^2)
fricas
Compiling function is? with type Equation(Expression(Integer)) ->
Boolean
Type: Boolean
fricas
Is?(SS*TT*SS = dot(S,T)^2 * SS)
Type: Boolean
fricas
UU:=map(Simplify,tensor(-U,U))
Type: Matrix(Expression(Integer))
fricas
VV:=map(Simplify,tensor(-V,V));
Type: Matrix(Expression(Integer))
fricas
map(Simplify, UU*VV)
Type: Matrix(Expression(Integer))
Unit
fricas
PP*QQ+QQ*PP-PP-QQ;
Type: Matrix(Expression(Integer))
fricas
2/trace(%)*%;
Type: Matrix(Expression(Integer))
fricas
trace %
Type: Expression(Integer)
fricas
n:=map(Simplify,SS*TT+TT*SS-SS-TT);
Type: Matrix(Expression(Integer))
fricas
N:=map(Simplify,2/trace(n)*n);
Type: Matrix(Expression(Integer))
fricas
Simplify trace N
Type: Expression(Integer)
fricas
Is?(N*N=N)
Type: Boolean
fricas
Is?(SS*N=SS)
Type: Boolean
fricas
Is?(TT*N=TT)
Type: Boolean
fricas
Is?(N*SS=SS)
Type: Boolean
fricas
Is?(N*TT=TT)
Type: Boolean
fricas
PP*RR+RR*PP-PP-RR;
Type: Matrix(Expression(Integer))
fricas
2/trace(%)*%
Type: Matrix(Expression(Integer))
fricas
SS*RR+RR*SS-SS-RR;
Type: Matrix(Expression(Integer))
fricas
2/trace(%)*%
Type: Matrix(Expression(Integer))
fricas
UU*RR+RR*UU-UU-RR;
Type: Matrix(Expression(Integer))
fricas
map(Simplify,2/trace(%)*%)
Type: Matrix(Expression(Integer))
fricas
UU*VV+VV*UU-UU-VV;
Type: Matrix(Expression(Integer))
fricas
map(Simplify,2/trace(%)*%)
Type: Matrix(Expression(Integer))
Momentum
fricas
m:=(PP*QQ+QQ*PP)/dot(P,Q)-PP-QQ;
Type: Matrix(Expression(Integer))
fricas
M:=1/trace(m)*m
Type: Matrix(Expression(Integer))
fricas
trace M
Type: Expression(Integer)
fricas
Is?(M*M=M)
Type: Boolean
fricas
(PP*RR+RR*PP)/dot(P,R)-PP-RR;
Type: Matrix(Expression(Integer))
fricas
1/trace(%)*%
Type: Matrix(Expression(Integer))
fricas
trace %
Type: Expression(Integer)
fricas
--(SS*RR+RR*SS)/dot(S,R)-SS-RR;
--map(Simplify,1/trace(%)*%)
--(UU*VV+VV*UU)/dot(U,V)-UU-VV;
--1/trace(%)*%
(UU*RR+RR*UU)/dot(U,R)-UU-RR;
Type: Matrix(Expression(Integer))
fricas
map(Simplify,1/trace(%)*%)
Type: Matrix(Expression(Integer))