% Copyright (c) 1991 Marcel Roelofs, University of Twente, Enschede, % The Netherlands. % % $Header: liesuperconvert.web,v 1.1 91/09/18 17:49:54 roelofs Exp $ % @* Conversion of vector structures. In the latest version of the LIESUPER package, the klist mechanism has been replaced by a vector structure based mechanism to check wether a commutator has been used in any other algebraic expression or not. Due to this change the entries of a vector structure also have changed. As a consequence, save files of liebrackets written by the old package cannot be used by the current package anymore. Fortunately, it is still possible to read saved liebrackets without damaging any information. The following procedure will convert the vector structure of former liebrackets to the corresponding vector structure of the current liebrackets. In order to understand what happens we refer to the documentation of the LIESUPER package. @d old_informative_part_of=car @d old_commutator_part_of=cdr @u lisp operator convert_liebracket; lisp procedure convert_liebracket bracketname; begin scalar m,n,klist,vector_structure,vector_i,entry_i_j,k_info_i_j; if get(bracketname,'rtype) neq 'liebracket then rederr "CONVERT_LIEBRACKET: argument must be a liebracket"; m:=get(bracketname,'even_dimension); n:=get(bracketname,'odd_dimension); klist:=get(bracketname,'klist); vector_structure:=get(bracketname,'vector_structure); for i:=-n:m do begin vector_i:=getv(vector_structure,n+i); for j:=i:m do begin entry_i_j:=getv(vector_i,m-j); k_info_i_j:=assoc(list(bracketname,i,j),klist); if entry_i_j then putv(vector_i,m-j,old_informative_part_of entry_i_j . k_info_i_j . old_commutator_part_of entry_i_j) else if k_info_i_j then putv(vector_i,m-j,nil . k_info_i_j . nil); if k_info_i_j then klist:=delete(k_info_i_j,klist) end end; put(bracketname,'klist,klist) end$ @ Any REDUCE file must end with |end@;|. @u end;