Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SetPackageInfo( rec(

PackageName := "FinGSetsForCAP",
Subtitle := "The (skeletal) elementary topos of finite G-sets",
Version := "2026.05-07",
Version := "2026.05-08",

Date := (function ( ) if IsBound( GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE ) then return GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE; else return Concatenation( ~.Version{[ 1 .. 4 ]}, "-", ~.Version{[ 6, 7 ]}, "-01" ); fi; end)( ),
License := "GPL-2.0-or-later",
Expand Down Expand Up @@ -100,7 +100,8 @@ Dependencies := rec(
NeededOtherPackages := [
[ "GAPDoc", ">= 1.5" ],
[ "CAP", ">= 2026.05-04" ],
[ "GroupsAsCategoriesForCAP", ">= 2026.05-03" ],
[ "GroupsAsCategoriesForCAP", ">= 2026.05-04" ],
[ "Toposes", ">= 2022.05-03" ],
[ "FinSetsForCAP", ">= 2022.05-01" ],
],
ExternalConditions := [ ],
Expand Down
23 changes: 10 additions & 13 deletions examples/precompile_SkeletalCategoryOfTransitiveLeftGSets.g
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@

LoadPackage( "FinGSetsForCAP", false );
#! true
LoadPackage( "CompilerForCAP", ">= 2026.05-01", false );
LoadPackage( "CompilerForCAP", ">= 2026.05-03", false );
#! true
ReadPackageOnce( "FinSetsForCAP", "gap/CompilerLogic.gi" );
#! true
ReadPackageOnce( "FinGSetsForCAP", "gap/CompilerLogic.gi" );
#! true

category_constructor :=
Expand All @@ -20,18 +24,11 @@ given_arguments := [ C2 ];;
compiled_category_name :=
"SkeletalCategoryOfTransitiveLeftGSets_precompiled";;
package_name := "FinGSetsForCAP";;
#primitive_operations :=
# ListPrimitivelyInstalledOperationsOfCategory(
# category_constructor( given_arguments[1]
# : no_precompiled_code := true ) );;
list_of_operations :=
#SortedList( Concatenation( primitive_operations,
[ "SetOfObjectsOfCategory",
"IsEqualForObjects",
"IsWellDefinedForObjects",
"IsWellDefinedForMorphisms",
];;
#) );;
all_operations :=
ListInstalledOperationsOfCategory(
category_constructor( given_arguments[1]
: no_precompiled_code := true ) );;
list_of_operations := SortedList( all_operations );;

CapJitPrecompileCategoryAndCompareResult(
category_constructor,
Expand Down
32 changes: 32 additions & 0 deletions gap/CompilerLogic.gi
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# FinGSetsForCAP: The (skeletal) elementary topos of finite G-sets
#
# Implementations
#

CapJitAddLogicTemplate(
rec(
variable_names := [ "v", "b" ],
variable_filters := [ IsBigInt, IsBigInt ],
src_template := "DigitInPositionalNotation( v, BigInt( 0 ), BigInt( 1 ), b )",
dst_template := "v",
)
);

CapJitAddLogicTemplate(
rec(
variable_names := [ "gs", "U", "TG", "source", "target", "h" ],
variable_filters := [ IsList, IsList, IsSkeletalCategoryOfTransitiveLeftGSets, IsObjectInSkeletalCategoryOfTransitiveLeftGSets, IsObjectInSkeletalCategoryOfTransitiveLeftGSets, IsMultiplicativeElementWithInverse ],
src_template := "SafeUniquePositionProperty( List( gs, g -> CreateCapCategoryMorphismWithAttributes( TG, source, target, UnderlyingGroupElement, g ) ), mor -> MultiplyGroupElements( InverseImmutable( UnderlyingGroupElement( mor ) ), h ) in U[ObjectNumber( Range( mor ) )] )",
dst_template := "SafeUniquePositionProperty( gs, g -> MultiplyGroupElements( InverseImmutable( g ), h ) in U[ObjectNumber( target )] )",
)
);

CapJitAddLogicTemplate(
rec(
variable_names := [ "iota", "func" ],
variable_filters := [ IsMorphismInSkeletalCategoryOfFiniteSets, IsFunction ],
src_template := "SafeUniquePositionProperty( List( [ 0 .. Cardinality( Target( iota ) ) - 1 ], func ), mor -> AsList( mor ) = AsList( iota ) )",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarcTalleux This one worked easily.

dst_template := "1 + AsList( iota )[1]",
)
);
32 changes: 16 additions & 16 deletions gap/SkeletalCategoryOfTransitiveLeftGSets.gd
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ end );
DeclareAttribute( "UnderlyingGroup",
IsSkeletalCategoryOfTransitiveLeftGSets );

#CapJitAddTypeSignature( "UnderlyingGroup", [ IsSkeletalCategoryOfTransitiveLeftGSets ], function ( input_types )
#
# return CapJitDataTypeOfGroup( UnderlyingGroup( input_types[1].category ) );
#
#end );
CapJitAddTypeSignature( "UnderlyingGroup", [ IsSkeletalCategoryOfTransitiveLeftGSets ], function ( input_types )
return CapJitDataTypeOfGroup( UnderlyingGroup( input_types[1].category ) );
end );

#! @Description
#! The group $G$ underlying the skeletal category <A>C</A> of transitive left $G$-set, viewed as a category on one object.
Expand Down Expand Up @@ -219,7 +219,7 @@ DeclareAttribute( "UnderlyingTableOfMarks",
DeclareAttribute( "NumberOfObjects",
IsSkeletalCategoryOfTransitiveLeftGSets );

#CapJitAddTypeSignature( "NumberOfObjects", [ IsSkeletalCategoryOfTransitiveLeftGSets ], IsBigInt );
CapJitAddTypeSignature( "NumberOfObjects", [ IsSkeletalCategoryOfTransitiveLeftGSets ], IsBigInt );

#! @Description
#! The list of cardinalities of objects of the skeletal category <A>C</A> of transitive left $G$-set.
Expand All @@ -228,11 +228,11 @@ DeclareAttribute( "NumberOfObjects",
DeclareAttribute( "CardinalitiesOfObjects",
IsSkeletalCategoryOfTransitiveLeftGSets );

#CapJitAddTypeSignature( "CardinalitiesOfObjects", [ IsSkeletalCategoryOfTransitiveLeftGSets ], function ( input_types )
#
# return CapJitDataTypeOfListOf( IsBigInt );
#
#end );
CapJitAddTypeSignature( "CardinalitiesOfObjects", [ IsSkeletalCategoryOfTransitiveLeftGSets ], function ( input_types )
return CapJitDataTypeOfListOf( IsBigInt );
end );

#! @Description
#! The list of subgroups up to conjugation of the underlying group.
Expand All @@ -241,11 +241,11 @@ DeclareAttribute( "CardinalitiesOfObjects",
DeclareAttribute( "RepresentativesOfSubgroupsUpToConjugation",
IsSkeletalCategoryOfTransitiveLeftGSets );

#CapJitAddTypeSignature( "RepresentativesOfSubgroupsUpToConjugation", [ IsSkeletalCategoryOfTransitiveLeftGSets ], function ( input_types )
#
# return CapJitDataTypeOfListOf( CapJitDataTypeOfSubgroup( UnderlyingGroup( input_types[1].category ) ) );
#
#end );
CapJitAddTypeSignature( "RepresentativesOfSubgroupsUpToConjugation", [ IsSkeletalCategoryOfTransitiveLeftGSets ], function ( input_types )
return CapJitDataTypeOfListOf( CapJitDataTypeOfSubgroup( UnderlyingGroup( input_types[1].category ) ) );
end );

#! @Description
#! The positive integer $i$ such that the transitive left $G$-set <A>Omega</A> $\cong U_i \backslash G$.
Expand Down
4 changes: 1 addition & 3 deletions gap/SkeletalCategoryOfTransitiveLeftGSets.gi
Original file line number Diff line number Diff line change
Expand Up @@ -658,11 +658,9 @@ InstallMethod( SkeletalCategoryOfTransitiveLeftGSets,

Append( SkeletalTransitiveLeftGSets!.compiler_hints.category_attribute_names,
[ "UnderlyingGroup",
"UnderlyingGroupAsCategory",
"UnderlyingTableOfMarks",
"NumberOfObjects",
"CardinalitiesOfObjects",
"SetOfObjectsAsUnresolvableAttribute",
"RepresentativesOfSubgroupsUpToConjugation",
] );

Expand Down Expand Up @@ -736,7 +734,7 @@ InstallMethodForCompilerForCAP( SetOfObjects,

function ( SkeletalTransitiveLeftGSets )

return SetOfObjectsAsUnresolvableAttribute( SkeletalTransitiveLeftGSets );
return SetOfObjectsOfCategory( SkeletalTransitiveLeftGSets );

end );

Expand Down
Loading
Loading