MathTensor: A System for Doing Tensor Analysis by Computer