From 5c9737d7578d48b40aabf5a4f08c7a3de607a92d Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 3 Jan 2018 04:02:10 +0100 Subject: [PATCH] Fix forming trivial quotients of algebra modules --- lib/algrep.gi | 9 +++++++++ tst/testinstall/algrep.tst | 15 +++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/lib/algrep.gi b/lib/algrep.gi index 3ef1c1f2a3b..6a197df6152 100644 --- a/lib/algrep.gi +++ b/lib/algrep.gi @@ -1194,6 +1194,15 @@ InstallMethod( NaturalHomomorphismBySubAlgebraModule, f:= NaturalHomomorphismBySubspace( V, W ); quot:= ImagesSource( f ); + if IsTrivial(quot) then + quot := SubAlgebraModule( V, [], "basis" ); + nathom := ZeroMapping( V, quot ); + SetIsSurjective( nathom, true ); + SetImagesSource(nathom, quot); + SetKernelOfAdditiveGeneralMapping( nathom, W ); + return nathom; + fi; + imgs:= List( Basis( V ), x -> Coefficients( Basis( quot ), ImagesRepresentative(f,x))); diff --git a/tst/testinstall/algrep.tst b/tst/testinstall/algrep.tst index 3535237179f..4ebe420b988 100644 --- a/tst/testinstall/algrep.tst +++ b/tst/testinstall/algrep.tst @@ -55,6 +55,21 @@ gap> S1:=SubAlgebraModule(S,bas,"basis"); <16-dimensional left-module over > # +# factors +# +gap> S0/S0; +<0-dimensional left-module over > +gap> S1/S0; +<16-dimensional left-module over > +gap> S1/S1; +<0-dimensional left-module over > +gap> S/S0; +<35-dimensional left-module over > +gap> S/S1; +<19-dimensional left-module over > +gap> S/S; +<0-dimensional left-module over > + # # cocycles etc. #