The types ac_var, nc_var, commutative, anticommutative, and noncommutative - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Physics : type/commutative

The types ac_var, nc_var, commutative, anticommutative, and noncommutative

 

Calling Sequence

Parameters

Description

Examples

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 with the long form. These types are of use to recognize the commutative (C), anticommutative (AC), and noncommutative (NC) character of objects concerning products.

• 

There are nine types that, for efficiency reasons, are organized in three sets of tree types each, where each set is a superset of the previous others.

– 

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.

  

CAVEAT: consider A, b, c, ... all of them either commutative or anticommutative symbols. Then indexed objects of the form A[b, ...], are considered commutative when the parity of the product A * b * ... is 1 and anticommutative otherwise; that is: commutative when there is an odd number of anticommutative variables, considering not just the indices but also the name of the indexed object. This is of relevance when computing with derivatives in jet notation.

– 

The third set includes the three types commutative, anticommutative, or noncommutative to recognize the corresponding character of arbitrary Maple expressions of type algebraic.

• 

The type ac_var identified var as anticommutative (AC) according to:

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 (exception made of CAVEAT above)

     else false

  

Type type nc_var works the same way as 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:

• 

Products:

C * AC  =  AC * C

is of AC type

C * NC  =  NC * C

is of NC type

AC * NC <> NC * AC

is of NC type

• 

Sums:

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

withPhysics&colon;

Setupmathematicalnotation&equals;true

mathematicalnotation&equals;true

(1)

Set first an identifier for anticommutative and noncommutative variables using Setup, for example:

Setupanticommutativeprefix&equals;Q&comma;&theta;&comma;noncommutativeprefix&equals;Z

anticommutativeprefix=Q&comma;_&lambda;&comma;θ&comma;noncommutativeprefix=Z

(2)

Consider now the list of objects

ee&theta;&comma;Q&comma;Q&theta;&comma;x&comma;fx&comma;f&theta;&comma;x&comma;Z&comma;Zx&comma;Z&theta;

eeθ&comma;Q&comma;Qθ&comma;x&comma;fx&comma;fθ&comma;x&comma;Z&comma;Zx&comma;Zθ

(3)

The first three are anticommutative, the next three are commutative and the last three are noncommutative:

maptype&comma;ee&comma;commutative

false&comma;false&comma;false&comma;true&comma;true&comma;true&comma;false&comma;false&comma;false

(4)

maptype&comma;ee&comma;anticommutative

true&comma;true&comma;true&comma;false&comma;false&comma;false&comma;false&comma;false&comma;false

(5)

maptype&comma;ee&comma;noncommutative

false&comma;false&comma;false&comma;false&comma;false&comma;false&comma;true&comma;true&comma;true

(6)

See Also

PDEtools[ToJet]

Physics

Physics conventions

Physics examples

Physics/*

Physics/Setup

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam