snegrealconstants

◼ snegrealconstants[x,y] declares x and y to be real constants.

◼ Constants are factored out from operator strings within nc blocks.

◼ Real constants are invariant under conjugation.

◼ Note: some Mathematica functions have difficulties with parameters tagged with NumericQ. As a work-around, functions maskconstants and maskOp are provided.

◼ See also: snegintegerconstants, snegcomplexconstants, snegfreeindexes.

Further examples

Load sneg

<< sneg`sneg`;

Let c be a fermionic operator and x a real constant

snegfermionoperators[c]
snegrealconstants[x]

x is factored out

nc[2  c[CR], x c[AN]]
FullForm[%]
conj[%%]

Functions of x are also factored out

nc[c[CR], x^2 c[AN]]
FullForm[%]
nc[c[CR], Sin[x] c[AN]]
FullForm[%]

y is not factored out

nc[2 c[CR], y c[AN]]
conj[%]