Skip to content

Commit 0c7bcbc

Browse files
RingMapOntoRewrittenResidueClassRing avoids creating a new ring if not necessary
1 parent 0818f01 commit 0c7bcbc

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

MatricesForHomalg/PackageInfo.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PackageName := "MatricesForHomalg",
55
Subtitle := "Matrices for the homalg project",
66

77
Version := Maximum( [
8-
"2019.02.10", ## Mohamed's version
8+
"2019.02.13", ## Mohamed's version
99
## this line prevents merge conflicts
1010
"2019.02.11", ## Fabian's version
1111
## this line prevents merge conflicts

MatricesForHomalg/gap/Tools.gi

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7269,9 +7269,13 @@ InstallMethod( RingMapOntoRewrittenResidueClassRing,
72697269

72707270
zero_rows := ZeroRows( matrix - images );
72717271

7272-
indets := indets{zero_rows};
7273-
7274-
S := k * List( indets, String );
7272+
if Length( indets ) = Length( zero_rows ) and
7273+
IsIdenticalObj( k, CoefficientsRing( A ) ) then
7274+
S := A;
7275+
else
7276+
indets := indets{zero_rows};
7277+
S := k * List( indets, String );
7278+
fi;
72757279

72767280
if not zero_rows = [ ] then
72777281
map := RingMap( indets, S, R );

0 commit comments

Comments
 (0)