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

Edit detail for SandBoxTensorAlgebra2 revision 1 of 3

1 2 3
Editor: pagani
Time: 2020/02/01 17:40:20 GMT+0
Note:

changed:
-
\begin{spad}
)abbrev domain TENSALG TensorAlgebra
TensorAlgebra(M,R,B) : Exports == Implementation where

  M:FreeModuleCategory(R, B)
  R:CommutativeRing
  B:OrderedSet
  
  OF     ==> OutputForm
  NNI    ==> NonNegativeInteger
  FMB    ==> FreeMonoid B
  CTOF   ==> CoercibleTo OutputForm
  FMCRB  ==> FreeModuleCategory(R,FMB)
  GRALR  ==> GradedAlgebra(R,NNI)
  XFABR  ==> XFreeAlgebra(B,R)
  XDPBR  ==> XDistributedPolynomial(B,R)
  TERM   ==> Record(k:FMB,c:R)  
  
  Exports == Join(FMCRB, XFABR, GRALR) with
    
    coerce : B -> %
    convert : FMB -> OutputForm
	
  Implementation ==  XDPBR add 
 
    Rep := XDPBR
    
    product(x,y) == x*y  -- GradedAlgebra, pro forma
    
    convert(x:FMB):OutputForm ==
      x=1$FMB => empty()$OF 
      length(x)$FMB = 1 => x::OF
      length(x)$FMB = 2 => tensor(first(x)::OF,rest(x)::OF)$OF
      tensor(first(x)::OF, convert(rest x))
      
    coerce(x:%):OutputForm ==
      zero? x => empty()$OF
      x=1$% => outputForm(1)$OF
      c:R:=leadingCoefficient(x)
      if c=1 then cof:=empty()$OF else cof:=c::OF 
      kof:OF:=cof * convert(leadingSupport(x))
      zero? reductum(x) => kof
      kof + reductum(x)::OF
      
   
\end{spad}

\begin{axiom}
B:=OrderedVariableList [e[i] for i in 1..5]
e:=enumerate()$B

R:=Expression Integer
R has CommutativeRing

M:=FreeModule(R, B)

-- This is the object of interest
TA:=TensorAlgebra(M,R,B)

-- coerce basis to TA
b:=[a::TA for a in e]


v1:=x*b.1+y*b.2-z*b.3
v2:=y^n*b.1-cos(x)*b.2
v3:=sin(x+y+z)*b.3

t0:=exp(-x-y-z)*1$TA
t1:=b.1*b.2*b.3*b.4+v1

p1:=product(v1,v2)
p2:=product(product(v1,v3),t1)
p3:=tan(x)*1$TA

s1:=p1+p2+p3

---
degree(v1*v2*v3*t1)
listOfTerms (v1*v1*v2*v3)
degree (1$TA)

v1+1$TA
listOfTerms %

-- degree (0$TA) ---> err in XDP ?? 

-- projection to TensorPower(n...) easy : filter degree = n

\end{axiom}

spad
)abbrev domain TENSALG TensorAlgebra
TensorAlgebra(M,R,B) : Exports == Implementation where
M:FreeModuleCategory(R, B) R:CommutativeRing B:OrderedSet
OF ==> OutputForm NNI ==> NonNegativeInteger FMB ==> FreeMonoid B CTOF ==> CoercibleTo OutputForm FMCRB ==> FreeModuleCategory(R,FMB) GRALR ==> GradedAlgebra(R,NNI) XFABR ==> XFreeAlgebra(B,R) XDPBR ==> XDistributedPolynomial(B,R) TERM ==> Record(k:FMB,c:R)
Exports == Join(FMCRB, XFABR, GRALR) with
coerce : B -> % convert : FMB -> OutputForm
Implementation == XDPBR add
Rep := XDPBR
product(x,y) == x*y -- GradedAlgebra, pro forma
convert(x:FMB):OutputForm == x=1$FMB => empty()$OF length(x)$FMB = 1 => x::OF length(x)$FMB = 2 => tensor(first(x)::OF,rest(x)::OF)$OF tensor(first(x)::OF, convert(rest x))
coerce(x:%):OutputForm == zero? x => empty()$OF x=1$% => outputForm(1)$OF c:R:=leadingCoefficient(x) if c=1 then cof:=empty()$OF else cof:=c::OF kof:OF:=cof * convert(leadingSupport(x)) zero? reductum(x) => kof kof + reductum(x)::OF
spad
   Compiling FriCAS source code from file 
      /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/579490114000940455-25px001.spad
      using old system compiler.
   TENSALG abbreviates domain TensorAlgebra 
