[GAP Forum] algebra mapping problem

R.N. Tsai r_n_tsai at yahoo.com
Thu Jun 14 03:54:11 BST 2007


Dear gap-forum,
   
  I am trying a simple algebra mapping that takes a much longer time
than it should (actually it looks like it gets stuck, I interrupt
the operation after a while).
   
  Here's an example. 
   
  Read("weylalg.gap");
  A:=WeylAlgebra(Rationals,1);
  g:=GeneratorsOfAlgebra(A);
  h:=[g[1],g[2]-g[3],g[2]+g[3]];
  hom:=AlgebraWithOneGeneralMappingByImages(A,A,g,h);
  a:=g[2];
  # This operation gets stuck
b:=Image(hom,a);
   
  Any ideas why this is happening?
   
  Regards,
  R.N.
  
It uses "WeylAlgebra" which I downloaded from Jan Draisma's site :
   http://www.win.tue.nl/~jdraisma/index.php?location=programs
  It's fairly small, so I'm attaching it here :
   
  WeylAlgebra := function(R, n)
  #This algebra constructs the Weyl Algebra W in n variables, with 
#coefficients from the ring R. This is the associative algebra with one,
#and generators x_1,...,x_n,D_1,...D_n among which the only non-trivial
#commutation relations are [x_i,D_i]=-1. Hence, if one defines a Lie
#algebra L with basis I,x_1,...,x_n,D_1,...,D_n and relations
#[x_i,D_i]=-I, then W=U(L)/[I-1]. This simple fact is exploited as
#follows: the code below is that of UniversalEnvelopingAlgebra, with the
#following changes: 
#1. T is constructed from the above-mentioned L. 
#2. When `DescriptionOfNormalizedUEAElement' returns an extrep, the
#occurence of the last generator, I, is simply left out.
#
# Jan Draisma, 24 August 2001.
      local F,          # free associative algebra
          W,          # Weyl algebra
          gen,        # loop over algebra generators of `W'
          Fam,        # elements family of `W'
          T,          # s.c. table of a basis of `L'
          FamMon,     # family of monomials
          FamFree,    # elements family of `F'
   i;       # loop variable
      #Structure constants of the Lie algebra L
    T:=EmptySCTable(2*n+1,0,"antisymmetric");
    for i in [1..n] do SetEntrySCTable(T,i,i+n,[-1,2*n+1]); od;
      # Construct the Weyl Algebra
    F:= FreeAssociativeAlgebraWithOne( R, 
 Concatenation( List([1..n],i->Concatenation("x_",String(i))),
   List([1..n],i->Concatenation("D_",String(i)))));
    W:= FactorFreeAlgebraByRelators( F, [ Zero( F ) ] );
      # Enter knowledge about `W'.
    SetDimension( W, infinity );
    for gen in GeneratorsOfLeftOperatorRingWithOne( W ) do
      SetIsNormalForm( gen, true );
    od;
    SetIsNormalForm( Zero( W ), true );
      # Enter data to handle elements.
    Fam:= ElementsFamily( FamilyObj( W ) );
    Fam!.normalizedType:= NewType( Fam,
                                       IsElementOfFpAlgebra
                                   and IsPackedElementDefaultRep
                                   and IsNormalForm );
      FamMon:= ElementsFamily( FamilyObj( UnderlyingMagma( F ) ) );
    FamFree:= ElementsFamily( FamilyObj( F ) );
      SetNiceNormalFormByExtRepFunction( Fam,
        function( Fam, extrep ) 
        local zero, i;
        zero:= extrep[1];
        extrep:= DescriptionOfNormalizedUEAElement( T, extrep[2] );
        for i in [ 1, 3 .. Length( extrep ) - 1 ] do
  #Remove the superfluous generator with index 2n+1!!
if Length(extrep[i])>0 then 
 if extrep[i][Length(extrep[i])-1]=2*n+1 then 
 extrep[i]:=extrep[i]{[1..Length(extrep[i])-2]}; 
 fi;
fi;
          extrep[i]:= ObjByExtRep( FamMon, extrep[i] );
        od;
        return Objectify( Fam!.normalizedType,
                   [ Objectify( FamFree!.defaultType, [ zero, extrep ] ) ] );
        end );
      SetOne( W, ElementOfFpAlgebra( Fam, One( F ) ) );
      # Return the universal enveloping algebra.
    return W;
    end;
  #T missing: relators (only compute them if they are explicitly wanted)
#T          (attribute `Relators'?)
  Lie:=function(v,w)
#For elements of an algebra, Lie(v,w) returns their commutator.
return v*w-w*v;
end;

       
---------------------------------
Building a website is a piece of cake. 
Yahoo! Small Business gives you all the tools to get online.


More information about the Forum mailing list