Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/algebra.gi
Original file line number Diff line number Diff line change
Expand Up @@ -3599,7 +3599,7 @@ InstallMethod( CentralIdempotentsOfAlgebra,
g:= GcdRepresentation( p, facs[j] );
gcd:= g[1]*p+g[2]*facs[j];
qq:= g[1]*(cf[j]-c)/gcd;
if qq<>0*qq then
if not IsZero( qq ) then
c:= p*EuclideanRemainder( qq, facs[j] )
+ c;
fi;
Expand Down
8 changes: 4 additions & 4 deletions lib/alglie.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2964,12 +2964,12 @@ InstallMethod( RootSystem,
local s,t,rt;
s:=0; t:=0;
rt:=a-b;
while (rt in R) or (rt=0*R[1]) do
while (rt in R) or IsZero( rt ) do
rt:=rt-b;
s:=s+1;
od;
rt:=a+b;
while (rt in R) or (rt=0*R[1]) do
while (rt in R) or IsZero( rt ) do
rt:=rt+b;
t:=t+1;
od;
Expand Down Expand Up @@ -4399,7 +4399,7 @@ local ReductionModuloTable, #
n:= Length( r );

for i in [1..n-1] do
if r[i][2]=0*r[i][2] or
if IsZero( r[i][2] ) or
(Length(r[i][1])>1 and r[i][1][1]=r[i][1][2]) then

#the thing is zero; get rid of it.
Expand All @@ -4413,7 +4413,7 @@ local ReductionModuloTable, #
Unbind(r[i]);
fi;
od;
if r[n][2]=0*r[n][2] or
if IsZero( r[n][2] ) or
(Length(r[n][1])>1 and r[n][1][1]=r[n][1][2]) then

#the thing is zero; get rid of it.
Expand Down
4 changes: 2 additions & 2 deletions lib/algliess.gi
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ BindGlobal( "SimpleLieAlgebraTypeA_G", function( type, n, F )
# We take care of the commutation relations of the form
# [h_j,x_{\beta_i}]= < \beta_i, \alpha_j > x_{\beta_i}.
cc:= LinearCombination( R[i], C[j] );
if cc <> 0*cc then
if not IsZero( cc ) then

posR[i][j]:= One(F)*cc;

Expand Down Expand Up @@ -593,7 +593,7 @@ BindGlobal( "SimpleLieAlgebraTypeA_G", function( type, n, F )
cc:= d*cc;
fi;

if cc <> 0*cc then
if not IsZero( cc ) then

posR[i][j]:= One(F)*cc;

Expand Down
14 changes: 7 additions & 7 deletions lib/algrep.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1852,7 +1852,7 @@ InstallMethod( ConvertToNormalFormMonomialElement,

is_replaced:= false;
for j in [1..Length(cf)] do
if cf[j] <> 0*cf[j] then
if not IsZero( cf[j] ) then
if not is_replaced then
tt1:= ShallowCopy( tt );
tt1[i]:= bases[i][j];
Expand Down Expand Up @@ -1885,7 +1885,7 @@ InstallMethod( ConvertToNormalFormMonomialElement,
for i in [1..Length(tensors)] do
if len > 0 and tensors[i] = res[len-1] then
res[len]:= res[len]+cfts[i];
if res[len] = 0*res[len] then
if IsZero( res[len] ) then
Unbind( res[len-1] );
Unbind( res[len] );
len:= len-2;
Expand Down Expand Up @@ -2233,7 +2233,7 @@ InstallMethod( ConvertToNormalFormMonomialElement,

is_replaced:= false;
for j in [1..Length(cf)] do
if cf[j] <> 0*cf[j] then
if not IsZero( cf[j] ) then
if not is_replaced then
tt1:= ShallowCopy( tt );
tt1[i]:= basis[j];
Expand Down Expand Up @@ -2297,7 +2297,7 @@ InstallMethod( ConvertToNormalFormMonomialElement,

if len > 0 and tensors[i] = res[len-1] then
res[len]:= res[len]+cfts[i];
if res[len] = 0*res[len] then
if IsZero( res[len] ) then
Unbind( res[len-1] );
Unbind( res[len] );
len:= len-2;
Expand Down Expand Up @@ -2567,7 +2567,7 @@ InstallMethod( ConvertToNormalFormMonomialElement,

is_replaced:= false;
for j in [1..Length(cf)] do
if cf[j] <> 0*cf[j] then
if not IsZero( cf[j] ) then
if not is_replaced then
tt1:= ShallowCopy( tt );
tt1[i]:= basis[j];
Expand Down Expand Up @@ -2621,7 +2621,7 @@ InstallMethod( ConvertToNormalFormMonomialElement,
wed:= tensors[i];
if len > 0 and wed = res[len-1] then
res[len]:= res[len]+cfts[i];
if res[len] = 0*res[len] then
if IsZero( res[len] ) then
Unbind( res[len-1] );
Unbind( res[len] );
len:= len-2;
Expand Down Expand Up @@ -3376,7 +3376,7 @@ InstallHandlingByNiceBasis( "IsDirectSumElementsSpace", rec(
cf:= Coefficients( Basis(
FamilyObj(v)!.constituentModules[i] ), ev[i] );
for k in [1..Length(cf)] do
if cf[k] <> 0*cf[k] then
if not IsZero( cf[k] ) then
Add( vec, num+k );
Add( vec, cf[k] );
fi;
Expand Down
2 changes: 1 addition & 1 deletion lib/autsr.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,7 @@ local
D:=List(D,d->List([1..Length(ocr.generators)],i->ocr.generators[i]^-1*d[i]));
D:=List(D,d->ocr.listToCocycle(d));
TriangulizeMat(D);
D:=Filtered(D,x->x<>0*x);
D:=Filtered(D,x->not IsZero( x ));

b:=BaseSteinitzVectors(b,D).factorspace;

Expand Down
4 changes: 2 additions & 2 deletions lib/ctblgrp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1006,13 +1006,13 @@ BindGlobal( "SplitTwoSpace", function(D,raum)
for root in SquareRoots(D.field,(p/2)^2-q) do
a1:=(-p/2+root);
n:=v1v2+a1*v2v2;
if (n=0*o) then
if IsZero( n ) then
# proceeding would force a division by zero
NotFailed:=false;
else
a2:=-(v1v1+a1*v2v1)/n;
n:=v1v1+a2*(v1v2+v2v1)+a2^2*v2v2;
if n<>0*o then
if not IsZero( n ) then
deg2:=List(SquareRoots(D.field,o/(raum.dim-d)/n),Int);
for d2 in deg2 do
if d2 in mdeg2 then
Expand Down
2 changes: 1 addition & 1 deletion lib/fieldfin.gi
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ InstallMethod( NormalBase,
[ IsField and IsFinite, IsScalar ],
function(F, b)
local q, d, z, l, bas, i;
if b=0*b then
if IsZero( b ) then
b := One(F);
fi;
q := Size(LeftActingDomain(F));
Expand Down
2 changes: 1 addition & 1 deletion lib/grppcaut.gi
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ BindGlobal( "CocycleSQ", function( epi, field )
od;

# check
if c = 0 * c then return 0; fi;
if IsZero( c ) then return 0; fi;
return c;
end );

Expand Down
2 changes: 1 addition & 1 deletion lib/grppccom.gi
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ local z,K,N,zett,SN,B,L,tau,gens,imgs,A,T,heads,dim,s,v,j,i,root;
od;
while j <= dim and heads[j] <> 0 do
z:=v[j] / B[heads[j]][j];
if z <> 0*z then
if not IsZero( z ) then
s:=s / A[heads[j]] ^ ocr.logTable[LogFFE(z,root)+1];
fi;
v:=v - v[j] / B[heads[j]][j] * B[heads[j]];
Expand Down
32 changes: 16 additions & 16 deletions lib/lierep.gi
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ InstallMethod( \+,
i:= i+1;
fi;
od;
list:= Filtered( list, x -> x[2]<>0*x[2] );
list:= Filtered( list, x -> not IsZero( x[2] ) );
l[k]:= list;
fi;
od;
Expand Down Expand Up @@ -433,7 +433,7 @@ InstallHandlingByNiceBasis( "IsCochainsSpace", rec(
while j <> Length( vec ) do
l[k]:= [ ];
for i in [j+1..j+Length(tt)] do
if vec[i] <> 0*vec[i] then
if not IsZero( vec[i] ) then
Add( l[k], [ tt[i-j], vec[i] ] );
fi;
od;
Expand Down Expand Up @@ -494,7 +494,7 @@ InstallGlobalFunction( ValueCochain,
cfs1:= [ ];
for i in [1..Length(cfs)] do
for j in [1..Length(cfs[i][k])] do
if cfs[i][k][j] <> 0*cfs[i][k][j] then
if not IsZero( cfs[i][k][j] ) then
cf:= ShallowCopy( cfs[i] );
cf[k] := [ cf[k][j], j ];
Add( cfs1, cf );
Expand Down Expand Up @@ -603,7 +603,7 @@ InstallGlobalFunction( LieCoboundaryOperator,

cfs:= Coefficients( Basis(V), val );
for k in [1..Length(cfs)] do
if cfs[k] <> 0*cfs[k] then
if not IsZero( cfs[k] ) then
Add( list[k], [ t, cfs[k] ] );
fi;
od;
Expand Down Expand Up @@ -873,7 +873,7 @@ BindGlobal( "NextIterator_WeylOrbit", function( it )
if it!.status = 1 then
it!.status:= 2;
mu:= it!.currentWeight;
if mu = 0*mu then
if IsZero( mu ) then
it!.isDone:= true;
fi;
return mu;
Expand Down Expand Up @@ -1642,7 +1642,7 @@ InstallGlobalFunction( CollectUEALatticeElement,
od;
Append( res, WriteAsLCOfBinoms( vars, q ) );
for k in [2,4..Length(res)] do
if res[k] = 0*res[k] then
if IsZero( res[k] ) then
Unbind( res[k-1] ); Unbind( res[k] );
fi;
od;
Expand Down Expand Up @@ -2194,7 +2194,7 @@ InstallMethod( \*,
for i in [1..Length( mons )] do
if len > 0 and lst[len-1] = mons[i] then
lst[len]:= lst[len]+cfs[i];
if lst[len] = 0*lst[len] then
if IsZero( lst[len] ) then
Remove( lst, len-1 );
Remove( lst, len-1 );
len:= len-2;
Expand Down Expand Up @@ -2673,7 +2673,7 @@ InstallGlobalFunction( LeftReduceUEALatticeElement,
rem:= p;
res:= 0*p;

while rem <> 0*rem do
while not IsZero( rem ) do

m1:= LeadingUEALatticeMonomial( novar, rem );
k:= 1;
Expand Down Expand Up @@ -2806,7 +2806,7 @@ InstallMethod(\+,
lu:= lu0;
else
cf:= lu[2*p]+lv[k+1];
if cf = 0*cf then
if IsZero( cf ) then
Remove( lu, 2*p-1 );
Remove( lu, 2*p-1 );
Remove( vecs, p );
Expand Down Expand Up @@ -2980,14 +2980,14 @@ InstallOtherMethod(\^,
for k in [j,j+2..len] do
cf:= cf*Binomial( hw[ em[i][k]-2*n ], em[i][k+1] );
od;
if cf <> 0*cf then
if not IsZero( cf ) then
mon:= em[i]{[1..j-1]};
pos:= Position( er, mon );
if pos = fail then
Add( er, mon ); Add( er, cf );
else
er[pos+1]:= er[pos+1]+cf;
if er[pos+1] = 0*er[pos+1] then
if IsZero( er[pos+1] ) then
Remove( er, pos );
Remove( er, pos );
fi;
Expand All @@ -3002,7 +3002,7 @@ InstallOtherMethod(\^,
Add( er, mon ); Add( er, cf );
else
er[pos+1]:= er[pos+1]+cf;
if er[pos+1] = 0*er[pos+1] then
if IsZero( er[pos+1] ) then
Remove( er, pos );
Remove( er, pos );
fi;
Expand Down Expand Up @@ -3296,7 +3296,7 @@ InstallMethod( HighestWeightModule,
# divide by their greatest common divisor.

res:= LeftReduceUEALatticeElement( novar, G, lms, lmtab, p );
if res <> 0*res then
if not IsZero( res ) then
cf:= res![1]{[2,4..Length(res![1])]};
res:= (Lcm(List(cf,DenominatorRat))/
Gcd(List(cf,NumeratorRat)))*res;
Expand Down Expand Up @@ -3640,7 +3640,7 @@ InstallMethod( HighestWeightModule,
LeadingUEALatticeMonomial(novar,fac1)[3]*fac2;
comp:= NormalizedLeftReduction( novar, GB, lms, lmtab,
comp );
if comp <> 0*comp then
if not IsZero( comp ) then

vec:= ListWithIdenticalEntries( Length( sortmn[pp] ),
0 );
Expand Down Expand Up @@ -3684,7 +3684,7 @@ InstallMethod( HighestWeightModule,
ecomp:= [ ];
cfsc:= [ ];
for i in [1..Length(vecs[l])] do
if vecs[l][i] <> 0*vecs[l][i] then
if not IsZero( vecs[l][i] ) then

Add( ecomp, sortmn[j][i] );
Add( cfsc, vecs[l][i] );
Expand Down Expand Up @@ -3995,7 +3995,7 @@ InstallGlobalFunction( ExtendRepresentation,
for s in [1..Length(cij[1])] do
M:= M - cij[2][s]*mm[cij[1][s]];
od;
if M <> 0*M then return false; fi;
if not IsZero( M ) then return false; fi;
od;
od;
return true;
Expand Down
4 changes: 2 additions & 2 deletions lib/matrix.gi
Original file line number Diff line number Diff line change
Expand Up @@ -3792,7 +3792,7 @@ InstallGlobalFunction( BasisNullspaceModN, function( M, n )
# nullM is also the nullspace for M

nullM := null*snf.rowtrans mod n;
Assert (1, ForAll (nullM, v -> v*M mod n =0*M[1]));
Assert (1, ForAll (nullM, v -> IsZero( v*M mod n )));
return nullM;
end);

Expand Down Expand Up @@ -4506,7 +4506,7 @@ function( mat )
w:= GcdRepresentation( g, Derivative( g ) )[2];
w:= w*g;
B:= ShallowCopy( mat );
while Value( g, B ) <> 0*B do
while not IsZero( Value( g, B ) ) do
B:= B - Value( w, B );
od;

Expand Down
2 changes: 1 addition & 1 deletion lib/meatauto.gi
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ local nv, nw, F, zero, minusone, zeroW, gV, gW, k, U, echu, r, homs, s, work, an
Add(hom, image);
od;
hom:=ImmutableMatrix(F,hom);
Assert(1,hom<>0*hom);
Assert(1,not IsZero( hom ));
Add(newhoms, hom);
od;

Expand Down
2 changes: 1 addition & 1 deletion lib/polyrat.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2029,7 +2029,7 @@ local x,xd,er,i,j,k,m,p,sel,xi,gamma,G,g,loop,zero,add;
if k>xi/2 then
k:=k - xi; #symmetric rep
fi;
if k<>0*k then
if not IsZero( k ) then
Add(g,gamma[j-1]);
Add(g,k);
fi;
Expand Down
Loading