------------------------------------------------------------------------
   initializing NRLIB TENSALG for TensorAlgebra 
   compiling into NRLIB TENSALG 
   compiling exported product : ($,$) -> $
Time: 0.02 SEC.
compiling exported convert : FreeMonoid B -> OutputForm Time: 0 SEC.
compiling exported coerce : $ -> OutputForm Time: 0 SEC.
****** Domain: R already in scope augmenting R: (OrderedAbelianMonoidSup) (time taken in buildFunctor: 20)
;;; *** |TensorAlgebra| REDEFINED
;;; *** |TensorAlgebra| REDEFINED Time: 0.03 SEC.
Cumulative Statistics for Constructor TensorAlgebra Time: 0.05 seconds
--------------non extending category---------------------- .. TensorAlgebra(#1,#2,#3) of cat (|Join| (|FreeModuleCategory| |#2| (|FreeMonoid| |#3|)) (|XFreeAlgebra| |#3| |#2|) (|GradedAlgebra| |#2| (|NonNegativeInteger|)) (CATEGORY |domain| (SIGNATURE |coerce| ($ |#3|)) (SIGNATURE |convert| ((|OutputForm|) (|FreeMonoid| |#3|))))) has no (|XPolynomialsCat| |#3| |#2|) finalizing NRLIB TENSALG Processing TensorAlgebra for Browser database: --->-->TensorAlgebra(constructor): Not documented!!!! --->-->TensorAlgebra((coerce (% B))): Not documented!!!! --->-->TensorAlgebra((convert ((OutputForm) (FreeMonoid B)))): Not documented!!!! --->-->TensorAlgebra(): Missing Description ; compiling file "/var/aw/var/LatexWiki/TENSALG.NRLIB/TENSALG.lsp" (written 01 FEB 2020 05:40:20 PM):
; /var/aw/var/LatexWiki/TENSALG.NRLIB/TENSALG.fasl written ; compilation finished in 0:00:00.030 ------------------------------------------------------------------------ TensorAlgebra is now explicitly exposed in frame initial TensorAlgebra will be automatically loaded when needed from /var/aw/var/LatexWiki/TENSALG.NRLIB/TENSALG

fricas
B:=OrderedVariableList [e[i] for i in 1..5]

\label{eq1}\hbox{\axiomType{OrderedVariableList}\ } ([ e [ 1 ] , e [ 2 ] , e [ 3 ] , e [ 4 ] , e [ 5 ] ])(1)
Type: Type
fricas
e:=enumerate()$B

\label{eq2}\left[{e_{1}}, \:{e_{2}}, \:{e_{3}}, \:{e_{4}}, \:{e_{5}}\right](2)
Type: List(OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]]))
fricas
R:=Expression Integer

\label{eq3}\hbox{\axiomType{Expression}\ } (\hbox{\axiomType{Integer}\ })(3)
Type: Type
fricas
R has CommutativeRing

\label{eq4} \mbox{\rm true} (4)
Type: Boolean
fricas
M:=FreeModule(R, B)

\label{eq5}\hbox{\axiomType{FreeModule}\ } (\hbox{\axiomType{Expression}\ } (\hbox{\axiomType{Integer}\ }) , \hbox{\axiomType{OrderedVariableList}\ } ([ e [ 1 ] , e [ 2 ] , e [ 3 ] , e [ 4 ] , e [ 5 ] ]))(5)
Type: Type
fricas
-- This is the object of interest
TA:=TensorAlgebra(M,R,B)

\label{eq6}\hbox{\axiomType{TensorAlgebra}\ } (\hbox{\axiomType{FreeModule}\ } (\hbox{\axiomType{Expression}\ } (\hbox{\axiomType{Integer}\ }) , \hbox{\axiomType{OrderedVariableList}\ } ([ e [ 1 ] , e [ 2 ] , e [ 3 ] , e [ 4 ] , e [ 5 ] ])) , \hbox{\axiomType{Expression}\ } (\hbox{\axiomType{Integer}\ }) , \hbox{\axiomType{OrderedVariableList}\ } ([ e [ 1 ] , e [ 2 ] , e [ 3 ] , e [ 4 ] , e [ 5 ] ]))(6)
Type: Type
fricas
-- coerce basis to TA
b:=[a::TA for a in e]

\label{eq7}\left[{\ {e_{1}}}, \:{\ {e_{2}}}, \:{\ {e_{3}}}, \:{\ {e_{4}}}, \:{\ {e_{5}}}\right](7)
Type: List(TensorAlgebra?(FreeModule?(Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]])),Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]])))
fricas
v1:=x*b.1+y*b.2-z*b.3

