aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/ddfact.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/ddfact.spad.pamphlet')
-rw-r--r--src/algebra/ddfact.spad.pamphlet9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/algebra/ddfact.spad.pamphlet b/src/algebra/ddfact.spad.pamphlet
index 2fbc0ca5..80e8b3fd 100644
--- a/src/algebra/ddfact.spad.pamphlet
+++ b/src/algebra/ddfact.spad.pamphlet
@@ -101,12 +101,12 @@ DistinctDegreeFactorize(F,FP): C == T
factlist : List(ParFact) :=empty()
llf : List FFE
fln :List(FP) := empty()
- if (lcm:=leadingCoefficient m)~=1 then m:=(inv lcm)*m
+ if not one?(lcm:=leadingCoefficient m) then m:=(inv lcm)*m
llf:= factorList(squareFree(m))
for lf in llf repeat
d1:= lf.xpnt
pol := lf.fctr
- if (lcp:=leadingCoefficient pol)~=1 then pol := (inv lcp)*pol
+ if not one?(lcp:=leadingCoefficient pol) then pol := (inv lcp)*pol
degree pol=1 => factlist:=cons([pol,d1]$ParFact,factlist)
fln := appl(pol)
factlist :=append([[pf,d1]$ParFact for pf in fln],factlist)
@@ -159,7 +159,8 @@ DistinctDegreeFactorize(F,FP): C == T
g := gcd(v-mon,u)
dg := degree g
dg =0 => "next k1"
- if leadingCoefficient g ~=1 then g := (inv leadingCoefficient g)*g
+ if not one? leadingCoefficient g then
+ g := (inv leadingCoefficient g)*g
ddfact := cons([k1,g]$fact,ddfact)
testirr => return ddfact
u := u quo g
@@ -222,7 +223,7 @@ DistinctDegreeFactorize(F,FP): C == T
fln : List(FP) :=empty()
--make m monic
- if (lcm := leadingCoefficient m) ~=1 then m := (inv lcm)*m
+ if not one?(lcm := leadingCoefficient m) then m := (inv lcm)*m
--is x**d factor of m?
if positive?(d := minimumDegree m) then