aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/divisor.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/divisor.spad.pamphlet')
-rw-r--r--src/algebra/divisor.spad.pamphlet8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/algebra/divisor.spad.pamphlet b/src/algebra/divisor.spad.pamphlet
index 98bc97e6..4dc651e8 100644
--- a/src/algebra/divisor.spad.pamphlet
+++ b/src/algebra/divisor.spad.pamphlet
@@ -139,7 +139,7 @@ FractionalIdeal(R, F, UP, A): Exports == Implementation where
intIdeal(coefficients(poly i1 * poly i2), denom i1 * denom i2)
i:$ ** m:Integer ==
- m < 0 => inv(i) ** (-m)
+ negative? m => inv(i) ** (-m)
n := m::NonNegativeInteger
v := numer i
intIdeal([qelt(v, j) ** n for j in minIndex v .. maxIndex v],
@@ -698,7 +698,7 @@ HyperellipticFiniteDivisor(F, UP, UPUP, R): Exports == Implementation where
-- if is cheaper to keep on reducing as we exponentiate if d is already reduced
n:Z * d:% ==
zero? n => 0
- n < 0 => (-n) * (-d)
+ negative? n => (-n) * (-d)
divisor(d.principalPart ** n) + divisor(mkIdeal(d.center,d.polyPart) ** n)
divisor(i:ID) ==
@@ -876,10 +876,10 @@ FiniteDivisor(F, UP, UPUP, R): Exports == Implementation where
((n exquo rank()) case "failed") =>
error "divisor: point is singular"
m:N :=
- n < 0 => (-n)::N
+ negative? n => (-n)::N
n::N
g := makeDivisor(d**m,(monomial(1,1)$UPUP - b::UP::RF::UPUP)**m,1)
- n < 0 => -g
+ negative? n => -g
g
reduce d ==