Given two rank 3 tensors, you could define their "inner product" by taking their outer product and contracting over a pair of indices you choose by convention. But it would be more interesting to have a general
contraction procedure over any pair of indices.
It would. I attempted to get Brad to put the inner product into SRFI 179, but didn't succeed, because the APL definition works because APL scalars just are 0-dimensional arrays, and the latter are not supported by 179 (though they are by 164 and CL). He said
he might add the definition as an example, but didn't. Perhaps I should have asked for array-contract instead, though the same irregularity would result: it might return an array or not, depending on the ranks of the arguments.