On Thursday, October 7, 2021 at 1:57:48 a.m. UTC+2 Oscar wrote: > > My approach would be to make a new library that redefines the core of > SymPy itself and that uses matchpy or equivalent. Then if that library > could be made compatible with SymPy through a mechanism like sympify then > it would be possible to work incrementally on it until it was relatively > complete. The new library could be unencumbered by backwards compatibility > constraints and could fix the known design flaws by having first-class > functions, exp as pow, no automatic evaluation, kinds and kind checking > built in, match-based assumptions, better handling of singular cases in > basic manipulation, ... >
An easier way, define some new classes like *AddNew*, *MulNew*, *PowNew* inheriting from *Expr. *Then, using *sympy.utilities.matchpy_connector *start defining the flattening rules. I think it should already be possible. The class *Replacer* in *sympy.utilities.matchpy_connector* has some usage examples in its docstring (it's nice to get familiar with the API). Also, remember that we have the module *sympy.sandbox* to put unsupported and temporary experimental code into. That is useful for experiments like this one. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/4d055f4d-2999-4cfe-b95f-ccb2455b818dn%40googlegroups.com.
