gap-packages / qpa

GAP package for quivers and path algebras
https://folk.ntnu.no/oyvinso/QPA/
GNU General Public License v2.0
30 stars 13 forks source link

Quotient by relations does not work in this example #59

Closed Nakayamaalgebra closed 2 years ago

Nakayamaalgebra commented 2 years ago

Hi, I made a program to obtain all relations of a given connected tree quiver algebra KQ with QPA. Now I want to obtain all quotient algebras KQ/I but there is an error which I do not understand at the end since this is the usual way to obtain quotient algebras with QPA.

Here are two simple programs:

DeclareOperation("lengthlrelations",[IsList]);

InstallMethod(lengthlrelations, "for a representation of a quiver", [IsList],0,function(LIST)

local Q,KQ,LL,l,rel,K;

Q:=LIST[1]; K:=LIST[2]; l:=LIST[3]; KQ:=PathAlgebra(K,Q);AssignGeneratorVariables(KQ); rel:=[];AddNthPowerToRelations(KQ,rel,l); return(rel); end);

DeclareOperation("allrelations",[IsList]);

InstallMethod(allrelations, "for a representation of a quiver", [IsList],0,function(LIST)

local Q,KQ,LL,l,rel,K,W,i,TT,WW,subsets1,subsets2;

Q:=LIST[1]; K:=LIST[2]; KQ:=PathAlgebra(K,Q);AssignGeneratorVariables(KQ); LL:=LoewyLength(KQ); W:=[];for i in [2..LL-1] do Append(W,[lengthlrelations([Q,K,i])]);od; WW:=Flat(W); TT:=Size(WW); subsets1:=Combinations([1..TT]);subsets2:=List(subsets1,x->WW{x}); return(subsets2); end);

Now I do not understand why the following example does not work to give all quotient algebras: K:=GF(3);Q:=Quiver(5,[[1,2,"a"],[2,3,"b"],[3,4,"c"],[3,5,"d"]]);KQ:=PathAlgebra(K,Q);AssignGeneratorVariables(KQ);GG:=allrelations([Q,K]);G:=[];for i in GG do Append(G,[KQ/i]);od;G;

The error I obtain is: "Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `/' on 2 arguments at /home/re/Desktop/gap-4.10.1/lib/methsel2.g:250 called from KQ / i at stdin:18091 called from <function "unknown">( ) called from read-eval loop at stdin:18091 type 'quit;' to quit to outer loop "

But the following works without any problems: K:=GF(3);Q:=Quiver(5,[[1,2,"a"],[2,3,"b"],[3,4,"c"],[3,5,"d"]]);KQ:=PathAlgebra(K,Q);AssignGeneratorVariables(KQ);rel:=[a*b];A:=KQ/rel; Thank you for any help.

sunnyquiver commented 2 years ago

Hi Nakayamaalgebra, Thank you very much for using QPA!

The error occurs since elements in each component of GG[ i ] is not in KQ. This is happening since the path algebra KQ is constructed several times, and each time it is constructed as a new variable in QPA/GAP.

Here is a suggestion for avoiding this:

DeclareOperation("allrelations", [ IsPathAlgebra ] );

InstallMethod( allrelations, 
        "for a representation of a quiver", 
        [IsPathAlgebra ],
        0,
        function( KQ )

    local   LL,  W,  i,  TT,  subsets1,  subsets2;

    if not IsFiniteDimensional( KQ ) then
        Error( "The entered path algebra is not finite dimensional.\n" );
    fi;
    LL := LoewyLength(KQ);
    W := [];
    for i in [2..LL-1] do 
        W := AddNthPowerToRelations( KQ, W, i );
    od;
    TT := Size( W );
    subsets1 := Combinations( [ 1..TT ] );
    subsets2 := List( subsets1, x -> W{ x } );

    return( subsets2 );
end
  );

I hope that these comments are clarifying and helpful.

The QPA-team.

Nakayamaalgebra commented 2 years ago

Thank you very much. It works now to obtain all quotient algebras. I wonder whether there is a way to obtain all relations up to isomorphism (when they are isomorphic iff the quotient algebras are isomorphic) but probably there is no easy way.

sunnyquiver commented 2 years ago

I guess that one important element in such a discussion would be the automorphisms of the quiver. There is no infrastructure in QPA to compute all automorphisms of a given quiver. So I have no answer to this problem.