\label{eq8}{x \ {e_{1}}}+{y \ {e_{2}}}-{z \ {e_{3}}}(8)
Type: TensorAlgebra?(FreeModule?(Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]])),Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]]))
fricas
v2:=y^n*b.1-cos(x)*b.2

\label{eq9}{{{y}^{n}}\ {e_{1}}}-{{\cos \left({x}\right)}\ {e_{2}}}(9)
Type: TensorAlgebra?(FreeModule?(Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]])),Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]]))
fricas
v3:=sin(x+y+z)*b.3

\label{eq10}{\sin \left({z + y + x}\right)}\ {e_{3}}(10)
Type: TensorAlgebra?(FreeModule?(Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]])),Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]]))
fricas
t0:=exp(-x-y-z)*1$TA

\label{eq11}{{e}^{- z - y - x}}\ (11)
Type: TensorAlgebra?(FreeModule?(Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]])),Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]]))
fricas
t1:=b.1*b.2*b.3*b.4+v1

\label{eq12}{\ {{e_{1}}\otimes{{e_{2}}\otimes{{e_{3}}\otimes{e_{4}}}}}}+{x \ {e_{1}}}+{y \ {e_{2}}}-{z \ {e_{3}}}(12)
Type: TensorAlgebra?(FreeModule?(Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]])),Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]]))
fricas
p1:=product(v1,v2)

\label{eq13}\begin{array}{@{}l}
\displaystyle
{x \ {{y}^{n}}\ {{e_{1}}\otimes{e_{1}}}}-{x \ {\cos \left({x}\right)}\ {{e_{1}}\otimes{e_{2}}}}+{y \ {{y}^{n}}\ {{e_{2}}\otimes{e_{1}}}}- 
\
\
\displaystyle
{y \ {\cos \left({x}\right)}\ {{e_{2}}\otimes{e_{2}}}}-{z \ {{y}^{n}}\ {{e_{3}}\otimes{e_{1}}}}+ 
\
\
\displaystyle
{z \ {\cos \left({x}\right)}\ {{e_{3}}\otimes{e_{2}}}}
(13)
Type: TensorAlgebra?(FreeModule?(Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]])),Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]]))
fricas
p2:=product(product(v1,v3),t1)

\label{eq14}\begin{array}{@{}l}
\displaystyle
{x \ {\sin \left({z + y + x}\right)}\ {{e_{1}}\otimes{{e_{3}}\otimes{{e_{1}}\otimes{{e_{2}}\otimes{{e_{3}}\otimes{e_{4}}}}}}}}+ 
\
\
\displaystyle
{y \ {\sin \left({z + y + x}\right)}\ {{e_{2}}\otimes{{e_{3}}\otimes{{e_{1}}\otimes{{e_{2}}\otimes{{e_{3}}\otimes{e_{4}}}}}}}}- 
\
\
\displaystyle
{z \ {\sin \left({z + y + x}\right)}\ {{e_{3}}\otimes{{e_{3}}\otimes{{e_{1}}\otimes{{e_{2}}\otimes{{e_{3}}\otimes{e_{4}}}}}}}}+ 
\
\
\displaystyle
{{{x}^{2}}\ {\sin \left({z + y + x}\right)}\ {{e_{1}}\otimes{{e_{3}}\otimes{e_{1}}}}}+ 
\
\
\displaystyle
{x \  y \ {\sin \left({z + y + x}\right)}\ {{e_{1}}\otimes{{e_{3}}\otimes{e_{2}}}}}- 
\
\
\displaystyle
{x \  z \ {\sin \left({z + y + x}\right)}\ {{e_{1}}\otimes{{e_{3}}\otimes{e_{3}}}}}+ 
\
\
\displaystyle
{x \  y \ {\sin \left({z + y + x}\right)}\ {{e_{2}}\otimes{{e_{3}}\otimes{e_{1}}}}}+ 
\
\
\displaystyle
{{{y}^{2}}\ {\sin \left({z + y + x}\right)}\ {{e_{2}}\otimes{{e_{3}}\otimes{e_{2}}}}}- 
\
\
\displaystyle
{y \  z \ {\sin \left({z + y + x}\right)}\ {{e_{2}}\otimes{{e_{3}}\otimes{e_{3}}}}}- 
\
\
\displaystyle
{x \  z \ {\sin \left({z + y + x}\right)}\ {{e_{3}}\otimes{{e_{3}}\otimes{e_{1}}}}}- 
\
\
\displaystyle
{y \  z \ {\sin \left({z + y + x}\right)}\ {{e_{3}}\otimes{{e_{3}}\otimes{e_{2}}}}}+ 
\
\
\displaystyle
{{{z}^{2}}\ {\sin \left({z + y + x}\right)}\ {{e_{3}}\otimes{{e_{3}}\otimes{e_{3}}}}}
(14)
Type: TensorAlgebra?(FreeModule?(Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]])),Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]]))
fricas
p3:=tan(x)*1$TA

