Skip to content

Commit c433ce2

Browse files
committed
Fix bugs in CompareWithIndecProjective and CompareWithIndecInjective
reported in issue #107
1 parent 3252040 commit c433ce2

File tree

1 file changed

+31
-30
lines changed

1 file changed

+31
-30
lines changed

lib/derivedcat.gi

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,20 +1044,21 @@ InstallMethod( CompareWithIndecProjective,
10441044
[ IsPathAlgebraMatModule ],
10451045
function( M )
10461046

1047-
local A, projlist, i;
1048-
1049-
#first find the algebra of which M is a module
1050-
A := RightActingAlgebra(M);
1051-
1052-
projlist := IndecProjectiveModules(A);
1053-
1054-
for i in [1..Length(projlist)] do
1055-
if(DimensionVector(M) = DimensionVector(projlist[i])) then
1056-
return i;
1057-
fi;
1058-
od;
1059-
1060-
return false;
1047+
local topM;
1048+
1049+
if not IsProjectiveModule( M ) then
1050+
return false;
1051+
fi;
1052+
#
1053+
# The isomorphism class of an (indecomposable) projective
1054+
# module is uniquely determined by the top.
1055+
#
1056+
topM := DimensionVector( TopOfModule( M ) );
1057+
if Sum( topM ) > 1 then
1058+
return false;
1059+
fi;
1060+
1061+
return Position( topM, 1 );
10611062
end);
10621063

10631064
######################################################
@@ -1072,21 +1073,21 @@ InstallMethod( CompareWithIndecInjective,
10721073
[ IsPathAlgebraMatModule ],
10731074
function( M )
10741075

1075-
local A, injlist, i;
1076-
1077-
#first find the algebra of which M is a module
1078-
A := RightActingAlgebra(M);
1079-
1080-
injlist := IndecInjectiveModules(A);
1081-
1082-
for i in [1..Length(injlist)] do
1083-
if(DimensionVector(M) = DimensionVector(injlist[i])) then
1084-
return i;
1085-
fi;
1086-
od;
1087-
1088-
return false;
1089-
1076+
local socM;
1077+
1078+
if not IsInjectiveModule( M ) then
1079+
return false;
1080+
fi;
1081+
#
1082+
# Isomorphism class of an (indecomposable) injective module is
1083+
# uniquely determined by the socle.
1084+
#
1085+
socM := DimensionVector( SocleOfModule( M ) );
1086+
if Sum( socM ) > 1 then
1087+
return false;
1088+
fi;
1089+
1090+
return Position( socM, 1 );
10901091
end);
10911092

10921093
# other methods used, not directly connected to the topic
@@ -1245,4 +1246,4 @@ InstallMethod( DirectSumMinusSummands,
12451246
od;
12461247
projection := projections*rangeInclusions;
12471248
return [inclusion,projection];
1248-
end);
1249+
end);

0 commit comments

Comments
 (0)