If nobody complains, I'd like to commit the patch below as soon as possible.
Of course, this would be a good opportunity to check all other domains using
grep "== *[[:alnum:]].*add" *.pamphlet
There are not that many.
Martin
Index: algebra/ore.spad.pamphlet
===================================================================
--- algebra/ore.spad.pamphlet (revision 345)
+++ algebra/ore.spad.pamphlet (working copy)
@@ -475,6 +475,19 @@
++ outputForm(p, x) returns the output form of p using x for the
++ otherwise anonymous variable.
== SparseUnivariatePolynomial R add
+@
+
+We have to define \spadfun{**} and \verb|^|, because otherwise they would be
+taken from \spadtype{SUP R}, where the default implementation given in
+\spadtype{Monoid} is overridden. It is sufficient to do so for second
argument
+of type \spadtype{PositiveInteger}, since for $n=0$ the definitions agree.
+There might be a faster definition, of course.
+
+<<domain ORESUP SparseUnivariateSkewPolynomial>>=
+ import RepeatedSquaring(%)
+ _^(x:%, n:PositiveInteger):% == x ** n
+ x:% ** n:PositiveInteger == expt(x,n)
+
import UnivariateSkewPolynomialCategoryOps(R, %)
x:% * y:% == times(x, y, sigma, delta)
Index: input/bugs2008.input.pamphlet
===================================================================
--- input/bugs2008.input.pamphlet (revision 345)
+++ input/bugs2008.input.pamphlet (working copy)
@@ -80,6 +80,19 @@
testEquals("integrate(log(sqrt(1-x^2)/x)/(x^2), x)", "(-log(sqrt(1-x^2)/x)
-x*log(x+1)/2 + x*log(x-1)/2 + 1)/x")
+testcase "Skew exponentiation (issue #431)"
+Dx: LODO(EXPR INT, f+->D(f,x)) := D()
+u := operator 'u
+L := Dx + u(x)
+testEquals("L**2", "L*L")
+testEquals("L^3", "L*L*L")
+
+f: INT->INT:=x+->x+1
+K := OREUP(x, INT, 1, f)
+M := x::K+1
+testEquals("M**2", "M*M")
+testEquals("M^3", "M*M*M")
+
)set output algebra on
statistics()
@
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---