Symbolic Math in OCaml?

Does ocaml have a library for manipulating symbolic math similar to python’s sympy? I have searched through opam and cannot find anything similar.

1 Like

There is owl_symbolic but it’s not updated for a while maybe try and see if it works or maybe fork it and make it your own :smiley:

I haven’t used this part of the library, but looks like the quantumgoose library has some support for symbolic computation as well. Symbolic (quantumgoose.Quantumlib.Symbolic)

Note that it doesn’t work out-of-the-box with OCaml 5, because it depends on the opal library which is still listed as requiring OCaml 4. But I have a local fork of quantumgoose with a vendored copy of opal, which seems to work without issue. Can upload it if there’s interest.