Skip to content

Commit 2b597ff

Browse files
Merge pull request #1783 from kamalsaleh/master
Install \[\] method for FiniteSkeletalDiscreteCategories
2 parents 75d7384 + 73e2dee commit 2b597ff

File tree

3 files changed

+8
-22
lines changed

3 files changed

+8
-22
lines changed

CAP/PackageInfo.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SetPackageInfo( rec(
1010

1111
PackageName := "CAP",
1212
Subtitle := "Categories, Algorithms, Programming",
13-
Version := "2025.07-08",
13+
Version := "2025.07-09",
1414
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)( ),
1515
License := "GPL-2.0-or-later",
1616

CAP/examples/FiniteSkeletalDiscreteCategory.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ObjectDatum( one ) = 1;
1515
#! true
1616
Display( one );
1717
#! 1
18-
IsEqualForObjects( one, D.1 );
18+
IsEqualForObjects( one, D[1] );
1919
#! true
2020
id_one := IdentityMorphism( D, one );
2121
#! <An identity morphism in FiniteSkeletalDiscreteCategory( [ 1 .. 5 ] )>

CAP/gap/FiniteSkeletalDiscreteCategory.gi

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,13 @@ end ) );
169169
#################################
170170

171171
##
172-
InstallOtherMethod( \/,
173-
"for a string and a finite skeletal discrete category",
174-
[ IsStringRep, IsFiniteSkeletalDiscreteCategory ],
172+
InstallOtherMethod( \[\],
173+
"for a finite skeletal discrete category and a positive integer",
174+
[ IsFiniteSkeletalDiscreteCategory, IsInt ],
175175

176-
function ( string, D )
177-
local index, objects;
178-
179-
index := Int( string );
180-
176+
function ( D, index )
177+
local objects;
178+
181179
objects := SetOfObjectsOfCategory( D );
182180

183181
if index <= 0 or index > Length( objects ) then
@@ -191,18 +189,6 @@ InstallOtherMethod( \/,
191189

192190
end );
193191

194-
#= comment for Julia
195-
InstallMethod( \.,
196-
"for a finite skeletal discrete category and a positive integer",
197-
[ IsFiniteSkeletalDiscreteCategory, IsInt ],
198-
199-
function ( D, index_as_string )
200-
201-
return NameRNam( index_as_string ) / D;
202-
203-
end );
204-
# =#
205-
206192
#################################
207193
#
208194
# View & Display

0 commit comments

Comments
 (0)