Francesco was skeptical if MatchPy could support all Rubi rules. Hence we (I and Abdullah) are trying to implement first set of rules (Algebraic) into MatchPy as soon as possible. Major things involved in accomplishing this are:
- [Completed] Complete writing parser for Rubi rules form
DownValuesgenerated from Mathematica.
- [Partially Completed] Complete basic framework for MatchPy to support Rubi rules.
- [Completed] Parse Rubi tests.
- [Incomplete] Add utility functions for Rubi into SymPy syntax.
Generation of new patterns from Optional Arguments
Mathematica supports optional arguments for Wild symbols. Some common functions (such as
Pow) of Mathematica have built‐in default values for their arguments.
MatchPy does not support optional arguments to its
Wildcards. So, Manuel Krebber suggested to add two more rules for each optional argument that exist in the pattern. For example:
Int[x_^m_.,x_Symbol] := x^(m+1)/(m+1) /; FreeQ[m,x] && NonzeroQ[m+1]
In the above rule, the default value of
1. So I implemented these rules in MatchPy:
Int[x_^m_.,x_Symbol] := x^(m+1)/(m+1) /; FreeQ[m,x] && NonzeroQ[m+1] (* substituting m = 1*) Int[x_,x_Symbol] := x^(2)/(2) /; FreeQ[2,x] && NonzeroQ
There are many utility functions for Rubi written in Mathematica. We are currently focusing on implementing the functions which are being used in Algebraic rules. As soon we we complete our implementation (hopefully by this weekend), we can start running the test suit for Rubi.
I will work on implementing utility functions along with Abdullah in coming days. I will keep testing the module as we implement utility functions and add more rules into our matcher.