isannihilation

◼ isannihilation[op] returns True if op is an annihilation operator.
◼ iscreation[op] returns True if op is a creation operator.

◼ isannihilation and iscreation are used to determine how the operators should be reordered (see snegOrderedQ).

◼ See also: snegOrderedQ, ordering, vev, vevwick, zeroonv□ac, VACUUM.

Further examples

Load sneg and declare c and d to be fermionic operators.

<< sneg`sneg`;
snegfermionoperators[c, d];
ordering[c] = EMPTY;
ordering[d] = SEA;

Simple case: for ordering=EMPTY, the first index fully determines whether the operator is annihilation or creation operator.

iscreation[c[CR]]
isannihilation[c[AN]]
isannihilation[c[CR]]
iscreation[c[AN]]

More complex case: for ordering=SEA, the creation or annihilation character of an operator depends on the value of its indexes.

iscreation[d[CR, k]]
isannihilation[d[AN, k]]
isannihilation[d[CR, k]]
iscreation[d[AN, k]]

For bosons, the first index determines the operator type.

snegbosonoperators[a];
iscreation[a[CR]]
isannihilation[a[AN]]
iscreation[a[AN]]
isannihilation[a[CR]]