These are chat archives for symengine/symengine

16th
Dec 2015
Ondřej Čertík
@certik
Dec 16 2015 17:17
@isuruf, @rwst As we discussed in the issues, I think the way to go is to have a dedicated class Series, that handles the series including printing the O() term. This Series will subclass from Basic. As to Series + Add let's say, the result should be handled and result in a Series I guess. The other option is to not make Series subclass Basic. I don't know.
Isuru Fernando
@isuruf
Dec 16 2015 17:20
@certik, one disadvantage of Series and Polynomial subclassing Basic is that then x which is a Symbol and x which is a polynomial will not be equal. Making them equal will be lots of hard work as we have no way yet for equality of different types
Ondřej Čertík
@certik
Dec 16 2015 20:11
I don't think they should be equal, should they?
Ralf Stephan
@rwst
Dec 16 2015 20:49
Series and polynomials may not be general Expressions but they could be converted to them, and then they can be compared. You need to distinguish between algebraic equality (x==(x+1)**2-x**2-x-1) and equality of objects (x is y).
Ondřej Čertík
@certik
Dec 16 2015 21:05
They should be subclassed if you want to represent things like (x+y+z+1)^2, where x+y+z+1 is a polynomial, but then you square it using Pow. Otherwise they don't have to be and just need methods to convert to and from Basic.