Skip to content

Commit c0b1e8d

Browse files
made AddObjectConstructor/AddMorphismConstructor the primitive operations
and FinSetOp/MapOfFinSets the "derived" ones
1 parent 2e42c04 commit c0b1e8d

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

gap/SkeletalFinSets.gi

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,8 @@ InstallMethodForCompilerForCAP( FinSetOp,
5555
[ IsCategoryOfSkeletalFinSets, IsBigInt ],
5656

5757
function ( cat, n )
58-
local int;
59-
60-
int := CreateCapCategoryObjectWithAttributes( cat, Length, n );
6158

62-
#% CAP_JIT_DROP_NEXT_STATEMENT
63-
Assert( 4, IsWellDefined( int ) );
64-
65-
return int;
59+
return ObjectConstructor( cat, n );
6660

6761
end );
6862

@@ -107,17 +101,8 @@ InstallOtherMethodForCompilerForCAP( MapOfFinSets,
107101
[ IsCategoryOfSkeletalFinSets, IsSkeletalFiniteSet, IsList, IsSkeletalFiniteSet ],
108102

109103
function ( cat, s, G, t )
110-
local map;
111-
112-
map := CreateCapCategoryMorphismWithAttributes( cat,
113-
s,
114-
t,
115-
AsList, G );
116104

117-
#% CAP_JIT_DROP_NEXT_STATEMENT
118-
Assert( 4, IsWellDefined( map ) );
119-
120-
return map;
105+
return MorphismConstructor( cat, s, G, t );
121106

122107
end );
123108

@@ -258,8 +243,14 @@ InstallGlobalFunction( INSTALL_FUNCTIONS_FOR_SKELETAL_FIN_SETS,
258243
##
259244
AddObjectConstructor( SkeletalFinSets,
260245
function ( cat, n )
246+
local int;
247+
248+
int := CreateCapCategoryObjectWithAttributes( cat, Length, n );
261249

262-
return FinSet( cat, n );
250+
#% CAP_JIT_DROP_NEXT_STATEMENT
251+
Assert( 4, IsWellDefined( int ) );
252+
253+
return int;
263254

264255
end );
265256

@@ -273,9 +264,18 @@ end );
273264

274265
##
275266
AddMorphismConstructor( SkeletalFinSets,
276-
function ( cat, source, map, range )
267+
function ( cat, source, images, range )
268+
local map;
269+
270+
map := CreateCapCategoryMorphismWithAttributes( cat,
271+
source,
272+
range,
273+
AsList, images );
277274

278-
return MapOfFinSets( cat, source, map, range );
275+
#% CAP_JIT_DROP_NEXT_STATEMENT
276+
Assert( 4, IsWellDefined( map ) );
277+
278+
return map;
279279

280280
end );
281281

0 commit comments

Comments
 (0)