Tensor arithmetic