Skip to content

Commit e69a029

Browse files
d&i CategoryFromNerveData/DataTables using IndicesOfGeneratingMorphisms
and used it to simplify example files * CategoryFromNerveData.g * CategoryFromDataTables.g
1 parent 4701a69 commit e69a029

7 files changed

+44
-14
lines changed

PackageInfo.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SetPackageInfo( rec(
1010

1111
PackageName := "Algebroids",
1212
Subtitle := "Algebroids and bialgebroids as preadditive categories generated by enhanced quivers",
13-
Version := "2022.12-28",
13+
Version := "2022.12-29",
1414

1515
Date := ~.Version{[ 1 .. 10 ]},
1616
Date := Concatenation( "01/", ~.Version{[ 6, 7 ]}, "/", ~.Version{[ 1 .. 4 ]} ),

examples/CategoryFromDataTables.g

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ LoadPackage( "Algebroids" );
66
Delta1 := SimplicialCategoryTruncatedInDegree( 1 );
77
#! FreeCategory( RightQuiver( "Delta(C0,C1)[id:C1->C0,s:C0->C1,t:C0->C1]" ) )
88
#! / [ s*id = C0, t*id = C0 ]
9-
C := CategoryFromDataTables( Name( Delta1 ),
10-
RangeCategoryOfHomomorphismStructure( Delta1 ),
11-
DataTablesOfCategory( Delta1 ),
12-
IndicesOfGeneratingMorphisms( Delta1 ),
13-
[ [ "C0", "C1" ],
14-
[ "id", "s", "t" ] ] );
9+
C := CategoryFromDataTables( Delta1 );
1510
#! FreeCategory( RightQuiver( "Delta(C0,C1)[id:C1->C0,s:C0->C1,t:C0->C1]" ) )
1611
#! / [ s*id = C0, t*id = C0 ]
1712
NerveTruncatedInDegree2Data( Delta1 ) = NerveTruncatedInDegree2Data( C );

examples/CategoryFromNerveData.g

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ Delta1 := SimplicialCategoryTruncatedInDegree( 1 );
99
N1 := NerveTruncatedInDegree2Data( Delta1 );;
1010
N1[1];
1111
#! [ |2|, |7|, |26| ]
12-
C := CategoryFromNerveData( Name( Delta1 ),
13-
N1,
14-
IndicesOfGeneratingMorphisms( Delta1 ),
15-
[ [ "C0", "C1" ],
16-
[ "id", "s", "t" ] ] );
12+
C := CategoryFromNerveData( Delta1 );
1713
#! FreeCategory( RightQuiver( "Delta(C0,C1)[id:C1->C0,s:C0->C1,t:C0->C1]" ) )
1814
#! / [ s*id = C0, t*id = C0 ]
1915
NerveTruncatedInDegree2Data( C ) = N1;

gap/CategoryFromDataTables.gd

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,17 @@ DeclareAttribute( "OppositeCategoryFromDataTables",
182182
####################################
183183

184184
#! @Description
185-
#! Construct a <A>V</A>-enriched category with name <A>str</A> from the given <A>data_tables</A>.
185+
#! Construct a <A>V</A>-enriched category with name <A>str</A> from the given <A>data_tables</A> (of a f.p. category <A>C</A>).
186186
#! @Arguments str, V, data_tables, indices_of_generating_morphisms, labels
187187
#! @Returns a &CAP; category
188188
DeclareOperation( "CategoryFromDataTables",
189189
[ IsString, IsCapCategory, IsList, IsList, IsList ] );
190190
#! @InsertChunk CategoryFromDataTables
191191

192+
#! @Arguments C
193+
DeclareAttribute( "CategoryFromDataTables",
194+
IsFpCategory );
195+
192196
#! @Description
193197
#! Construct the <A>o</A>-th object in the category <A>C</A> created from data tables.
194198
#! @Arguments C, o

gap/CategoryFromDataTables.gi

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,22 @@ InstallMethod( CategoryFromDataTables,
258258

259259
end );
260260

261+
##
262+
InstallMethod( CategoryFromDataTables,
263+
"for a f.p. category",
264+
[ IsFpCategory ],
265+
266+
function( C )
267+
268+
return CategoryFromDataTables( Name( C ),
269+
RangeCategoryOfHomomorphismStructure( C ),
270+
DataTablesOfCategory( C ),
271+
IndicesOfGeneratingMorphisms( C ),
272+
[ List( SetOfObjects( C ), Label ),
273+
List( SetOfGeneratingMorphisms( C ), Label ) ] );
274+
275+
end );
276+
261277
##
262278
InstallMethodForCompilerForCAP( CreateObject,
263279
"for a category from data tables and an integer",

gap/CategoryFromNerveData.gd

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,17 @@ DeclareAttribute( "OppositeCategoryFromNerveData",
167167
####################################
168168

169169
#! @Description
170-
#! Construct a category with name <A>str</A> from the given <A>nerve_data</A>.
170+
#! Construct a category with name <A>str</A> from the given <A>nerve_data</A> (of a f.p. category <A>C</A>).
171171
#! @Arguments str, nerve_data, indices_of_generating_morphisms, labels
172172
#! @Returns a &CAP; category
173173
DeclareOperation( "CategoryFromNerveData",
174174
[ IsString, IsList, IsList, IsList ] );
175175
#! @InsertChunk CategoryFromNerveData
176176

177+
#! @Arguments C
178+
DeclareAttribute( "CategoryFromNerveData",
179+
IsFpCategory );
180+
177181
#! @Description
178182
#! Construct the <A>o</A>-th object in the category <A>C</A> created from nerve data.
179183
#! @Arguments C, o

gap/CategoryFromNerveData.gi

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,21 @@ InstallMethod( CategoryFromNerveData,
476476

477477
end );
478478

479+
##
480+
InstallMethod( CategoryFromNerveData,
481+
"for a f.p. category",
482+
[ IsFpCategory ],
483+
484+
function( C )
485+
486+
return CategoryFromNerveData( Name( C ),
487+
NerveTruncatedInDegree2Data( C ),
488+
IndicesOfGeneratingMorphisms( C ),
489+
[ List( SetOfObjects( C ), Label ),
490+
List( SetOfGeneratingMorphisms( C ), Label ) ] );
491+
492+
end );
493+
479494
##
480495
InstallMethod( CreateObject,
481496
"for a category from nerve data and an integer",

0 commit comments

Comments
 (0)