Hi,
> I am unsure how this approach will inter-operate with the rest of
> SymPy. For this object to be useful it must be able to work with the
> rest of sympy's functions. For instance will this work with your idea:
>
> solve(x+pm(y), x) ---> -pm(y)
>
> There are many more questions, and I am a bit unsure whether this will
> be useful (just my opinion), however they can wait. For now we can
> focus on:
>
> 1. Is it useful?
Maybe. But only if it just works out of the box.
I think that it would be good to take a more general
approach and handle multi-valued expressions in the
same go. For example:
1^(1/3) --> mv
with
mv[0], mv[1], mv[2] the three roots.
This can be modelled by the RootOf object:
In [12]: RootOf(x**3-1, 0)
Out[12]: 1
In [13]: RootOf(x**3-1, 1)
Out[13]: -1/2 - sqrt(3)*I/2
In [14]: RootOf(x**3-1, 2)
Out[14]: -1/2 + sqrt(3)*I/2
However we can only extract explicit values here ...
Even simplest constants are not supported yet:
RootOf(x**3-a, 1)
[...]
PolynomialError: only univariate polynomials are allowed
Just my thoughts on the topic