The following appears to be a bug in sagemanifolds curvature. I see the error running it in cocalc.com. Other things like computing the induced_metric() and normal() and fine. Am I doing something wrong?
sage: P = Manifold(3, 'P', structure='Riemannian', metric_name='g', start_index=0)
sage: Q = Manifold(2, 'Q', ambient=P, structure='Riemannian', metric_name='k', start_index=1)
sage: CP.<x,y,z> = P.chart()
sage: CQ.<u,v> = Q.chart()
sage: g = P.metric()
sage: c = 2/(sum(y^2 for y in CP[1:]) + 1)
sage: g[0,0], g[1,1], g[2,2] = 1, c^2, c^2
sage: f = sum(CQ[:])
sage: f = u + v
sage: phi = Q.diff_map(P,{(CQ, CP):[f] + list(CQ[:])})
sage: phi_inv = P.diff_map(Q, {(CP, CQ) : list(CQ[:])})
sage: Q.set_embedding(phi, inverse=phi_inv)
sage: K = Q.extrinsic_curvature()
Error in lines 13-13
Traceback (most recent call last):
File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1188, in execute flags=compile_flags), namespace, locals)
File "", line 1, in <module>
File "/ext/sage/sage-8.8_1804/local/lib/python2.7/site-packages/sage/manifolds/differentiable/pseudo_riemannian_submanifold.py", line 1067, in second_fundamental_form range(self._dim + 1))
File "sage/matrix/matrix0.pyx", line 1424, in sage.matrix.matrix0.Matrix.__setitem__ (build/cythonized/sage/matrix/matrix0.c:8796) self.set_unsafe(row, col, self._coerce_element(value))
File "sage/matrix/matrix0.pyx", line 1529, in sage.matrix.matrix0.Matrix._coerce_element (build/cythonized/sage/matrix/matrix0.c:10273) return self._base_ring(x)
File "sage/structure/parent.pyx", line 900, in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9197) return mor._call_(x)
File "sage/structure/coerce_maps.pyx", line 288, in sage.structure.coerce_maps.NamedConvertMap._call_ (build/cythonized/sage/structure/coerce_maps.c:5942) cdef Element e = method(C)
File "sage/symbolic/expression.pyx", line 1087, in sage.symbolic.expression.Expression._integer_ (build/cythonized/sage/symbolic/expression.cpp:8689) raise TypeError("unable to convert %r to an integer" % self)
TypeError: unable to convert 1/2sqrt(2)(u^4 + v^4 + 2(u^2 + 1)v^2 + 2u^2 + 1)y/(sqrt(u^4 + v^4 + 2(u^2 + 1)v^2 + 2u^2 + 3)(y^2 + z^2 + 1)) + 1/2sqrt(2)(u^4 + v^4 + 2(u^2 + 1)v^2 + 2u^2 + 1)z/(sqrt(u^4 + v^4 + 2(u^2 + 1)v^2 + 2u^2 + 3)(y^2 + z^2 + 1)) to an integer