operator properties problem



Hello all,

I am forwarding a message posted by yuri11@libero.it 
to the maxima-help forum.
(https://sourceforge.net/forum/message.php?msg_id=2939831)
For my part, I don't have an answer. Perhaps someone
would like to weigh in.

Regards,
Robert Dodier
-------------- begin quoted message -------------
I've defined these operators 
OpA(x):= if atom(x)=true then if x=0 then 0 else 'OpA(x) 
 else if part(x,0)=v 
  then 
   if part(x,1)=0 then 0
   else 
    if part(x,1)>0 then Sqrt(part(x,1))*v(part(x,1)-1)
    else 
    'OpA(x)
   else
    'OpA(x);
 
OpB(x):= if atom(x)=true then if x=0 then 0 else 'OpB(x) 
  else if part(x,0)=v  then
    if part(x,1)>0 then Sqrt(part(x,1)+1)*v(part(x,1)+1)
    else if part(x,1)=0 then v(part(x,1)+1) else
    'OpB(x)
   else
    'OpB(x);

U(x):=block([tmp], tmp:x,for i:1 thru 4 do
tmp:OpA(tmp)+OpB(tmp),return(tmp))$

When i try to apply U to v(0), for example, the program can resolve the
operation.
I've also declared OpA and OpB as linear, but it don't works.
--------------- end quoted message --------------

---------------- begin commentary ---------------
> The program is part of a quantum physics problem; After the
> definitions of OpA, OpB and U(x), and the declaration of 
> OpA and OpB as linear I put in input this command line : 
> U(v(0)); the result that I aspect is in the form
> a*v(x)+b*v(y)+... where x and y are integer index.
> 
> the computation stops and I've as output this line :
>
> (%o70) OpB(OpB(SQRT(2) v(2) + v(0)) + OpA(SQRT(2) v(2) + v(0)))
> 
> + OpA(OpB(SQRT(2) v(2) + v(0)) + OpA(SQRT(2) v(2) + v(0)))
> 
> In which way Maxima can recognize the linearity of OpB or OpA?
> 
> For example, I want that OpB(SQRT(2) v(2) + v(0)) can be recognize as
> SQRT(2)OpB(v(2))+OpB(v(0)).
----------------- end commentary ----------------



		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com