> < ^ Date: Wed, 22 Oct 1997 13:32:20 +0100 (BST)
> < ^ From: Alexander Hulpke <hulpke@math.colostate.edu >
< ^ Subject: Re: Converting from quotient vector spaces to AgGroups

Dear GAP-Forum,

Leonard Soicher asked:
> Does anyone have a nice clean way (in GAP 3.4) to convert from a quotient
> vector space Q of a row space over GF(p) to an AgGroup G (isomorphic
> to the additive group of Q) so that I also get the isomorphism?

As vector spaces are additive groups but standard GAP groups are written
multiplicatively, there is no facility to define homomorphisms between
these two objects. I append, however a function that will for any
row space or quotient of row spaces return an isomorphic AgGroup and two
functions that allow to convert elements in both ways. Probably this is of
help.

Best regards,

Alexander

#############################################################################
##
#F  AgGroupByVectorSpace(V)     returns [A,funA,funV]
##  where A is an AgGroup isomorphic V and funA:V->A and funV:A->V are
##  functions that carry the isomorphisms.
##  Usage: funA(vec) gives an Ag element, funV(agelm) a vector.
##
AgGroupByVectorSpace := function(V)
local a,b;
  if Dimension(V)=0 then
    # trivial case
    a:=AbelianGroup(AgWords,[]);
    return [a,function(vec) return a.identity;end,
              function(word) return 0*Random(V);end];
  fi;
  b:=Basis(V);
  a:=AbelianGroup(AgWords,Factors(Size(V)));
  return [a,function(vec)
            local w,i;
	      vec:=Coefficients(b,vec);
	      w:=a.identity;
	      for i in [1..Dimension(V)] do
	        w:=w*a.generators[i]^Int(vec[i]);
	      od;
	      return w;
            end,
	    function(word)
	      word:=Exponents(a,word,V.field);
	      word:=Sum([1..Dimension(V)],i->b.vectors[i]*word[i]);
	      # test for quotient
	      if IsBound(b.basisDen) then
	        word:=word+b.structure.factorDen;
	      fi;
	      return word;
	    end];
end;

> < [top]