Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Rubi Integration notebook for specific rule in the Steps display #18

Open
halirutan opened this issue Dec 12, 2018 · 2 comments
Open
Labels
help wanted Extra attention is needed Rubi interface Issues concerning the Rubi Mathematica package

Comments

@halirutan
Copy link
Member

halirutan commented Dec 12, 2018

This issue might require advanced knowledge Mathematica. The goal is that the user can open the correct integration rule notebook (which contains more information) at the correct place from one of the rules in the Steps display:

img

The chain of information flow for the integration rules is as follows:

  1. Albert writes each rule as a separate section in the integration rule notebooks and often provides additional references into the literature or explanations.
  2. The notebooks are then transformed into *.m files where everything, except the Mathematica code for the rule, is stripped.
  3. Rubi loads these files in a fixed order. The order is vitally important. During "loading" the code for all rules are turned into DownValues for Int.
  4. Some of the Int rules are further processed (see FixIntRules)
  5. When using Steps for integration, we know which specific DownValue was used, but we lost the information from which cell in the source-notebook this rule is coming from.

The question is: Is there a reliable way to calculate or store the information where a DownValue can be found in the source-notebooks? This should work across multiple Mathematica versions and operating system.

I already tested some approaches like calculating hash-codes for the rule but these failed because Mathematica makes adjustments in the expressions when it transforms a := definition into a DownValue. Talk to me, @halirutan, if you like to work on this issue.

@halirutan halirutan added help wanted Extra attention is needed Rubi interface Issues concerning the Rubi Mathematica package labels Dec 12, 2018
@asdasd1dsadsa
Copy link

asdasd1dsadsa commented Nov 7, 2020

I've noticed that RubiRule has an ID now. Is this issue still open?

@halirutan
Copy link
Member Author

I'm not exactly sure about what ID you're talking, but the preliminary work I did on this can be found on the NotebookReferences branch. It worked pretty well on my machine but I haven't looked at this for well over a year. It works by calculating a hash for each integration rule that is then included in the rule itself.

So if you check one of the final integration rule files you find that each rule has an additional default RubiNotebookReference argument:

Int[1/x_, x_Symbol, _:RubiNotebookReference["70cb09bc"]] := Log[x]

The hash of each rule is available in a large map that is used to resolve the filename and cell-number back.

If the original Rubi notebooks are available locally, this can be used to open the exact notebook in read-only mode (much like you do with Mathematica's documentation) and navigate to the cell where a specific integration rule is defined.

What's still missing is a separate "resource paclet" that can be installed automatically and contains the original Rubi notebooks. It needs to be placed so that rules from the Step@Int[...] can be opened. The current implementation just expects the $UserBaseDirectory and you can find the implementation here. Look at the locateRubiNotebook function for more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed Rubi interface Issues concerning the Rubi Mathematica package
Development

No branches or pull requests

2 participants