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

Algebra Calculator

#### Contract

Function: contract (<expr>) Carries out the tensorial contractions in <expr> which may be any combination of sums and products. This function uses the information given to the `defcon` function. For best results, `expr` should be fully expanded. `ratexpand` is the fastest way to expand products and powers of sums if there are no variables in the denominators of the terms. The `gcd` switch should be `false` if GCD cancellations are unnecessary.

There are also some inexact matches for `contract`. Try `?? contract` to see them.

```(%o1)                                true
(%i2) ```

### Related Examples

imetric(a);

ishow(a([-s],[2])*a([...

Calculate

(cframe_flag:false,gc...

Calculate

ishow((a([s],[2])*a([...

ishow(contract(%));

Calculate

ishow(a([s],[2])*a([t...

ishow(contract(%));

Calculate

ishow(a([-s],[2])*a([...

ishow(contract(%));

Calculate

ishow(a([-s],[2])*a([...

ishow(contract(%));

Calculate

imetric(g);

ishow(g([j,k],[])*g([...

Calculate

##### contract-tcontract

tcontract(a^2+b^2,[a,...

Calculate

ishow('levi_civita([r...

ishow(contract(%));

Calculate