@@ -469,8 +469,8 @@ InstallGlobalFunction( INSTALL_FUNCTIONS_FOR_QUIVER_ROWS,
469
469
function ( category, over_Z )
470
470
local algebra, quiver, zero, IDENTITY_MATRIX_QUIVER_ROWS, ZERO_MATRIX_QUIVER_ROWS,
471
471
vertices, basis, basis_paths_by_vertex_index, path, MATRIX_FOR_ALGEBROID_HOMSTRUCTURE, hom_structure_algebroid,
472
- object_constructor, ring, morphism_constructor , hom_structure_range_category, hom_structure_on_morphisms_for_pure_components,
473
- distinguished_object, representative_func;
472
+ ring, default_range_of_HomStructure , hom_structure_range_category, hom_structure_on_morphisms_for_pure_components,
473
+ representative_func;
474
474
475
475
algebra := UnderlyingQuiverAlgebra( category );
476
476
@@ -566,61 +566,18 @@ InstallGlobalFunction( INSTALL_FUNCTIONS_FOR_QUIVER_ROWS,
566
566
)
567
567
);
568
568
569
- # # object constructor for hom structure
570
-
571
569
if over_Z then
572
570
573
- hom_structure_range_category := CategoryOfRows( ring );
574
-
575
- # #
576
- object_constructor := function ( n )
577
-
578
- return CategoryOfRowsObject( n, hom_structure_range_category );
579
-
580
- end ;
581
-
582
- # #
583
- morphism_constructor := function ( source, mat, range )
584
- local matrix;
585
-
586
- if IsEmpty( mat ) then
587
-
588
- matrix := HomalgZeroMatrix( RankOfObject( source ), RankOfObject( range ), ring );
589
-
590
- else
591
-
592
- matrix := HomalgMatrix( mat, RankOfObject( source ), RankOfObject( range ), ring );
593
-
594
- fi ;
595
-
596
- return CategoryOfRowsMorphism( source, matrix, range );
597
-
598
- end ;
599
-
600
- distinguished_object := CategoryOfRowsObject( 1 , hom_structure_range_category );
571
+ default_range_of_HomStructure := CategoryOfRows( ring );
601
572
602
573
else
603
574
604
- hom_structure_range_category := MatrixCategory( ring );
605
-
606
- # #
607
- object_constructor := function ( n )
608
-
609
- return VectorSpaceObject( n, ring );
610
-
611
- end ;
612
-
613
- # #
614
- morphism_constructor := function ( source, mat, range )
615
-
616
- return VectorSpaceMorphism( source, mat, range );
617
-
618
- end ;
619
-
620
- distinguished_object := TensorUnit( hom_structure_range_category );
575
+ default_range_of_HomStructure := MatrixCategory( ring );
621
576
622
577
fi ;
623
578
579
+ hom_structure_range_category := CAP_INTERNAL_RETURN_OPTION_OR_DEFAULT( " range_of_HomStructure" , default_range_of_HomStructure );
580
+
624
581
SetRangeCategoryOfHomomorphismStructure( category, hom_structure_range_category );
625
582
626
583
# #
@@ -1083,6 +1040,7 @@ InstallGlobalFunction( INSTALL_FUNCTIONS_FOR_QUIVER_ROWS,
1083
1040
1084
1041
end );
1085
1042
1043
+ # #
1086
1044
AddHomomorphismStructureOnObjects( category,
1087
1045
function ( A, B )
1088
1046
local listA, listB, rank, a, b;
@@ -1103,7 +1061,7 @@ InstallGlobalFunction( INSTALL_FUNCTIONS_FOR_QUIVER_ROWS,
1103
1061
1104
1062
od ;
1105
1063
1106
- return object_constructor( rank );
1064
+ return ObjectConstructor( hom_structure_range_category, rank );
1107
1065
1108
1066
end );
1109
1067
@@ -1288,21 +1246,29 @@ InstallGlobalFunction( INSTALL_FUNCTIONS_FOR_QUIVER_ROWS,
1288
1246
row_counts, mat, col_counts
1289
1247
);
1290
1248
1291
- return morphism_constructor( hom_source, mat, hom_range );
1249
+ if IsEmpty( mat ) then
1250
+
1251
+ return ZeroMorphism( hom_structure_range_category, hom_source, hom_range );
1252
+
1253
+ else
1254
+
1255
+ return MorphismConstructor( hom_structure_range_category, hom_source, HomalgMatrix( mat, RankOfObject( hom_source ), RankOfObject( hom_range ), ring ), hom_range );
1256
+
1257
+ fi ;
1292
1258
1293
1259
end );
1294
1260
1295
1261
# #
1296
1262
AddDistinguishedObjectOfHomomorphismStructure( category,
1297
1263
function ( )
1298
1264
1299
- return distinguished_object ;
1265
+ return ObjectConstructor( hom_structure_range_category, 1 ) ;
1300
1266
1301
1267
end );
1302
1268
1303
1269
# #
1304
- AddInterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructure ( category,
1305
- function ( alpha )
1270
+ AddInterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructureWithGivenObjects ( category,
1271
+ function ( source, alpha, range )
1306
1272
local listlist, lists, listr, row, i, j, submat, basis, c, a;
1307
1273
1308
1274
listlist := AsListListOfMatrices( alpha );
@@ -1335,7 +1301,15 @@ InstallGlobalFunction( INSTALL_FUNCTIONS_FOR_QUIVER_ROWS,
1335
1301
1336
1302
od ;
1337
1303
1338
- return morphism_constructor( distinguished_object, row, object_constructor( Size( row ) ) );
1304
+ if IsEmpty( row ) then
1305
+
1306
+ return ZeroMorphism( hom_structure_range_category, source, range );
1307
+
1308
+ else
1309
+
1310
+ return MorphismConstructor( hom_structure_range_category, source, HomalgMatrix( row, 1 , Size( row ), ring ), range );
1311
+
1312
+ fi ;
1339
1313
1340
1314
end );
1341
1315
0 commit comments