ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 22 May 2019 01:57:30 +0200tangent space vector mappinghttps://ask.sagemath.org/question/46593/tangent-space-vector-mapping/Very simple question.
I am going through the SM_tutorial and branched off into a sidestream; trying to understand and put things in a context that I already know.
The tutorial defines a function f() on 3 space and defines the associated tangent_space. I have a couple of questions
1) How do I take a vector in the tangent_space
Say: v = Tp.an_element(); print(v)
"Tangent vector at Point p on the 3-dimensional differentiable manifold M"
or vxx = Tp((-2,1,5), name='vxx')
and apply it to f() (or f(p) although the TM is only defined at p so far)?
If I define a vector in the base space it works::
v = U.vector_field(name='v')
s = v(f)
I know in standard texts the mapping of vectors in TM_p to the base is defined, but couldn't find it in the Sage Manifold documentation.
2) Taking : v = Tp.an_element(); print(v)
I get something that looks like a vector (with a different ancestry) but has a value
v.display()
∂/∂x+2∂/∂y+3∂/∂z
Where did this value come from? In one of the documentation it (sort of) implies it's an example; is this true?
Why isn't it left undefined?
RayMon, 20 May 2019 17:47:33 +0200https://ask.sagemath.org/question/46593/tangent-space-vector-mapping/Comment by my_screen_name for <p>Very simple question. <br>
I am going through the SM_tutorial and branched off into a sidestream; trying to understand and put things in a context that I already know. <br>
The tutorial defines a function f() on 3 space and defines the associated tangent_space. I have a couple of questions <br>
1) How do I take a vector in the tangent_space <br>
Say: v = Tp.an_element(); print(v) <br>
"Tangent vector at Point p on the 3-dimensional differentiable manifold M" <br>
or vxx = Tp((-2,1,5), name='vxx') <br>
and apply it to f() (or f(p) although the TM is only defined at p so far)? <br>
If I define a vector in the base space it works:: <br>
v = U.vector_field(name='v') <br>
s = v(f) <br>
I know in standard texts the mapping of vectors in TM_p to the base is defined, but couldn't find it in the Sage Manifold documentation.</p>
<p>2) Taking : v = Tp.an_element(); print(v) <br>
I get something that looks like a vector (with a different ancestry) but has a value <br>
v.display() <br>
∂/∂x+2∂/∂y+3∂/∂z <br>
Where did this value come from? In one of the documentation it (sort of) implies it's an example; is this true? <br>
Why isn't it left undefined? <br>
Ray</p>
https://ask.sagemath.org/question/46593/tangent-space-vector-mapping/?comment=46605#post-id-46605Regarding (2), I couldn't reproduce this. In particular, when I create a manifold (and define some coordinates on it) and then run
p = theManifold.point(name='p')
TpM = theManifold.tangent_space(p)
v = TpM.an_element()
v.dipslay(),
I get the error message
ValueError: no basis could be found for computing the components in the NoneTue, 21 May 2019 13:34:53 +0200https://ask.sagemath.org/question/46593/tangent-space-vector-mapping/?comment=46605#post-id-46605Comment by eric_g for <p>Very simple question. <br>
I am going through the SM_tutorial and branched off into a sidestream; trying to understand and put things in a context that I already know. <br>
The tutorial defines a function f() on 3 space and defines the associated tangent_space. I have a couple of questions <br>
1) How do I take a vector in the tangent_space <br>
Say: v = Tp.an_element(); print(v) <br>
"Tangent vector at Point p on the 3-dimensional differentiable manifold M" <br>
or vxx = Tp((-2,1,5), name='vxx') <br>
and apply it to f() (or f(p) although the TM is only defined at p so far)? <br>
If I define a vector in the base space it works:: <br>
v = U.vector_field(name='v') <br>
s = v(f) <br>
I know in standard texts the mapping of vectors in TM_p to the base is defined, but couldn't find it in the Sage Manifold documentation.</p>
<p>2) Taking : v = Tp.an_element(); print(v) <br>
I get something that looks like a vector (with a different ancestry) but has a value <br>
v.display() <br>
∂/∂x+2∂/∂y+3∂/∂z <br>
Where did this value come from? In one of the documentation it (sort of) implies it's an example; is this true? <br>
Why isn't it left undefined? <br>
Ray</p>
https://ask.sagemath.org/question/46593/tangent-space-vector-mapping/?comment=46613#post-id-46613@my_screen_name: I cannot reproduce your issue. Can you provide the full code, starting from the definition of the manifold?Tue, 21 May 2019 22:22:08 +0200https://ask.sagemath.org/question/46593/tangent-space-vector-mapping/?comment=46613#post-id-46613Answer by eric_g for <p>Very simple question. <br>
I am going through the SM_tutorial and branched off into a sidestream; trying to understand and put things in a context that I already know. <br>
The tutorial defines a function f() on 3 space and defines the associated tangent_space. I have a couple of questions <br>
1) How do I take a vector in the tangent_space <br>
Say: v = Tp.an_element(); print(v) <br>
"Tangent vector at Point p on the 3-dimensional differentiable manifold M" <br>
or vxx = Tp((-2,1,5), name='vxx') <br>
and apply it to f() (or f(p) although the TM is only defined at p so far)? <br>
If I define a vector in the base space it works:: <br>
v = U.vector_field(name='v') <br>
s = v(f) <br>
I know in standard texts the mapping of vectors in TM_p to the base is defined, but couldn't find it in the Sage Manifold documentation.</p>
<p>2) Taking : v = Tp.an_element(); print(v) <br>
I get something that looks like a vector (with a different ancestry) but has a value <br>
v.display() <br>
∂/∂x+2∂/∂y+3∂/∂z <br>
Where did this value come from? In one of the documentation it (sort of) implies it's an example; is this true? <br>
Why isn't it left undefined? <br>
Ray</p>
https://ask.sagemath.org/question/46593/tangent-space-vector-mapping/?answer=46612#post-id-46612**Question 1:** `v(f)`, where `v` is a tangent vector at a given point `p` on a manifold and `f` a scalar field on that manifold, should work as is. I've opened the ticket [#27856](https://trac.sagemath.org/ticket/27856) to fix this. Thanks for your report. A workaround is
v(f.differential().at(p))
**Question 2:** for any Sage parent (here the tangent space `Tp`), the method `an_element()` returns an arbitrary element of it. The end user has no control on which element is returned. For tangent spaces on a manifold of dimension $n$, the element is hard-coded to be the vector of components $(1, 2, \ldots, n)$ in the default basis.
Another example is the method `an_element` of the manifold:
sage: M.an_element()
Point on the 3-dimensional differentiable manifold M
sage: M.an_element().coordinates()
(0, 0, 0)
Actually, the methods `an_element` are mostly used for test suites in Sage, like
sage: TestSuite(Tp).run(verbose=True)
running ._test_additive_associativity() . . . pass
running ._test_an_element() . . . pass
running ._test_cardinality() . . . pass
running ._test_category() . . . pass
running ._test_elements() . . .
Running the test suite of self.an_element()
running ._test_category() . . . pass
running ._test_eq() . . . pass
running ._test_new() . . . pass
running ._test_nonzero_equal() . . . pass
running ._test_not_implemented_methods() . . . pass
running ._test_pickling() . . . pass
pass
running ._test_elements_eq_reflexive() . . . pass
running ._test_elements_eq_symmetric() . . . pass
running ._test_elements_eq_transitive() . . . pass
running ._test_elements_neq() . . . pass
running ._test_eq() . . . pass
running ._test_new() . . . pass
running ._test_not_implemented_methods() . . . pass
running ._test_pickling() . . . pass
running ._test_some_elements() . . . pass
running ._test_zero() . . . pass
They probably should not be exposed in the tutorial. This is more confusing than useful, as you pointed out.Tue, 21 May 2019 22:17:27 +0200https://ask.sagemath.org/question/46593/tangent-space-vector-mapping/?answer=46612#post-id-46612Comment by rrogers for <p><strong>Question 1:</strong> <code>v(f)</code>, where <code>v</code> is a tangent vector at a given point <code>p</code> on a manifold and <code>f</code> a scalar field on that manifold, should work as is. I've opened the ticket <a href="https://trac.sagemath.org/ticket/27856">#27856</a> to fix this. Thanks for your report. A workaround is</p>
<pre><code>v(f.differential().at(p))
</code></pre>
<p><strong>Question 2:</strong> for any Sage parent (here the tangent space <code>Tp</code>), the method <code>an_element()</code> returns an arbitrary element of it. The end user has no control on which element is returned. For tangent spaces on a manifold of dimension $n$, the element is hard-coded to be the vector of components $(1, 2, \ldots, n)$ in the default basis.
Another example is the method <code>an_element</code> of the manifold:</p>
<pre><code>sage: M.an_element()
Point on the 3-dimensional differentiable manifold M
sage: M.an_element().coordinates()
(0, 0, 0)
</code></pre>
<p>Actually, the methods <code>an_element</code> are mostly used for test suites in Sage, like </p>
<pre><code>sage: TestSuite(Tp).run(verbose=True)
running ._test_additive_associativity() . . . pass
running ._test_an_element() . . . pass
running ._test_cardinality() . . . pass
running ._test_category() . . . pass
running ._test_elements() . . .
Running the test suite of self.an_element()
running ._test_category() . . . pass
running ._test_eq() . . . pass
running ._test_new() . . . pass
running ._test_nonzero_equal() . . . pass
running ._test_not_implemented_methods() . . . pass
running ._test_pickling() . . . pass
pass
running ._test_elements_eq_reflexive() . . . pass
running ._test_elements_eq_symmetric() . . . pass
running ._test_elements_eq_transitive() . . . pass
running ._test_elements_neq() . . . pass
running ._test_eq() . . . pass
running ._test_new() . . . pass
running ._test_not_implemented_methods() . . . pass
running ._test_pickling() . . . pass
running ._test_some_elements() . . . pass
running ._test_zero() . . . pass
</code></pre>
<p>They probably should not be exposed in the tutorial. This is more confusing than useful, as you pointed out.</p>
https://ask.sagemath.org/question/46593/tangent-space-vector-mapping/?comment=46616#post-id-46616Great! and thanks :) That in fact corresponds to usage/pullback of T_p vector I remember. I have looked around on the web in the last day and there seem's to be some obstacles to just yanking in down in general. One place has a greater than 1-page proof that it can sometimes be done. Yet another preconception too examine (:Wed, 22 May 2019 01:57:30 +0200https://ask.sagemath.org/question/46593/tangent-space-vector-mapping/?comment=46616#post-id-46616