On Tue, 3 Jan 2023 at 01:12, gu...@uwosh.edu <gu...@uwosh.edu> wrote: > > On Monday, January 2, 2023 at 6:33:38 AM UTC-6 syle...@gmail.com wrote: >> >> I think that simplify or evaluation should rather be decomposed in many >> components > > > To a great extent I think sympy already does this through the specialized > simplification options such as `radsimp()`. However, I do think it is hard to > figure out which options are available unless you are using an interface with > tab completion of `obj.` and are comfortable using tab completion combined > with reading the API. I personally think that the overall `.simplify()` > option should not disappear, but possibly the precise tools should be > extended and some thought should go into making them easy to discover.
No one is suggesting that the simplify function should be removed. Rather it should be easier to control evaluation and simplification for those who want to. The problem with SymPy right now is that automatic "evaluation" (really automatic simplification) prevents expressions from having certain forms e.g.: >>> print(1/sqrt(2)) sqrt(2)/2 Here I might want the expression to stay as 1/sqrt(2) rather than evaluate to sqrt(2)/2 but it's difficult to make that happen. You can use evaluate=False but then you need to keep using evaluate=False all the time and not all operations even accept evaluate=False. All of automatic evaluation, doit and simplify suffer from the basic premise that there is only one way that an expression should be. For example doit presumes that there is only one thing that should be done when there are many possible things that you might want to do in transforming an expression from one form to another. Of course with doit and simplify you have the option not to call those functions but in the case of automatic evaluation you don't really have that option in SymPy as it stands. The evaluate(False) context manager breaks most things and the evaluate=False keyword argument is tedious and not universally usable. What is needed is a system that at least at the lowest level does not have automatic evaluation. It is possible to build any kind of evaluation on top of that at a higher level but the converse is not true. -- Oscar -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAHVvXxTg%3DFmoz7qu6KErF00Z%2Bv3XiJqsYXQ69br9e-Amiu-FjA%40mail.gmail.com.