Skip to content

Pullback silently fails in some cases with multiple charts #31904

@egourgoulhon

Description

@egourgoulhon

In Sage 9.3, we have

sage: E.<x,y> = EuclideanSpace()
sage: polar.<r,ph> = E.polar_coordinates()
sage: g = E.metric()
sage: M = Manifold(1, 'M')
sage: Ct.<t> = M.chart()
sage: F = M.diff_map(E, coord_functions={(Ct, polar): (1 + cos(t), t)})
sage: gM = F.pullback(g)
sage: gM
Field of symmetric bilinear forms on the 1-dimensional differentiable
manifold M

So far so good, but

sage: gM.display()
ValueError: no basis could be found for computing the components in 
 the Coordinate frame (M, (d/dt)

Actually, gM has been initialized as a tensor field object, but its components have not been evaluated in any frame:

sage: gM._components
{}

Forcing the coordinate expression of the map F in the Cartesian chart (for instance by a call to F.display()) fixes the issue:

sage: F.display()
M --> E^2
   t |--> (x, y) = (cos(t)^2 + cos(t), (cos(t) + 1)*sin(t))
   t |--> (r, ph) = (cos(t) + 1, t)
sage: gM = F.pullback(g)
sage: gM.display()
(2*cos(t) + 2) dt*dt

However, the expression of F in Cartesian coordinates should not be required to compute the pullback of g since the latter is known in polar coordinates, where F has been defined:

sage: g.display(polar)
g = dr*dr + r^2 dph*dph

This bug has been reported at https://ask.sagemath.org/question/57431/

CC: @tscrim @mjungmath @mkoeppe

Component: manifolds

Keywords: pullback

Author: Eric Gourgoulhon

Branch/Commit: aea4554

Reviewer: Ricardo Buring

Issue created by migration from https://trac.sagemath.org/ticket/31904

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions