diff options
Diffstat (limited to 'src/algebra')
-rw-r--r-- | src/algebra/algfunc.spad.pamphlet | 10 | ||||
-rw-r--r-- | src/algebra/color.spad.pamphlet | 2 | ||||
-rw-r--r-- | src/algebra/fspace.spad.pamphlet | 6 |
3 files changed, 11 insertions, 7 deletions
diff --git a/src/algebra/algfunc.spad.pamphlet b/src/algebra/algfunc.spad.pamphlet index 3bd69cdc..7925927f 100644 --- a/src/algebra/algfunc.spad.pamphlet +++ b/src/algebra/algfunc.spad.pamphlet @@ -446,11 +446,13 @@ AlgebraicFunction(R, F): Exports == Implementation where -- one?(x := first l) or one? n => x ((x := first l) = 1) or (n = 1) => x (r := retractIfCan(x)@Union(R,"failed")) case R => iroot(r::R,n) - (u := isExpt(x, oproot)) case Record(var:K, exponent:Z) => + (u := isExpt(x)) case Record(var:K, exponent:Z) => pr := u::Record(var:K, exponent:Z) - (first argument(pr.var)) ** - (pr.exponent /$Fraction(Z) - (n * retract(second argument(pr.var))@Z)) + is?(pr.var,oproot) and #argument(pr.var) = 2 => + (first argument(pr.var)) ** + (pr.exponent /$Fraction(Z) + (n * retract(second argument(pr.var))@Z)) + inroot0(x, n, false, false) inroot0(x, n, false, false) -- removes powers of positive integers from numer and denom diff --git a/src/algebra/color.spad.pamphlet b/src/algebra/color.spad.pamphlet index 54c5e403..a8a0e329 100644 --- a/src/algebra/color.spad.pamphlet +++ b/src/algebra/color.spad.pamphlet @@ -195,7 +195,7 @@ Palette(): Exports == Implementation where light c == [5,c] hue p == p.hueField shade p == p.shadeField - sample() == bright(sample()) + -- sample() == bright(sample()) coerce(c:Color):% == bright c coerce(p:%):OutputForm == hconcat ["[",coerce(p.hueField),"] from the ",SHADE.(p.shadeField)," palette"] diff --git a/src/algebra/fspace.spad.pamphlet b/src/algebra/fspace.spad.pamphlet index b5c57214..b7e0fcc5 100644 --- a/src/algebra/fspace.spad.pamphlet +++ b/src/algebra/fspace.spad.pamphlet @@ -830,12 +830,14 @@ FunctionSpace(R:OrderedSet): Category == Definition where isExpt(x:%, op:OP) == (u := isExpt x) case "failed" => "failed" - is?((u::Record(var:K, exponent:Z)).var, op) => u + v := (u::Record(var:K, exponent:Z)).var + is?(v,op) and #argument(v) = 1 => u "failed" isExpt(x:%, sy:SY) == (u := isExpt x) case "failed" => "failed" - is?((u::Record(var:K, exponent:Z)).var, sy) => u + v := (u::Record(var:K, exponent:Z)).var + is?(v, sy) and #argument(v) = 1 => u "failed" if R has RetractableTo Z then |