Skip to content

Commit

Permalink
FIX: NaturalHomomorphismByIdeal (if variable is reduced away).
Browse files Browse the repository at this point in the history
  • Loading branch information
hulpke committed Feb 14, 2017
1 parent be981f7 commit 0e1b8e7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/groebner.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,9 @@ local ord,b,ind,num,c,corners,i,j,a,rem,bound,mon,n,monb,dim,sc,k,l,char,hom;
if j<>fail then
Add(l,GeneratorsOfLeftOperatorRing(a)[j]);
else
Add(l,Zero(a));
rem:=PolynomialReducedRemainder(i,b,ord);
rem:=Coefficients(monb,rem);
Add(l,GeneratorsOfLeftOperatorRing(a)*rem);
fi;
od;

Expand Down
9 changes: 9 additions & 0 deletions tst/testinstall/alghom.tst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ gap> f:= AlgebraWithOneHomomorphismByImages( A, B, [ C[2] ], [ m2 ] );
[ v.2, v.1+v.2 ] -> [ [ [ 0, 0 ], [ 0, 1 ] ], [ [ 1, 0 ], [ 0, 1 ] ] ]
gap> IsBijective( f );
true
gap> P := PolynomialRing(Rationals, ["x","y","z"]);;
gap> x:=P.1;;y:=P.2;;z:=P.3;;
gap> pols:=[ x^3-3*x-1, x^2+x*y+y^2-3, x+y+z ];;
gap> I := Ideal(P, pols);;
gap> pr := NaturalHomomorphismByIdeal(P, I);
[ x, y, z, 1 ] -> [ (-1)*(z)+(-1)*(y), (y), (z), (1) ]
gap> Image(pr,x);
(-1)*(z)+(-1)*(y)

gap> STOP_TEST( "alghom.tst", 660000);

#############################################################################
Expand Down

0 comments on commit 0e1b8e7

Please sign in to comment.