On Mon, 07 Jan 2002 08:43:41 -0800
Richard Fateman <fateman@cs.berkeley.edu> wrote:
> There may be other things wrong, but your rules
> match ki*kj
>
> but do NOT match a*ki*kj.
>
> you must match the arbitrary multiplier a as well.
>
>
Well, may be. However, why it is work for an arbitrary multipllier*ki
> I suggest you look at letrules, which may do your work better.
> You also do not require that i, j, l are different.
This is a problem with letrules, because indices in real
expressions can be deferent from fixed list [i,j,l]. Actually expressions for averaging
is obtained after some manipulations done by "itensor", so real indices will be a kind of
dummy indice, like %1,%2, ets.
>
> Another possibility is that you run through all the values
> for i:1 thru 3 do for j:1 through 3 do ....
> exp1:ratsubst(D([i,j])..., k([i])*k([j)],exp1)
That is an interesting idea. That means the final result will be expressed in components.
For vector it is acceptable but for 2 and higher rank tensor not.
Thank you very much for reply.
Valerij
>
>
> Valerij Pipin wrote:
>
> > Greetings to All!
> >
> > I tried to use some table's defined rules for averaging of wave vectors.
> > The problem that apply1,2 or applyb1,2 reject to work if expression is consisted from
> > more than one wave vector together with others vectors or tensors. However, for expression consisted from pure k-vector's product everething is ok. Below is part of code.
> >
> > DEFCON(k,k,w);
> >
> > matchdeclare([i,j,l],true);
> > DEFRULE (k1, k([i]), t*e([i]));
> > DEFRULE (k2, k([i])*k([j]), D([i,j])*(1-t^2)/2-e([i])*e([j])*(1-3*t^2)/2);
> > DEFRULE (k3, k([i])*k([j])*k([l]),t*(1-t^2)/2*(D([i,j])*e([l])+D([i,l])*e([j])+D([l,j])*e([i]))
> > + t/2*(3-5*t^2)*e([i])*e([j])*e([l]));
> > exp1 : -a*t*B([],[a])*gr([a])*k([i])+ a*t*B([],[n])*gr([],[m])*k([n])*k([i])*k([m])$
> > ;;;; So apply1(exp1,k3,k1) dont work !
> > ;;;; apply1(exp1,k1) work but result is wrong!
> > ;;;; however apply1(k([n])*k([i])*k([m]),k3) works fine
> >
> >
> > The tensor for averaging can be quite huge. Whether I have to edit its expression and substitute all k-products by apply1(k([i])*k([j])*....., kn) or there is a way around?
> > The simple command apply1(exp1, kn,.....,k1) whoud be preferable.
> >
> > Many thanks for any ideas and help
> >
> >
> > All the best,
> > Valerij
> > _______________________________________________
> > Maxima mailing list
> > Maxima@www.math.utexas.edu
> > http://www.math.utexas.edu/mailman/listinfo/maxima
> >
>