total_space dimension?
Hi all,
I'm new to Sage, transitioning from Mathematica --- so let me know if I'm doing something weird! I am interested in defining functions on a Tangent space (i.e. $f : TM \to \mathbb R$, the natural space of solutions for a Boltzmann equation). To do this, my first attempt is this:
E.<x,y,z> = EuclideanSpace() # Define the spatial Euclidean Space
TE = E.tensor_bundle(1,0) # Tangent bundle on the Euclidean space
TE_manifold = E.total_space() # Gets the tangent bundle as a manifold?
display(TE_manifold)
This outputs "9-dimensional differentiable manifold TE^3".
I would expect the dimension to be 6; tangent bundles normally have double the dimension to my understanding.
Is this the expected behavior?
Digging into the source code for total_space()
, I found that the dimension is being computed as TE._rank * E._dim
, while I would expect that should be TE._rank + E._dim
.
I would also expect it to be the sum of the dimensions. @eric_g: what do you think?
I have made https://github.com/sagemath/sage/pull... so please review.
This is indeed a (big!) bug in the code of
total_space
. Actually, contrary to other parts, the vector bundle part ofsage.manifolds
has not been used much (as you may have noticed, there is still someTODO
mark in the code oftotal_space
)... Thank you for the report! and thank you @FrédéricC for the fix!A side remark: you may use
TE = E.tangent_bundle()
as a shortcut forTE = E.tensor_bundle(1,0)
.