Online Algebra Calculator
Many of users do not use powerful Maxima computer algebra system for systematic work, but for ad hoc algebraic calculations – equations, functions, matrixes, etc. only. To do this job, it is not useful to download the whole application from a web site.
Function: indices (<expr>) Returns a list of two elements. The first is a list of the free indices in <expr> (those that occur only once). The second is the list of the dummy indices in <expr> (those that occur exactly twice) as the following example demonstrates.
![Indices Example gensym();
f(l, x) ::= buildq([l : l, x : x, z : abad9987629%],sublist_indices(l, lambda([z], z = x)));
f([x,y,z],a);
f([x,y,z],x);
macroexpand(f([x,y,z],a));
macroexpand(f([x,y,z],x));](http://maxima-online.org//plot.html?g=i-1143217987.png&t=img&db=r-1234532287)
(%i1) load(itensor);
(%o1) /share/tensor/itensor.lisp
(%i2) ishow(a([i,j],[k,l],m,n)*b([k,o],[j,m,p],q,r))$
k l j m p
(%t2) a b
i j,m n k o,q r
(%i3) indices(%);
(%o3) [[l, p, i, n, o, q, r], [k, j, m]] A tensor product containing the same index more than twice is syntactically illegal. indices attempts to deal with these expressions in a reasonable manner; however, when it is called to operate upon such an illegal expression, its behavior should be considered undefined.
There are also some inexact matches for indices. Try ?? indices to see them.
(%o1) true (%i2)