4.2 Simplification
This area is under developement so stronger commands will appear in later versions. What we
mean by simplify is not in the spirit of Mathematica’s Simplify. They tend to factor expressions so
that the expressions become very short. We expand expressions apply rules to the expressions
which incorporate special relations the entries satisfy. Then we rely on cancelation of terms. The
theoretical background lies in noncommutative Gröbner basis theory, and the rules we are
implementing come from papers of Helton, Stankus and Wavrik [IEEE TAC March
1998].
The commands in this section are designed to simplify polynomials in a, b, inv[S - a **b],
inv[S - b **a], inv[S - a], inv[S - b] and a few slightly more complicated inverses.
The commands in order of strength are NCSR, NCS1R, NCS2R. Of course, for a
stronger the command, more rules get applied and so the command takes longer to
run.
First, NCS1R normalizes inv[S - a **b] to S-1 * inv[1 - (a **b)∕S] provided S is a
commutative expression (only works for numbers S in version 0.2 of NCAlgebra). The following list
of rules are applied.
(0) inv[-1 + a] →-inv[1 - a]
(1) inv[1 - a] (a - b) inv[1 - b] → inv[1 - a] - inv[1 - b]
(2) inv[1 - ab] inv[b] → inv[1 - ba] a + inv[b]
(3) inv[1 - ab] ab → inv[1 - ab] - 1
(4) abinv[1 - ab] → inv[1 - ab] - 1
(5) inv[c] inv[1 - cb] → inv[1 - bc] inv[c]
(6) b inv[1 - ab] → inv[1 - ba]b
The command NCS2R increases the range of expressions to include inv[poly], but the
reductions for each of these inverses is considerably less powerful than for the case of
inv[1 - ab].
An example: if expr = a**inv[a + b] + inv[c-a] **(a-c) + inv[c + d] **(c + d + e), then the first
reduction using the list of rules in NCSR gives a**inv[a + b] + inv[c + d] **einv[a] **(a-b) **inv[b]
and the second reduction gives inv[b] - inv[a] which is the output from NCSR[expr].
NCSimplify0Rational is an old attempt at simplification. We do not use it much.
4.2.1 NCSimplifyRational[ expr ], NCSimplify1Rational[ expr ], and NCSimplify2Rational[
expr ]
-
- Aliases: NCSR
-
- Description: The objective is to simplify expressions which include polynomials and
inverses of very simple polynomials. These work by appling a collection of relations
implemented as rules to expr. The core of NCSimplifyRational is NCSimplify1Rational
and NCSimplify2Rational; indeed roughly NCSimplifyRational[expr]
= NCSimplify1Rational[NCSimplify2Rational[expr]] together with some NCExpand’s.
NCSimplify1Rational[expr] contains one set of rules while NCSimplify2Rational[expr]
contains another.
-
- Arguments: expr is an algebraic expression.
-
- Comments / Limitations: Works only for a specialized class of functions.
4.2.2 NCSimplify1Rational[expr]
-
- Aliases: NCS1R
-
- Description: It applies a collection of relations implemented as rules to expr. The goal is to
simplify expr.
-
- Arguments: expr is an algebraic expression.
-
- Comments / Limitations: WARNING:
NCS1R does not first do an ExpandNonCommutativeMultiply. Therefore, it may be
the case that one can miss some simplification if expr is not expanded out. The
solution, of course, is to call ExpandNonCommutativeMultiply before calling NCS1R.
ExpandNonCommutativeMultiply is called from NCSR.
First, NCS1R normalizes inv[S -a**b] to S-1 *inv[1 - (a**b)∕S] provided S is s a
commutative expression (only works for numbers S in version 0.2 of NCAlgebra). The
the following list of rules are applied.
(0) inv[-1 + a] →-inv[1 - a]
(1) inv[1 - a] (a - b) inv[1 - b] → inv[1 - a] - inv[1 - b]
(2) inv[1 - ab] inv[b] → inv[1 - ba] a + inv[b]
(3) inv[1 - ab] ab → inv[1 - ab] - 1
(4) abinv[1 - ab] → inv[1 - ab] - 1
(5) inv[c] inv[1 - cb] → inv[1 - bc] inv[c]
(6) b inv[1 - ab] → inv[1 - ba]b
In the notation of papers [HW], [HSW], these rules implement a superset of the union
of the Gröbner basis for EB and the Gröbner basis for RESOL.
4.2.3 NCSimplify2Rational[expr]
-
- Aliases: NCS2R
-
- Description: You need this for expressions involving inv[ polynomial ] where the polynomial
is not of the form SId - X **Y
-
- Arguments: expr is an algebraic expression.
-
- Comments / Limitations: If the polynomial is too complicated, this may not help very
much.