Announcement: sympy-extras package

86 views
Skip to first unread message

Francesco Bonazzi

unread,
Sep 10, 2026, 11:56:55 AMSep 10
to sympy
I have create the sympy-extras package, meant to be an extension to SymPy's algorithms.

I left Claude Fable 5.1 run for a few days and had it:
  • implement a new typeless assumptions system (both assumptions module in SymPy have terrible design flaws, it had to be restarted)
  • Cylindrical Algebraic Decomposition,
  • Karr algorithms,
  • typeless inference and conditions,
  • new algorithms for differential equation solvers
  • many other algorithms... 
There are comparison with Sympy notes.

Along with this package, a benchmark dataset has been created. These are tests collected from other open source computer algebra systems and theorem provers, as well as some that have been created by Claude.

In order to achieve correctness, I asked Claude to always compare the results with the outputs of equivalent algorithms implemented in Wolfram Mathematica. This has worked pretty well as Claude had access to a de factor referee (Wolfram Mathematica) that was immediately reporting wrong results.

During the process, SymPy bugs have been detected.

I have release this package on PyPI:

so you can install it with

pip install sympy-extras

You're welcome to try it and report issues.

Oldřich Klimánek

unread,
Sep 10, 2026, 6:59:55 PMSep 10
to sy...@googlegroups.com
Hi Francesco,
that was a great idea — having an extra package makes a great sense. 

Maybe we can add my Bose-Fermi integration to your project? 


These days, using „AI" for projects like this is kinda inevitable — even though I am still not a big fan of that, not using AI means being behind. We, the older generation, will have to die out, for youngsters AI will be a daily bread in years to come. Kinda resembling of a clash between „you only have to code in Assembly, compiled languages are for the dumb“ and the C/Pascal users. Well, we all were happy when Pascal came, we all were happy when autocomplete came… It is time to adapt to the AI driven programming. Not blindly, as we do not accept blindly autocomplete in an IDE. 

Best,
Oldrich

10. 9. 2026 v 17:56, Francesco Bonazzi <franz....@gmail.com>:

--
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+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sympy/ce15969f-75b2-44c6-8642-9e71de8d147en%40googlegroups.com.

Francesco Bonazzi

unread,
Sep 11, 2026, 1:48:13 AMSep 11
to sympy
On Friday, September 11, 2026 at 12:59:55 a.m. UTC+2 oldrich....@gmail.com wrote:
Hi Francesco,
that was a great idea — having an extra package makes a great sense. 

Maybe we can add my Bose-Fermi integration to your project? 



I left integrals out as Aaron is already trying to fix the Risch algorithm in SymPy with Claude Fable.
 
These days, using „AI" for projects like this is kinda inevitable — even though I am still not a big fan of that, not using AI means being behind.

The only model by Claude that can generate a project like this is Fable 5.1. I tried to use Opus 5 but it keeps generating low quality code.

Unfortunately Claude Fable 5.1 is quite expensive. 

Francesco Bonazzi

unread,
Sep 12, 2026, 6:10:05 AMSep 12
to sympy
It works now on sympy-extras:

In [1]: from sympy_extras.integrals import integrate_by_ranges, definite_integral

In [2]: from sympy import symbols, Integral, exp, oo

In [3]: x = symbols('x')

In [4]: definite_integral(x**3 / (exp(x) - 1), (x, 0, oo))
Out[4]: pi**4/15

In [6]: from sympy  import init_printing

In [7]: init_printing()

In [8]: definite_integral(x**3 / (exp(x) - 1), (x, 0, oo))
Out[8]:
 4
π
──
15


On Friday, September 11, 2026 at 12:59:55 a.m. UTC+2 oldrich....@gmail.com wrote:

Francesco Bonazzi

unread,
Sep 12, 2026, 6:14:03 AMSep 12
to sympy
This is also a nice addition to the library:

In [3]: from sympy.abc import x, y, z, a, b, c

In [4]: from sympy_extras.integrals import integrate_by_ranges

In [5]: integrate_by_ranges(1, x**2 + y**2 < 1)
Out[5]: π

In [8]: integrate_by_ranges(1, x**2 + y**2 + z**2 < 1)
Out[8]:
4⋅π
───
 3

n [11]: integrate_by_ranges(1, (0 < x) & (x < 4) & (0 < y) & (y < 3))
Out[11]: 12

In [12]: integrate_by_ranges(1, (0 < x) & (x < 4) & (0 < y) & (y < x))
Out[12]: 8
Reply all
Reply to author
Forward
0 new messages