aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/combfunc.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/combfunc.spad.pamphlet')
-rw-r--r--src/algebra/combfunc.spad.pamphlet21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/algebra/combfunc.spad.pamphlet b/src/algebra/combfunc.spad.pamphlet
index 979b6fa2..fdf4405d 100644
--- a/src/algebra/combfunc.spad.pamphlet
+++ b/src/algebra/combfunc.spad.pamphlet
@@ -422,8 +422,7 @@ dummy variable is introduced to make the indexing variable \lq local\rq.
iprod l ==
zero? first l => 0
--- one? first l => 1
- (first l = 1) => 1
+ one? first l => 1
kernel(opprod, l)
isum l ==
@@ -441,15 +440,13 @@ dummy variable is introduced to make the indexing variable \lq local\rq.
first(l) * (fourth rest l - fourth l + 1)
ifact x ==
--- zero? x or one? x => 1
- zero? x or (x = 1) => 1
+ zero? x or one? x => 1
kernel(opfact, x)
ibinom l ==
n := first l
((p := second l) = 0) or (p = n) => 1
--- one? p or (p = n - 1) => n
- (p = 1) or (p = n - 1) => n
+ one? p or (p = n - 1) => n
kernel(opbinom, l)
iperm l ==
@@ -499,14 +496,11 @@ dummy variable is introduced to make the indexing variable \lq local\rq.
zero?(x := first l) =>
zero? second l => error "0 ** 0"
0
--- one? x or zero?(n := second l) => 1
- (x = 1) or zero?(n: F := second l) => 1
--- one? n => x
- (n = 1) => x
+ one? x or zero?(n := second l) => 1
+ one? n => x
(u := isExpt(x, OPEXP)) case "failed" => kernel(oppow, l)
rec := u::Record(var: K, exponent: Z)
--- one?(y := first argument(rec.var)) or y = -1 =>
- ((y := first argument(rec.var))=1) or y = -1 =>
+ one?(y := first argument(rec.var)) or y = -1 =>
(operator(rec.var)) (rec.exponent * y * n)
kernel(oppow, l)
@@ -716,8 +710,7 @@ FunctionalSpecialFunction(R, F): Exports == Implementation where
-- Could put more unconditional special rules for other functions here
iGamma x ==
--- one? x => x
- (x = 1) => x
+ one? x => x
kernel(opGamma, x)
iabs x ==