Marco Sulla writes:
Another big problem with tensors is the covariance and contravariance. Usually in informatic you denote the covariance with the subscript operator, that on paper is written as subscript. Contravariant index on the contrary is a superscript.
You're talking about the notation that makes the Einstein summation convention so pleasant? I think summation will have to be an explict operator or function, along a specified axis -- as numpy supports.
Not sure how a programming language can easily represent it.
Do you need to represent it? It seems to me you could have a Tensor class whose constructor takes a bool argument 'contravariant' (default False), and then recommend that users adopt a naming convention to distinguish covariant Tensors from contravariant Tensors. Steve