Adding a New Metric to the Package

To add a new metric to the package, use the add_metric routine. A procedure must be defined that when given an integer returns the square of the basis vector with that index. The function also needs to know what the minimum and maximum permitted blade indices are. If unlimited blade indices are required, then use `-infinity' and `infinity' as the limits.

For example, if we want to set up a four dimensional algebra with signature (2,2) called E22 we would define a function called `E22metric` to take calculate the square of the basis vectors.

> E22metric:=proc(i::integer)

> if i=1 or i=2 then RETURN(1);

> else RETURN(-1); fi;

> end:

The syntax is add_metric(name,procedure, min_index, max_index). Unless you save the session, it will not remember the new metric when you quit the current session.

> add_metric(`E22`,E22metric,1,4);

[Maple Math]

> metric(E22);

[Maple Math]

> e[1]&@e[1]; e[3]&@e[3]; e[5]&@e[5];

[Maple Math]

[Maple Math]

Error, (in verify_blade) index in blade, e[5], outside permitted range for metric, E22