The permanent function as an inner product