Work on the vect package



I had a look at the vect package, because of the following bug reports:

2970792 - gradef(s) together with vect package
2806446 - ev_diff in vect.mac
2011228 - vect redefines "." as commutative, was:Matrix multiplication
1212598 - bug in the VECT.MAK - VECTORSIMP cross product
1003494 - scalefactors broken Maxima 5.9.0 (win)
838301  - vect negate cross product simplification

Some comments:

TOP (1): 2970792 - gradef(s) together with vect package

I think this is a general problem of the parser. When we define literal
prefix operators like "grad" or "div" functions which starts with the
same chars no longer works.

Some more example to show the problem:

(%i21) prefix("exp");
(%o21) "exp"
(%i22) expintegral_ei(1);
(%o22) %e^int egral_ei(1)

(%i23) prefix("int");
(%o23) "int"
(%i24) integrate(x,x);
(%o24) int egrate(x,x)

A workaround is to define the literal operators with a captial letter,
e.g. "Grad" and "Div". I think we should apply this workaround in the
vect package, because it is important not to destroy functionality of
Maxima core functions.

TOP (2): 2806446 - ev_diff in vect.mac

As a workaround it is sufficent to rename the variable of the function
ev_diff as already suggested in the bug report.

TOP (3): 2011228 - vect redefines "." as commutative, was:Matrix
multiplication

I think we should cut out the declaration of "." to be commutative. The
user loses some simplification like a . b - b . a -> 0. But there are a
lot of more simplification problems in the package, it is not worth to
maintain this simplification.

TOP (4): 1212598 - bug in the VECT.MAK - VECTORSIMP cross product

There is already a suggested patch which works well.

TOP (5): 1003494 - scalefactors broken Maxima 5.9.0 (win)

I think the problem is that it is not documented that the file
vect_transform.mac has to be loaded separately. Perhaps, we should load
it with the package vect too.

The strange order of the variables for a sperhical coordinate system
should be corrected as suggested in the bug report.

TOP (6): 838301  - vect negate cross product simplification

We have already a suggestion in the bug report which works well.


There are two changes which might be arguable. In TOP (1) I suggest to
rename the operators with a capital letter and in TOP (3) I suggest to
cut out the commutative declaration of the dot operator. I think we
should do both changes too. It is important that the user does not
destroy the Maxima incore functionality, when loading the vect package.
It is clear that the whole package should be reworked too.

Furthermore, I have written a test file for the package vect which shows
some more bugs we have. I would like to commit this file too.

Dieter Kaiser