# How to set a symbolic function as non-commutative in NCAlgebra

Is there a way you can set a symbolic function to be non-commutative in NCAlgebra? For example SetCommutative[f[t]] returns CommutativeQ: Tried to set the expression "f[t]" to be commutative".

Couldn't get it to work exactly: using subscripts is the best I could get i.e. Subscript[f, t]. Setting the symbol f commutative makes all Subscript[f, t] (where t is any other symbol) commutative.

In NCAlgebra, functions of a noncommutative symbol are assumed to be noncommutative. So you just have to define f to be noncommutative as in

SNC[f]


(in your example you can skip step because all small caps single letters are set noncommutative by default).

Then if you evaluate

g ** f[t]


you will get

NonCommutativeMultiply[g, f[t]]

Also functions of noncommutative variables are assumed to be noncommutative as well and

g ** F[t]


will also evaluate to

NonCommutativeMultiply[g, F[t]]

even though F is commutative because t is noncommutative. However

g ** F[T]


will evaluate to

Times[g, F[T]]