\[\mathop{\mathrm{inv}}(\sigma)=\sum a_{gh}a_{k\ell},\]