Computer algebra: Difference between revisions

Content deleted Content added
top: suggest screenshot
m adding a reference, describing rewriting rules for simplification
Line 54:
Such a complicated expression is clearly not acceptable, and a procedure of simplification is needed as soon as one works with general expressions.
 
This simplification is normally done through [[rewriting|rewriting rules]].<ref>Buchberger, Bruno, and Rüdiger Loos. "[https://www.risc.jku.at/people/buchberg/papers/1982-00-00-B.pdf Algebraic simplification]." Computer algebra. Springer, Vienna, 1982. 11-43.</ref> There are several classes of rewriting rules that have to be considered. The simplest consists in the rewriting rules that always reduce the size of the expression, like {{math|''E'' &minus; ''E'' → 0}} or {{math|sin(0) → 0}}. They are systematically applied in computer algebra systems.
 
The first difficulty occurs with [[associative operation]]s like addition and multiplication. The standard way to deal with associativity is to consider that addition and multiplication have an arbitrary number of operands, that is that {{math|''a'' + ''b'' + ''c''}} is represented as {{math|"+"(''a'', ''b'', ''c'')}}. Thus {{math|''a'' + (''b'' + ''c'')}} and {{math|(''a'' + ''b'') + ''c''}} are both simplified to {{math|"+"(''a'', ''b'', ''c'')}}, which is displayed {{math|''a'' + ''b'' + ''c''}}. What about {{math|''a'' &minus; ''b'' + ''c''}}? To deal with this problem, the simplest way is to rewrite systematically {{math|&minus;''E''}}, {{math|''E'' &minus; ''F''}}, {{math|''E''/''F''}} as, respectively, {{math|(&minus;1)⋅''E''}}, {{math|''E'' + (&minus;1)⋅''F''}}, {{math|''E''⋅''F''<sup>&minus;1</sup>}}. In other words, in the internal representation of the expressions, there is no subtraction nor division nor unary minus, outside the representation of the numbers.