login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for SandBoxNonAssociativeAlgebra revision 25 of 25

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Editor: Bill Page
Time: 2008/05/08 08:42:07 GMT-7
Note:

added:
antiCommutative?()$V

added:
associator(p1,p1,p2)
associator(p1,p2,p2)
p1*p1
p1*p2 + p2*p1
p1*(p1*p1)+(p1*p1)*p1

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.

fricas
_*_*(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
fricas
e:Vector INT:=[1,0,0,0]

\label{eq1}\left[ 1, \: 0, \: 0, \: 0 \right](1)
Type: Vector(Integer)
fricas
i:Vector INT:=[0,1,0,0]

\label{eq2}\left[ 0, \: 1, \: 0, \: 0 \right](2)
Type: Vector(Integer)
fricas
j:Vector INT:=[0,0,1,0]

\label{eq3}\left[ 0, \: 0, \: 1, \: 0 \right](3)
Type: Vector(Integer)
fricas
k:Vector INT:=[0,0,0,1]

\label{eq4}\left[ 0, \: 0, \: 0, \: 1 \right](4)
Type: Vector(Integer)
fricas
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)
fricas
Compiling function ** with type (Vector(Integer), Vector(Integer))
       -> Vector(Integer)

\label{eq5} \mbox{\rm true} (5)
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.

fricas
)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)))
fricas
V:=AlgebraGivenByStructuralConstants(Fraction Integer, 4, [e,i,j,k],sc)

\label{eq6}\hbox{\axiomType{AlgebraGivenByStructuralConstants}\ } (\hbox{\axiomType{Fraction}\ } (\hbox{\axiomType{Integer}\ }) , 4, [ e , i , j , k ] , [ [ [ 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 ] ] ])(6)
Type: Type

Multiplication

fricas
a:=basis()$V

\label{eq7}\left[ e , \: i , \: j , \: k \right](7)
Type: Vector(AlgebraGivenByStructuralConstants?(Fraction(Integer),4,[e,i,j,k],[[[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]]]))
fricas
matrix([[(a.i * a.j) for j in 1..4] for i in 1..4])$OutputForm

