Skip to content

Commit d5e5ab0

Browse files
d&i CategoryFromDataTables for IsCategoryFromNerveData
and used it to simplify OppositeCategoryFromDataTables
1 parent 39a048a commit d5e5ab0

File tree

3 files changed

+24
-9
lines changed

3 files changed

+24
-9
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-32",
13+
Version := "2022.12-33",
1414

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

gap/CategoryFromDataTables.gd

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ DeclareAttribute( "OppositeCategoryFromDataTables",
206206
####################################
207207

208208
#! @Description
209-
#! 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>).
209+
#! Construct a <A>V</A>-enriched category with name <A>str</A> from the given <A>data_tables</A>
210+
#! (of a f.p. category <A>C</A> or a category <A>C</A> created from nerve data).
210211
#! @Arguments str, V, data_tables, indices_of_generating_morphisms, relations, labels
211212
#! @Returns a &CAP; category
212213
DeclareOperation( "CategoryFromDataTables",
@@ -217,6 +218,10 @@ DeclareOperation( "CategoryFromDataTables",
217218
DeclareAttribute( "CategoryFromDataTables",
218219
IsFpCategory );
219220

221+
#! @Arguments C
222+
DeclareAttribute( "CategoryFromDataTables",
223+
IsCategoryFromNerveData );
224+
220225
#! @Description
221226
#! Construct the <A>o</A>-th object in the category <A>C</A> created from data tables.
222227
#! @Arguments C, o

gap/CategoryFromDataTables.gi

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,22 @@ InstallMethod( CategoryFromDataTables,
277277

278278
end );
279279

280+
##
281+
InstallMethod( CategoryFromDataTables,
282+
"for a category from nerve data",
283+
[ IsCategoryFromNerveData ],
284+
285+
function( C )
286+
287+
return CategoryFromDataTables( Name( C ),
288+
RangeCategoryOfHomomorphismStructure( C ),
289+
DataTablesOfCategory( C ),
290+
IndicesOfGeneratingMorphisms( C ),
291+
RelationsAmongGeneratingMorphisms( C ),
292+
C!.labels );
293+
294+
end );
295+
280296
##
281297
InstallMethod( Size,
282298
"for a category from data tables",
@@ -458,13 +474,7 @@ InstallMethod( OppositeCategoryFromDataTables,
458474

459475
Cop := OppositeCategoryFromNerveData( C_from_nerve );
460476

461-
C_op := CategoryFromDataTables(
462-
Name( Cop ),
463-
RangeCategoryOfHomomorphismStructure( Cop ),
464-
DataTablesOfCategory( Cop ),
465-
IndicesOfGeneratingMorphisms( Cop ),
466-
RelationsAmongGeneratingMorphisms( Cop ),
467-
Cop!.labels );
477+
C_op := CategoryFromDataTables( Cop );
468478

469479
SetOppositeCategoryFromDataTables( C_op, C );
470480

0 commit comments

Comments
 (0)