### The Maxima on-line user's manual

Algebra Calculator

#### Indices

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.

```          (%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) ```

### Related Examples

##### indices-lambda-sublist_indices

f: lambda([l,x], subl...

f([x,y,z], a);

Calculate

ishow(a([i,j],[k,l],...

indices(%);

Calculate

? indices;

Calculate

##### indices-lambda-sublist_indices

lambda([l,x], sublist...

Calculate

##### indices-sublist_indices

? sublist_indices;

Calculate

##### indices-lambda-sublist_indices

f: lambda([l,x], subl...

f([x,y,z], a);

Calculate

ishow(a([i,j],[k,l],...

indices(%);

Calculate

? indices;

Calculate

##### indices-lambda-sublist_indices

lambda([l,x], sublist...

Calculate

##### indices-sublist_indices

? sublist_indices;

Calculate