diff options
author | Gabriel Dos Reis <gdr@axiomatics.org> | 2016-01-17 22:53:01 -0800 |
---|---|---|
committer | Gabriel Dos Reis <gdr@axiomatics.org> | 2016-01-17 22:53:01 -0800 |
commit | d07fc9735f40e545edda456e15dbab783c500f6a (patch) | |
tree | 4d9fab82a7085b73a4b00d23389935503fdfc90d /src/algebra/ore.spad.pamphlet | |
parent | 5437d438937eb25eb320fef6e4fd6ebc91ca6dc9 (diff) | |
download | open-axiom-d07fc9735f40e545edda456e15dbab783c500f6a.tar.gz |
subtractIfCan$CancellationAbelianMonoid: return the more principled Maybe %
Diffstat (limited to 'src/algebra/ore.spad.pamphlet')
-rw-r--r-- | src/algebra/ore.spad.pamphlet | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/algebra/ore.spad.pamphlet b/src/algebra/ore.spad.pamphlet index 3aaeab04..1167ea57 100644 --- a/src/algebra/ore.spad.pamphlet +++ b/src/algebra/ore.spad.pamphlet @@ -400,7 +400,7 @@ UnivariateSkewPolynomialCategoryOps(R, C): Exports == Implementation where termPoly(a, n, y, sigma, delta) == zero? y => 0 - (u := subtractIfCan(n, 1)) case "failed" => a * y + (u := subtractIfCan(n, 1)) case nothing => a * y n1 := u::N z:C := 0 while y ~= 0 repeat @@ -424,7 +424,7 @@ UnivariateSkewPolynomialCategoryOps(R, C): Exports == Implementation where localLeftDivide(a, b, sigma, b1) == zero? b => error "leftDivide: division by 0" zero? a or - (n := subtractIfCan(degree(a),(m := degree b))) case "failed" => + (n := subtractIfCan(degree(a),(m := degree b))) case nothing => [0,a] q := monomial((sigma**(-m))(b1 * leadingCoefficient a), n::N) qr := localLeftDivide(a - b * q, b, sigma, b1) @@ -435,7 +435,7 @@ UnivariateSkewPolynomialCategoryOps(R, C): Exports == Implementation where localRightDivide(a, b, sigma, b1) == zero? b => error "rightDivide: division by 0" zero? a or - (n := subtractIfCan(degree(a),(m := degree b))) case "failed" => + (n := subtractIfCan(degree(a),(m := degree b))) case nothing => [0,a] q := monomial(leadingCoefficient(a) * (sigma**n) b1, n::N) qr := localRightDivide(a - q * b, b, sigma, b1) |