Is there an equivalent way to have such functionality with REDUCE?
A casual browsing of the online documentation did not locate the word rewrite.
The for allsuch thatlet seem to define conditional rules but I did not figure out how to apply them strategically.
My "rules" are mathematical identities that I need to apply both from right to left and left to right, with some simplifications in-between. In order to avoid infinite loops, I group the rules and apply the groups under strategies that achive the desired synthesis and symplification.
Any pointers to examples will be very helpful. Abologies for the newcomer questions.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Exactly, this is explained in section 11.3 of the manual, "Rule Lists".
In addition, you might want to look at the contributed PM package, which implements a patern matcher that is similar in style to those found in Mathematica.
Rainer
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello!
Does REDUCE support term rewriting with conditional rule application?
For example
Mathematica
allows to name sets of rules with conditionsand then apply it
Is there an equivalent way to have such functionality with REDUCE?
A casual browsing of the online documentation did not locate the word rewrite.
The
for all
such that
let
seem to define conditional rules but I did not figure out how to apply them strategically.My "rules" are mathematical identities that I need to apply both from right to left and left to right, with some simplifications in-between. In order to avoid infinite loops, I group the rules and apply the groups under strategies that achive the desired synthesis and symplification.
Any pointers to examples will be very helpful. Abologies for the newcomer questions.
I think the "where" construct may be applicable,
var2 := ( var1 where {rules} );
Exactly, this is explained in section 11.3 of the manual, "Rule Lists".
In addition, you might want to look at the contributed PM package, which implements a patern matcher that is similar in style to those found in Mathematica.
Rainer