On 08/12/10 20:59, Viktor T. Toth wrote:
> Well, itensor is not really designed to deal with numeric indices. Indices
> are just abstract placeholders, and are supposed to be unevaluated symbols.
> Your problem can be easily dealt with by using symbols in place of your
> numeric indices, e.g.,
>
> (%i5)
> kdelta([a],[i])*kdelta([b],[j])*g([i,j],[])*kdelta([c],[k])*kdelta([d],[p])*
> g([k,p],[])$
> (%i6) ishow(contract(%))$
> (%t6) g g
> a b c d
>
> If you wish, you can then replace the symbols with numeric indices after the
> contraction:
>
> (%i7) %,a=1,b=1,c=1,d=1$
> (%i8) ishow(%)$
> 2
> (%t8) g
> 1 1
>
> But once you have done this and you have numeric indices, you should not
> expect itensor's facilities, like contract(), to work. So it's best to leave
> this step last, to present a final result in the desired form.
>
>
> Viktor
>
>
>
> -----Original Message-----
> From: maxima-bounces at math.utexas.edu [mailto:maxima-bounces at math.utexas.edu]
> On Behalf Of Yaroslav Alekseev
> Sent: Thursday, August 12, 2010 12:12 PM
> To: maxima at math.utexas.edu
> Subject: itensor: error during contract
>
>
> Hi to all,
> I have a error using itensor:
>
> (%i1) load(itensor);
> STYLE-WARNING: redefining $NAME in DEFUN
> STYLE-WARNING: redefining DERIV in DEFUN
> STYLE-WARNING: redefining SDIFF in DEFUN
> STYLE-WARNING: redefining I-$DEPENDENCIES in DEFUN
> STYLE-WARNING: redefining $DECSYM in DEFUN
> STYLE-WARNING: redefining $CANFORM in DEFUN
> (%o1) /usr/local/share/maxima/5.22.0/share/tensor/itensor.lisp
> (%i2) imetric(g);
> (%o2) done
> (%i3)
> kdelta([1],[i])*kdelta([1],[j])*g([i,j],[])*kdelta([1],[k])*kdelta([1],[p])*
> g([k,p],[])$
>
> (%i4) contract(%);
>
> g g has improper indices
> 1 1 1 1
> -- an error. To debug this try: debugmode(true);
> (%i5)
>
> or (actually the same thing):
>
> (%i1) load(itensor);
> STYLE-WARNING: redefining $NAME in DEFUN
> STYLE-WARNING: redefining DERIV in DEFUN
> STYLE-WARNING: redefining SDIFF in DEFUN
> STYLE-WARNING: redefining I-$DEPENDENCIES in DEFUN
> STYLE-WARNING: redefining $DECSYM in DEFUN
> STYLE-WARNING: redefining $CANFORM in DEFUN
> (%o1) /usr/local/share/maxima/5.22.0/share/tensor/itensor.lisp
> (%i2) defcon(g,g,kdelta);
> (%o2) done
> (%i3)
> kdelta([1],[i])*kdelta([1],[j])*g([i,j],[])*kdelta([1],[k])*kdelta([1],[p])*
> g([k,p],[])$
>
> (%i4) contract(%);
>
> g g has improper indices
> 1 1 1 1
> -- an error. To debug this try: debugmode(true);
> (%i5)
>
> correct answer is something like g([1,1],[])^2 in both cases.
>
> Thanks in advance,
> Yaroslav
>
>
>
>
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>
>
Ok, thanks