[ANN] DirectSum.jl, AbstractTensors.jl : dispatch on VectorBundle <: Manifold{n}

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.

2 Likes

Related yet, as far as I can tell from a quick look, also very different: https://github.com/Jutho/TensorKit.jl
Also, my package (actually mostly the documentation) is very much work in progress (best to look at the dev version of the manual if you are interested)

2 Likes

Yes, that’s very related, interesting! I’ve found various other projects on Github, we are all interested in similar things but have somewhat different ways of doing it. Another one is VectorSpaces.jl

It’s clear from the various projects out there (counted around 5-10) that some kind of a unified system is desired by various people, each having slightly different needs.

I imagine that in the future there are going to be many different options for these kind of tools, mine is more geared towards being fluent with conformal geometric algebra. Perhaps, we should be talking with each other and forming more of a community around how to organize these related tools.

However, one main difference is that I separated my specific implementation in Grassmann.jl away from my root abstract type for TensorAlgebra{V} and the VectorSpace definitions.

This is because the Grassmann tensor product space is only a subset of the full tensor product space.

This allows other packages to have interoperability with TensorAlgebra if needed.

The DirectSum package has a tangent bundle encoding based on the following:

Let T^dV\in\text{Vect}_\mathbb K be a VectorBundle<:Manifold of rank n,

T^dV = (n,p,g,d),\, n \in\mathbb N,\, g :V\times V\rightarrow\mathbb K, \, d \in\mathbb Z

::VectorBundle{n,p,g,d} where {n,p,g,d} byte-encoded

  • p specifies the null-basis from the projective split of V,
  • g is a bilinear form that specifies the metric of the space,
  • d is an integer specifying the order of the tangent bundle.

\bigoplus T^{d_i}V_i = (|p|+d+\sum n_i-|p_i|-d_i,\,\bigcup p_i,\,\oplus_i g_i,\,\max\{d_i\}_i)

::SubManifold{m,V,s} where \{n\geq m\in\mathbb N,V\in\text{Vect}_\mathbb K,s\in V\}

T^eV \subset T^dW \iff \exists Z\in\text{Vect}_\mathbb K(T^e(V\oplus Z) = T^{e\leq d}W,\,V\perp Z)

Dual space involution: (\cdot)':\text{Vect}_\mathbb K^\text{op}\rightarrow\text{Vect}_\mathbb K, V' = \text{Hom}(V,\mathbb K)

T^dV = \langle v_1,\dots,v_n,\epsilon_1,\dots,\epsilon_d\rangle,\, T^dV' = \langle w_1,\dots,w_n,\partial_1,\dots,\partial_d\rangle

Additional Manifold types such as SubManifold and DiagonalManifold will enable the precise application of Riemannian geometry in the Grassmann algebra package in an upcoming release.

DirectSum.jl has been updated to v0.5 and AbstractTensors.jl is v0.4.2 with revised features and docs

3 Likes