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

Question on TitsUnitFormOfAlgebra #50

Closed Nakayamaalgebra closed 4 years ago

Nakayamaalgebra commented 4 years ago

I wanted to test whether the dimension vectors of the indecomposable modules of the Nakayama algebra A with Kupisch series [2,2,3] are roots of the Tits unit form of A using QPA. I noted something very strange: For QPA the tits unit form is a list and a matrix but none of the usual operations for lists or matrices seems to apply to it:

gap> A:=NakayamaAlgebra([2,2,3],GF(3)); <GF(3)[<quiver with 3 vertices and 3 arrows>]/ <two-sided ideal in <GF(3)[<quiver with 3 vertices and 3 arrows>]>, (2 generators)>> gap> B:=TitsUnitFormOfAlgebra(A); [ [ 2, 0, 0 ], [ 0, 2, -1 ], [ 0, -1, 2 ] ] gap> IsList(B); true gap> B[1]; 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 <function "HANDLE_METHOD_NOT_FOUND">( ) called from read-eval loop at stdin:14381 type 'quit;' to quit to outer loop

brk> quit;

gap> IsMatrix(B); true

gap> B^2;
Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `Length' on 1 arguments at /home/re/Desktop/gap-4.10.1/lib/methsel2.g:250 called from Length( mat ) at /home/re/Desktop/gap-4.10.1/lib/matrix.gi:4315 called from <function "POW_MAT_INT">( ) called from read-eval loop at stdin:14382 type 'quit;' to quit to outer loop brk> Is this a bug or if it is not, is there a way to treat B:=TitsUnitFormOfAlgebra(A) as a matrix in QPA so that one can multply it with dimension vectors to check for roots (or can one even find all roots using QPA)?

sunnyquiver commented 4 years ago

The Tits form of an algebra contains more information than just the matrix. To access this information do the following:

gap> A := NakayamaAlgebra( [ 2, 2, 3 ], GF( 3 ) );;
gap> B := TitsUnitFormOfAlgebra( A );;             
gap> NamesOfComponents( B );                       
[ "type", "SymmetricMatrixOfUnitForm", "BilinearFormOfUnitForm", 
  "QuadraticFormOfUnitForm" ]
gap> Bmat := SymmetricMatrixOfUnitForm( B );
[ [ 2, 0, 0 ], [ 0, 2, -1 ], [ 0, -1, 2 ] ]
gap> IsMatrix( Bmat );
true
gap> bilinform := BilinearFormOfUnitForm( B );
function( x, y ) ... end
gap> v := [ [ 1, 1, 0 ] ];         
[ [ 1, 1, 0 ] ]
gap> v * Bmat * TransposedMat( v );
[ [ 4 ] ]
gap> bilinform( [ 1, 1, 0 ], [ 1, 1, 0 ] );
4
gap> IsWeaklyPositiveUnitForm( B );
true
gap> NamesOfComponents( B );                  
[ "type", "SymmetricMatrixOfUnitForm", "BilinearFormOfUnitForm", 
  "QuadraticFormOfUnitForm", "PositiveRootsOfUnitForm" ]
gap> PositiveRootsOfUnitForm( B );
[ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ], [ 0, 1, 1 ] ]
gap> 

I hope that this explains some of the structure Tits form in QPA.

Best regards, the QPA-team.

Nakayamaalgebra commented 4 years ago

Thank you very much. It is strange that the command PositiveRootsOfUnitForm( B ); only gives an output that is not an error in case one has used the command IsWeaklyPositiveUnitForm( B ); before. I have not seen this yet. Also it is strange that GAP sees the output of TitsUnitFormOfAlgebra( A ); as a list and as a matrix but none of the usual commands of lists or matrixes works then. But now I know how to use those commands, thanks again.

sunnyquiver commented 4 years ago

If you give the command gap> MakeQPADocumentation(); you will produce the documentation for QPA. Then if you want to see if there is any information about quiver available, give the command

gap> ?quiver

which would display the following message

Choose an entry to view, 'q' for none (or use ? later):
[1] QPA: Quiver no. of vertices, list of arrows
[2] QPA: Quiver lists of vertices and arrows
[3] QPA: Quiver adjacenymatrix
[4] QPA: Quivers
[5] QPA: QuiverOfPathAlgebra
[6] QPA: QuiverProduct
[7] QPA: QuiverProductDecomposition
[8] QPA: QuiverAlgebraOfAmodAeA
[9] QPA: QuiverAlgebraOfeAe

Say you want to look at 4, then enter 4 and hit return. This happens if there is more than one entry matching your search. If there is only one thing matching your search the match is displayed at once. This is the case for PositiveRootsOfUnitForm:

gap> ?PositiveRootsOfUnitForm

12.2-5 PositiveRootsOfUnitForm ‣ PositiveRootsOfUnitForm( B ) ─────────────────────────────────── attribute

Arguments: B -- a unit form.

Returns: the positive roots of a unit form, if the unit form is weakly positive. If they have not been computed, an error message will be returned saying "no method found!".

This attribute will be attached to B when IsWeaklyPositiveUnitForm is applied to B and it is weakly positive.

Thank you for using QPA!

Best regards, The QPA-team.

pi-bie commented 12 months ago

I also came across the function TitsUnitFormOfAlgebra the other day. Noticing that its output looks like a matrix, I tried using it as such, resulting in gap shutting down with a memory access error/segmentation fault. This happens on Ubuntu running GAP 4.12.2 with QPA 1.34. In the above code, calling

gap> B^2;

terminated gap. Similarly, Rank(B); or Size(B); kill gap, while IsMatrix(B); succeeds and returns true.

While I now see how to access the underlying matrix as such, shutting down my whole gap session was unexpected.

sunnyquiver commented 12 months ago

Which algebra did you apply it to?

Here is the documentation of this function:

12.2-8 TitsUnitFormOfAlgebra

‣ TitsUnitFormOfAlgebra( A ) ───────────────────────────────────── operation

Arguments: A -- a finite dimensional (quotient of a) path algebra (by an admissible ideal).

Returns: the Tits unit form associated to the algebra A.

This function returns the Tits unitform associated to a finite dimensional quotient of a path algebra by an admissible ideal or path algebra, given that the underlying quiver has no loops or minimal relations that starts and ends in the same vertex. That is, then it returns a symmetric matrix B such that for x = (x_1,...,x_n) (1/2)*(x_1,...,x_n)B(x_1,...,x_n)^T = ∑_i=1^n x_i^2 - ∑_i,j dim_k Ext^1(S_i,S_j)x_ix_j + ∑_i,j dim_k Ext^2(S_i,S_j)x_ix_j, where n is the number of vertices in Q.

Here is an example:

gap> A := NakayamaAlgebra(Rationals, [3,2,2,1]);
<Rationals[<quiver with 4 vertices and 3 arrows>]/ <two-sided ideal in <Rationals[<quiver with 4 vertices and 3 arrows>]>, (1 generator)>> gap> test := TitsUnitFormOfAlgebra(A);
[ [ 2, -1, 0, 0 ], [ -1, 2, -1, 1 ], [ 0, -1, 2, -1 ], [ 0, 1, -1, 2 ] ] gap> NamesOfComponents(test); [ "type", "SymmetricMatrixOfUnitForm", "BilinearFormOfUnitForm", "QuadraticFormOfUnitForm" ]

The last command shows which structures are defined for this unit form.

We need the example you applied the commands to, to reconstruct the error.

pi-bie commented 12 months ago

@sunnyquiver I run into this problem with the algebra given in the OP here, while my initial example was Q:=Quiver(7,[[4,2],[6,4],[6,5],[4,1],[5,1],[5,3],[1,7],[3,7]]); kQ:=PathAlgebra(Rationals,Q); AssignGeneratorVariables(kQ); ideal:=[a2*a4-a3*a5,a5*a7-a6*a8]; A:=kQ/ideal;

But on the Ubuntu machines I have tried, even gap> Q:=Quiver(2,[[1,2]]); gap> kQ:=PathAlgebra(Rationals,Q); gap> B:=TitsUnitFormOfAlgebra(kQ); gap> Rank(B); results in a memory access error.

sunnyquiver commented 12 months ago

The problem is that when you ask: IsMatrix( B ); then the answer is true. This is why the function Rank or RankMatrix can be applied to B. This is a design fault. The unitform B is not a matrix. The matrix you access via SymmetricMatrixOfUnitForm. This needs more thought to change. Will put it on my ToDoList. Thank you for pointing this out!