Skip to content

Commit

Permalink
AddCoimageObject & AddCoimageProjectionWithGivenCoimageObject
Browse files Browse the repository at this point in the history
ImageObject( phi )   ⤳ Set
CoimageObject( phi ) ⤳ DuplicateFreeList
  • Loading branch information
mohamed-barakat committed Oct 4, 2023
1 parent 3082d39 commit f243961
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

LoadPackage( "FinSetsForCAP", false );
#! true
LoadPackage( "CompilerForCAP", false );
LoadPackage( "CompilerForCAP", ">= 2023.10-03", false );
#! true

ReadPackage( "FinSetsForCAP", "gap/CompilerLogic.gi" );
Expand Down
24 changes: 24 additions & 0 deletions gap/SkeletalFinSets.gi
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,14 @@ AddImageObject( SkeletalFinSets,

end );

##
AddCoimageObject( SkeletalFinSets,
function ( cat, phi )

return ImageObject( cat, phi );

end );

## the function SKELETAL_FIN_SETS_IsEpimorphism
## has linear runtime complexity
AddIsEpimorphism( SkeletalFinSets,
Expand Down Expand Up @@ -483,7 +491,23 @@ AddImageEmbeddingWithGivenImageObject( SkeletalFinSets,
function ( cat, phi, image )

return MorphismConstructor( cat, image, Set( AsList( phi ) ), Range( phi ) );

end );

##
AddCoimageProjectionWithGivenCoimageObject( SkeletalFinSets,
function ( cat, phi, coimage )
local L, imgs, map;

L := AsList( phi );

imgs := DuplicateFreeList( L );

map := List( [ 0 .. Length( Source( phi ) ) - 1 ], i ->
-1 + SafePosition( imgs, L[1 + i] ) );

return MorphismConstructor( cat, Source( phi ), map, coimage );

end );

##
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,34 @@ end

, 100 );

##
AddCoimageObject( cat,

########
function ( cat_1, arg2_1 )
return CreateCapCategoryObjectWithAttributes( cat_1, Length, BigInt( Length( SSortedList( AsList( arg2_1 ) ) ) ) );
end
########

, 100 );

##
AddCoimageProjectionWithGivenCoimageObject( cat,

########
function ( cat_1, alpha_1, C_1 )
local hoisted_2_1, deduped_3_1, deduped_4_1;
deduped_4_1 := AsList( alpha_1 );
deduped_3_1 := Source( alpha_1 );
hoisted_2_1 := DuplicateFreeList( deduped_4_1 );
return CreateCapCategoryMorphismWithAttributes( cat_1, deduped_3_1, C_1, AsList, List( [ 0 .. Length( deduped_3_1 ) - 1 ], function ( i_2 )
return -1 + SafePosition( hoisted_2_1, deduped_4_1[(1 + i_2)] );
end ) );
end
########

, 100 );

##
AddColift( cat,

Expand Down

0 comments on commit f243961

Please sign in to comment.