Skip to content

Commit

Permalink
d&i YonedaProjective
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamed-barakat committed Mar 31, 2020
1 parent 40d6d8f commit abf1281
Show file tree
Hide file tree
Showing 4 changed files with 155 additions and 2 deletions.
2 changes: 1 addition & 1 deletion PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SetPackageInfo( rec(
PackageName := "CatReps",
Subtitle := "Representations and cohomology of finite categories",
Version := Maximum( [
"2020.02.19", ## Mohamed's version
"2020.02.20", ## Mohamed's version
## this line prevents merge conflicts
"2020.01.01", ## Tibor's version
## this line prevents merge conflicts
Expand Down
71 changes: 71 additions & 0 deletions examples/ConcreteCategoryWithEndomorphismGroups.g
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ Perform( gmorphisms, Display );
#! [ [ 1, 2, 3 ], [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ], [ 4, 5, 6 ] ]
#! A morphism in subcategory given by:
#! [ [ 4, 5, 6 ], [ [ 4, 5 ], [ 5, 6 ], [ 6, 4 ] ], [ 4, 5, 6 ] ]
#! @EndExample

#! @Example
qc3c3 := RightQuiver( "q(2)[a:1->1,b:1->2,c:2->2]" );
#! q(2)[a:1->1,b:1->2,c:2->2]
HOMALG_MATRICES.PreferDenseMatrices := true;
Expand Down Expand Up @@ -596,4 +599,72 @@ Display( iso );
#! . . . . . . . . . . . 1 . . . .
#!
#! An isomorphism in Category of matrices over GF(3)
proj1 := YonedaProjective( CatReps, kq.1 );
#! <A projective object in The category of functors: Bialgebroid
#! generated by the right quiver q(2)[a:1->1,b:1->2,c:2->2]
#! -> Category of matrices over GF(3)>
Display( proj1 );
#! An object in The category of functors: Bialgebroid generated by the
#! right quiver q(2)[a:1->1,b:1->2,c:2->2] -> Category of matrices
#! over GF(3) defined by the following data:
#!
#!
#! Image of (1):
#! A vector space object over GF(3) of dimension 3
#!
#! Image of (2):
#! A vector space object over GF(3) of dimension 3
#!
#! Image of (1)-[{ Z(3)^0*(a) }]->(1):
#! . 1 .
#! . . 1
#! 1 . .
#!
#! A morphism in Category of matrices over GF(3)
#!
#!
#! Image of (1)-[{ Z(3)^0*(b) }]->(2):
#! 1 . .
#! . 1 .
#! . . 1
#!
#! A morphism in Category of matrices over GF(3)
#!
#!
#! Image of (2)-[{ Z(3)^0*(c) }]->(2):
#! . 1 .
#! . . 1
#! 1 . .
#!
#! A morphism in Category of matrices over GF(3)
proj2 := YonedaProjective( CatReps, kq.2 );
#! <A projective object in The category of functors: Bialgebroid
#! generated by the right quiver q(2)[a:1->1,b:1->2,c:2->2]
#! -> Category of matrices over GF(3)>
Display( proj2 );
#! An object in The category of functors: Bialgebroid generated by the
#! right quiver q(2)[a:1->1,b:1->2,c:2->2] -> Category of matrices
#! over GF(3) defined by the following data:
#!
#!
#! Image of (1):
#! A vector space object over GF(3) of dimension 0
#!
#! Image of (2):
#! A vector space object over GF(3) of dimension 3
#!
#! Image of (1)-[{ Z(3)^0*(a) }]->(1):
#! (an empty 0 x 0 matrix)
#!
#!
#! Image of (1)-[{ Z(3)^0*(b) }]->(2):
#! (an empty 0 x 3 matrix)
#!
#!
#! Image of (2)-[{ Z(3)^0*(c) }]->(2):
#! . 1 .
#! . . 1
#! 1 . .
#!
#! A morphism in Category of matrices over GF(3)
#! @EndExample
9 changes: 9 additions & 0 deletions gap/CatRepsWithCAP.gd
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,15 @@ DeclareOperation( "EmbeddingOfSubRepresentation",
DeclareOperation( "WeakDirectSumDecomposition",
[ IsCapCategoryObjectInHomCategory ] );

#! @Description
#! Return Yoneda's projective representation given by the object <A>o</A>,
#! i.e., the submodule of the category algebra consisting of all arrows
#! starting at <A>o</A>.
#! @Arguments H, o
#! @Returns IsCapCategoryObjectInHomCategory
DeclareOperation( "YonedaProjective",
[ IsCapHomCategory, IsCapCategoryObject ] );

####################################
#
#! @Section Tools
Expand Down
75 changes: 74 additions & 1 deletion gap/CatRepsWithCAP.gi
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,80 @@ InstallMethod( WeakDirectSumDecomposition,
k := CommutativeRingOfLinearCategory( kq );

d := List( d, eta -> List( [ 1 .. Length( eta ) ], i -> VectorSpaceMorphism( VectorSpaceObject( Length( eta[i] ), k ), eta[i], F( kq.(i) ) ) ) );

return List( d, eta -> EmbeddingOfSubRepresentation( eta, F ) );

end );

##
InstallMethod( YonedaProjective,
"for a Hom-category and a CAP object",
[ IsCapHomCategory, IsCapCategoryObject ],

function( CatReps, o )
local kq, k, basis_list, A, basis, dimensions, a, arrows, matrices,
source, target, dim_source, dim_target, b, b_source, b_target,
matrix, b_a_path, b_a, coeffs, yproj;

kq := Source( CatReps );

o := Position( SetOfObjects( kq ), o );

k := CommutativeRingOfLinearCategory( CatReps );

## code from QPA2/lib/special-representations.gi

A := UnderlyingQuiverAlgebra( kq );

basis_list := BasisOfProjectives( A );
basis := basis_list[ o ];

dimensions := List( basis, Length );
arrows := Arrows( QuiverOfAlgebra( A ) );
matrices := [ ];

for a in arrows do

source := VertexIndex( Source( a ) );
target := VertexIndex( Target( a ) );

dim_source := dimensions[ source ];
dim_target := dimensions[ target ];

if dim_source = 0 or dim_target = 0 then

matrix := HomalgZeroMatrix( dim_source, dim_target, k );

else

b_source := List( basis[ source ], b -> Paths(b)[ 1 ] );
b_target := List( basis[ target ], b -> Paths(b)[ 1 ] );

matrix := [ ];

for b in b_source do
b_a_path := ComposePaths( b, a );
b_a := PathAsAlgebraElement( A, b_a_path );
coeffs := CoefficientsOfPaths( b_target, b_a );
Add( matrix, coeffs );
od;

matrix := HomalgMatrix( matrix, dim_source, dim_target, k );

matrix := VectorSpaceMorphism( VectorSpaceObject( dim_source, k ), matrix, VectorSpaceObject( dim_target, k ) );

fi;

Add( matrices, matrix );

od;

dimensions := List( dimensions, dim -> VectorSpaceObject( dim, k ) );

yproj := AsObjectInHomCategory( kq, dimensions, matrices );

SetIsProjective( yproj, true );

return yproj;

end );

0 comments on commit abf1281

Please sign in to comment.