Two questions



Hello,

is there any possibility to write a package which will be special type of 
symbolic expression for *control theory* (or maybe not only)? I especially 
think here about introducing special types, for example, 'control_matrix' 
and 'control_vector' as e.g.

size_of_matrix: [3, 4];
C: control_matrix(size_of_matrix);

size_of_vector: [4, 1]
indices_of_vector: [r, k];
x: control_vector(size_of_vector, indices_of_vector);

Then when I write:
y: C . x(r+1,k) - C . x(r,k);

then we tell maxima, that:
- x is special type of vector and we can check it size and set it also to y 
and maxima will be know that x is indexed by indices r and k, so maxima could 
be able to do some simplification on the special vector x

- C is special type of matrix and maxima could be able to perform some checks 
about sizes of matrices and vectors included in multiplications and additions 
and so on.

Then as a result we obtain this
    C . ( x(r+1,k) - x(r,k) );
because maxima will be known, that here is a special type of matrix and 
vectors (control_matrix and control_vector)

and not as now, where is no simplifications made
    C . x(r+1,k) - C . x(r,k);

Of course instead of writing the vector x as x(r+1,k) we can operate for 
example on the list notation, e.i.
y: C . x[r+1,k] - C . x[r,k];

This gives our such output, but still without simplification
     C . x         - C . x
          r + 1, k        r, k

it should be:
     C . (x         - x    )
           r + 1, k    r, k

Is this possible to create such package to manipulate on matrices as in 
control theory, not on real values in these matrices of vectors but in 
symbolic way? Of course after doing some operations we can in the finall step 
assign values to this matrices for example by function  
assign_values(C, [[1,2,3,4],[1,2,3,4],[1,2,3,4]]);

and for vectors, but first define range for index r and index k in vector x, 
e.g.:

set_range_on_vector(x, [r, 1, 10], [k, 1, 10])

and assign for index 'r'
assign_values(x[r,k], [1,2,3,4]);
assign_values(x[r+1,k], [1,2,3,4]);
...
assign_values(x[r+9,k], [1,2,3,4]);

and for index 'k'
assign_values(x[r,k], [1,2,3,4]);
assign_values(x[r,k+1], [1,2,3,4]);
...
assign_values(x[r,k+9], [1,2,3,4]);
and so on

or on real indices values
assign_values(x[1,1], [1,2,3,4]);
assign_values(x[2,1], [1,2,3,4]);
...
assign_values(x[10,1], [1,2,3,4]);

of course for the vector x it must by created an array or list of list from 
the values will be taken or stored at given indices.

What do you thinking about this? Is this possible to write such package in 
maxima? I haven't much knowledge about implement such project in maxima but I 
think that such package will be very usefull for people who working in 
control theory field/research. As I know currently no such package even in 
commercial software (or maybe I am wrong?).


------------------------------------------
And second question:
------------------------------------------
I checked also that when I write:
eq: transpose(A . B . C);
I obtain as expected
    transpose(C) . transpose(B) . transpose(A)

Is this possible to do it in back, e.g.:
eq1: transpose(C) . transpose(B) . transpose(A)
and get:
      transpose(A . B . C) 

Is this possible ? 


I'm sorry for my English language.
Thank you for your time.

Zbigniew