CAP_project
CAP_project copied to clipboard
Primitively installed methods are not recognized as primitive
The mechanism we use to add compiled methods does not register the added methods as primitive:
gap> LoadPackage( "FinSets", false );
true
gap> "CartesianLambdaIntroduction" in ListPrimitivelyInstalledOperationsOfCategory( SkeletalFinSets );
false
gap> SkeletalFinSets!.added_functions.CartesianLambdaIntroduction;
[ [ function( cat, alpha ) ... end, [ ] ], [ function( cat_1, alpha_1 ) ... end, [ ] ] ]
gap> Display( last );
[ [ function ( cat, alpha )
local result_morphism, source;
source := Source( alpha );
result_morphism := PreCompose( cat, CartesianLeftUnitor( cat, source ), alpha );
return DirectProductToExponentialAdjunctionMap( cat, TerminalObject( cat ), source, result_morphism );
end, [ ] ], [ function ( cat_1, alpha_1 )
local hoisted_1_1, hoisted_2_1, hoisted_3_1, hoisted_4_1, hoisted_5_1, hoisted_6_1, deduped_7_1, deduped_8_1, deduped_9_1;
deduped_9_1 := Length( Source( alpha_1 ) );
deduped_8_1 := Length( Range( alpha_1 ) );
deduped_7_1 := [ 1 .. deduped_9_1 ];
hoisted_6_1 := deduped_8_1;
hoisted_2_1 := AsList( alpha_1 );
hoisted_1_1 := [ 0 .. deduped_9_1 - 1 ];
hoisted_5_1 := List( deduped_7_1, function ( i_2 )
return hoisted_2_1[1 + hoisted_1_1[i_2]];
end );
hoisted_4_1 := deduped_7_1;
hoisted_3_1 := deduped_9_1;
return ObjectifyMorphismWithSourceAndRangeForCAPWithAttributes( rec(
), cat_1, ObjectifyObjectForCAPWithAttributes( rec(
), cat_1, Length, 1 ), ObjectifyObjectForCAPWithAttributes( rec(
), cat_1, Length, deduped_8_1 ^ deduped_9_1 ), AsList, [ List( [ 0 .. deduped_9_1 ^ deduped_9_1 - 1 ], function ( i_2 )
local hoisted_1_2, hoisted_2_2, hoisted_3_2;
hoisted_1_2 := List( hoisted_1_1, function ( j_3 )
return REM_INT( QUO_INT( i_2, hoisted_3_1 ^ j_3 ), hoisted_3_1 );
end );
hoisted_2_2 := List( hoisted_4_1, function ( i_3 )
return hoisted_1_2[1 + hoisted_1_1[i_3]];
end );
hoisted_3_2 := List( hoisted_4_1, function ( i_3 )
return hoisted_5_1[1 + hoisted_2_2[i_3]];
end );
return Sum( hoisted_1_1, function ( k_3 )
return hoisted_3_2[(1 + k_3)] * hoisted_6_1 ^ k_3;
end );
end )[1 + deduped_9_1 * GeometricSumDiff1( deduped_9_1, deduped_9_1 )] ] );
end, [ ] ] ]
FYI: The compilation of CartesianLambdaIntroduction was enforced here.
This is intended to make sure the compiled category behaves exactly the same as the original category when using it with Opposite or WrapperCategory and only_primitive_operations. Search for IsPrecompiledDerivation if you are interested in the exact implementation for this.
@mohamed-barakat Can this issue be closed?
Yes, thanks.