On Wednesday, 8 September 2021 at 07:30:21 UTC-7 Simon King wrote:

>
> As I said, differentiation is not supposed to work. But I (as original 
> author) don't fully understand *why* it sometimes works and how to fix 
> that (by "fix", I mean "make it not work and, in the best case, suggest 
> to convert to a symbolic expression"). 
>
> InfinitePolynomialRing was created for a very narrow purpose, namely 
> computing symmetric Gröbner bases. In particular, calculus was not in 
> the scope. If someone wants to extend its functionality, I wouldn't 
> mind though. 
>
> Hm, I wouldn't say derivatives of polynomials are "calculus". 
Differentiation is perfectly valid formal algebraic operation with 
well-studied properties and many applications in algebraic settings that 
are not covered by "calculus". That doesn't change that the original 
designer of InfinitePolynomialRing didn't put it in the scope, but I think 
we can be a little more enthusiastic about potential attempts at remedying 
that lack in functionality:

>From what Simon describes, differentiation in InfinitePolynomialRing only 
works "by chance". The function "derivative" goes out of its way to make 
sense of its arguments, mainly by putting them into SR (with variable 
degree of success). This is its implementation:

    try: 
        return f.derivative(*args, **kwds) 
    except AttributeError: 
        pass 
    if not isinstance(f, Expression): 
        f = SR(f) 
    return f.derivative(*args, **kwds) 

so, if one would simply implement a derivative method on 
infinitepolynomialring elements, then things would work.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/3fe3c9b5-98db-406c-b1ac-6a66355af7bdn%40googlegroups.com.

Reply via email to