In my work, I found it necessary to create an abstract TensorAlgebra
type. Searching on github, I found that many others had also devised some sort of AsbtractTensor
concept.
As a multilinear map, a tensor is defined on a VectorSpace
. To facilitate compile-time operations with various different VectorSpace
instances encountered, I created the DirectSum
package:
In order to manage the interoperability of TensorAlgebra{V}
elements over V
(a VectorSpace
) it was natural to make these abstractions available separately from the specific implementations. In this case, my original applications were for constructing the Grassmann.jl exterior tensor product algebra, wich required a dispatch bypass in the scope of Reduce.jl module Reduce.Algebra
. Thus,
Together, this can provide a unified abstract type root for arbitrary TensorAlgebra
dispatch.
By itself, this package does not impose any structure or specifications on the TensorAlgebra{V}
subtypes and elements, aside from requiring V
to be a VectorSpace
. This means that different packages can create special types of tensors with shared method names and a common underlying VectorSpace
structure.
These two packages have been registered and are now available for use. Although primarily intended for the implementation of the Grassmann
package, it is my hope that perhaps the AbstractTensors
and DirectSum
packages could help towards making a universal TensorAlgebra{V}
abstraction.
If any other developers are interested in this VectorSpace
and TensorAlgebra
abstraction layer, I would be interested to see any discussions or feedback concerning it. This project tracks related issues.