\label{eq15}{\tan \left({x}\right)}\ (15)
Type: TensorAlgebra?(FreeModule?(Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]])),Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]]))
fricas
s1:=p1+p2+p3

\label{eq16}\begin{array}{@{}l}
\displaystyle
{x \ {\sin \left({z + y + x}\right)}\ {{e_{1}}\otimes{{e_{3}}\otimes{{e_{1}}\otimes{{e_{2}}\otimes{{e_{3}}\otimes{e_{4}}}}}}}}+ 
\
\
\displaystyle
{y \ {\sin \left({z + y + x}\right)}\ {{e_{2}}\otimes{{e_{3}}\otimes{{e_{1}}\otimes{{e_{2}}\otimes{{e_{3}}\otimes{e_{4}}}}}}}}- 
\
\
\displaystyle
{z \ {\sin \left({z + y + x}\right)}\ {{e_{3}}\otimes{{e_{3}}\otimes{{e_{1}}\otimes{{e_{2}}\otimes{{e_{3}}\otimes{e_{4}}}}}}}}+ 
\
\
\displaystyle
{{{x}^{2}}\ {\sin \left({z + y + x}\right)}\ {{e_{1}}\otimes{{e_{3}}\otimes{e_{1}}}}}+ 
\
\
\displaystyle
{x \  y \ {\sin \left({z + y + x}\right)}\ {{e_{1}}\otimes{{e_{3}}\otimes{e_{2}}}}}- 
\
\
\displaystyle
{x \  z \ {\sin \left({z + y + x}\right)}\ {{e_{1}}\otimes{{e_{3}}\otimes{e_{3}}}}}+ 
\
\
\displaystyle
{x \  y \ {\sin \left({z + y + x}\right)}\ {{e_{2}}\otimes{{e_{3}}\otimes{e_{1}}}}}+ 
\
\
\displaystyle
{{{y}^{2}}\ {\sin \left({z + y + x}\right)}\ {{e_{2}}\otimes{{e_{3}}\otimes{e_{2}}}}}- 
\
\
\displaystyle
{y \  z \ {\sin \left({z + y + x}\right)}\ {{e_{2}}\otimes{{e_{3}}\otimes{e_{3}}}}}- 
\
\
\displaystyle
{x \  z \ {\sin \left({z + y + x}\right)}\ {{e_{3}}\otimes{{e_{3}}\otimes{e_{1}}}}}- 
\
\
\displaystyle
{y \  z \ {\sin \left({z + y + x}\right)}\ {{e_{3}}\otimes{{e_{3}}\otimes{e_{2}}}}}+ 
\
\
\displaystyle
{{{z}^{2}}\ {\sin \left({z + y + x}\right)}\ {{e_{3}}\otimes{{e_{3}}\otimes{e_{3}}}}}+{x \ {{y}^{n}}\ {{e_{1}}\otimes{e_{1}}}}- 
\
\
\displaystyle
{x \ {\cos \left({x}\right)}\ {{e_{1}}\otimes{e_{2}}}}+{y \ {{y}^{n}}\ {{e_{2}}\otimes{e_{1}}}}- 
\
\
\displaystyle
{y \ {\cos \left({x}\right)}\ {{e_{2}}\otimes{e_{2}}}}-{z \ {{y}^{n}}\ {{e_{3}}\otimes{e_{1}}}}+ 
\
\
\displaystyle
{z \ {\cos \left({x}\right)}\ {{e_{3}}\otimes{e_{2}}}}+{{\tan \left({x}\right)}\ }
(16)
Type: TensorAlgebra?(FreeModule?(Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]])),Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]]))
fricas
---
degree(v1*v2*v3*t1)

\label{eq17}7(17)
Type: PositiveInteger?
fricas
listOfTerms (v1*v1*v2*v3)

