Live data from Hacker News

Symbolica Computer Algebra System

symbolica.io

61–70 of 126 posts

Re: Symbolica Computer Algebra System

#62
post #52

Earlier quoted context omitted.

Author of Symbolica here: Symbolica is used in physics calculations to do arithmetic on rational polynomials that are hundreds of megabytes long. For my physics research I have worked with expressions that was just shy of a terabyte long and had > 100M terms. The way that works is that you stream terms from disk, perform manipulations on them and write them to disk again. Using a mergesort, terms that add up can be i…

This is fascinating. What is the real-world application of these polynomials? I mean, what technical-scientific problems can only be solved with such large objects? I love the thought of "if I don't solve this enormous polynomial, this solar panel won't have very good efficiency" or something like that.

I used polynomials and specifically special symmetric polynomials extensively during my Phd research (mathematical physics).

For instance symmetric polynomials (x_1^2 + x_2^2 + ...) can describe the state of a system of particles where exchanging any 2 particles does not change the system at all (exchange x_1 and x_2 in the previous expression, same polynomial = same system & state).

If you have a system of equation that you can solve exactly with special polynomials, you can approximate real world system governed by similar equations by using your special polynomials as a starting point and adding a correction to your solution.

There's so much to say about polynomials, but I'll leave you with a basic example that shows how multiplying infinite polynomials allow you to count the number of ways there are to hand you back your change at the till:

The basic units of change are 0.01$, 0.05$, 0.10$, 0.25$, 1$, 5$, 10$, ... For example, you can always give exact change back with only 0.01$.

So the set of all the different amount of change you can produce with 0.01$ is given by the exponents in the following

sum_n>=0 (q^(0.01))^n = q^0 + q^0.01 + q^0.02 + ... q^348.47 + ...

Now we can get all the amounts you can generate with 5 cents:

sum_k>=0 (q^(0.05))^k = q^0 + q^0.05 + q^0.10 + .... and so on for 25cents, 1$, ...

Notice now that given the multiplication properties of polynomials, that multiplying:

(sum_n (q^0.01)^n) * (sum_k (q^0.05)^k) * (sum_l (q^0.10)^l) Will give you all the different amounts you can generate with 0.01, 0.05 and 0.10.

For instance with n=5, k=1, l=0 you get 0.10$

q^(0.01 ^ 5) * q^(0.05 * 1)

You can get 0.10$ with n=10

q^(0.01 * 10)

You can get 0.10$ with l=1

q^(0.10 * 1)

Finally you can get 0.10$ with k=2 q^(0.05 * 2)

So when you multiply

(sum_n (q^0.01)^n) * (sum_k (q^0.05)^k) * (sum_l (q^0.10)^l)

altogether, you get

1 + ... + q^(0.01 * 5) * q^(0.05 * 1) + q^(0.01 * 10) + q^(0.10 * 1) + q^(0.05 * 2) + ... = ... + 4 q ^ (0.10)

There are thus 4 ways of handing back exactly 10 cents.

So for any amount, you take the following: product(c in (0.01, 0.05, 0.10, 0.25,...) (sum_n (q^c)^n) = sum_(a >= 0.01) [Number Of Way To Give Back Change for amount `a`] * q^(a)

So that would be the "generating series" of the number of ways to hand back change.

In this context, polynomials bridge the gaps between combinatorics and analytical computation.

Re: Symbolica Computer Algebra System

#65
post #52

Earlier quoted context omitted.

Author of Symbolica here: Symbolica is used in physics calculations to do arithmetic on rational polynomials that are hundreds of megabytes long. For my physics research I have worked with expressions that was just shy of a terabyte long and had > 100M terms. The way that works is that you stream terms from disk, perform manipulations on them and write them to disk again. Using a mergesort, terms that add up can be i…

This is fascinating. What is the real-world application of these polynomials? I mean, what technical-scientific problems can only be solved with such large objects? I love the thought of "if I don't solve this enormous polynomial, this solar panel won't have very good efficiency" or something like that.

You can even make a toy-problem with large polynomials yourself.

Just make a Taylor approximation of some e.g. transcendental function like sin(x) around some point, and use more and more terms to get a higher precision.

Re: Symbolica Computer Algebra System

#66
post #62
post #52

Earlier quoted context omitted.

This is fascinating. What is the real-world application of these polynomials? I mean, what technical-scientific problems can only be solved with such large objects? I love the thought of "if I don't solve this enormous polynomial, this solar panel won't have very good efficiency" or something like that.

I used polynomials and specifically special symmetric polynomials extensively during my Phd research (mathematical physics). For instance symmetric polynomials (x_1^2 + x_2^2 + ...) can describe the state of a system of particles where exchanging any 2 particles does not change the system at all (exchange x_1 and x_2 in the previous expression, same polynomial = same system & state). If you have a system of equation…

[deleted]

Re: Symbolica Computer Algebra System

#67

Can confirm, it is fast. I've been struggling with a plane equation for a plane based on isotropic segments. 3 segments, 3 complex points - only 6 equations. Almost every CAS can solve the system per se fast, it's the simplification process that costs time. On my machine, I managed to get a ~300KB long solution from SymPy in under a minute, and a comparable solution from Maxima in a few seconds. Symbolica found a ~84…

Wow. Could you share the equation/code you worked on? I can't imagine a mathematical object being 84KB long, that's insanely huge

Indeed, it's hard to me to imagine such an expression without any of the following qualities:

- immediately converges to zero - immediately heads to infinity - is dominated by only a few terms (thus obviating the needs for the other X million terms)

Re: Symbolica Computer Algebra System

#68

Can confirm, it is fast. I've been struggling with a plane equation for a plane based on isotropic segments. 3 segments, 3 complex points - only 6 equations. Almost every CAS can solve the system per se fast, it's the simplification process that costs time. On my machine, I managed to get a ~300KB long solution from SymPy in under a minute, and a comparable solution from Maxima in a few seconds. Symbolica found a ~84…

Wow. Could you share the equation/code you worked on? I can't imagine a mathematical object being 84KB long, that's insanely huge

The largest fancy math object I know is probably the proof of the following theorem:

https://link.springer.com/chapter/10.1007/978-3-030-51074-9_...

The proof is 200Gb large. I am quiet sure now even larger proof exists, in particular thet exhaust some combinatorial property on graphs.

Re: Symbolica Computer Algebra System

#69
I am leading an academic research group with a site-wide Symbolica license.

Because Symbolica is in early development and the work of a single person for now, one great benefit for us is the dedicated attention we receive. Any bug or feature we're particularly interested in gets immediate attention.

And despite the product being licensed, Symbolica's source-available nature gives us full confidence in the author's long-term intent. We therefore trust that accepting Symbolica as a dependency of the framework we are building will never constitute a point of failure.

Supporting Symbolica's nascent effort and having a direct line of contact with its single author also means it is easy to discuss particular arrangements specific to our use case, such as end-user license requirements.

Re: Symbolica Computer Algebra System

#70

I feel like this is missing some comparisons to Sympy and Mathematica. Probably it's more polished than Sympy, but if I'm going to closed-software software why would I pick this over MMA?

Despite Symbolica being licensed, its source code is still available which clearly shows the author's intent. It may be important in various contexts, e.g. security or satisfying certain grant requirements in academia, or whenever custom minor modifications are necessary.
Post reply on HN