Difference between revisions of "Reduction rules for MathObject Formulas"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
− | MathObjects reduces mathematical expressions according to a set of reduction rules. These control which expressions are reduced. |
+ | MathObjects reduces mathematical expressions according to a set of reduction rules. These control which expressions are reduced. Reductions can be turned off in a number of ways: |
+ | |||
+ | For all subsequent <code>reduce</code> operations in the problem: |
||
+ | |||
+ | Context()->reduction->set('x/1'=>0); |
||
+ | |||
+ | For a single reduction: |
||
+ | |||
+ | $f->reduce('x/1'=>0); |
||
<!-- |
<!-- |
||
Line 86: | Line 86: | ||
| <code>x+(-y)</code> || <code>x-y</code> |
| <code>x+(-y)</code> || <code>x-y</code> |
||
|} |
|} |
||
+ | |||
+ | [[Category:MathObjects]] |
Revision as of 22:34, 19 March 2008
MathObjects reduces mathematical expressions according to a set of reduction rules. These control which expressions are reduced. Reductions can be turned off in a number of ways:
For all subsequent reduce
operations in the problem:
Context()->reduction->set('x/1'=>0);
For a single reduction:
$f->reduce('x/1'=>0);
Rule | Reduction |
---|---|
0><x |
0
|
0-x |
-x
|
0/x |
0
|
0.x |
0
|
0*x |
0
|
0+x |
x
|
1^x |
1
|
1*x |
x
|
-a-bi |
-(a+bi)
|
fn*x |
x*fn
|
-n |
If the number is negative, factor it out and try using that in the reductions of the parent objects. |
V_n |
Select the n th item of V .
|
x^0 |
1
|
x><0 |
0
|
x-0 |
x
|
x.0 |
0
|
x*0 |
0
|
x+0 |
x
|
-(-x) |
x
|
+x |
x
|
x^(-1) |
1/x
|
x/1 |
x
|
x*1 |
x
|
-x=n |
x=-n
|
x*n |
n*x
|
-x=-y |
x=y
|
(-x)><y |
x><-y
|
(-x)-y |
-(x+y)
|
(-x)/y |
-(x/y)
|
(-x).y |
-(x.y)
|
(-x)*y |
-(x*y)
|
(-x)+y |
y-x
|
x><(-y) |
-(x><y)
|
x-(-y) |
x+y
|
x/(-y) |
-(x/y)
|
x.(-y) |
-(x.y)
|
x*(-y) |
-(x*y)
|
x+(-y) |
x-y
|