I am announce a new package onMultiResidue.jl, which is used to calculate the multi-variable residue over a zero-dimensional point in multi-variable complex space. The method and Mathematica code have beed included in MultiResidue.nb. This package is using the CAS in Julia SymEngine.
solve for linear equation is added
New version v1.5.0 MultiResidue.jl
Using the efficient and proper birddet( @stevengj ) for the determinant of symbolic matrix.
Still missing efficient solve or inverse function for linear symbolic equations.
It will better to simplify function for the final output, so we still need efficient simplify function in SymEngine.jl @isuruf
new version, v1.3.0
Extend to the equations with symbolic coefficients
Next step, add the residue for inhomogeneous equations.
Is there a reason you are using SymEngine and not Symbolics.jl?
No. I am just more familiar with SymEngine.
Symbolics looks better on performance and of more functions. I need spend more time on learning it. I plan to use Symbolics in further versions.
Some plan in future on this package:
- using Symbolics. Symbolics have solve function and simplify function now. Just need two optimization: One is on the degree function in Symbolics. Now it does not support for a given multivariable list.
sols=Symbolics.solve_for([a+x*b+y*c+d~(big(0)),a+big(5)x*b+y*c+d~big(2),a+x*b+y*c+big(3)d~2,big(4)a+x*b+y*c+d~big(2)],[a,b,c,d]) sols (-(6.0 / -4.0 - 5.0)) / 3.0 - (3//2)
- extending to non-homogeneous ideals
- extending to non-zero dimensional intersections
- adding Exterior algebra on the differential form and parameter transformation(local transformation will improve the performance greatly)
- adding the new integral reduction method by Multi variable residue.
When I load your package, I got a warning:
julia> using MultiResidue [ Info: Precompiling MultiResidue [15ac1977-6a35-4422-b111-63c1dba6b911] ┌ Warning: Package MultiResidue does not have Combinatorics in its dependencies: │ - If you have MultiResidue checked out for development and have │ added Combinatorics as a dependency but haven't updated your primary │ environment's manifest file, try `Pkg.resolve()`. │ - Otherwise you may need to report an issue with MultiResidue └ Loading Combinatorics into MultiResidue from project dependency, future warnings for MultiResidue are suppressed.
Maybe you should include
Combinatorics in your
You could also consider supporting multiple symbolic packages at once, e.g., SymEngine.jl, Symbolics.jl, and SymPy.jl. That’s what I do in BSeries.jl. This allows comparing the efficiency of different packages for the same task. For the tasks I need in BSeries.jl, SymEngine.jl is the fastest option at the moment, see Benchmarks · BSeries.jl
Thanks for pointing this out. Fixed it.
That makes sense! Nowadays, SymEngine is the fastest one and easy to understand the inner structures. I can defined my own abstract algebra operator or function conveniently. It is usually my plan A. Symbolics is very active recently. Look forward they can be the fastest one in near future. SymPy.jl looks very slow. I usually can not get the result for complex symbolic system.
@shashi could this be a good benchmark for the new Unityper stuff?
@gangchern there’s a breaking change on SymbolicUtils.jl master which should change the performance quite dramatically. It would be interesting to test that.
Does this include the performance of differentiating and substituting variables for concrete numbers? I coud test this in BSeries.jl.
It definitely does. Unityper makes a composite type from what was many subtypes.
Now instead of
Mul, etc. as the basic types, there’s just a
Symbolic that acts like the union of these types. It changes every symbolic operation from fundamentally type-unstable to fundamentally type-stable, which is (hopefully) very significant!
Which branches of which packages do I need to check out to test it?
SymbolicUtils master already has this, which is why it’s a breaking v0.20.0-dev. I’m not sure what in Symbolics.jl is required to test it, but @shashi is working on this as I speak so connecting with him to make a real performance test case would be good.
Sounds great! I would like to test it.
@shashi If you want to test something, just let me know how (or run the benchmarks from BSeries.jl I linked above yourself).