9 ms·
Symbolica Computer Algebra System
- tlb 2y agoWhat’s the use case overlap between symbolic and huge? I might expect that with most huge expressions (they talk about disk space being the limit, not memory) you’d be satisfied with a numerical approximation. Does someone need to simplify a huge expression down to a small symbolic expression?
- okaleniuk 2y agoThe most obvious use case is to see that the expression does not simplify well and is inherently huge :-)
- SPACECADET3D 2y agoOne use case is in theoretical physics, where expressions that take up about a terabyte are generated when computing Feynman diagrams, but only in the intermediate stages. By the end of a two-month computation you get a result similar to equation 4.5 in this paper: https://arxiv.org/pdf/1707.01044 https://arxiv.org/pdf/1707.01044 An exact answer is desired since the final result reveals some structure that can be studied, and because it is very hard to get a numerical result due to the occurrence of spurious poles. For example, evaluating (1-x)/x - 1/x numerically is challenging around x=0 even though symbolically it can be made regular.
- data_maan 2y agoWhat do you mean by "symbolically it can be made regular"?
- eigenket 2y ago(1-x)/x - 1/x =1/x - 1 - 1/x = -1 Evaluating the expression naively near zero you're going to get wild numerical errors, but if you do the symbolic manipulation you're going to notice that it's just equal to -1. Edit: e.g. consider this interaction I just had with the python interpreter >>> x=1e-15 >>> (1-x)/x - 1/x -1.0 >>> x=1e-16 >>> (1-x)/x - 1/x 0.0 you get completely the wrong answer when x = 1e-16
- okaleniuk 2y agoCan 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 ~84K long solution in about a second... in Colab. That's impressive.
- data_maan 2y agoWow. Could you share the equation/code you worked on? I can't imagine a mathematical object being 84KB long, that's insanely huge
- okaleniuk 2y agoSure! https://github.com/akalenuk/mesh-experiments/blob/master/eq/isotropic_plane.py https://github.com/akalenuk/mesh-experiments/blob/master/eq/... It's not even a particularly large system. Only 6 linear equations.
- SPACECADET3D 2y agoAuthor 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 identified by sorting them to be adjacent.
- actionfromafar 2y agoI love how merge-sort which was once used on punch cards because RAM was tight is still relevant. :)
- lanstin 2y ago
- gremgoth 2y agoName shared with https://www.symbolica.ai https://www.symbolica.ai, a Vinod Khosla-backed start up.
- deleted 2y ago[deleted]
- data_maan 2y agoI was a t first also confused about this and thought they were the same. (Not sure though why you mention this Khosla guy, should I even know him?)
- T-A 2y ago> this Khosla guy, should I even know him? https://en.wikipedia.org/wiki/Vinod_Khosla https://en.wikipedia.org/wiki/Vinod_Khosla
- Der_Einzige 2y agoNamespace conflicts from AI projects are annoying. Mamba was a damn reimplementation of the anaconda package manager, not a new NN architecture!
- medo-bear 2y agoThis only seems to focus on polynomial equations. If so it is a bit of a strech to call it a CAS
- okaleniuk 2y agoThere is also a linear solver in the Matrix.
- SPACECADET3D 2y agoIt has pattern matching, Groebner basis computations, expression simplification, series expansion, numerical integration, etc. Deep down every CAS is about manipulating polynomials :)
- medo-bear 2y agoCompare it to a free CAS like Maxima for example, Maxima is a system for the manipulation of symbolic and numerical expressions, including differentiation, integration, Taylor series, Laplace transforms, ordinary differential equations, systems of linear equations, polynomials, sets, lists, vectors, matrices and tensors.
- SPACECADET3D 2y agoMost of these features are included in Symbolica in some capacity (ODE solving is missing) and there are CAS features Symbolica has and that Maxima has not (like advanced pattern matching), even though it is only a year old. It is not just a matter of whether a feature is there, it needs to be usable in practice. You cannot use Maxima to do computation with large rational polynomials as this paper shows: https://arxiv.org/pdf/2304.13418 https://arxiv.org/pdf/2304.13418 Symbolica is 10 times faster and uses 60 times less memory than Maxima on a medium-sized problem. The larger sized problem does not run with Maxima. Note that this is tested with an older version of Symbolica, the latest version is even faster.
- anthk 2y ago
- Y_Y 2y ago> Sometimes a Symbolica license key is needed on a machine that is not connected to the internet. For this purpose, an offline key that is valid for 24 hours can be generated from a valid license key on a machine that is connected to the internet. Even Mathematica doesn't pull shit like that.
- SPACECADET3D 2y agoAuthor of Symbolica here: this may change in the future. Note that it is easy to do this, you just call the function from symbolica import \* set_license_key('YOUR_KEY') print(get_offline_license_key())
- Y_Y 2y agoHi. Nice work, I'm really glad to see a new CAS and this is an area that is close to my heart. The problem I have isn't so much that it's difficult to jump through the licensing hoops (although anything is more difficult that not using licenses), it is that you put restrictions on the user of the software that your competitors don't have. I make closed-source commercial software at my dayjob, I understand you want to get paid. The trouble is that a featureful CAS either takes decades to build by hand (e.g. Axiom) it relies on a huge amount of FOSS libraries (e.g. Sage), or both (e.g. Mathematica). Making me "phone home" to check I'm up to date on my subscription to some algebra manipulation algorithms is a non-starter, especially when even a PhD student has to pay. (I know you have a single-threaded free version, but that didn't make much sense when your USP is speed.)
- tverbeure 2y agoIsn't this one of those cases where those who do it right get punished and others don't?
- deleted 2y ago[deleted]
- okaleniuk 2y agoThere is a missing variable declaration in the Colab playground. y = Expression.var('y') e = 1/(x*y+1) e = e.derivative(x) md(e.to_latex()) I suppose, the first line should be: x, y = Expression.var('x', 'y')
- SPACECADET3D 2y agoThanks, fixed it! It should be x, y = Expression.vars('x', 'y') indeed
- tdullien 2y agoHow does this compare to SAGE?
- kragen 2y agosage is free software, this is proprietary
- medo-bear 2y agoSage also seems to cover way more subject matter.
- SPACECADET3D 2y agoSymbolica is only a year old, however most features are already in there. What is a Sage feature you'd like to see in Symbolica? Note that there are also features in Symbolica that are not in Sage, such as numerical integration, pattern matching and term streaming.
- kragen 2y agowhile i do not believe you have any obligation to license it under an open-source license, i think people who use it under a proprietary license are being foolish. a cas is an essential tool for day-to-day work, and becoming dependent on a proprietary software vendor for that usually ends badly so in a sense that's a 'sage feature i'd like to see'
- __MatrixMan__ 2y agoI feel similarly. While I myself might gamble on learning a tool like this, I'd be reluctant to recommend it to students unless I was very confident that it would always be there when they reached for it. Source-available does scratch that itch more or less, but it creates some reluctance.
- kragen 2y ago> Students and hobbyists can use Symbolica for free. Once Symbolica is being used professionally, either in an academic context or in a commercial company, a license is required. The preferred license model for academic use is an institution-wide license.
- deleted 2y ago[deleted]
- parl_match 2y ago> a state-of-the-art commercial computer algebra system while being as open as possible > Get a license key for offline use, generated from a licensed Symbolica session. The key will remain valid for 24 hours. lmao This is a really impressive project, but the practically always-on requirement - including an internet connection to go offline - is absolutely hilarious. Also, the requirement for me to "get a quote" to get an idea of how much it'll cost me? I'm not going to even bother trying the free trial. I can tell you how much MatLab cost me for my personal projects - $149. Now I'm not saying MatLab and this are an apples to apples comparison (not even close), but y'all are chopping yourselves off at the knees.
- SPACECADET3D 2y agoAuthor of Symbolica here: for your personal projects the cost is 0, as you'd be a hobbyist. Symbolica is developed by only one person, so forgive me if I can't get every aspect of the project right on the first try (especially the non-technical part) :) I will see about removing the online on start-up part. It's essentially the only anti-piracy step that I have. At the moment there is no fixed cost for use in industry, since the price will vary based on the amount of users and other factors.
- aardvark179 2y agoGive people a ballpark single user price, and a note that discounts can be given for multiple users etc. If you don’t quote any price the assumption will be, “if you have to ask you can’t afford it.”
- auggierose 2y agoThat's probably how it is. Given that he sells only academic licenses, if he sells 3 site licenses for €6000 each, that's a salary (a low one, but you can actually live from it). If he advertises a single-user license for €200, let's say, then each site has to have at least 30 users to make the same kind of money. Unlikely each current site has that many users, so it doesn't make sense to offer single-user licenses if there is the danger that sites will jump to that.
- krackers 2y agoI 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?
- SPACECADET3D 2y agoIt depends on what you want to do. It should be much faster than Sympy and it is often much faster than Mathematica, for example if you do pattern matching or are manipulating rational polynomials. The idea of Symbolica is that you can use it as a library inside your existing projects, which is harder to do with MM since it is its own ecosystem. Moreover, for personal projects Symbolica is free.
- jjtheblunt 2y agoCan Symbolica compute Gröbner bases over user specified coefficient rings? I don't see, in the docs, how one would specify such.
- HiggsBozo1337 2y agoDespite 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.
- nullhole 2y agoWhat intent do you infer from the fact that it's source-available instead of being FOSS?
- kragen 2y agocynically, one possibility is the intent to be able to sue open-source cas authors and distributors who had access to it and then wrote substantially similar code. charitably, it's intended to allow users to resolve whatever problems they have with the system, by debugging and, if necessary, patching it
- sgdpk 2y agoDoes this handle elimination of variables in a polynomial system (using an eliminating order for Groebner basis)?
- SPACECADET3D 2y agoAuthor here: you can generate the Groebner basis in lex order or compute a resultant, but it doesn't automatically backsubstitute the system at the moment. This is mostly because I haven't committed yet to a format to describe roots of polynomials. It's on the todo list though :)
- sgdpk 2y agoThank you for replying! The project seems promising, I'll follow with interest. Hope it goes well :)
- Aardwolf 2y agoIt is an interesting combination of open source yet paid. But the price is "Contact us for a quote" Can't they at least give a ballpark number of what the price is? Matlab and Mathematica are about $1000-3000 per year for commercial license, they aren't hiding their price.
- SPACECADET3D 2y agoAuthor here: thanks for the feedback. I will add a price range soon. The reason why it is not there in the first place is because I am thinking about site-wide licenses, which are often quote-based (also for Mathematica). For universities site-wide licenses are common, but for industry maybe less so. For reference, a university site-wide license is about 6000 EUR per year at the moment.
- data_maan 2y ago6000 ... per month? Per Year? Lifelong?
- SPACECADET3D 2y agoI have updated the post. It's an annual site-wide license, so not per user.
- mrob 2y agoOpen Source refers to software that meets the Open Source Definition: https://en.wikipedia.org/wiki/The_Open_Source_Definition https://en.wikipedia.org/wiki/The_Open_Source_Definition This software is "Source Available": https://en.wikipedia.org/wiki/Source-available_software https://en.wikipedia.org/wiki/Source-available_software
- kragen 2y agoit's not open source
- dwheeler 2y agoThis isn't open source software, it's source available. I don't see any claim on that page that it's open source, the page only says "source available" instead.
- lifthrasiir 2y ago(Ab)using `build.rs` for license checking is brilliant and horrible at once ;-) (Another argument for sandboxing build scripts?) By the way, `Cargo.toml` example in the installation section has a significant typo: symbolica = { "*" } # Should have been just `symbolica = "*"`.
- SPACECADET3D 2y agoThanks for reporting, I fixed the typo. I actually had an idea to do an OEM license check in build.rs that compiles out all license checks so that this version can be included in customers' software ^^
- arjvik 2y agoI can’t find this code - which build.rs file is it in?
- lifthrasiir 2y agoSee https://symbolica.io/docs/get_started.html#license https://symbolica.io/docs/get_started.html#license for the context.
- MichaelMug 2y agoI see all the license checking code in lib.rs but nothing in build.rs?
- lifthrasiir 2y agoOoh, you were right. Either something has changed since my initial viewing (unlikely) or I have incorrectly assumed that it is in build.rs because all other examples don't contain `LicenseManager` (much more likely).
- lifthrasiir 2y agoEDIT: Symbolica doesn't use `build.rs` for license checking, that was clearly my misunderstanding.
- vindex10 2y agoThe idea reminds me of FORM, popular in Particle physics community: https://github.com/vermaseren/form https://github.com/vermaseren/form http://www.nikhef.nl/~form/ http://www.nikhef.nl/~form/ https://en.wikipedia.org/wiki/FORM_(symbolic_manipulation_system) https://en.wikipedia.org/wiki/FORM_(symbolic_manipulation_sy...
- SPACECADET3D 2y agoI've actually been a developer of FORM since my PhD (which I did with the author of FORM, Jos Vermaseren)! In Symbolica, I am taking the best features of FORM, while making it easier to use.
- vindex10 2y agoExciting! I've never been an active user, but I always appreciated it as a core tool in QFT calculations. I even created a simple tool for squaring matrix elements based on FORM: https://github.com/vindex10/form-square https://github.com/vindex10/form-square Thank you for staying creative, for thinking big and expanding beyond HEP :)
- anthk 2y agoI've never got to solve a simple equation under Form. Everything else looks easy, as most of the answers are either tautological or factor arrangements without stating explicit units or magnitudes; but I didn't know how to get numerical answers. Even by defining functions equally to 0.
- anthk 2y agoI was about to say that.
- JonChesterfield 2y ago> Symbolica allows you to build and manipulate mathematical expressions through matching and replacing patterns, similar to regex for text Some details on this are at https://symbolica.io/docs/pattern_matching.html https://symbolica.io/docs/pattern_matching.html
- tempodox 2y ago> In the case of halted development, existing and new users can buy a perpetual license for the most recent version. Promises, promises. I don't doubt the author's intentions, but then later the owner(s) get bought out and the new owner doesn't honor that promise. We've seen this kind of stuff way too often in the past.
- deleted 2y ago[deleted]
- anonzzzies 2y agoImpressive work, especially for one person!
- brcmthrowaway 2y agoCan this be combined with LLMs somehow to creatte AGI?
- HiggsBozo1337 2y agoI 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.
- jiggawatts 2y agoI’m not sure what I like the most: the positive collaborative attitude, or your user name!
- pjmlp 2y agoAll those C++ examples feel like bare bones C, when modern C++ can be made to look as easy to use as Python. I expect to see std:: types for everything, proper namespaces, ranges,... not C strings, C arrays, and extern "C". See CUDA and SYCL. Also the API reference for C++ is missing in most places.
- HiggsBozo1337 2y agoHe's a one-man army of a one-year old software, so it makes sense that he would focus on core features that are most relevant to his existing customers and capable of attracting new ones. If this was important to you or someone else who would sign up for a Symbolica license, I'm sure he would improve on this. A streamlined C++ API is comparatively easier to achieve than beating state-of-the-art efficiency on key CAS algorithms... We should encourage this original approach of licensed source available software, otherwise you end up with either black-boxy Mathematica-like software of xzlib disasters and nothing in between.
- 2y ago
- 6gvONxR4sf7o 2y agoCool stuff! One comment on the landing page: the slideshow view thingy of examples is fast, and when I click one to read it, it moves to the next one so fast again, so I can’t really look at the demos. I also can’t quickly find any details about what field/algebra/whatever these cover. If I make a Expression.var, what structure is it assumed to have? Great job on this project :)
- SPACECADET3D 2y agoThanks for the feedback! I will see if I can slow down the slideshow. You can see more demos in the docs and the live notebook. An expression is very general. Each variable and function is commutative and should hold for the complex numbers. For functions you can set if they are symmetric, linear or antisymmetric. Non-commutativity can be emulated by adding an extra argument that determines the ordering or by giving them different names. If you use the Polynomial class instead of Expression, you can choose the field yourself. This is especially the clear in Rust where most structures are generic over the field. For example: MultivariatePolynomial<AlgebraicNumberRing<RationalField>> or UnivariatePolynomial<FiniteField<u64>>
- 6gvONxR4sf7o 2y agoThanks for the quick answer! I had only looked at the python API docs, so I missed that. I’ve just been wrapping up learning a bunch of Lie theory and will keep symbolica in mind next time I want to play with some big nasty expressions! > Non-commutativity can be emulated by adding an extra argument that determines the ordering or by giving them different names. Would you mind giving an example? (or just tell me it’s in the docs and i’ll look deeper)
- SPACECADET3D 2y agoIt's not a language specific feature, but you can do the bookkeeping yourself. In the simplest form you can write: f(1,...)*f(2,...) Then when you do pattern matching with wildcards x_ and y_ you can do f(x_,...)*f(y_,..) with the requirement that x_ < y_. This way you will know you match them in the expected order and not the other way around.
- auggierose 2y agoHow does source-available work together with license keys? Can I not just compile it myself and be done with the license key?
- ted_dunning 2y agoIt works by allowing the project to deal with honest people and ignore assholes efficiently. And for a small team (in this case, one person), getting rid of assholes who just want to rip the project off with minimal effort is a big win. After all, if you just want to play around with the system you are a hobbyist and can get it for free anyway. Why go to the extra effort of stealing the code? And if you actually are creating value with the system, don't you think you might want some support? If your answer in either case is that you would rather cheat the author then there is nothing tangible stopping you, but you just defined who you are and selected yourself out of the class of people the maintainer has to deal with.
- auggierose 2y agoI don't think it is about people being assholes, but just going the way of least resistance. So if it is easier to buy a license key and use it, than to just remove the license check, then that's what people will do. Same the other way around. I read somewhere here that the free version is restricted (single thread only?). Also the mechanism for offline work sounds like a pain, so if multithreaded and offline is your use case, the case for getting a license key just got murky. I am wondering about this because it just seems hard to sell source available software. Everybody is complaining about price and license keys. But if you put the software behind an SaaS, and go the subscription way, you avoid all of this trouble. Of course, in this case, that just doesn't seem possible. Personally, I'd like to sell my software source available and without an SaaS indirection, but I am wondering how to get paid in that scenario. License keys make the software worse, so there just seems to be a logical problem here in the case of source available software: Why pay for worse software? In case of closed-source software, no such logical problem exists: license keys make the software infinitely better, because otherwise it wouldn't work at all.
- oxxoxoxooo 2y agoPlease, what do you use for bigints? GMP?
- SPACECADET3D 2y agoI am using GMP indeed, through the Rust crate `rug`.
- oxxoxoxooo 2y agoThanks for the reply! If you don't mind asking more: what do you use for polynomial GCD? Apparently it is quite fast, do you use some standard algorithm implemented well or is there some kind of algorithmic improvement? Is it described somewhere, say a paper or a book? Have you tried to benchmark it against NTL, for example? Thanks again!
- kragen 2y ago> Students and hobbyists can use Symbolica for free. Once Symbolica is being used professionally, either in an academic context or in a commercial company, a license is required. The preferred license model for academic use is an institution-wide license. while i do not believe the author has any obligation to license it under an open-source license, i think people who use it under a proprietary license are being foolish. a cas is an essential tool for day-to-day work, and becoming dependent on a proprietary software vendor for that usually ends badly (repost from elsethread)
- deleted 2y ago[deleted]
- hi-v-rocknroll 2y agoApart from programmatic UX, I'm unsure what the use-case or competitive advantages. Perhaps it could use a comparison matrix along with well-known CAS systems, i.e., Giac (Erable's successor), Mathematica, and Maple. Mathematica and Maple are among the powerful CASes. See also: [0]. * I used HP 48 (Erable) extensively in college for physics, math, chemistry, and electrical engineering courses. It could simplify systems of equations, symbolically integrate, and solve ordinary and partial diff eqs. Not quite Mathematica or Maple, but Erable was portable before laptops or smartphones were widely available. If you want to push a CAS, try deriving a general time-dependent for the Schrödinger wave equation (PDF) for hydrogen (1s1). ;) 0. https://en.wikipedia.org/wiki/List_of_computer_algebra_systems https://en.wikipedia.org/wiki/List_of_computer_algebra_syste... * Wikipedia is wrong. Erable is included in 48G/GX by default, but it might've been an add-on for 48S/SX.
- Codrus 2y agoYeaaaaah, that is a weird license, and if I needed non-free software for anything, I'd go with Mathematica. Happy to play with it once it's open source and the maintainer has given up on trying to sell it. I learned about Monte Carlo integration when looking through the codebase, though, so that was cool!
- rurban 2y agoI've looked through the rust code on GitHub, and it's amazingly readable, like one of the good lisp systems. Esp. the matcher, eg. in the normalize or solver. Just much faster.
- HumanProtractor 2y agoIt's got the startup pricing model. "Contact us for a quote!"