Opened 14 years ago
Last modified 7 years ago
#237 new enhancement
Add inverse expression/equation identifier capability to Sage
Reported by: | was | Owned by: | was |
---|---|---|---|
Priority: | minor | Milestone: | sage-wishlist |
Component: | interfaces | Keywords: | |
Cc: | kini | Merged in: | |
Authors: | Keshav Kini | Reviewers: | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
It would be nice to have some sort of inverse expression finder that takes a real number and returns possible identities it might be, like the identify Maple command or the Inverse Symbolic Calculator of yore. This could be via a web interface or by having an spkg (perhaps optional) for such functionality.
Old summary was "create an interface to the "Inverse Symbolic Calculator"
Write a function that queries this web pge and gives the result:
See sage/databases/sloane.py for ideas for how to do this.
Attachments (1)
Change History (18)
comment:1 Changed 14 years ago by
- Description modified (diff)
comment:2 Changed 14 years ago by
comment:3 Changed 13 years ago by
- Milestone set to sage-wishlist
comment:4 follow-up: ↓ 5 Changed 11 years ago by
- Report Upstream set to N/A
There is a new version of this, apparently supported by both Maplesoft and NSERC, at this link. So maybe this is doable after all - we already have an interface for Wolfram integrator, for instance.
comment:5 in reply to: ↑ 4 Changed 11 years ago by
Replying to kcrisman:
There is a new version of this, apparently supported by both Maplesoft and NSERC, at this link.
I am sure that their names are only there because the work was done on grants funded by them. Jon Borwein is no longer at Dalhousie and I don't think there is much of his group left there either. You'll be interfacing with unmaintained code.
comment:6 Changed 8 years ago by
Indeed, the "new version" seems to not be up now.
comment:7 Changed 8 years ago by
See also RIES: http://groups.google.com/group/sage-devel/browse_thread/thread/339a2a5fce57814d for another option for this functionality.
comment:8 Changed 8 years ago by
- Cc kini added
- Description modified (diff)
- Summary changed from create an interface to the "Inverse Symbolic Calculator" to Add inverse expression/equation identifier capability to Sage
Indeed, kini made an spkg for that. Let's change this summary.
comment:9 Changed 8 years ago by
http://boxen.math.washington.edu/home/keshav/files/ries-20120420.spkg is still there as of today.
comment:10 Changed 8 years ago by
Latest version appears to be 20130125 so it's still under active development. I'll update the SPKG in a bit.
comment:11 follow-up: ↓ 12 Changed 8 years ago by
New SPKG: http://wstein.org/home/keshav/files/ries-20130125.spkg
We should probably have Python bindings for this SPKG, otherwise it's kind of useless for casual users (who would seem to be a major audience for this functionality, since it's not only of interest to researchers in some abstruse area).
comment:12 in reply to: ↑ 11 Changed 8 years ago by
We should probably have Python bindings for this SPKG, otherwise it's kind of useless for casual users (who would seem to be a major audience for this functionality, since it's not only of interest to researchers in some abstruse area).
Agreed. Is there a model spkg/pyx file that you could point interested people to for how to do this? I wouldn't want to ask you to do it, unless you were really motivated, but I think this could be a neat project for a new developer interested in such things (inspired by the Borweins, for instance).
comment:13 Changed 8 years ago by
I don't think it would be such a big deal. By "bindings" I don't mean actual bindings - this kind of program isn't going to be called en masse or require a whole lot of speed in the communication pipeline like, say GAP does, so writing a libries
(to actually link against the RIES code) is surely unnecessary.
We can just write an interface in $SAGE_ROOT/devel/sage/sage/interfaces/
which takes a Sage number of some kind, converts it into a string, and then calls ries
on the command line with it. The only nontrivial part would be to convert the result back into a form that is meaningful in Sage, (as opposed to just printing it as it appears when calling ries
on the command line). For example you might want to convert the output of ries
into a list of Sage symbolic expressions, or something like that. That would involve string parsing to decipher the output notation ries
uses.
I could probably give it a try if I get some time. Of course, other developers are free to do so as well :)
comment:14 Changed 7 years ago by
Soooooo is anybody still working on interfacing Sage wth ISC (http://isc.carma.newcastle.edu.au/standard) at the moment ? And does it make sense to you ? If so I'm willing to give it a try :-)
Nathann
comment:15 Changed 7 years ago by
I was trying to find this website the other day in class to show my students (and check one of their conjectures). I wasn't able to locate it via google---I should have known to try searching here!
Yes, it would be great if Sage interfaced with it! I would have used it last week in class!
comment:16 Changed 7 years ago by
Ok, then let's work hard so that you could have used it last week :-P
Well, I wrote a few lines of code and it "works", but there are some problems for which I would like everybody's advice.
sage: ask_ISC(3.14) Asking ISC what it knows about 3.14000000000000 No result found in ISC
That's the first problem : 3.14, for Sage, is equal to 3.1400000000. Which, for ISC, is totally different.
There's a way out if we only feed the function with a string instead, but it's not a good way out for it should ultimately be a method of Sage constants...
Second problem, which is just technical : where should this method appear ? Where in the code ? Or should it appear nowhere, and just be available as a function in a module ?
Then, the output.
sage: ask_ISC("3.14") Asking ISC what it knows about 3.14 3140000117869847 sin(Pi*4/35)*sin(Pi*19/54) 3140000181376111 Lehmer^sr(Pi)/2^(1/3) 3140000375403483 sum(1/(5^n+(31/2*n^2-27/2*n+51)),n=1..inf) 3140000446459760 (K(1/sr(2))+GAM(5/24))^Golomb 3140000895104510 GAM(2/3)-Li4(1/2)^ln(Pi) 3140001879986726 (exp(1/Pi)+5)/(-arctan(1/2)+2/3) ...
I don't think that it would make sense to return a Python object for I have no idea what one could want to do with it automatically. Most of the symbolic formulas have no meaning in Sage, so it's really just for the user to see. Right now the method returns nothing and just prints the result. The only think that may be cool to add would be a nice way to display such results in the notebook, but I would like to hear your advice on the possible outputs too :-)
And you can try this small patch if you want in the meantime.
Have fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuunnn !!!
Nathann
Changed 7 years ago by
comment:17 Changed 7 years ago by
Though see comment:2 and a few early on on this ticket.
This interface is running on a heavily ageing SGI server. The software providing the interface is completely unmaintained. When this server dies, the Inverse Symbolic Calculator will be gone.