I am having trouble with keeping local lists unchanged
in some programming.
I call simp_ddgL (dlist,glist) to do contractions among
dirac matrices (in glist) and dlist which represents a set of
D(p,nu) or D(al,be) elements which are all multiplied
together (lorentz indices except for p).
simp_ddgL returns the list: [ fac, ddlist, gglist ] .
The following illustrates my troubles in an interactive use, where
the three element list g2 is changed to the contents of gglist.
(%i1) load(dirac);
(%o1) "c:/work3/dirac.mac"
(%i2) d1 : [si, be, la, al, p, al];
(%o2) [si,be,la,al,p,al]
(%i3) g1 : [be, rh, ta];
(%o3) [be,rh,ta]
/* make a copy of g1 for later use */
(%i4) g2 : g1;
(%o4) [be,rh,ta]
(%i5) g2;
(%o5) [be,rh,ta]
/* now call simp_ddgL */
(%i6) rr : simp_ddgL (d1, g1);
(%o6) [ 1, [p, la], [si, rh, ta ] ]
(%i7) d11 : rr[2];
(%o7) [p, la]
(%i8) g11 : rr[3];
(%o8) [si, rh, ta]
/* now check g2 assignment */
(%i9) g2;
(%o9) [si, rh, ta]
-------------
How does the assignment of g2 get
changed in this scenario??
Thanks for any help,
Ted Woollett