\label{eq8}\left[ 
\begin{array}{cccc}
e & i & j & k 
\
- i & e & k & - j 
\
- j & - k & e & i 
\
- k & j & - i & e 
(8)
Type: OutputForm?

Commutator and Associator

fricas
matrix([[commutator(a.x,a.y) for x in 1..4] for y in 1..4])$OutputForm

\label{eq9}\left[ 
\begin{array}{cccc}
0 & -{2 \  i}& -{2 \  j}& -{2 \  k}
\
{2 \  i}& 0 & -{2 \  k}&{2 \  j}
\
{2 \  j}&{2 \  k}& 0 & -{2 \  i}
\
{2 \  k}& -{2 \  j}&{2 \  i}& 0 
(9)
Type: OutputForm?

fricas
[matrix([[associator(a.x,a.y,a.z) for x in 1..4] for y in 1..4])$OutputForm for z in 1..4]

\label{eq10}\begin{array}{@{}l}
\displaystyle
\left[{\left[ 
\begin{array}{cccc}
0 &{2 \  i}&{2 \  j}&{2 \  k}
\
0 &{2 \  e}& 0 & 0 
\
0 & 0 &{2 \  e}& 0 
\
0 & 0 & 0 &{2 \  e}
(10)
Type: List(OutputForm?)
fricas
for x in 1..4 repeat
  for y in 1..4 repeat
    for z in 1..4 repeat
      if associator(a.x,a.y,a.z) ~= 0$V then
        output([[a.x,a.y,a.z],"=",associator(a.x,a.y,a.z)])
[[i, e, e], "=", 2 i] [[i, e, i], "=", - 2 e] [[i, e, j], "=", - 2 k] [[i, e, k], "=", 2 j] [[i, i, e], "=", 2 e] [[i, i, i], "=", 2 i] [[i, i, j], "=", 2 j] [[i, i, k], "=", 2 k] [[j, e, e], "=", 2 j] [[j, e, i], "=", 2 k] [[j, e, j], "=", - 2 e] [[j, e, k], "=", - 2 i] [[j, j, e], "=", 2 e] [[j, j, i], "=", 2 i] [[j, j, j], "=", 2 j] [[j, j, k], "=", 2 k] [[k, e, e], "=", 2 k] [[k, e, i], "=", - 2 j] [[k, e, j], "=", 2 i] [[k, e, k], "=", - 2 e] [[k, k, e], "=", 2 e] [[k, k, i], "=", 2 i] [[k, k, j], "=", 2 j] [[k, k, k], "=", 2 k]
Type: Void

Volume form?

fricas
a.2 * (a.3 * a.4) = (a.2 * a.3) * a.4

\label{eq11}e = e(11)
Type: Equation(AlgebraGivenByStructuralConstants?(Fraction(Integer),4,[e,i,j,k],[[[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]]]))

Check standard properties

fricas
leftUnit()$V

\label{eq12}e(12)
Type: Union(AlgebraGivenByStructuralConstants?(Fraction(Integer),4,[e,i,j,k],[[[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]]]),...)
fricas
rightUnit()$V
this algebra has no right unit

\label{eq13}\verb#"failed"#(13)
Type: Union("failed",...)
fricas
alternative?()$V
algebra is not left alternative

\label{eq14} \mbox{\rm false} (14)
Type: Boolean
fricas
leftAlternative?()$V
algebra is not left alternative

\label{eq15} \mbox{\rm false} (15)
Type: Boolean
fricas
rightAlternative?()$V
algebra is not right alternative

\label{eq16} \mbox{\rm false} (16)
Type: Boolean
fricas
associative?()$V
algebra is not associative

\label{eq17} \mbox{\rm false} (17)
Type: Boolean
fricas
antiAssociative?()$V
algebra is not anti-associative

\label{eq18} \mbox{\rm false} (18)
Type: Boolean
fricas
--powerAssociative?()$V
commutative?()$V
algebra is not commutative

\label{eq19} \mbox{\rm false} (19)
Type: Boolean
fricas
antiCommutative?()$V
algebra is not anti-commutative

\label{eq20} \mbox{\rm false} (20)
Type: Boolean
fricas
jordanAlgebra?()$V
algebra is not commutative this is not a Jordan algebra

\label{eq21} \mbox{\rm false} (21)
Type: Boolean
fricas
jordanAdmissible?()$V
algebra is not Jordan admissible

\label{eq22} \mbox{\rm false} (22)
Type: Boolean
fricas
noncommutativeJordanAlgebra?()$V
algebra is not flexible this is not a noncommutative Jordan algebra, as it is not flexible

\label{eq23} \mbox{\rm false} (23)
Type: Boolean
fricas
lieAlgebra?()$V
algebra is not anti-commutative this is not a Lie algebra

\label{eq24} \mbox{\rm false} (24)
Type: Boolean
fricas
lieAdmissible?()$V
algebra is not Lie admissible

\label{eq25} \mbox{\rm false} (25)
Type: Boolean
fricas
jacobiIdentity?()$V
Jacobi identity does not hold

\label{eq26} \mbox{\rm false} (26)
Type: Boolean

Commuting elements

fricas
V has FramedNonAssociativeAlgebra(Fraction Integer)

\label{eq27} \mbox{\rm true} (27)
Type: Boolean
fricas
basisOfCommutingElements()$AlgebraPackage(Fraction Integer,V)

\label{eq28}\left[ \right](28)
Type: List(AlgebraGivenByStructuralConstants?(Fraction(Integer),4,[e,i,j,k],[[[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]]]))
fricas
basisOfCenter()$AlgebraPackage(Fraction Integer,V)

\label{eq29}\left[ \right](29)
Type: List(AlgebraGivenByStructuralConstants?(Fraction(Integer),4,[e,i,j,k],[[[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]]]))
fricas
basisOfCentroid()$AlgebraPackage(Fraction Integer,V)

\label{eq30}\left[ \left[ 
\begin{array}{cccc}
1 & 0 & 0 & 0 
\
0 & 1 & 0 & 0 
\
0 & 0 & 1 & 0 
\
0 & 0 & 0 & 1 
(30)
Type: List(Matrix(Fraction(Integer)))
fricas
basisOfNucleus()$AlgebraPackage(Fraction Integer,V)

\label{eq31}\left[ \right](31)
Type: List(AlgebraGivenByStructuralConstants?(Fraction(Integer),4,[e,i,j,k],[[[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]]]))
fricas
basisOfLeftNucloid()$AlgebraPackage(Fraction Integer,V)

\label{eq32}\left[ \left[ 
\begin{array}{cccc}
1 & 0 & 0 & 0 
\
0 & 1 & 0 & 0 
\
0 & 0 & 1 & 0 
\
0 & 0 & 0 & 1 
(32)
Type: List(Matrix(Fraction(Integer)))

Symbolic computations

fricas
G:=GenericNonAssociativeAlgebra(Fraction Integer, 4, [e,i,j,k],sc)

\label{eq33}\hbox{\axiomType{GenericNonAssociativeAlgebra}\ } (\hbox{\axiomType{Fraction}\ } (\hbox{\axiomType{Integer}\ }) , 4, [ e , i , j , k ] , [ [ [ 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 ] ] ])(33)
Type: Type

Look for Idempotents

fricas
conditionsForIdempotents()$G

\label{eq34}\left[{{{\%x 4}^{2}}+{{\%x 3}^{2}}+{{\%x 2}^{2}}+{{\%x 1}^{2}}- \%x 1}, \: - \%x 2, \: - \%x 3, \: - \%x 4 \right](34)
Type: List(Polynomial(Fraction(Integer)))
fricas
gb:=groebnerFactorize %

\label{eq35}\left[{\left[ \%x 4, \: \%x 3, \: \%x 2, \: \%x 1 \right]}, \:{\left[ \%x 4, \: \%x 3, \: \%x 2, \:{\%x 1 - 1}\right]}\right](35)
Type: List(List(Polynomial(Fraction(Integer))))

fricas
associatorDependence()$G

\label{eq36}\left[ \right](36)
Type: List(Vector(Fraction(Polynomial(Fraction(Integer)))))
fricas
q:=leftRankPolynomial()$G

\label{eq37}{{?}^{3}}-{2 \  \%x 1 \ {{?}^{2}}}+{{\left({{\%x 4}^{2}}+{{\%x 3}^{2}}+{{\%x 2}^{2}}+{{\%x 1}^{2}}\right)}\  ?}(37)
Type: SparseUnivariatePolynomial?(Fraction(Polynomial(Fraction(Integer))))
fricas
map(factor,coefficients q)

\label{eq38}\left[ 1, \: -{2 \  \%x 1}, \:{{{\%x 4}^{2}}+{{\%x 3}^{2}}+{{\%x 2}^{2}}+{{\%x 1}^{2}}}\right](38)
Type: List(Factored(Fraction(Polynomial(Fraction(Integer)))))
fricas
rightUnit()$G
this algebra has no right unit

\label{eq39}\verb#"failed"#(39)
Type: Union("failed",...)

fricas
p1:=generic([x1,y1,z1,w1])$G

\label{eq40}{w 1 \  k}+{z 1 \  j}+{y 1 \  i}+{x 1 \  e}(40)
Type: GenericNonAssociativeAlgebra?(Fraction(Integer),4,[e,i,j,k],[[[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]]])
fricas
p2:=generic([x2,y2,z2,w2])$G

\label{eq41}{w 2 \  k}+{z 2 \  j}+{y 2 \  i}+{x 2 \  e}(41)
Type: GenericNonAssociativeAlgebra?(Fraction(Integer),4,[e,i,j,k],[[[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]]])
fricas
p3:=generic([x3,y3,z3,w3])$G

\label{eq42}{w 3 \  k}+{z 3 \  j}+{y 3 \  i}+{x 3 \  e}(42)
Type: GenericNonAssociativeAlgebra?(Fraction(Integer),4,[e,i,j,k],[[[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]]])
fricas
leftRecip(p1)$G

\label{eq43}\begin{array}{@{}l}
\displaystyle
{{w 1 \over{{{z 1}^{2}}+{{y 1}^{2}}+{{x 1}^{2}}+{{w 1}^{2}}}}\  k}+{{z 1 \over{{{z 1}^{2}}+{{y 1}^{2}}+{{x 1}^{2}}+{{w 1}^{2}}}}\  j}+ 
\
\
\displaystyle
{{y 1 \over{{{z 1}^{2}}+{{y 1}^{2}}+{{x 1}^{2}}+{{w 1}^{2}}}}\  i}+{{x 1 \over{{{z 1}^{2}}+{{y 1}^{2}}+{{x 1}^{2}}+{{w 1}^{2}}}}\  e}
(43)
Type: Union(GenericNonAssociativeAlgebra?(Fraction(Integer),4,[e,i,j,k],[[[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]]]),...)
fricas
rightRecip(p1)$G
this algebra has no right unit

\label{eq44}\verb#"failed"#(44)
Type: Union("failed",...)
fricas
leftRegularRepresentation(p1)

\label{eq45}\left[ 
\begin{array}{cccc}
x 1 & y 1 & z 1 & w 1 
\
- y 1 & x 1 & - w 1 & z 1 
\
- z 1 & w 1 & x 1 & - y 1 
\
- w 1 & - z 1 & y 1 & x 1 
(45)
Type: Matrix(Fraction(Polynomial(Fraction(Integer))))
fricas
rightRegularRepresentation(p1)

\label{eq46}\left[ 
\begin{array}{cccc}
x 1 & y 1 & z 1 & w 1 
\
y 1 & - x 1 & w 1 & - z 1 
\
z 1 & - w 1 & - x 1 & y 1 
\
w 1 & z 1 & - y 1 & - x 1 
(46)
Type: Matrix(Fraction(Polynomial(Fraction(Integer))))
fricas
associator(p1,p2,p3)$G

\label{eq47}\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
-{2 \  x 2 \  y 1 \  z 3}+{2 \  w 3 \  z 1 \  z 2}+{2 \  x 2 \  y 3 \  z 1}+ 
\
\
\displaystyle
{2 \  w 3 \  y 1 \  y 2}+{2 \  w 1 \  x 2 \  x 3}+{2 \  w 1 \  w 2 \  w 3}
(47)
Type: GenericNonAssociativeAlgebra?(Fraction(Integer),4,[e,i,j,k],[[[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]]])
fricas
associator(p1,p1,p2)

\label{eq48}\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
-{2 \  x 1 \  y 1 \  z 2}+{2 \  w 2 \ {{z 1}^{2}}}+{2 \  x 1 \  y 2 \  z 1}+{2 \  w 2 \ {{y 1}^{2}}}+ 
\
\
\displaystyle
{2 \  w 1 \  x 1 \  x 2}+{2 \ {{w 1}^{2}}\  w 2}
(48)
Type: GenericNonAssociativeAlgebra?(Fraction(Integer),4,[e,i,j,k],[[[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]]])
fricas
associator(p1,p2,p2)

\label{eq49}\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
{{\left({2 \  w 2 \  z 1}-{2 \  x 2 \  y 1}\right)}\  z 2}+{2 \  x 2 \  y 2 \  z 1}+{2 \  w 2 \  y 1 \  y 2}+ 
\
\
\displaystyle
{2 \  w 1 \ {{x 2}^{2}}}+{2 \  w 1 \ {{w 2}^{2}}}
(49)
Type: GenericNonAssociativeAlgebra?(Fraction(Integer),4,[e,i,j,k],[[[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]]])
fricas
p1*p1

\label{eq50}{\left({{z 1}^{2}}+{{y 1}^{2}}+{{x 1}^{2}}+{{w 1}^{2}}\right)}\  e(50)
Type: GenericNonAssociativeAlgebra?(Fraction(Integer),4,[e,i,j,k],[[[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]]])
fricas
p1*p2 + p2*p1

\label{eq51}{\left({2 \  z 1 \  z 2}+{2 \  y 1 \  y 2}+{2 \  x 1 \  x 2}+{2 \  w 1 \  w 2}\right)}\  e(51)
Type: GenericNonAssociativeAlgebra?(Fraction(Integer),4,[e,i,j,k],[[[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]]])
fricas
p1*(p1*p1)+(p1*p1)*p1

\label{eq52}{\left({2 \  x 1 \ {{z 1}^{2}}}+{2 \  x 1 \ {{y 1}^{2}}}+{2 \ {{x 1}^{3}}}+{2 \ {{w 1}^{2}}\  x 1}\right)}\  e(52)
Type: GenericNonAssociativeAlgebra?(Fraction(Integer),4,[e,i,j,k],[[[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]]])