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.Fri, 28 Aug 2020 11:47:35 +0200Error when I had some show commandshttps://ask.sagemath.org/question/53179/error-when-i-had-some-show-commands/Hi All,
I'm using SageMath 9.1 on Windows Native.
I'm using the following documentation file:
[Curve](http://doc.sagemath.org/html/en/reference/manifolds/sage/manifolds/differentiable/curve.html).
If I use the very last two parts of that file:
sage: M = Manifold(2, 'M') # the 2-dimensional sphere S^2
sage: U = M.open_subset('U') # complement of the North pole
sage: c_xy.<x,y> = U.chart() # stereographic coordinates from the North pole
sage: V = M.open_subset('V') # complement of the South pole
sage: c_uv.<u,v> = V.chart() # stereographic coordinates from the South pole
sage: M.declare_union(U,V) # S^2 is the union of U and V
sage: xy_to_uv = c_xy.transition_map(c_uv, (x/(x^2+y^2), y/(x^2+y^2)),
....: intersection_name='W', restrictions1= x^2+y^2!=0,
....: restrictions2= u^2+v^2!=0)
sage: uv_to_xy = xy_to_uv.inverse()
sage: W = U.intersection(V)
sage: A = W.open_subset('A', coord_def={c_xy.restrict(W): (y!=0, x<0)})
sage: c_spher.<th,ph> = A.chart(r'th:(0,pi):\theta ph:(0,2*pi):\phi') # spherical coordinates
sage: spher_to_xy = c_spher.transition_map(c_xy.restrict(A),
....: (sin(th)*cos(ph)/(1-cos(th)), sin(th)*sin(ph)/(1-cos(th))) )
sage: spher_to_xy.set_inverse(2*atan(1/sqrt(x^2+y^2)), atan2(y, x), check=False)
sage: R.<t> = RealLine()
sage: c = M.curve({c_spher: [2*atan(exp(-t/10)), t]}, (t, -oo, +oo),
....: name='c') ; c
Curve c in the 2-dimensional differentiable manifold M
sage: vc = c.tangent_vector_field() ; vc
Vector field c' along the Real number line R with values on
the 2-dimensional differentiable manifold M
sage: vc.parent()
Module X(R,c) of vector fields along the Real number line R
mapped into the 2-dimensional differentiable manifold M
sage: vc.display(c_spher.frame().along(c.restrict(R,A)))
c' = -1/5*e^(1/10*t)/(e^(1/5*t) + 1) d/dth + d/dph
Then the result is fine as it should.
But If I add the following two lines after the definition of `c`, just to see some results:
print(c)
c.display()
Then the very last command of the file gives me a ValueError:
ValueError: no basis could be found for computing the components in the Vector frame (R, (d/dth,d/dph)) with values on the Open subset A of the 2-dimensional differentiable manifold M
Is this a bug?
Daniel
Tue, 25 Aug 2020 22:12:29 +0200https://ask.sagemath.org/question/53179/error-when-i-had-some-show-commands/Comment by eric_g for <p>Hi All,</p>
<p>I'm using SageMath 9.1 on Windows Native.
I'm using the following documentation file:
<a href="http://doc.sagemath.org/html/en/reference/manifolds/sage/manifolds/differentiable/curve.html">Curve</a>.
If I use the very last two parts of that file:</p>
<pre><code>sage: M = Manifold(2, 'M') # the 2-dimensional sphere S^2
sage: U = M.open_subset('U') # complement of the North pole
sage: c_xy.<x,y> = U.chart() # stereographic coordinates from the North pole
sage: V = M.open_subset('V') # complement of the South pole
sage: c_uv.<u,v> = V.chart() # stereographic coordinates from the South pole
sage: M.declare_union(U,V) # S^2 is the union of U and V
sage: xy_to_uv = c_xy.transition_map(c_uv, (x/(x^2+y^2), y/(x^2+y^2)),
....: intersection_name='W', restrictions1= x^2+y^2!=0,
....: restrictions2= u^2+v^2!=0)
sage: uv_to_xy = xy_to_uv.inverse()
sage: W = U.intersection(V)
sage: A = W.open_subset('A', coord_def={c_xy.restrict(W): (y!=0, x<0)})
sage: c_spher.<th,ph> = A.chart(r'th:(0,pi):\theta ph:(0,2*pi):\phi') # spherical coordinates
sage: spher_to_xy = c_spher.transition_map(c_xy.restrict(A),
....: (sin(th)*cos(ph)/(1-cos(th)), sin(th)*sin(ph)/(1-cos(th))) )
sage: spher_to_xy.set_inverse(2*atan(1/sqrt(x^2+y^2)), atan2(y, x), check=False)
sage: R.<t> = RealLine()
sage: c = M.curve({c_spher: [2*atan(exp(-t/10)), t]}, (t, -oo, +oo),
....: name='c') ; c
Curve c in the 2-dimensional differentiable manifold M
sage: vc = c.tangent_vector_field() ; vc
Vector field c' along the Real number line R with values on
the 2-dimensional differentiable manifold M
sage: vc.parent()
Module X(R,c) of vector fields along the Real number line R
mapped into the 2-dimensional differentiable manifold M
sage: vc.display(c_spher.frame().along(c.restrict(R,A)))
c' = -1/5*e^(1/10*t)/(e^(1/5*t) + 1) d/dth + d/dph
</code></pre>
<p>Then the result is fine as it should.</p>
<p>But If I add the following two lines after the definition of <code>c</code>, just to see some results:</p>
<pre><code>print(c)
c.display()
</code></pre>
<p>Then the very last command of the file gives me a ValueError:</p>
<p>ValueError: no basis could be found for computing the components in the Vector frame (R, (d/dth,d/dph)) with values on the Open subset A of the 2-dimensional differentiable manifold M</p>
<p>Is this a bug?</p>
<p>Daniel</p>
https://ask.sagemath.org/question/53179/error-when-i-had-some-show-commands/?comment=53207#post-id-53207Thanks for the report. I confirm the bug with SageMath 9.2.beta10.Fri, 28 Aug 2020 11:47:35 +0200https://ask.sagemath.org/question/53179/error-when-i-had-some-show-commands/?comment=53207#post-id-53207