aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/polycat.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/polycat.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/polycat.spad.pamphlet')
-rw-r--r--src/algebra/polycat.spad.pamphlet36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/algebra/polycat.spad.pamphlet b/src/algebra/polycat.spad.pamphlet
index 0847febd..60e29ed0 100644
--- a/src/algebra/polycat.spad.pamphlet
+++ b/src/algebra/polycat.spad.pamphlet
@@ -290,7 +290,6 @@ PolynomialCategory(R:Ring, E:OrderedAbelianMonoidSup, VarSet:OrderedSet):
++ primitiveMonomials(p) gives the list of monomials of the
++ polynomial p with their coefficients removed.
++ Note: \spad{primitiveMonomials(sum(a_(i) X^(i))) = [X^(1),...,X^(n)]}.
- if R has OrderedSet then OrderedSet
-- OrderedRing view removed to allow EXPR to define abs
--if R has OrderedRing then OrderedRing
if (R has ConvertibleTo InputForm) and
@@ -573,23 +572,24 @@ PolynomialCategory(R:Ring, E:OrderedAbelianMonoidSup, VarSet:OrderedSet):
unitNormal((p exquo content p) ::%).canonical
primitivePart(p,v) ==
unitNormal((p exquo content(p,v)) ::%).canonical
- if R has OrderedSet then
- p:% < q:% ==
- (dp:= degree p) < (dq := degree q) => (leadingCoefficient q) > 0
- dq < dp => (leadingCoefficient p) < 0
- leadingCoefficient(p - q) < 0
- if (R has PatternMatchable Integer) and
- (VarSet has PatternMatchable Integer) then
- patternMatch(p:%, pat:Pattern Integer,
- l:PatternMatchResult(Integer, %)) ==
- patternMatch(p, pat,
- l)$PatternMatchPolynomialCategory(Integer,E,VarSet,R,%)
- if (R has PatternMatchable Float) and
- (VarSet has PatternMatchable Float) then
- patternMatch(p:%, pat:Pattern Float,
- l:PatternMatchResult(Float, %)) ==
- patternMatch(p, pat,
- l)$PatternMatchPolynomialCategory(Float,E,VarSet,R,%)
+
+ before?(p:%, q:%) ==
+ (dp:= degree p) < (dq := degree q) => before?(0, leadingCoefficient q)
+ dq < dp => before?(leadingCoefficient p,0)
+ before?(leadingCoefficient(p - q),0)
+
+ if (R has PatternMatchable Integer) and
+ (VarSet has PatternMatchable Integer) then
+ patternMatch(p:%, pat:Pattern Integer,
+ l:PatternMatchResult(Integer, %)) ==
+ patternMatch(p, pat,
+ l)$PatternMatchPolynomialCategory(Integer,E,VarSet,R,%)
+ if (R has PatternMatchable Float) and
+ (VarSet has PatternMatchable Float) then
+ patternMatch(p:%, pat:Pattern Float,
+ l:PatternMatchResult(Float, %)) ==
+ patternMatch(p, pat,
+ l)$PatternMatchPolynomialCategory(Float,E,VarSet,R,%)
if (R has ConvertibleTo Pattern Integer) and
(VarSet has ConvertibleTo Pattern Integer) then