Ref: http://arxiv.org/abs/0711.3220
Fourvector algebra
Author: Diego Saa (Submitted on 20 Nov 2007)
Abstract: The algebra of fourvectors is described. The fourvectors are more appropriate than the Hamilton quaternions for its use in Physics and the sciences in general. The fourvectors embrace the 3D vectors in a natural form. It is shown the excellent ability to perform rotations with the use of fourvectors, as well as their use in relativity for producing Lorentz boosts, which are understood as simple rotations.
axiom
_*_*(x,y)==concat(x(1) * y(1) + dot(x(2..), y(2..)), x(1) * y(2..) - x(2..) * y(1) + cross(x(2..), y(2..)))
Type: Void
axiom
e:Vector INT:=[1,0,0,0]
Type: Vector Integer
axiom
i:Vector INT:=[0,1,0,0]
Type: Vector Integer
axiom
j:Vector INT:=[0,0,1,0]
Type: Vector Integer
axiom
k:Vector INT:=[0,0,0,1]
Type: Vector Integer
axiom
test(e**e=e) and _
test(i**i=e) and _
test(j**j=e) and _
test(k**k=e) and _
test(e**i=i) and _
test(e**j=j) and _
test(e**k=k) and _
test(i**e=-i) and _
test(j**e=-j) and _
test(k**e=-k) and _
test(i**j=k) and _
test(j**i=-k) and _
test(k**i=j) and _
test(i**k=-j) and _
test(j**k=i) and _
test(k**j=-i)
axiom
Compiling function ** with type (Vector Integer,Vector Integer) ->
Vector Integer
Type: Boolean
Axiom has a domain for NonAssociative? Algebra
This is documented in the article:
Computations in Algebras of Fixed Rank by Johannes Grabmeir and Robert Wisbauer, from the book "Computational Algebra"
By Klaus G. Fischer, Philippe Loustaunau, Jay Shapiro.
The algebra above can be given by structural constants.
axiom
)clear all
All user variables and function definitions have been cleared.
sc:Vector Matrix Fraction Integer := [ _
[[ 1, 0, 0, 0], _
[ 0, 1, 0, 0], _
[ 0, 0, 1, 0], _
[ 0, 0, 0, 1]], _
[[ 0, 1, 0, 0], _
[-1, 0, 0, 0], _
[ 0, 0, 0, 1], _
[ 0, 0,-1, 0]], _
[[ 0, 0, 1, 0], _
[ 0, 0, 0,-1], _
[-1, 0, 0, 0], _
[ 0, 1, 0, 0]], _
[[ 0, 0, 0, 1], _
[ 0, 0, 1, 0], _
[ 0,-1, 0, 0], _
[-1, 0, 0, 0]]];
Type: Vector Matrix Fraction Integer
axiom
V:=AlgebraGivenByStructuralConstants(Fraction Integer, 4, [e,i,j,k],sc)
Type: Domain
axiom
)show V
AlgebraGivenByStructuralConstants(Fraction Integer,4,[e,i,j,k],[MATRIX,MATRIX,MATRIX,MATRIX]) is a domain constructor.
Abbreviation for AlgebraGivenByStructuralConstants is ALGSC
This constructor is exposed in this frame.
Issue )edit /usr/local/lib/axiom/target/x86_64-unknown-linux/../../src/algebra/ALGSC.spad to see algebra source code for ALGSC
------------------------------- Operations --------------------------------
?*? : (Fraction Integer,%) -> % ?*? : (Integer,%) -> %
?*? : (PositiveInteger,%) -> % ?*? : (%,Fraction Integer) -> %
?*? : (%,%) -> % ?**? : (%,PositiveInteger) -> %
?+? : (%,%) -> % ?-? : (%,%) -> %
-? : % -> % ?=? : (%,%) -> Boolean
0 : () -> % alternative? : () -> Boolean
antiAssociative? : () -> Boolean antiCommutative? : () -> Boolean
antiCommutator : (%,%) -> % associative? : () -> Boolean
associator : (%,%,%) -> % basis : () -> Vector %
coerce : % -> OutputForm commutative? : () -> Boolean
commutator : (%,%) -> % flexible? : () -> Boolean
hash : % -> SingleInteger jacobiIdentity? : () -> Boolean
jordanAdmissible? : () -> Boolean jordanAlgebra? : () -> Boolean
latex : % -> String leftAlternative? : () -> Boolean
leftNorm : % -> Fraction Integer leftTrace : % -> Fraction Integer
lieAdmissible? : () -> Boolean lieAlgebra? : () -> Boolean
powerAssociative? : () -> Boolean rank : () -> PositiveInteger
recip : % -> Union(%,"failed") rightAlternative? : () -> Boolean
rightNorm : % -> Fraction Integer sample : () -> %
someBasis : () -> Vector % unit : () -> Union(%,"failed")
zero? : % -> Boolean ?~=? : (%,%) -> Boolean
?*? : (NonNegativeInteger,%) -> %
?*? : (SquareMatrix(4,Fraction Integer),%) -> %
apply : (Matrix Fraction Integer,%) -> %
associatorDependence : () -> List Vector Fraction Integer
coerce : Vector Fraction Integer -> %
conditionsForIdempotents : Vector % -> List Polynomial Fraction Integer
conditionsForIdempotents : () -> List Polynomial Fraction Integer
convert : % -> Vector Fraction Integer
convert : Vector Fraction Integer -> %
coordinates : (Vector %,Vector %) -> Matrix Fraction Integer
coordinates : Vector % -> Matrix Fraction Integer
coordinates : (%,Vector %) -> Vector Fraction Integer
coordinates : % -> Vector Fraction Integer
?.? : (%,Integer) -> Fraction Integer
leftCharacteristicPolynomial : % -> SparseUnivariatePolynomial Fraction Integer
leftDiscriminant : Vector % -> Fraction Integer
leftDiscriminant : () -> Fraction Integer
leftMinimalPolynomial : % -> SparseUnivariatePolynomial Fraction Integer
leftPower : (%,PositiveInteger) -> %
leftRankPolynomial : () -> SparseUnivariatePolynomial Polynomial Fraction Integer
leftRecip : % -> Union(%,"failed")
leftRegularRepresentation : (%,Vector %) -> Matrix Fraction Integer
leftRegularRepresentation : % -> Matrix Fraction Integer
leftTraceMatrix : Vector % -> Matrix Fraction Integer
leftTraceMatrix : () -> Matrix Fraction Integer
leftUnit : () -> Union(%,"failed")
leftUnits : () -> Union(Record(particular: %,basis: List %),"failed")
noncommutativeJordanAlgebra? : () -> Boolean
plenaryPower : (%,PositiveInteger) -> %
represents : (Vector Fraction Integer,Vector %) -> %
represents : Vector Fraction Integer -> %
rightCharacteristicPolynomial : % -> SparseUnivariatePolynomial Fraction Integer
rightDiscriminant : Vector % -> Fraction Integer
rightDiscriminant : () -> Fraction Integer
rightMinimalPolynomial : % -> SparseUnivariatePolynomial Fraction Integer
rightPower : (%,PositiveInteger) -> %
rightRankPolynomial : () -> SparseUnivariatePolynomial Polynomial Fraction Integer
rightRecip : % -> Union(%,"failed")
rightRegularRepresentation : (%,Vector %) -> Matrix Fraction Integer
rightRegularRepresentation : % -> Matrix Fraction Integer
rightTrace : % -> Fraction Integer
rightTraceMatrix : Vector % -> Matrix Fraction Integer
rightTraceMatrix : () -> Matrix Fraction Integer
rightUnit : () -> Union(%,"failed")
rightUnits : () -> Union(Record(particular: %,basis: List %),"failed")
structuralConstants : Vector % -> Vector Matrix Fraction Integer
structuralConstants : () -> Vector Matrix Fraction Integer
subtractIfCan : (%,%) -> Union(%,"failed")
Type: Vector AlgebraGivenByStructuralConstants
?(Fraction Integer,4,[e,i,j,k]
?,[MATRIX,MATRIX,MATRIX,MATRIX]
?)
axiom
matrix([[(a.i * a.j) for j in 1..4] for i in 1..4])$OutputForm
Type: Union(AlgebraGivenByStructuralConstants
?(Fraction Integer,4,[e,i,j,k]
?,[MATRIX,MATRIX,MATRIX,MATRIX]
?),...)
axiom
rightUnit()$V
this algebra has no right unit
Type: Union("failed",...)
axiom
alternative?()$V
algebra is not left alternative
Type: Boolean
axiom
leftAlternative?()$V
algebra is not left alternative
Type: Boolean
axiom
rightAlternative?()$V
algebra is not right alternative
Type: Boolean
axiom
associative?()$V
algebra is not associative
Type: Boolean
axiom
antiAssociative?()$V
algebra is not anti-associative
Type: Boolean
axiom
--powerAssociative?()$V
commutative?()$V
algebra is not commutative
Type: Boolean
axiom
jordanAlgebra?()$V
algebra is not commutative
this is not a Jordan algebra
Type: Boolean
axiom
jordanAdmissible?()$V
algebra is not Jordan admissible
Type: Boolean
axiom
noncommutativeJordanAlgebra?()$V
algebra is not flexible
this is not a noncommutative Jordan algebra, as it is not flexible
Type: Boolean
axiom
lieAlgebra?()$V
algebra is not anti-commutative
this is not a Lie algebra
Type: Boolean
axiom
lieAdmissible?()$V
algebra is not Lie admissible
Type: Boolean
axiom
jacobiIdentity?()$V
Jacobi identity does not hold
Type: Boolean
axiom
V has FramedNonAssociativeAlgebra(Fraction Integer)
Type: Boolean
axiom
basisOfCenter()$AlgebraPackage(Fraction Integer,V)
Type: List AlgebraGivenByStructuralConstants
?(Fraction Integer,4,[e,i,j,k]
?,[MATRIX,MATRIX,MATRIX,MATRIX]
?)
axiom
basisOfCentroid()$AlgebraPackage(Fraction Integer,V)
Type: List Matrix Fraction Integer
axiom
basisOfNucleus()$AlgebraPackage(Fraction Integer,V)
Type: List AlgebraGivenByStructuralConstants
?(Fraction Integer,4,[e,i,j,k]
?,[MATRIX,MATRIX,MATRIX,MATRIX]
?)
axiom
basisOfLeftNucloid()$AlgebraPackage(Fraction Integer,V)
Type: List Matrix Fraction Integer
axiom
G:=GenericNonAssociativeAlgebra(Fraction Integer, 4, [e,i,j,k],sc)
Type: Domain
axiom
)show G
GenericNonAssociativeAlgebra(Fraction Integer,4,[e,i,j,k],[MATRIX,MATRIX,MATRIX,MATRIX]) is a domain constructor.
Abbreviation for GenericNonAssociativeAlgebra is GCNAALG
This constructor is not exposed in this frame.
Issue )edit /usr/local/lib/axiom/target/x86_64-unknown-linux/../../src/algebra/GCNAALG.spad to see algebra source code for GCNAALG
------------------------------- Operations --------------------------------
?*? : (Integer,%) -> % ?*? : (PositiveInteger,%) -> %
?*? : (%,%) -> % ?**? : (%,PositiveInteger) -> %
?+? : (%,%) -> % ?-? : (%,%) -> %
-? : % -> % ?=? : (%,%) -> Boolean
0 : () -> % alternative? : () -> Boolean
antiAssociative? : () -> Boolean antiCommutative? : () -> Boolean
antiCommutator : (%,%) -> % associative? : () -> Boolean
associator : (%,%,%) -> % basis : () -> Vector %
coerce : % -> OutputForm commutative? : () -> Boolean
commutator : (%,%) -> % flexible? : () -> Boolean
generic : (Symbol,Vector %) -> % generic : Symbol -> %
generic : Vector Symbol -> % generic : Vector % -> %
generic : () -> % hash : % -> SingleInteger
jacobiIdentity? : () -> Boolean jordanAdmissible? : () -> Boolean
jordanAlgebra? : () -> Boolean latex : % -> String
leftAlternative? : () -> Boolean lieAdmissible? : () -> Boolean
lieAlgebra? : () -> Boolean powerAssociative? : () -> Boolean
rank : () -> PositiveInteger recip : % -> Union(%,"failed")
rightAlternative? : () -> Boolean sample : () -> %
someBasis : () -> Vector % unit : () -> Union(%,"failed")
zero? : % -> Boolean ?~=? : (%,%) -> Boolean
?*? : (Fraction Polynomial Fraction Integer,%) -> %
?*? : (NonNegativeInteger,%) -> %
?*? : (SquareMatrix(4,Fraction Polynomial Fraction Integer),%) -> %
?*? : (%,Fraction Polynomial Fraction Integer) -> %
apply : (Matrix Fraction Polynomial Fraction Integer,%) -> %
associatorDependence : () -> List Vector Fraction Polynomial Fraction Integer
coerce : Vector Fraction Polynomial Fraction Integer -> %
conditionsForIdempotents : Vector % -> List Polynomial Fraction Integer
conditionsForIdempotents : () -> List Polynomial Fraction Integer
conditionsForIdempotents : Vector % -> List Polynomial Fraction Polynomial Fraction Integer
conditionsForIdempotents : () -> List Polynomial Fraction Polynomial Fraction Integer
convert : % -> Vector Fraction Polynomial Fraction Integer
convert : Vector Fraction Polynomial Fraction Integer -> %
coordinates : (Vector %,Vector %) -> Matrix Fraction Polynomial Fraction Integer
coordinates : Vector % -> Matrix Fraction Polynomial Fraction Integer
coordinates : (%,Vector %) -> Vector Fraction Polynomial Fraction Integer
coordinates : % -> Vector Fraction Polynomial Fraction Integer
?.? : (%,Integer) -> Fraction Polynomial Fraction Integer
generic : (Vector Symbol,Vector %) -> %
genericLeftDiscriminant : () -> Fraction Polynomial Fraction Integer
genericLeftMinimalPolynomial : % -> SparseUnivariatePolynomial Fraction Polynomial Fraction Integer
genericLeftNorm : % -> Fraction Polynomial Fraction Integer
genericLeftTrace : % -> Fraction Polynomial Fraction Integer
genericLeftTraceForm : (%,%) -> Fraction Polynomial Fraction Integer
genericRightDiscriminant : () -> Fraction Polynomial Fraction Integer
genericRightMinimalPolynomial : % -> SparseUnivariatePolynomial Fraction Polynomial Fraction Integer
genericRightNorm : % -> Fraction Polynomial Fraction Integer
genericRightTrace : % -> Fraction Polynomial Fraction Integer
genericRightTraceForm : (%,%) -> Fraction Polynomial Fraction Integer
leftCharacteristicPolynomial : % -> SparseUnivariatePolynomial Fraction Polynomial Fraction Integer
leftDiscriminant : Vector % -> Fraction Polynomial Fraction Integer
leftDiscriminant : () -> Fraction Polynomial Fraction Integer
leftMinimalPolynomial : % -> SparseUnivariatePolynomial Fraction Polynomial Fraction Integer
leftNorm : % -> Fraction Polynomial Fraction Integer
leftPower : (%,PositiveInteger) -> %
leftRankPolynomial : () -> SparseUnivariatePolynomial Fraction Polynomial Fraction Integer
leftRankPolynomial : () -> SparseUnivariatePolynomial Polynomial Fraction Polynomial Fraction Integer
leftRecip : % -> Union(%,"failed")
leftRegularRepresentation : (%,Vector %) -> Matrix Fraction Polynomial Fraction Integer
leftRegularRepresentation : % -> Matrix Fraction Polynomial Fraction Integer
leftTrace : % -> Fraction Polynomial Fraction Integer
leftTraceMatrix : Vector % -> Matrix Fraction Polynomial Fraction Integer
leftTraceMatrix : () -> Matrix Fraction Polynomial Fraction Integer
leftUnit : () -> Union(%,"failed")
leftUnits : () -> Union(Record(particular: %,basis: List %),"failed")
noncommutativeJordanAlgebra? : () -> Boolean
plenaryPower : (%,PositiveInteger) -> %
represents : (Vector Fraction Polynomial Fraction Integer,Vector %) -> %
represents : Vector Fraction Polynomial Fraction Integer -> %
rightCharacteristicPolynomial : % -> SparseUnivariatePolynomial Fraction Polynomial Fraction Integer
rightDiscriminant : Vector % -> Fraction Polynomial Fraction Integer
rightDiscriminant : () -> Fraction Polynomial Fraction Integer
rightMinimalPolynomial : % -> SparseUnivariatePolynomial Fraction Polynomial Fraction Integer
rightNorm : % -> Fraction Polynomial Fraction Integer
rightPower : (%,PositiveInteger) -> %
rightRankPolynomial : () -> SparseUnivariatePolynomial Fraction Polynomial Fraction Integer
rightRankPolynomial : () -> SparseUnivariatePolynomial Polynomial Fraction Polynomial Fraction Integer
rightRecip : % -> Union(%,"failed")
rightRegularRepresentation : (%,Vector %) -> Matrix Fraction Polynomial Fraction Integer
rightRegularRepresentation : % -> Matrix Fraction Polynomial Fraction Integer
rightTrace : % -> Fraction Polynomial Fraction Integer
rightTraceMatrix : Vector % -> Matrix Fraction Polynomial Fraction Integer
rightTraceMatrix : () -> Matrix Fraction Polynomial Fraction Integer
rightUnit : () -> Union(%,"failed")
rightUnits : () -> Union(Record(particular: %,basis: List %),"failed")
structuralConstants : Vector % -> Vector Matrix Fraction Polynomial Fraction Integer
structuralConstants : () -> Vector Matrix Fraction Polynomial Fraction Integer
subtractIfCan : (%,%) -> Union(%,"failed")
axiom
associatorDependence()$G
Type: List Vector Fraction Polynomial Fraction Integer
axiom
conditionsForIdempotents()$G
Type: List Polynomial Fraction Integer
axiom
leftRankPolynomial()$G
Type: SparseUnivariatePolynomial
? Fraction Polynomial Fraction Integer
axiom
rightUnit()$G
this algebra has no right unit
Type: Union("failed",...)
axiom
p1:=generic([x1,y1,z1,w1])$G
Type: GenericNonAssociativeAlgebra
?(Fraction Integer,4,[e,i,j,k]
?,[MATRIX,MATRIX,MATRIX,MATRIX]
?)
axiom
p2:=generic([x2,y2,z2,w2])$G
Type: GenericNonAssociativeAlgebra
?(Fraction Integer,4,[e,i,j,k]
?,[MATRIX,MATRIX,MATRIX,MATRIX]
?)
axiom
p3:=generic([x3,y3,z3,w3])$G
Type: GenericNonAssociativeAlgebra
?(Fraction Integer,4,[e,i,j,k]
?,[MATRIX,MATRIX,MATRIX,MATRIX]
?)
Type: Union(GenericNonAssociativeAlgebra
?(Fraction Integer,4,[e,i,j,k]
?,[MATRIX,MATRIX,MATRIX,MATRIX]
?),...)
axiom
rightRecip(p1)$G
this algebra has no right unit
Type: Union("failed",...)
axiom
leftRegularRepresentation(p1)
Type: Matrix Fraction Polynomial Fraction Integer
axiom
rightRegularRepresentation(p1)
Type: Matrix Fraction Polynomial Fraction Integer
axiom
associator(p1,p2,p3)$G
Type: GenericNonAssociativeAlgebra
?(Fraction Integer,4,[e,i,j,k]
?,[MATRIX,MATRIX,MATRIX,MATRIX]
?)
axiom
for x in basis()$V repeat
for y in basis()$V repeat
output(["commuator",x,y,"=",commutator(x,y)])
FriCAS cannot iterate with x over your form now. Perhaps you should
try using a conversion to make sure your form is a list or
stream, for example.
associator(a.2,a.3,a.4)
Type: AlgebraGivenByStructuralConstants
?(Fraction Integer,4,[e,i,j,k]
?,[MATRIX,MATRIX,MATRIX,MATRIX]
?)