# Imaginary number i

Is the imaginary number i, defined somewhere in Cadabra?

The version on github now has an ImaginaryI property which is handled automatically,

i::ImaginaryI;
ex:= i i A;

reduces to -A immediately.

by (65.1k points)
selected by
There used to be an ImaginaryI property, but I seem to have forgotten to include it in 2.x; thanks for reminding me ;-) Until that's back, simply use
substitute(_, $I I -> -1$, repeat=True);