Hello,

I want to modify the physop-package in order to get a package for fermion-operators.

First of all I want to add the functionality that the operator A and the adjoint operator A!+ do not commutate any longer.

Therefor I added a "noncom(list(x, adjp x));" after "reset!_opnums(); %1.03" in the procedure "scalop" of the physop-package:

% scalar operator symbolic procedure scalop u; begin scalar y; for each x in u do if not idp x then msgpri("cannot declare",x,"a scalar operator",nil,nil) else if physopp x then msgpri(x,"already declared as",get(x,'phystype),nil,nil) else <<y :=gettype x; if y memq '(matrix operator array procedure) then msgpri(x,"already defined as",y,nil,nil) else << put(x,'rtype,'physop); put(x,'phystype,'scalar); put(x,'psimpfn,'physopsimp); put(x,'physopname,x); % 1.02 defoporder!* := nconc(defoporder!*,list(x)); oporder!* := nconc(oporder!*,list(x)); physoplist!* := nconc(physoplist!*,list(x)); invphysop x; adj2 x; invadj x; %1.01 reset!_opnums(); %1.03 noncom(list(x, adjp x)); >>; >>; return nil end;

Unfortunately I get the following message when I load the modified file:

***** list unit unit

Cont? (Y or N)

What did I wrong? Here is the noncom procedure I call (noncom2 package):

symbolic procedure noncom u; %new begin scalar y,liste; if not listp u then rederr(u, "invalid argument to noncom"); for each x in u do << if not idp x then rederr(x, "invalid argument to noncom"); noncom1 x; liste:=get(x,'noncommutes); y := delete(x,u); put(x, 'noncommutes, deletemult!* nconc(liste,y)); % the following is needed for the physop package added 2.1 140891 mw if (get(x,'rtype) = 'physop) then << print("Drin!"); noncom1 adjp x; liste:=get(adjp x, 'noncommutes); y := delete(adjp x, for each j in u collect adjp j); put(adjp x, 'noncommutes, deletemult!* nconc(liste,y)); noncom1 invp x; liste:=get(invp x, 'noncommutes); y := delete(invp x,for each j in u collect invp j); put(invp x,'noncommutes,deletemult!* nconc(liste,y)) >> >>; return nil end;

I'm not very expired in Lisp, so I don't understand why "noncom x;" works but "noncom(list(x, adjp x));" not, because in noncom is testet wether u is a list or not: "if not listp u then rederr(u, "invalid argument to noncom");"

Can anybody help me - thank you very much for help :-)

Andy