# Several charts at top create trouble with submanifolds

My issue seems pretty trivial, however, I cannot find a way.

I create a manifold, with 2 frames/charts, and create transition_map between them.
Create a metric. I create then a submanifold, create `diff_map`

to the first manifold,
and make an embedding. Then I try to get the `induced_metric`

.

It works only if the `diff_map`

is referenced to the first created frame/chart at top level.

In my example:

- top manifold with cartesian and cylindrical charts
- sub manifold is a cylinder. I cannot base it on the cylindrical top chart.

My purpose would be to have a top manifold series of charts at top and natural embeddings of lower dimension manifolds.

Any idea?

My code:

```
E = Manifold(3, 'E', structure='Riemannian')
cartesian.<x,y,z> = E.chart()
cartesian_frame = cartesian.frame()
cylindrical.<r,ph,z> = E.chart(r'r:(0,+oo) ph:(0,2*pi):\phi z')
cylindrical_frame = cylindrical.frame()
cyl2cart = cylindrical.transition_map(cartesian , [r*cos(ph), r*sin(ph), z])
cart2cyl = cyl2cart.set_inverse(sqrt(x^2 + y^2), atan2(y, x), z)
ecc = E.coord_changes()
for cc in ecc:
display(ecc[cc].display())
g = E.metric()
g[cartesian_frame, 0, 0], g[cartesian_frame, 1, 1], g[cartesian_frame, 2, 2] = 1, 1, 1
display(g.display(cartesian))
display(g.display(cylindrical))
C2 = Manifold(2, 'C2', ambient=E, structure='Riemannian')
Cyl2.<ph,z> = C2.chart(r'ph:\phi z')
Cyl2_frame = Cyl2.frame()
if True: # True shows issue
E.set_default_frame(cylindrical_frame)
E.set_default_chart(cylindrical)
Cyl2tocylindrical = C2.diff_map(E, {(Cyl2, cylindrical): [1, ph, z]})
cylindricaltoCyl2 = E.diff_map(C2, {(cylindrical, Cyl2): [ph, z]})
C2.set_embedding(Cyl2tocylindrical)
else:
Cyl2tocartesian = C2.diff_map(E, {(Cyl2, cartesian): [cos(ph), sin(ph), z]})
cartesiantoCyl2 = E.diff_map(C2, {(cartesian, Cyl2): [arctan2(y, x), z]})
C2.set_embedding(Cyl2tocartesian)
C2g = C2.induced_metric() # never an error message here
display(C2g.display()) # exhibits the issue
```

Welcome to Ask Sage! Thank you for your question!