Skip to content

Commit

Permalink
Merge pull request #246 from zickgraf/master
Browse files Browse the repository at this point in the history
Optimize Preimage
  • Loading branch information
zickgraf authored Feb 12, 2024
2 parents 094948d + ad6fab3 commit e6bb67d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SetPackageInfo( rec(

PackageName := "FinSetsForCAP",
Subtitle := "The elementary topos of (skeletal) finite sets",
Version := "2024.02-04",
Version := "2024.02-05",

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
8 changes: 3 additions & 5 deletions gap/SkeletalFinSets.gi
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,11 @@ InstallMethod( Preimage,
[ IsMorphismInSkeletalCategoryOfFiniteSets, IsList ],

function ( phi, t )
local S;
local positions;

S := AsList( Source( phi ) );
positions := PositionsProperty( AsList( phi ), x -> x in t );

phi := AsList( phi );

return Filtered( S, i -> phi[1 + i] in t );
return List( positions, i -> BigInt( i - 1 ) );

end );

Expand Down

0 comments on commit e6bb67d

Please sign in to comment.