This mail is not directly related to removing the old assumptions, but rather to the next steps after that.

One issue that comes up every now and then seems to be that we dislike, in general, automatic simplification (and automatic evaluation).

Autosimplification uses the old assumptions system. For example.

In [1]: x = Symbol('x', positive=True)
In [2]: abs(x)
Out[2]: x

refine is the "new approach", using new assumptions:

In [3]: abs(y)
Out[3]: │y│
In [4]: refine(abs(y), Q.positive(y))
Out[4]: y

There is also the unify/ module, which I know nothing about.


Once the old assumptions system has been replaced by the new one, the following question comes up naturally: in what form do we re-use the (still existent) autosimplification code?

For example, we could implement a function which does "refinement using autosimplification":

def autorefine(expr, facts):
  with assuming(facts):
    re-build the expr tree
    return the new version

This seems like a good idea mid-term, but now we have refinement code scattered through all the classes, and some refinement code separate. This seems suboptimal. What should the long-term strategy be?

It seems to me that, eventually, the separate refine code should be so easy to write that all of the autosimplification can be transcribed with reasonable effort. Once we are there, we can remove the autosimplification code, and make autosimplification optional (i.e. we can implement some mechanism to optionally automatically refine newly created objects). Most sympy modules will likely break with autorefinement disabled, but one has to make a start somewhere. In particular, now all the modules can transition at their own pace, and some might decide never to do it.

Does this seem like a reasonable description of the consensus on autosimplification?

Thanks,
Tom

--
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 post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to