The types ac_var, nc_var, commutative, anticommutative, and noncommutative
|
Calling Sequence
|
|
type(expr, xxx)
|
|
Parameters
|
|
expr
|
-
|
any algebraic expression
|
xxx
|
-
|
any of: c_symbol, ac_symbol, nc_symbol, c_var, ac_var, nc_var, commutative, anticommutative, and noncommutative
|
|
|
|
|
Description
|
|
•
|
The set of type subroutines `type/xxx`, where xxx is as described above, return true when the expression is of the corresponding type and false otherwise. These types are available only after loading the Physics package, or after having used any of its commands using the long form. of use to recognize the commutative (C), anticommutative (AC), and noncommutative (NC) character concerning products of a given expression.
|
•
|
There are nine types that, for efficiency reasons, are
|
–
|
The first set includes the most basic three types c_symbol, ac_symbol, and nc_symbol, which respectively recognize the commutative, anticommutative, or noncommutative character of a symbol (typically used to represent variables).
|
–
|
The second set includes the three types c_var, ac_var, and nc_var, which respectively recognize the commutative, anticommutative, and noncommutative character of names (symbols or indexed objects) and also functions.
|
–
|
The third set includes the three types commutative, anticommutative, or noncommutative to recognize the corresponding character of arbitrary Maple expressions of type algebraic.
|
•
|
type(var, ac_symbol) behaves as follows. By convention, the AC var is identified as:
|
if var is a symbol beginning with an AC identifier followed by a positive number
|
or var is an indexed object or function with such a name
|
or var is a linear operation (e.g. differentiation) on a function with such a name
|
then true
|
else false
|
|
|
|
Type type/nc_var works the same way as type/ac_var but instead of looking for an anticommutative identifier it looks for a noncommutative identifier in the name of the functions or variables used.
|
•
|
The other three types, commutative, anticommutative, and noncommutative address a more complex task: the recognition of the C, AC, and NC character of an expression arbitrarily composed with sums, products, powers, functions, indexed objects, and constants. Note that an algebraic expression is classified here as C, AC, or NC in an exclusive manner; that is, it cannot have two of these characters at the same time. Concerning compositions of objects belonging to different classifications, the conventions adopted here are:
|
C * AC = AC * C
|
is of AC type
|
C * NC = NC * C
|
is of NC type
|
AC * NC <> NC * AC
|
is of NC type
|
|
|
C + AC = AC + C
|
is of NC type
|
C + NC = NC + C
|
is of NC type
|
AC + NC = NC + AC
|
is of NC type
|
|
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
Set first an identifier for anticommutative and noncommutative variables using Setup, for example:
>
|
|
| (2) |
Consider now the list of objects
>
|
|
| (3) |
The first three are anticommutative, the next three are commutative and the last three are noncommutative:
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
|
|