aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/fspace.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-05-25 05:29:46 +0000
committerdos-reis <gdr@axiomatics.org>2009-05-25 05:29:46 +0000
commit785f36fcc98e8cbbd206342a73b274bc361508d6 (patch)
tree2cb0c951f79e8fd7a3c77832b9c9098c608d8eb5 /src/algebra/fspace.spad.pamphlet
parent67eb28e8fcfd246d7f149c00bdd3089e2f606676 (diff)
downloadopen-axiom-785f36fcc98e8cbbd206342a73b274bc361508d6.tar.gz
Partial fix for AW/193 and AW/334.
* algebra/algfunc.spad.pamphlet: Remove OrderedSet requirements. * algebra/combfunc.spad.pamphlet: Likewise. * algebra/defintef.spad.pamphlet: Likewise. * algebra/defintrf.spad.pamphlet: Likewise. * algebra/degred.spad.pamphlet: Likewise. * algebra/efstruc.spad.pamphlet: Likewise. * algebra/elemntry.spad.pamphlet: Likewise. * algebra/expexpan.spad.pamphlet: Likewise. * algebra/expr.spad.pamphlet: Likewise. * algebra/expr2ups.spad.pamphlet: Likewise. * algebra/exprode.spad.pamphlet: Likewise. * algebra/fortran.spad.pamphlet: Likewise. * algebra/fr.spad.pamphlet: Likewise. * algebra/fraction.spad.pamphlet: Likewise. * algebra/fs2expxp.spad.pamphlet: Likewise. * algebra/fspace.spad.pamphlet: Likewise. * algebra/funcpkgs.spad.pamphlet: Likewise. * algebra/gaussian.spad.pamphlet: Likewise. * algebra/genups.spad.pamphlet: Likewise. * algebra/intalg.spad.pamphlet: Likewise. * algebra/intef.spad.pamphlet: Likewise. * algebra/integrat.spad.pamphlet: Likewise. * algebra/intpm.spad.pamphlet: Likewise. * algebra/irexpand.spad.pamphlet: Likewise. * algebra/kl.spad.pamphlet: Likewise. * algebra/laplace.spad.pamphlet: Likewise. * algebra/limitps.spad.pamphlet: Likewise. * algebra/liouv.spad.pamphlet: Likewise. * algebra/manip.spad.pamphlet: Likewise. * algebra/nlode.spad.pamphlet: Likewise. * algebra/odeef.spad.pamphlet: Likewise. * algebra/oderf.spad.pamphlet: Likewise. * algebra/openmath.spad.pamphlet: Likewise. * algebra/patmatch1.spad.pamphlet: Likewise. * algebra/patmatch2.spad.pamphlet: Likewise. * algebra/pfo.spad.pamphlet: Likewise. * algebra/polycat.spad.pamphlet: Likewise. * algebra/primelt.spad.pamphlet: Likewise. * algebra/rdeef.spad.pamphlet: Likewise. * algebra/rdesys.spad.pamphlet: Likewise. * algebra/rule.spad.pamphlet: Likewise. * algebra/solverad.spad.pamphlet: Likewise. * algebra/sum.spad.pamphlet: Likewise. * algebra/transsolve.spad.pamphlet: Likewise. * testsuite/interpreter/aw-193.input: New. * testsuite/interpreter/aw-334.input: Likewise.
Diffstat (limited to 'src/algebra/fspace.spad.pamphlet')
-rw-r--r--src/algebra/fspace.spad.pamphlet38
1 files changed, 18 insertions, 20 deletions
diff --git a/src/algebra/fspace.spad.pamphlet b/src/algebra/fspace.spad.pamphlet
index 6196c550..5618839b 100644
--- a/src/algebra/fspace.spad.pamphlet
+++ b/src/algebra/fspace.spad.pamphlet
@@ -25,7 +25,7 @@ ExpressionSpace(): Category == Defn where
OP ==> BasicOperator
SY ==> Symbol
- Defn ==> Join(OrderedSet, RetractableTo K,
+ Defn ==> Join(SetCategory, RetractableTo K,
InnerEvalable(K, %), Evalable %) with
elt : (OP, %) -> %
++ elt(op,x) or op(x) applies the unary operator op to x.
@@ -168,9 +168,8 @@ ExpressionSpace(): Category == Defn where
macro PAREN == '%paren
macro BOX == '%box
macro DUMMYVAR == '%dummyVar
- allKernels: % -> Set K
- listk : % -> List K
- allk : List % -> Set K
+ allKernels: % -> List K
+ allk : List % -> List K
unwrap : (List K, %) -> %
okkernel : (OP, List %) -> %
mkKerLists: List Equation % -> Record(lstk: List K, lstv:List %)
@@ -181,16 +180,15 @@ ExpressionSpace(): Category == Defn where
box(x:%) == box [x]
paren(x:%) == paren [x]
belong? op == op = oppren or op = opbox
- listk f == parts allKernels f
- tower f == sort_! listk f
- allk l == reduce("union", [allKernels f for f in l], {})
- operators f == [operator k for k in listk f]
+ tower f == sort! allKernels f
+ allk l == reduce("setUnion", [allKernels f for f in l], nil$List(K))
+ operators f == [operator k for k in allKernels f]
height f == reduce("max", [height k for k in kernels f], 0)
- freeOf?(x:%, s:SY) == not member?(s, [name k for k in listk x])
- distribute x == unwrap([k for k in listk x | is?(k, oppren)], x)
+ freeOf?(x:%, s:SY) == not member?(s, [name k for k in allKernels x])
+ distribute x == unwrap([k for k in allKernels x | is?(k, oppren)], x)
box(l:List %) == opbox l
paren(l:List %) == oppren l
- freeOf?(x:%, k:%) == not member?(retract k, listk x)
+ freeOf?(x:%, k:%) == not member?(retract k, allKernels x)
kernel(op:OP, arg:%) == kernel(op, [arg])
elt(op:OP, x:%) == op [x]
elt(op:OP, x:%, y:%) == op [x, y]
@@ -233,18 +231,18 @@ ExpressionSpace(): Category == Defn where
-- arguments of rootOf's, integrals, sums and products which appear only in
-- their first arguments
allKernels f ==
- s := brace(l := kernels f)
+ s := removeDuplicates(l := kernels f)
for k in l repeat
t :=
(u := property(operator k, DUMMYVAR)) case None =>
arg := argument k
- s0 := remove_!(retract(second arg)@K, allKernels first arg)
+ s0 := remove!(retract(second arg)@K, allKernels first arg)
arg := rest rest arg
n := (u::None) pretend N
if n > 1 then arg := rest arg
- union(s0, allk arg)
+ setUnion(s0, allk arg)
allk argument k
- s := union(s, t)
+ s := setUnion(s, t)
s
kernel(op:OP, args:List %) ==
@@ -286,8 +284,8 @@ ExpressionSpace(): Category == Defn where
distribute(x, y) ==
ky := retract y
- unwrap([k for k in listk x |
- is?(k, '%paren) and member?(ky, listk(k::%))], x)
+ unwrap([k for k in allKernels x |
+ is?(k, '%paren) and member?(ky, allKernels(k::%))], x)
-- in case of conflicting substitutions e.g. [x = a, x = b],
-- the first one prevails.
@@ -382,7 +380,7 @@ ExpressionSpaceFunctions2(E:ExpressionSpace, F:ExpressionSpace): with
++ A space of formal functions with arguments in an arbitrary
++ ordered set.
++ Keywords: operator, kernel, function.
-FunctionSpace(R:OrderedSet): Category == Definition where
+FunctionSpace(R: SetCategory): Category == Definition where
OP ==> BasicOperator
O ==> OutputForm
SY ==> Symbol
@@ -622,7 +620,7 @@ FunctionSpace(R:OrderedSet): Category == Definition where
elt(op:OP, args:List %) ==
unary? op and ((od? := has?(op, ODD)) or has?(op, EVEN)) and
- leadingCoefficient(numer first args) < 0 =>
+ before?(leadingCoefficient(numer first args),0) =>
x := op(- first args)
od? => -x
x
@@ -1029,7 +1027,7 @@ FunctionSpace(R:OrderedSet): Category == Definition where
++ This package allows a mapping R -> S to be lifted to a mapping
++ from a function space over R to a function space over S;
FunctionSpaceFunctions2(R, A, S, B): Exports == Implementation where
- R, S: Join(Ring, OrderedSet)
+ R, S: Ring
A : FunctionSpace R
B : FunctionSpace S