\label{eq18}\begin{array}{@{}l}
\displaystyle
\left[{\left[{k ={{{e_{1}}^{3}}\ {e_{3}}}}, \:{c ={{{x}^{2}}\ {\sin \left({z + y + x}\right)}\ {{y}^{n}}}}\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{k ={{{e_{1}}^{2}}\ {e_{2}}\ {e_{3}}}}, \:{c = -{{{x}^{2}}\ {\cos \left({x}\right)}\ {\sin \left({z + y + x}\right)}}}\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{k ={{e_{1}}\ {e_{2}}\ {e_{1}}\ {e_{3}}}}, \:{c ={x \  y \ {\sin \left({z + y + x}\right)}\ {{y}^{n}}}}\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{k ={{e_{1}}\ {{e_{2}}^{2}}\ {e_{3}}}}, \:{c = -{x \  y \ {\cos \left({x}\right)}\ {\sin \left({z + y + x}\right)}}}\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{k ={{e_{1}}\ {e_{3}}\ {e_{1}}\ {e_{3}}}}, \:{c = -{x \  z \ {\sin \left({z + y + x}\right)}\ {{y}^{n}}}}\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{k ={{e_{1}}\ {e_{3}}\ {e_{2}}\ {e_{3}}}}, \:{c ={x \  z \ {\cos \left({x}\right)}\ {\sin \left({z + y + x}\right)}}}\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{k ={{e_{2}}\ {{e_{1}}^{2}}\ {e_{3}}}}, \:{c ={x \  y \ {\sin \left({z + y + x}\right)}\ {{y}^{n}}}}\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{k ={{e_{2}}\ {e_{1}}\ {e_{2}}\ {e_{3}}}}, \:{c = -{x \  y \ {\cos \left({x}\right)}\ {\sin \left({z + y + x}\right)}}}\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{k ={{{e_{2}}^{2}}\ {e_{1}}\ {e_{3}}}}, \:{c ={{{y}^{2}}\ {\sin \left({z + y + x}\right)}\ {{y}^{n}}}}\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{k ={{{e_{2}}^{3}}\ {e_{3}}}}, \:{c = -{{{y}^{2}}\ {\cos \left({x}\right)}\ {\sin \left({z + y + x}\right)}}}\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{k ={{e_{2}}\ {e_{3}}\ {e_{1}}\ {e_{3}}}}, \:{c = -{y \  z \ {\sin \left({z + y + x}\right)}\ {{y}^{n}}}}\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{k ={{e_{2}}\ {e_{3}}\ {e_{2}}\ {e_{3}}}}, \:{c ={y \  z \ {\cos \left({x}\right)}\ {\sin \left({z + y + x}\right)}}}\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{k ={{e_{3}}\ {{e_{1}}^{2}}\ {e_{3}}}}, \:{c = -{x \  z \ {\sin \left({z + y + x}\right)}\ {{y}^{n}}}}\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{k ={{e_{3}}\ {e_{1}}\ {e_{2}}\ {e_{3}}}}, \:{c ={x \  z \ {\cos \left({x}\right)}\ {\sin \left({z + y + x}\right)}}}\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{k ={{e_{3}}\ {e_{2}}\ {e_{1}}\ {e_{3}}}}, \:{c = -{y \  z \ {\sin \left({z + y + x}\right)}\ {{y}^{n}}}}\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{k ={{e_{3}}\ {{e_{2}}^{2}}\ {e_{3}}}}, \:{c ={y \  z \ {\cos \left({x}\right)}\ {\sin \left({z + y + x}\right)}}}\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{k ={{{e_{3}}^{2}}\ {e_{1}}\ {e_{3}}}}, \:{c ={{{z}^{2}}\ {\sin \left({z + y + x}\right)}\ {{y}^{n}}}}\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{k ={{{e_{3}}^{2}}\ {e_{2}}\ {e_{3}}}}, \:{c = -{{{z}^{2}}\ {\cos \left({x}\right)}\ {\sin \left({z + y + x}\right)}}}\right]}\right] (18)
Type: List(Record(k: FreeMonoid?(OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]])),c: Expression(Integer)))
fricas
degree (1$TA)

\label{eq19}0(19)
Type: NonNegativeInteger?
fricas
v1+1$TA

\label{eq20}{x \ {e_{1}}}+{y \ {e_{2}}}-{z \ {e_{3}}}+ 1(20)
Type: TensorAlgebra?(FreeModule?(Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]])),Expression(Integer),OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]]))
fricas
listOfTerms %

\label{eq21}\begin{array}{@{}l}
\displaystyle
\left[{\left[{k ={e_{1}}}, \:{c = x}\right]}, \:{\left[{k ={e_{2}}}, \:{c = y}\right]}, \:{\left[{k ={e_{3}}}, \:{c = - z}\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{k = 1}, \:{c = 1}\right]}\right] 
(21)
Type: List(Record(k: FreeMonoid?(OrderedVariableList?([e[1],e[2],e[3],e[4],e[5]])),c: Expression(Integer)))