On 3/11/08, Marcello Musso <musso at physics.utexas.edu> wrote:
> defmatch(check,'idiff(arg,t));
> disprule(check);
> => check:idiff(arg,t)->[]
> check(idiff(diff(N([],[]),t),i));
> => false
>
> even if idiff(diff(N([],[]),t),i) doesnt evaluate idiff.
Looks like idiff (as with diff also) has a third argument which is
the order of the derivative. When order = 1, it is suppressed.
But it needs to be present in the pattern.
load (itensor);
matchdeclare ([arg, t], all);
defmatch (check, 'idiff (arg, t, 1));
depends (N, t);
check (idiff (diff (N ([], []), t), i));
=> [t = i, arg = d/dt (N([], []))]
> I am doing this because i want maxima to display
>
> idiff(diff(N([],[]),t),i)
>
> as
>
> (d/dt) N([],[],i)
>
> so any other way to achieve this would help too.
I don't know much about tensors. Maybe someone else can
weigh in here. I suspect pattern matching is probably not the
most effective method, but I don't know about anything else.
best
Robert Dodier