diff --git a/PackageInfo.g b/PackageInfo.g index 7546337..e7dccda 100644 --- a/PackageInfo.g +++ b/PackageInfo.g @@ -10,7 +10,7 @@ SetPackageInfo( rec( PackageName := "FinSetsForCAP", Subtitle := "The elementary topos of (skeletal) finite sets", -Version := "2024.10-02", +Version := "2025.01-01", 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", diff --git a/examples/SkeletalCartesianLambdaIntroduction.g b/examples/SkeletalCartesianLambdaIntroduction.g index 7553db0..fb6c60e 100644 --- a/examples/SkeletalCartesianLambdaIntroduction.g +++ b/examples/SkeletalCartesianLambdaIntroduction.g @@ -25,11 +25,6 @@ Display( Range( lf ) ); #! { 0,..., 7 } Display( lf ); #! { 0 } ⱶ[ 3 ]→ { 0,..., 7 } -#! #@if ValueOption( "no_precompiled_code" ) <> true -SkeletalFinSets!.cached_precompiled_functions. - CartesianLambdaIntroduction( SkeletalFinSets, f ); -#! |1| → |8| -#! #@fi elf := CartesianLambdaElimination( S, R, lf ); #! |3| → |2| elf = f; diff --git a/gap/CompilerLogic.gi b/gap/CompilerLogic.gi index 021949a..7200e6e 100644 --- a/gap/CompilerLogic.gi +++ b/gap/CompilerLogic.gi @@ -507,6 +507,15 @@ CapJitAddLogicTemplate( ) ); +CapJitAddLogicTemplate( + rec( + variable_names := [ "mor" ], + variable_filters := [ IsMorphismInSkeletalCategoryOfFiniteSets ], + src_template := "List( [ 0 .. Length( Source( mor ) ) - 1 ], i -> AsList( mor )[1 + i] )", + dst_template := "AsList( mor )", + ) +); + CapJitAddLogicTemplate( rec( variable_names := [ "length", "value", "func" ], diff --git a/gap/precompiled_categories/SkeletalCategoryOfFiniteSetsWithMorphismsGivenByLists_precompiled.gi b/gap/precompiled_categories/SkeletalCategoryOfFiniteSetsWithMorphismsGivenByLists_precompiled.gi index 18aca4c..f16936a 100644 --- a/gap/precompiled_categories/SkeletalCategoryOfFiniteSetsWithMorphismsGivenByLists_precompiled.gi +++ b/gap/precompiled_categories/SkeletalCategoryOfFiniteSetsWithMorphismsGivenByLists_precompiled.gi @@ -135,34 +135,13 @@ function ( cat_1, alpha_1 ) deduped_3_1 := Length( Range( alpha_1 ) ); hoisted_1_1 := AsList( alpha_1 ); return CreateCapCategoryMorphismWithAttributes( cat_1, CreateCapCategoryObjectWithAttributes( cat_1, Length, BigInt( 1 ) ), CreateCapCategoryObjectWithAttributes( cat_1, Length, deduped_3_1 ^ deduped_4_1 ), AsList, [ Sum( List( [ 0 .. deduped_4_1 - 1 ], function ( k_2 ) - return CAP_JIT_INCOMPLETE_LOGIC( hoisted_1_1[(1 + CAP_JIT_INCOMPLETE_LOGIC( k_2 ))] ) * deduped_3_1 ^ k_2; + return hoisted_1_1[(1 + k_2)] * deduped_3_1 ^ k_2; end ) ) ] ); end ######## , 503 : IsPrecompiledDerivation := true ); - ## - cat!.cached_precompiled_functions.CartesianLambdaIntroduction := - -######## -function ( cat_1, alpha_1 ) - local hoisted_1_1, hoisted_2_1, deduped_4_1, deduped_5_1, deduped_6_1; - deduped_6_1 := Length( Source( alpha_1 ) ); - deduped_5_1 := Length( Range( alpha_1 ) ); - deduped_4_1 := [ 0 .. deduped_6_1 - 1 ]; - hoisted_1_1 := AsList( alpha_1 ); - hoisted_2_1 := List( deduped_4_1, function ( i_2 ) - return hoisted_1_1[1 + i_2]; - end ); - return CreateCapCategoryMorphismWithAttributes( cat_1, CreateCapCategoryObjectWithAttributes( cat_1, Length, BigInt( 1 ) ), CreateCapCategoryObjectWithAttributes( cat_1, Length, deduped_5_1 ^ deduped_6_1 ), AsList, [ Sum( List( deduped_4_1, function ( k_2 ) - return hoisted_2_1[(1 + k_2)] * deduped_5_1 ^ k_2; - end ) ) ] ); -end -######## - - ; - ## AddCartesianLeftCoevaluationMorphismWithGivenRange( cat,